From: Vadim Zeitlin Date: Tue, 22 Jul 2003 23:35:20 +0000 (+0000) Subject: failed attempts to implement native GTK look for the splitter X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/95155e752c80e957bc2df39c44dce2853f7ce1f2 failed attempts to implement native GTK look for the splitter git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index d9b057e693..2c16c49654 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -59,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 }; // ============================================================================ @@ -133,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 diff --git a/src/gtk1/renderer.cpp b/src/gtk1/renderer.cpp index d9b057e693..2c16c49654 100644 --- a/src/gtk1/renderer.cpp +++ b/src/gtk1/renderer.cpp @@ -59,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 }; // ============================================================================ @@ -133,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