]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/toolbkg.cpp
Added list style to text attributes, independent from paragraph style
[wxWidgets.git] / src / generic / toolbkg.cpp
index fbfbd0b0bc1a04c237e3e1ddedf8c499c4af2498..310c29ab71d29dbc5eb4beaec420a652bc9b3a6e 100644 (file)
@@ -245,10 +245,20 @@ int wxToolbook::GetSelection() const
     return m_selection;
 }
 
-int wxToolbook::DoSetSelection(size_t n, int flags)
+wxBookCtrlBaseEvent* wxToolbook::CreatePageChangingEvent() const
 {
-    wxToolbookEvent event(wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, m_windowId);
-    return wxBookCtrlBase::DoSetSelection(n, flags, event);
+    return new wxToolbookEvent(wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, m_windowId);
+}
+
+void wxToolbook::MakeChangedEvent(wxBookCtrlBaseEvent &event)
+{
+    event.SetEventType(wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED);
+}
+
+void wxToolbook::UpdateSelectedPage(size_t newsel)
+{
+    m_selection = newsel;
+    GetToolBar()->ToggleTool(newsel + 1, true);
 }
 
 // Not part of the wxBookctrl API, but must be called in OnIdle or