]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/renderer.cpp
moved XML classes to the core
[wxWidgets.git] / src / gtk1 / renderer.cpp
index 77eee2e2fb98e9a22ed00e45faf9b0f70374d092..d9b057e69352e80f58fd1ebdf914e36d0f758890 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 // Name:        gtk/renderer.cpp
 ///////////////////////////////////////////////////////////////////////////////
 // Name:        gtk/renderer.cpp
-// Purpose:     implementation of wxRendererBase for wxGTK
+// Purpose:     implementation of wxRendererNative for wxGTK
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     20.07.2003
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     20.07.2003
 #include <gtk/gtk.h>
 #include "wx/gtk/win_gtk.h"
 
 #include <gtk/gtk.h>
 #include "wx/gtk/win_gtk.h"
 
+#include "wx/window.h"
+#include "wx/dc.h"
 #include "wx/renderer.h"
 
 #include "wx/renderer.h"
 
+#ifdef __WXGTK20__
+    #include "wx/settings.h"
+#endif // GTK 2.0
+
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
-// wxRendererGTK: our wxRendererBase implementation
+// wxRendererGTK: our wxRendererNative implementation
 // ----------------------------------------------------------------------------
 
 // ----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxRendererGTK : public wxDelegateRendererBase
+class WXDLLEXPORT wxRendererGTK : public wxDelegateRendererNative
 {
 public:
     // draw the header control button (used by wxListCtrl)
 {
 public:
     // draw the header control button (used by wxListCtrl)
@@ -60,7 +66,7 @@ public:
 // ============================================================================
 
 /* static */
 // ============================================================================
 
 /* static */
-wxRendererNative& wxRendererGTK::Get()
+wxRendererNative& wxRendererNative::Get()
 {
     static wxRendererGTK s_rendererGTK;
 
 {
     static wxRendererGTK s_rendererGTK;
 
@@ -79,9 +85,10 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win,
         GTK_PIZZA(win->m_wxwindow)->bin_window,
         flags & wxCONTROL_DISABLED ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL,
         GTK_SHADOW_OUT,
         GTK_PIZZA(win->m_wxwindow)->bin_window,
         flags & wxCONTROL_DISABLED ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL,
         GTK_SHADOW_OUT,
-        (GdkRectangle*) NULL, m_wxwindow,
+        (GdkRectangle*) NULL,
+        win->m_wxwindow,
         (char *)"button", // const_cast
         (char *)"button", // const_cast
-        dc.XLOG2DEV(rect.x) - 1, rect.y - 1, rect.width + 2, rect.h + 2
+        dc.XLOG2DEV(rect.x) - 1, rect.y - 1, rect.width + 2, rect.height + 2
     );
 }
 
     );
 }
 
@@ -91,9 +98,11 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win,
 //
 // TODO: isn't there a GTK function to draw it?
 void
 //
 // TODO: isn't there a GTK function to draw it?
 void
-wxRendererGTK::DrawTreeItemButton(wxDC& dc, const wxRect& rect, int flags)
+wxRendererGTK::DrawTreeItemButton(wxWindow* WXUNUSED(win),
+                                  wxDC& dc, const wxRect& rect, int flags)
 {
 {
-    dc.SetBrush(*m_hilightBrush);
+    dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT),
+                        wxSOLID));
     dc.SetPen(*wxBLACK_PEN);
     wxPoint button[3];
 
     dc.SetPen(*wxBLACK_PEN);
     wxPoint button[3];