Add "filter changed" event to wxFileCtrl.

Generate an event when the selection in the filter combobox of wxFileCtrl
changes.

Closes #12099.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-05-29 10:35:47 +00:00
parent 384859f8c6
commit 6305f044a1
8 changed files with 96 additions and 1 deletions

View File

@@ -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() );