avoid conflict between wxBookCtrlBase::DoSetSelection() and the derived classes; refactor more common code into the base class

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-10-09 21:29:12 +00:00
parent 6500a868fe
commit deb325e3b2
8 changed files with 60 additions and 41 deletions

View File

@@ -84,18 +84,14 @@ protected:
// get the size which the choice control should have
virtual wxSize GetControllerSize() const;
int DoSetSelection(size_t nPage, int flags = 0);
void UpdateSelectedPage(size_t newsel)
{
m_selection = newsel;
GetChoiceCtrl()->Select(newsel);
}
void MakeChangedEvent(wxBookCtrlBaseEvent &event)
{
event.SetEventType(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED);
}
wxBookCtrlBaseEvent* CreatePageChangingEvent() const;
void MakeChangedEvent(wxBookCtrlBaseEvent &event);
// event handlers
void OnChoiceSelected(wxCommandEvent& event);