X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b11752c4f9e1fd4b11ba3d184246267facb3ad3..497b4e64ceeff10f40104d26139fa7f1ee347095:/src/common/filectrlcmn.cpp

diff --git a/src/common/filectrlcmn.cpp b/src/common/filectrlcmn.cpp
index dc9c7bb1e2..b8d3ec1830 100644
--- a/src/common/filectrlcmn.cpp
+++ b/src/common/filectrlcmn.cpp
@@ -28,11 +28,21 @@ const char wxFileCtrlNameStr[] = "wxfilectrl";
 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() );