#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[];
// NOTE: wxFileDirPickerCtrlBase will allocate a wx{File|Dir}PickerWidget and this
// requires that all classes being mapped as wx{File|Dir}PickerWidget have the
// same prototype for the contructor...
-#if defined(__WXGTK26__) // since GTK >= 2.6, there is GtkFileButton
+// since GTK >= 2.6, there is GtkFileButton
+#if defined(__WXGTK26__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/filepicker.h"
#define wxFilePickerWidget wxFileButton
#define wxDirPickerWidget wxDirButton
validator, name);
}
+ void SetFileName(const wxFileName &filename)
+ { SetPath(filename.GetFullPath()); }
+
+ wxFileName GetFileName() const
+ { return wxFileName(GetPath()); }
public: // overrides
);
}
+ void SetDirName(const wxFileName &dirname)
+ { SetPath(dirname.GetPath()); }
+
+ wxFileName GetDirName() const
+ { return wxFileName::DirName(GetPath()); }
public: // overrides
#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