X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/206d3a16caa7a4e626395ae52cc8f7e0225e202d..c3b7706c4f3c34dfe552726c4438a1565a9944b0:/samples/widgets/button.cpp diff --git a/samples/widgets/button.cpp b/samples/widgets/button.cpp index 2f1b3c721a..11e0e9e6e5 100644 --- a/samples/widgets/button.cpp +++ b/samples/widgets/button.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Program: wxWindows Widgets Sample +// Program: wxWidgets Widgets Sample // Name: button.cpp // Purpose: Part of the widgets sample showing wxButton // Author: Vadim Zeitlin @@ -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 // ----------------------------------------------------------------------------