#include <propgrid.h>
Inheritance diagram for wxPGPropertyWithChildren:
Public Types | |
typedef void * | ClientDataType |
typedef unsigned short | FlagType |
Public Member Functions | |
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) const |
void | AdaptListToValue (wxVariant &list, wxVariant *value) const |
void | AddChild (wxPGProperty *prop) |
void | AddChild2 (wxPGProperty *prop, int index=-1, bool correct_mode=true) |
int | AppendChoice (const wxString &label, int value=INT_MAX) |
bool | CanHaveExtraChildren () const |
virtual void | ChildChanged (wxVariant &thisValue, int childIndex, wxVariant &childValue) const=0 |
void | ClearFlag (FlagType flag) |
void | DeleteChoice (int index) |
virtual wxVariant | DoGetAttribute (const wxString &name) const |
virtual const wxPGEditor * | DoGetEditorClass () const |
virtual wxValidator * | DoGetValidator () const |
virtual wxVariant | DoGetValue () const |
virtual bool | DoSetAttribute (const wxString &name, wxVariant &value) |
void | DoSetName (const wxString &str) |
void | Empty () |
bool | EnsureDataExt () |
void | FixIndexesOfChildren (size_t starthere=0) |
unsigned int | GetArrIndex () const |
long | GetAttribute (const wxString &name, long defVal) |
wxString | GetAttribute (const wxString &name, const wxString &defVal) |
wxVariant | GetAttribute (const wxString &name) const |
const wxPGAttributeStorage & | GetAttributes () const |
wxVariant | GetAttributesAsList () const |
const wxString & | GetBaseName () const |
wxPGCell * | GetCell (unsigned int column) const |
virtual wxPGCellRenderer * | GetCellRenderer (int column) const |
size_t | GetChildCount () const |
int | GetChildrenHeight (int lh, int iMax=-1) const |
unsigned int | GetChoiceCount () const |
virtual int | GetChoiceInfo (wxPGChoiceInfo *choiceinfo) |
const wxPGChoices & | GetChoices () const |
wxPGChoices & | GetChoices () |
wxString | GetChoiceString (unsigned int index) |
const wxChar * | GetClassName () const |
ClientDataType | GetClientData () const |
const wxPGEditor * | GetColumnEditor (int column) const |
int | GetCommonValue () const |
size_t | GetCount () const |
const wxPGChoiceEntry * | GetCurrentChoice () const |
wxPGPropertyDataExt * | GetDataExt () |
wxVariant | GetDefaultValue () const |
unsigned int | GetDepth () const |
int | GetDisplayedCommonValueCount () const |
wxString | GetDisplayedString () const |
const wxPGEditor * | GetEditorClass () const |
virtual wxPGEditorDialogAdapter * | GetEditorDialog () const |
unsigned int | GetFlags () const |
wxString | GetFlagsAsString (FlagType flagsMask) const |
wxString | GetFullName () const |
wxPropertyGrid * | GetGrid () const |
wxPropertyGrid * | GetGridIfDisplayed () const |
wxString | GetHelpString () const |
wxPGId | GetId () |
virtual wxSize | GetImageSize () const |
unsigned int | GetIndexInParent () const |
wxPGProperty * | GetItemAtY (unsigned int y, unsigned int lh, unsigned int *nextItemY) const |
const wxString & | GetLabel () const |
const wxPGProperty * | GetLastVisibleSubItem () const |
wxPGProperty * | GetMainParent () const |
int | GetMaxLength () const |
const wxString & | GetName () const |
wxPGPropertyWithChildren * | GetParent () const |
signed char | GetParentingType () const |
wxPropertyGridState * | GetParentState () const |
wxPGProperty * | GetPropertyByName (const wxString &name) const |
wxString | GetType () const |
wxValidator * | GetValidator () const |
wxVariant | GetValue () const |
template<class T> T & | GetValueAs () const |
virtual wxString | GetValueAsString (int argFlags=0) const |
wxVariant | GetValueAsVariant () const |
wxBitmap * | GetValueImage () const |
const wxVariant & | GetValueRef () const |
wxVariant & | GetValueRef () |
wxString | GetValueString (int argFlags=0) const |
int | GetY () const |
FlagType | HasFlag (FlagType flag) const |
bool | Hide (bool hide) |
int | Index (const wxPGProperty *p) const |
int | InsertChoice (const wxString &label, int index, int value=INT_MAX) |
virtual bool | IntToValue (wxVariant &value, int number, int argFlags=0) const |
bool | IsCategory () const |
bool | IsEnabled () const |
bool | IsExpanded () const |
bool | IsFlagSet (FlagType flag) const |
bool | IsSomeParent (wxPGProperty *candidate_parent) const |
bool | IsSubProperty () const |
bool | IsValueType (const wxChar *str) |
bool | IsValueUnspecified () const |
bool | IsVisible () const |
wxPGProperty * | Item (size_t i) const |
wxPGProperty * | Last () const |
virtual void | OnCustomPaint (wxDC &dc, const wxRect &rect, wxPGPaintData &paintdata) |
virtual bool | OnEvent (wxPropertyGrid *propgrid, wxWindow *wnd_primary, wxEvent &event) |
virtual wxSize | OnMeasureImage (int item=-1) const |
virtual void | OnSetValue () |
void | PrepareSubProperties () |
bool | PrepareValueForDialogEditing (wxPropertyGrid *propgrid) |
bool | RecreateEditor () |
virtual void | RefreshChildren () |
void | RefreshEditor () |
void | SetAttribute (const wxString &name, wxVariant value) |
void | SetAttributes (const wxPGAttributeStorage &attributes) |
void | SetCell (int column, wxPGCell *cellObj) |
bool | SetChoices (const wxArrayString &labels, const wxArrayInt &values=wxArrayInt()) |
bool | SetChoices (wxPGChoices &choices) |
void | SetChoiceSelection (int newValue, const wxPGChoiceInfo &choiceInfo) |
void | SetChoicesExclusive () |
void | SetClientData (ClientDataType clientData) |
void | SetCommonValue (int commonValue) |
void | SetEditor (const wxString &editorName) |
void | SetEditor (const wxPGEditor *editor) |
void | SetExpanded (bool expanded) |
void | SetFlag (FlagType flag) |
void | SetFlagsFromString (const wxString &str) |
void | SetHelpString (const wxString &helpString) |
void | SetLabel (const wxString &label) |
bool | SetMaxLength (int maxLen) |
void | SetParentState (wxPropertyGridState *pstate) |
void | SetValidator (const wxValidator &validator) |
void | SetValue (wxVariant value) |
void | SetValue0 (wxVariant &value, wxVariant *pList=NULL, bool refreshEditor=true) |
virtual bool | SetValueFromInt (long value, int flags=0) |
virtual bool | SetValueFromString (const wxString &text, int flags=0) |
void | SetValueImage (wxBitmap &bmp) |
void | SetValueToUnspecified () |
void | SetWasModified (bool set=true) |
void | ShowError (const wxString &msg) const |
virtual bool | StringToValue (wxVariant &variant, const wxString &text, int argFlags=0) const |
void | SubPropsChanged (int oldSelInd=-1) |
void | UpdateControl (wxWindow *primary) |
bool | UsesAutoUnspecified () const |
virtual bool | ValidateValue (wxVariant &value) const |
wxPGPropertyWithChildren (const wxString &label, const wxString &name) | |
wxPGPropertyWithChildren () | |
virtual | ~wxPGPropertyWithChildren () |
Protected Member Functions | |
int | GetY2 (int lh) const |
Protected Attributes | |
unsigned int | m_arrIndex |
wxPGAttributeStorage | m_attributes |
unsigned char | m_bgColIndex |
wxArrayPtrVoid | m_cells |
wxArrayPtrVoid | m_children |
ClientDataType | m_clientData |
int | m_commonValue |
wxPGPropertyDataExt * | m_dataExt |
unsigned char | m_depth |
unsigned char | m_depthBgCol |
unsigned char | m_fgColIndex |
FlagType | m_flags |
wxString | m_label |
short | m_maxLen |
wxString | m_name |
wxPGPropertyWithChildren * | m_parent |
signed char | m_parentingType |
wxPropertyGridState * | m_parentState |
wxVariant | m_value |
|
Special constructor only used in special cases.
|
|
When new class is derived, call this constructor.
|
|
Destructor.
|
|
Adapts list variant into proper value using consequtive ChildChanged-calls.
|
|
This is used by properties that have fixed sub-properties.
|
|
This is used by Insert etc.
|
|
Adds entry to property's wxPGChoices and editor control (if it is active). Returns index of item added. |
|
Returns true if extra children can be added for this property (i.e. it is wxPropertyCategory or wxCustomProperty) |
|
Called after value of a child property has been altered. Note that this function is usually called at the time that value of this property, or given child property, is still pending for change. Sample pseudo-code implementation:
Implemented in wxPGRootProperty, and wxPropertyCategory. |
|
Removes entry from property's wxPGChoices and editor control (if it is active). If selected item is deleted, then the value is set to unspecified. |
|
Returns value of an attribute. Override if custom habdling of attributes is needed. Default implementation simply return NULL variant. |
|
Returns pointer to an instance of editor class.
|
|
Returns pointer to the wxValidator that should be used with the editor of this property (NULL for no validator). Setting validator explicitly via SetPropertyValidator will override this. In most situations, code like this should work well (macros are used to maintain one actual validator instance, so on the second call the function exits within the first macro):
|
|
Override this to return something else than m_value as the value.
|
|
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. |
|
Deletes all sub-properties.
|
|
If property did not have data extension, one is created now (returns true in that case).
|
|
Returns named attribute, as long, if found. Otherwise defVal is returned. |
|
Returns named attribute, as string, if found. Otherwise defVal is returned. |
|
Returns comma-delimited string of property attributes.
|
|
Returns m_attributes as list wxVariant.
|
|
Returns property's base name (ie. parent's name is not added in any case) |
|
Returns used wxPGCellRenderer instance for given property column (label=0, value=1). Default implementation returns editor's renderer for all columns. |
|
Returns number of children (always 0 for normal properties).
|
|
Returns height of children, recursively, and by taking expanded/collapsed status into account. iMax is used when finding property y-positions. |
|
Returns current value's index to the choice control. May also return, through pointer arguments, strings that should be inserted to that control. Irrelevant to classes which do not employ wxPG_EDITOR(Choice) or similar.
|
|
Returns editor used for given column. NULL for no editor. |
|
Returns common value selected for this property. -1 for none. |
|
Returns number of sub-properties.
|
|
Returns property's data extension (NULL if none).
|
|
Return number of displayed common values for this property.
|
|
Returns instance of a new wxPGEditorDialogAdapter instance, which is used when user presses the (optional) button next to the editor control;. Default implementation returns NULL (ie. no action is generated when button is pressed). |
|
Gets flags as a'|' delimited string. Note that flag names are not prepended with 'wxPG_PROP_'.
|
|
Returns property's name with all parents.
|
|
Returns property grid where property lies.
|
|
Returns owner wxPropertyGrid, but only if one is currently on a page displaying this property.
|
|
Returns property id.
|
|
Deprecated, overriding this will cause run-time assertion failure.
|
|
Returns position in parent's array.
|
|
Returns property's label.
|
|
Returns last visible sub-property, recursively.
|
|
Returns highest level non-category, non-root parent. Useful when you have nested wxCustomProperties/wxParentProperties.
|
|
Returns property's name.
|
|
Return parent of property.
|
|
Returns 0 for normal items. 1 for categories, -1 for other properties with children, -2 for wxCustomProperty (mostly like -1 ones but with few expections).
|
|
Returns wxPropertyGridState to which this property belongs.
Reimplemented from wxPGProperty. |
|
Returns (direct) child property with given name (or NULL if not found).
|
|
Returns type name of property that is compatible with CreatePropertyByType. and wxVariant::GetType. |
|
Gets assignable version of property's validator.
|
|
Advanced variant of GetValueAsString() that forms a string that contains sequence of text representations of sub-properties.
Reimplemented from wxPGProperty. Reimplemented in wxPropertyCategory. |
|
Returns value as wxVariant. DEPRECATED: Use GetValue() instead. |
|
Returns reference to the internal stored value. GetValue is preferred way to get the actual value, since GetValueRef ignores DoGetValue, which may override stored value. |
|
Same as GetValueAsString, except takes common value into account.
|
|
Returns coordinate to the top y of the property. Note that the position of scrollbars is not taken into account. |
|
Hides or reveals the property.
|
|
Returns index of given sub-property.
|
|
Adds entry to property's wxPGChoices and editor control (if it is active). Returns index of item added. |
|
Converts 'number' (including choice selection) into proper value 'variant'. Returns true if new (different than m_value) value could be interpreted from the integer.
|
|
Returns true if this property is actually a wxPropertyCategory.
|
|
Redefined here to reduce code size.
Reimplemented from wxPGProperty. |
|
Returns true if this is a sub-property.
|
|
Returns true if all parents expanded.
|
|
Returns sub-property at index i.
|
|
Returns last sub-property.
|
|
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). If property's OnMeasureImage() returns size that has height != 0 but less than row height ( < 0 has special meanings), wxPropertyGrid calls this method to draw a custom image in a limited area in front of the editor control or value text/graphics, and if control has drop-down list, then the image is drawn there as well (even in the case OnMeasureImage() returned higher height than row height). NOTE: Following applies when OnMeasureImage() returns a "flexible" height ( using wxPG_FLEXIBLE_SIZE(W,H) macro), which implies variable height items: If rect.x is < 0, then this is a measure item call, which means that dc is invalid and only thing that should be done is to set paintdata.m_drawnHeight to the height of the image of item at index paintdata.m_choiceItem. This call may be done even as often as once every drop-down popup show.
|
|
Events received by editor widgets are processed here. Note that editor class usually processes most events. Some, such as button press events of TextCtrlAndButton class, should be handled here. Also, if custom handling for regular events is desired, then that can also be done (for example, wxSystemColourProperty custom handles wxEVT_COMMAND_CHOICE_SELECTED). If the event causes value to be changed, wxPropertyGrid::ValueChangeInEvent(value) should be used.
|
|
Returns size of the custom painted image in front of property. This method must be overridden to return non-default value if OnCustomPaint is to be called.
|
|
This virtual function is called after m_value has been validated and set.
|
|
Updates property value in case there were last minute changes. If value was unspecified, it will be set to default. Use only for properties that have TextCtrl-based editor.
|
|
If property's editor is created this forces its recreation. Useful in SetAttribute etc. Returns true if actually did anything. |
|
Refresh values of child properties. Automatically called after value is set. |
|
If property's editor is active, then update it's value.
|
|
Sets an attribute for this property. There are both common attributes and property class specific ones. For list of common attributes, see wxPropertyContainerMethods::SetPropertyAttribute(). |
|
Sets attributes from a comma-delimited string.
|
|
Sets cell information for given column. Note that the property takes ownership of given wxPGCell instance. |
|
Sets new set of choices for property.
|
|
Sets new set of choices for property.
|
|
Changes value of a property with choices, but only works if the value type is long or string.
|
|
If property has choices and they are not yet exclusive, new such copy of them will be created.
|
|
Sets client data (void*) of a property.
|
|
Sets common value selected for this property. -1 for none. |
|
Sets editor for a property.
|
|
Sets editor for a property.
|
|
Sets flags from a '|' delimited string. Note that flag names are not prepended with 'wxPG_PROP_'. |
|
Set max length of text editor.
|
|
Sets wxValidator for a property.
|
|
Call this to set value of the property. Unlike methods in wxPropertyGrid, this does not automatically update the display. |
|
Like SetValue, but can accept value as list of child values (only if wxPG_PROP_AGGREGATE flag is set).
|
|
Converts integer to a value, and if succesfull, calls SetValue() on it. Default behaviour is to do nothing.
|
|
Converts string to a value, and if succesfull, calls SetValue() on it. Default behaviour is to do nothing.
|
|
Set wxBitmap in front of the value. This bitmap may be ignored by custom cell renderers. |
|
Call with 'false' in OnSetValue to cancel value changes after all (ie. cancel 'true' returned by StringToValue() or IntToValue()). |
|
This overridden version converts comma or semicolon separated tokens into list variant of child values.
Implements wxPGProperty. Reimplemented in wxPGRootProperty. |
|
Returns true if containing grid uses wxPG_EX_AUTO_UNSPECIFIED_VALUES.
|
|
Implement this function in derived class to check and/or convert the value. Return true if it is ok. Default implementation does nothing except returns true. |