]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/button.cpp
use wxDC::GetMultiLineTextExtent() instead of duplicating its code in wxButton::DoGet...
[wxWidgets.git] / samples / widgets / button.cpp
index ebe6d458878e6053d6b75a84bd44eebfcf317907..11e0e9e6e5a3ad9abec34cb9c321e0177ed44268 100644 (file)
@@ -77,9 +77,11 @@ enum
 class ButtonWidgetsPage : public WidgetsPage
 {
 public:
-    ButtonWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+    ButtonWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
     virtual ~ButtonWidgetsPage(){};
 
+    virtual wxControl *GetWidget() const { return m_button; }
+
 protected:
     // event handlers
     void OnCheckOrRadioBox(wxCommandEvent& event);
@@ -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));