]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/aui/auidemo.cpp
Always link with expat in monolithic build.
[wxWidgets.git] / samples / aui / auidemo.cpp
index faea051a5c5428d7c4cfa89790b0ab2078fbda70..08d5d136d981e8bd6d6b0ddd2b05628743d06c37 100644 (file)
@@ -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);
@@ -1695,7 +1705,7 @@ wxString MyFrame::GetIntroText()
         "<li>Native, dockable floating frames</li>"
         "<li>Perspective saving and loading</li>"
         "<li>Native toolbars incorporating real-time, &quot;spring-loaded&quot; dragging</li>"
-        "<li>Customizable floating/docking behavior</li>"
+        "<li>Customizable floating/docking behaviour</li>"
         "<li>Completely customizable look-and-feel</li>"
         "<li>Optional transparent window effects (while dragging or docking)</li>"
         "<li>Splittable notebook control</li>"