]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/filepicker.h
compilation fix for Borland C++
[wxWidgets.git] / include / wx / filepicker.h
index 360f12c75e7e85b0b2f8b645a9c85082cda3423d..a71f69f9eac948072339507660a9219cee6ced45 100644 (file)
 #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