X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41f02b9acc01217e918fa422298840df7cf6de25..65fb4b3a4f18e1d8b58ac92d50d4cc7f81f03783:/samples/taborder/taborder.cpp diff --git a/samples/taborder/taborder.cpp b/samples/taborder/taborder.cpp index 72e99a0fce..934dedcd3d 100644 --- a/samples/taborder/taborder.cpp +++ b/samples/taborder/taborder.cpp @@ -4,7 +4,7 @@ // Author: Vadim Zeitlin // RCS-ID: $Id$ // Copyright: (c) 2007 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -39,7 +39,7 @@ #include "wx/notebook.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif @@ -100,9 +100,13 @@ private: void DoNavigate(int flags) { if ( m_panel->NavigateIn(flags) ) - wxLogStatus(this, _T("Navigation event processed")); + { + wxLogStatus(this, wxT("Navigation event processed")); + } else - wxLogStatus(this, _T("Navigation event ignored")); + { + wxLogStatus(this, wxT("Navigation event ignored")); + } } wxPanel *m_panel; @@ -140,8 +144,8 @@ private: if ( event.GetKeyCode() == WXK_TAB && wxMessageBox ( - _T("Let the Tab be used for navigation?"), - _T("wxWidgets TabOrder sample: Tab key pressed"), + wxT("Let the Tab be used for navigation?"), + wxT("wxWidgets TabOrder sample: Tab key pressed"), wxICON_QUESTION | wxYES_NO, this ) != wxYES ) @@ -191,7 +195,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) END_EVENT_TABLE() MyFrame::MyFrame() - : wxFrame(NULL, wxID_ANY, _T("TabOrder wxWidgets Sample"), + : wxFrame(NULL, wxID_ANY, wxT("TabOrder wxWidgets Sample"), wxDefaultPosition, wxSize(700, 450)) { SetIcon(wxICON(sample)); @@ -202,14 +206,14 @@ MyFrame::MyFrame() menuFile->Append(TabOrder_Quit); wxMenu *menuNav = new wxMenu; - menuNav->Append(TabOrder_TabForward, _T("Tab &forward\tCtrl-F"), - _T("Emulate a press")); - menuNav->Append(TabOrder_TabBackward, _T("Tab &backward\tCtrl-B"), - _T("Emulate a press")); + menuNav->Append(TabOrder_TabForward, wxT("Tab &forward\tCtrl-F"), + wxT("Emulate a press")); + menuNav->Append(TabOrder_TabBackward, wxT("Tab &backward\tCtrl-B"), + wxT("Emulate a press")); wxMenuBar *mbar = new wxMenuBar; - mbar->Append(menuFile, _T("&File")); - mbar->Append(menuNav, _T("&Navigate")); + mbar->Append(menuFile, wxT("&File")); + mbar->Append(menuNav, wxT("&Navigate")); SetMenuBar(mbar); @@ -225,8 +229,8 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { - wxMessageBox(_T("Tab navigation sample\n(c) 2007 Vadim Zeitlin"), - _T("About TabOrder wxWidgets Sample"), wxOK, this); + wxMessageBox(wxT("Tab navigation sample\n(c) 2007 Vadim Zeitlin"), + wxT("About TabOrder wxWidgets Sample"), wxOK, this); } void MyFrame::OnTabForward(wxCommandEvent& WXUNUSED(event)) @@ -251,11 +255,11 @@ void MyFrame::OnIdle( wxIdleEvent& WXUNUSED(event) ) wxString msg; if ( focus ) { - msg.Printf(_T("Focus is at %s"), s_windowFocus->GetName().c_str()); + msg.Printf(wxT("Focus is at %s"), s_windowFocus->GetName().c_str()); } else { - msg = _T("No focus"); + msg = wxT("No focus"); } SetStatusText(msg, StatusPane_Focus); @@ -270,16 +274,16 @@ MyPanel::MyPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) { wxNotebook *notebook = new wxNotebook(this, wxID_ANY); - notebook->AddPage(CreateButtonPage(notebook), _T("Button")); - notebook->AddPage(CreateTextPage(notebook), _T("Text")); + notebook->AddPage(CreateButtonPage(notebook), wxT("Button")); + notebook->AddPage(CreateTextPage(notebook), wxT("Text")); wxSizer *sizerV = new wxBoxSizer(wxVERTICAL); sizerV->Add(notebook, wxSizerFlags(1).Expand()); wxListBox *lbox = new wxListBox(this, wxID_ANY); - lbox->AppendString(_T("Just a")); - lbox->AppendString(_T("simple")); - lbox->AppendString(_T("listbox")); + lbox->AppendString(wxT("Just a")); + lbox->AppendString(wxT("simple")); + lbox->AppendString(wxT("listbox")); sizerV->Add(lbox, wxSizerFlags(1).Expand()); SetSizerAndFit(sizerV); @@ -291,10 +295,10 @@ wxWindow *MyPanel::CreateButtonPage(wxWindow *parent) wxPanel *page = new wxPanel(parent); wxSizer *sizerPage = new wxBoxSizer(wxHORIZONTAL); - sizerPage->Add(new wxButton(page, wxID_ANY, _T("&First")), flagsBorder); - sizerPage->Add(new wxStaticText(page, wxID_ANY, _T("[st&atic]")), + sizerPage->Add(new wxButton(page, wxID_ANY, wxT("&First")), flagsBorder); + sizerPage->Add(new wxStaticText(page, wxID_ANY, wxT("[st&atic]")), flagsBorder); - sizerPage->Add(new wxButton(page, wxID_ANY, _T("&Second")), flagsBorder); + sizerPage->Add(new wxButton(page, wxID_ANY, wxT("&Second")), flagsBorder); page->SetSizer(sizerPage); @@ -309,14 +313,14 @@ wxWindow *MyPanel::CreateTextPage(wxWindow *parent) wxPanel *page = new wxPanel(parent); wxSizer *sizerH = new wxBoxSizer(wxHORIZONTAL); - sizerH->Add(new wxStaticText(page, wxID_ANY, _T("&Label:")), flagsBorder); - sizerH->Add(new MyTabTextCtrl(page, _T("TAB ignored here")), flagsBorder); + sizerH->Add(new wxStaticText(page, wxID_ANY, wxT("&Label:")), flagsBorder); + sizerH->Add(new MyTabTextCtrl(page, wxT("TAB ignored here")), flagsBorder); sizerPage->Add(sizerH, wxSizerFlags(1).Expand()); sizerH = new wxBoxSizer(wxHORIZONTAL); - sizerH->Add(new wxStaticText(page, wxID_ANY, _T("&Another one:")), + sizerH->Add(new wxStaticText(page, wxID_ANY, wxT("&Another one:")), flagsBorder); - sizerH->Add(new MyTabTextCtrl(page, _T("press Tab here"), wxTE_PROCESS_TAB), + sizerH->Add(new MyTabTextCtrl(page, wxT("press Tab here"), wxTE_PROCESS_TAB), flagsBorder); sizerPage->Add(sizerH, wxSizerFlags(1).Expand());