X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5dcae09e6c207688b41c8b744764d32b7b39a46..814028444d682b23af3809227cd485f4bebc1286:/samples/aui/auidemo.cpp?ds=sidebyside diff --git a/samples/aui/auidemo.cpp b/samples/aui/auidemo.cpp index faea051a5c..9654e9ae49 100644 --- a/samples/aui/auidemo.cpp +++ b/samples/aui/auidemo.cpp @@ -570,7 +570,6 @@ bool MyApp::OnInit() wxT("wxAUI Sample Application"), wxDefaultPosition, wxSize(800, 600)); - SetTopWindow(frame); frame->Show(); return true; @@ -799,7 +798,7 @@ MyFrame::MyFrame(wxWindow* parent, tb2->SetToolBitmapSize(wxSize(16,16)); wxBitmap tb2_bmp1 = wxArtProvider::GetBitmap(wxART_QUESTION, wxART_OTHER, wxSize(16,16)); - tb2->AddTool(ID_SampleItem+6, wxT("Test"), tb2_bmp1); + tb2->AddTool(ID_SampleItem+6, wxT("Disabled"), tb2_bmp1); tb2->AddTool(ID_SampleItem+7, wxT("Test"), tb2_bmp1); tb2->AddTool(ID_SampleItem+8, wxT("Test"), tb2_bmp1); tb2->AddTool(ID_SampleItem+9, wxT("Test"), tb2_bmp1); @@ -812,6 +811,7 @@ MyFrame::MyFrame(wxWindow* parent, tb2->AddTool(ID_SampleItem+14, wxT("Test"), tb2_bmp1); tb2->AddTool(ID_SampleItem+15, wxT("Test"), tb2_bmp1); tb2->SetCustomOverflowItems(prepend_items, append_items); + tb2->EnableTool(ID_SampleItem+6, false); tb2->Realize(); @@ -917,9 +917,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")). @@ -1539,7 +1549,7 @@ wxTextCtrl* MyFrame::CreateTextCtrl(const wxString& ctrl_text) static int n = 0; wxString text; - if (ctrl_text.Length() > 0) + if ( !ctrl_text.empty() ) text = ctrl_text; else text.Printf(wxT("This is text box %d"), ++n); @@ -1634,6 +1644,7 @@ wxAuiNotebook* MyFrame::CreateNotebook() wxBitmap page_bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16)); ctrl->AddPage(CreateHTMLCtrl(ctrl), wxT("Welcome to wxAUI") , false, page_bmp); + ctrl->SetPageToolTip(0, "Welcome to wxAUI (this is a page tooltip)"); wxPanel *panel = new wxPanel( ctrl, wxID_ANY ); wxFlexGridSizer *flex = new wxFlexGridSizer( 4, 2, 0, 0 ); @@ -1672,6 +1683,8 @@ wxAuiNotebook* MyFrame::CreateNotebook() ctrl->AddPage( new wxTextCtrl( ctrl, wxID_ANY, wxT("Some more text"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxNO_BORDER) , wxT("wxTextCtrl 7 (longer title)") ); + ctrl->SetPageToolTip(ctrl->GetPageCount()-1, + "wxTextCtrl 7: and the tooltip message can be even longer!"); ctrl->AddPage( new wxTextCtrl( ctrl, wxID_ANY, wxT("Some more text"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxNO_BORDER) , wxT("wxTextCtrl 8") ); @@ -1695,7 +1708,7 @@ wxString MyFrame::GetIntroText() "
  • Native, dockable floating frames
  • " "
  • Perspective saving and loading
  • " "
  • Native toolbars incorporating real-time, "spring-loaded" dragging
  • " - "
  • Customizable floating/docking behavior
  • " + "
  • Customizable floating/docking behaviour
  • " "
  • Completely customizable look-and-feel
  • " "
  • Optional transparent window effects (while dragging or docking)
  • " "
  • Splittable notebook control
  • "