/////////////////////////////////////////////////////////////////////////////
-// Program: wxWindows Widgets Sample
+// Program: wxWidgets Widgets Sample
// Name: gauge.cpp
// Purpose: Part of the widgets sample showing wxGauge
// Author: Vadim Zeitlin
class GaugeWidgetsPage : public WidgetsPage
{
public:
- GaugeWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ GaugeWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual ~GaugeWidgetsPage();
+ virtual wxControl *GetWidget() const { return m_gauge; }
+
protected:
// event handlers
void OnButtonReset(wxCommandEvent& event);
IMPLEMENT_WIDGETS_PAGE(GaugeWidgetsPage, _T("Gauge"));
-GaugeWidgetsPage::GaugeWidgetsPage(wxNotebook *notebook,
- wxImageList *imaglist)
- : WidgetsPage(notebook)
+GaugeWidgetsPage::GaugeWidgetsPage(wxBookCtrl *book,
+ wxImageList *imaglist)
+ :WidgetsPage(book)
{
imaglist->Add(wxBitmap(gauge_xpm));
if ( !m_textRange->GetValue().ToULong(&val) )
return;
+ m_range = val;
m_gauge->SetRange(val);
}