X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a0d9c6cb9112174b71970686a95b628819797b87..3e21fc053d9017f79ad71675db8d2e1497049159:/samples/widgets/slider.cpp?ds=sidebyside diff --git a/samples/widgets/slider.cpp b/samples/widgets/slider.cpp index 3dec8c559c..ec8cb751ec 100644 --- a/samples/widgets/slider.cpp +++ b/samples/widgets/slider.cpp @@ -24,6 +24,8 @@ #pragma hdrstop #endif +#if wxUSE_SLIDER + // for all others, include the necessary headers #ifndef WX_PRECOMP #include "wx/log.h" @@ -44,7 +46,7 @@ #include "wx/sizer.h" #include "widgets.h" -#if wxUSE_SLIDER + #include "icons/slider.xpm" // ---------------------------------------------------------------------------- @@ -87,8 +89,10 @@ enum class SliderWidgetsPage : public WidgetsPage { public: - SliderWidgetsPage(wxNotebook *notebook, wxImageList *imaglist); - virtual ~SliderWidgetsPage(); + SliderWidgetsPage(wxBookCtrl *book, wxImageList *imaglist); + virtual ~SliderWidgetsPage(){}; + + virtual wxControl *GetWidget() const { return m_slider; } protected: // event handlers @@ -195,9 +199,9 @@ END_EVENT_TABLE() IMPLEMENT_WIDGETS_PAGE(SliderWidgetsPage, _T("Slider")); -SliderWidgetsPage::SliderWidgetsPage(wxNotebook *notebook, - wxImageList *imaglist) - : WidgetsPage(notebook) +SliderWidgetsPage::SliderWidgetsPage(wxBookCtrl *book, + wxImageList *imaglist) + : WidgetsPage(book) { imaglist->Add(wxBitmap(slider_xpm)); @@ -313,10 +317,6 @@ SliderWidgetsPage::SliderWidgetsPage(wxNotebook *notebook, sizerTop->Fit(this); } -SliderWidgetsPage::~SliderWidgetsPage() -{ -} - // ---------------------------------------------------------------------------- // operations // ---------------------------------------------------------------------------- @@ -602,5 +602,4 @@ void SliderWidgetsPage::OnSlider(wxScrollEvent& event) event.GetPosition()); } -#endif - // wxUSE_SLIDER +#endif // wxUSE_SLIDER