#include "wx/defs.h"
-
#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
-#include "wx/control.h"
#include "wx/pickerbase.h"
-#include "wx/filedlg.h"
#include "wx/filename.h"
-
+class WXDLLIMPEXP_CORE wxDialog;
class WXDLLIMPEXP_CORE wxFileDirPickerEvent;
extern WXDLLEXPORT_DATA(const wxChar) wxFilePickerWidgetLabel[];
return true;
}
- // extracts the style for our picker from wxFileDirPickerCtrlBase's style
- long GetPickerStyle(long style) const
- {
- return (style & (wxFLP_OPEN|wxFLP_SAVE|wxFLP_OVERWRITE_PROMPT|
- wxFLP_FILE_MUST_EXIST|wxFLP_CHANGE_DIR));
- }
-
bool CheckPath(const wxString &path) const
{
return HasFlag(wxFLP_SAVE) || wxFileName::FileExists(path);
wxEventType GetEventType() const
{ return wxEVT_COMMAND_FILEPICKER_CHANGED; }
+protected:
+ // extracts the style for our picker from wxFileDirPickerCtrlBase's style
+ long GetPickerStyle(long style) const
+ {
+ return (style & (wxFLP_OPEN|wxFLP_SAVE|wxFLP_OVERWRITE_PROMPT|
+ wxFLP_FILE_MUST_EXIST|wxFLP_CHANGE_DIR));
+ }
+
private:
DECLARE_DYNAMIC_CLASS(wxFilePickerCtrl)
};
return true;
}
- // extracts the style for our picker from wxFileDirPickerCtrlBase's style
- long GetPickerStyle(long style) const
- { return (style & (wxDIRP_DIR_MUST_EXIST|wxDIRP_CHANGE_DIR)); }
-
bool CheckPath(const wxString &path) const
{ if (HasFlag(wxDIRP_DIR_MUST_EXIST)) return wxFileName::DirExists(path); else return true; }
wxEventType GetEventType() const
{ return wxEVT_COMMAND_DIRPICKER_CHANGED; }
+protected:
+ // extracts the style for our picker from wxFileDirPickerCtrlBase's style
+ long GetPickerStyle(long style) const
+ { return (style & (wxDIRP_DIR_MUST_EXIST|wxDIRP_CHANGE_DIR)); }
+
private:
DECLARE_DYNAMIC_CLASS(wxDirPickerCtrl)
};
wxString GetPath() const { return m_path; }
void SetPath(const wxString &p) { m_path = p; }
+ // default copy ctor, assignment operator and dtor are ok
+ virtual wxEvent *Clone() const { return new wxFileDirPickerEvent(*this); }
+
private:
wxString m_path;
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxFileDirPickerEvent)
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFileDirPickerEvent)
};
// ----------------------------------------------------------------------------