]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/renderer.cpp
fixed wxSTC compilation with MSVC
[wxWidgets.git] / src / gtk / renderer.cpp
index 3091e744bd50757e2545c94bb4f263cecb8327c9..2c16c49654e11a333e0c9771033f915235f8efe0 100644 (file)
 #include "wx/dc.h"
 #include "wx/renderer.h"
 
+#ifdef __WXGTK20__
+    #include "wx/settings.h"
+#endif // GTK 2.0
+
 // ----------------------------------------------------------------------------
 // wxRendererGTK: our wxRendererNative implementation
 // ----------------------------------------------------------------------------
@@ -55,6 +59,15 @@ public:
                                     int flags = 0);
 #endif // GTK 2.0
 
+    // draw a (vertical) sash
+    //
+    // VZ: doesn't work -- nothing is shown on screen, why?
+#if 0
+    virtual void DrawSplitterSash(wxWindow *win,
+                                  wxDC& dc,
+                                  const wxSize& size,
+                                  wxCoord position);
+#endif // 0
 };
 
 // ============================================================================
@@ -97,7 +110,8 @@ void
 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];
 
@@ -128,4 +142,44 @@ wxRendererGTK::DrawTreeItemButton(wxWindow* WXUNUSED(win),
 
 #endif // GTK 2.0
 
+#if 0
+
+// draw a (vertical) sash
+void
+wxRendererGTK::DrawSplitterSash(wxWindow *win,
+                                wxDC& dc,
+                                const wxSize& size,
+                                wxCoord position)
+{
+    if ( !win->m_wxwindow->window )
+    {
+        // VZ: this happens on startup -- why?
+        return;
+    }
+
+    gtk_paint_vline
+    (
+        win->m_wxwindow->style,
+        win->m_wxwindow->window,
+        GTK_STATE_NORMAL,
+        (GdkRectangle *)NULL,
+        win->m_wxwindow,
+        (char *)"vpaned", // const_cast
+        0, size.y, position + 3
+    );
+
+    gtk_paint_box
+    (
+        win->m_wxwindow->style,
+        win->m_wxwindow->window,
+        GTK_STATE_NORMAL,
+        GTK_SHADOW_OUT,
+        (GdkRectangle *)NULL,
+        win->m_wxwindow,
+        (char *)"paned", // const_cast
+        position, 5, 10, 10
+    );
+}
+
+#endif // 0