- Does not automatically redraw the control, so you may need to call
Refresh() when calling this function after control has been shown for
the first time.
+ - This functions deselects selected property, if any. Validation
+ failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
+ selection is cleared even if editor had invalid value.
*/
wxPGProperty* Append( wxPGProperty* property );
/**
Deletes all properties.
+
+ @remarks This functions deselects selected property, if any. Validation
+ failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
+ selection is cleared even if editor had invalid value.
*/
virtual void Clear() = 0;
/**
- Deselect current selection, if any.
+ Clears current selection, if any.
+
+ @param validation
+ If set to @false, deselecting the property will always work,
+ even if its editor had invalid value in it.
+
+ @return Returns @true if successful or if there was no selection. May
+ fail if validation was enabled and active editor had invalid
+ value.
- @return Returns @true if success (ie. validator did not intercept).
+ @remarks In wxPropertyGrid 1.4, this member function used to send
+ wxPG_EVT_SELECTED. In wxWidgets 2.9 and later, it no longer
+ does that.
+
+ @see wxPropertyGrid::SelectProperty()
*/
- bool ClearSelection();
+ bool ClearSelection( bool validation = false);
/**
Resets modified status of all properties.
Collapses given category or property with children.
@return Returns @true if actually collapsed.
+
+ @remarks This function may deselect selected property, if any. Validation
+ failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
+ selection is cleared even if editor had invalid value.
*/
bool Collapse( wxPGPropArg id );
/**
Collapses all items that can be collapsed.
- @return Returns @false if failed (may fail if value in active
- editor cannot be validated).
+ @remarks This functions clears selection. Validation failure option
+ wxPG_VFB_STAY_IN_PROPERTY is not respected, ie. selection
+ is cleared even if editor had invalid value.
*/
bool CollapseAll();
/**
Deletes a property.
+
+ @remarks This functions deselects selected property, if any. Validation
+ failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
+ selection is cleared even if editor had invalid value.
*/
void DeleteProperty( wxPGPropArg id );
Expands given category or property with children.
@return Returns @true if actually expanded.
+
+ @remarks This function may deselect selected property, if any. Validation
+ failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
+ selection is cleared even if editor had invalid value.
*/
bool Expand( wxPGPropArg id );
/**
Expands all items that can be expanded.
+
+ @remarks This functions clears selection. Validation failure option
+ wxPG_VFB_STAY_IN_PROPERTY is not respected, ie. selection
+ is cleared even if editor had invalid value.
*/
bool ExpandAll( bool expand = true );
wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL );
/**
- Returns id of property with given name (case-sensitive).
+ Returns pointer to a property with given name (case-sensitive).
+ If there is no property with such name, @NULL pointer is returned.
+
+ @remarks Properties which have non-category, non-root parent
+ can not be accessed globally by their name. Instead, use
+ "<property>.<subproperty>" instead of "<subproperty>".
*/
wxPGProperty* GetProperty( const wxString& name ) const;
*/
wxVariant GetPropertyAttribute( wxPGPropArg id, const wxString& attrName ) const;
+ /**
+ Returns background colour of first cell of a property.
+ */
+ wxColour GetPropertyBackgroundColour( wxPGPropArg id ) const;
+
/**
Returns pointer of property's nearest parent category. If no category
found, returns @NULL.
wxPGProperty* GetPropertyByLabel( const wxString& label ) const;
/**
- Returns property with given name. @NULL if none found.
+ Returns pointer to a property with given name (case-sensitive).
+ If there is no property with such name, @NULL pointer is returned.
+
+ @remarks Properties which have non-category, non-root parent
+ can not be accessed globally by their name. Instead, use
+ "<property>.<subproperty>" instead of "<subproperty>".
*/
wxPGProperty* GetPropertyByName( const wxString& name ) const;
/** Returns property's name, by which it is globally accessible. */
wxString GetPropertyName( wxPGProperty* property );
+ /**
+ Returns text colour of first cell of a property.
+ */
+ wxColour GetPropertyTextColour( wxPGPropArg id ) const;
+
/**
Returns validator of a property as a reference, which you
can pass to any number of SetPropertyValidator.
wxVariant GetPropertyValues( const wxString& listname = wxEmptyString,
wxPGProperty* baseparent = NULL, long flags = 0 ) const;
- /** Returns currently selected property. */
+ /**
+ Returns list of currently selected properties.
+
+ @remarks wxArrayPGProperty should be compatible with std::vector API.
+ */
+ const wxArrayPGProperty& GetSelectedProperties() const;
+
+ /**
+ Returns currently selected property. NULL if none.
+
+ @remarks When wxPG_EX_MULTIPLE_SELECTION extra style is used, this
+ member function returns the focused property, that is the
+ one which can have active editor.
+ */
wxPGProperty* GetSelection() const;
/**
non-categoric) are active, Insert becomes even more slow. This is
especially true if current mode is non-categoric.
+ - This functions deselects selected property, if any. Validation
+ failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, ie.
+ selection is cleared even if editor had invalid value.
+
Example of use:
@code
*/
bool IsPropertyModified( wxPGPropArg id ) const;
+ /**
+ Returns true if property is selected.
+ */
+ virtual bool IsPropertySelected( wxPGPropArg id ) const;
+
/**
Returns @true if property is shown (ie. HideProperty() with @true not
called for it).
*/
static void RegisterAdditionalEditors();
+ /**
+ Removes and returns a property.
+
+ @param id
+ Pointer or name of a property.
+
+ @remarks Removed property cannot have any children.
+ */
+ wxPGProperty* RemoveProperty( wxPGPropArg id );
+
/**
Replaces property with id with newly created one. For example,
this code replaces existing property named "Flags" with one that
*/
void SetPropertyAttributeAll( const wxString& attrName, wxVariant value );
+ /**
+ Sets background colour of a property.
+
+ @param id
+ Property name or pointer.
+
+ @param colour
+ New background colour.
+
+ @param flags
+ Default is wxPG_RECURSE which causes colour to be set recursively.
+ Omit this flag to only set colour for the property in question
+ and not any of its children.
+ */
+ void SetPropertyBackgroundColour( wxPGPropArg id,
+ const wxColour& colour,
+ int flags = wxPG_RECURSE );
+
/**
Sets text, bitmap, and colours for given column's cell.
*/
void SetPropertyClientData( wxPGPropArg id, void* clientData );
+ /**
+ Resets text and background colours of given property.
+ */
+ void SetPropertyColoursToDefault( wxPGPropArg id );
+
/**
Sets editor for a property.
void SetPropertyValueUnspecified( wxPGPropArg id );
/**
- Sets various property values from a list of wxVariants. If property with
- name is missing from the grid, new property is created under given
- default category (or root if omitted).
+ Sets property values from a list of wxVariants.
*/
void SetPropertyValues( const wxVariantList& list,
wxPGPropArg defaultCategory = wxNullProperty );
+ /**
+ Sets property values from a list of wxVariants.
+ */
void SetPropertyValues( const wxVariant& list,
wxPGPropArg defaultCategory = wxNullProperty );
*/
bool SetPropertyMaxLength( wxPGPropArg id, int maxLen );
+
+ /**
+ Sets text colour of a property.
+
+ @param id
+ Property name or pointer.
+
+ @param colour
+ New background colour.
+
+ @param flags
+ Default is wxPG_RECURSE which causes colour to be set recursively.
+ Omit this flag to only set colour for the property in question
+ and not any of its children.
+ */
+ void SetPropertyTextColour( wxPGPropArg id,
+ const wxColour& colour,
+ int flags = wxPG_RECURSE );
+
/**
Sets validator of a property.
*/
*/
void SetValidationFailureBehavior( int vfbFlags );
+ /**
+ Sorts all properties recursively.
+
+ @param flags
+ This can contain any of the following options:
+ wxPG_SORT_TOP_LEVEL_ONLY: Only sort categories and their
+ immediate children. Sorting done by wxPG_AUTO_SORT option
+ uses this.
+
+ @see SortChildren, wxPropertyGrid::SetSortFunction
+ */
+ void Sort( int flags = 0 );
+
+ /**
+ Sorts children of a property.
+
+ @param id
+ Name or pointer to a property.
+
+ @param flags
+ This can contain any of the following options:
+ wxPG_RECURSE: Sorts recursively.
+
+ @see Sort, wxPropertyGrid::SetSortFunction
+ */
+ void SortChildren( wxPGPropArg id, int flags = 0 );
+
/**
Returns editor pointer of editor with given name;
*/