]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/samples/fl/fl_demo2.cpp
define _HPUX_SOURCE under HP-UX, otherwise many things are not defined in standard...
[wxWidgets.git] / contrib / samples / fl / fl_demo2.cpp
index 23d3ed29ab5dbada756720191682f3414f5d7a1d..3941e3581b909fdabff30eb035ed6bfbb1e2beb8 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "fl_demo2.h"
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -96,7 +92,9 @@ bool MyApp::OnInit(void)
     menu_bar->Append(file_menu,   _("&File"));
     menu_bar->Append(active_menu, _("Active &Layout"));
 
     menu_bar->Append(file_menu,   _("&File"));
     menu_bar->Append(active_menu, _("Active &Layout"));
 
+#if wxUSE_STATUSBAR
     frame->CreateStatusBar(3);
     frame->CreateStatusBar(3);
+#endif // wxUSE_STATUSBAR
 
     frame->SetMenuBar(menu_bar);
 
 
     frame->SetMenuBar(menu_bar);
 
@@ -203,7 +201,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h
 
     // Create all layouts
     for( i = 0; i != MAX_LAYOUTS; ++i )
 
     // Create all layouts
     for( i = 0; i != MAX_LAYOUTS; ++i )
-    {  
+    {
         CreateLayout( i );
     }
     // hide others
         CreateLayout( i );
     }
     // hide others
@@ -489,17 +487,17 @@ wxTreeCtrl* MyFrame::CreateTreeCtrl( const wxString& label )
 {
     wxTreeCtrl* pTree = new wxTreeCtrl( mpInternalFrm, wxID_ANY );
 
 {
     wxTreeCtrl* pTree = new wxTreeCtrl( mpInternalFrm, wxID_ANY );
 
-    const wxTreeItemId rootid = pTree->AppendItem( (long)0, label, 0);
+    const wxTreeItemId rootid = pTree->AddRoot(label);
 
 
-    if ( label[0] != 'X' )
+    if ( label.StartsWith(_T("X")) )
     {
     {
-        pTree->AppendItem(rootid, _("Leaf1"), 0);
-        pTree->AppendItem(rootid, _("Leaf2"), 0);
+        pTree->AppendItem(rootid, _("Scully"));
+        pTree->AppendItem(rootid, _("Mulder"));
     }
     else
     {
     }
     else
     {
-        pTree->AppendItem(rootid, _("Scully"), 0);
-        pTree->AppendItem(rootid, _("Mulder"), 0);
+        pTree->AppendItem(rootid, _("Leaf1"));
+        pTree->AppendItem(rootid, _("Leaf2"));
     }
 
     return pTree;
     }
 
     return pTree;
@@ -620,7 +618,7 @@ wxWindow* MyFrame::CreateDevLayout( wxFrameLayout& layout, wxWindow* pParent )
 {
     bool isNested = (pParent != mpInternalFrm);
 
 {
     bool isNested = (pParent != mpInternalFrm);
 
-    // check if we're craeting nested layout
+    // check if we're creating nested layout
     if ( isNested )
     {
         layout.mBorderPen.SetColour( 128,255,128 );
     if ( isNested )
     {
         layout.mBorderPen.SetColour( 128,255,128 );
@@ -671,7 +669,7 @@ wxWindow* MyFrame::CreateDevLayout( wxFrameLayout& layout, wxWindow* pParent )
     pClassView->AppendItem( rootId, _("serializer-classes (grabbed at run-time)"),    0 );
 
     // now create "output" window
     pClassView->AppendItem( rootId, _("serializer-classes (grabbed at run-time)"),    0 );
 
     // now create "output" window
-    wxNotebook*        pTabbedArea = new wxNotebook(pParent, wxID_ANY);
+    wxNotebook* pTabbedArea = new wxNotebook(pParent, wxID_ANY);
     // SEB: originally here was a wxpp (wxWorkshop) class used
     //    wxPaggedWindow* pTabbedArea = new wxPaggedWindow();
     //    pTabbedArea->Create( pParent, wxID_ANY );
     // SEB: originally here was a wxpp (wxWorkshop) class used
     //    wxPaggedWindow* pTabbedArea = new wxPaggedWindow();
     //    pTabbedArea->Create( pParent, wxID_ANY );