Added wxRendererNative::DrawTitleBarBitmap().
This is currently only implemented for wxMSW as there is no advantage to use a generic implementation compared to using wxArtProvider directly under the other ports. But for MSW this allows to have perfectly natively looking titlebar-like buttons. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -193,6 +193,27 @@ private:
|
||||
renderer.DrawTreeItemButton(this, dc,
|
||||
wxRect(x2, y, 20, 20), m_flags);
|
||||
y += lineHeight + 20;
|
||||
|
||||
#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP
|
||||
dc.DrawText("DrawTitleBarBitmap()", x1, y);
|
||||
wxRect rBtn(x2, y, 21, 21);
|
||||
renderer.DrawTitleBarBitmap(this, dc, rBtn,
|
||||
wxTITLEBAR_BUTTON_HELP, m_flags);
|
||||
rBtn.x += 2*rBtn.width;
|
||||
renderer.DrawTitleBarBitmap(this, dc, rBtn,
|
||||
wxTITLEBAR_BUTTON_ICONIZE, m_flags);
|
||||
rBtn.x += 2*rBtn.width;
|
||||
renderer.DrawTitleBarBitmap(this, dc, rBtn,
|
||||
wxTITLEBAR_BUTTON_RESTORE, m_flags);
|
||||
rBtn.x += 2*rBtn.width;
|
||||
renderer.DrawTitleBarBitmap(this, dc, rBtn,
|
||||
wxTITLEBAR_BUTTON_MAXIMIZE, m_flags);
|
||||
rBtn.x += 2*rBtn.width;
|
||||
renderer.DrawTitleBarBitmap(this, dc, rBtn,
|
||||
wxTITLEBAR_BUTTON_CLOSE, m_flags);
|
||||
|
||||
y += lineHeight + rBtn.height;
|
||||
#endif // wxHAS_DRAW_TITLE_BAR_BITMAP
|
||||
}
|
||||
|
||||
int m_flags;
|
||||
|
Reference in New Issue
Block a user