X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6aabc8da32849c251b0ec87e339ef4485f35ebea..feffc1b546b896b64b24def29d03e1d404f92a70:/wxPython/src/_notebook.i diff --git a/wxPython/src/_notebook.i b/wxPython/src/_notebook.i index 8f2e0b4846..e654aa9ffa 100644 --- a/wxPython/src/_notebook.i +++ b/wxPython/src/_notebook.i @@ -27,7 +27,15 @@ enum { wxBK_BOTTOM, wxBK_LEFT, wxBK_RIGHT, - wxBK_ALIGN_MASK + wxBK_ALIGN_MASK, + 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 }; @@ -106,9 +114,16 @@ public: // returns true if we have wxCHB_TOP or wxCHB_BOTTOM style bool IsVertical() const; + // Sets/gets the margin around the controller + void SetControlMargin(int margin); + int GetControlMargin() const; + // set/get option to shrink to fit current page - void SetShrinkMode(bool shrink); - bool GetShrinkMode() const; + void SetFitToCurrentPage(bool fit); + bool GetFitToCurrentPage() const; + + // returns the sizer containing the control, if any + wxSizer* GetControlSizer() const; // remove one page from the control and delete it @@ -143,6 +158,12 @@ public: // cycle thru the pages void AdvanceSelection(bool forward = true); + DocDeclAStr( + virtual int, HitTest(const wxPoint& pt, long* OUTPUT) const, + "HitTest(Point pt) -> (tab, where)", + "Returns the page/tab which is hit, and flags indicating where using +wx.NB_HITTEST flags.", ""); + static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; @@ -178,12 +199,12 @@ enum { wxNB_MULTILINE, wxNB_NOPAGETHEME, - // hittest flags - wxNB_HITTEST_NOWHERE = 1, // not on tab - wxNB_HITTEST_ONICON = 2, // on icon - wxNB_HITTEST_ONLABEL = 4, // on label - wxNB_HITTEST_ONITEM = wxNB_HITTEST_ONICON | wxNB_HITTEST_ONLABEL, - + // for backwards compatibility only + wxNB_HITTEST_NOWHERE, + wxNB_HITTEST_ONICON, + wxNB_HITTEST_ONLABEL, + wxNB_HITTEST_ONITEM, + wxNB_HITTEST_ONPAGE, }; @@ -225,14 +246,6 @@ public: // set the size of the tabs for wxNB_FIXEDWIDTH controls virtual void SetTabSize(const wxSize& sz); - // hit test, returns which tab is hit and, optionally, where (icon, label) - // (not implemented on all platforms) - DocDeclAStr( - virtual int, HitTest(const wxPoint& pt, long* OUTPUT) const, - "HitTest(Point pt) -> (tab, where)", - "Returns the tab which is hit, and flags indicating where using -wx.NB_HITTEST flags.", ""); - // implement some base class functions virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; @@ -473,12 +486,11 @@ public: int imageId = wxNOT_FOUND); // Inserts a new sub-page to the end of children of the page at given pos. - %Rename(InsertSubPage, - virtual bool, AddSubPage(size_t pos, - wxWindow *page, - const wxString& text, - bool select = false, - int imageId = wxNOT_FOUND)); + virtual bool InsertSubPage(size_t pos, + wxWindow *page, + const wxString& text, + bool select = false, + int imageId = wxNOT_FOUND); // Adds a new page at top level after all other pages. virtual bool AddPage(wxWindow *page, @@ -517,7 +529,7 @@ public: int GetPageParent(size_t pos) const; // the tree control we use for showing the pages index tree - wxTreeCtrl* GetTreeCtrl() const; + wxPyTreeCtrl* GetTreeCtrl() const; };