From 61fef19b852d426f5b00b60de083539b9ba0f76c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 3 Aug 2003 20:58:56 +0000 Subject: [PATCH] warnings (and some errors) fixes for wxUniv DLL build git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/cshelp.h | 4 +- include/wx/generic/mdig.h | 4 +- include/wx/univ/combobox.h | 2 +- include/wx/univ/menu.h | 2 +- include/wx/univ/radiobox.h | 2 +- include/wx/univ/renderer.h | 2 +- src/generic/listctrl.cpp | 6 +- src/generic/mdig.cpp | 2 +- src/msw/window.cpp | 20 ++++-- src/univ/button.cpp | 8 +-- src/univ/checkbox.cpp | 4 +- src/univ/choice.cpp | 2 +- src/univ/combobox.cpp | 4 +- src/univ/ctrlrend.cpp | 2 +- src/univ/inpcons.cpp | 6 +- src/univ/listbox.cpp | 4 +- src/univ/notebook.cpp | 5 +- src/univ/radiobut.cpp | 2 +- src/univ/scrolbar.cpp | 2 +- src/univ/slider.cpp | 5 +- src/univ/textctrl.cpp | 5 +- src/univ/themes/gtk.cpp | 127 ++++++++++++++++++++----------------- src/univ/themes/metal.cpp | 20 +++--- src/univ/themes/win32.cpp | 50 ++++++++------- src/univ/toolbar.cpp | 4 +- src/univ/topluniv.cpp | 6 +- src/univ/winuniv.cpp | 6 +- 27 files changed, 168 insertions(+), 138 deletions(-) diff --git a/include/wx/cshelp.h b/include/wx/cshelp.h index 31d6e205c3..2da0ddd5b5 100644 --- a/include/wx/cshelp.h +++ b/include/wx/cshelp.h @@ -141,8 +141,8 @@ private: static wxHelpProvider *ms_helpProvider; }; -WX_DECLARE_HASH_MAP( long, wxString, wxIntegerHash, wxIntegerEqual, - wxLongToStringHashMap ); +WX_DECLARE_EXPORTED_HASH_MAP( long, wxString, wxIntegerHash, wxIntegerEqual, + wxLongToStringHashMap ); // wxSimpleHelpProvider is an implementation of wxHelpProvider which supports // only plain text help strings and shows the string associated with the diff --git a/include/wx/generic/mdig.h b/include/wx/generic/mdig.h index 715f4a22d3..1aff578bf2 100644 --- a/include/wx/generic/mdig.h +++ b/include/wx/generic/mdig.h @@ -175,8 +175,8 @@ public: #endif // no icon - void SetIcon( const wxIcon &icon ) { /*m_icons = wxIconBundle( icon );*/} - void SetIcons( const wxIconBundle &icons ) { /*m_icons = icons;*/ } + void SetIcon( const wxIcon& WXUNUSED(icon) ) { } + void SetIcons( const wxIconBundle& WXUNUSED(icons) ) { } // no maximize etc virtual void Maximize( bool WXUNUSED(maximize) = TRUE) { /* Has no effect */ } diff --git a/include/wx/univ/combobox.h b/include/wx/univ/combobox.h index 5ef092afbd..b77d640564 100644 --- a/include/wx/univ/combobox.h +++ b/include/wx/univ/combobox.h @@ -277,7 +277,7 @@ public: virtual int GetSelection() const; void SetSelection(int n) { Select(n); } - void SetStringSelection(const wxString& s) { } + void SetStringSelection(const wxString& WXUNUSED(s)) { } // we have to redefine these functions here to avoid ambiguities in classes // deriving from us which would arise otherwise because we inherit these diff --git a/include/wx/univ/menu.h b/include/wx/univ/menu.h index 4f1c1c888e..6cfeceac98 100644 --- a/include/wx/univ/menu.h +++ b/include/wx/univ/menu.h @@ -24,7 +24,7 @@ // fwd declarations class WXDLLEXPORT wxMenuInfo; -WX_DECLARE_OBJARRAY(wxMenuInfo, wxMenuInfoArray); +WX_DECLARE_EXPORTED_OBJARRAY(wxMenuInfo, wxMenuInfoArray); class WXDLLEXPORT wxMenuGeometryInfo; class WXDLLEXPORT wxPopupMenuWindow; diff --git a/include/wx/univ/radiobox.h b/include/wx/univ/radiobox.h index a0022ca429..a2b06b67d7 100644 --- a/include/wx/univ/radiobox.h +++ b/include/wx/univ/radiobox.h @@ -21,7 +21,7 @@ class WXDLLEXPORT wxRadioButton; #include "wx/statbox.h" #include "wx/dynarray.h" -WX_DEFINE_ARRAY(wxRadioButton *, wxArrayRadioButtons); +WX_DEFINE_EXPORTED_ARRAY_NO_PTR(wxRadioButton *, wxArrayRadioButtons); // ---------------------------------------------------------------------------- // wxRadioBox: a box full of radio buttons diff --git a/include/wx/univ/renderer.h b/include/wx/univ/renderer.h index 6836f10f97..d45e65ae0e 100644 --- a/include/wx/univ/renderer.h +++ b/include/wx/univ/renderer.h @@ -671,7 +671,7 @@ public: wxOrientation orient, int start, int end, - int step = 1, + int WXUNUSED(step) = 1, int flags = 0, long style = 0) { m_renderer->DrawSliderTicks(dc, rect, lenThumb, orient, diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 3a758b2ccd..ac046f88fd 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -255,7 +255,7 @@ WX_DECLARE_LIST(wxListItemData, wxListItemDataList); #include "wx/listimpl.cpp" WX_DEFINE_LIST(wxListItemDataList); -class WXDLLEXPORT wxListLineData +class wxListLineData { public: // the list of subitems: only may have more than one item in report mode @@ -476,7 +476,7 @@ WX_DECLARE_LIST(wxListHeaderData, wxListHeaderDataList); #include "wx/listimpl.cpp" WX_DEFINE_LIST(wxListHeaderDataList); -class WXDLLEXPORT wxListMainWindow : public wxScrolledWindow +class wxListMainWindow : public wxScrolledWindow { public: wxListMainWindow(); @@ -1214,7 +1214,7 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing ) } void wxListLineData::SetPosition( int x, int y, - int window_width, + int WXUNUSED(window_width), int spacing ) { wxListItemDataList::compatibility_iterator node = m_items.GetFirst(); diff --git a/src/generic/mdig.cpp b/src/generic/mdig.cpp index 17c5bab868..5335360296 100644 --- a/src/generic/mdig.cpp +++ b/src/generic/mdig.cpp @@ -571,7 +571,7 @@ void wxGenericMDIChildFrame::OnMenuHighlight(wxMenuEvent& event) #endif // wxUSE_STATUSBAR } -void wxGenericMDIChildFrame::OnActivate(wxActivateEvent& event) +void wxGenericMDIChildFrame::OnActivate(wxActivateEvent& WXUNUSED(event)) { // Do mothing. } diff --git a/src/msw/window.cpp b/src/msw/window.cpp index a451b9a33a..c5d1f8275b 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -49,7 +49,7 @@ #include "wx/statbox.h" #endif -#if wxUSE_OWNER_DRAWN +#if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) #include "wx/ownerdrw.h" #endif @@ -3520,7 +3520,16 @@ bool wxWindowMSW::HandleSetCursor(WXHWND WXUNUSED(hWnd), // owner drawn stuff // --------------------------------------------------------------------------- -bool wxWindowMSW::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct) +#if (wxUSE_OWNER_DRAWN && wxUSE_MENUS_NATIVE) || \ + (wxUSE_CONTROLS && !defined(__WXUNIVERSAL__)) + #define WXUNUSED_UNLESS_ODRAWN(param) param +#else + #define WXUNUSED_UNLESS_ODRAWN(param) +#endif + +bool +wxWindowMSW::MSWOnDrawItem(int WXUNUSED_UNLESS_ODRAWN(id), + WXDRAWITEMSTRUCT * WXUNUSED_UNLESS_ODRAWN(itemStruct)) { #if wxUSE_OWNER_DRAWN @@ -3572,9 +3581,12 @@ bool wxWindowMSW::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct) return FALSE; } -bool wxWindowMSW::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct) +bool +wxWindowMSW::MSWOnMeasureItem(int WXUNUSED_UNLESS_ODRAWN(id), + WXMEASUREITEMSTRUCT * + WXUNUSED_UNLESS_ODRAWN(itemStruct)) { -#if wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) +#if wxUSE_OWNER_DRAWN && wxUSE_MENUS_NATIVE // is it a menu item? MEASUREITEMSTRUCT *pMeasureStruct = (MEASUREITEMSTRUCT *)itemStruct; if ( id == 0 && pMeasureStruct->CtlType == ODT_MENU ) diff --git a/src/univ/button.cpp b/src/univ/button.cpp index 5d4410bbd2..f76b62d678 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -82,7 +82,7 @@ bool wxButton::Create(wxWindow *parent, style |= wxALIGN_CENTRE_HORIZONTAL | wxALIGN_CENTRE_VERTICAL; } - if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) ) + if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) return FALSE; SetLabel(label); @@ -395,8 +395,8 @@ bool wxStdButtonInputHandler::HandleMouseMove(wxInputConsumer *consumer, return wxStdInputHandler::HandleMouseMove(consumer, event); } -bool wxStdButtonInputHandler::HandleFocus(wxInputConsumer *consumer, - const wxFocusEvent& event) +bool wxStdButtonInputHandler::HandleFocus(wxInputConsumer * WXUNUSED(consumer), + const wxFocusEvent& WXUNUSED(event)) { // buttons change appearance when they get/lose focus, so return TRUE to // refresh @@ -404,7 +404,7 @@ bool wxStdButtonInputHandler::HandleFocus(wxInputConsumer *consumer, } bool wxStdButtonInputHandler::HandleActivation(wxInputConsumer *consumer, - bool activated) + bool WXUNUSED(activated)) { // the default button changes appearance when the app is [de]activated, so // return TRUE to refresh diff --git a/src/univ/checkbox.cpp b/src/univ/checkbox.cpp index 78eb261489..2fcd04bfa9 100644 --- a/src/univ/checkbox.cpp +++ b/src/univ/checkbox.cpp @@ -67,7 +67,7 @@ bool wxCheckBox::Create(wxWindow *parent, const wxValidator& validator, const wxString &name) { - if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) ) + if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) return FALSE; SetLabel(label); @@ -279,7 +279,7 @@ wxStdCheckboxInputHandler::wxStdCheckboxInputHandler(wxInputHandler *inphand) } bool wxStdCheckboxInputHandler::HandleActivation(wxInputConsumer *consumer, - bool activated) + bool WXUNUSED(activated)) { // only the focused checkbox appearance changes when the app gains/loses // activation diff --git a/src/univ/choice.cpp b/src/univ/choice.cpp index 7af8af88e4..2997ac532c 100644 --- a/src/univ/choice.cpp +++ b/src/univ/choice.cpp @@ -43,7 +43,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, int n, const wxString choices[], - long style, + long WXUNUSED(style), const wxValidator& validator, const wxString& name) { diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 4c122a1904..2ee283fb93 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -93,7 +93,7 @@ public: } protected: - void OnButton(wxCommandEvent& event) { m_combo->ShowPopup(); } + void OnButton(wxCommandEvent& WXUNUSED(event)) { m_combo->ShowPopup(); } virtual wxSize DoGetBestClientSize() const { @@ -290,7 +290,7 @@ wxComboControl::~wxComboControl() // ---------------------------------------------------------------------------- void wxComboControl::DoSetSize(int x, int y, - int width, int height, + int width, int WXUNUSED(height), int sizeFlags) { // combo height is always fixed diff --git a/src/univ/ctrlrend.cpp b/src/univ/ctrlrend.cpp index a693d45657..e7d9480a6b 100644 --- a/src/univ/ctrlrend.cpp +++ b/src/univ/ctrlrend.cpp @@ -545,7 +545,7 @@ void wxControlRenderer::DrawBitmap(wxDC &dc, } void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar, - int thumbPosOld) + int WXUNUSED(thumbPosOld)) { // we will only redraw the parts which must be redrawn and not everything wxRegion rgnUpdate = scrollbar->GetUpdateRegion(); diff --git a/src/univ/inpcons.cpp b/src/univ/inpcons.cpp index 1f6a7d8755..8fb83fff49 100644 --- a/src/univ/inpcons.cpp +++ b/src/univ/inpcons.cpp @@ -99,9 +99,9 @@ void wxInputConsumer::OnMouse(wxMouseEvent& event) // the actions // ---------------------------------------------------------------------------- -bool wxInputConsumer::PerformAction(const wxControlAction& action, - long numArg, - const wxString& strArg) +bool wxInputConsumer::PerformAction(const wxControlAction& WXUNUSED(action), + long WXUNUSED(numArg), + const wxString& WXUNUSED(strArg)) { return FALSE; } diff --git a/src/univ/listbox.cpp b/src/univ/listbox.cpp index 4612caa01d..299255d2b8 100644 --- a/src/univ/listbox.cpp +++ b/src/univ/listbox.cpp @@ -106,7 +106,7 @@ bool wxListBox::Create(wxWindow *parent, #endif if ( !wxControl::Create(parent, id, pos, size, style, - wxDefaultValidator, name) ) + validator, name) ) return FALSE; SetWindow(this); @@ -769,7 +769,7 @@ void wxListBox::DoSetSize(int x, int y, height = ((height - hBorders + hLine - 1) / hLine)*hLine + hBorders; } - wxListBoxBase::DoSetSize(x, y, width, height); + wxListBoxBase::DoSetSize(x, y, width, height, sizeFlags); } wxSize wxListBox::DoGetBestClientSize() const diff --git a/src/univ/notebook.cpp b/src/univ/notebook.cpp index 5865b1baf4..9e5116fe85 100644 --- a/src/univ/notebook.cpp +++ b/src/univ/notebook.cpp @@ -1389,8 +1389,9 @@ bool wxStdNotebookInputHandler::HandleMouseMove(wxInputConsumer *consumer, return wxStdInputHandler::HandleMouseMove(consumer, event); } -bool wxStdNotebookInputHandler::HandleFocus(wxInputConsumer *consumer, - const wxFocusEvent& event) +bool +wxStdNotebookInputHandler::HandleFocus(wxInputConsumer *consumer, + const wxFocusEvent& WXUNUSED(event)) { HandleFocusChange(consumer); diff --git a/src/univ/radiobut.cpp b/src/univ/radiobut.cpp index 5357f948d7..eb1d8a6dc8 100644 --- a/src/univ/radiobut.cpp +++ b/src/univ/radiobut.cpp @@ -60,7 +60,7 @@ bool wxRadioButton::Create(wxWindow *parent, const wxString &name) { if ( !wxCheckBox::Create(parent, id, label, pos, size, style, - wxDefaultValidator, name) ) + validator, name) ) { return FALSE; } diff --git a/src/univ/scrolbar.cpp b/src/univ/scrolbar.cpp index 372b3b3fe9..061fabdd8b 100644 --- a/src/univ/scrolbar.cpp +++ b/src/univ/scrolbar.cpp @@ -147,7 +147,7 @@ bool wxScrollBar::Create(wxWindow *parent, // the scrollbars never have the border style &= ~wxBORDER_MASK; - if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) ) + if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) return FALSE; SetBestSize(size); diff --git a/src/univ/slider.cpp b/src/univ/slider.cpp index adfa70db53..87064fda1d 100644 --- a/src/univ/slider.cpp +++ b/src/univ/slider.cpp @@ -1026,8 +1026,9 @@ bool wxStdSliderButtonInputHandler::HandleMouseMove(wxInputConsumer *consumer, return wxStdInputHandler::HandleMouseMove(consumer, event); } -bool wxStdSliderButtonInputHandler::HandleFocus(wxInputConsumer *consumer, - const wxFocusEvent& event) +bool +wxStdSliderButtonInputHandler::HandleFocus(wxInputConsumer * WXUNUSED(consumer), + const wxFocusEvent& WXUNUSED(event)) { // slider's appearance changes when it gets/loses focus return TRUE; diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index afd8751329..f209017f86 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -4899,8 +4899,9 @@ bool wxStdTextCtrlInputHandler::HandleMouseMove(wxInputConsumer *consumer, return wxStdInputHandler::HandleMouseMove(consumer, event); } -bool wxStdTextCtrlInputHandler::HandleFocus(wxInputConsumer *consumer, - const wxFocusEvent& event) +bool +wxStdTextCtrlInputHandler::HandleFocus(wxInputConsumer *consumer, + const wxFocusEvent& WXUNUSED(event)) { wxTextCtrl *text = wxStaticCast(consumer->GetInputWindow(), wxTextCtrl); diff --git a/src/univ/themes/gtk.cpp b/src/univ/themes/gtk.cpp index 50c81098b7..2c23fd07bc 100644 --- a/src/univ/themes/gtk.cpp +++ b/src/univ/themes/gtk.cpp @@ -195,15 +195,15 @@ public: wxOrientation orient, int flags = 0, long style = 0); - virtual void DrawSliderTicks(wxDC& dc, - const wxRect& rect, - int lenThumb, - wxOrientation orient, - int start, - int end, - int step = 1, - int flags = 0, - long style = 0) + virtual void DrawSliderTicks(wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), + int WXUNUSED(lenThumb), + wxOrientation WXUNUSED(orient), + int WXUNUSED(start), + int WXUNUSED(end), + int WXUNUSED(step) = 1, + int WXUNUSED(flags) = 0, + long WXUNUSED(style) = 0) { // we don't have the ticks in GTK version } @@ -591,7 +591,7 @@ protected: // wxGTKTheme // ---------------------------------------------------------------------------- -WX_DEFINE_ARRAY(wxInputHandler *, wxArrayHandlers); +WX_DEFINE_ARRAY_NO_PTR(wxInputHandler *, wxArrayHandlers); class wxGTKTheme : public wxTheme { @@ -980,7 +980,7 @@ void wxGTKRenderer::DrawAntiRaisedBorder(wxDC& dc, wxRect *rect) void wxGTKRenderer::DrawBorder(wxDC& dc, wxBorder border, const wxRect& rectTotal, - int flags, + int WXUNUSED(flags), wxRect *rectIn) { size_t width; @@ -1634,7 +1634,7 @@ void wxGTKRenderer::DrawToolBarButton(wxDC& dc, const wxBitmap& bitmap, const wxRect& rectOrig, int flags, - long style) + long WXUNUSED(style)) { // we don't draw the separators at all if ( !label.empty() || bitmap.Ok() ) @@ -1663,7 +1663,7 @@ void wxGTKRenderer::DrawToolBarButton(wxDC& dc, // text control // ---------------------------------------------------------------------------- -wxRect wxGTKRenderer::GetTextTotalArea(const wxTextCtrl *text, +wxRect wxGTKRenderer::GetTextTotalArea(const wxTextCtrl * WXUNUSED(text), const wxRect& rect) const { wxRect rectTotal = rect; @@ -1897,19 +1897,19 @@ wxSize wxGTKRenderer::GetSliderThumbSize(const wxRect& rect, } wxRect wxGTKRenderer::GetSliderShaftRect(const wxRect& rect, - int lenThumb, + int WXUNUSED(lenThumb), wxOrientation WXUNUSED(orient), - long style) const + long WXUNUSED(style)) const { return rect.Deflate(2*BORDER_THICKNESS, 2*BORDER_THICKNESS); } void wxGTKRenderer::DrawSliderShaft(wxDC& dc, const wxRect& rectOrig, - int lenThumb, - wxOrientation orient, + int WXUNUSED(lenThumb), + wxOrientation WXUNUSED(orient), int flags, - long style, + long WXUNUSED(style), wxRect *rectShaft) { wxRect rect = rectOrig; @@ -1936,8 +1936,8 @@ void wxGTKRenderer::DrawSliderShaft(wxDC& dc, void wxGTKRenderer::DrawSliderThumb(wxDC& dc, const wxRect& rectOrig, wxOrientation orient, - int flags, - long style) + int WXUNUSED(flags), + long WXUNUSED(style)) { // draw the thumb border wxRect rect = rectOrig; @@ -2227,15 +2227,16 @@ wxMenuGeometryInfo *wxGTKRenderer::GetMenuGeometry(wxWindow *win, // status bar // ---------------------------------------------------------------------------- -wxSize wxGTKRenderer::GetStatusBarBorders(wxCoord *borderBetweenFields) const +wxSize +wxGTKRenderer::GetStatusBarBorders(wxCoord * WXUNUSED(borderBetweenFields)) const { return wxSize(0, 0); } -void wxGTKRenderer::DrawStatusField(wxDC& dc, - const wxRect& rect, - const wxString& label, - int flags) +void wxGTKRenderer::DrawStatusField(wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), + const wxString& WXUNUSED(label), + int WXUNUSED(flags)) { } @@ -2304,7 +2305,7 @@ void wxGTKRenderer::GetComboBitmaps(wxBitmap *bmpNormal, void wxGTKRenderer::DoDrawBackground(wxDC& dc, const wxColour& col, const wxRect& rect, - wxWindow *window ) + wxWindow * WXUNUSED(window)) { wxBrush brush(col, wxSOLID); dc.SetBrush(brush); @@ -2650,7 +2651,7 @@ void wxGTKRenderer::DrawScrollbarThumb(wxDC& dc, void wxGTKRenderer::DrawScrollbarShaft(wxDC& dc, wxOrientation orient, const wxRect& rect, - int flags) + int WXUNUSED(flags)) { wxRect rectBar = rect; DrawThumbBorder(dc, &rectBar, orient); @@ -2756,60 +2757,65 @@ void wxGTKRenderer::AdjustSize(wxSize *size, const wxWindow *window) // top level windows // ---------------------------------------------------------------------------- -void wxGTKRenderer::DrawFrameTitleBar(wxDC& dc, - const wxRect& rect, - const wxString& title, - const wxIcon& icon, - int flags, - int specialButton, - int specialButtonFlag) +void wxGTKRenderer::DrawFrameTitleBar(wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), + const wxString& WXUNUSED(title), + const wxIcon& WXUNUSED(icon), + int WXUNUSED(flags), + int WXUNUSED(specialButton), + int WXUNUSED(specialButtonFlag)) { } -void wxGTKRenderer::DrawFrameBorder(wxDC& dc, - const wxRect& rect, - int flags) +void wxGTKRenderer::DrawFrameBorder(wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), + int WXUNUSED(flags)) { } -void wxGTKRenderer::DrawFrameBackground(wxDC& dc, - const wxRect& rect, - int flags) +void wxGTKRenderer::DrawFrameBackground(wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), + int WXUNUSED(flags)) { } -void wxGTKRenderer::DrawFrameTitle(wxDC& dc, - const wxRect& rect, - const wxString& title, - int flags) +void wxGTKRenderer::DrawFrameTitle(wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), + const wxString& WXUNUSED(title), + int WXUNUSED(flags)) { } -void wxGTKRenderer::DrawFrameIcon(wxDC& dc, - const wxRect& rect, - const wxIcon& icon, - int flags) +void wxGTKRenderer::DrawFrameIcon(wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), + const wxIcon& WXUNUSED(icon), + int WXUNUSED(flags)) { } -void wxGTKRenderer::DrawFrameButton(wxDC& dc, - wxCoord x, wxCoord y, - int button, - int flags) +void wxGTKRenderer::DrawFrameButton(wxDC& WXUNUSED(dc), + wxCoord WXUNUSED(x), + wxCoord WXUNUSED(y), + int WXUNUSED(button), + int WXUNUSED(flags)) { } -wxRect wxGTKRenderer::GetFrameClientArea(const wxRect& rect, int flags) const +wxRect +wxGTKRenderer::GetFrameClientArea(const wxRect& rect, + int WXUNUSED(flags)) const { return rect; } -wxSize wxGTKRenderer::GetFrameTotalSize(const wxSize& clientSize, int flags) const +wxSize +wxGTKRenderer::GetFrameTotalSize(const wxSize& clientSize, + int WXUNUSED(flags)) const { return clientSize; } -wxSize wxGTKRenderer::GetFrameMinSize(int flags) const +wxSize wxGTKRenderer::GetFrameMinSize(int WXUNUSED(flags)) const { return wxSize(0,0); } @@ -2819,7 +2825,10 @@ wxSize wxGTKRenderer::GetFrameIconSize() const return wxSize(-1, -1); } -int wxGTKRenderer::HitTestFrame(const wxRect& rect, const wxPoint& pt, int flags) const +int +wxGTKRenderer::HitTestFrame(const wxRect& WXUNUSED(rect), + const wxPoint& WXUNUSED(pt), + int WXUNUSED(flags)) const { return wxHT_TOPLEVEL_CLIENT_AREA; } @@ -4462,9 +4471,9 @@ wxGTKInputHandler::wxGTKInputHandler(wxGTKRenderer *renderer) m_renderer = renderer; } -bool wxGTKInputHandler::HandleKey(wxInputConsumer *control, - const wxKeyEvent& event, - bool pressed) +bool wxGTKInputHandler::HandleKey(wxInputConsumer * WXUNUSED(control), + const wxKeyEvent& WXUNUSED(event), + bool WXUNUSED(pressed)) { return FALSE; } diff --git a/src/univ/themes/metal.cpp b/src/univ/themes/metal.cpp index 687a6847e3..f07c29525b 100644 --- a/src/univ/themes/metal.cpp +++ b/src/univ/themes/metal.cpp @@ -87,10 +87,10 @@ public: wxMetalRenderer(wxRenderer *renderer, wxColourScheme* scheme); virtual void DrawButtonSurface(wxDC& dc, - const wxColour& col, + const wxColour& WXUNUSED(col), const wxRect& rect, - int flags ) - { DrawMetal( dc, rect ); } + int WXUNUSED(flags)) + { DrawMetal(dc, rect); } virtual void DrawScrollbarThumb(wxDC& dc, wxOrientation orient, @@ -141,7 +141,7 @@ private: // wxMetalTheme // ---------------------------------------------------------------------------- -WX_DEFINE_ARRAY(wxInputHandler *, wxArrayHandlers); +WX_DEFINE_ARRAY_NO_PTR(wxInputHandler *, wxArrayHandlers); class wxMetalTheme : public wxTheme { @@ -406,9 +406,9 @@ wxMetalRenderer::wxMetalRenderer(wxRenderer *renderer, wxColourScheme *scheme) } void wxMetalRenderer::DrawScrollbarThumb(wxDC& dc, - wxOrientation orient, + wxOrientation WXUNUSED(orient), const wxRect& rect, - int flags) + int WXUNUSED(flags)) { // we don't use the flags, the thumb never changes appearance wxRect rectThumb = rect; @@ -417,15 +417,15 @@ void wxMetalRenderer::DrawScrollbarThumb(wxDC& dc, } void wxMetalRenderer::DrawScrollbarShaft(wxDC& dc, - wxOrientation orient, + wxOrientation WXUNUSED(orient), const wxRect& rectBar, - int flags) + int WXUNUSED(flags)) { - DrawMetal( dc, rectBar ); + DrawMetal(dc, rectBar); } void wxMetalRenderer::GetComboBitmaps(wxBitmap *bmpNormal, - wxBitmap *bmpFocus, + wxBitmap * WXUNUSED(bmpFocus), wxBitmap *bmpPressed, wxBitmap *bmpDisabled) { diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index ef654c4ad5..0b8499f906 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -549,7 +549,8 @@ public: protected: virtual bool IsAllowedButton(int button) { return button == 1; } - virtual void Highlight(wxScrollBar *scrollbar, bool doIt) + virtual void Highlight(wxScrollBar * WXUNUSED(scrollbar), + bool WXUNUSED(doIt)) { // we don't highlight anything } @@ -657,7 +658,7 @@ protected: // wxWin32Theme // ---------------------------------------------------------------------------- -WX_DEFINE_ARRAY(wxInputHandler *, wxArrayHandlers); +WX_DEFINE_ARRAY_NO_PTR(wxInputHandler *, wxArrayHandlers); class wxWin32Theme : public wxTheme { @@ -2453,7 +2454,9 @@ void wxWin32Renderer::DrawTextLine(wxDC& dc, StandardDrawTextLine(dc, text, rect, selStart, selEnd, flags); } -void wxWin32Renderer::DrawLineWrapMark(wxDC& dc, const wxRect& rect) +void +wxWin32Renderer::DrawLineWrapMark(wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect)) { // we don't draw them } @@ -2584,9 +2587,10 @@ void wxWin32Renderer::DrawTab(wxDC& dc, // slider // ---------------------------------------------------------------------------- -wxSize wxWin32Renderer::GetSliderThumbSize(const wxRect& rect, - int lenThumb, - wxOrientation orient) const +wxSize +wxWin32Renderer::GetSliderThumbSize(const wxRect& WXUNUSED(rect), + int lenThumb, + wxOrientation orient) const { wxSize size; wxCoord width = wxMax (lenThumb, SLIDER_THUMB_LENGTH) / 2; @@ -2857,7 +2861,7 @@ void wxWin32Renderer::DrawSliderTicks(wxDC& dc, int start, int end, int step, - int flags, + int WXUNUSED(flags), long style) { /* show ticks geometry @@ -3271,7 +3275,7 @@ void wxWin32Renderer::DrawStatusField(wxDC& dc, // ---------------------------------------------------------------------------- void wxWin32Renderer::GetComboBitmaps(wxBitmap *bmpNormal, - wxBitmap *bmpFocus, + wxBitmap * WXUNUSED(bmpFocus), wxBitmap *bmpPressed, wxBitmap *bmpDisabled) { @@ -3312,7 +3316,7 @@ void wxWin32Renderer::GetComboBitmaps(wxBitmap *bmpNormal, void wxWin32Renderer::DoDrawBackground(wxDC& dc, const wxColour& col, const wxRect& rect, - wxWindow *window ) + wxWindow * WXUNUSED(window)) { wxBrush brush(col, wxSOLID); dc.SetBrush(brush); @@ -3323,8 +3327,8 @@ void wxWin32Renderer::DoDrawBackground(wxDC& dc, void wxWin32Renderer::DrawBackground(wxDC& dc, const wxColour& col, const wxRect& rect, - int flags, - wxWindow *window ) + int WXUNUSED(flags), + wxWindow *window) { // just fill it with the given or default bg colour wxColour colBg = col.Ok() ? col : wxSCHEME_COLOUR(m_scheme, CONTROL); @@ -3400,9 +3404,9 @@ void wxWin32Renderer::DrawArrowButton(wxDC& dc, } void wxWin32Renderer::DrawScrollbarThumb(wxDC& dc, - wxOrientation orient, + wxOrientation WXUNUSED(orient), const wxRect& rect, - int flags) + int WXUNUSED(flags)) { // we don't use the flags, the thumb never changes appearance wxRect rectThumb = rect; @@ -3411,7 +3415,7 @@ void wxWin32Renderer::DrawScrollbarThumb(wxDC& dc, } void wxWin32Renderer::DrawScrollbarShaft(wxDC& dc, - wxOrientation orient, + wxOrientation WXUNUSED(orient), const wxRect& rectBar, int flags) { @@ -4020,8 +4024,9 @@ static inline int GetTextBorderWidth() return 1; } -wxRect wxWin32Renderer::GetTextTotalArea(const wxTextCtrl *text, - const wxRect& rect) const +wxRect +wxWin32Renderer::GetTextTotalArea(const wxTextCtrl * WXUNUSED(text), + const wxRect& rect) const { wxRect rectTotal = rect; @@ -4034,9 +4039,10 @@ wxRect wxWin32Renderer::GetTextTotalArea(const wxTextCtrl *text, return rectTotal; } -wxRect wxWin32Renderer::GetTextClientArea(const wxTextCtrl *text, - const wxRect& rect, - wxCoord *extraSpaceBeyond) const +wxRect +wxWin32Renderer::GetTextClientArea(const wxTextCtrl * WXUNUSED(text), + const wxRect& rect, + wxCoord *extraSpaceBeyond) const { wxRect rectText = rect; @@ -4125,9 +4131,9 @@ wxWin32InputHandler::wxWin32InputHandler(wxWin32Renderer *renderer) m_renderer = renderer; } -bool wxWin32InputHandler::HandleKey(wxInputConsumer *control, - const wxKeyEvent& event, - bool pressed) +bool wxWin32InputHandler::HandleKey(wxInputConsumer * WXUNUSED(control), + const wxKeyEvent& WXUNUSED(event), + bool WXUNUSED(pressed)) { return FALSE; } diff --git a/src/univ/toolbar.cpp b/src/univ/toolbar.cpp index c8ec9c1a20..f4cf7740fa 100644 --- a/src/univ/toolbar.cpp +++ b/src/univ/toolbar.cpp @@ -849,9 +849,9 @@ bool wxStdToolbarInputHandler::HandleMouseMove(wxInputConsumer *consumer, } bool wxStdToolbarInputHandler::HandleFocus(wxInputConsumer *consumer, - const wxFocusEvent& event) + const wxFocusEvent& WXUNUSED(event)) { - if (m_toolCapture) + if ( m_toolCapture ) { // We shouldn't be left with a highlighted button consumer->PerformAction( wxACTION_TOOLBAR_LEAVE, m_toolCapture->GetId() ); diff --git a/src/univ/topluniv.cpp b/src/univ/topluniv.cpp index 35debbc1fe..b3c6585e3e 100644 --- a/src/univ/topluniv.cpp +++ b/src/univ/topluniv.cpp @@ -471,7 +471,7 @@ void wxInteractiveMoveHandler::OnMouseMove(wxMouseEvent& event) } } -void wxInteractiveMoveHandler::OnMouseDown(wxMouseEvent& event) +void wxInteractiveMoveHandler::OnMouseDown(wxMouseEvent& WXUNUSED(event)) { if ( m_data.m_flags & wxINTERACTIVE_WAIT_FOR_INPUT ) { @@ -598,7 +598,7 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event) } } -void wxInteractiveMoveHandler::OnMouseUp(wxMouseEvent& event) +void wxInteractiveMoveHandler::OnMouseUp(wxMouseEvent& WXUNUSED(event)) { m_data.m_evtLoop->Exit(); } @@ -691,7 +691,7 @@ void wxTopLevelWindow::ClickTitleBarButton(long button) bool wxTopLevelWindow::PerformAction(const wxControlAction& action, long numArg, - const wxString& strArg) + const wxString& WXUNUSED(strArg)) { bool isActive = numArg != 0; diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index f4aeb43620..e569871c40 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -182,7 +182,7 @@ const wxBitmap& wxWindow::GetBackgroundBitmap(int *alignment, // ---------------------------------------------------------------------------- // the event handlers executed when the window must be repainted -void wxWindow::OnNcPaint(wxPaintEvent& event) +void wxWindow::OnNcPaint(wxPaintEvent& WXUNUSED(event)) { if ( m_renderer ) { @@ -340,7 +340,7 @@ void wxWindow::DoDrawBorder(wxDC& dc, const wxRect& rect) } } -void wxWindow::DoDraw(wxControlRenderer *renderer) +void wxWindow::DoDraw(wxControlRenderer * WXUNUSED(renderer)) { } @@ -891,7 +891,7 @@ void wxWindow::SetScrollbar(int orient, } } -void wxWindow::SetScrollPos(int orient, int pos, bool refresh) +void wxWindow::SetScrollPos(int orient, int pos, bool WXUNUSED(refresh)) { wxScrollBar *scrollbar = GetScrollbar(orient); wxCHECK_RET( scrollbar, _T("no scrollbar to set position for") ); -- 2.47.2