]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filectrlcmn.cpp
revert r74683, wxTLW has its own {Width,Height}Default()
[wxWidgets.git] / src / common / filectrlcmn.cpp
index 76ef8187f485123f6b7a5e81947dc4e8fc648a1b..f4c8fd27aa8b2f57f4f54a326597726c19e468ea 100644 (file)
@@ -4,7 +4,6 @@
 //              platform-specific wxFileCtrl's
 // Author:      Diaa M. Sami
 // Created:     2007-07-07
-// RCS-ID:      $Id$
 // Copyright:   (c) Diaa M. Sami
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 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() );