+#define ID_LIST_MODE (wxID_FILEDLGG )
+#define ID_REPORT_MODE (wxID_FILEDLGG + 1)
+#define ID_UP_DIR (wxID_FILEDLGG + 5)
+#define ID_PARENT_DIR (wxID_FILEDLGG + 6)
+#define ID_NEW_DIR (wxID_FILEDLGG + 7)
+#define ID_CHOICE (wxID_FILEDLGG + 8)
+#define ID_TEXT (wxID_FILEDLGG + 9)
+#define ID_LIST_CTRL (wxID_FILEDLGG + 10)
+#define ID_CHECK (wxID_FILEDLGG + 12)
+
+IMPLEMENT_DYNAMIC_CLASS(wxGenericFileDialog, wxFileDialogBase)
+
+BEGIN_EVENT_TABLE(wxGenericFileDialog,wxDialog)
+ EVT_BUTTON(ID_LIST_MODE, wxGenericFileDialog::OnList)
+ EVT_BUTTON(ID_REPORT_MODE, wxGenericFileDialog::OnReport)
+ EVT_BUTTON(ID_UP_DIR, wxGenericFileDialog::OnUp)
+ EVT_BUTTON(ID_PARENT_DIR, wxGenericFileDialog::OnHome)
+ EVT_BUTTON(ID_NEW_DIR, wxGenericFileDialog::OnNew)
+ EVT_BUTTON(wxID_OK, wxGenericFileDialog::OnListOk)
+ EVT_LIST_ITEM_SELECTED(ID_LIST_CTRL, wxGenericFileDialog::OnSelected)
+ EVT_LIST_ITEM_ACTIVATED(ID_LIST_CTRL, wxGenericFileDialog::OnActivated)
+ EVT_CHOICE(ID_CHOICE,wxGenericFileDialog::OnChoiceFilter)
+ EVT_TEXT_ENTER(ID_TEXT,wxGenericFileDialog::OnTextEnter)
+ EVT_TEXT(ID_TEXT,wxGenericFileDialog::OnTextChange)
+ EVT_CHECKBOX(ID_CHECK,wxGenericFileDialog::OnCheck)
+END_EVENT_TABLE()
+
+long wxGenericFileDialog::ms_lastViewStyle = wxLC_LIST;
+bool wxGenericFileDialog::ms_lastShowHidden = false;
+
+void wxGenericFileDialog::Init()
+{
+ m_bypassGenericImpl = false;
+
+ m_choice = NULL;
+ m_text = NULL;
+ m_list = NULL;
+ m_check = NULL;
+ m_static = NULL;
+ m_upDirButton = NULL;
+ m_newDirButton = NULL;
+}
+
+wxGenericFileDialog::wxGenericFileDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& defaultDir,
+ const wxString& defaultFile,
+ const wxString& wildCard,
+ long style,
+ const wxPoint& pos,
+ bool bypassGenericImpl ) : wxFileDialogBase()
+{
+ Init();
+ Create( parent, message, defaultDir, defaultFile, wildCard, style, pos, bypassGenericImpl );
+}
+
+bool wxGenericFileDialog::Create( wxWindow *parent,
+ const wxString& message,
+ const wxString& defaultDir,
+ const wxString& defaultFile,
+ const wxString& wildCard,
+ long style,
+ const wxPoint& pos,
+ bool bypassGenericImpl )
+{
+ m_bypassGenericImpl = bypassGenericImpl;
+
+ if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFile,
+ wildCard, style, pos))