X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/82540105e3a6fe20d8d65d3badbd1389bef20e92..e93523680ba3c83cdae75b511214c82f28a2d853:/include/wx/filepicker.h diff --git a/include/wx/filepicker.h b/include/wx/filepicker.h index 360f12c75e..a71f69f9ea 100644 --- a/include/wx/filepicker.h +++ b/include/wx/filepicker.h @@ -17,9 +17,10 @@ #if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL #include "wx/pickerbase.h" +#include "wx/filename.h" -class WXDLLIMPEXP_CORE wxDialog; -class WXDLLIMPEXP_CORE wxFileDirPickerEvent; +class WXDLLIMPEXP_FWD_CORE wxDialog; +class WXDLLIMPEXP_FWD_CORE wxFileDirPickerEvent; extern WXDLLEXPORT_DATA(const wxChar) wxFilePickerWidgetLabel[]; extern WXDLLEXPORT_DATA(const wxChar) wxFilePickerWidgetNameStr[]; @@ -215,6 +216,11 @@ public: validator, name); } + void SetFileName(const wxFileName &filename) + { SetPath(filename.GetFullPath()); } + + wxFileName GetFileName() const + { return wxFileName(GetPath()); } public: // overrides @@ -307,6 +313,11 @@ public: ); } + void SetDirName(const wxFileName &dirname) + { SetPath(dirname.GetPath()); } + + wxFileName GetDirName() const + { return wxFileName::DirName(GetPath()); } public: // overrides @@ -391,13 +402,6 @@ typedef void (wxEvtHandler::*wxFileDirPickerEventFunction)(wxFileDirPickerEvent& #define EVT_DIRPICKER_CHANGED(id, fn) \ wx__DECLARE_EVT1(wxEVT_COMMAND_DIRPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) -#ifdef _WX_DEFINE_DATE_EVENTS_ - DEFINE_EVENT_TYPE(wxEVT_COMMAND_FILEPICKER_CHANGED) - DEFINE_EVENT_TYPE(wxEVT_COMMAND_DIRPICKER_CHANGED) - - IMPLEMENT_DYNAMIC_CLASS(wxFileDirPickerEvent, wxCommandEvent) -#endif - #endif // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL