X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a6d2f5bb0242f872bcab8bc45b519afbf0adfa62..46ae103b9f08fc4e447d16a6a92b03cf55ee3189:/wxPython/src/_toolbar.i diff --git a/wxPython/src/_toolbar.i b/wxPython/src/_toolbar.i index e8ee8dad48..bb0a76de5d 100644 --- a/wxPython/src/_toolbar.i +++ b/wxPython/src/_toolbar.i @@ -15,9 +15,8 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(ToolBarNameStr); -%} +MAKE_CONST_WXSTRING_NOSWIG(ToolBarNameStr); + //--------------------------------------------------------------------------- %newgroup; @@ -60,13 +59,13 @@ class wxToolBarToolBase : public wxObject { public: // wxToolBarToolBase(wxToolBarBase *tbar = (wxToolBarBase *)NULL, // int id = wxID_SEPARATOR, -// const wxString& label = wxEmptyString, +// const wxString& label = wxPyEmptyString, // const wxBitmap& bmpNormal = wxNullBitmap, // const wxBitmap& bmpDisabled = wxNullBitmap, // wxItemKind kind = wxITEM_NORMAL, // wxObject *clientData = (wxObject *) NULL, -// const wxString& shortHelpString = wxEmptyString, -// const wxString& longHelpString = wxEmptyString) +// const wxString& shortHelpString = wxPyEmptyString, +// const wxString& longHelpString = wxPyEmptyString) // ~wxToolBarToolBase(); int GetId(); @@ -283,6 +282,7 @@ public: %# For consistency with the backwards compatible methods above, here are %# some non-'Label' versions of the Check and Radio methods + def AddCheckTool(self, id, bitmap, bmpDisabled = wx.NullBitmap, shortHelp = '', longHelp = '', @@ -303,8 +303,8 @@ public: shortHelp, longHelp, clientData) } - %name(AddToolItem) wxToolBarToolBase *AddTool (wxToolBarToolBase *tool); - %name(InsertToolItem) wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool); + %Rename(AddToolItem, wxToolBarToolBase*, AddTool (wxToolBarToolBase *tool)); + %Rename(InsertToolItem, wxToolBarToolBase*, InsertTool (size_t pos, wxToolBarToolBase *tool)); wxToolBarToolBase *AddControl(wxControl *control); wxToolBarToolBase *InsertControl(size_t pos, wxControl *control); @@ -353,7 +353,7 @@ public: void SetToolLongHelp(int id, const wxString& helpString); wxString GetToolLongHelp(int id); - %name(SetMarginsXY) void SetMargins(int x, int y); + %Rename(SetMarginsXY, void, SetMargins(int x, int y)); void SetMargins(const wxSize& size); void SetToolPacking(int packing); void SetToolSeparation(int separation); @@ -385,27 +385,36 @@ public: +MustHaveApp(wxToolBar); + class wxToolBar : public wxToolBarBase { public: - %addtofunc wxToolBar "self._setOORInfo(self)" - %addtofunc wxToolBar() "" - + %pythonAppend wxToolBar "self._setOORInfo(self)" + %pythonAppend wxToolBar() "" + %typemap(out) wxToolBar*; // turn off this typemap + wxToolBar(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString& name = wxPyToolBarNameStr); - %name(PreToolBar)wxToolBar(); + %RenameCtor(PreToolBar, wxToolBar()); + + // Turn it back on again + %typemap(out) wxToolBar* { $result = wxPyMake_wxObject($1, $owner); } bool Create(wxWindow *parent, - wxWindowID id, + wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString& name = wxPyToolBarNameStr); wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; //---------------------------------------------------------------------------