Implement wxNumericProperty as a base class for all wxPG numeric properties

All numeric properties (wxIntProperty, wxUIntProperty, wxFloatProperty) share some features (like specific attributes, numeric validation, SpinCtrl editor support) so for the sake of clear design it would be good to derive them from the common base class (wxNumericProperty) in which all shared functions are implemented. This class is not intended to be instantiated so it's an abstract class.
This commit is contained in:
Artur Wieczorek
2019-06-28 20:45:04 +02:00
parent bd1b5c4111
commit 69632371e3
6 changed files with 366 additions and 192 deletions

View File

@@ -1191,7 +1191,7 @@ void FormMain::PopulateWithExamples ()
pg->Append( new wxIntProperty ( "SpinCtrl", wxPG_LABEL, 0L ) );
pg->SetPropertyEditor( "SpinCtrl", wxPGEditor_SpinCtrl );
pg->SetPropertyAttribute( "SpinCtrl", wxPG_ATTR_MIN, -10L ); // Use constants instead of string
pg->SetPropertyAttribute( "SpinCtrl", wxPG_ATTR_MIN, -2L ); // Use constants instead of string
pg->SetPropertyAttribute( "SpinCtrl", wxPG_ATTR_MAX, 16384L ); // for reduced binary size.
pg->SetPropertyAttribute( "SpinCtrl", wxPG_ATTR_SPINCTRL_STEP, 2L );
pg->SetPropertyAttribute( "SpinCtrl", wxPG_ATTR_SPINCTRL_MOTION, true );