]> git.saurik.com Git - wxWidgets.git/commitdiff
Moved Get/SetPropertyText/BackgroundColour() member functions from wxPropertyGrid...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Mon, 3 Nov 2008 17:02:04 +0000 (17:02 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Mon, 3 Nov 2008 17:02:04 +0000 (17:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index c88c60e23b1e922d4383b166e7932b7e66609882..1dd48d53d40494317459fb823c02780e71d23881 100644 (file)
@@ -839,12 +839,6 @@ public:
     */
     wxVariant GetUncommittedPropertyValue();
 
-    /** Returns cell background colour of a property. */
-    wxColour GetPropertyBackgroundColour( wxPGPropArg id ) const;
-
-    /** Returns cell background colour of a property. */
-    wxColour GetPropertyTextColour( wxPGPropArg id ) const;
-
     /** Returns "root property". It does not have name, etc. and it is not
         visible. It is only useful for accessing its children.
     */
@@ -989,33 +983,6 @@ public:
     /** Sets background colour of margin. */
     void SetMarginColour(const wxColour& col);
 
-    /**
-        Sets background colour of property.
-
-        @param id
-            Property name or pointer.
-
-        @param colour
-            New background colour.
-
-        @param recursively
-            If True, child properties are affected recursively. Property
-            categories are skipped if this flag is used.
-    */
-    void SetPropertyBackgroundColour( wxPGPropArg id,
-                                      const wxColour& colour,
-                                      bool recursively = false);
-
-    /** Resets text and background colours of given property.
-    */
-    void SetPropertyColoursToDefault( wxPGPropArg id );
-
-    /** Sets text colour of property and all its children.
-    */
-    void SetPropertyTextColour( wxPGPropArg id,
-                                const wxColour& col,
-                                bool recursively = true );
-
     /**
         Sets selection background colour - applies to selected property name
         background.
index b8f864d52b4105c60406a2da089b89f6c4e46b4c..069a7049897247b2a010b88994148bbafeec39a9 100644 (file)
@@ -856,6 +856,62 @@ public:
     */
     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 recursively
+            If True, child properties are affected recursively. Property
+            categories are skipped if this flag is used.
+    */
+    void SetPropertyBackgroundColour( wxPGPropArg id,
+                                      const wxColour& colour,
+                                      bool recursively = true );
+
+    /** Resets text and background colours of given property.
+    */
+    void SetPropertyColoursToDefault( wxPGPropArg id );
+
+    /**
+        Sets text colour of a property.
+
+        @param id
+            Property name or pointer.
+
+        @param colour
+            New background colour.
+
+        @param recursively
+            If True, child properties are affected recursively. Property
+            categories are skipped if this flag is used.
+    */
+    void SetPropertyTextColour( wxPGPropArg id,
+                                const wxColour& col,
+                                bool recursively = true );
+
+    /**
+        Returns background colour of first cell of a property.
+    */
+    wxColour GetPropertyBackgroundColour( wxPGPropArg id ) const
+    {
+        wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxColour())
+        return p->GetCell(0).GetBgCol();
+    }
+
+    /**
+        Returns text colour of first cell of a property.
+    */
+    wxColour GetPropertyTextColour( wxPGPropArg id ) const
+    {
+        wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxColour())
+        return p->GetCell(0).GetFgCol();
+    }
+
     /** Sets text, bitmap, and colours for given column's cell.
 
         @remarks
index eec0ae384295607a2f6410d95ee9b7de396ac39a..8949055a0afbd4c71ec29eced7dfb2f060f9dfd3 100644 (file)
@@ -586,16 +586,6 @@ public:
     */
     wxVariant GetUncommittedPropertyValue();
 
-    /**
-        Returns cell background colour of a property.
-    */
-    wxColour GetPropertyBackgroundColour( wxPGPropArg id ) const;
-
-    /**
-        Returns cell background colour of a property.
-    */
-    wxColour GetPropertyTextColour( wxPGPropArg id ) const;
-
     /**
         Returns "root property". It does not have name, etc. and it is not
         visible. It is only useful for accessing its children.
@@ -778,24 +768,6 @@ public:
     */
     void SetMarginColour(const wxColour& col);
 
-    /**
-        Sets background colour of property and all its children. Colours of
-        captions are not affected. Background brush cache is optimized for often
-        set colours to be set last.
-    */
-    void SetPropertyBackgroundColour( wxPGPropArg id, const wxColour& col );
-
-    /**
-        Resets text and background colours of given property.
-    */
-    void SetPropertyColoursToDefault( wxPGPropArg id );
-
-    /**
-        Sets text colour of property and all its children.
-    */
-    void SetPropertyTextColour( wxPGPropArg id, const wxColour& col,
-                                bool recursively = true );
-
     /**
         Sets selection background colour - applies to selected property name
         background.
index 37afffe4974eded0de02121f2e20ec41d9e8e712..7f35703133e0a477babea541f28883c74f4e65d0 100644 (file)
@@ -244,6 +244,11 @@ public:
     */
     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.
