+//-------------------------------------------------------------------------
+// wxGenericFileDialog
+//-------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericFileDialog: public wxFileDialogBase
+{
+public:
+ wxGenericFileDialog() { }
+
+ wxGenericFileDialog(wxWindow *parent,
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& defaultDir = wxEmptyString,
+ const wxString& defaultFile = wxEmptyString,
+ const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
+ long style = 0,
+ const wxPoint& pos = wxDefaultPosition);
+ virtual ~wxGenericFileDialog();
+
+ virtual void SetMessage(const wxString& message) { SetTitle(message); }
+ virtual void SetPath(const wxString& path);
+ virtual void SetFilterIndex(int filterIndex);
+
+ // for multiple file selection
+ virtual void GetPaths(wxArrayString& paths) const;
+ virtual void GetFilenames(wxArrayString& files) const;
+
+ // implementation only from now on
+ // -------------------------------
+
+ virtual int ShowModal();
+ virtual bool Show( bool show = true );
+
+ void OnSelected( wxListEvent &event );
+ void OnActivated( wxListEvent &event );
+ void OnList( wxCommandEvent &event );
+ void OnReport( wxCommandEvent &event );
+ void OnUp( wxCommandEvent &event );
+ void OnHome( wxCommandEvent &event );
+ void OnListOk( wxCommandEvent &event );
+ void OnNew( wxCommandEvent &event );
+ void OnChoiceFilter( wxCommandEvent &event );
+ void OnTextEnter( wxCommandEvent &event );
+ void OnTextChange( wxCommandEvent &event );
+ void OnCheck( wxCommandEvent &event );
+
+ virtual void HandleAction( const wxString &fn );
+
+ virtual void UpdateControls();
+
+protected:
+ // use the filter with the given index
+ void DoSetFilterIndex(int filterindex);
+
+ wxString m_filterExtension;
+ wxChoice *m_choice;
+ wxTextCtrl *m_text;
+ wxFileCtrl *m_list;
+ wxCheckBox *m_check;
+ wxStaticText *m_static;
+ wxBitmapButton *m_upDirButton;
+ wxBitmapButton *m_newDirButton;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGenericFileDialog)
+ DECLARE_EVENT_TABLE()
+
+ // these variables are preserved between wxGenericFileDialog calls
+ static long ms_lastViewStyle; // list or report?
+ static bool ms_lastShowHidden; // did we show hidden files?
+};
+
+#ifdef USE_GENERIC_FILEDIALOG
+
+class WXDLLEXPORT wxFileDialog: public wxGenericFileDialog
+{
+ DECLARE_DYNAMIC_CLASS(wxFileDialog)
+
+public:
+ wxFileDialog() {}
+
+ wxFileDialog(wxWindow *parent,
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& defaultDir = wxEmptyString,
+ const wxString& defaultFile = wxEmptyString,
+ const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
+ long style = 0,
+ const wxPoint& pos = wxDefaultPosition)
+ :wxGenericFileDialog(parent, message, defaultDir, defaultFile, wildCard, style, pos)
+ {
+ }
+};