]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/static.cpp
more wxFD_XXX renamings (patch 1488371)
[wxWidgets.git] / samples / widgets / static.cpp
index 496284b85c41d663e93b379418c4b27b422beeae..05c13669092853523c59821707015315528d1710 100644 (file)
@@ -51,7 +51,7 @@
 // control ids
 enum
 {
 // control ids
 enum
 {
-    StaticPage_Reset = 100,
+    StaticPage_Reset = wxID_HIGHEST,
     StaticPage_BoxText,
     StaticPage_LabelText
 };
     StaticPage_BoxText,
     StaticPage_LabelText
 };
@@ -139,10 +139,11 @@ END_EVENT_TABLE()
 class StaticWidgetsPage : public WidgetsPage
 {
 public:
 class StaticWidgetsPage : public WidgetsPage
 {
 public:
-    StaticWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+    StaticWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
     virtual ~StaticWidgetsPage(){};
 
     virtual wxControl *GetWidget() const { return m_statText; }
     virtual ~StaticWidgetsPage(){};
 
     virtual wxControl *GetWidget() const { return m_statText; }
+    virtual void RecreateWidget() { CreateStatic(); }
 
 protected:
     // event handlers
 
 protected:
     // event handlers
@@ -203,14 +204,14 @@ END_EVENT_TABLE()
 // implementation
 // ============================================================================
 
 // implementation
 // ============================================================================
 
-IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, _T("Static"));
+IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, _T("Static"),
+                       (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+                       );
 
 
-StaticWidgetsPage::StaticWidgetsPage(wxBookCtrlBase *book,
+StaticWidgetsPage::StaticWidgetsPage(WidgetsBookCtrl *book,
                                      wxImageList *imaglist)
                                      wxImageList *imaglist)
-                  : WidgetsPage(book)
+                  : WidgetsPage(book, imaglist, statbox_xpm)
 {
 {
-    imaglist->Add(wxBitmap(statbox_xpm));
-
     // init everything
     m_chkVert =
     m_chkAutoResize = (wxCheckBox *)NULL;
     // init everything
     m_chkVert =
     m_chkAutoResize = (wxCheckBox *)NULL;
@@ -333,7 +334,7 @@ void StaticWidgetsPage::CreateStatic()
     }
 
     int flagsBox = 0,
     }
 
     int flagsBox = 0,
-        flagsText = 0;
+        flagsText = ms_defaultFlags;
 
     if ( !m_chkAutoResize->GetValue() )
     {
 
     if ( !m_chkAutoResize->GetValue() )
     {