#include <propdev.h>
Inheritance diagram for wxCustomPropertyClass:
Public Types | |
typedef void * | ClientDataType |
typedef short | FlagType |
Public Member Functions | |
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 (wxPGProperty *p) |
void | ClearFlag (FlagType flag) |
void | DeleteChoice (int index) |
virtual const wxPGEditor * | DoGetEditorClass () const |
virtual wxValidator * | DoGetValidator () const |
virtual wxPGVariant | DoGetValue () const |
void | DoSetName (const wxString &str) |
virtual void | DoSetValue (wxPGVariant value) |
void | Empty () |
bool | EnsureDataExt () |
void | FixIndexesOfChildren (size_t starthere=0) |
unsigned int | GetArrIndex () const |
wxString | GetAttributes (unsigned int flagmask=0xFFFF) |
size_t | GetChildCount () const |
virtual int | GetChoiceInfo (wxPGChoiceInfo *choiceinfo) |
virtual const wxPGPropertyClassInfo * | GetClassInfo () const=0 |
virtual const wxChar * | GetClassName () const=0 |
ClientDataType | GetClientData () const |
size_t | GetCount () const |
wxPGPropertyDataExt * | GetDataExt () |
unsigned int | GetDepth () const |
wxString | GetDisplayedString () const |
const wxPGEditor * | GetEditorClass () const |
unsigned int | GetFlags () const |
wxPropertyGrid * | GetGrid () const |
wxString | GetHelpString () const |
wxPGId | GetId () |
virtual wxSize | GetImageSize () const |
unsigned int | GetIndexInParent () const |
wxPGProperty * | GetItemAtY (unsigned int y, unsigned int lh) |
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 |
const wxChar * | GetType () const |
wxValidator * | GetValidator () const |
virtual wxString | GetValueAsString (int argFlags) const |
wxVariant | GetValueAsVariant () const |
wxBitmap * | GetValueImage () const |
virtual const wxPGValueType * | GetValueType () const=0 |
const wxPGValueType * | GetValueTypePtr () const |
int | GetY () const |
bool | HasFlag (FlagType flag) const |
bool | Hide (bool hide) |
int | Index (const wxPGProperty *p) const |
void | Init (const wxString &label, const wxString &name) |
int | InsertChoice (const wxString &label, int index, int value=INT_MAX) |
bool | IsEnabled () const |
bool | IsExpanded () const |
bool | IsFlagSet (FlagType flag) const |
bool | IsKindOf (wxPGPropertyClassInfo &info) |
bool | IsOk () const |
bool | IsSomeParent (wxPGProperty *candidate_parent) const |
bool | IsSubProperty () const |
bool | IsValueUnspecified () 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) |
void | PrepareSubProperties () |
bool | PrepareValueForDialogEditing (wxPropertyGrid *propgrid) |
bool | RecreateEditor () |
virtual void | RefreshChildren () |
void | SetAttrib (int id, wxVariant value) |
virtual void | SetAttribute (int id, wxVariant &value) |
void | SetAttributes (const wxString &attributes) |
bool | SetChoices (const wxArrayString &labels, const wxArrayInt &values=(*((wxArrayInt *) NULL))) |
bool | SetChoices (wxPGChoices &choices) |
void | SetChoiceSelection (int newValue, const wxPGChoiceInfo &choiceInfo) |
void | SetChoicesExclusive () |
void | SetClientData (ClientDataType clientData) |
void | SetEditor (const wxString &editorName) |
void | SetEditor (const wxPGEditor *editor) |
void | SetFlag (FlagType flag) |
void | SetHelpString (const wxString &helpString) |
void | SetLabel (const wxString &label) |
bool | SetMaxLength (int maxLen) |
void | SetParentState (wxPropertyGridState *pstate) |
void | SetValidator (const wxValidator &validator) |
virtual bool | SetValueFromInt (long value, int arg_flags) |
virtual bool | SetValueFromString (const wxString &text, int flags) |
void | SetValueImage (wxBitmap &bmp) |
void | SetValueToUnspecified () |
void | ShowError (const wxString &msg) |
bool | StdValidationProcedure (wxPGVariant value) |
void | SubPropsChanged (int oldSelInd=-1) |
void | UpdateControl (wxWindow *primary) |
bool | UsesAutoUnspecified () const |
wxCustomPropertyClass (const wxString &label, const wxString &name=wxPG_LABEL) | |
Protected Member Functions | |
void | Init () |
Protected Attributes | |
unsigned int | m_arrIndex |
unsigned char | m_bgColIndex |
wxPGArrayProperty | m_children |
wxPGChoices | m_choices |
ClientDataType | m_clientData |
wxPGPropertyDataExt * | m_dataExt |
unsigned char | m_depth |
unsigned char | m_depthBgCol |
unsigned char | m_expanded |
unsigned char | m_fgColIndex |
FlagType | m_flags |
wxString | m_label |
short | m_maxLen |
wxString | m_name |
wxPGPaintCallback | m_paintCallback |
wxPGPropertyWithChildren * | m_parent |
signed char | m_parentingType |
wxPropertyGridState * | m_parentState |
wxString | m_value |
int | m_y |
Base class offers the following:
Also note:
|
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 child property p has been altered. The value of this parent property should now be updated accordingly. Reimplemented in wxParentPropertyClass. |
|
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 pointer to an instance of editor class.
Reimplemented in wxPGRootPropertyClass, and wxPropertyCategoryClass. |
|
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):
|
|
Returns properly constructed wxPGVariant.
Reimplemented from wxPGProperty. |
|
Sets property's internal value.
Reimplemented from wxPGProperty. |
|
Deletes all sub-properties.
|
|
If property did not have data extension, one is created now (returns true in that case).
|
|
Returns comma-delimited string of property attributes.
|
|
Returns number of children (always 0 for normal properties).
|
|
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.
Reimplemented from wxPGProperty. |
|
Returns classinfo of the property class.
Implemented in wxPGRootPropertyClass, and wxPropertyCategoryClass. |
|
Returns classname (for example, "wxStringProperty" for wxStringProperty) of a property class.
Implemented in wxPGRootPropertyClass, and wxPropertyCategoryClass. |
|
Returns number of sub-properties.
|
|
Returns property's data extension (NULL if none).
|
|
Returns property grid where property lies.
|
|
Returns property id.
|
|
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.
Reimplemented from wxPGProperty. |
|
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 (alternate way to access property).
|
|
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 wxPGPropertyWithChildren. |
|
Returns value as wxVariant.
|
|
Returns pointer to the object that has methods related to the value type of this property. Keep atleast this method abstract so the class is kept abstract. Implemented in wxPGRootPropertyClass, and wxPropertyCategoryClass. |
|
Gets pre-calculated top y coordinate of property graphics. This cannot be relied on all times (wxPropertyGrid knows when :) ), and value is -1 if property is not visible. |
|
Hides or reveals the property.
|
|
Returns index of given sub-property.
|
|
Initializes the property. Usually only called in the constructor. |
|
Adds entry to property's wxPGChoices and editor control (if it is active). Returns index of item added. |
|
Returns true if property is valid and wxPropertyGrid methods can operate on it safely.
|
|
Returns true if this is a sub-property.
|
|
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::GetImageSize is overridden as well). If property's GetImageSize() 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 GetImageSize() returned higher height than row height). NOTE: Following applies when GetImageSize() 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.
Reimplemented from wxPGProperty. |
|
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).
|
|
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.
|
|
Sets an attribute of this property. This is quite property class specific, and there are no common attributes. Note that attribute may be specific to a property instance, or it may affect all properties of its class.
Reimplemented from wxPGProperty. |
|
Sets attributes from a comma-delimited string.
|
|
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 editor for a property.
|
|
Sets editor for a property.
|
|
Set max length of text editor.
|
|
Sets wxValidator for a property.
|
|
Converts integer to a value, and if succesfull, calls DoSetValue() on it. Default behaviour is to do nothing.
Reimplemented from wxPGProperty. |
|
This overridden version converts comma or semicolon separated tokens into child values.
Reimplemented from wxPGPropertyWithChildren. |
|
Set wxBitmap in front of the value. This bitmap will be ignored if property class has implemented OnCustomPaint. |
|
Returns true if containing grid uses wxPG_EX_AUTO_UNSPECIFIED_VALUES.
|