// height if available, or a generic height based on the window's font.
virtual int GetHeaderButtonHeight(wxWindow *win) = 0;
+ // Returns the margin on left and right sides of header button's label
+ virtual int GetHeaderButtonMargin(wxWindow *win) = 0;
+
// draw the expanded/collapsed icon for a tree control item
virtual void DrawTreeItemButton(wxWindow *win,
virtual int GetHeaderButtonHeight(wxWindow *win)
{ return m_rendererNative.GetHeaderButtonHeight(win); }
+ virtual int GetHeaderButtonMargin(wxWindow *win)
+ { return m_rendererNative.GetHeaderButtonMargin(win); }
+
virtual void DrawTreeItemButton(wxWindow *win,
wxDC& dc,
const wxRect& rect,
virtual int GetHeaderButtonHeight(wxWindow *win);
+ virtual int GetHeaderButtonMargin(wxWindow *win);
+
virtual void DrawTreeItemButton(wxWindow *win, wxDC& dc,
const wxRect& rect, int flags = 0);
*/
virtual int GetHeaderButtonHeight(wxWindow* win) = 0;
+ /**
+ Returns the horizontal margin on the left and right sides of header
+ button's label.
+
+ @since 2.9.2
+ */
+ virtual int GetHeaderButtonMargin(wxWindow *win) = 0;
+
/**
Get the splitter parameters, see wxSplitterRenderParams.
The @a win parameter should be a wxSplitterWindow.
virtual int GetHeaderButtonHeight(wxWindow *win);
+ virtual int GetHeaderButtonMargin(wxWindow *win);
+
virtual void DrawTreeItemButton(wxWindow *win,
wxDC& dc,
const wxRect& rect,
return h + d + 2 * HEADER_OFFSET_Y + EXTRA_HEIGHT;
}
+int wxRendererGeneric::GetHeaderButtonMargin(wxWindow *WXUNUSED(win))
+{
+ return 5;
+}
+
// draw the plus or minus sign
void
virtual int GetHeaderButtonHeight(wxWindow *win);
+ virtual int GetHeaderButtonMargin(wxWindow *win);
+
// draw the expanded/collapsed icon for a tree control item
virtual void DrawTreeItemButton(wxWindow *win,
return req.height;
}
+int wxRendererGTK::GetHeaderButtonMargin(wxWindow *WXUNUSED(win))
+{
+ wxFAIL_MSG( "GetHeaderButtonMargin() not implemented" );
+ return -1;
+}
+
// draw a ">" or "v" button
void
virtual int GetHeaderButtonHeight(wxWindow *win);
+ virtual int GetHeaderButtonMargin(wxWindow *win);
+
private:
// wrapper of DrawFrameControl()
void DoDrawFrameControl(UINT type,
return Header_Layout(hwndHeader, &hdl) ? wp.cy : DEFAULT_HEIGHT;
}
+int wxRendererMSW::GetHeaderButtonMargin(wxWindow *WXUNUSED(win))
+{
+ return 10;
+}
+
// Uses the theme to draw the border and fill for something like a wxTextCtrl
void wxRendererMSW::DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
{
virtual int GetHeaderButtonHeight(wxWindow *win);
+ virtual int GetHeaderButtonMargin(wxWindow *win);
+
// draw the expanded/collapsed icon for a tree control item
virtual void DrawTreeItemButton( wxWindow *win,
wxDC& dc,
return -1;
}
+int wxRendererMac::GetHeaderButtonMargin(wxWindow *WXUNUSED(win))
+{
+ wxFAIL_MSG( "GetHeaderButtonMargin() not implemented" );
+ return -1;
+}
+
void wxRendererMac::DrawTreeItemButton( wxWindow *win,
wxDC& dc,
const wxRect& rect,