virtual void ShowHidden(bool show) = 0;
};
+void GenerateFilterChangedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd );
void GenerateFolderChangedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd );
void GenerateSelectionChangedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd );
void GenerateFileActivatedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd, const wxString filename = wxEmptyString );
#endif
// Some documentation
+// On wxEVT_FILECTRL_FILTERCHANGED, only the value returned by GetFilterIndex is
+// valid and it represents the (new) current filter index for the wxFileCtrl.
// On wxEVT_FILECTRL_FOLDERCHANGED, only the value returned by GetDirectory is
// valid and it represents the (new) current directory for the wxFileCtrl.
// On wxEVT_FILECTRL_FILEACTIVATED, GetDirectory returns the current directory
void SetFiles( const wxArrayString &files ) { m_files = files; }
void SetDirectory( const wxString &directory ) { m_directory = directory; }
+ void SetFilterIndex( int filterIndex ) { m_filterIndex = filterIndex; }
wxArrayString GetFiles() const { return m_files; }
wxString GetDirectory() const { return m_directory; }
+ int GetFilterIndex() const { return m_filterIndex; }
wxString GetFile() const;
protected:
+ int m_filterIndex;
wxString m_directory;
wxArrayString m_files;
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILECTRL_SELECTIONCHANGED, wxFileCtrlEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILECTRL_FILEACTIVATED, wxFileCtrlEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILECTRL_FOLDERCHANGED, wxFileCtrlEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILECTRL_FILTERCHANGED, wxFileCtrlEvent );
#define wxFileCtrlEventHandler(func) \
wxEVENT_HANDLER_CAST( wxFileCtrlEventFunction, func )
#define EVT_FILECTRL_FOLDERCHANGED(id, fn) \
wx__DECLARE_EVT1(wxEVT_FILECTRL_FOLDERCHANGED, id, wxFileCtrlEventHandler(fn))
+#define EVT_FILECTRL_FILTERCHANGED(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_FILECTRL_FILTERCHANGED, id, wxFileCtrlEventHandler(fn))
+
#endif // wxUSE_FILECTRL
#endif // _WX_FILECTRL_H_BASE_