X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/82540105e3a6fe20d8d65d3badbd1389bef20e92..d23bf09c7fbbe4f026d61043e55c81cfc4a6bef2:/include/wx/filepicker.h diff --git a/include/wx/filepicker.h b/include/wx/filepicker.h index 360f12c75e..8423c65f26 100644 --- a/include/wx/filepicker.h +++ b/include/wx/filepicker.h @@ -17,6 +17,7 @@ #if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL #include "wx/pickerbase.h" +#include "wx/filename.h" class WXDLLIMPEXP_CORE wxDialog; class WXDLLIMPEXP_CORE wxFileDirPickerEvent; @@ -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