Extend functionality of wxPropertyGridInterface::SetPropertyColoursToDefault method.

SetPropertyTextColour, SetPropertyBackgroundColour methods are able to set colours recursively for sub-properties but SetPropertyColoursToDefault method is not.
For the sake of consistency, SetPropertyColoursToDefault method is extended to have the same capabilities as SetPropertyTextColour and SetPropertyBackgroundColour. Behaviour and signature in default case (no recursion) is preserved.
For internal purposes there were also implemented helper methods in wxPGProperty class: SetDefaultColours, ClearCells.
This commit is contained in:
Artur Wieczorek
2015-08-27 19:14:52 +02:00
parent 503c6a48c7
commit 7ce6cff5ab
4 changed files with 76 additions and 3 deletions

View File

@@ -2013,6 +2013,16 @@ public:
void SetTextColour( const wxColour& colour,
int flags = wxPG_RECURSE );
/**
Sets property's default text and background colours.
@param flags
Default is wxPG_RECURSE which causes colours to be set recursively.
Omit this flag to only set colours for the property in question
and not any of its children.
*/
void SetDefaultColours(int flags = wxPG_RECURSE);
/** Set default value of a property. Synonymous to
@code
@@ -2397,6 +2407,14 @@ protected:
FlagType ignoreWithFlags,
bool recursively );
/**
Clear cells associated with property.
@param recursively
If @true, apply this operation recursively in child properties.
*/
void ClearCells(FlagType ignoreWithFlags, bool recursively);
/**
Makes sure m_cells has size of column+1 (or more).
*/