]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/searchctrl.cpp
Use template class instead of template function in wxVectorSort().
[wxWidgets.git] / samples / widgets / searchctrl.cpp
index 2bd3905bb6690ac254ad72b1ba53a1eb1005b4bc..3c5bb3956a698b356c5f7a95f7ec3327b3e98099 100644 (file)
@@ -31,6 +31,7 @@
     #include "wx/app.h"
     #include "wx/log.h"
     #include "wx/radiobox.h"
+    #include "wx/statbox.h"
 #endif
 
 #include "wx/artprov.h"
@@ -71,6 +72,7 @@ public:
     virtual ~SearchCtrlWidgetsPage(){};
 
     virtual wxControl *GetWidget() const { return m_srchCtrl; }
+    virtual wxTextEntryBase *GetTextEntry() const { return m_srchCtrl; }
     virtual void RecreateWidget() { CreateControl(); }
 
     // lazy creation of the content
@@ -121,8 +123,8 @@ END_EVENT_TABLE()
     #define FAMILY_CTRLS GENERIC_CTRLS
 #endif
 
-IMPLEMENT_WIDGETS_PAGE(SearchCtrlWidgetsPage, _T("SearchCtrl"),
-                       FAMILY_CTRLS | ALL_CTRLS);
+IMPLEMENT_WIDGETS_PAGE(SearchCtrlWidgetsPage, wxT("SearchCtrl"),
+                       FAMILY_CTRLS | EDITABLE_CTRLS | ALL_CTRLS);
 
 SearchCtrlWidgetsPage::SearchCtrlWidgetsPage(WidgetsBookCtrl *book,
                                      wxImageList *imaglist)
@@ -179,7 +181,7 @@ wxMenu* SearchCtrlWidgetsPage::CreateTestMenu()
 {
     wxMenu* menu = new wxMenu;
     const int SEARCH_MENU_SIZE = 5;
-    wxMenuItem* menuItem = menu->Append(wxID_ANY, _T("Recent Searches"), wxT(""), wxITEM_NORMAL);
+    wxMenuItem* menuItem = menu->Append(wxID_ANY, wxT("Recent Searches"), wxT(""), wxITEM_NORMAL);
     menuItem->Enable(false);
     for ( int i = 0; i < SEARCH_MENU_SIZE; i++ )
     {
@@ -203,12 +205,12 @@ wxMenu* SearchCtrlWidgetsPage::CreateTestMenu()
 
 void SearchCtrlWidgetsPage::OnToggleSearchButton(wxCommandEvent&)
 {
-    m_srchCtrl->SetSearchButtonVisible( m_searchBtnCheck->GetValue() );
+    m_srchCtrl->ShowSearchButton( m_searchBtnCheck->GetValue() );
 }
 
 void SearchCtrlWidgetsPage::OnToggleCancelButton(wxCommandEvent&)
 {
-    m_srchCtrl->SetCancelButtonVisible( m_cancelBtnCheck->GetValue() );
+    m_srchCtrl->ShowCancelButton( m_cancelBtnCheck->GetValue() );
         
 }