wxPropertyGrid
|
wxPropertyGridManager is an efficient multi-page version of wxPropertyGrid, which can optionally have toolbar for mode and page selection, and help text box. More...
#include <manager.h>
Public Member Functions | |
int | AddPage (const wxString &label=wxEmptyString, const wxBitmap &bmp=wxPG_NULL_BITMAP, wxPropertyGridPage *pageObj=(wxPropertyGridPage *) NULL) |
Creates new property page. More... | |
bool | CanClose () |
Returns true if all property grid data changes have been committed. More... | |
virtual void | Clear () |
Deletes all all properties and all pages. | |
void | ClearModifiedStatus (wxPGPropArg id) |
void | ClearModifiedStatus () |
void | ClearPage (int page) |
Deletes all properties on given page. | |
bool | ClearSelection () |
Deselect current selection, if any (from current page). More... | |
bool | CommitChangesFromEditor (wxUint32 flags=0) |
Forces updating the value of property from the editor control. More... | |
bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxPGMAN_DEFAULT_STYLE, const wxString &name=wxPropertyGridManagerNameStr) |
Two step creation. More... | |
bool | EnableCategories (bool enable) |
Enables or disables (shows/hides) categories according to parameter enable. More... | |
bool | EnsureVisible (wxPGPropArg id) |
Selects page, scrolls and/or expands items to ensure that the given item is visible. More... | |
size_t | GetChildrenCount () |
Returns number of children of the root property of the selected page. More... | |
size_t | GetChildrenCount (int pageIndex) |
Returns number of children of the root property of given page. More... | |
size_t | GetChildrenCount (wxPGPropArg id) const |
Returns number of children for the property. More... | |
int | GetColumnCount (int page=-1) const |
Returns number of columns on given page. More... | |
wxPropertyGridPage * | GetCurrentPage () const |
Returns currently selected page. | |
int | GetDescBoxHeight () const |
Returns height of the description text box. More... | |
wxPropertyGrid * | GetGrid () |
Returns pointer to the contained wxPropertyGrid. More... | |
const wxPropertyGrid * | GetGrid () const |
wxPropertyGridIterator | GetIterator (int flags=wxPG_ITERATE_DEFAULT, wxPGProperty *firstProp=NULL) |
Returns iterator class instance. More... | |
wxPropertyGridConstIterator | GetIterator (int flags=wxPG_ITERATE_DEFAULT, wxPGProperty *firstProp=NULL) const |
wxPropertyGridIterator | GetIterator (int flags, int startPos) |
Returns iterator class instance. More... | |
wxPropertyGridConstIterator | GetIterator (int flags, int startPos) const |
wxPropertyGridPage * | GetLastPage () const |
Returns last page. | |
wxPropertyGridPage * | GetPage (unsigned int ind) const |
Returns page object for given page index. | |
wxPropertyGridPage * | GetPage (const wxString &name) const |
Returns page object for given page name. | |
int | GetPageByName (const wxString &name) const |
Returns index for a page name. More... | |
int | GetPageByState (const wxPropertyGridState *pstate) const |
Returns index for a relevant propertygrid state. More... | |
size_t | GetPageCount () const |
Returns number of managed pages. More... | |
const wxString & | GetPageName (int index) const |
Returns name of given page. More... | |
wxPGProperty * | GetPageRoot (int index) const |
Returns "root property" of the given page. More... | |
virtual wxPropertyGridState * | GetPageState (int page) const |
Returns wxPropertyGridState of given page, current page's for -1. | |
wxPGProperty * | GetPropertyByLabel (const wxString &name, wxPropertyGridState **ppState=(wxPropertyGridState **) NULL) const |
Returns id of property with given label (case-sensitive). More... | |
wxColour | GetPropertyColour (wxPGPropArg id) const |
Returns cell background colour of a property. More... | |
wxColour | GetPropertyTextColour (wxPGPropArg id) const |
Returns cell text colour of a property. More... | |
int | GetSelectedPage () const |
Returns index to currently selected page. More... | |
wxPGProperty * | GetSelectedProperty () const |
Shortcut for GetGrid()->GetSelection(). More... | |
int | GetSelection () const |
Synonyme for GetSelectedPage. More... | |
wxToolBar * | GetToolBar () const |
Returns a pointer to the toolbar currently associated with the wxPropertyGridManager (if any). More... | |
virtual wxPGVIterator | GetVIterator (int flags) const |
Similar to GetIterator, but instead returns wxPGVIterator instance, which can be useful for forward-iterating through arbitrary property containers. | |
virtual int | InsertPage (int index, const wxString &label, const wxBitmap &bmp=wxNullBitmap, wxPropertyGridPage *pageObj=(wxPropertyGridPage *) NULL) |
Creates new property page. More... | |
bool | IsAnyModified () const |
Returns true if any property on any page has been modified by the user. More... | |
bool | IsFrozen () const |
Returns true if updating is frozen (ie. More... | |
bool | IsPageModified (size_t index) const |
Returns true if any property on given page has been modified by the user. More... | |
virtual bool | IsPropertySelected (wxPGPropArg id) const |
Returns true if property is selected. More... | |
virtual void | Refresh (bool eraseBackground=true, const wxRect *rect=(const wxRect *) NULL) |
virtual bool | RemovePage (int page) |
Removes a page. More... | |
void | SelectPage (int index) |
Select and displays a given page. More... | |
void | SelectPage (const wxString &label) |
Select and displays a given page (by label). More... | |
void | SelectPage (wxPropertyGridPage *ptr) |
Select and displays a given page. More... | |
bool | SelectProperty (wxPGPropArg id, bool focus=false) |
Select a property. More... | |
void | SetCaptionTextColour (wxPGPropArg id, const wxColour &col) |
Sets text colour of a category caption (but not it's children). | |
void | SetColumnCount (int colCount, int page=-1) |
Sets number of columns on given page (default is current page). | |
void | SetDescBoxHeight (int ht, bool refresh=true) |
Sets y coordinate of the description box splitter. More... | |
void | SetDescription (const wxString &label, const wxString &content) |
Sets label and text in description box. | |
void | SetPageSplitterPosition (int page, int pos, int column=0) |
Sets splitter position on individual page. More... | |
void | SetPropertyAttributeAll (const wxString &name, wxVariant value) |
Sets property attribute for all applicapple properties. More... | |
void | SetPropertyBackgroundColour (wxPGPropArg id, const wxColour &col) |
Sets background colour of property and all its children. More... | |
void | SetPropertyColourToDefault (wxPGPropArg id) |
Sets background and text colour of property and all its children to the default. More... | |
void | SetPropertyTextColour (wxPGPropArg id, const wxColour &col) |
Sets text colour of property and all its children. | |
void | SetSplitterLeft (bool subProps=false, bool allPages=true) |
Moves splitter as left as possible, while still allowing all labels to be shown in full. More... | |
void | SetSplitterPosition (int pos, int column=0) |
Sets splitter position for all pages. More... | |
void | SetStringSelection (const wxChar *name) |
Synonyme for SelectPage(name). More... | |
wxPropertyGridManager () | |
Two step constructor. More... | |
wxPropertyGridManager (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxPGMAN_DEFAULT_STYLE, const wxString &name=wxPropertyGridManagerNameStr) | |
The default constructor. More... | |
virtual | ~wxPropertyGridManager () |
Destructor. | |
![]() | |
void | AddPropertyChoice (wxPGPropArg id, const wxString &label, int value=INT_MAX) |
Adds choice to a property that can accept one. More... | |
wxPGProperty * | Append (wxPGProperty *property) |
Appends property to the list. More... | |
wxPGProperty * | AppendCategory (const wxString &label, const wxString &name=(*((wxString *) NULL))) |
wxPGProperty * | AppendIn (wxPGPropArg id, wxPGProperty *newproperty) |
void | BeginAddChildren (wxPGPropArg id) |
Inorder to add new items into a property with fixed children (for instance, wxFlagsProperty), you need to call this method. More... | |
bool | ChangePropertyValue (wxPGPropArg id, wxVariant newValue) |
Changes value of a property, as if from an editor. More... | |
bool | ClearPropertyValue (wxPGPropArg id) |
Resets value of a property to its default. More... | |
bool | ClearSelection (bool validation=true) |
Clears current selection, if any. More... | |
bool | Collapse (wxPGPropArg id) |
Collapses given category or property with children. More... | |
bool | CollapseAll () |
Collapses all items that can be collapsed. More... | |
void | Delete (wxPGPropArg id) |
Deletes a property by id. More... | |
void | DeleteProperty (wxPGPropArg id) |
Removes and deletes a property. More... | |
void | DeletePropertyChoice (wxPGPropArg id, int index) |
Deletes choice from a property. More... | |
bool | Disable (wxPGPropArg id) |
Disables property. More... | |
bool | DisableProperty (wxPGPropArg id) |
Disables property. More... | |
bool | EnableProperty (wxPGPropArg id, bool enable=true) |
Enables or disables property, depending on whether enable is true or false. More... | |
void | EndAddChildren (wxPGPropArg id) |
Called after population of property with fixed children has finished. | |
bool | Expand (wxPGPropArg id) |
Expands given category or property with children. More... | |
bool | ExpandAll (bool expand=true) |
Expands all items that can be expanded. | |
int | GetColumnProportion (unsigned int column) const |
Returns auto-resize proportion of the given column. More... | |
wxArrayPGProperty | GetExpandedProperties () const |
Returns list of expanded properties. More... | |
wxPGProperty * | GetFirst (int flags=wxPG_ITERATE_ALL) |
Returns id of first item, whether it is a category or property. More... | |
const wxPGProperty * | GetFirst (int flags=wxPG_ITERATE_ALL) const |
wxPGProperty * | GetFirstChild (wxPGPropArg id) |
Returns id of first child of given property. More... | |
wxPropertyGridIterator | GetIterator (int flags=wxPG_ITERATE_DEFAULT, wxPGProperty *firstProp=NULL) |
Returns iterator class instance. More... | |
wxPropertyGridConstIterator | GetIterator (int flags=wxPG_ITERATE_DEFAULT, wxPGProperty *firstProp=NULL) const |
wxPropertyGridIterator | GetIterator (int flags, int startPos) |
Returns iterator class instance. More... | |
wxPropertyGridConstIterator | GetIterator (int flags, int startPos) const |
wxPGProperty * | GetNextSiblingProperty (wxPGPropArg id) |
Returns next item under the same parent. More... | |
void | GetPropertiesWithFlag (wxArrayPGProperty *targetArr, wxPGProperty::FlagType flags, bool inverse=false, int iterFlags=(wxPG_ITERATE_PROPERTIES|wxPG_ITERATE_HIDDEN|wxPG_ITERATE_CATEGORIES)) const |
Adds to 'targetArr' pointers to properties that have given flags 'flags' set. More... | |
wxPGProperty * | GetProperty (const wxString &name) const |
Returns pointer to the property with given name (case-sensitive). More... | |
wxVariant | GetPropertyAttribute (wxPGPropArg id, const wxString &attrName) const |
Returns value of given attribute. More... | |
const wxPGAttributeStorage & | GetPropertyAttributes (wxPGPropArg id) const |
Returns map-like storage of property's attributes. More... | |
wxPGProperty * | GetPropertyByName (const wxString &name) const |
Returns pointer to the property with given name (case-sensitive). More... | |
wxPGProperty * | GetPropertyByName (const wxString &name, const wxString &subname) const |
Returns id of a sub-property 'subname' of property 'name'. More... | |
wxPGProperty * | GetPropertyByNameA (const wxString &name) const |
wxPropertyCategory * | GetPropertyCategory (wxPGPropArg id) const |
Returns pointer of property's nearest parent category. More... | |
wxPGChoices & | GetPropertyChoices (wxPGPropArg id) |
Returns writable reference to property's list of choices (and relevant values). More... | |
const wxChar * | GetPropertyClassName (wxPGPropArg id) const |
Gets name of property's constructor function. More... | |
wxPGProperty::ClientDataType | GetPropertyClientData (wxPGPropArg id) const |
Returns client data (void*) of a property. More... | |
const wxPGEditor * | GetPropertyEditor (wxPGPropArg id) const |
Returns property's editor. More... | |
wxString | GetPropertyHelpString (wxPGPropArg id) const |
Returns help string associated with a property. More... | |
wxBitmap * | GetPropertyImage (wxPGPropArg id) const |
Returns property's custom value image (NULL of none). More... | |
unsigned int | GetPropertyIndex (wxPGPropArg id) |
Returns property's position under its parent. More... | |
const wxString & | GetPropertyLabel (wxPGPropArg id) |
Returns label of a property. More... | |
wxString | GetPropertyName (wxPGPropArg id) |
Returns name of a property, by which it is globally accessible. More... | |
wxPGProperty * | GetPropertyParent (wxPGPropArg id) |
Returns parent item of a property. More... | |
wxPGProperty * | GetPropertyPtr (wxPGPropArg id) const |
Returns pointer to a property. | |
wxString | GetPropertyShortClassName (wxPGPropArg id) |
Returns short name for property's class. More... | |
wxValidator * | GetPropertyValidator (wxPGPropArg id) |
Returns validator of a property as a reference, which you can pass to any number of SetPropertyValidator. | |
wxVariant | GetPropertyValue (wxPGPropArg id) |
Returns value as wxVariant. More... | |
wxArrayInt | GetPropertyValueAsArrayInt (wxPGPropArg id) const |
wxArrayString | GetPropertyValueAsArrayString (wxPGPropArg id) const |
bool | GetPropertyValueAsBool (wxPGPropArg id) const |
wxDateTime | GetPropertyValueAsDateTime (wxPGPropArg id) const |
double | GetPropertyValueAsDouble (wxPGPropArg id) const |
int | GetPropertyValueAsInt (wxPGPropArg id) const |
long | GetPropertyValueAsLong (wxPGPropArg id) const |
wxLongLong_t | GetPropertyValueAsLongLong (wxPGPropArg id) const |
wxPoint | GetPropertyValueAsPoint (wxPGPropArg id) const |
wxSize | GetPropertyValueAsSize (wxPGPropArg id) const |
wxString | GetPropertyValueAsString (wxPGPropArg id) const |
unsigned long | GetPropertyValueAsULong (wxPGPropArg id) const |
wxULongLong_t | GetPropertyValueAsULongLong (wxPGPropArg id) const |
void * | GetPropertyValueAsVoidPtr (wxPGPropArg id) const |
wxObject * | GetPropertyValueAsWxObjectPtr (wxPGPropArg id) const |
wxVariant | GetPropertyValues (const wxString &listname=wxEmptyString, wxPGProperty *baseparent=NULL, long flags=0) const |
Returns a wxVariant list containing wxVariant versions of all property values. More... | |
wxString | GetPropertyValueType (wxPGPropArg id) |
const wxArrayPGProperty & | GetSelectedProperties () const |
Returns list of currently selected properties. More... | |
wxPGProperty * | GetSelection () const |
Returns currently selected property. More... | |
wxPropertyGridState * | GetState () const |
bool | HideProperty (wxPGPropArg id, bool hide=true, int flags=wxPG_RECURSE) |
Hides or reveals a property. More... | |
wxPGProperty * | Insert (wxPGPropArg priorThis, wxPGProperty *newproperty) |
Inserts property to the property container. More... | |
wxPGProperty * | Insert (wxPGPropArg parent, int index, wxPGProperty *newproperty) |
Also see documentation for Insert . More... | |
wxPGProperty * | InsertCategory (wxPGPropArg id, int index, const wxString &label, const wxString &name=(*((wxString *) NULL))) |
void | InsertPropertyChoice (wxPGPropArg id, const wxString &label, int index, int value=INT_MAX) |
Inserts choice to a property that can accept one. More... | |
bool | IsModified (wxPGPropArg id) const |
Returns true if property has been modified after value set or modify flag clear by software. More... | |
bool | IsPropertyCategory (wxPGPropArg id) const |
Returns true if property is a category. More... | |
bool | IsPropertyEnabled (wxPGPropArg id) const |
Returns true if property is enabled. More... | |
bool | IsPropertyExpanded (wxPGPropArg id) const |
Returns true if given property is expanded. More... | |
bool | IsPropertyKindOf (wxPGPropArg id, wxClassInfo *info) const |
Returns true if property is of certain type. More... | |
bool | IsPropertyModified (wxPGPropArg id) const |
Returns true if property has been modified after value set or modify flag clear by software. | |
bool | IsPropertyShown (wxPGPropArg id) const |
Returns true if property is shown (ie. More... | |
bool | IsPropertyUnspecified (wxPGPropArg id) const |
Returns true if property value is set to unspecified. | |
bool | IsPropertyValueType (wxPGPropArg id, const wxChar *typestr) const |
Returns true if property's value type has name typestr. More... | |
void | LimitPropertyEditing (wxPGPropArg id, bool limit=true) |
Disables (limit = true) or enables (limit = false) wxTextCtrl editor of a property, if it is not the sole mean to edit the value. | |
void | NamesToProperties (wxArrayPGProperty *properties, const wxArrayString &names) const |
Converts array of names to array of property pointers. More... | |
void | PropertiesToNames (wxArrayString *names, const wxArrayPGProperty &properties) const |
Converts array of properties to array of names. More... | |
virtual void | RefreshGrid (wxPropertyGridState *state=NULL) |
If state is shown in it's grid, refresh it now. | |
wxPGProperty * | RemoveProperty (wxPGPropArg id) |
Removes a property. More... | |
wxPGProperty * | ReplaceProperty (wxPGPropArg id, wxPGProperty *property) |
Replaces property with id with newly created property. More... | |
bool | RestoreEditableState (const wxString &src, int restoreStates=AllStates) |
Restores user-editable state. More... | |
wxString | SaveEditableState (int includedStates=AllStates) const |
Used to acquire user-editable state (selected property, expanded properties, scrolled position, splitter positions). More... | |
bool | SetColumnProportion (unsigned int column, int proportion) |
Set proportion of a auto-stretchable column. More... | |
void | SetExpandedProperties (const wxArrayPGProperty &array, bool expand=true) |
Sets all properties in given array as expanded. More... | |
void | SetPropertiesFlag (const wxArrayPGProperty &srcArr, wxPGProperty::FlagType flags, bool inverse=false) |
Sets or clears flag(s) of all properties in given array. More... | |
void | SetPropertyAttribute (wxPGPropArg id, const wxString &attrName, wxVariant value, long argFlags=0) |
Sets an attribute of a property. More... | |
void | SetPropertyAttributes (wxPGPropArg id, const wxPGAttributeStorage &attributes) |
Sets attributes from a wxPGAttributeStorage. | |
void | SetPropertyCell (wxPGPropArg id, int column, const wxString &text=wxEmptyString, const wxBitmap &bitmap=wxNullBitmap, const wxColour &fgCol=wxNullColour, const wxColour &bgCol=wxNullColour) |
Sets text, bitmap, and colours for given column's cell. More... | |
void | SetPropertyChoices (wxPGPropArg id, wxPGChoices &choices) |
Set choices of a property to specified set of labels and values. More... | |
void | SetPropertyChoicesExclusive (wxPGPropArg id) |
If property's set of choices is shared, then calling this method converts it to private. | |
void | SetPropertyClientData (wxPGPropArg id, wxPGProperty::ClientDataType clientData) |
Sets client data (void*) of a property. More... | |
void | SetPropertyEditor (wxPGPropArg id, const wxPGEditor *editor) |
Sets editor control of a property. More... | |
void | SetPropertyEditor (wxPGPropArg id, const wxString &editorName) |
Sets editor control of a property. More... | |
void | SetPropertyHelpString (wxPGPropArg id, const wxString &helpString) |
Associates the help string with property. More... | |
void | SetPropertyImage (wxPGPropArg id, wxBitmap &bmp) |
Set wxBitmap in front of the value. More... | |
void | SetPropertyLabel (wxPGPropArg id, const wxString &newproplabel) |
Sets label of a property. More... | |
bool | SetPropertyMaxLength (wxPGPropArg id, int maxLen) |
Sets max length of property's text. | |
void | SetPropertyReadOnly (wxPGPropArg id, bool set=true, int flags=wxPG_RECURSE) |
Sets property (and, recursively, its children) to have read-only value. More... | |
void | SetPropertyValidator (wxPGPropArg id, const wxValidator &validator) |
Sets validator of a property. | |
void | SetPropertyValue (wxPGPropArg id, long value) |
Sets value (long integer) of a property. | |
void | SetPropertyValue (wxPGPropArg id, int value) |
Sets value (integer) of a property. | |
void | SetPropertyValue (wxPGPropArg id, double value) |
Sets value (floating point) of a property. | |
void | SetPropertyValue (wxPGPropArg id, bool value) |
Sets value (bool) of a property. | |
void | SetPropertyValue (wxPGPropArg id, const wxChar *value) |
void | SetPropertyValue (wxPGPropArg id, const wxArrayString &value) |
Sets value (wxArrayString) of a property. | |
void | SetPropertyValue (wxPGPropArg id, const wxDateTime &value) |
void | SetPropertyValue (wxPGPropArg id, const wxString &value) |
Sets value (wxString) of a property. More... | |
void | SetPropertyValue (wxPGPropArg id, wxObject *value) |
Sets value (wxObject*) of a property. | |
void | SetPropertyValue (wxPGPropArg id, void *value) |
Sets value (void*) of a property. More... | |
void | SetPropertyValue (wxPGPropArg id, wxObject &value) |
void | SetPropertyValue (wxPGPropArg id, wxVariant value) |
Sets value (wxVariant&) of a property. More... | |
void | SetPropertyValue (wxPGPropArg id, const wxPoint &value) |
Sets value (wxPoint&) of a property. | |
void | SetPropertyValue (wxPGPropArg id, const wxSize &value) |
Sets value (wxSize&) of a property. | |
void | SetPropertyValue (wxPGPropArg id, wxLongLong_t value) |
Sets value (wxLongLong&) of a property. | |
void | SetPropertyValue (wxPGPropArg id, wxULongLong_t value) |
Sets value (wxULongLong&) of a property. | |
void | SetPropertyValue (wxPGPropArg id, const wxArrayInt &value) |
Sets value (wxArrayInt&) of a property. | |
void | SetPropertyValues (const wxVariantList &list, wxPGPropArg defaultCategory=((wxPGProperty *) NULL)) |
Sets property values from a list of wxVariants. | |
void | SetPropertyValues (const wxVariant &list, wxPGPropArg defaultCategory=((wxPGProperty *) NULL)) |
Sets property values from a list of wxVariants. | |
void | SetPropertyValueUnspecified (wxPGPropArg id) |
Sets property's value to unspecified. More... | |
void | SetPropVal (wxPGPropArg id, wxVariant &value) |
Sets value (wxDateTime&) of a property. More... | |
void | SetValidationFailureBehavior (int vfbFlags) |
Adjusts how wxPropertyGrid behaves when invalid value is entered in a property. More... | |
virtual | ~wxPropertyGridInterface () |
Destructor. | |
Protected Member Functions | |
virtual wxPropertyGrid * | CreatePropertyGrid () const |
Creates property grid for the manager. More... | |
virtual void | RefreshProperty (wxPGProperty *p) |
![]() | |
bool | DoClearSelection (bool validation, int selFlags=0) |
virtual wxPGProperty * | DoGetPropertyByName (const wxString &name) const |
virtual bool | DoSelectPage (int WXUNUSED(index)) |
void | DoSetPropertyAttribute (wxPGPropArg id, const wxString &name, wxVariant &value, long argFlags) |
virtual wxVariant | GetEditableStateItem (const wxString &name) const |
In derived class, implement to return editable state component with given name. | |
virtual bool | SetEditableStateItem (const wxString &name, wxVariant value) |
In derived class, implement to set editable state component with given name to given value. | |
Additional Inherited Members | |
![]() | |
enum | EditableStateFlags { SelectionState = 0x01, ExpandedState = 0x02, ScrollPosState = 0x04, PageState = 0x08, SplitterPosState = 0x10, DescBoxState = 0x20, AllStates } |
![]() | |
static wxPGProperty * | CreatePropertyByClass (const wxString &classname, const wxString &label, const wxString &name) |
Constructs a property. More... | |
static wxPGProperty * | CreatePropertyByType (const wxString &valuetype, const wxString &label, const wxString &name) |
Constructs a property. More... | |
static wxPGEditor * | GetEditorByName (const wxString &editorName) |
static void | InitAllTypeHandlers () |
Initializes all property types. More... | |
static void | RegisterAdditionalEditors () |
Initializes additional property editors (SpinCtrl etc.). More... | |
static void | SetBoolChoices (const wxString &true_choice, const wxString &false_choice) |
Lets user to set the strings listed in the choice dropdown of a wxBoolProperty. More... | |
![]() | |
wxString | m_emptyString |
wxPropertyGridState * | m_pState |
wxPropertyGridManager is an efficient multi-page version of wxPropertyGrid, which can optionally have toolbar for mode and page selection, and help text box.
Use window flags to select components to include.
wxPropertyGridInterface
wxWindow
wxEvtHandler
wxObject
<wx/propgrid/manager.h>
To process input from a propertygrid control, use these event handler macros to direct input to member functions that take a wxPropertyGridEvent argument.
EVT_PG_SELECTED (id, func) | Property is selected. |
EVT_PG_CHANGED (id, func) | Property value is modified. |
EVT_PG_CHANGING (id, func) | Property value is about to be changed. Use wxPropertyGridEvent::GetValue() to take a peek at the pending value. |
EVT_PG_HIGHLIGHTED (id, func) | Mouse moves over property. Event's property is NULL if hovered on area that is not a property. |
EVT_PG_PAGE_CHANGED (id, func) | User changed page in manager. |
EVT_PG_ITEM_COLLAPSED (id, func) | User collapses a property or category. |
EVT_PG_ITEM_EXPANDED (id, func) | User expands a property or category. |
EVT_BUTTON (id, func) | Button in a property editor was clicked. Only occurs if the property doesn't handle button clicks itself. |
EVT_TEXT (id, func) | wxTextCtrl based editor was updated (but property value was not yet modified) |
wxPropertyGridManager::wxPropertyGridManager | ( | ) |
Two step constructor.
Call Create when this constructor is called to build up the wxPropertyGridManager.
wxPropertyGridManager::wxPropertyGridManager | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxPGMAN_DEFAULT_STYLE , |
||
const wxString & | name = wxPropertyGridManagerNameStr |
||
) |
The default constructor.
The styles to be used are styles valid for the wxWindow.
int wxPropertyGridManager::AddPage | ( | const wxString & | label = wxEmptyString , |
const wxBitmap & | bmp = wxPG_NULL_BITMAP , |
||
wxPropertyGridPage * | pageObj = (wxPropertyGridPage*) NULL |
||
) |
Creates new property page.
Note that the first page is not created automatically.
label | A label for the page. This may be shown as a toolbar tooltip etc. |
bmp | Bitmap image for toolbar. If wxNullBitmap is used, then a built-in default image is used. |
pageObj | wxPropertyGridPage instance. Manager will take ownership of this object. NULL indicates that a default page instance should be created. |
Returns | index to the page created. |
bool wxPropertyGridManager::CanClose | ( | ) |
Returns true if all property grid data changes have been committed.
Usually only returns false if value in active editor has been invalidated by a wxValidator.
bool wxPropertyGridManager::ClearSelection | ( | ) |
Deselect current selection, if any (from current page).
false | if editor could not be closed. |
bool wxPropertyGridManager::CommitChangesFromEditor | ( | wxUint32 | flags = 0 | ) |
Forces updating the value of property from the editor control.
Returns true if DoPropertyChanged was actually called.
bool wxPropertyGridManager::Create | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxPGMAN_DEFAULT_STYLE , |
||
const wxString & | name = wxPropertyGridManagerNameStr |
||
) |
Two step creation.
Whenever the control is created without any parameters, use Create to actually create it. Don't access the control's public methods before this is called.
|
protectedvirtual |
Creates property grid for the manager.
Reimplement in derived class to use subclassed wxPropertyGrid. However, if you you do this, then you must also use two-step construction (ie. default constructor and Create() instead of just constructor with arguments) when creating the manager.
bool wxPropertyGridManager::EnableCategories | ( | bool | enable | ) |
Enables or disables (shows/hides) categories according to parameter enable.
WARNING: Not tested properly, use at your own risk.
References wxPG_HIDE_CATEGORIES.
bool wxPropertyGridManager::EnsureVisible | ( | wxPGPropArg | id | ) |
Selects page, scrolls and/or expands items to ensure that the given item is visible.
Returns true if something was actually done.
size_t wxPropertyGridManager::GetChildrenCount | ( | ) |
Returns number of children of the root property of the selected page.
size_t wxPropertyGridManager::GetChildrenCount | ( | int | pageIndex | ) |
Returns number of children of the root property of given page.
size_t wxPropertyGridManager::GetChildrenCount | ( | wxPGPropArg | id | ) | const |
Returns number of children for the property.
NB: Cannot be in container methods class due to name hiding.
int wxPropertyGridManager::GetColumnCount | ( | int | page = -1 | ) | const |
Returns number of columns on given page.
By the default, returns number of columns on current page.
int wxPropertyGridManager::GetDescBoxHeight | ( | ) | const |
Returns height of the description text box.
wxPropertyGrid* wxPropertyGridManager::GetGrid | ( | ) |
Returns pointer to the contained wxPropertyGrid.
This does not change after wxPropertyGridManager has been created, so you can safely obtain pointer once and use it for the entire lifetime of the instance.
wxPropertyGridIterator wxPropertyGridManager::GetIterator | ( | int | flags = wxPG_ITERATE_DEFAULT , |
wxPGProperty * | firstProp = NULL |
||
) |
Returns iterator class instance.
References wxPropertyGridInterface::GetIterator().
wxPropertyGridIterator wxPropertyGridManager::GetIterator | ( | int | flags, |
int | startPos | ||
) |
Returns iterator class instance.
References wxPropertyGridInterface::GetIterator().
int wxPropertyGridManager::GetPageByName | ( | const wxString & | name | ) | const |
Returns index for a page name.
If no match is found, wxNOT_FOUND is returned.
int wxPropertyGridManager::GetPageByState | ( | const wxPropertyGridState * | pstate | ) | const |
Returns index for a relevant propertygrid state.
If no match is found, wxNOT_FOUND is returned.
Referenced by wxPropertyGridPage::GetIndex().
size_t wxPropertyGridManager::GetPageCount | ( | ) | const |
Returns number of managed pages.
const wxString& wxPropertyGridManager::GetPageName | ( | int | index | ) | const |
Returns name of given page.
wxPGProperty* wxPropertyGridManager::GetPageRoot | ( | int | index | ) | const |
Returns "root property" of the given page.
It does not have name, etc. and it is not visible. It is only useful for accessing its children.
wxPGProperty* wxPropertyGridManager::GetPropertyByLabel | ( | const wxString & | name, |
wxPropertyGridState ** | ppState = (wxPropertyGridState **) NULL |
||
) | const |
Returns id of property with given label (case-sensitive).
If there is no property with such label, returned property id is invalid ( i.e. it will return false with IsOk method). If there are multiple properties with identical name, most recent added is returned.
wxColour wxPropertyGridManager::GetPropertyColour | ( | wxPGPropArg | id | ) | const |
Returns cell background colour of a property.
wxColour wxPropertyGridManager::GetPropertyTextColour | ( | wxPGPropArg | id | ) | const |
Returns cell text colour of a property.
int wxPropertyGridManager::GetSelectedPage | ( | ) | const |
Returns index to currently selected page.
wxPGProperty* wxPropertyGridManager::GetSelectedProperty | ( | ) | const |
Shortcut for GetGrid()->GetSelection().
int wxPropertyGridManager::GetSelection | ( | ) | const |
Synonyme for GetSelectedPage.
wxToolBar* wxPropertyGridManager::GetToolBar | ( | ) | const |
Returns a pointer to the toolbar currently associated with the wxPropertyGridManager (if any).
|
virtual |
Creates new property page.
Note that the first page is not created automatically.
index | Add to this position. -1 will add as the last item. |
label | A label for the page. This may be shown as a toolbar tooltip etc. |
bmp | Bitmap image for toolbar. If wxNullBitmap is used, then a built-in default image is used. |
pageObj | wxPropertyGridPage instance. Manager will take ownership of this object. If NULL, default page object is constructed. |
Returns | index to the page created. |
bool wxPropertyGridManager::IsAnyModified | ( | ) | const |
Returns true if any property on any page has been modified by the user.
bool wxPropertyGridManager::IsFrozen | ( | ) | const |
Returns true if updating is frozen (ie.
Freeze() called but not yet Thaw() ).
bool wxPropertyGridManager::IsPageModified | ( | size_t | index | ) | const |
Returns true if any property on given page has been modified by the user.
|
virtual |
Returns true if property is selected.
Since selection is page based, this function checks every page in the manager.
Reimplemented from wxPropertyGridInterface.
|
virtual |
Removes a page.
Returns | false if it was not possible to remove page in question. |
void wxPropertyGridManager::SelectPage | ( | int | index | ) |
Select and displays a given page.
index | Index of page being seleced. Can be -1 to select nothing. |
void wxPropertyGridManager::SelectPage | ( | const wxString & | label | ) |
Select and displays a given page (by label).
void wxPropertyGridManager::SelectPage | ( | wxPropertyGridPage * | ptr | ) |
Select and displays a given page.
bool wxPropertyGridManager::SelectProperty | ( | wxPGPropArg | id, |
bool | focus = false |
||
) |
Select a property.
void wxPropertyGridManager::SetDescBoxHeight | ( | int | ht, |
bool | refresh = true |
||
) |
Sets y coordinate of the description box splitter.
void wxPropertyGridManager::SetPageSplitterPosition | ( | int | page, |
int | pos, | ||
int | column = 0 |
||
) |
Sets splitter position on individual page.
void wxPropertyGridManager::SetPropertyAttributeAll | ( | const wxString & | name, |
wxVariant | value | ||
) |
Sets property attribute for all applicapple properties.
Be sure to use this method after all properties have been added to the grid.
void wxPropertyGridManager::SetPropertyBackgroundColour | ( | wxPGPropArg | id, |
const wxColour & | col | ||
) |
Sets background colour of property and all its children.
Colours of captions are not affected. Background brush cache is optimized for often set colours to be set last.
void wxPropertyGridManager::SetPropertyColourToDefault | ( | wxPGPropArg | id | ) |
Sets background and text colour of property and all its children to the default.
void wxPropertyGridManager::SetSplitterLeft | ( | bool | subProps = false , |
bool | allPages = true |
||
) |
Moves splitter as left as possible, while still allowing all labels to be shown in full.
subProps | If false, will still allow sub-properties (ie. properties which parent is not root or category) to be cropped. |
allPages | If true, takes labels on all pages into account. |
void wxPropertyGridManager::SetSplitterPosition | ( | int | pos, |
int | column = 0 |
||
) |
Sets splitter position for all pages.
void wxPropertyGridManager::SetStringSelection | ( | const wxChar * | name | ) |
Synonyme for SelectPage(name).