X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c7789014106c9269b0f4ecc1a3071b14f351d3f..e733c4ce1e24cf7e4b0b0d8362fc59aaa7a7641c:/src/common/filectrlcmn.cpp diff --git a/src/common/filectrlcmn.cpp b/src/common/filectrlcmn.cpp index 13d48ccd92..f4c8fd27aa 100644 --- a/src/common/filectrlcmn.cpp +++ b/src/common/filectrlcmn.cpp @@ -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 /////////////////////////////////////////////////////////////////////////////// @@ -25,14 +24,24 @@ 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_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() );