X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61c083e7818114734695cb26aa006098a86e62c3..c687b303a5040da07009ea93504121aeec56682a:/samples/widgets/widgets.h diff --git a/samples/widgets/widgets.h b/samples/widgets/widgets.h index d20c536108..0fb6e05b58 100644 --- a/samples/widgets/widgets.h +++ b/samples/widgets/widgets.h @@ -13,7 +13,7 @@ #define _WX_SAMPLE_WIDGETS_H_ class WXDLLEXPORT wxCheckBox; -class WXDLLEXPORT wxBookCtrl; +class WXDLLEXPORT wxBookCtrlBase; class WXDLLEXPORT wxSizer; class WXDLLEXPORT wxTextCtrl; @@ -24,6 +24,12 @@ 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 book page demonstrating some widget // ---------------------------------------------------------------------------- @@ -31,11 +37,14 @@ class WidgetsPageInfo; class WidgetsPage : public wxPanel { public: - WidgetsPage(wxBookCtrl *book); + WidgetsPage(wxBookCtrlBase *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)(wxBookCtrl *book, + typedef WidgetsPage *(*Constructor)(wxBookCtrlBase *book, wxImageList *imaglist); // our ctor @@ -108,7 +117,7 @@ private: // and this one must be inserted somewhere in the source file #define IMPLEMENT_WIDGETS_PAGE(classname, label) \ - WidgetsPage *wxCtorFor##classname(wxBookCtrl *book, \ + WidgetsPage *wxCtorFor##classname(wxBookCtrlBase *book, \ wxImageList *imaglist) \ { return new classname(book, imaglist); } \ WidgetsPageInfo classname:: \