void RecreateBook();
virtual wxBookCtrlBase *CreateBook(long flags) = 0;
+#if USE_ICONS_IN_BOOK
// create or destroy the image list
void CreateImageList();
+#endif // USE_ICONS_IN_BOOK
// create a new page
wxWindow *CreateNewPage();
wxBookCtrlBase *m_book;
wxSizer *m_sizerBook;
- // thei mage list for our book
+#if USE_ICONS_IN_BOOK
+ // the image list for our book
wxImageList *m_imageList;
+#endif // USE_ICONS_IN_BOOK
private:
DECLARE_EVENT_TABLE()
{
// init everything
m_chkImages = NULL;
+#if USE_ICONS_IN_BOOK
m_imageList = NULL;
+#endif // USE_ICONS_IN_BOOK
m_book = NULL;
m_sizerBook = (wxSizer *)NULL;
// final initializations
Reset();
+#if USE_ICONS_IN_BOOK
CreateImageList();
+#endif // USE_ICONS_IN_BOOK
SetSizer(sizerTop);
BookWidgetsPage::~BookWidgetsPage()
{
+#if USE_ICONS_IN_BOOK
delete m_imageList;
+#endif // USE_ICONS_IN_BOOK
}
// ----------------------------------------------------------------------------
m_radioOrient->SetSelection(Orient_Top);
}
+#if USE_ICONS_IN_BOOK
void BookWidgetsPage::CreateImageList()
{
if ( m_chkImages->GetValue() )
// it would be logical if this removed the image list from book, under
// MSW it crashes instead - FIXME
}
+#endif // USE_ICONS_IN_BOOK
void BookWidgetsPage::RecreateBook()
{
m_book = CreateBook(flags);
+#if USE_ICONS_IN_BOOK
CreateImageList();
+#endif // USE_ICONS_IN_BOOK
if ( oldBook )
{
int BookWidgetsPage::GetIconIndex() const
{
+#if USE_ICONS_IN_BOOK
if ( m_imageList )
{
int nImages = m_imageList->GetImageCount();
return m_book->GetPageCount() % nImages;
}
}
+#endif // USE_ICONS_IN_BOOK
return -1;
}
WidgetsFrame::WidgetsFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title,
- wxPoint(0, 50), wxDefaultSize,
+ wxDefaultPosition, wxDefaultSize,
wxDEFAULT_FRAME_STYLE |
wxNO_FULL_REPAINT_ON_RESIZE |
wxCLIP_CHILDREN |