// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "notebookbase.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// default because not all ports implement this
wxSize sizeTotal = sizePage;
- if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
+ if ( HasFlag(wxBK_LEFT) || HasFlag(wxBK_RIGHT) )
{
sizeTotal.x += 90;
sizeTotal.y += 10;
return sizeTotal;
}
-#endif // wxUSE_NOTEBOOK
+// ----------------------------------------------------------------------------
+// events
+// ----------------------------------------------------------------------------
+
+bool wxNotebookBase::SendPageChangingEvent(int nPage)
+{
+ wxNotebookEvent 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)
+{
+ wxNotebookEvent 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