Derive dynamic custom properties with choices from this class. More...
#include <props.h>
Public Member Functions | |
virtual const wxString * | GetEntry (size_t index, int *pvalue) const =0 |
virtual int | GetIndexForValue (int value) const |
virtual wxString | GetValueAsString (int argFlags) const |
Returns text representation of property's value. | |
int | GetValueForIndex (size_t index) const |
virtual bool | IntToValue (wxVariant &variant, int number, int argFlags=0) const |
Converts 'number' (including choice selection) into proper value 'variant'. | |
virtual void | OnSetValue () |
This virtual function is called after m_value has been set. | |
virtual void | OnValidationFailure (wxVariant &pendingValue) |
Called whenever validation has failed with given pending value. | |
virtual bool | StringToValue (wxVariant &variant, const wxString &text, int argFlags=0) const |
Converts 'text' into proper value 'variant'. | |
virtual bool | ValidateValue (wxVariant &value, wxPGValidationInfo &validationInfo) const |
Implement this function in derived class to check the value. | |
wxBaseEnumProperty (const wxString &label=wxPG_LABEL, const wxString &name=wxPG_LABEL) | |
Protected Member Functions | |
int | GetIndex () const |
void | SetIndex (int index) |
bool | ValueFromInt_ (wxVariant &value, int intVal, int argFlags) const |
bool | ValueFromString_ (wxVariant &value, const wxString &text, int argFlags) const |
Static Protected Member Functions | |
static void | ResetNextIndex () |
Derive dynamic custom properties with choices from this class.
virtual wxString wxBaseEnumProperty::GetValueAsString | ( | int | argFlags | ) | const [virtual] |
Returns text representation of property's value.
Generally this function should not be called from the application code. Instead, call GetValueString().
argFlags | If wxPG_FULL_VALUE is set, returns complete, storable string value instead of displayable. If wxPG_EDITABLE_VALUE is set, returns string value that must be editable in textctrl. If wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to display as a part of composite property string value. |
Reimplemented from wxPGProperty.
Reimplemented in wxSystemColourProperty.
virtual bool wxBaseEnumProperty::IntToValue | ( | wxVariant & | value, | |
int | number, | |||
int | argFlags = 0 | |||
) | const [virtual] |
Converts 'number' (including choice selection) into proper value 'variant'.
Returns true if new (different than m_value) value could be interpreted from the integer.
argFlags | If wxPG_FULL_VALUE is set, returns complete, storable value instead of displayable |
Reimplemented from wxPGProperty.
Reimplemented in wxSystemColourProperty.
virtual void wxBaseEnumProperty::OnSetValue | ( | ) | [virtual] |
This virtual function is called after m_value has been set.
Reimplemented from wxPGProperty.
Reimplemented in wxSystemColourProperty.
virtual void wxBaseEnumProperty::OnValidationFailure | ( | wxVariant & | pendingValue | ) | [virtual] |
Called whenever validation has failed with given pending value.
Reimplemented from wxPGProperty.
virtual bool wxBaseEnumProperty::StringToValue | ( | wxVariant & | variant, | |
const wxString & | text, | |||
int | argFlags = 0 | |||
) | const [virtual] |
Converts 'text' into proper value 'variant'.
Returns true if new (different than m_value) value could be interpreted from the text.
argFlags | If wxPG_FULL_VALUE is set, returns complete, storable value instead of displayable one (they may be different). If wxPG_COMPOSITE_FRAGMENT is set, text is interpreted as a part of composite property string value (as generated by GetValueAsString() called with this same flag). |
Reimplemented from wxPGProperty.
Reimplemented in wxSystemColourProperty.
virtual bool wxBaseEnumProperty::ValidateValue | ( | wxVariant & | value, | |
wxPGValidationInfo & | validationInfo | |||
) | const [virtual] |
Implement this function in derived class to check the value.
Return true if it is ok. Returning false prevents property change events from occurring.
Reimplemented from wxPGProperty.