]> git.saurik.com Git - wxWidgets.git/commitdiff
Changed 'bool recursively' to 'int flags' argument (with default value of wxPG_RECURS...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 15 Oct 2009 16:39:19 +0000 (16:39 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 15 Oct 2009 16:39:19 +0000 (16:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/propgrid/property.h
include/wx/propgrid/propgridiface.h
interface/wx/propgrid/property.h
interface/wx/propgrid/propgridiface.h
src/propgrid/property.cpp
src/propgrid/propgridiface.cpp

index b585a68823778e0a194477af6cb1f14e15f89e4d..ed034939c6f1bacd09a5b5ea33924a237c348309 100644 (file)
@@ -1865,12 +1865,13 @@ public:
         @param colour
             Background colour to use.
 
-        @param recursively
-            If @true, children are affected recursively, and any categories
-            are not.
+        @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 SetBackgroundColour( const wxColour& colour,
-                              bool recursively = false );
+                              int flags = wxPG_RECURSE );
 
     /**
         Sets property's text colour.
@@ -1878,12 +1879,13 @@ public:
         @param colour
             Text colour to use.
 
-        @param recursively
-            If @true, children are affected recursively, and any categories
-            are not.
+        @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 SetTextColour( const wxColour& colour,
-                        bool recursively = false );
+                        int flags = wxPG_RECURSE );
 
     /** Set default value of a property. Synonymous to
 
index 29d0116aad92fcd2aeba263b40432f14986b3669..afc1d191de80d592e4618ee6faea201c99298f21 100644 (file)
@@ -905,13 +905,14 @@ public:
         @param colour
             New background colour.
 
-        @param recursively
-            If True, child properties are affected recursively. Property
-            categories are skipped if this flag is used.
+        @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,
-                                      bool recursively = true );
+                                      int flags = wxPG_RECURSE );
 
     /** Resets text and background colours of given property.
     */
@@ -926,13 +927,14 @@ public:
         @param colour
             New background colour.
 
-        @param recursively
-            If True, child properties are affected recursively. Property
-            categories are skipped if this flag is used.
+        @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& col,
-                                bool recursively = true );
+                                int flags = wxPG_RECURSE );
 
     /**
         Returns background colour of first cell of a property.
index 25a8b394968549b39cfcfe22969d41d0239030dd..76414a42719e027e9153e90c84e9ec5ce08e3a24 100644 (file)
@@ -1323,12 +1323,13 @@ public:
         @param colour
             Background colour to use.
 
-        @param recursively
-            If @true, children are affected recursively, and any categories
-            are not.
+        @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 SetBackgroundColour( const wxColour& colour,
-                              bool recursively = false );
+                              int flags = wxPG_RECURSE );
 
     /**
         Sets editor for a property.
@@ -1433,12 +1434,13 @@ public:
         @param colour
             Text colour to use.
 
-        @param recursively
-            If @true, children are affected recursively, and any categories
-            are not.
+        @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 SetTextColour( const wxColour& colour,
-                        bool recursively = false );
+                        int flags = wxPG_RECURSE );
 
     /** Sets wxValidator for a property */
     void SetValidator( const wxValidator& validator );
index 3289ee5aeca1cd9805229f15dc2e3a27d6fbd357..2b1cb12d27e3039ed234f03e65cd92a8f91bc477 100644 (file)
@@ -713,13 +713,14 @@ public:
         @param colour
             New background colour.
 
-        @param recursively
-            If True, child properties are affected recursively. Property
-            categories are skipped if this flag is used.
+        @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,
-                                      bool recursively = true );
+                                      int flags = wxPG_RECURSE );
 
     /**
         Sets text, bitmap, and colours for given column's cell.
@@ -860,13 +861,14 @@ public:
         @param colour
             New background colour.
 
-        @param recursively
-            If True, child properties are affected recursively. Property
-            categories are skipped if this flag is used.
+        @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,
-                                bool recursively = true );
+                                int flags = wxPG_RECURSE );
 
     /**
         Sets validator of a property.
index 59ec8d262582b4c192cc67ac78b58dea514403af..86ede728d1b739ac95f80e074dbd338421122b64 100644 (file)
@@ -1547,9 +1547,10 @@ wxPGCell& wxPGProperty::GetOrCreateCell( unsigned int column )
 }
 
 void wxPGProperty::SetBackgroundColour( const wxColour& colour,
-                                        bool recursively )
+                                        int flags )
 {
     wxPGProperty* firstProp = this;
+    bool recursively = flags & wxPG_RECURSE ? true : false;
 
     //
     // 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,
-                                  bool recursively )
+                                  int flags )
 {
     wxPGProperty* firstProp = this;
+    bool recursively = flags & wxPG_RECURSE ? true : false;
 
     //
     // If category is tried to set recursively, skip it and only
index 1984ce6bb40d37243fbaa139a8e25ada3d080a20..ecc6c0ef3004f1fe36384505af2aefc2c02e81b0 100644 (file)
@@ -652,22 +652,22 @@ bool wxPropertyGridInterface::SetPropertyMaxLength( wxPGPropArg id, int maxLen )
 void
 wxPropertyGridInterface::SetPropertyBackgroundColour( wxPGPropArg id,
                                                       const wxColour& colour,
-                                                      bool recursively )
+                                                      int flags )
 {
     wxPG_PROP_ARG_CALL_PROLOG()
-    p->SetBackgroundColour( colour, recursively );
-    RefreshProperty( p );
+    p->SetBackgroundColour(colour, flags);
+    RefreshProperty(p);
 }
 
 // -----------------------------------------------------------------------
 
 void wxPropertyGridInterface::SetPropertyTextColour( wxPGPropArg id,
                                                      const wxColour& colour,
-                                                     bool recursively )
+                                                     int flags )
 {
     wxPG_PROP_ARG_CALL_PROLOG()
-    p->SetTextColour( colour, recursively );
-    RefreshProperty( p );
+    p->SetTextColour(colour, flags);
+    RefreshProperty(p);
 }
 
 // -----------------------------------------------------------------------