Add support for icons in wxAUI panes title bars.

Add wxAuiPaneInfo::Icon() method and shows its use in the sample.

Closes #12856.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-01-12 13:39:36 +00:00
parent 17731af57d
commit 4254f67216
6 changed files with 49 additions and 2 deletions

View File

@@ -916,9 +916,19 @@ MyFrame::MyFrame(wxWindow* parent,
CloseButton(true).MaximizeButton(true));
wxWindow* wnd10 = CreateTextCtrl(wxT("This pane will prompt the user before hiding."));
// Give this pane an icon, too, just for testing.
int iconSize = m_mgr.GetArtProvider()->GetMetric(wxAUI_DOCKART_CAPTION_SIZE);
// Make it even to use 16 pixel icons with default 17 caption height.
iconSize &= ~1;
m_mgr.AddPane(wnd10, wxAuiPaneInfo().
Name(wxT("test10")).Caption(wxT("Text Pane with Hide Prompt")).
Bottom().Layer(1).Position(1));
Bottom().Layer(1).Position(1).
Icon(wxArtProvider::GetBitmap(wxART_WARNING,
wxART_OTHER,
wxSize(iconSize, iconSize))));
m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("test11")).Caption(wxT("Fixed Pane")).