]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/proplist/proplist.cpp
Removed accidentally left in debug code.
[wxWidgets.git] / samples / proplist / proplist.cpp
index 85bbfc9298dc405461b6e297352e7e283c190c1d..af8c22b74e377bfe491f45a195ab99fa08f90834 100644 (file)
@@ -10,7 +10,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
-#pragma implementation "proplist.h"
+#pragma implementation "proplist_sample.h"
 #endif
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #endif
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wx.h"
 #endif
 
 #include "wx/wx.h"
 #endif
 
+
+#if !wxUSE_PROPSHEET
+#error Please set wxUSE_PROPSHEET to 1 in include/wx/msw/setup.h and recompile.
+#endif
+
 #include "proplist.h"
 
 IMPLEMENT_APP(MyApp)
 #include "proplist.h"
 
 IMPLEMENT_APP(MyApp)
@@ -158,10 +163,10 @@ void MyApp::PropertyListTest(bool useDialog)
   sheet->AddProperty(new wxProperty("bill", 25.0, "real", new wxRealListValidator(0.0, 100.0)));
   sheet->AddProperty(new wxProperty("julian", "one", "string"));
   sheet->AddProperty(new wxProperty("bitmap", "none", "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp")));
   sheet->AddProperty(new wxProperty("bill", 25.0, "real", new wxRealListValidator(0.0, 100.0)));
   sheet->AddProperty(new wxProperty("julian", "one", "string"));
   sheet->AddProperty(new wxProperty("bitmap", "none", "string", new wxFilenameListValidator("Select a bitmap file", "*.bmp")));
-  wxStringList *strings = new wxStringList("one", "two", "three", NULL);
+  wxStringList *strings = new wxStringList(wxT("one"), wxT("two"), wxT("three"), NULL);
   sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringListValidator(strings)));
 
   sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringListValidator(strings)));
 
-  wxStringList *strings2 = new wxStringList("earth", "fire", "wind", "water", NULL);
+  wxStringList *strings2 = new wxStringList(wxT("earth"), wxT("fire"), wxT("wind"), wxT("water"), NULL);
   sheet->AddProperty(new wxProperty("string list", strings2, "stringlist"));
 
   wxPropertyListView *view =
   sheet->AddProperty(new wxProperty("string list", strings2, "stringlist"));
 
   wxPropertyListView *view =
@@ -187,7 +192,7 @@ void MyApp::PropertyListTest(bool useDialog)
 
   if (useDialog)
   {
 
   if (useDialog)
   {
-    view->ShowView(sheet, propDialog);
+    view->ShowView(sheet, (wxPanel *)propDialog);
     propDialog->Centre(wxBOTH);
     propDialog->Show(TRUE);
   }
     propDialog->Centre(wxBOTH);
     propDialog->Show(TRUE);
   }
@@ -212,7 +217,7 @@ void MyApp::PropertyFormTest(bool useDialog)
   sheet->AddProperty(new wxProperty("tough choice", (bool)TRUE, "bool"));
   sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerFormValidator(-50, 50)));
   sheet->AddProperty(new wxProperty("julian", "one", "string"));
   sheet->AddProperty(new wxProperty("tough choice", (bool)TRUE, "bool"));
   sheet->AddProperty(new wxProperty("ian", (long)45, "integer", new wxIntegerFormValidator(-50, 50)));
   sheet->AddProperty(new wxProperty("julian", "one", "string"));
-  wxStringList *strings = new wxStringList("one", "two", "three", NULL);
+  wxStringList *strings = new wxStringList(wxT("one"), wxT("two"), wxT("three"), NULL);
   sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringFormValidator(strings)));
 
   wxPropertyFormView *view = new wxPropertyFormView(NULL);
   sheet->AddProperty(new wxProperty("constrained", "one", "string", new wxStringFormValidator(strings)));
 
   wxPropertyFormView *view = new wxPropertyFormView(NULL);
@@ -232,8 +237,18 @@ void MyApp::PropertyFormTest(bool useDialog)
     propFrame->Initialize();
     m_childWindow = propFrame;
   }
     propFrame->Initialize();
     m_childWindow = propFrame;
   }
-  
-  wxPanel *panel = propDialog ? propDialog : propFrame->GetPropertyPanel();
+
+  // BCC32 does not like ?:
+  wxWindow *panel ;
+  if ( propDialog )
+  {
+    panel = propDialog ;
+  }
+  else
+  {
+    panel = propFrame->GetPropertyPanel() ;
+  }
+    
   wxLayoutConstraints* c;
 
 #if 0
   wxLayoutConstraints* c;
 
 #if 0