X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a72f4631fe5ab7ebeefdacf8ec9c826ea962133f..f78e4942ec0f3f6abd2992502e2d6c5c2e8e55f6:/wxPython/src/_notebook.i diff --git a/wxPython/src/_notebook.i b/wxPython/src/_notebook.i index 0e14515827..aa897f2220 100644 --- a/wxPython/src/_notebook.i +++ b/wxPython/src/_notebook.i @@ -22,21 +22,21 @@ MAKE_CONST_WXSTRING(NOTEBOOK_NAME); // TODO: Virtualize this class so other book controls can be derived in Python -MustHaveApp(wxBookCtrl); +MustHaveApp(wxBookCtrlBase); // Common base class for wxList/Tree/Notebook -class wxBookCtrl : public wxControl +class wxBookCtrlBase : public wxControl { public: // This is an ABC, it can't be constructed... -// wxBookCtrl(wxWindow *parent, +// wxBookCtrlBase(wxWindow *parent, // wxWindowID id, // const wxPoint& pos = wxDefaultPosition, // const wxSize& size = wxDefaultSize, // long style = 0, // const wxString& name = wxPyEmptyString); -// %name(PreBookCtrl)wxBookCtrl(); +// %RenameCtor(PreBookCtrlBase, wxBookCtrlBase()); // bool Create(wxWindow *parent, // wxWindowID id, // const wxPoint& pos = wxDefaultPosition, @@ -51,6 +51,9 @@ public: // get the panel which represents the given page virtual wxWindow *GetPage(size_t n); + // get the current page or NULL if none + wxWindow* GetCurrentPage() const; + // get the currently selected page or wxNOT_FOUND if none virtual int GetSelection() const/* = 0*/; @@ -124,10 +127,10 @@ public: -class wxBookCtrlEvent : public wxNotifyEvent +class wxBookCtrlBaseEvent : public wxNotifyEvent { public: - wxBookCtrlEvent(wxEventType commandType = wxEVT_NULL, int id = 0, + wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int id = 0, int nSel = -1, int nOldSel = -1); // the currently selected page (-1 if none) @@ -164,7 +167,7 @@ enum { MustHaveApp(wxNotebook); -class wxNotebook : public wxBookCtrl { +class wxNotebook : public wxBookCtrlBase { public: %pythonAppend wxNotebook "self._setOORInfo(self)" %pythonAppend wxNotebook() "" @@ -176,7 +179,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyNOTEBOOK_NAME); - %name(PreNotebook)wxNotebook(); + %RenameCtor(PreNotebook, wxNotebook()); // Turn it back on again %typemap(out) wxNotebook* { $result = wxPyMake_wxObject($1, $owner); } @@ -210,18 +213,13 @@ wx.NB_HITTEST flags.", ""); // implement some base class functions virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; -#ifdef __WXMSW__ - // 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); }; -class wxNotebookEvent : public wxBookCtrlEvent +class wxNotebookEvent : public wxBookCtrlBaseEvent { public: wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, @@ -297,7 +295,7 @@ enum MustHaveApp(wxListbook); // wxListCtrl and wxNotebook combination -class wxListbook : public wxBookCtrl +class wxListbook : public wxBookCtrlBase { public: %pythonAppend wxListbook "self._setOORInfo(self)" @@ -309,7 +307,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyEmptyString); - %name(PreListbook)wxListbook(); + %RenameCtor(PreListbook, wxListbook()); bool Create(wxWindow *parent, wxWindowID id=-1, @@ -326,7 +324,7 @@ public: -class wxListbookEvent : public wxBookCtrlEvent +class wxListbookEvent : public wxBookCtrlBaseEvent { public: wxListbookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, @@ -361,7 +359,7 @@ enum { MustHaveApp(wxChoicebook); -class wxChoicebook : public wxBookCtrl +class wxChoicebook : public wxBookCtrlBase { public: %pythonAppend wxChoicebook "self._setOORInfo(self)" @@ -373,7 +371,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPyEmptyString); - %name(PreChoicebook)wxChoicebook(); + %RenameCtor(PreChoicebook, wxChoicebook()); // quasi ctor bool Create(wxWindow *parent, @@ -391,7 +389,7 @@ public: }; -class wxChoicebookEvent : public wxBookCtrlEvent +class wxChoicebookEvent : public wxBookCtrlBaseEvent { public: wxChoicebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, @@ -415,11 +413,11 @@ class wxBookCtrlSizer: public wxSizer public: %pythonAppend wxBookCtrlSizer "self._setOORInfo(self)" - wxBookCtrlSizer( wxBookCtrl *nb ); + wxBookCtrlSizer( wxBookCtrlBase *nb ); void RecalcSizes(); wxSize CalcMin(); - wxBookCtrl *GetControl(); + wxBookCtrlBase *GetControl(); }; @@ -434,4 +432,9 @@ public: wxNotebook *GetNotebook(); }; + +%pythoncode { NotebookSizer = wx._deprecated(NotebookSizer, "NotebookSizer is no longer needed.") } +%pythoncode { BookCtrlSizer = wx._deprecated(BookCtrlSizer, "BookCtrlSizer is no longer needed.") } + + //---------------------------------------------------------------------------