X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8522a5458b88cb8890c3481a09bb3b2b1e5a58fd..ca77701441e39245dcbfce903049e76f166979e5:/include/wx/generic/filectrlg.h?ds=sidebyside diff --git a/include/wx/generic/filectrlg.h b/include/wx/generic/filectrlg.h index 307cde3c29..9bcc5d08d6 100644 --- a/include/wx/generic/filectrlg.h +++ b/include/wx/generic/filectrlg.h @@ -14,22 +14,23 @@ #if wxUSE_FILECTRL -#include "wx/panel.h" +#include "wx/containr.h" #include "wx/listctrl.h" #include "wx/filectrl.h" +#include "wx/filename.h" class WXDLLIMPEXP_FWD_CORE wxCheckBox; class WXDLLIMPEXP_FWD_CORE wxChoice; class WXDLLIMPEXP_FWD_CORE wxStaticText; class WXDLLIMPEXP_FWD_CORE wxTextCtrl; -extern WXDLLEXPORT_DATA(const wxChar) wxFileSelectorDefaultWildcardStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxFileSelectorDefaultWildcardStr[]; //----------------------------------------------------------------------------- // wxFileData - a class to hold the file info for the wxFileListCtrl //----------------------------------------------------------------------------- -class WXDLLEXPORT wxFileData +class WXDLLIMPEXP_CORE wxFileData { public: enum fileType @@ -124,7 +125,7 @@ private: // wxFileListCtrl //----------------------------------------------------------------------------- -class WXDLLEXPORT wxFileListCtrl : public wxListCtrl +class WXDLLIMPEXP_CORE wxFileListCtrl : public wxListCtrl { public: wxFileListCtrl(); @@ -181,7 +182,7 @@ private: DECLARE_EVENT_TABLE() }; -class WXDLLIMPEXP_CORE wxGenericFileCtrl : public wxPanel, +class WXDLLIMPEXP_CORE wxGenericFileCtrl : public wxNavigationEnabled, public wxFileCtrlBase { public: @@ -247,6 +248,12 @@ public: void GoToParentDir(); void GoToHomeDir(); + // get the directory currently shown in the control: this can be different + // from GetDirectory() if the user entered a full path (with a path other + // than the one currently shown in the control) in the text control + // manually + wxString GetShownDirectory() const { return m_list->GetDir(); } + wxFileListCtrl *GetFileList() { return m_list; } void ChangeToReportMode() { m_list->ChangeToReportMode(); } @@ -264,9 +271,11 @@ private: void DoSetFilterIndex( int filterindex ); void UpdateControls(); - wxString DoGetFilename( const bool fullPath ) const; - void DoGetFilenames( wxArrayString& filenames, const bool fullPath ) const; - wxString GetProperFileListDir() const; + + // the first of these methods can only be used for the controls with single + // selection (i.e. without wxFC_MULTIPLE style), the second one in any case + wxFileName DoGetFileName() const; + void DoGetFilenames( wxArrayString& filenames, bool fullPath ) const; int m_style;