]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/radiobox.cpp
Map between int page ids and page pointers using hashes so that it works when
[wxWidgets.git] / samples / widgets / radiobox.cpp
index 91f5cc9fa9e38b256105ad99c258c73380c51e43..088da04a98c271e6cb726df049bb800976400a81 100644 (file)
@@ -51,7 +51,7 @@
 // control ids
 enum
 {
-    RadioPage_Reset = 100,
+    RadioPage_Reset = wxID_HIGHEST,
     RadioPage_Update,
     RadioPage_Selection,
     RadioPage_Label,
@@ -83,7 +83,7 @@ static const int TEST_BUTTON = 1;
 class RadioWidgetsPage : public WidgetsPage
 {
 public:
-    RadioWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+    RadioWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
     virtual ~RadioWidgetsPage(){};
 
     virtual wxControl *GetWidget() const { return m_radio; }
@@ -173,9 +173,17 @@ END_EVENT_TABLE()
 // implementation
 // ============================================================================
 
-IMPLEMENT_WIDGETS_PAGE(RadioWidgetsPage, _T("Radio"));
+#if defined(__WXUNIVERSAL__)
+    #define FAMILY_CTRLS UNIVERSAL_CTRLS
+#else
+    #define FAMILY_CTRLS NATIVE_CTRLS
+#endif
+
+IMPLEMENT_WIDGETS_PAGE(RadioWidgetsPage, _T("Radio"),
+                       FAMILY_CTRLS | WITH_ITEMS_CTRLS
+                       );
 
-RadioWidgetsPage::RadioWidgetsPage(wxBookCtrlBase *book,
+RadioWidgetsPage::RadioWidgetsPage(WidgetsBookCtrl *book,
                                    wxImageList *imaglist)
                   : WidgetsPage(book)
 {