]> 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 3c5c9c9b3e4a8caa55dfbfb55915d0004de77970..11e0e9e6e5a3ad9abec34cb9c321e0177ed44268 100644 (file)
@@ -77,8 +77,10 @@ enum
 class ButtonWidgetsPage : public WidgetsPage
 {
 public:
 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
 
 protected:
     // event handlers
@@ -137,9 +139,9 @@ END_EVENT_TABLE()
 
 IMPLEMENT_WIDGETS_PAGE(ButtonWidgetsPage, _T("Button"));
 
 
 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));
 
 {
     imaglist->Add(wxBitmap(button_xpm));
 
@@ -237,10 +239,6 @@ ButtonWidgetsPage::ButtonWidgetsPage(wxNotebook *notebook,
     sizerTop->Fit(this);
 }
 
     sizerTop->Fit(this);
 }
 
-ButtonWidgetsPage::~ButtonWidgetsPage()
-{
-}
-
 // ----------------------------------------------------------------------------
 // operations
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // operations
 // ----------------------------------------------------------------------------