X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..b4e7f826aff0f60826543bec9e1cb3fbcbeb0589:/wxPython/src/_toolbar.i diff --git a/wxPython/src/_toolbar.i b/wxPython/src/_toolbar.i index e2c32e77a8..4286bb886f 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(); @@ -303,9 +302,8 @@ public: shortHelp, longHelp, clientData) } - // TODO? - //wxToolBarToolBase *AddTool (wxToolBarToolBase *tool); - //wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool); + %name(AddToolItem) wxToolBarToolBase *AddTool (wxToolBarToolBase *tool); + %name(InsertToolItem) wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool); wxToolBarToolBase *AddControl(wxControl *control); wxToolBarToolBase *InsertControl(size_t pos, wxControl *control); @@ -376,7 +374,10 @@ public: // there is no tool at this point (corrdinates are client) wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y); - // return TRUE if this is a vertical toolbar, otherwise FALSE + // find the tool by id + wxToolBarToolBase *FindById(int toolid) const; + + // return True if this is a vertical toolbar, otherwise False bool IsVertical(); }; @@ -385,8 +386,8 @@ public: class wxToolBar : public wxToolBarBase { public: - %addtofunc wxToolBar "self._setOORInfo(self)" - %addtofunc wxToolBar() "" + %pythonAppend wxToolBar "self._setOORInfo(self)" + %pythonAppend wxToolBar() "" wxToolBar(wxWindow *parent, wxWindowID id,