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

@@ -953,8 +953,19 @@ public:
int flags = wxPG_RECURSE );
/** Resets text and background colours of given property.
@param id
Property name or pointer.
@param flags
Default is wxPG_DONT_RECURSE which causes colour to be reset
only for the property in question (for backward compatibility).
*/
void SetPropertyColoursToDefault( wxPGPropArg id );
#if WXWIN_COMPATIBILITY_3_0
void SetPropertyColoursToDefault(wxPGPropArg id);
void SetPropertyColoursToDefault(wxPGPropArg id, int flags);
#else
void SetPropertyColoursToDefault(wxPGPropArg id, int flags = wxPG_DONT_RECURSE);
#endif // WXWIN_COMPATIBILITY_3_0
/**
Sets text colour of a property.