]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/taborder/taborder.cpp
remove wxNewEventFunctor() overload which allowed calls to "Bind(evt, &WrongClass...
[wxWidgets.git] / samples / taborder / taborder.cpp
index 94439dd91e3ad6a792973d6f605f53153b84a97a..72e99a0fce3de00b468dfa10820475e3dccf8ba8 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/app.h"
+    #include "wx/log.h"
     #include "wx/frame.h"
     #include "wx/menu.h"
+    #include "wx/sizer.h"
 
     #include "wx/panel.h"
+    #include "wx/msgdlg.h"
 
     #include "wx/button.h"
     #include "wx/listbox.h"
+    #include "wx/stattext.h"
     #include "wx/textctrl.h"
 #endif
 
 #include "wx/notebook.h"
 
+#ifndef __WXMSW__
+    #include "../sample.xpm"
+#endif
+
+
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
@@ -88,11 +97,9 @@ private:
 
     void OnIdle(wxIdleEvent& event);
 
-    void DoNavigate(long flags)
+    void DoNavigate(int flags)
     {
-        wxNavigationKeyEvent event;
-        event.SetFlags(flags);
-        if ( m_panel->ProcessEvent(event) )
+        if ( m_panel->NavigateIn(flags) )
             wxLogStatus(this, _T("Navigation event processed"));
         else
             wxLogStatus(this, _T("Navigation event ignored"));
@@ -122,7 +129,7 @@ public:
     MyTabTextCtrl(wxWindow *parent, const wxString& value, int flags = 0)
         : wxTextCtrl(parent, wxID_ANY, value,
                      wxDefaultPosition, wxDefaultSize,
-                     wxTE_PROCESS_TAB)
+                     flags)
     {
         Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(MyTabTextCtrl::OnKeyDown));
     }
@@ -187,6 +194,8 @@ MyFrame::MyFrame()
        : wxFrame(NULL, wxID_ANY, _T("TabOrder wxWidgets Sample"),
                  wxDefaultPosition, wxSize(700, 450))
 {
+    SetIcon(wxICON(sample));
+
     wxMenu *menuFile = new wxMenu;
     menuFile->Append(TabOrder_About);
     menuFile->AppendSeparator();
@@ -305,7 +314,8 @@ wxWindow *MyPanel::CreateTextPage(wxWindow *parent)
     sizerPage->Add(sizerH, wxSizerFlags(1).Expand());
 
     sizerH = new wxBoxSizer(wxHORIZONTAL);
-    sizerH->Add(new wxStaticText(page, wxID_ANY, _T("&Another one::")), flagsBorder);
+    sizerH->Add(new wxStaticText(page, wxID_ANY, _T("&Another one:")),
+                flagsBorder);
     sizerH->Add(new MyTabTextCtrl(page, _T("press Tab here"), wxTE_PROCESS_TAB),
                 flagsBorder);
     sizerPage->Add(sizerH, wxSizerFlags(1).Expand());