X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d58c3ba28436561baeecfa5c6afb7ae1d772ff37..b5bc23fbcf4cf14be634c513c6601665d155801d:/wxPython/src/_notebook.i diff --git a/wxPython/src/_notebook.i b/wxPython/src/_notebook.i index 395720b69f..703c7718c6 100644 --- a/wxPython/src/_notebook.i +++ b/wxPython/src/_notebook.i @@ -28,7 +28,14 @@ enum { wxBK_LEFT, wxBK_RIGHT, wxBK_ALIGN_MASK, - wxBK_BUTTONBAR + wxBK_BUTTONBAR, + + // hittest flags + wxBK_HITTEST_NOWHERE = 1, // not on tab + wxBK_HITTEST_ONICON = 2, // on icon + wxBK_HITTEST_ONLABEL = 4, // on label + wxBK_HITTEST_ONITEM = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL, + wxBK_HITTEST_ONPAGE = 8, // not on tab control, but over the selected page }; @@ -147,6 +154,9 @@ public: // NB: this function will _not_ generate PAGE_CHANGING/ED events virtual int SetSelection(size_t n)/* = 0*/; + + // acts as SetSelection but does not generate events + virtual int ChangeSelection(size_t n)/* = 0*/; // cycle thru the pages void AdvanceSelection(bool forward = true); @@ -159,6 +169,19 @@ wx.NB_HITTEST flags.", ""); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + %property(ControlMargin, GetControlMargin, SetControlMargin, doc="See `GetControlMargin` and `SetControlMargin`"); + %property(ControlSizer, GetControlSizer, doc="See `GetControlSizer`"); + %property(CurrentPage, GetCurrentPage, doc="See `GetCurrentPage`"); + %property(FitToCurrentPage, GetFitToCurrentPage, SetFitToCurrentPage, doc="See `GetFitToCurrentPage` and `SetFitToCurrentPage`"); + %property(ImageList, GetImageList, SetImageList, doc="See `GetImageList` and `SetImageList`"); + %property(InternalBorder, GetInternalBorder, SetInternalBorder, doc="See `GetInternalBorder` and `SetInternalBorder`"); + %property(Page, GetPage, doc="See `GetPage`"); + %property(PageCount, GetPageCount, doc="See `GetPageCount`"); + %property(PageImage, GetPageImage, SetPageImage, doc="See `GetPageImage` and `SetPageImage`"); + %property(PageText, GetPageText, SetPageText, doc="See `GetPageText` and `SetPageText`"); + %property(Selection, GetSelection, SetSelection, doc="See `GetSelection` and `SetSelection`"); + }; @@ -175,6 +198,10 @@ public: // the page that was selected before the change (-1 if none) int GetOldSelection() const; void SetOldSelection(int nOldSel); + + %property(OldSelection, GetOldSelection, SetOldSelection, doc="See `GetOldSelection` and `SetOldSelection`"); + %property(Selection, GetSelection, SetSelection, doc="See `GetSelection` and `SetSelection`"); + }; @@ -192,13 +219,6 @@ enum { wxNB_MULTILINE, wxNB_NOPAGETHEME, - // hittest flags - wxBK_HITTEST_NOWHERE = 1, // not on tab - wxBK_HITTEST_ONICON = 2, // on icon - wxBK_HITTEST_ONLABEL = 4, // on label - wxBK_HITTEST_ONITEM = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL, - wxBK_HITTEST_ONPAGE = 8, // not on tab control, but over the selected page - // for backwards compatibility only wxNB_HITTEST_NOWHERE, wxNB_HITTEST_ONICON, @@ -255,6 +275,16 @@ public: static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // returns false if the change to nPage is vetoed by the program + bool SendPageChangingEvent(int nPage); + + // sends the event about page change from old to new (or GetSelection() if + // new is -1) + void SendPageChangedEvent(int nPageOld, int nPageNew = -1); + + %property(RowCount, GetRowCount, doc="See `GetRowCount`"); + %property(ThemeBackgroundColour, GetThemeBackgroundColour, doc="See `GetThemeBackgroundColour`"); }; @@ -357,6 +387,7 @@ public: const wxString& name = wxPyEmptyString); wxListView* GetListView(); + %property(ListView, GetListView, doc="See `GetListView`"); }; @@ -423,6 +454,9 @@ public: wxChoice* GetChoiceCtrl() const; virtual bool DeleteAllPages(); + + %property(ChoiceCtrl, GetChoiceCtrl, doc="See `GetChoiceCtrl`"); + }; @@ -529,8 +563,9 @@ public: int GetPageParent(size_t pos) const; // the tree control we use for showing the pages index tree - wxTreeCtrl* GetTreeCtrl() const; + wxPyTreeCtrl* GetTreeCtrl() const; + %property(TreeCtrl, GetTreeCtrl, doc="See `GetTreeCtrl`"); }; @@ -590,6 +625,8 @@ public: // Not part of the wxBookctrl API, but must be called in OnIdle or // by application to realize the toolbar and select the initial page. void Realize(); + + %property(ToolBar, GetToolBar, doc="See `GetToolBar`"); };