* Many accessors of wxURL - GetHostName, GetProtocolName, and GetPath,
have been replaced by its parent's (wxURI) counterparts - GetServer,
GetScheme, and GetPath, respectively.
-
- * ConvertToValidURI has been replaced by wxURI. Do not use
+
+ * ConvertToValidURI has been replaced by wxURI. Do not use
ConvertToValidURI for future applications.
* ConvertFromURI has been replaced by wxURI::Unescape.
\subsection{Depreciated changes since 2.4.x}
-- wxURL::GetInputStream() and similar functionality has been depreciated in
+- wxURL::GetInputStream() and similar functionality has been depreciated in
favor of other ways of connecting, such as though sockets or wxFileSystem.
- wxDocManager::GetNoHistoryFiles() renamed to GetHistoryFilesCount()
\subsection{Mediaplayer sample}\label{samplemediaplayer}
This sample demonstrates how to use all the features of
-\helpref{wxMediaCtrl}{wxmediactrl} and play various types of sound, video,
+\helpref{wxMediaCtrl}{wxmediactrl} and play various types of sound, video,
and other files.
\subsection{Notebook sample}\label{samplenotebook}
-This samples shows family of controls which derive from wxBookCtrl base class.
+This samples shows family of controls which derive from wxBookCtrlBase base class.
Although initially it was written to demonstrate \helpref{wxNotebook}{wxnotebook}
only, it can now be also used to see \helpref{wxListbook}{wxlistbook} and
\helpref{wxChoicebook}{wxchoicebook} in action. Test each of the controls, their
///////////////////////////////////////////////////////////////////////////////
// Name: wx/bookctrl.h
-// Purpose: wxBookCtrl: common base class for wxList/Tree/Notebook
+// Purpose: wxBookCtrlBase: common base class for wxList/Tree/Notebook
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.08.03
class WXDLLEXPORT wxImageList;
// ----------------------------------------------------------------------------
-// wxBookCtrl
+// wxBookCtrlBase
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxBookCtrl : public wxControl
+class WXDLLEXPORT wxBookCtrlBase : public wxControl
{
public:
// construction
// ------------
- wxBookCtrl()
+ wxBookCtrlBase()
{
Init();
}
- wxBookCtrl(wxWindow *parent,
- wxWindowID winid,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxEmptyString)
+ wxBookCtrlBase(wxWindow *parent,
+ wxWindowID winid,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxEmptyString)
{
Init();
const wxString& name = wxEmptyString);
// dtor
- virtual ~wxBookCtrl();
+ virtual ~wxBookCtrlBase();
// accessors
{
int n = GetSelection();
return n == wxNOT_FOUND ? NULL
- : wx_const_cast(wxBookCtrl *, this)->GetPage(n);
+ : wx_const_cast(wxBookCtrlBase *, this)->GetPage(n);
}
// get the currently selected page or wxNOT_FOUND if none
bool m_ownsImageList;
- DECLARE_NO_COPY_CLASS(wxBookCtrl)
+ DECLARE_NO_COPY_CLASS(wxBookCtrlBase)
};
// ----------------------------------------------------------------------------
-// wxBookCtrlEvent: page changing events generated by derived classes
+// wxBookCtrlBaseEvent: page changing events generated by derived classes
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxBookCtrlEvent : public wxNotifyEvent
+class WXDLLEXPORT wxBookCtrlBaseEvent : public wxNotifyEvent
{
public:
- wxBookCtrlEvent(wxEventType commandType = wxEVT_NULL, int winid = 0,
- int nSel = -1, int nOldSel = -1)
+ wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0,
+ int nSel = -1, int nOldSel = -1)
: wxNotifyEvent(commandType, winid)
{
m_nSel = nSel;
m_nOldSel; // previously selected page
};
+// make a default book control for given platform
+#if defined(__WXMSW__) && defined(__SMARTPHONE__)
+ #include "wx\choicebook.h"
+ #define wxBookCtrl wxChoicebook
+ #define wxBookCtrlEvent wxChoicebookEvent
+ #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED
+ #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING
+ #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_CHOICEBOOK_PAGE_CHANGED(id, fn)
+ #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_CHOICEBOOK_PAGE_CHANGING(id, fn)
+ #define wxBC_TOP wxNB_TOP
+ #define wxBC_BOTTOM wxNB_BOTTOM
+ #define wxBC_LEFT wxNB_LEFT
+ #define wxBC_RIGHT wxNB_RIGHT
+ #define wxBC_DEFAULT wxNB_DEFAULT
+#else
+ #include "wx\notebook.h"
+ #define wxBookCtrl wxNotebook
+ #define wxBookCtrlEvent wxNotebookEvent
+ #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
+ #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
+ #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_NOTEBOOK_PAGE_CHANGED(id, fn)
+ #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_NOTEBOOK_PAGE_CHANGING(id, fn)
+ #define wxBC_TOP wxCHB_TOP
+ #define wxBC_BOTTOM wxCHB_BOTTOM
+ #define wxBC_LEFT wxCHB_LEFT
+ #define wxBC_RIGHT wxCHB_RIGHT
+ #define wxBC_DEFAULT wxCHB_DEFAULT
+#endif
+
#endif // wxUSE_BOOKCTRL
#endif // _WX_BOOKCTRL_H_
// wxChoicebook
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxChoicebook : public wxBookCtrl
+class WXDLLEXPORT wxChoicebook : public wxBookCtrlBase
{
public:
wxChoicebook()
// choicebook event class and related stuff
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxChoicebookEvent : public wxBookCtrlEvent
+class WXDLLEXPORT wxChoicebookEvent : public wxBookCtrlBaseEvent
{
public:
wxChoicebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
int nSel = -1, int nOldSel = -1)
- : wxBookCtrlEvent(commandType, id, nSel, nOldSel)
+ : wxBookCtrlBaseEvent(commandType, id, nSel, nOldSel)
{
}
// wxListbook
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxListbook : public wxBookCtrl
+class WXDLLEXPORT wxListbook : public wxBookCtrlBase
{
public:
wxListbook()
// listbook event class and related stuff
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxListbookEvent : public wxBookCtrlEvent
+class WXDLLEXPORT wxListbookEvent : public wxBookCtrlBaseEvent
{
public:
wxListbookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
int nSel = wxNOT_FOUND, int nOldSel = wxNOT_FOUND)
- : wxBookCtrlEvent(commandType, id, nSel, nOldSel)
+ : wxBookCtrlBaseEvent(commandType, id, nSel, nOldSel)
{
}
// wxNotebookBase: define wxNotebook interface
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxNotebookBase : public wxBookCtrl
+class WXDLLEXPORT wxNotebookBase : public wxBookCtrlBase
{
public:
// ctors
long style = 0,
const wxString& name = wxNOTEBOOK_NAME) ;
- // wxNotebook-specific additions to wxBookCtrl interface
- // -----------------------------------------------------
+ // wxNotebook-specific additions to wxBookCtrlBase interface
+ // ---------------------------------------------------------
// get the number of rows for a control with wxNB_MULTILINE style (not all
// versions support it - they will always return 1 then)
// notebook event class and related stuff
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxNotebookEvent : public wxBookCtrlEvent
+class WXDLLEXPORT wxNotebookEvent : public wxBookCtrlBaseEvent
{
public:
wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int winid = 0,
int nSel = -1, int nOldSel = -1)
- : wxBookCtrlEvent(commandType, winid, nSel, nOldSel)
+ : wxBookCtrlBaseEvent(commandType, winid, nSel, nOldSel)
{
}
#if WXWIN_COMPATIBILITY_2_4
// NB: wxBookCtrlSizer and wxNotebookSizer are deprecated, they
-// don't do anything. wxBookCtrl::DoGetBestSize does the job now.
+// don't do anything. wxBookCtrlBase::DoGetBestSize does the job now.
// ----------------------------------------------------------------------------
// wxBookCtrlSizer
// this sizer works with wxNotebook/wxListbook/... and sizes the control to
// fit its pages
-class WXDLLEXPORT wxBookCtrl;
+class WXDLLEXPORT wxBookCtrlBase;
class WXDLLEXPORT wxBookCtrlSizer : public wxSizer
{
public:
- wxDEPRECATED( wxBookCtrlSizer(wxBookCtrl *bookctrl) );
+ wxDEPRECATED( wxBookCtrlSizer(wxBookCtrlBase *bookctrl) );
- wxBookCtrl *GetControl() const { return m_bookctrl; }
+ wxBookCtrlBase *GetControl() const { return m_bookctrl; }
virtual void RecalcSizes();
virtual wxSize CalcMin();
// and still have warning-free build of the library itself:
wxBookCtrlSizer() {}
- wxBookCtrl *m_bookctrl;
+ wxBookCtrlBase *m_bookctrl;
private:
DECLARE_CLASS(wxBookCtrlSizer)
#if wxUSE_NOTEBOOK
-// before wxBookCtrl we only had wxNotebookSizer, keep it for backwards
+// before wxBookCtrlBase we only had wxNotebookSizer, keep it for backwards
// compatibility
class WXDLLEXPORT wxNotebook;
#include "wx/spinbutt.h"
#endif
#include "wx/tglbtn.h"
-#include "wx/notebook.h"
+#include "wx/bookctrl.h"
#include "wx/imaglist.h"
#include "wx/artprov.h"
void OnRadioButton1( wxCommandEvent &event );
void OnRadioButton2( wxCommandEvent &event );
void OnSetFont( wxCommandEvent &event );
- void OnPageChanged( wxNotebookEvent &event );
- void OnPageChanging( wxNotebookEvent &event );
+ void OnPageChanged( wxBookCtrlEvent &event );
+ void OnPageChanging( wxBookCtrlEvent &event );
void OnSliderUpdate( wxCommandEvent &event );
void OnUpdateLabel( wxCommandEvent &event );
#if wxUSE_SPINBTN
wxCheckBox *m_checkbox;
wxTextCtrl *m_text;
- wxNotebook *m_notebook;
+ wxBookCtrl *m_book;
wxStaticText *m_label;
// MyPanel
//----------------------------------------------------------------------
-const int ID_NOTEBOOK = 1000;
+const int ID_BOOK = 1000;
const int ID_LISTBOX = 130;
const int ID_LISTBOX_SEL_NUM = 131;
BEGIN_EVENT_TABLE(MyPanel, wxPanel)
EVT_SIZE ( MyPanel::OnSize)
-EVT_NOTEBOOK_PAGE_CHANGING(ID_NOTEBOOK, MyPanel::OnPageChanging)
-EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, MyPanel::OnPageChanged)
+EVT_BOOKCTRL_PAGE_CHANGING(ID_BOOK, MyPanel::OnPageChanging)
+EVT_BOOKCTRL_PAGE_CHANGED(ID_BOOK, MyPanel::OnPageChanged)
EVT_LISTBOX (ID_LISTBOX, MyPanel::OnListBox)
EVT_LISTBOX (ID_LISTBOX_SORTED, MyPanel::OnListBox)
EVT_LISTBOX_DCLICK(ID_LISTBOX, MyPanel::OnListBoxDoubleClick)
m_spintext = NULL;
m_checkbox = NULL;
m_text = NULL;
- m_notebook = NULL;
+ m_book = NULL;
m_label = NULL;
m_text = new wxTextCtrl(this, wxID_ANY, _T("This is the log window.\n"),
m_logTargetOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_text));
- m_notebook = new wxNotebook(this, ID_NOTEBOOK);
+ m_book = new wxBookCtrl(this, ID_BOOK);
wxString choices[] =
{
imagelist-> Add( wxBitmap( text_xpm ));
imagelist-> Add( wxBitmap( radio_xpm ));
imagelist-> Add( wxBitmap( gauge_xpm ));
- m_notebook->SetImageList(imagelist);
+ m_book->SetImageList(imagelist);
#elif defined(__WXMSW__)
// load images from resources
enum
wxBitmap bmp(s_iconNames[n]);
if ( !bmp.Ok() || (imagelist->Add(bmp) == -1) )
{
- wxLogWarning(wxT("Couldn't load the image '%s' for the notebook page %d."),
+ wxLogWarning(wxT("Couldn't load the image '%s' for the book control page %d."),
s_iconNames[n], n);
}
}
- m_notebook->SetImageList(imagelist);
+ m_book->SetImageList(imagelist);
#else
// No images for now
#endif
- wxPanel *panel = new wxPanel(m_notebook);
+ wxPanel *panel = new wxPanel(m_book);
m_listbox = new wxListBox( panel, ID_LISTBOX,
wxPoint(10,10), wxSize(120,70),
5, choices, wxLB_ALWAYS_SB );
(void)new wxCheckBox( panel, ID_CHANGE_COLOUR, _T("&Toggle colour"),
wxPoint(110,170) );
panel->SetCursor(wxCursor(wxCURSOR_HAND));
- m_notebook->AddPage(panel, _T("wxListBox"), true, Image_List);
+ m_book->AddPage(panel, _T("wxListBox"), true, Image_List);
#if wxUSE_CHOICE
- panel = new wxPanel(m_notebook);
+ panel = new wxPanel(m_book);
m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,wxDefaultCoord), 5, choices );
m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,wxDefaultCoord),
5, choices, wxCB_SORT );
(void)new wxButton( panel, ID_CHOICE_FONT, _T("Set &Italic font"), wxPoint(340,130), wxSize(140,30) );
(void)new wxCheckBox( panel, ID_CHOICE_ENABLE, _T("&Disable"), wxPoint(20,130), wxSize(140,30) );
- m_notebook->AddPage(panel, _T("wxChoice"), false, Image_Choice);
+ m_book->AddPage(panel, _T("wxChoice"), false, Image_Choice);
#endif // wxUSE_CHOICE
- panel = new wxPanel(m_notebook);
+ panel = new wxPanel(m_book);
(void)new wxStaticBox( panel, wxID_ANY, _T("&Box around combobox"),
wxPoint(5, 5), wxSize(150, 100));
m_combo = new MyComboBox( panel, ID_COMBO, _T("This"),
(void)new wxButton( panel, ID_COMBO_DELETE, _T("D&elete selected item"), wxPoint(180,130), wxSize(140,30) );
(void)new wxButton( panel, ID_COMBO_FONT, _T("Set &Italic font"), wxPoint(340,130), wxSize(140,30) );
(void)new wxCheckBox( panel, ID_COMBO_ENABLE, _T("&Disable"), wxPoint(20,130), wxSize(140,30) );
- m_notebook->AddPage(panel, _T("wxComboBox"), false, Image_Combo);
+ m_book->AddPage(panel, _T("wxComboBox"), false, Image_Combo);
wxString choices2[] =
{
"Seventh", "Eighth", "Nineth", "Tenth" */
};
- panel = new wxPanel(m_notebook);
+ panel = new wxPanel(m_book);
(void)new MyRadioBox( panel, ID_RADIOBOX, _T("&That"), wxPoint(10,160), wxDefaultSize, WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS );
m_radio = new wxRadioBox( panel, ID_RADIOBOX, _T("T&his"), wxPoint(10,10), wxDefaultSize, WXSIZEOF(choices), choices, 1, wxRA_SPECIFY_COLS );
m_radio->SetForegroundColour(*wxRED);
wxRadioButton *rb = new wxRadioButton( panel, ID_RADIOBUTTON_1, _T("Radiobutton1"), wxPoint(210,170), wxDefaultSize, wxRB_GROUP );
rb->SetValue( false );
(void)new wxRadioButton( panel, ID_RADIOBUTTON_2, _T("&Radiobutton2"), wxPoint(340,170), wxDefaultSize );
- m_notebook->AddPage(panel, _T("wxRadioBox"), false, Image_Radio);
+ m_book->AddPage(panel, _T("wxRadioBox"), false, Image_Radio);
- panel = new wxPanel(m_notebook);
+ panel = new wxPanel(m_book);
(void)new wxStaticBox( panel, wxID_ANY, _T("&wxGauge and wxSlider"), wxPoint(10,10), wxSize(222,130) );
m_gauge = new wxGauge( panel, wxID_ANY, 200, wxPoint(18,50), wxSize(155, 30), wxGA_HORIZONTAL|wxNO_BORDER );
m_gauge->SetBackgroundColour(*wxGREEN);
m_spinctrl->SetValue(15);
#endif // wxUSE_SPINCTRL
- m_notebook->AddPage(panel, _T("wxGauge"), false, Image_Gauge);
+ m_book->AddPage(panel, _T("wxGauge"), false, Image_Gauge);
- panel = new wxPanel(m_notebook);
+ panel = new wxPanel(m_book);
#if !defined(__WXMOTIF__) // wxStaticBitmap not working under Motif yet.
wxIcon icon = wxArtProvider::GetIcon(wxART_INFORMATION);
wxALIGN_RIGHT /*| wxST_NO_AUTORESIZE*/);
m_label->SetForegroundColour( *wxBLUE );
- m_notebook->AddPage(panel, _T("wxBitmapXXX"));
+ m_book->AddPage(panel, _T("wxBitmapXXX"));
// sizer
- panel = new wxPanel(m_notebook);
+ panel = new wxPanel(m_book);
panel->SetAutoLayout( true );
wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer *csizer =
new wxStaticBoxSizer (new wxStaticBox (panel, wxID_ANY, _T("Show Buttons")), wxHORIZONTAL );
-
+
wxCheckBox *check1, *check2, *check3, *check4, *check14, *checkBig;
check1 = new wxCheckBox (panel, ID_SIZER_CHECK1, _T("1"));
check1->SetValue (true);
checkBig = new wxCheckBox (panel, ID_SIZER_CHECKBIG, _T("Big"));
checkBig->SetValue (true);
csizer->Add (checkBig);
-
+
sizer->Add (csizer);
m_hsizer = new wxBoxSizer( wxHORIZONTAL );
m_buttonSizer = new wxBoxSizer (wxVERTICAL);
-
+
m_sizerBtn1 = new wxButton(panel, wxID_ANY, _T("Test Button &1 (tab order 1)") );
m_buttonSizer->Add( m_sizerBtn1, 0, wxALL, 10 );
m_sizerBtn2 = new wxButton(panel, wxID_ANY, _T("Test Button &2 (tab order 3)") );
panel->SetSizer( sizer );
- m_notebook->AddPage(panel, _T("wxSizer"));
+ m_book->AddPage(panel, _T("wxSizer"));
}
void MyPanel::OnSize( wxSizeEvent& WXUNUSED(event) )
int y = 0;
GetClientSize( &x, &y );
- if (m_notebook) m_notebook->SetSize( 2, 2, x-4, y*2/3-4 );
+ if (m_book) m_book->SetSize( 2, 2, x-4, y*2/3-4 );
if (m_text) m_text->SetSize( 2, y*2/3+2, x-4, y/3-4 );
}
-void MyPanel::OnPageChanging( wxNotebookEvent &event )
+void MyPanel::OnPageChanging( wxBookCtrlEvent &event )
{
int selOld = event.GetOldSelection();
if ( selOld == 2 )
}
}
- *m_text << _T("Notebook selection is being changed from ") << selOld
+ *m_text << _T("Book selection is being changed from ") << selOld
<< _T(" to ") << event.GetSelection()
- << _T(" (current page from notebook is ")
- << m_notebook->GetSelection() << _T(")\n");
+ << _T(" (current page from book is ")
+ << m_book->GetSelection() << _T(")\n");
}
-void MyPanel::OnPageChanged( wxNotebookEvent &event )
+void MyPanel::OnPageChanged( wxBookCtrlEvent &event )
{
- *m_text << _T("Notebook selection is now ") << event.GetSelection()
- << _T(" (from notebook: ") << m_notebook->GetSelection()
+ *m_text << _T("Book selection is now ") << event.GetSelection()
+ << _T(" (from book: ") << m_book->GetSelection()
<< _T(")\n");
}
void MyPanel::OnShowProgress( wxCommandEvent& WXUNUSED(event) )
{
int max = m_spinbutton->GetValue();
-
+
if ( max <= 0 )
{
wxLogError(_T("You must set positive range!"));
return;
}
-
+
wxProgressDialog dialog(_T("Progress dialog example"),
_T("An informative message"),
max, // range
//wxLog::RemoveTraceMask(_T("focus"));
delete wxLog::SetActiveTarget(m_logTargetOld);
- delete m_notebook->GetImageList();
+ delete m_book->GetImageList();
}
//----------------------------------------------------------------------
return true;
}
-wxPanel *CreateUserCreatedPage(wxBookCtrl *parent)
+wxPanel *CreateUserCreatedPage(wxBookCtrlBase *parent)
{
wxPanel *panel = new wxPanel(parent);
return panel;
}
-wxPanel *CreateRadioButtonsPage(wxBookCtrl *parent)
+wxPanel *CreateRadioButtonsPage(wxBookCtrlBase *parent)
{
wxPanel *panel = new wxPanel(parent);
return panel;
}
-wxPanel *CreateVetoPage(wxBookCtrl *parent)
+wxPanel *CreateVetoPage(wxBookCtrlBase *parent)
{
wxPanel *panel = new wxPanel(parent);
return panel;
}
-wxPanel *CreateBigButtonPage(wxBookCtrl *parent)
+wxPanel *CreateBigButtonPage(wxBookCtrlBase *parent)
{
wxPanel *panel = new wxPanel(parent);
}
-wxPanel *CreateInsertPage(wxBookCtrl *parent)
+wxPanel *CreateInsertPage(wxBookCtrlBase *parent)
{
wxPanel *panel = new wxPanel(parent);
return panel;
}
-int GetIconIndex(wxBookCtrl* bookCtrl)
+int GetIconIndex(wxBookCtrlBase* bookCtrl)
{
if (bookCtrl && bookCtrl->GetImageList())
{
return -1;
}
-void CreateInitialPages(wxBookCtrl *parent)
+void CreateInitialPages(wxBookCtrlBase *parent)
{
// Create and add some panels to the notebook
parent->SetSelection(1);
}
-wxPanel *CreatePage(wxBookCtrl *parent, const wxString&pageName)
+wxPanel *CreatePage(wxBookCtrlBase *parent, const wxString&pageName)
{
if
(
ShowCurrentBook();
}
-wxBookCtrl *MyFrame::GetCurrentBook()
+wxBookCtrlBase *MyFrame::GetCurrentBook()
{
switch (m_type)
{
void MyFrame::OnType(wxCommandEvent& event)
{
- wxBookCtrl *currBook = GetCurrentBook();
+ wxBookCtrlBase *currBook = GetCurrentBook();
m_type = event.GetId();
{
static unsigned s_pageAdded = 0;
- wxBookCtrl *currBook = GetCurrentBook();
+ wxBookCtrlBase *currBook = GetCurrentBook();
if ( currBook )
{
{
static unsigned s_pageIns = 0;
- wxBookCtrl *currBook = GetCurrentBook();
+ wxBookCtrlBase *currBook = GetCurrentBook();
if ( currBook )
{
void MyFrame::OnDeleteCurPage(wxCommandEvent& WXUNUSED(event))
{
- wxBookCtrl *currBook = GetCurrentBook();
+ wxBookCtrlBase *currBook = GetCurrentBook();
if ( currBook )
{
void MyFrame::OnDeleteLastPage(wxCommandEvent& WXUNUSED(event))
{
- wxBookCtrl *currBook = GetCurrentBook();
+ wxBookCtrlBase *currBook = GetCurrentBook();
if ( currBook )
{
void MyFrame::OnNextPage(wxCommandEvent& WXUNUSED(event))
{
- wxBookCtrl *currBook = GetCurrentBook();
+ wxBookCtrlBase *currBook = GetCurrentBook();
if ( currBook )
{
{
static int s_nPages = wxNOT_FOUND;
static int s_nSel = wxNOT_FOUND;
- static wxBookCtrl *s_currBook = NULL;
+ static wxBookCtrlBase *s_currBook = NULL;
- wxBookCtrl *currBook = GetCurrentBook();
+ wxBookCtrlBase *currBook = GetCurrentBook();
int nPages = currBook ? currBook->GetPageCount() : 0;
int nSel = currBook ? currBook->GetSelection() : wxNOT_FOUND;
else if (eventType == wxEVT_PAGE_CHANGING) \
{ \
int idx = event.GetOldSelection(); \
- wxBookCtrl *book = (wxBookCtrl *)event.GetEventObject(); \
+ wxBookCtrlBase *book = (wxBookCtrlBase *)event.GetEventObject(); \
if ( idx != wxNOT_FOUND && book && book->GetPageText(idx) == VETO_PAGE_NAME ) \
{ \
if \
void OnIdle(wxIdleEvent& event);
- wxBookCtrl *GetCurrentBook();
+ wxBookCtrlBase *GetCurrentBook();
private:
wxLog *m_logTargetOld;
class ButtonWidgetsPage : public WidgetsPage
{
public:
- ButtonWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ ButtonWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual ~ButtonWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_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));
class CheckBoxWidgetsPage : public WidgetsPage
{
public:
- CheckBoxWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ CheckBoxWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual ~CheckBoxWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_checkbox; }
IMPLEMENT_WIDGETS_PAGE(CheckBoxWidgetsPage, wxT("CheckBox"));
-CheckBoxWidgetsPage::CheckBoxWidgetsPage(wxNotebook *notebook,
- wxImageList *imaglist)
- : WidgetsPage(notebook)
+CheckBoxWidgetsPage::CheckBoxWidgetsPage(wxBookCtrl *book,
+ wxImageList *imaglist)
+ : WidgetsPage(book)
{
imaglist->Add(wxBitmap(checkbox_xpm));
class ComboboxWidgetsPage : public WidgetsPage
{
public:
- ComboboxWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ ComboboxWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual wxControl *GetWidget() const { return m_combobox; }
IMPLEMENT_WIDGETS_PAGE(ComboboxWidgetsPage, _T("Combobox"));
-ComboboxWidgetsPage::ComboboxWidgetsPage(wxNotebook *notebook,
- wxImageList *imaglist)
- : WidgetsPage(notebook)
+ComboboxWidgetsPage::ComboboxWidgetsPage(wxBookCtrl *book,
+ wxImageList *imaglist)
+ : WidgetsPage(book)
{
// init everything
m_chkSort =
class GaugeWidgetsPage : public WidgetsPage
{
public:
- GaugeWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ GaugeWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual ~GaugeWidgetsPage();
virtual wxControl *GetWidget() const { return m_gauge; }
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));
class ListboxWidgetsPage : public WidgetsPage
{
public:
- ListboxWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ ListboxWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual wxControl *GetWidget() const { return m_lbox; }
IMPLEMENT_WIDGETS_PAGE(ListboxWidgetsPage, _T("Listbox"));
-ListboxWidgetsPage::ListboxWidgetsPage(wxNotebook *notebook,
+ListboxWidgetsPage::ListboxWidgetsPage(wxBookCtrl *book,
wxImageList *imaglist)
- : WidgetsPage(notebook)
+ : WidgetsPage(book)
{
imaglist->Add(wxBitmap(listbox_xpm));
#pragma hdrstop
#endif
+#if wxUSE_NOTEBOOK
+
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/artprov.h"
#include "widgets.h"
-#if 1
#include "icons/notebook.xpm"
// ----------------------------------------------------------------------------
Orient_Max
};
-// old versions of wxWidgets don't define this style
-#ifndef wxNB_TOP
- #define wxNB_TOP (0)
-#endif
-
// ----------------------------------------------------------------------------
// NotebookWidgetsPage
// ----------------------------------------------------------------------------
m_notebook->AddPage(CreateNewPage(),
old_note->GetPageText(n),
false,
- m_chkImages->GetValue() ?
+ m_chkImages->GetValue() ?
GetIconIndex() : -1);
}
event.Skip();
}
-#endif
+#endif // wxUSE_NOTEBOOK
#pragma hdrstop
#endif
+#if wxUSE_RADIOBOX
+
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/sizer.h"
#include "widgets.h"
-#if 1
+
#include "icons/radiobox.xpm"
// ----------------------------------------------------------------------------
class RadioWidgetsPage : public WidgetsPage
{
public:
- RadioWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ RadioWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual ~RadioWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_radio; }
IMPLEMENT_WIDGETS_PAGE(RadioWidgetsPage, _T("Radio"));
-RadioWidgetsPage::RadioWidgetsPage(wxNotebook *notebook,
- wxImageList *imaglist)
- : WidgetsPage(notebook)
+RadioWidgetsPage::RadioWidgetsPage(wxBookCtrl *book,
+ wxImageList *imaglist)
+ : WidgetsPage(book)
{
imaglist->Add(wxBitmap(radio_xpm));
event.Enable(enable);
}
-#endif
+#endif // wxUSE_RADIOBOX
#pragma hdrstop
#endif
+#if wxUSE_SLIDER
+
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/sizer.h"
#include "widgets.h"
-#if wxUSE_SLIDER
+
#include "icons/slider.xpm"
// ----------------------------------------------------------------------------
class SliderWidgetsPage : public WidgetsPage
{
public:
- SliderWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ SliderWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual ~SliderWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_slider; }
IMPLEMENT_WIDGETS_PAGE(SliderWidgetsPage, _T("Slider"));
-SliderWidgetsPage::SliderWidgetsPage(wxNotebook *notebook,
- wxImageList *imaglist)
- : WidgetsPage(notebook)
+SliderWidgetsPage::SliderWidgetsPage(wxBookCtrl *book,
+ wxImageList *imaglist)
+ : WidgetsPage(book)
{
imaglist->Add(wxBitmap(slider_xpm));
event.GetPosition());
}
-#endif
- // wxUSE_SLIDER
+#endif // wxUSE_SLIDER
#pragma hdrstop
#endif
+#if wxUSE_SPINBTN
+
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/sizer.h"
#include "widgets.h"
-#if wxUSE_SPINBTN
+
#include "icons/spinbtn.xpm"
// ----------------------------------------------------------------------------
class SpinBtnWidgetsPage : public WidgetsPage
{
public:
- SpinBtnWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ SpinBtnWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual ~SpinBtnWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_spinbtn; }
IMPLEMENT_WIDGETS_PAGE(SpinBtnWidgetsPage, _T("Spin"));
-SpinBtnWidgetsPage::SpinBtnWidgetsPage(wxNotebook *notebook,
+SpinBtnWidgetsPage::SpinBtnWidgetsPage(wxBookCtrl *book,
wxImageList *imaglist)
- : WidgetsPage(notebook)
+ : WidgetsPage(book)
{
m_chkVert = NULL;
m_chkWrap = NULL;
class StaticWidgetsPage : public WidgetsPage
{
public:
- StaticWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ StaticWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual ~StaticWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_statText; }
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));
{
public:
// ctor(s) and dtor
- TextWidgetsPage(wxNotebook *notebook, wxImageList *imaglist);
+ TextWidgetsPage(wxBookCtrl *book, wxImageList *imaglist);
virtual ~TextWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_text; }
// TextWidgetsPage creation
// ----------------------------------------------------------------------------
-TextWidgetsPage::TextWidgetsPage(wxNotebook *notebook, wxImageList *imaglist)
- : WidgetsPage(notebook)
+TextWidgetsPage::TextWidgetsPage(wxBookCtrl *book, wxImageList *imaglist)
+ : WidgetsPage(book)
{
imaglist->Add(wxBitmap(text_xpm));
#include "wx/textctrl.h"
#endif
-#include "wx/notebook.h"
+#include "wx/bookctrl.h"
#include "wx/sizer.h"
#include "wx/colordlg.h"
void OnSetBgCol(wxCommandEvent& event);
#endif // wxUSE_MENUS
- // initialize the notebook: add all pages to it
- void InitNotebook();
+ // initialize the book: add all pages to it
+ void InitBook();
private:
// the panel containing everything
wxLog *m_logTarget;
#endif // wxUSE_LOG
- // the notebook containing the test pages
- wxNotebook *m_notebook;
+ // the book containing the test pages
+ wxBookCtrl *m_book;
// and the image list for it
wxImageList *m_imaglist;
m_lboxLog = (wxListBox *)NULL;
m_logTarget = (wxLog *)NULL;
#endif // wxUSE_LOG
- m_notebook = (wxNotebook *)NULL;
+ m_book = (wxBookCtrl *)NULL;
m_imaglist = (wxImageList *)NULL;
#if wxUSE_MENUS
wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
- // we have 2 panes: notebook which pages demonstrating the controls in the
+ // we have 2 panes: book which pages demonstrating the controls in the
// upper one and the log window with some buttons in the lower
- m_notebook = new wxNotebook(m_panel, wxID_ANY, wxDefaultPosition,
- wxDefaultSize, wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN);
- InitNotebook();
+ m_book = new wxBookCtrl(m_panel, wxID_ANY, wxDefaultPosition,
+ wxDefaultSize, wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN|wxBC_DEFAULT);
+ InitBook();
// the lower one only has the log listbox and a button to clear it
#if wxUSE_LOG
sizerDown->Add(sizerBtns, 0, wxALL | wxALIGN_RIGHT, 5);
// put everything together
- sizerTop->Add(m_notebook, 1, wxGROW | (wxALL & ~(wxTOP | wxBOTTOM)), 10);
+ sizerTop->Add(m_book, 1, wxGROW | (wxALL & ~(wxTOP | wxBOTTOM)), 10);
sizerTop->Add(0, 5, 0, wxGROW); // spacer in between
sizerTop->Add(sizerDown, 0, wxGROW | (wxALL & ~wxTOP), 10);
#endif
}
-void WidgetsFrame::InitNotebook()
+void WidgetsFrame::InitBook()
{
m_imaglist = new wxImageList(32, 32);
ArrayWidgetsPage pages;
wxArrayString labels;
- // we need to first create all pages and only then add them to the notebook
+ // we need to first create all pages and only then add them to the book
// as we need the image list first
WidgetsPageInfo *info = WidgetsPage::ms_widgetPages;
while ( info )
{
- WidgetsPage *page = (*info->GetCtor())(m_notebook, m_imaglist);
+ WidgetsPage *page = (*info->GetCtor())(m_book, m_imaglist);
pages.Add(page);
labels.Add(info->GetLabel());
info = info->GetNext();
}
- m_notebook->SetImageList(m_imaglist);
+ m_book->SetImageList(m_imaglist);
// now do add them
size_t count = pages.GetCount();
for ( size_t n = 0; n < count; n++ )
{
- m_notebook->AddPage(
- pages[n],
- labels[n],
- false, // don't select
- n // image id
- );
+ m_book->AddPage(
+ pages[n],
+ labels[n],
+ false, // don't select
+ n // image id
+ );
}
}
m_colFg = col;
- WidgetsPage *page = wxStaticCast(m_notebook->GetCurrentPage(), WidgetsPage);
+ WidgetsPage *page = wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
page->GetWidget()->SetForegroundColour(m_colFg);
page->GetWidget()->Refresh();
}
m_colBg = col;
- WidgetsPage *page = wxStaticCast(m_notebook->GetCurrentPage(), WidgetsPage);
+ WidgetsPage *page = wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
page->GetWidget()->SetBackgroundColour(m_colBg);
page->GetWidget()->Refresh();
}
// WidgetsPage
// ----------------------------------------------------------------------------
-WidgetsPage::WidgetsPage(wxNotebook *notebook)
- : wxPanel(notebook, wxID_ANY,
+WidgetsPage::WidgetsPage(wxBookCtrl *book)
+ : wxPanel(book, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
wxNO_FULL_REPAINT_ON_RESIZE |
wxCLIP_CHILDREN |
#define _WX_SAMPLE_WIDGETS_H_
class WXDLLEXPORT wxCheckBox;
-class WXDLLEXPORT wxNotebook;
+class WXDLLEXPORT wxBookCtrl;
class WXDLLEXPORT wxSizer;
class WXDLLEXPORT wxTextCtrl;
#include "wx/imaglist.h"
// ----------------------------------------------------------------------------
-// WidgetsPage: a notebook page demonstrating some widget
+// WidgetsPage: a book page demonstrating some widget
// ----------------------------------------------------------------------------
class WidgetsPage : public wxPanel
{
public:
- WidgetsPage(wxNotebook *notebook);
+ WidgetsPage(wxBookCtrl *book);
// return the control shown by this page
virtual wxControl *GetWidget() const = 0;
class WidgetsPageInfo
{
public:
- typedef WidgetsPage *(*Constructor)(wxNotebook *notebook,
+ typedef WidgetsPage *(*Constructor)(wxBookCtrl *book,
wxImageList *imaglist);
// our ctor
// and this one must be inserted somewhere in the source file
#define IMPLEMENT_WIDGETS_PAGE(classname, label) \
- WidgetsPage *wxCtorFor##classname(wxNotebook *notebook, \
+ WidgetsPage *wxCtorFor##classname(wxBookCtrl *book, \
wxImageList *imaglist) \
- { return new classname(notebook, imaglist); } \
+ { return new classname(book, imaglist); } \
WidgetsPageInfo classname:: \
ms_info##classname(wxCtorFor##classname, label)
///////////////////////////////////////////////////////////////////////////////
// Name: common/bookctrl.cpp
-// Purpose: wxBookCtrl implementation
+// Purpose: wxBookCtrlBase implementation
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.08.03
// constructors and destructors
// ----------------------------------------------------------------------------
-void wxBookCtrl::Init()
+void wxBookCtrlBase::Init()
{
m_imageList = NULL;
m_ownsImageList = false;
}
bool
-wxBookCtrl::Create(wxWindow *parent,
+wxBookCtrlBase::Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
);
}
-wxBookCtrl::~wxBookCtrl()
+wxBookCtrlBase::~wxBookCtrlBase()
{
if ( m_ownsImageList )
{
// image list
// ----------------------------------------------------------------------------
-void wxBookCtrl::SetImageList(wxImageList *imageList)
+void wxBookCtrlBase::SetImageList(wxImageList *imageList)
{
if ( m_ownsImageList )
{
m_imageList = imageList;
}
-void wxBookCtrl::AssignImageList(wxImageList* imageList)
+void wxBookCtrlBase::AssignImageList(wxImageList* imageList)
{
SetImageList(imageList);
// geometry
// ----------------------------------------------------------------------------
-void wxBookCtrl::SetPageSize(const wxSize& size)
+void wxBookCtrlBase::SetPageSize(const wxSize& size)
{
SetClientSize(CalcSizeFromPage(size));
}
-wxSize wxBookCtrl::DoGetBestSize() const
+wxSize wxBookCtrlBase::DoGetBestSize() const
{
wxSize bestSize;
// ----------------------------------------------------------------------------
bool
-wxBookCtrl::InsertPage(size_t nPage,
- wxWindow *page,
- const wxString& WXUNUSED(text),
- bool WXUNUSED(bSelect),
- int WXUNUSED(imageId))
+wxBookCtrlBase::InsertPage(size_t nPage,
+ wxWindow *page,
+ const wxString& WXUNUSED(text),
+ bool WXUNUSED(bSelect),
+ int WXUNUSED(imageId))
{
- wxCHECK_MSG( page, false, _T("NULL page in wxBookCtrl::InsertPage()") );
+ wxCHECK_MSG( page, false, _T("NULL page in wxBookCtrlBase::InsertPage()") );
wxCHECK_MSG( nPage <= m_pages.size(), false,
- _T("invalid page index in wxBookCtrl::InsertPage()") );
+ _T("invalid page index in wxBookCtrlBase::InsertPage()") );
m_pages.Insert(page, nPage);
InvalidateBestSize();
return true;
}
-bool wxBookCtrl::DeletePage(size_t nPage)
+bool wxBookCtrlBase::DeletePage(size_t nPage)
{
wxWindow *page = DoRemovePage(nPage);
if ( !page )
return true;
}
-wxWindow *wxBookCtrl::DoRemovePage(size_t nPage)
+wxWindow *wxBookCtrlBase::DoRemovePage(size_t nPage)
{
wxCHECK_MSG( nPage < m_pages.size(), NULL,
- _T("invalid page index in wxBookCtrl::DoRemovePage()") );
+ _T("invalid page index in wxBookCtrlBase::DoRemovePage()") );
wxWindow *pageRemoved = m_pages[nPage];
m_pages.RemoveAt(nPage);
return pageRemoved;
}
-int wxBookCtrl::GetNextPage(bool forward) const
+int wxBookCtrlBase::GetNextPage(bool forward) const
{
int nPage;
#if wxUSE_BOOKCTRL
-wxBookCtrlSizer::wxBookCtrlSizer(wxBookCtrl *bookctrl)
+wxBookCtrlSizer::wxBookCtrlSizer(wxBookCtrlBase *bookctrl)
: m_bookctrl(bookctrl)
{
wxASSERT_MSG( bookctrl, wxT("wxBookCtrlSizer needs a control") );
const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED = wxNewEventType();
const int wxID_CHOICEBOOKCHOICE = wxNewId();
-BEGIN_EVENT_TABLE(wxChoicebook, wxBookCtrl)
+BEGIN_EVENT_TABLE(wxChoicebook, wxBookCtrlBase)
EVT_SIZE(wxChoicebook::OnSize)
EVT_CHOICE(wxID_CHOICEBOOKCHOICE, wxChoicebook::OnChoiceSelected)
END_EVENT_TABLE()
{
// TODO: can be implemented in form of static bitmap near choice control
- wxBookCtrl::SetImageList(imageList);
+ wxBookCtrlBase::SetImageList(imageList);
}
// ----------------------------------------------------------------------------
bool bSelect,
int imageId)
{
- if ( !wxBookCtrl::InsertPage(n, page, text, bSelect, imageId) )
+ if ( !wxBookCtrlBase::InsertPage(n, page, text, bSelect, imageId) )
return false;
m_choice->Insert(text, n);
wxWindow *wxChoicebook::DoRemovePage(size_t page)
{
const int page_count = GetPageCount();
- wxWindow *win = wxBookCtrl::DoRemovePage(page);
+ wxWindow *win = wxBookCtrlBase::DoRemovePage(page);
if ( win )
{
bool wxChoicebook::DeleteAllPages()
{
m_choice->Clear();
- return wxBookCtrl::DeleteAllPages();
+ return wxBookCtrlBase::DeleteAllPages();
}
// ----------------------------------------------------------------------------
const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED = wxNewEventType();
const int wxID_LISTBOOKLISTVIEW = wxNewId();
-BEGIN_EVENT_TABLE(wxListbook, wxBookCtrl)
+BEGIN_EVENT_TABLE(wxListbook, wxBookCtrlBase)
EVT_SIZE(wxListbook::OnSize)
EVT_LIST_ITEM_SELECTED(wxID_LISTBOOKLISTVIEW, wxListbook::OnListSelected)
END_EVENT_TABLE()
{
m_list->SetImageList(imageList, wxIMAGE_LIST_NORMAL);
- wxBookCtrl::SetImageList(imageList);
+ wxBookCtrlBase::SetImageList(imageList);
}
// ----------------------------------------------------------------------------
bool bSelect,
int imageId)
{
- if ( !wxBookCtrl::InsertPage(n, page, text, bSelect, imageId) )
+ if ( !wxBookCtrlBase::InsertPage(n, page, text, bSelect, imageId) )
return false;
m_list->InsertItem(n, text, imageId);
wxWindow *wxListbook::DoRemovePage(size_t page)
{
const int page_count = GetPageCount();
- wxWindow *win = wxBookCtrl::DoRemovePage(page);
+ wxWindow *win = wxBookCtrlBase::DoRemovePage(page);
if ( win )
{
bool wxListbook::DeleteAllPages()
{
m_list->DeleteAllItems();
- return wxBookCtrl::DeleteAllPages();
+ return wxBookCtrlBase::DeleteAllPages();
}
// ----------------------------------------------------------------------------