From 87728739f23c6fcc737614e2e726f68778f9415b Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Tue, 9 Sep 2003 20:24:34 +0000 Subject: [PATCH] Various warning and Unicode fixes from ABX. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/samples/svg/svgtest.cpp | 18 +++++++++--------- contrib/samples/xrc/derivdlg.cpp | 6 +++--- contrib/src/animate/animate.cpp | 6 +++--- samples/calendar/calendar.cpp | 4 ++-- samples/checklst/checklst.cpp | 8 ++++---- samples/controls/controls.cpp | 6 +++--- samples/dialogs/dialogs.cpp | 4 ++-- samples/dnd/dnd.cpp | 10 +++++----- samples/dragimag/dragimag.cpp | 2 +- samples/erase/erase.cpp | 2 +- samples/event/event.cpp | 6 +++--- samples/exec/exec.cpp | 6 +++--- samples/grid/griddemo.cpp | 2 +- samples/help/demo.cpp | 4 ++-- samples/html/virtual/virtual.cpp | 2 +- samples/ipc/client.cpp | 10 +++++----- samples/ipc/server.cpp | 2 +- samples/joytest/joytest.cpp | 2 +- samples/keyboard/keyboard.cpp | 2 +- samples/listbox/lboxtest.cpp | 10 +++++----- samples/svg/svgtest.cpp | 18 +++++++++--------- samples/vscroll/vstest.cpp | 4 ++-- samples/wxtest/test.cpp | 18 +++++++++--------- samples/wxtest/test_wdr.cpp | 12 ++++++------ samples/xrc/derivdlg.cpp | 6 +++--- 25 files changed, 85 insertions(+), 85 deletions(-) diff --git a/contrib/samples/svg/svgtest.cpp b/contrib/samples/svg/svgtest.cpp index 60cf0520f3..b16331b2a7 100644 --- a/contrib/samples/svg/svgtest.cpp +++ b/contrib/samples/svg/svgtest.cpp @@ -382,7 +382,7 @@ MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size) wxSUNKEN_BORDER|wxVSCROLL|wxHSCROLL) { m_child = (MyChild *) parent ; - SetBackgroundColour(wxColour("WHITE")); + SetBackgroundColour(wxColour(_T("WHITE"))); m_index = m_child->m_frame->nWinCreated % 7 ; } @@ -425,10 +425,10 @@ void MyCanvas::OnDraw(wxDC& dc) dc.SetBrush(*wxCYAN_BRUSH); dc.SetPen(*wxRED_PEN); dc.DrawRectangle(10, 10, 100, 70); - wB = wxBrush ("DARK ORCHID", wxTRANSPARENT); + wB = wxBrush (_T("DARK ORCHID"), wxTRANSPARENT); dc.SetBrush (wB); dc.DrawRoundedRectangle(50, 50, 100, 70, 20); - dc.SetBrush (wxBrush("GOLDENROD", wxSOLID) ); + dc.SetBrush (wxBrush(_T("GOLDENROD"), wxSOLID) ); dc.DrawEllipse(100, 100, 100, 50); points[0].x = 100; points[0].y = 200; @@ -449,10 +449,10 @@ void MyCanvas::OnDraw(wxDC& dc) dc.DrawLine(45,30,55,30); dc.DrawText(wxT("This is a Swiss-style string"), 50, 30); wC = dc.GetTextForeground() ; - dc.SetTextForeground ("FIREBRICK"); + dc.SetTextForeground (_T("FIREBRICK")); // no effect in msw ?? - dc.SetTextBackground ("WHEAT"); + dc.SetTextBackground (_T("WHEAT")); dc.DrawText(wxT("This is a Red string"), 50, 200); dc.DrawRotatedText(wxT("This is a 45 deg string"), 50, 200, 45); dc.DrawRotatedText(wxT("This is a 90 deg string"), 50, 200, 90); @@ -473,11 +473,11 @@ void MyCanvas::OnDraw(wxDC& dc) dc.DrawArc ( 270-50, 270-86, 270-86, 270-50, 270.0,270.0 ); dc.SetDeviceOrigin(0,0); - wP.SetColour ("CADET BLUE"); + wP.SetColour (_T("CADET BLUE")); dc.SetPen(wP); dc.DrawArc ( 75,125, 110, 40, 75.0, 75.0 ); - wP.SetColour ("SALMON"); + wP.SetColour (_T("SALMON")); dc.SetPen(wP); dc.SetBrush(*wxRED_BRUSH); //top left corner, width and height, start and end angle @@ -488,7 +488,7 @@ void MyCanvas::OnDraw(wxDC& dc) wP.SetWidth(3); dc.SetPen(wP); //wxTRANSPARENT)); - dc.SetBrush (wxBrush ("SALMON",wxSOLID)) ; + dc.SetBrush (wxBrush (_T("SALMON"),wxSOLID)) ; dc.DrawEllipticArc(300, 0,200,100, 0.0,145.0) ; //same end point dc.DrawEllipticArc(300, 50,200,100,90.0,145.0) ; @@ -499,7 +499,7 @@ void MyCanvas::OnDraw(wxDC& dc) case 4: dc.DrawCheckMark ( 30,30,25,25); - dc.SetBrush (wxBrush ("SALMON",wxTRANSPARENT)); + dc.SetBrush (wxBrush (_T("SALMON"),wxTRANSPARENT)); dc.DrawCheckMark ( 80,50,75,75); dc.DrawRectangle ( 80,50,75,75); s = wxT("Two check marks"); diff --git a/contrib/samples/xrc/derivdlg.cpp b/contrib/samples/xrc/derivdlg.cpp index 437615d60b..b784e322b4 100644 --- a/contrib/samples/xrc/derivdlg.cpp +++ b/contrib/samples/xrc/derivdlg.cpp @@ -73,7 +73,7 @@ PreferencesDialog::~PreferencesDialog() // Private members (including the event handlers) //----------------------------------------------------------------------------- -void PreferencesDialog::OnMyButtonClicked( wxCommandEvent &event ) +void PreferencesDialog::OnMyButtonClicked( wxCommandEvent &WXUNUSED(event) ) { // Construct a message dialog. wxMessageDialog msgDlg(this, _("You clicked on My Button")); @@ -85,7 +85,7 @@ void PreferencesDialog::OnMyButtonClicked( wxCommandEvent &event ) // Update the enabled/disabled state of the edit/delete buttons depending on // whether a row (item) is selected in the listctrl -void PreferencesDialog::OuUpdateUIMyCheckbox( wxUpdateUIEvent &event ) +void PreferencesDialog::OuUpdateUIMyCheckbox( wxUpdateUIEvent &WXUNUSED(event) ) { // Get a boolean value of whether the checkbox is checked bool myCheckBoxIsChecked; @@ -102,7 +102,7 @@ void PreferencesDialog::OuUpdateUIMyCheckbox( wxUpdateUIEvent &event ) } -void PreferencesDialog::OnOK( wxCommandEvent& event ) +void PreferencesDialog::OnOK( wxCommandEvent& WXUNUSED(event) ) { // Construct a message dialog (An extra parameters to put a cancel button on). wxMessageDialog msgDlg2(this, _("Press OK to close Derived dialog, or Cancel to abort"), diff --git a/contrib/src/animate/animate.cpp b/contrib/src/animate/animate.cpp index b85d93baea..ec393517d3 100644 --- a/contrib/src/animate/animate.cpp +++ b/contrib/src/animate/animate.cpp @@ -69,7 +69,7 @@ void wxAnimationPlayer::SetAnimation(wxAnimationBase* animation, bool destroyAni } // Play -bool wxAnimationPlayer::Play(wxWindow& window, const wxPoint& pos, bool looped) +bool wxAnimationPlayer::Play(wxWindow& window, const wxPoint& pos, bool WXUNUSED(looped)) { m_window = & window; @@ -216,7 +216,7 @@ bool wxAnimationPlayer::GetTransparentColour(wxColour& col) const } // Play the frame -bool wxAnimationPlayer::PlayFrame(int frame, wxWindow& window, const wxPoint& pos) +bool wxAnimationPlayer::PlayFrame(int frame, wxWindow& window, const wxPoint& WXUNUSED(pos)) { wxMemoryDC dc; dc.SelectObject(m_backingStore); @@ -647,7 +647,7 @@ void wxAnimationCtrlBase::FitToAnimation() SetClientSize(sz); } -void wxAnimationCtrlBase::OnPaint(wxPaintEvent& event) +void wxAnimationCtrlBase::OnPaint(wxPaintEvent& WXUNUSED(event)) { wxPaintDC dc(this); diff --git a/samples/calendar/calendar.cpp b/samples/calendar/calendar.cpp index a19364dc5c..c4e285b754 100644 --- a/samples/calendar/calendar.cpp +++ b/samples/calendar/calendar.cpp @@ -340,12 +340,12 @@ void MyFrame::OnAllowYearUpdate(wxUpdateUIEvent& event) event.Enable( GetMenuBar()->IsChecked(Calendar_Cal_Month)); } -void MyFrame::OnSetDate(wxCommandEvent &event) +void MyFrame::OnSetDate(wxCommandEvent &WXUNUSED(event)) { m_panel->SetDate(); } -void MyFrame::OnToday(wxCommandEvent &event) +void MyFrame::OnToday(wxCommandEvent &WXUNUSED(event)) { m_panel->Today(); } diff --git a/samples/checklst/checklst.cpp b/samples/checklst/checklst.cpp index 41d4f842e9..635a13df62 100644 --- a/samples/checklst/checklst.cpp +++ b/samples/checklst/checklst.cpp @@ -257,25 +257,25 @@ void CheckListBoxFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) wxICON_INFORMATION, this); } -void CheckListBoxFrame::OnCheckFirstItem(wxCommandEvent& event) +void CheckListBoxFrame::OnCheckFirstItem(wxCommandEvent& WXUNUSED(event)) { if ( !m_pListBox->IsEmpty() ) m_pListBox->Check(0); } -void CheckListBoxFrame::OnUncheckFirstItem(wxCommandEvent& event) +void CheckListBoxFrame::OnUncheckFirstItem(wxCommandEvent& WXUNUSED(event)) { if ( !m_pListBox->IsEmpty() ) m_pListBox->Check(0, FALSE); } -void CheckListBoxFrame::OnToggleFirstItem(wxCommandEvent& event) +void CheckListBoxFrame::OnToggleFirstItem(wxCommandEvent& WXUNUSED(event)) { if ( !m_pListBox->IsEmpty() ) m_pListBox->Check(0, !m_pListBox->IsChecked(0)); } -void CheckListBoxFrame::OnAddItems(wxCommandEvent& event) +void CheckListBoxFrame::OnAddItems(wxCommandEvent& WXUNUSED(event)) { static size_t s_nItem = 0; wxArrayString items; diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 653a78f1b8..52f3167fa9 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -981,7 +981,7 @@ void MyPanel::OnTestButton(wxCommandEvent& event) event.GetId() == ID_BUTTON_TEST1 ? _T('1') : _T('2')); } -void MyPanel::OnBmpButton(wxCommandEvent& event) +void MyPanel::OnBmpButton(wxCommandEvent& WXUNUSED(event)) { wxLogMessage(_T("Bitmap button clicked.")); } @@ -1607,7 +1607,7 @@ void MyFrame::OnClearLog(wxCommandEvent& WXUNUSED(event)) } #if wxUSE_TOOLTIPS -void MyFrame::OnSetTooltipDelay(wxCommandEvent& event) +void MyFrame::OnSetTooltipDelay(wxCommandEvent& WXUNUSED(event)) { static long s_delay = 5000; @@ -1628,7 +1628,7 @@ void MyFrame::OnSetTooltipDelay(wxCommandEvent& event) wxLogStatus(this, _T("Tooltip delay set to %ld milliseconds"), s_delay); } -void MyFrame::OnToggleTooltips(wxCommandEvent& event) +void MyFrame::OnToggleTooltips(wxCommandEvent& WXUNUSED(event)) { static bool s_enabled = TRUE; diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 4a316451a4..6bb75cca8e 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -312,7 +312,7 @@ void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) ) } #endif // wxTEST_GENERIC_DIALOGS_IN_MSW -void MyFrame::LogDialog(wxCommandEvent& event) +void MyFrame::LogDialog(wxCommandEvent& WXUNUSED(event)) { // calling wxYield() (as ~wxBusyCursor does) shouldn't result in messages // being flushed -- test it @@ -635,7 +635,7 @@ void MyFrame::ModelessDlg(wxCommandEvent& event) } } -void MyFrame::ShowTip(wxCommandEvent& event) +void MyFrame::ShowTip(wxCommandEvent& WXUNUSED(event)) { #if wxUSE_STARTUP_TIPS static size_t s_index = (size_t)-1; diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index 446dba0940..7abe4495eb 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -1723,7 +1723,7 @@ void DnDShapeFrame::OnDrop(wxCoord x, wxCoord y, DnDShape *shape) SetShape(shape); } -void DnDShapeFrame::OnEditShape(wxCommandEvent& event) +void DnDShapeFrame::OnEditShape(wxCommandEvent& WXUNUSED(event)) { DnDShapeDialog dlg(this, m_shape); if ( dlg.ShowModal() == wxID_OK ) @@ -1737,19 +1737,19 @@ void DnDShapeFrame::OnEditShape(wxCommandEvent& event) } } -void DnDShapeFrame::OnNewShape(wxCommandEvent& event) +void DnDShapeFrame::OnNewShape(wxCommandEvent& WXUNUSED(event)) { SetShape(new DnDEllipticShape(wxPoint(10, 10), wxSize(80, 60), *wxRED)); SetStatusText(_T("You can now drag the shape to another frame")); } -void DnDShapeFrame::OnClearShape(wxCommandEvent& event) +void DnDShapeFrame::OnClearShape(wxCommandEvent& WXUNUSED(event)) { SetShape(NULL); } -void DnDShapeFrame::OnCopyShape(wxCommandEvent& event) +void DnDShapeFrame::OnCopyShape(wxCommandEvent& WXUNUSED(event)) { if ( m_shape ) { @@ -1765,7 +1765,7 @@ void DnDShapeFrame::OnCopyShape(wxCommandEvent& event) } } -void DnDShapeFrame::OnPasteShape(wxCommandEvent& event) +void DnDShapeFrame::OnPasteShape(wxCommandEvent& WXUNUSED(event)) { wxClipboardLocker clipLocker; if ( !clipLocker ) diff --git a/samples/dragimag/dragimag.cpp b/samples/dragimag/dragimag.cpp index 030ff24350..398a53d634 100644 --- a/samples/dragimag/dragimag.cpp +++ b/samples/dragimag/dragimag.cpp @@ -455,7 +455,7 @@ bool MyApp::TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap) return TRUE; } -void MyApp::OnUseScreen(wxCommandEvent& event) +void MyApp::OnUseScreen(wxCommandEvent& WXUNUSED(event)) { m_useScreen = !m_useScreen; } diff --git a/samples/erase/erase.cpp b/samples/erase/erase.cpp index 2e1d859d80..6e87821b5e 100644 --- a/samples/erase/erase.cpp +++ b/samples/erase/erase.cpp @@ -203,7 +203,7 @@ void MyCanvas::OnChar( wxKeyEvent &event ) } -void MyCanvas::OnPaint( wxPaintEvent &event ) +void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) { wxPaintDC dc(this); PrepareDC( dc ); diff --git a/samples/event/event.cpp b/samples/event/event.cpp index beeaad030d..a960f5dcc0 100644 --- a/samples/event/event.cpp +++ b/samples/event/event.cpp @@ -355,7 +355,7 @@ void MyFrame::OnPopEventHandler(wxCommandEvent& WXUNUSED(event)) SetStatusText(wxString::Format(_T("Push count: %u"), m_nPush), Status_Push); } -void MyFrame::OnTest(wxCommandEvent& event) +void MyFrame::OnTest(wxCommandEvent& WXUNUSED(event)) { wxLogMessage(_T("This is the test event handler in the main frame")); } @@ -369,14 +369,14 @@ void MyFrame::OnUpdateUIPop(wxUpdateUIEvent& event) // custom event methods // ---------------------------------------------------------------------------- -void MyFrame::OnFireCustom(wxCommandEvent& event) +void MyFrame::OnFireCustom(wxCommandEvent& WXUNUSED(event)) { wxCommandEvent eventCustom(wxEVT_MY_CUSTOM_COMMAND); wxPostEvent(this, eventCustom); } -void MyFrame::OnProcessCustom(wxCommandEvent& event) +void MyFrame::OnProcessCustom(wxCommandEvent& WXUNUSED(event)) { wxLogMessage(_T("Got a custom event!")); } diff --git a/samples/exec/exec.cpp b/samples/exec/exec.cpp index d09f94e5c3..50f2a1acb3 100644 --- a/samples/exec/exec.cpp +++ b/samples/exec/exec.cpp @@ -746,7 +746,7 @@ void MyFrame::OnExecWithPipe(wxCommandEvent& WXUNUSED(event)) m_cmdLast = cmd; } -void MyFrame::OnPOpen(wxCommandEvent& event) +void MyFrame::OnPOpen(wxCommandEvent& WXUNUSED(event)) { wxString cmd = wxGetTextFromUser(_T("Enter the command to launch: "), DIALOG_TITLE, @@ -778,7 +778,7 @@ void MyFrame::OnPOpen(wxCommandEvent& event) new MyPipeFrame(this, cmd, process); } -void MyFrame::OnFileExec(wxCommandEvent& event) +void MyFrame::OnFileExec(wxCommandEvent& WXUNUSED(event)) { static wxString s_filename; @@ -1096,7 +1096,7 @@ void MyPipeFrame::OnClose(wxCloseEvent& event) event.Skip(); } -void MyPipeFrame::OnProcessTerm(wxProcessEvent& event) +void MyPipeFrame::OnProcessTerm(wxProcessEvent& WXUNUSED(event)) { delete m_process; m_process = NULL; diff --git a/samples/grid/griddemo.cpp b/samples/grid/griddemo.cpp index 8fe0da43d6..9db8fa6f9d 100644 --- a/samples/grid/griddemo.cpp +++ b/samples/grid/griddemo.cpp @@ -1157,7 +1157,7 @@ int BugsGridTable::GetNumberCols() return Col_Max; } -bool BugsGridTable::IsEmptyCell( int row, int col ) +bool BugsGridTable::IsEmptyCell( int WXUNUSED(row), int WXUNUSED(col) ) { return FALSE; } diff --git a/samples/help/demo.cpp b/samples/help/demo.cpp index 48b47d7f56..48fa9210e2 100644 --- a/samples/help/demo.cpp +++ b/samples/help/demo.cpp @@ -448,14 +448,14 @@ void MyFrame::OnHelp(wxCommandEvent& event) ShowHelp(event.GetId(), m_help); } -void MyFrame::OnShowContextHelp(wxCommandEvent& event) +void MyFrame::OnShowContextHelp(wxCommandEvent& WXUNUSED(event)) { // This starts context help mode, then the user // clicks on a window to send a help message wxContextHelp contextHelp(this); } -void MyFrame::OnShowDialogContextHelp(wxCommandEvent& event) +void MyFrame::OnShowDialogContextHelp(wxCommandEvent& WXUNUSED(event)) { MyModalDialog dialog(this); dialog.ShowModal(); diff --git a/samples/html/virtual/virtual.cpp b/samples/html/virtual/virtual.cpp index bd681ed8a5..0966023137 100644 --- a/samples/html/virtual/virtual.cpp +++ b/samples/html/virtual/virtual.cpp @@ -50,7 +50,7 @@ bool MyVFS::CanOpen(const wxString& location) -wxFSFile* MyVFS::OpenFile(wxFileSystem& fs, const wxString& location) +wxFSFile* MyVFS::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location) { wxFSFile *f; wxInputStream *str; diff --git a/samples/ipc/client.cpp b/samples/ipc/client.cpp index 9c479b0075..f4ad6551f2 100644 --- a/samples/ipc/client.cpp +++ b/samples/ipc/client.cpp @@ -160,21 +160,21 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title) the_list->Append(_T("Fruit")); } -void MyFrame::OnExecute(wxCommandEvent& event) +void MyFrame::OnExecute(wxCommandEvent& WXUNUSED(event)) { if (the_connection) if (!the_connection->Execute(_T("Hello from the client!"))) wxMessageBox(_T("Execute failed"), _T("Client Demo Error")); } -void MyFrame::OnPoke(wxCommandEvent& event) +void MyFrame::OnPoke(wxCommandEvent& WXUNUSED(event)) { if (the_connection) if (!the_connection->Poke(_T("An item"), _T("Some data to poke at the server!"))) wxMessageBox(_T("Poke failed"), _T("Client Demo Error")); } -void MyFrame::OnRequest(wxCommandEvent& event) +void MyFrame::OnRequest(wxCommandEvent& WXUNUSED(event)) { if (the_connection) { @@ -186,7 +186,7 @@ void MyFrame::OnRequest(wxCommandEvent& event) } } -void MyFrame::OnExit(wxCommandEvent& event) +void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event)) { Close(); } @@ -196,7 +196,7 @@ wxConnectionBase *MyClient::OnMakeConnection() return new MyConnection; } -bool MyConnection::OnAdvise(const wxString& topic, const wxString& item, wxChar *data, int size, wxIPCFormat format) +bool MyConnection::OnAdvise(const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), wxChar *data, int WXUNUSED(size), wxIPCFormat WXUNUSED(format)) { if (the_list) { diff --git a/samples/ipc/server.cpp b/samples/ipc/server.cpp index 5d9b0cf1aa..3e3361041e 100644 --- a/samples/ipc/server.cpp +++ b/samples/ipc/server.cpp @@ -171,7 +171,7 @@ IPCDialogBox::~IPCDialogBox( ) m_connection->dialog = NULL; } -void IPCDialogBox::OnQuit(wxCommandEvent& event) +void IPCDialogBox::OnQuit(wxCommandEvent& WXUNUSED(event)) { m_connection->Disconnect(); delete m_connection; diff --git a/samples/joytest/joytest.cpp b/samples/joytest/joytest.cpp index 349e104c8f..8b9b07c3a0 100644 --- a/samples/joytest/joytest.cpp +++ b/samples/joytest/joytest.cpp @@ -167,7 +167,7 @@ MyFrame::~MyFrame() // Empty } -void MyFrame::OnQuit(wxCommandEvent& event) +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { Close(TRUE); } diff --git a/samples/keyboard/keyboard.cpp b/samples/keyboard/keyboard.cpp index aca5749e2b..29cc5abb96 100644 --- a/samples/keyboard/keyboard.cpp +++ b/samples/keyboard/keyboard.cpp @@ -320,7 +320,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) wxMessageBox(msg, _T("About wxKeyboard"), wxOK | wxICON_INFORMATION, this); } -void MyFrame::OnClear(wxCommandEvent& event) +void MyFrame::OnClear(wxCommandEvent& WXUNUSED(event)) { m_lboxLog->Clear(); } diff --git a/samples/listbox/lboxtest.cpp b/samples/listbox/lboxtest.cpp index 85e6832751..2e38ba5d72 100644 --- a/samples/listbox/lboxtest.cpp +++ b/samples/listbox/lboxtest.cpp @@ -597,17 +597,17 @@ void LboxTestFrame::OnButtonDeleteSel(wxCommandEvent& WXUNUSED(event)) } } -void LboxTestFrame::OnButtonClear(wxCommandEvent& event) +void LboxTestFrame::OnButtonClear(wxCommandEvent& WXUNUSED(event)) { m_lbox->Clear(); } -void LboxTestFrame::OnButtonClearLog(wxCommandEvent& event) +void LboxTestFrame::OnButtonClearLog(wxCommandEvent& WXUNUSED(event)) { m_lboxLog->Clear(); } -void LboxTestFrame::OnButtonAdd(wxCommandEvent& event) +void LboxTestFrame::OnButtonAdd(wxCommandEvent& WXUNUSED(event)) { static size_t s_item = 0; @@ -630,7 +630,7 @@ void LboxTestFrame::OnButtonAddMany(wxCommandEvent& WXUNUSED(event)) } } -void LboxTestFrame::OnButtonAddSeveral(wxCommandEvent& event) +void LboxTestFrame::OnButtonAddSeveral(wxCommandEvent& WXUNUSED(event)) { wxArrayString items; items.Add(_T("First")); @@ -680,7 +680,7 @@ void LboxTestFrame::OnListboxDClick(wxCommandEvent& event) wxLogMessage(_T("Listbox item %d double clicked"), event.GetInt()); } -void LboxTestFrame::OnCheckOrRadioBox(wxCommandEvent& event) +void LboxTestFrame::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event)) { m_dirty = TRUE; } diff --git a/samples/svg/svgtest.cpp b/samples/svg/svgtest.cpp index 60cf0520f3..b16331b2a7 100644 --- a/samples/svg/svgtest.cpp +++ b/samples/svg/svgtest.cpp @@ -382,7 +382,7 @@ MyCanvas::MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size) wxSUNKEN_BORDER|wxVSCROLL|wxHSCROLL) { m_child = (MyChild *) parent ; - SetBackgroundColour(wxColour("WHITE")); + SetBackgroundColour(wxColour(_T("WHITE"))); m_index = m_child->m_frame->nWinCreated % 7 ; } @@ -425,10 +425,10 @@ void MyCanvas::OnDraw(wxDC& dc) dc.SetBrush(*wxCYAN_BRUSH); dc.SetPen(*wxRED_PEN); dc.DrawRectangle(10, 10, 100, 70); - wB = wxBrush ("DARK ORCHID", wxTRANSPARENT); + wB = wxBrush (_T("DARK ORCHID"), wxTRANSPARENT); dc.SetBrush (wB); dc.DrawRoundedRectangle(50, 50, 100, 70, 20); - dc.SetBrush (wxBrush("GOLDENROD", wxSOLID) ); + dc.SetBrush (wxBrush(_T("GOLDENROD"), wxSOLID) ); dc.DrawEllipse(100, 100, 100, 50); points[0].x = 100; points[0].y = 200; @@ -449,10 +449,10 @@ void MyCanvas::OnDraw(wxDC& dc) dc.DrawLine(45,30,55,30); dc.DrawText(wxT("This is a Swiss-style string"), 50, 30); wC = dc.GetTextForeground() ; - dc.SetTextForeground ("FIREBRICK"); + dc.SetTextForeground (_T("FIREBRICK")); // no effect in msw ?? - dc.SetTextBackground ("WHEAT"); + dc.SetTextBackground (_T("WHEAT")); dc.DrawText(wxT("This is a Red string"), 50, 200); dc.DrawRotatedText(wxT("This is a 45 deg string"), 50, 200, 45); dc.DrawRotatedText(wxT("This is a 90 deg string"), 50, 200, 90); @@ -473,11 +473,11 @@ void MyCanvas::OnDraw(wxDC& dc) dc.DrawArc ( 270-50, 270-86, 270-86, 270-50, 270.0,270.0 ); dc.SetDeviceOrigin(0,0); - wP.SetColour ("CADET BLUE"); + wP.SetColour (_T("CADET BLUE")); dc.SetPen(wP); dc.DrawArc ( 75,125, 110, 40, 75.0, 75.0 ); - wP.SetColour ("SALMON"); + wP.SetColour (_T("SALMON")); dc.SetPen(wP); dc.SetBrush(*wxRED_BRUSH); //top left corner, width and height, start and end angle @@ -488,7 +488,7 @@ void MyCanvas::OnDraw(wxDC& dc) wP.SetWidth(3); dc.SetPen(wP); //wxTRANSPARENT)); - dc.SetBrush (wxBrush ("SALMON",wxSOLID)) ; + dc.SetBrush (wxBrush (_T("SALMON"),wxSOLID)) ; dc.DrawEllipticArc(300, 0,200,100, 0.0,145.0) ; //same end point dc.DrawEllipticArc(300, 50,200,100,90.0,145.0) ; @@ -499,7 +499,7 @@ void MyCanvas::OnDraw(wxDC& dc) case 4: dc.DrawCheckMark ( 30,30,25,25); - dc.SetBrush (wxBrush ("SALMON",wxTRANSPARENT)); + dc.SetBrush (wxBrush (_T("SALMON"),wxTRANSPARENT)); dc.DrawCheckMark ( 80,50,75,75); dc.DrawRectangle ( 80,50,75,75); s = wxT("Two check marks"); diff --git a/samples/vscroll/vstest.cpp b/samples/vscroll/vstest.cpp index 04255ef947..378fe4cebc 100644 --- a/samples/vscroll/vstest.cpp +++ b/samples/vscroll/vstest.cpp @@ -73,7 +73,7 @@ public: if ( m_frameStatusBar ) { wxSize sz = GetClientSize(); - SetStatusText(wxString::Format("%dx%d", sz.x, sz.y), 1); + SetStatusText(wxString::Format(_T("%dx%d"), sz.x, sz.y), 1); } #endif // wxUSE_STATUSBAR @@ -101,7 +101,7 @@ public: { m_frame->SetStatusText(wxString::Format ( - "Page size = %d, pos = %d, max = %d", + _T("Page size = %d, pos = %d, max = %d"), GetScrollThumb(wxVERTICAL), GetScrollPos(wxVERTICAL), GetScrollRange(wxVERTICAL) diff --git a/samples/wxtest/test.cpp b/samples/wxtest/test.cpp index 91f09a013f..8eec11325d 100644 --- a/samples/wxtest/test.cpp +++ b/samples/wxtest/test.cpp @@ -77,7 +77,7 @@ MyFrame::MyFrame( wxWindow *parent, wxWindowID id, const wxString &title, CreateMyMenuBar(); CreateStatusBar(1); - SetStatusText( "Welcome!" ); + SetStatusText( _T("Welcome!") ); // insert main window here } @@ -93,25 +93,25 @@ void MyFrame::CreateMyMenuBar() // WDR: handler implementations for MyFrame -void MyFrame::OnTest( wxCommandEvent &event ) +void MyFrame::OnTest( wxCommandEvent &WXUNUSED(event) ) { - MyDialog dialog( this, -1, "Test" ); + MyDialog dialog( this, -1, _T("Test") ); dialog.ShowModal(); } -void MyFrame::OnAbout( wxCommandEvent &event ) +void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) ) { - wxMessageDialog dialog( this, "Welcome to SuperApp 1.0\n(C)opyright Joe Hacker", - "About SuperApp", wxOK|wxICON_INFORMATION ); + wxMessageDialog dialog( this, _T("Welcome to SuperApp 1.0\n(C)opyright Joe Hacker"), + _T("About SuperApp"), wxOK|wxICON_INFORMATION ); dialog.ShowModal(); } -void MyFrame::OnQuit( wxCommandEvent &event ) +void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) ) { Close( TRUE ); } -void MyFrame::OnCloseWindow( wxCloseEvent &event ) +void MyFrame::OnCloseWindow( wxCloseEvent &WXUNUSED(event) ) { // if ! saved changes -> return @@ -130,7 +130,7 @@ MyApp::MyApp() bool MyApp::OnInit() { - MyFrame *frame = new MyFrame( NULL, -1, "SuperApp", wxPoint(20,20), wxSize(500,340) ); + MyFrame *frame = new MyFrame( NULL, -1, _T("SuperApp"), wxPoint(20,20), wxSize(500,340) ); frame->Show( TRUE ); return TRUE; diff --git a/samples/wxtest/test_wdr.cpp b/samples/wxtest/test_wdr.cpp index c6ec0d7ed6..9d577d12d3 100644 --- a/samples/wxtest/test_wdr.cpp +++ b/samples/wxtest/test_wdr.cpp @@ -24,12 +24,12 @@ wxSizer *MyDialogFunc( wxWindow *parent, bool call_fit, bool set_sizer ) { wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); - wxStaticBox *item2 = new wxStaticBox( parent, -1, "Text" ); + wxStaticBox *item2 = new wxStaticBox( parent, -1, _T("Text") ); wxStaticBoxSizer *item1 = new wxStaticBoxSizer( item2, wxVERTICAL ); wxBoxSizer *item3 = new wxBoxSizer( wxHORIZONTAL ); - wxTextCtrl *item4 = new wxTextCtrl( parent, ID_TEXTCTRL, "", wxDefaultPosition, wxSize(80,-1), 0 ); + wxTextCtrl *item4 = new wxTextCtrl( parent, ID_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(80,-1), 0 ); item3->Add( item4, 0, wxALIGN_CENTRE|wxALL, 5 ); item1->Add( item3, 0, wxALIGN_CENTRE|wxALL, 5 ); @@ -57,10 +57,10 @@ wxMenuBar *MyMenuBarFunc() wxMenuBar *item0 = new wxMenuBar; wxMenu* item1 = new wxMenu; - item1->Append( ID_ABOUT, "About...\tF1", "" ); - item1->Append( ID_TEST, "Test...\tF2", "" ); - item1->Append( ID_QUIT, "Quit\tCtrl-Q", "" ); - item0->Append( item1, "File" ); + item1->Append( ID_ABOUT, _T("About...\tF1"), wxEmptyString ); + item1->Append( ID_TEST, _T("Test...\tF2"), wxEmptyString ); + item1->Append( ID_QUIT, _T("Quit\tCtrl-Q"), wxEmptyString ); + item0->Append( item1, _T("File") ); return item0; } diff --git a/samples/xrc/derivdlg.cpp b/samples/xrc/derivdlg.cpp index 437615d60b..b784e322b4 100644 --- a/samples/xrc/derivdlg.cpp +++ b/samples/xrc/derivdlg.cpp @@ -73,7 +73,7 @@ PreferencesDialog::~PreferencesDialog() // Private members (including the event handlers) //----------------------------------------------------------------------------- -void PreferencesDialog::OnMyButtonClicked( wxCommandEvent &event ) +void PreferencesDialog::OnMyButtonClicked( wxCommandEvent &WXUNUSED(event) ) { // Construct a message dialog. wxMessageDialog msgDlg(this, _("You clicked on My Button")); @@ -85,7 +85,7 @@ void PreferencesDialog::OnMyButtonClicked( wxCommandEvent &event ) // Update the enabled/disabled state of the edit/delete buttons depending on // whether a row (item) is selected in the listctrl -void PreferencesDialog::OuUpdateUIMyCheckbox( wxUpdateUIEvent &event ) +void PreferencesDialog::OuUpdateUIMyCheckbox( wxUpdateUIEvent &WXUNUSED(event) ) { // Get a boolean value of whether the checkbox is checked bool myCheckBoxIsChecked; @@ -102,7 +102,7 @@ void PreferencesDialog::OuUpdateUIMyCheckbox( wxUpdateUIEvent &event ) } -void PreferencesDialog::OnOK( wxCommandEvent& event ) +void PreferencesDialog::OnOK( wxCommandEvent& WXUNUSED(event) ) { // Construct a message dialog (An extra parameters to put a cancel button on). wxMessageDialog msgDlg2(this, _("Press OK to close Derived dialog, or Cancel to abort"), -- 2.45.2