#include <propgrid.h>
Inheritance diagram for wxPGProperty:
Public Types | |
typedef void * | ClientDataType |
typedef short | FlagType |
Public Member Functions | |
int | AppendChoice (const wxString &label, int value=INT_MAX) |
bool | CanHaveExtraChildren () const |
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) |
bool | EnsureDataExt () |
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 |
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 |
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 |
const wxChar * | GetType () const |
wxValidator * | GetValidator () const |
virtual wxString | GetValueAsString (int argFlags=0) 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) |
void | Init (const wxString &label, const wxString &name) |
int | InsertChoice (const wxString &label, int index, int value=INT_MAX) |
bool | IsEnabled () 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 |
virtual void | OnCustomPaint (wxDC &dc, const wxRect &rect, wxPGPaintData &paintdata) |
virtual bool | OnEvent (wxPropertyGrid *propgrid, wxWindow *wnd_primary, wxEvent &event) |
bool | PrepareValueForDialogEditing (wxPropertyGrid *propgrid) |
bool | RecreateEditor () |
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 | SetValidator (const wxValidator &validator) |
virtual bool | SetValueFromInt (long value, int flags=0) |
virtual bool | SetValueFromString (const wxString &text, int flags=0) |
void | SetValueImage (wxBitmap &bmp) |
void | SetValueToUnspecified () |
void | ShowError (const wxString &msg) |
bool | StdValidationProcedure (wxPGVariant value) |
void | UpdateControl (wxWindow *primary) |
bool | UsesAutoUnspecified () const |
wxPGProperty (const wxString &label, const wxString &name) | |
wxPGProperty () | |
virtual | ~wxPGProperty () |
Protected Member Functions | |
void | Init () |
Protected Attributes | |
unsigned int | m_arrIndex |
unsigned char | m_bgColIndex |
ClientDataType | m_clientData |
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 |
int | m_y |
|
Basic constructor. Should not be necessary to override. |
|
Constructor. Real used property classes should have constructor of this style:
Of course, in this example, wxPGProperty could also be wxPGPropertyWithChildren (if it has sub-properties) or actually any other property class. |
|
Virtual destructor. It is customary for derived properties to override this. |
|
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) |
|
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 in wxParentPropertyClass, and wxCustomPropertyClass. |
|
Sets property's internal value.
Reimplemented in wxParentPropertyClass, and wxCustomPropertyClass. |
|
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 in wxCustomPropertyClass. |
|
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 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 in wxCustomPropertyClass. |
|
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 in wxPGPropertyWithChildren. |
|
Returns type name of property that is compatible with CreatePropertyByType. and wxVariant::GetType. |
|
Gets assignable version of property's validator.
|
|
Returns text representation of property's value.
Reimplemented in wxParentPropertyClass, wxCustomPropertyClass, wxPGPropertyWithChildren, and wxPropertyCategoryClass. |
|
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.
|
|
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.
|
|
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 in wxCustomPropertyClass. |
|
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. |
|
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 in wxCustomPropertyClass. |
|
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 in wxCustomPropertyClass. |
|
Converts string to a value, and if succesfull, calls DoSetValue() on it. Default behaviour is to do nothing.
Reimplemented in wxCustomPropertyClass, and 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.
|