X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/322913cef36b156a4a9722ce6a68845e3219e615..a0ef52c0383af9624f257cf2d999c1995146ab5f:/wxPython/src/_dirctrl.i?ds=sidebyside diff --git a/wxPython/src/_dirctrl.i b/wxPython/src/_dirctrl.i index 98549692b9..0486a1bf4c 100644 --- a/wxPython/src/_dirctrl.i +++ b/wxPython/src/_dirctrl.i @@ -15,9 +15,7 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(DirDialogDefaultFolderStr); -%} +MAKE_CONST_WXSTRING(DirDialogDefaultFolderStr); //--------------------------------------------------------------------------- %newgroup @@ -56,11 +54,13 @@ public: +MustHaveApp(wxGenericDirCtrl); + class wxGenericDirCtrl: public wxControl { public: - %addtofunc wxGenericDirCtrl "self._setOORInfo(self)" - %addtofunc wxGenericDirCtrl() "" + %pythonAppend wxGenericDirCtrl "self._setOORInfo(self)" + %pythonAppend wxGenericDirCtrl() "" wxGenericDirCtrl(wxWindow *parent, const wxWindowID id = -1, const wxString& dir = wxPyDirDialogDefaultFolderStr, @@ -69,8 +69,8 @@ public: long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = wxPyEmptyString, int defaultFilter = 0, - const wxString& name = wxPy_TreeCtrlNameStr); - %name(PreGenericDirCtrl)wxGenericDirCtrl(); + const wxString& name = wxPyTreeCtrlNameStr); + %RenameCtor(PreGenericDirCtrl, wxGenericDirCtrl()); bool Create(wxWindow *parent, const wxWindowID id = -1, @@ -80,13 +80,14 @@ public: long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = wxPyEmptyString, int defaultFilter = 0, - const wxString& name = wxPy_TreeCtrlNameStr); + const wxString& name = wxPyTreeCtrlNameStr); // Try to expand as much of the given path as possible. virtual bool ExpandPath(const wxString& path); - + // collapse the path + virtual bool CollapsePath(const wxString& path); virtual inline wxString GetDefaultPath() const; virtual void SetDefaultPath(const wxString& path); @@ -110,7 +111,7 @@ public: virtual wxTreeItemId GetRootId(); - virtual wxTreeCtrl* GetTreeCtrl() const; + virtual wxPyTreeCtrl* GetTreeCtrl() const; virtual wxDirFilterListCtrl* GetFilterListCtrl() const; @@ -120,9 +121,11 @@ public: DocDeclAStr( virtual wxTreeItemId, FindChild(wxTreeItemId parentId, const wxString& path, bool& OUTPUT), "FindChild(wxTreeItemId parentId, wxString path) -> (item, done)", - "Find the child that matches the first part of 'path'. E.g. if a child path is\n" - "\"/usr\" and 'path' is \"/usr/include\" then the child for /usr is returned.\n" - "If the path string has been used (we're at the leaf), done is set to True\n"); + "Find the child that matches the first part of 'path'. E.g. if a child +path is \"/usr\" and 'path' is \"/usr/include\" then the child for +/usr is returned. If the path string has been used (we're at the +leaf), done is set to True. +", ""); // Resize the components of the control @@ -136,17 +139,19 @@ public: +MustHaveApp(wxDirFilterListCtrl); + class wxDirFilterListCtrl: public wxChoice { public: - %addtofunc wxDirFilterListCtrl "self._setOORInfo(self)" - %addtofunc wxDirFilterListCtrl() "" + %pythonAppend wxDirFilterListCtrl "self._setOORInfo(self)" + %pythonAppend wxDirFilterListCtrl() "" wxDirFilterListCtrl(wxGenericDirCtrl* parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); - %name(PreDirFilterListCtrl)wxDirFilterListCtrl(); + %RenameCtor(PreDirFilterListCtrl, wxDirFilterListCtrl()); bool Create(wxGenericDirCtrl* parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,