class StaticWidgetsPage : public WidgetsPage
{
public:
- StaticWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
- virtual ~StaticWidgetsPage();
+ StaticWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
+ virtual ~StaticWidgetsPage(){};
+
+ virtual wxControl *GetWidget() const { return m_statText; }
protected:
// event handlers
wxStaticBox *m_staticBox;
wxStaticBoxSizer *m_sizerStatBox;
wxStaticText *m_statText;
+#if wxUSE_STATLINE
wxStaticLine *m_statLine;
+#endif // wxUSE_STATLINE
wxSizer *m_sizerStatic;
// the text entries for command parameters
IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, _T("Static"));
-StaticWidgetsPage::StaticWidgetsPage(wxNotebook *notebook,
- wxImageList *imaglist)
- : WidgetsPage(notebook)
+StaticWidgetsPage::StaticWidgetsPage(wxBookCtrl *book,
+ wxImageList *imaglist)
+ : WidgetsPage(book)
{
imaglist->Add(wxBitmap(statbox_xpm));
m_radioHAlign =
m_radioVAlign = (wxRadioBox *)NULL;
+#if wxUSE_STATLINE
m_statLine = (wxStaticLine *)NULL;
+#endif // wxUSE_STATLINE
m_statText = (wxStaticText *)NULL;
m_staticBox = (wxStaticBox *)NULL;
sizerTop->Fit(this);
}
-StaticWidgetsPage::~StaticWidgetsPage()
-{
-}
-
// ----------------------------------------------------------------------------
// operations
// ----------------------------------------------------------------------------
// delete m_sizerStatBox; -- deleted by Remove()
m_sizerStatic->Remove(m_sizerStatBox);
delete m_statText;
+#if wxUSE_STATLINE
delete m_statLine;
+#endif // wxUSE_STATLINE
}
int flagsBox = 0,
wxDefaultPosition, wxDefaultSize,
flagsText);
+#if wxUSE_STATLINE
m_statLine = new wxStaticLine(this, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
isVert ? wxLI_VERTICAL : wxLI_HORIZONTAL);
+#endif // wxUSE_STATLINE
m_sizerStatBox->Add(m_statText, 1, wxGROW | wxALL, 5);
+#if wxUSE_STATLINE
m_sizerStatBox->Add(m_statLine, 0, wxGROW | wxALL, 5);
+#endif // wxUSE_STATLINE
m_sizerStatBox->Add(0, 0, 1);
m_sizerStatic->Add(m_sizerStatBox, 1, wxGROW);