X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be5a51fb592f3fa2ba38ac6cd1e488d6d806058c..c4e2838090992384911a6a6aa44cac985d79a555:/samples/widgets/button.cpp diff --git a/samples/widgets/button.cpp b/samples/widgets/button.cpp index 1fd14bf6a3..11e0e9e6e5 100644 --- a/samples/widgets/button.cpp +++ b/samples/widgets/button.cpp @@ -77,8 +77,10 @@ enum class ButtonWidgetsPage : public WidgetsPage { public: - ButtonWidgetsPage(wxNotebook *notebook, wxImageList *imaglist); - virtual ~ButtonWidgetsPage(); + ButtonWidgetsPage(wxBookCtrl *book, wxImageList *imaglist); + virtual ~ButtonWidgetsPage(){}; + + virtual wxControl *GetWidget() const { return m_button; } protected: // event handlers @@ -105,7 +107,7 @@ protected: wxRadioBox *m_radioHAlign, *m_radioVAlign; - // the gauge itself and the sizer it is in + // the button itself and the sizer it is in wxButton *m_button; wxSizer *m_sizerButton; @@ -137,9 +139,9 @@ END_EVENT_TABLE() IMPLEMENT_WIDGETS_PAGE(ButtonWidgetsPage, _T("Button")); -ButtonWidgetsPage::ButtonWidgetsPage(wxNotebook *notebook, - wxImageList *imaglist) - : WidgetsPage(notebook) +ButtonWidgetsPage::ButtonWidgetsPage(wxBookCtrl *book, + wxImageList *imaglist) + : WidgetsPage(book) { imaglist->Add(wxBitmap(button_xpm)); @@ -168,7 +170,7 @@ ButtonWidgetsPage::ButtonWidgetsPage(wxNotebook *notebook, m_chkDefault = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Default")); #ifndef __WXUNIVERSAL__ - // only wxUniv currently supoprts buttons with images + // only wxUniv currently supports buttons with images m_chkImage->Disable(); #endif // !wxUniv @@ -237,10 +239,6 @@ ButtonWidgetsPage::ButtonWidgetsPage(wxNotebook *notebook, sizerTop->Fit(this); } -ButtonWidgetsPage::~ButtonWidgetsPage() -{ -} - // ---------------------------------------------------------------------------- // operations // ----------------------------------------------------------------------------