]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/widgets.h
Do a little less anti-alias so it looks better on dark backgrounds
[wxWidgets.git] / samples / widgets / widgets.h
index 47ffc41c9b9065b262e72f218861aa4abcfcf12b..30160829e8183a4aef6ce844c9b0d1991972a1f4 100644 (file)
@@ -13,7 +13,7 @@
 #define _WX_SAMPLE_WIDGETS_H_
 
 class WXDLLEXPORT wxCheckBox;
-class WXDLLEXPORT wxNotebook;
+class WXDLLEXPORT wxBookCtrl;
 class WXDLLEXPORT wxSizer;
 class WXDLLEXPORT wxTextCtrl;
 
@@ -24,18 +24,27 @@ class WidgetsPageInfo;
 // all source files use wxImageList
 #include "wx/imaglist.h"
 
+#if wxUSE_LOG && !defined(__SMARTPHONE__)
+    #define USE_LOG 1
+#else
+    #define USE_LOG 0
+#endif
+
 // ----------------------------------------------------------------------------
-// WidgetsPage: a notebook page demonstrating some widget
+// WidgetsPage: a book page demonstrating some widget
 // ----------------------------------------------------------------------------
 
 class WidgetsPage : public wxPanel
 {
 public:
-    WidgetsPage(wxNotebook *notebook);
+    WidgetsPage(wxBookCtrl *book);
 
     // return the control shown by this page
     virtual wxControl *GetWidget() const = 0;
 
+    // some pages show 2 controls, in this case override this one as well
+    virtual wxControl *GetWidget2() const { return NULL; }
+
 protected:
     // several helper functions for page creation
 
@@ -74,7 +83,7 @@ public:
 class WidgetsPageInfo
 {
 public:
-    typedef WidgetsPage *(*Constructor)(wxNotebook *notebook,
+    typedef WidgetsPage *(*Constructor)(wxBookCtrl *book,
                                         wxImageList *imaglist);
 
     // our ctor
@@ -108,9 +117,9 @@ private:
 
 // and this one must be inserted somewhere in the source file
 #define IMPLEMENT_WIDGETS_PAGE(classname, label)                            \
-    WidgetsPage *wxCtorFor##classname(wxNotebook *notebook,                 \
+    WidgetsPage *wxCtorFor##classname(wxBookCtrl *book,                     \
                                       wxImageList *imaglist)                \
-        { return new classname(notebook, imaglist); }                       \
+        { return new classname(book, imaglist); }                           \
     WidgetsPageInfo classname::                                             \
         ms_info##classname(wxCtorFor##classname, label)