X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b60e45d16a1e1f1d7afd7dd0c8b96a6cfd35f9ec..015fd9ef4833ec3d8b0043a1c7e448c8be4f734a:/wxPython/src/_notebook.i diff --git a/wxPython/src/_notebook.i b/wxPython/src/_notebook.i index baff847c76..ab17747cd7 100644 --- a/wxPython/src/_notebook.i +++ b/wxPython/src/_notebook.i @@ -22,6 +22,8 @@ MAKE_CONST_WXSTRING(NOTEBOOK_NAME); // TODO: Virtualize this class so other book controls can be derived in Python +MustHaveApp(wxBookCtrl); + // Common base class for wxList/Tree/Notebook class wxBookCtrl : public wxControl { @@ -64,8 +66,9 @@ public: virtual void SetImageList(wxImageList *imageList); // as SetImageList() but we will delete the image list ourselves - %addtofunc AssignImageList "args[1].thisown = 0" + %apply SWIGTYPE *DISOWN { wxImageList *imageList }; void AssignImageList(wxImageList *imageList); + %clear wxImageList *imageList; // get pointer (may be NULL) to the associated image list wxImageList* GetImageList() const; @@ -114,6 +117,9 @@ public: // cycle thru the pages void AdvanceSelection(bool forward = True); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; @@ -156,13 +162,15 @@ enum { +MustHaveApp(wxNotebook); + class wxNotebook : public wxBookCtrl { public: - %addtofunc wxNotebook "self._setOORInfo(self)" - %addtofunc wxNotebook() "" + %pythonAppend wxNotebook "self._setOORInfo(self)" + %pythonAppend wxNotebook() "" wxNotebook(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -170,7 +178,7 @@ public: %name(PreNotebook)wxNotebook(); bool Create(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -192,7 +200,8 @@ public: 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."); + "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; @@ -201,6 +210,9 @@ public: // Windows only: attempts to apply the UX theme page background to this page void ApplyThemeBackground(wxWindow* window, const wxColour& colour); #endif + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; @@ -278,15 +290,17 @@ enum +MustHaveApp(wxListbook); + // wxListCtrl and wxNotebook combination class wxListbook : public wxBookCtrl { public: - %addtofunc wxListbook "self._setOORInfo(self)" - %addtofunc wxListbook() "" + %pythonAppend wxListbook "self._setOORInfo(self)" + %pythonAppend wxListbook() "" wxListbook(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -294,7 +308,7 @@ public: %name(PreListbook)wxListbook(); bool Create(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -331,7 +345,7 @@ public: class wxBookCtrlSizer: public wxSizer { public: - %addtofunc wxBookCtrlSizer "self._setOORInfo(self)" + %pythonAppend wxBookCtrlSizer "self._setOORInfo(self)" wxBookCtrlSizer( wxBookCtrl *nb ); @@ -343,7 +357,7 @@ public: class wxNotebookSizer: public wxSizer { public: - %addtofunc wxNotebookSizer "self._setOORInfo(self)" + %pythonAppend wxNotebookSizer "self._setOORInfo(self)" wxNotebookSizer( wxNotebook *nb );