// implementation
// ============================================================================
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
+
// ----------------------------------------------------------------------------
// geometry
// ----------------------------------------------------------------------------
return sizeTotal;
}
+// ----------------------------------------------------------------------------
+// events
+// ----------------------------------------------------------------------------
+
+bool wxNotebookBase::SendPageChangingEvent(int nPage)
+{
+ wxBookCtrlEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, GetId());
+ event.SetSelection(nPage);
+ event.SetOldSelection(GetSelection());
+ event.SetEventObject(this);
+ return !GetEventHandler()->ProcessEvent(event) || event.IsAllowed();
+}
+
+void wxNotebookBase::SendPageChangedEvent(int nPageOld, int nPageNew)
+{
+ wxBookCtrlEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, GetId());
+ event.SetSelection(nPageNew == -1 ? GetSelection() : nPageNew);
+ event.SetOldSelection(nPageOld);
+ event.SetEventObject(this);
+ GetEventHandler()->ProcessEvent(event);
+}
+
#endif // wxUSE_NOTEBOOK