X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad09ec03f20ca37083639c5d95ad586b32d13494..77c8efc8c37da6d6a5e2e8022d21d1cd7d76371d:/include/wx/generic/dirctrlg.h diff --git a/include/wx/generic/dirctrlg.h b/include/wx/generic/dirctrlg.h index 8d9a3cef5d..af6ab5de58 100644 --- a/include/wx/generic/dirctrlg.h +++ b/include/wx/generic/dirctrlg.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dirctrlg.h +// Name: wx/generic/dirctrlg.h // Purpose: wxGenericDirCtrl class // Builds on wxDirCtrl class written by Robert Roebling for the // wxFile application, modified by Harm van der Heijden. @@ -111,6 +111,7 @@ public: void OnCollapseItem(wxTreeEvent &event ); void OnBeginEditItem(wxTreeEvent &event ); void OnEndEditItem(wxTreeEvent &event ); + void OnTreeSelChange(wxTreeEvent &event); void OnSize(wxSizeEvent &event ); // Try to expand as much of the given path as possible. @@ -161,6 +162,8 @@ public: // If the path string has been used (we're at the leaf), done is set to true virtual wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done); + wxString GetPath(wxTreeItemId itemId) const; + // Resize the components of the control virtual void DoResize(); @@ -189,6 +192,9 @@ protected: bool ExtractWildcard(const wxString& filterStr, int n, wxString& filter, wxString& description); private: + void PopulateNode(wxTreeItemId node); + wxDirItemData* GetItemData(wxTreeItemId itemId); + bool m_showHidden; wxTreeItemId m_rootId; wxString m_defaultPath; // Starting path @@ -205,6 +211,13 @@ private: wxDECLARE_NO_COPY_CLASS(wxGenericDirCtrl); }; +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRCTRL_CHANGED, wxTreeEvent ); + +#define wx__DECLARE_DIRCTRL_EVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_DIRCTRL_ ## evt, id, wxTreeEventHandler(fn)) + +#define EVT_DIRCTRL_CHANGED(id, fn) wx__DECLARE_DIRCTRL_EVT(CHANGED, id, fn) + //----------------------------------------------------------------------------- // wxDirFilterListCtrl //-----------------------------------------------------------------------------