@@ -293,6 +298,11 @@ public:
     /** 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.
@@ -616,6 +626,23 @@ public:
     */
     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 recursively
+            If True, child properties are affected recursively. Property
+            categories are skipped if this flag is used.
+    */
+    void SetPropertyBackgroundColour( wxPGPropArg id,
+                                      const wxColour& colour,
+                                      bool recursively = true );
+
     /**
         Sets text, bitmap, and colours for given column's cell.
 
@@ -638,6 +665,11 @@ public:
     */
     void SetPropertyClientData( wxPGPropArg id, void* clientData );
 
+    /**
+        Resets text and background colours of given property.
+    */
+    void SetPropertyColoursToDefault( wxPGPropArg id );
+
     /**
         Sets editor for a property.
 
@@ -739,6 +771,24 @@ public:
     */
     bool SetPropertyMaxLength( wxPGPropArg id, int maxLen );
 
+
+    /**
+        Sets text colour of a property.
+
+        @param id
+            Property name or pointer.
+
+        @param colour
+            New background colour.
+
+        @param recursively
+            If True, child properties are affected recursively. Property
+            categories are skipped if this flag is used.
+    */
+    void SetPropertyTextColour( wxPGPropArg id,
+                                const wxColour& col,
+                                bool recursively = true );
+
     /**
         Sets validator of a property.
     */
index d356712b77a7f351ea5d9730f911bdcb68bacab5..190021d63e7af19560315486968553af75f392f9 100644 (file)
@@ -1176,54 +1176,6 @@ void wxPropertyGrid::SetCaptionTextColour( const wxColour& col )
     Refresh();
 }
 
-// -----------------------------------------------------------------------
-
-void wxPropertyGrid::SetPropertyBackgroundColour( wxPGPropArg id,
-                                                  const wxColour& colour,
-                                                  bool recursively )
-{
-    wxPG_PROP_ARG_CALL_PROLOG()
-    p->SetBackgroundColour( colour, recursively );
-    DrawItemAndChildren( p );
-}
-
-// -----------------------------------------------------------------------
-
-wxColour wxPropertyGrid::GetPropertyBackgroundColour( wxPGPropArg id ) const
-{
-    wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxColour())
-
-    return p->GetCell(0).GetBgCol();
-}
-
-// -----------------------------------------------------------------------
-
-void wxPropertyGrid::SetPropertyTextColour( wxPGPropArg id, const wxColour& colour,
-                                            bool recursively )
-{
-    wxPG_PROP_ARG_CALL_PROLOG()
-    p->SetTextColour( colour, recursively );
-    DrawItemAndChildren( p );
-}
-
-// -----------------------------------------------------------------------
-
-wxColour wxPropertyGrid::GetPropertyTextColour( wxPGPropArg id ) const
-{
-    wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxColour())
-
-    return p->GetCell(0).GetFgCol();
-}
-
-// -----------------------------------------------------------------------
-
-void wxPropertyGrid::SetPropertyColoursToDefault( wxPGPropArg id )
-{
-    wxPG_PROP_ARG_CALL_PROLOG()
-
-    p->m_cells.clear();
-}
-
 // -----------------------------------------------------------------------
 // wxPropertyGrid property adding and removal
 // -----------------------------------------------------------------------
index 9d679284e8142aadedd3985cc294fa438b8a8404..46cb89fbb89f029d9b156dbe5bd23962cdc22396 100644 (file)
@@ -774,6 +774,38 @@ bool wxPropertyGridInterface::SetPropertyMaxLength( wxPGPropArg id, int maxLen )
 
 // -----------------------------------------------------------------------
 
+void
+wxPropertyGridInterface::SetPropertyBackgroundColour( wxPGPropArg id,
+                                                      const wxColour& colour,
+                                                      bool recursively )
+{
+    wxPG_PROP_ARG_CALL_PROLOG()
+    p->SetBackgroundColour( colour, recursively );
+    RefreshProperty( p );
+}
+
+// -----------------------------------------------------------------------
+
+void wxPropertyGridInterface::SetPropertyTextColour( wxPGPropArg id,
+                                                     const wxColour& colour,
+                                                     bool recursively )
+{
+    wxPG_PROP_ARG_CALL_PROLOG()
+    p->SetTextColour( colour, recursively );
+    RefreshProperty( p );
+}
+
+// -----------------------------------------------------------------------
+
+void wxPropertyGridInterface::SetPropertyColoursToDefault( wxPGPropArg id )
+{
+    wxPG_PROP_ARG_CALL_PROLOG()
+
+    p->m_cells.clear();
+}
+
+// -----------------------------------------------------------------------
+
 void wxPropertyGridInterface::SetPropertyCell( wxPGPropArg id,
                                                int column,
                                                const wxString& text,