Add wxRendererNative::DrawCollapseButton() for use in collapsible pane like controls.

Add a new method that should be used for controls like wxCollapsiblePane.

It is implemented natively for wxMSW (Windows Vista+) and provides a generic fallback for other ports and WinXP.
This commit is contained in:
Tobias Taschner
2015-09-18 22:10:58 +02:00
parent 2e424fcf38
commit ef5ff89008
5 changed files with 172 additions and 1 deletions

View File

@@ -246,6 +246,12 @@ private:
wxRect(wxPoint(x2, y), sizeCheck), m_flags);
y += lineHeight + sizeCheck.y;
dc.DrawText("DrawCollapseButton()", x1, y);
const wxSize sizeCollapse = renderer.GetCollapseButtonSize(this, dc);
renderer.DrawCollapseButton(this, dc,
wxRect(wxPoint(x2, y), sizeCollapse), m_flags);
y += lineHeight + sizeCollapse.y;
dc.DrawText("DrawTreeItemButton()", x1, y);
renderer.DrawTreeItemButton(this, dc,
wxRect(x2, y, 20, 20), m_flags);