wxPropertyGrid
|
Basic property with string value. More...
#include <props.h>
Public Member Functions | |
virtual bool | DoSetAttribute (const wxString &name, wxVariant &value) |
Special handling for attributes of this property. More... | |
virtual wxString | GetValueAsString (int argFlags=0) const |
Returns text representation of property's value. More... | |
virtual void | OnSetValue () |
This is updated so "<composed>" special value can be handled. | |
virtual bool | StringToValue (wxVariant &variant, const wxString &text, int argFlags=0) const |
Converts 'text' into proper value 'variant'. More... | |
wxStringProperty (const wxString &label=wxPG_LABEL, const wxString &name=wxPG_LABEL, const wxString &value=wxEmptyString) | |
![]() | |
wxPGCell * | AcquireCell (unsigned int column) |
Returns wxPGCell of given column, NULL if none. More... | |
void | ActualChildChanged (wxVariant &thisValue, int childIndex, wxVariant &childValue) const |
bool | ActualIntToValue (wxVariant &variant, int number, int argFlags=0) const |
bool | ActualStringToValue (wxVariant &variant, const wxString &text, int argFlags=0) const |
bool | ActualValidateValue (wxVariant &value, wxPGValidationInfo &validationInfo) const |
void | AdaptListToValue (wxVariant &list, wxVariant *value) const |
Adapts list variant into proper value using consequtive ChildChanged-calls. | |
void | AddPrivateChild (wxPGProperty *prop) |
Call this to add sub-properties which will become private, fixed children. More... | |
wxPGProperty * | AppendChild (wxPGProperty *prop) |
Appends a new child property. More... | |
int | AppendChoice (const wxString &label, int value=INT_MAX) |
Adds entry to property's wxPGChoices and editor control (if it is active). More... | |
bool | AreAllChildrenSpecified (wxVariant *pendingList=NULL) const |
Determines, recursively, if all children are not unspecified. More... | |
bool | AreChildrenComponents () const |
Returns true if children of this property are component values (for instance, points size, face name, and is_underlined are component values of a font). | |
bool | CanHaveExtraChildren () const |
Returns true if extra children can be added for this property (i.e. More... | |
void | ChangeFlag (FlagType flag, bool set) |
Sets or clears given property flag(s). More... | |
virtual void | ChildChanged (wxVariant &thisValue, int childIndex, wxVariant &childValue) const |
Called after value of a child property has been altered. More... | |
void | ClearFlag (FlagType flag) |
void | DeleteChildren () |
Deletes children of the property. | |
void | DeleteChoice (int index) |
Removes entry from property's wxPGChoices and editor control (if it is active). More... | |
virtual wxVariant | DoGetAttribute (const wxString &name) const |
Returns value of an attribute. More... | |
virtual const wxPGEditor * | DoGetEditorClass () const |
Returns pointer to an instance of editor class. | |
virtual wxValidator * | DoGetValidator () const |
Returns pointer to the wxValidator that should be used with the editor of this property (NULL for no validator). More... | |
virtual wxVariant | DoGetValue () const |
Override this to return something else than m_value as the value. | |
void | Empty () |
Deletes children of the property. | |
void | EnableCommonValue (bool enable=true) |
Call to enable or disable usage of common value (integer value that can be selected for properties instead of their normal values) for this property. More... | |
void | FixIndexesOfChildren (unsigned int starthere=0) |
void | GenerateComposedValue (wxString &text, int argFlags=0) const |
Composes text from values of child properties. More... | |
unsigned int | GetArrIndex () const |
wxVariant | GetAttribute (const wxString &name) const |
wxString | GetAttribute (const wxString &name, const wxString &defVal) const |
Returns named attribute, as string, if found. More... | |
double | GetAttributeAsDouble (const wxString &name, double defVal) const |
Returns named attribute, as double, if found. More... | |
long | GetAttributeAsLong (const wxString &name, long defVal) const |
Returns named attribute, as long, if found. More... | |
const wxPGAttributeStorage & | GetAttributes () const |
Returns comma-delimited string of property attributes. | |
wxVariant | GetAttributesAsList () const |
Returns m_attributes as list wxVariant. | |
const wxString & | GetBaseName () const |
Returns property's base name (ie. More... | |
wxPGCell * | GetCell (unsigned int column) const |
Returns wxPGCell of given column, NULL if none. More... | |
virtual wxPGCellRenderer * | GetCellRenderer (int column) const |
Returns used wxPGCellRenderer instance for given property column (label=0, value=1). More... | |
unsigned int | GetChildCount () const |
Returns number of child properties. | |
int | GetChildrenHeight (int lh, int iMax=-1) const |
Returns height of children, recursively, and by taking expanded/collapsed status into account. More... | |
unsigned int | GetChoiceCount () const |
virtual int | GetChoiceInfo (wxPGChoiceInfo *choiceinfo) |
Returns current value's index to the choice control. More... | |
wxPGChoices & | GetChoices () |
const wxPGChoices & | GetChoices () const |
wxString | GetChoiceString (unsigned int index) |
const wxChar * | GetClassName () const |
ClientDataType | GetClientData () const |
const wxPGEditor * | GetColumnEditor (int column) const |
Returns editor used for given column. More... | |
int | GetCommonValue () const |
Returns common value selected for this property. More... | |
unsigned int | GetCount () const |
Returns number of child properties. | |
const wxPGChoiceEntry * | GetCurrentChoice () const |
wxVariant | GetDefaultValue () const |
unsigned int | GetDepth () const |
int | GetDisplayedCommonValueCount () const |
Return number of displayed common values for this property. | |
wxString | GetDisplayedString () const |
const wxPGEditor * | GetEditorClass () const |
virtual wxPGEditorDialogAdapter * | GetEditorDialog () const |
Returns instance of a new wxPGEditorDialogAdapter instance, which is used when user presses the (optional) button next to the editor control;. More... | |
FlagType | GetFlags () const |
wxString | GetFlagsAsString (FlagType flagsMask) const |
Gets flags as a'|' delimited string. More... | |
wxPropertyGrid * | GetGrid () const |
Returns property grid where property lies. More... | |
wxPropertyGrid * | GetGridIfDisplayed () const |
Returns owner wxPropertyGrid, but only if one is currently on a page displaying this property. More... | |
const wxString & | GetHelpString () const |
wxPGId | GetId () |
Returns property id. More... | |
int | GetImageOffset (int imageWidth) const |
Converts image width into full image offset, with margins. | |
virtual wxSize | GetImageSize () const |
unsigned int | GetIndexInParent () const |
Returns position in parent's array. More... | |
wxPGProperty * | GetItemAtY (unsigned int y, unsigned int lh, unsigned int *nextItemY) const |
const wxString & | GetLabel () const |
Returns property's label. More... | |
const wxPGProperty * | GetLastVisibleSubItem () const |
Returns last visible sub-property, recursively. | |
wxPGProperty * | GetMainParent () const |
Returns highest level non-category, non-root parent. More... | |
int | GetMaxLength () const |
wxString | GetName () const |
Returns property's name with all (non-category, non-root) parents. More... | |
wxPGCell * | GetOrCreateCell (unsigned int column) |
Returns wxPGCell of given column, creating one if necesasry. More... | |
wxPGProperty * | GetParent () const |
Return parent of property. | |
wxPropertyGridState * | GetParentState () const |
wxPGProperty * | GetPropertyByName (const wxString &name) const |
Returns (direct) child property with given name (or NULL if not found). | |
wxString | GetType () const |
Returns type name of property that is compatible with CreatePropertyByType. More... | |
wxValidator * | GetValidator () const |
Gets assignable version of property's validator. More... | |
wxVariant | GetValue () const |
wxVariant | GetValueAsVariant () const |
Returns value as wxVariant. More... | |
wxBitmap * | GetValueImage () const |
wxVariant & | GetValueRef () |
Returns reference to the internal stored value. More... | |
const wxVariant & | GetValueRef () const |
wxString | GetValueString (int argFlags=0) const |
Same as GetValueAsString, except takes common value into account. | |
wxString | GetValueType () const |
int | GetY () const |
Returns coordinate to the top y of the property. More... | |
FlagType | HasFlag (FlagType flag) const |
Returns non-zero if given property flag is set. More... | |
bool | HasVisibleChildren () const |
Returns true if property has even one visible child. | |
bool | Hide (bool hide, int flags=wxPG_RECURSE) |
Hides or reveals the property. More... | |
int | Index (const wxPGProperty *p) const |
Returns index of given sub-property. More... | |
wxPGProperty * | InsertChild (int index, wxPGProperty *childProperty) |
Use this member function to add independent (ie. More... | |
int | InsertChoice (const wxString &label, int index, int value=INT_MAX) |
Adds entry to property's wxPGChoices and editor control (if it is active). More... | |
virtual bool | IntToValue (wxVariant &value, int number, int argFlags=0) const |
Converts 'number' (including choice selection) into proper value 'variant'. More... | |
bool | IsCategory () const |
Returns true if this property is actually a wxPropertyCategory. | |
bool | IsEnabled () const |
bool | IsExpanded () const |
bool | IsFlagSet (FlagType flag) const |
bool | IsRoot () const |
Returns true if this property is actually a wxRootProperty. | |
bool | IsSomeParent (wxPGProperty *candidate_parent) const |
bool | IsSubProperty () const |
Returns true if this is a sub-property. More... | |
bool | IsTextEditable () const |
Returns true if property has editable wxTextCtrl when selected. More... | |
bool | IsValueUnspecified () const |
Returns if property value is unspecified. | |
bool | IsVisible () const |
Returns true if all parents expanded. | |
wxPGProperty * | Item (unsigned int i) const |
Returns sub-property at index i. More... | |
wxPGProperty * | Last () const |
Returns last sub-property. | |
virtual void | OnCustomPaint (wxDC &dc, const wxRect &rect, wxPGPaintData &paintdata) |
Override to paint an image in front of the property value text or drop-down list item (but only if wxPGProperty::OnMeasureImage is overridden as well). More... | |
virtual bool | OnEvent (wxPropertyGrid *propgrid, wxWindow *wnd_primary, wxEvent &event) |
Events received by editor widgets are processed here. More... | |
virtual wxSize | OnMeasureImage (int item=-1) const |
Returns size of the custom painted image in front of property. More... | |
virtual void | OnValidationFailure (wxVariant &pendingValue) |
Called whenever validation has failed with given pending value. More... | |
bool | PrepareValueForDialogEditing (wxPropertyGrid *propgrid) |
Updates property value in case there were last minute changes. More... | |
bool | RecreateEditor () |
If property's editor is created this forces its recreation. More... | |
virtual void | RefreshChildren () |
Refresh values of child properties. More... | |
void | RefreshEditor () |
If property's editor is active, then update it's value. | |
void | SetAttribute (const wxString &name, wxVariant value) |
Sets an attribute for this property. More... | |
void | SetAttributes (const wxPGAttributeStorage &attributes) |
Sets attributes from a comma-delimited string. | |
void | SetCell (int column, wxPGCell *cellObj) |
Sets cell information for given column. More... | |
bool | SetChoices (wxPGChoices &choices) |
Set choices of a property to specified set of labels and values. More... | |
bool | SetChoices (const wxArrayString &labels, const wxArrayInt &values=wxArrayInt()) |
Sets new set of choices for property. | |
void | SetChoiceSelection (int newValue, const wxPGChoiceInfo &choiceInfo) |
Changes value of a property with choices, but only works if the value type is long or string. More... | |
void | SetChoicesExclusive () |
If property has choices and they are not yet exclusive, new such copy of them will be created. | |
void | SetClientData (ClientDataType clientData) |
Sets client data (void*) of a property. More... | |
void | SetCommonValue (int commonValue) |
Sets common value selected for this property. More... | |
void | SetDefaultValue (wxVariant &value) |
Set default value of a property. More... | |
void | SetEditor (const wxPGEditor *editor) |
Sets editor for a property. More... | |
void | SetEditor (const wxString &editorName) |
Sets editor for a property. More... | |
void | SetExpanded (bool expanded) |
void | SetFlag (FlagType flag) |
Sets given property flag(s). More... | |
void | SetFlagRecursively (FlagType flag, bool set) |
Sets or clears given property flag(s), recursively in child properties (if any). More... | |
void | SetFlagsFromString (const wxString &str) |
Sets flags from a '|' delimited string. More... | |
void | SetHelpString (const wxString &helpString) |
void | SetLabel (const wxString &label) |
Sets property's label. More... | |
bool | SetMaxLength (int maxLen) |
Set max length of text editor. | |
void | SetName (const wxString &newName) |
void | SetValidator (const wxValidator &validator) |
Sets wxValidator for a property. | |
void | SetValue (wxVariant value, wxVariant *pList=NULL, int flags=wxPG_SETVAL_REFRESH_EDITOR) |
Call this to set value of the property. More... | |
virtual bool | SetValueFromInt (long value, int flags=0) |
Converts integer to a value, and if succesfull, calls SetValue() on it. More... | |
virtual bool | SetValueFromString (const wxString &text, int flags=wxPG_PROGRAMMATIC_VALUE) |
Converts string to a value, and if succesfull, calls SetValue() on it. More... | |
void | SetValueImage (wxBitmap &bmp) |
Set wxBitmap in front of the value. More... | |
void | SetValueInEvent (wxVariant value) const |
Call in OnEvent(), OnButtonClick() etc. More... | |
void | SetValueToUnspecified () |
Sets property value to unspecified. | |
void | SetWasModified (bool set=true) |
Call with 'false' in OnSetValue to cancel value changes after all (ie. More... | |
wxPGProperty * | UpdateParentValues () |
Updates composed values of parent non-category properties, recursively. More... | |
FlagType | UsesAutoUnspecified () const |
Returns true if containing grid uses wxPG_EX_AUTO_UNSPECIFIED_VALUES. | |
virtual bool | ValidateValue (wxVariant &value, wxPGValidationInfo &validationInfo) const |
Implement this function in derived class to check the value. More... | |
wxPGProperty () | |
Basic constructor. More... | |
wxPGProperty (const wxString &label, const wxString &name) | |
Constructor. More... | |
virtual | ~wxPGProperty () |
Virtual destructor. More... | |
Additional Inherited Members | |
![]() | |
typedef void * | ClientDataType |
typedef wxUint32 | FlagType |
![]() | |
void | AddChild (wxPGProperty *prop) |
Call this to add sub-properties which will become private, fixed children. More... | |
void | AddChild2 (wxPGProperty *prop, int index=-1, bool correct_mode=true) |
This is used by Insert etc. More... | |
void | DoEmpty () |
Deletes all sub-properties. More... | |
bool | DoHide (bool hide, int flags) |
void | DoSetName (const wxString &str) |
wxString | GetColumnText (unsigned int col) const |
Returns text for given column. | |
wxPGProperty * | GetPropertyByNameWH (const wxString &name, unsigned int hintIndex) const |
Returns (direct) child property with given name (or NULL if not found), with hint index. More... | |
int | GetY2 (int lh) const |
void | PrepareSubProperties () |
void | SetParentalType (int flag) |
void | SetParentState (wxPropertyGridState *pstate) |
void | SubPropsChanged (int oldSelInd=-1) |
![]() | |
unsigned int | m_arrIndex |
wxPGAttributeStorage | m_attributes |
unsigned char | m_bgColIndex |
wxArrayPtrVoid | m_cells |
wxArrayPtrVoid | m_children |
ClientDataType | m_clientData |
int | m_commonValue |
const wxPGEditor * | m_customEditor |
unsigned char | m_depth |
unsigned char | m_depthBgCol |
unsigned char | m_fgColIndex |
FlagType | m_flags |
wxString | m_helpString |
wxString | m_label |
short | m_maxLen |
wxString | m_name |
wxPGProperty * | m_parent |
wxPropertyGridState * | m_parentState |
wxValidator * | m_validator |
wxVariant | m_value |
wxBitmap * | m_valueBitmap |
Basic property with string value.
Supported special attributes:
|
virtual |
Special handling for attributes of this property.
If returns false, then the attribute will be automatically stored in m_attributes.
Default implementation simply returns false.
Reimplemented from wxPGProperty.
|
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.
|
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.