virtual wxControl *GetWidget() const { return m_slider; }
virtual void RecreateWidget() { CreateSlider(); }
+ // lazy creation of the content
+ virtual void CreateContent();
+
protected:
// event handlers
void OnButtonReset(wxCommandEvent& event);
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(SliderWidgetsPage, _T("Slider"),
- (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
- );
+#if defined(__WXUNIVERSAL__)
+ #define FAMILY_CTRLS UNIVERSAL_CTRLS
+#else
+ #define FAMILY_CTRLS NATIVE_CTRLS
+#endif
+
+IMPLEMENT_WIDGETS_PAGE(SliderWidgetsPage, _T("Slider"), FAMILY_CTRLS );
SliderWidgetsPage::SliderWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
- : WidgetsPage(book)
+ : WidgetsPage(book, imaglist, slider_xpm)
{
- imaglist->Add(wxBitmap(slider_xpm));
-
// init everything
m_min = 0;
m_max = 100;
m_slider = (wxSlider *)NULL;
m_sizerSlider = (wxSizer *)NULL;
+}
+void SliderWidgetsPage::CreateContent()
+{
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
// left pane