]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/filectrl.cpp
Make @genericAppearance Doxygen macro consistent with @appearance.
[wxWidgets.git] / samples / widgets / filectrl.cpp
index a27367db311809f7b62474401ce7fdca543f2b7d..b77b328ff920dabd5648e6bd7efa27ca2ac14baf 100644 (file)
@@ -4,9 +4,8 @@
 // Purpose:     Part of the widgets sample showing wxFileCtrl
 // Author:      Diaa M. Sami
 // Created:     28 Jul 2007
-// Id:          $Id$
 // Copyright:   (c) 2007 Diaa M. Sami
-// License:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -71,7 +70,7 @@ public:
     FileCtrlWidgetsPage( WidgetsBookCtrl *book, wxImageList *imaglist );
     virtual ~FileCtrlWidgetsPage() {}
 
-    virtual wxControl *GetWidget() const { return /*m_fileCtrl*/NULL; }
+    virtual wxControl *GetWidget() const { return m_fileCtrl; }
     virtual void RecreateWidget() { CreateFileCtrl(); }
 
     // lazy creation of the content
@@ -130,6 +129,7 @@ BEGIN_EVENT_TABLE( FileCtrlWidgetsPage, WidgetsPage )
     EVT_CHECKBOX( wxID_ANY, FileCtrlWidgetsPage::OnCheckBox )
     EVT_RADIOBOX( wxID_ANY, FileCtrlWidgetsPage::OnRadioBox )
 
+    EVT_FILECTRL_FILTERCHANGED( wxID_ANY, FileCtrlWidgetsPage::OnFileCtrl )
     EVT_FILECTRL_FOLDERCHANGED( wxID_ANY, FileCtrlWidgetsPage::OnFileCtrl )
     EVT_FILECTRL_SELECTIONCHANGED( wxID_ANY, FileCtrlWidgetsPage::OnFileCtrl )
     EVT_FILECTRL_FILEACTIVATED( wxID_ANY, FileCtrlWidgetsPage::OnFileCtrl )
@@ -317,6 +317,11 @@ void FileCtrlWidgetsPage::OnFileCtrl( wxFileCtrlEvent& event )
     {
         wxLogMessage("Selection changed event: %s", wxJoin(event.GetFiles(), ' '));
     }
+    else if ( event.GetEventType() == wxEVT_FILECTRL_FILTERCHANGED )
+    {
+        wxLogMessage("Filter changed event: filter %d selected",
+                     event.GetFilterIndex() + 1);
+    }
 }
 
 #endif // wxUSE_FILECTRL