wxBaseEnumProperty Class Reference
Derive dynamic custom properties with choices from this class.
More...
#include <props.h>
List of all members.
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 |
int | GetValueForIndex (size_t index) const |
virtual bool | IntToValue (wxVariant &variant, int number, int argFlags=0) const |
virtual void | OnSetValue () |
virtual void | OnValidationFailure (wxVariant &pendingValue) |
virtual bool | StringToValue (wxVariant &variant, const wxString &text, int argFlags=0) const |
virtual bool | ValidateValue (wxVariant &value, wxPGValidationInfo &validationInfo) const |
| 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 () |
Private Attributes |
int | m_index |
Static Private Attributes |
static int | ms_nextIndex |
Detailed Description
Derive dynamic custom properties with choices from this class.
Definition at line 529 of file props.h.
Constructor & Destructor Documentation
wxBaseEnumProperty::wxBaseEnumProperty |
( |
const wxString & |
label = wxPG_LABEL , |
|
|
const wxString & |
name = wxPG_LABEL | |
|
) |
| | |
Member Function Documentation
virtual const wxString* wxBaseEnumProperty::GetEntry |
( |
size_t |
index, |
|
|
int * |
pvalue | |
|
) |
| | const [pure virtual] |
int wxBaseEnumProperty::GetIndex |
( |
|
) |
const [protected] |
virtual int wxBaseEnumProperty::GetIndexForValue |
( |
int |
value |
) |
const [virtual] |
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().
- Parameters:
-
| 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. |
- See also:
- GetValueString()
Reimplemented from wxPGProperty.
int wxBaseEnumProperty::GetValueForIndex |
( |
size_t |
index |
) |
const [inline] |
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.
- Parameters:
-
| 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] |
virtual void wxBaseEnumProperty::OnValidationFailure |
( |
wxVariant & |
pendingValue |
) |
[virtual] |
Called whenever validation has failed with given pending value.
Reimplemented from wxPGProperty.
static void wxBaseEnumProperty::ResetNextIndex |
( |
|
) |
[inline, static, protected] |
void wxBaseEnumProperty::SetIndex |
( |
int |
index |
) |
[protected] |
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.
- Parameters:
-
| 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.
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.
bool wxBaseEnumProperty::ValueFromInt_ |
( |
wxVariant & |
value, |
|
|
int |
intVal, |
|
|
int |
argFlags | |
|
) |
| | const [protected] |
bool wxBaseEnumProperty::ValueFromString_ |
( |
wxVariant & |
value, |
|
|
const wxString & |
text, |
|
|
int |
argFlags | |
|
) |
| | const [protected] |
Member Data Documentation
The documentation for this class was generated from the following file: