X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/49abcb2f46db3d1a14b28cfca77370b545a75622..8006bf3c49020d4001314df13425c8a0a7e87a16:/samples/widgets/widgets.h?ds=sidebyside diff --git a/samples/widgets/widgets.h b/samples/widgets/widgets.h index 6c45ee11ff..d8e40df3ce 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; @@ -37,11 +37,22 @@ 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; } + + // recreate the control shown by this page + // + // this is currently used only to take into account the border flags + virtual void RecreateWidget() = 0; + + // the default flags for the widget, currently only contains border flags + static int ms_defaultFlags; + protected: // several helper functions for page creation @@ -80,7 +91,7 @@ public: class WidgetsPageInfo { public: - typedef WidgetsPage *(*Constructor)(wxBookCtrl *book, + typedef WidgetsPage *(*Constructor)(wxBookCtrlBase *book, wxImageList *imaglist); // our ctor @@ -114,7 +125,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:: \