]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filectrlcmn.cpp
Add support for the new history functions to the ie backend. For this we manage our...
[wxWidgets.git] / src / common / filectrlcmn.cpp
index d0af51319c1783dc9ffde6992af3e0d88befccf4..b8d3ec1830d9bcffc45f534efab6fa23d7d44c88 100644 (file)
 #    include "wx/debug.h"
 #endif
 
-const wxChar wxFileCtrlNameStr[] = wxT( "wxfilectrl" );
+const char wxFileCtrlNameStr[] = "wxfilectrl";
 
-DEFINE_EVENT_TYPE( wxEVT_FILECTRL_SELECTIONCHANGED )
-DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FILEACTIVATED )
-DEFINE_EVENT_TYPE( wxEVT_FILECTRL_FOLDERCHANGED )
+wxDEFINE_EVENT( wxEVT_FILECTRL_SELECTIONCHANGED, wxFileCtrlEvent );
+wxDEFINE_EVENT( wxEVT_FILECTRL_FILEACTIVATED, wxFileCtrlEvent );
+wxDEFINE_EVENT( wxEVT_FILECTRL_FOLDERCHANGED, wxFileCtrlEvent );
+wxDEFINE_EVENT( wxEVT_FILECTRL_FILTERCHANGED, wxFileCtrlEvent );
 
 IMPLEMENT_DYNAMIC_CLASS( wxFileCtrlEvent, wxCommandEvent )
 
 // some helper functions
 
+void GenerateFilterChangedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd )
+{
+    wxFileCtrlEvent event( wxEVT_FILECTRL_FILTERCHANGED, wnd, wnd->GetId() );
+
+    event.SetFilterIndex( fileCtrl->GetFilterIndex() );
+
+    wnd->GetEventHandler()->ProcessEvent( event );
+}
+
 void GenerateFolderChangedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd )
 {
     wxFileCtrlEvent event( wxEVT_FILECTRL_FOLDERCHANGED, wnd, wnd->GetId() );