1. added flags to splitter drawing functions and replaced

GetSplitterBorderAndSash() with GetSplitterParams()
2. added support for "hot tracking" to wxSplitterWindow
3. added GTK2 support for the splitter to GTK renderer


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-08-01 13:38:43 +00:00
parent 4f6e1dac12
commit af99040c70
8 changed files with 254 additions and 82 deletions

View File

@@ -59,16 +59,18 @@ public:
virtual void DrawSplitterBorder(wxWindow *win,
wxDC& dc,
const wxRect& rect);
const wxRect& rect,
int flags = 0);
virtual void DrawSplitterSash(wxWindow *win,
wxDC& dc,
const wxSize& size,
wxCoord position,
wxOrientation orient);
wxOrientation orient,
int flags = 0);
virtual wxPoint GetSplitterSashAndBorder(const wxWindow *win);
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
protected:
@@ -197,17 +199,32 @@ wxRendererGeneric::DrawTreeItemButton(wxWindow * WXUNUSED(win),
// sash drawing
// ----------------------------------------------------------------------------
wxPoint
wxRendererGeneric::GetSplitterSashAndBorder(const wxWindow *win)
wxSplitterRenderParams
wxRendererGeneric::GetSplitterParams(const wxWindow *win)
{
// see below
return win->HasFlag(wxSP_3D) ? wxPoint(7, 2) : wxPoint(3, 0);
wxCoord sashWidth,
border;
if ( win->HasFlag(wxSP_3D) )
{
sashWidth = 7;
border = 3;
}
else // no 3D effect
{
sashWidth = 2;
border = 0;
}
return wxSplitterRenderParams(sashWidth, border, false);
}
void
wxRendererGeneric::DrawSplitterBorder(wxWindow *win,
wxDC& dc,
const wxRect& rectOrig)
const wxRect& rectOrig,
int WXUNUSED(falgs))
{
if ( win->HasFlag(wxSP_3D) )
{
@@ -222,7 +239,8 @@ wxRendererGeneric::DrawSplitterSash(wxWindow *win,
wxDC& dcReal,
const wxSize& sizeReal,
wxCoord position,
wxOrientation orient)
wxOrientation orient,
int WXUNUSED(flags))
{
// to avoid duplicating the same code for horizontal and vertical sashes,
// simply mirror the DC instead if needed (i.e. if horz splitter)