]> git.saurik.com Git - wxWidgets.git/commitdiff
moved DoApplyWidgetStyle to wxWindowGTK
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 19 Jun 2004 17:49:26 +0000 (17:49 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 19 Jun 2004 17:49:26 +0000 (17:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/control.h
include/wx/gtk/window.h
include/wx/gtk1/control.h
include/wx/gtk1/window.h
src/gtk/control.cpp
src/gtk/window.cpp
src/gtk1/control.cpp
src/gtk1/window.cpp

index c7954c415e2b2c3b2a9adbdd2c20b5ac207f93a7..5d444e9b453d002d4907dbb68d64437963dd78f0 100644 (file)
@@ -56,11 +56,6 @@ public:
     virtual wxVisualAttributes GetDefaultAttributes() const;
 
 protected:
-    virtual void ApplyWidgetStyle(bool forceStyle = false);
-    // helper function to ease native widgets wrapping, called by 
-    // ApplyWidgetStyle -- override this, not ApplyWidgetStyle
-    virtual void DoApplyWidgetStyle(GtkRcStyle *style);
-
     virtual wxSize DoGetBestSize() const;
     void PostCreation(const wxSize& size);
     void PostSetLabel();
index 0a40f286cbf072103bf001d6e7725764e1d7fb1b..a2e8a9068b7be7598d8446f7d0c909a8f91225f4 100644 (file)
@@ -264,6 +264,10 @@ protected:
 
     // Overridden in many GTK widgets who have to handle subwidgets
     virtual void ApplyWidgetStyle(bool forceStyle = false);
+    
+    // helper function to ease native widgets wrapping, called by 
+    // ApplyWidgetStyle -- override this, not ApplyWidgetStyle
+    virtual void DoApplyWidgetStyle(GtkRcStyle *style);
 
 private:
     DECLARE_DYNAMIC_CLASS(wxWindowGTK)
index c7954c415e2b2c3b2a9adbdd2c20b5ac207f93a7..5d444e9b453d002d4907dbb68d64437963dd78f0 100644 (file)
@@ -56,11 +56,6 @@ public:
     virtual wxVisualAttributes GetDefaultAttributes() const;
 
 protected:
-    virtual void ApplyWidgetStyle(bool forceStyle = false);
-    // helper function to ease native widgets wrapping, called by 
-    // ApplyWidgetStyle -- override this, not ApplyWidgetStyle
-    virtual void DoApplyWidgetStyle(GtkRcStyle *style);
-
     virtual wxSize DoGetBestSize() const;
     void PostCreation(const wxSize& size);
     void PostSetLabel();
index 0a40f286cbf072103bf001d6e7725764e1d7fb1b..a2e8a9068b7be7598d8446f7d0c909a8f91225f4 100644 (file)
@@ -264,6 +264,10 @@ protected:
 
     // Overridden in many GTK widgets who have to handle subwidgets
     virtual void ApplyWidgetStyle(bool forceStyle = false);
+    
+    // helper function to ease native widgets wrapping, called by 
+    // ApplyWidgetStyle -- override this, not ApplyWidgetStyle
+    virtual void DoApplyWidgetStyle(GtkRcStyle *style);
 
 private:
     DECLARE_DYNAMIC_CLASS(wxWindowGTK)
index ed8b2147e84540abf8e75c377a131aeae5eecb02..c12735e39bd39badd3edd69f32eb8222f937078a 100644 (file)
@@ -278,21 +278,5 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* (*widget_new)(GtkAdjustm
     return attr;
 }
 
-void wxControl::ApplyWidgetStyle(bool forceStyle)
-{
-    GtkRcStyle *style = CreateWidgetStyle(forceStyle);
-    if ( style )
-    {
-        DoApplyWidgetStyle(style);
-        gtk_rc_style_unref(style);
-    }
-}
-
-void wxControl::DoApplyWidgetStyle(GtkRcStyle *style)
-{
-    gtk_widget_modify_style(m_widget, style);
-}
-
-
 #endif // wxUSE_CONTROLS
 
index 8e5f4bdd3b1400386a08e040eb32fc9cd1206748..d0e909e82e84bdc3097940531c9b405838b51aa8 100644 (file)
@@ -4090,15 +4090,21 @@ void wxWindowGTK::ApplyWidgetStyle(bool forceStyle)
     GtkRcStyle *style = CreateWidgetStyle(forceStyle);
     if ( style )
     {
-        if (m_wxwindow)
-            // should we also do m_widget in this case?
-            gtk_widget_modify_style(m_wxwindow, style);
-        else
-            gtk_widget_modify_style(m_widget, style);
+        DoApplyWidgetStyle(style);
         gtk_rc_style_unref(style);
     }
 }
 
+void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style)
+{
+    if (m_wxwindow)
+        // should we also do m_widget in this case?
+        gtk_widget_modify_style(m_wxwindow, style);
+    else
+        gtk_widget_modify_style(m_widget, style);
+}
+
+
 //-----------------------------------------------------------------------------
 // Pop-up menu stuff
 //-----------------------------------------------------------------------------
index ed8b2147e84540abf8e75c377a131aeae5eecb02..c12735e39bd39badd3edd69f32eb8222f937078a 100644 (file)
@@ -278,21 +278,5 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* (*widget_new)(GtkAdjustm
     return attr;
 }
 
-void wxControl::ApplyWidgetStyle(bool forceStyle)
-{
-    GtkRcStyle *style = CreateWidgetStyle(forceStyle);
-    if ( style )
-    {
-        DoApplyWidgetStyle(style);
-        gtk_rc_style_unref(style);
-    }
-}
-
-void wxControl::DoApplyWidgetStyle(GtkRcStyle *style)
-{
-    gtk_widget_modify_style(m_widget, style);
-}
-
-
 #endif // wxUSE_CONTROLS
 
index 8e5f4bdd3b1400386a08e040eb32fc9cd1206748..d0e909e82e84bdc3097940531c9b405838b51aa8 100644 (file)
@@ -4090,15 +4090,21 @@ void wxWindowGTK::ApplyWidgetStyle(bool forceStyle)
     GtkRcStyle *style = CreateWidgetStyle(forceStyle);
     if ( style )
     {
-        if (m_wxwindow)
-            // should we also do m_widget in this case?
-            gtk_widget_modify_style(m_wxwindow, style);
-        else
-            gtk_widget_modify_style(m_widget, style);
+        DoApplyWidgetStyle(style);
         gtk_rc_style_unref(style);
     }
 }
 
+void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style)
+{
+    if (m_wxwindow)
+        // should we also do m_widget in this case?
+        gtk_widget_modify_style(m_wxwindow, style);
+    else
+        gtk_widget_modify_style(m_widget, style);
+}
+
+
 //-----------------------------------------------------------------------------
 // Pop-up menu stuff
 //-----------------------------------------------------------------------------