X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b8c7ba607a15a2ff8a04448138df9ffff7df6c5..32485259c1342115488d219776dfebeb3d4d81b1:/wxPython/src/_notebook.i?ds=sidebyside diff --git a/wxPython/src/_notebook.i b/wxPython/src/_notebook.i index aa897f2220..472cd23e74 100644 --- a/wxPython/src/_notebook.i +++ b/wxPython/src/_notebook.i @@ -15,7 +15,7 @@ //--------------------------------------------------------------------------- -MAKE_CONST_WXSTRING(NOTEBOOK_NAME); +MAKE_CONST_WXSTRING(NotebookNameStr); //--------------------------------------------------------------------------- %newgroup @@ -154,6 +154,7 @@ enum { wxNB_RIGHT, wxNB_BOTTOM, wxNB_MULTILINE, + wxNB_NOPAGETHEME, // hittest flags wxNB_HITTEST_NOWHERE = 1, // not on tab @@ -178,7 +179,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPyNOTEBOOK_NAME); + const wxString& name = wxPyNotebookNameStr); %RenameCtor(PreNotebook, wxNotebook()); // Turn it back on again @@ -189,7 +190,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxPyNOTEBOOK_NAME); + const wxString& name = wxPyNotebookNameStr); // get the number of rows for a control with wxNB_MULTILINE style (not all @@ -213,6 +214,10 @@ wx.NB_HITTEST flags.", ""); // implement some base class functions virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; + // On platforms that support it, get the theme page background colour, + // else invalid colour + wxColour GetThemeBackgroundColour() const; + static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; @@ -245,8 +250,8 @@ public: class NotebookPage(wx.Panel): """ There is an old (and apparently unsolvable) bug when placing a - window with a nonstandard background colour in a wxNotebook on - wxGTK, as the notbooks's background colour would always be used + window with a nonstandard background colour in a wx.Notebook on + wxGTK1, as the notbooks's background colour would always be used when the window is refreshed. The solution is to place a panel in the notbook and the coloured window on the panel, sized to cover the panel. This simple class does that for you, just put an @@ -258,7 +263,7 @@ class NotebookPage(wx.Panel): style=wx.TAB_TRAVERSAL, name="panel"): wx.Panel.__init__(self, parent, id, pos, size, style, name) self.child = None - EVT_SIZE(self, self.OnSize) + self.Bind(wx.EVT_SIZE, self.OnSize) def OnSize(self, evt): if self.child is None: @@ -383,7 +388,10 @@ public: // returns true if we have wxCHB_TOP or wxCHB_BOTTOM style - bool IsVertical() const { return HasFlag(wxCHB_BOTTOM | wxCHB_TOP); } + bool IsVertical() const; + + // returns the choice control + wxChoice* GetChoiceCtrl() const; virtual bool DeleteAllPages(); }; @@ -407,6 +415,7 @@ public: //--------------------------------------------------------------------------- %newgroup; +// WXWIN_COMPATIBILITY_2_4 class wxBookCtrlSizer: public wxSizer { @@ -432,9 +441,8 @@ public: wxNotebook *GetNotebook(); }; - -%pythoncode { NotebookSizer = wx._deprecated(NotebookSizer, "NotebookSizer is no longer needed.") } -%pythoncode { BookCtrlSizer = wx._deprecated(BookCtrlSizer, "BookCtrlSizer is no longer needed.") } +%pythoncode { NotebookSizer.__init__ = wx._deprecated(NotebookSizer.__init__, "NotebookSizer is no longer needed.") } +%pythoncode { BookCtrlSizer.__init__ = wx._deprecated(BookCtrlSizer.__init__, "BookCtrlSizer is no longer needed.") } //---------------------------------------------------------------------------