Changed 'bool recursively' to 'int flags' argument (with default value of wxPG_RECURSE) in wxPropertyGrid Set(Property)BackgroundColour() and Set(Property)TextColour() member functions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-10-15 16:39:19 +00:00
parent 50355f75e5
commit e607eac25c
6 changed files with 50 additions and 40 deletions

View File

@@ -1865,12 +1865,13 @@ public:
@param colour @param colour
Background colour to use. Background colour to use.
@param recursively @param flags
If @true, children are affected recursively, and any categories Default is wxPG_RECURSE which causes colour to be set recursively.
are not. Omit this flag to only set colour for the property in question
and not any of its children.
*/ */
void SetBackgroundColour( const wxColour& colour, void SetBackgroundColour( const wxColour& colour,
bool recursively = false ); int flags = wxPG_RECURSE );
/** /**
Sets property's text colour. Sets property's text colour.
@@ -1878,12 +1879,13 @@ public:
@param colour @param colour
Text colour to use. Text colour to use.
@param recursively @param flags
If @true, children are affected recursively, and any categories Default is wxPG_RECURSE which causes colour to be set recursively.
are not. Omit this flag to only set colour for the property in question
and not any of its children.
*/ */
void SetTextColour( const wxColour& colour, void SetTextColour( const wxColour& colour,
bool recursively = false ); int flags = wxPG_RECURSE );
/** Set default value of a property. Synonymous to /** Set default value of a property. Synonymous to

View File

@@ -905,13 +905,14 @@ public:
@param colour @param colour
New background colour. New background colour.
@param recursively @param flags
If True, child properties are affected recursively. Property Default is wxPG_RECURSE which causes colour to be set recursively.
categories are skipped if this flag is used. Omit this flag to only set colour for the property in question
and not any of its children.
*/ */
void SetPropertyBackgroundColour( wxPGPropArg id, void SetPropertyBackgroundColour( wxPGPropArg id,
const wxColour& colour, const wxColour& colour,
bool recursively = true ); int flags = wxPG_RECURSE );
/** Resets text and background colours of given property. /** Resets text and background colours of given property.
*/ */
@@ -926,13 +927,14 @@ public:
@param colour @param colour
New background colour. New background colour.
@param recursively @param flags
If True, child properties are affected recursively. Property Default is wxPG_RECURSE which causes colour to be set recursively.
categories are skipped if this flag is used. Omit this flag to only set colour for the property in question
and not any of its children.
*/ */
void SetPropertyTextColour( wxPGPropArg id, void SetPropertyTextColour( wxPGPropArg id,
const wxColour& col, const wxColour& col,
bool recursively = true ); int flags = wxPG_RECURSE );
/** /**
Returns background colour of first cell of a property. Returns background colour of first cell of a property.

View File

@@ -1323,12 +1323,13 @@ public:
@param colour @param colour
Background colour to use. Background colour to use.
@param recursively @param flags
If @true, children are affected recursively, and any categories Default is wxPG_RECURSE which causes colour to be set recursively.
are not. Omit this flag to only set colour for the property in question
and not any of its children.
*/ */
void SetBackgroundColour( const wxColour& colour, void SetBackgroundColour( const wxColour& colour,
bool recursively = false ); int flags = wxPG_RECURSE );
/** /**
Sets editor for a property. Sets editor for a property.
@@ -1433,12 +1434,13 @@ public:
@param colour @param colour
Text colour to use. Text colour to use.
@param recursively @param flags
If @true, children are affected recursively, and any categories Default is wxPG_RECURSE which causes colour to be set recursively.
are not. Omit this flag to only set colour for the property in question
and not any of its children.
*/ */
void SetTextColour( const wxColour& colour, void SetTextColour( const wxColour& colour,
bool recursively = false ); int flags = wxPG_RECURSE );
/** Sets wxValidator for a property */ /** Sets wxValidator for a property */
void SetValidator( const wxValidator& validator ); void SetValidator( const wxValidator& validator );

View File

@@ -713,13 +713,14 @@ public:
@param colour @param colour
New background colour. New background colour.
@param recursively @param flags
If True, child properties are affected recursively. Property Default is wxPG_RECURSE which causes colour to be set recursively.
categories are skipped if this flag is used. Omit this flag to only set colour for the property in question
and not any of its children.
*/ */
void SetPropertyBackgroundColour( wxPGPropArg id, void SetPropertyBackgroundColour( wxPGPropArg id,
const wxColour& colour, const wxColour& colour,
bool recursively = true ); int flags = wxPG_RECURSE );
/** /**
Sets text, bitmap, and colours for given column's cell. Sets text, bitmap, and colours for given column's cell.
@@ -860,13 +861,14 @@ public:
@param colour @param colour
New background colour. New background colour.
@param recursively @param flags
If True, child properties are affected recursively. Property Default is wxPG_RECURSE which causes colour to be set recursively.
categories are skipped if this flag is used. Omit this flag to only set colour for the property in question
and not any of its children.
*/ */
void SetPropertyTextColour( wxPGPropArg id, void SetPropertyTextColour( wxPGPropArg id,
const wxColour& colour, const wxColour& colour,
bool recursively = true ); int flags = wxPG_RECURSE );
/** /**
Sets validator of a property. Sets validator of a property.

View File

@@ -1547,9 +1547,10 @@ wxPGCell& wxPGProperty::GetOrCreateCell( unsigned int column )
} }
void wxPGProperty::SetBackgroundColour( const wxColour& colour, void wxPGProperty::SetBackgroundColour( const wxColour& colour,
bool recursively ) int flags )
{ {
wxPGProperty* firstProp = this; wxPGProperty* firstProp = this;
bool recursively = flags & wxPG_RECURSE ? true : false;
// //
// If category is tried to set recursively, skip it and only // If category is tried to set recursively, skip it and only
@@ -1582,9 +1583,10 @@ void wxPGProperty::SetBackgroundColour( const wxColour& colour,
} }
void wxPGProperty::SetTextColour( const wxColour& colour, void wxPGProperty::SetTextColour( const wxColour& colour,
bool recursively ) int flags )
{ {
wxPGProperty* firstProp = this; wxPGProperty* firstProp = this;
bool recursively = flags & wxPG_RECURSE ? true : false;
// //
// If category is tried to set recursively, skip it and only // If category is tried to set recursively, skip it and only

View File

@@ -652,22 +652,22 @@ bool wxPropertyGridInterface::SetPropertyMaxLength( wxPGPropArg id, int maxLen )
void void
wxPropertyGridInterface::SetPropertyBackgroundColour( wxPGPropArg id, wxPropertyGridInterface::SetPropertyBackgroundColour( wxPGPropArg id,
const wxColour& colour, const wxColour& colour,
bool recursively ) int flags )
{ {
wxPG_PROP_ARG_CALL_PROLOG() wxPG_PROP_ARG_CALL_PROLOG()
p->SetBackgroundColour( colour, recursively ); p->SetBackgroundColour(colour, flags);
RefreshProperty( p ); RefreshProperty(p);
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void wxPropertyGridInterface::SetPropertyTextColour( wxPGPropArg id, void wxPropertyGridInterface::SetPropertyTextColour( wxPGPropArg id,
const wxColour& colour, const wxColour& colour,
bool recursively ) int flags )
{ {
wxPG_PROP_ARG_CALL_PROLOG() wxPG_PROP_ARG_CALL_PROLOG()
p->SetTextColour( colour, recursively ); p->SetTextColour(colour, flags);
RefreshProperty( p ); RefreshProperty(p);
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------