]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/filepickerg.h
build fix
[wxWidgets.git] / include / wx / generic / filepickerg.h
index 51a019b8df483118f7f0fbf0071055a07d6f2918..59cae31c09d06bf4d20e96fe05824621b5a5c3da 100644 (file)
 #define _WX_FILEDIRPICKER_H_
 
 #include "wx/button.h"
-#include "wx/filename.h"
 #include "wx/filedlg.h"
 #include "wx/dirdlg.h"
 
 
-extern WXDLLEXPORT_DATA(const wxEventType) wxEVT_COMMAND_DIRPICKER_CHANGED;
-extern WXDLLEXPORT_DATA(const wxEventType) wxEVT_COMMAND_FILEPICKER_CHANGED;
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEvent );
 
 
 //-----------------------------------------------------------------------------
@@ -49,6 +48,8 @@ public:
 
     virtual ~wxGenericFileDirButton() {}
 
+    virtual wxControl *AsControl() { return this; }
+
 public:     // overrideable
 
     virtual wxDialog *CreateDialog() = 0;
@@ -136,12 +137,14 @@ public:     // overrideable
         return p;
     }
 
+    wxEventType GetEventType() const
+        { return wxEVT_COMMAND_FILEPICKER_CHANGED; }
+
+protected:
     void UpdateDialogPath(wxDialog *p)
         { wxStaticCast(p, wxFileDialog)->SetPath(m_path); }
     void UpdatePathFromDialog(wxDialog *p)
         { m_path = wxStaticCast(p, wxFileDialog)->GetPath(); }
-    wxEventType GetEventType() const
-        { return wxEVT_COMMAND_FILEPICKER_CHANGED; }
 
 private:
     DECLARE_DYNAMIC_CLASS(wxGenericFileButton)
@@ -177,7 +180,7 @@ public:     // overrideable
 
     virtual long GetDialogStyle() const
     {
-        long dirdlgstyle = 0;
+        long dirdlgstyle = wxDD_DEFAULT_STYLE;
 
         if (this->HasFlag(wxDIRP_DIR_MUST_EXIST))
             dirdlgstyle |= wxDD_DIR_MUST_EXIST;
@@ -193,12 +196,14 @@ public:     // overrideable
                                    GetDialogStyle());
     }
 
+    wxEventType GetEventType() const
+        { return wxEVT_COMMAND_DIRPICKER_CHANGED; }
+
+protected:
     void UpdateDialogPath(wxDialog *p)
         { wxStaticCast(p, wxDirDialog)->SetPath(m_path); }
     void UpdatePathFromDialog(wxDialog *p)
         { m_path = wxStaticCast(p, wxDirDialog)->GetPath(); }
-    wxEventType GetEventType() const
-        { return wxEVT_COMMAND_DIRPICKER_CHANGED; }
 
 private:
     DECLARE_DYNAMIC_CLASS(wxGenericDirButton)