From f6268c151c84762a9d664b6e9a7e938ef2619415 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 Mar 2013 12:11:32 +0000 Subject: [PATCH] Make wxRect parameter of wxRichToolTip::ShowFor() const. This parameter is read-only, so accept a const pointer here. See #15060. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/private/richtooltip.h | 2 +- include/wx/private/richtooltip.h | 2 +- include/wx/richtooltip.h | 2 +- interface/wx/richtooltip.h | 2 +- src/common/richtooltipcmn.cpp | 2 +- src/generic/richtooltipg.cpp | 4 ++-- src/msw/richtooltip.cpp | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/wx/generic/private/richtooltip.h b/include/wx/generic/private/richtooltip.h index c296b0c5ef..74db335303 100644 --- a/include/wx/generic/private/richtooltip.h +++ b/include/wx/generic/private/richtooltip.h @@ -42,7 +42,7 @@ public: virtual void SetTipKind(wxTipKind tipKind); virtual void SetTitleFont(const wxFont& font); - virtual void ShowFor(wxWindow* win, wxRect* rect = NULL); + virtual void ShowFor(wxWindow* win, const wxRect* rect = NULL); protected: wxString m_title, diff --git a/include/wx/private/richtooltip.h b/include/wx/private/richtooltip.h index c55b6d8dd4..3094ed012c 100644 --- a/include/wx/private/richtooltip.h +++ b/include/wx/private/richtooltip.h @@ -34,7 +34,7 @@ public: virtual void SetTipKind(wxTipKind tipKind) = 0; virtual void SetTitleFont(const wxFont& font) = 0; - virtual void ShowFor(wxWindow* win, wxRect* rect = NULL) = 0; + virtual void ShowFor(wxWindow* win, const wxRect* rect = NULL) = 0; virtual ~wxRichToolTipImpl() { } diff --git a/include/wx/richtooltip.h b/include/wx/richtooltip.h index 4052a5d00c..fa24931fbd 100644 --- a/include/wx/richtooltip.h +++ b/include/wx/richtooltip.h @@ -88,7 +88,7 @@ public: void SetTitleFont(const wxFont& font); // Show the tooltip for the given window and optionally a specified area. - void ShowFor(wxWindow* win, wxRect* rect = NULL); + void ShowFor(wxWindow* win, const wxRect* rect = NULL); // Non-virtual dtor as this class is not supposed to be derived from. ~wxRichToolTip(); diff --git a/interface/wx/richtooltip.h b/interface/wx/richtooltip.h index 6c4615d442..205ba266a0 100644 --- a/interface/wx/richtooltip.h +++ b/interface/wx/richtooltip.h @@ -188,7 +188,7 @@ public: Parameter @a rect is new since wxWidgets 2.9.5. */ - void ShowFor(wxWindow* win, wxRect* rect = NULL); + void ShowFor(wxWindow* win, const wxRect* rect = NULL); /** Destructor. diff --git a/src/common/richtooltipcmn.cpp b/src/common/richtooltipcmn.cpp index 4231ea8c7e..58ed5d03b1 100644 --- a/src/common/richtooltipcmn.cpp +++ b/src/common/richtooltipcmn.cpp @@ -73,7 +73,7 @@ void wxRichToolTip::SetTitleFont(const wxFont& font) m_impl->SetTitleFont(font); } -void wxRichToolTip::ShowFor(wxWindow* win, wxRect* rect) +void wxRichToolTip::ShowFor(wxWindow* win, const wxRect* rect) { wxCHECK_RET( win, wxS("Must have a valid window") ); diff --git a/src/generic/richtooltipg.cpp b/src/generic/richtooltipg.cpp index 82f8b16966..0c00e24a67 100644 --- a/src/generic/richtooltipg.cpp +++ b/src/generic/richtooltipg.cpp @@ -232,7 +232,7 @@ public: } } - void SetPosition(wxRect* rect) + void SetPosition(const wxRect* rect) { wxPoint pos; @@ -673,7 +673,7 @@ void wxRichToolTipGenericImpl::SetTitleFont(const wxFont& font) m_titleFont = font; } -void wxRichToolTipGenericImpl::ShowFor(wxWindow* win, wxRect* rect) +void wxRichToolTipGenericImpl::ShowFor(wxWindow* win, const wxRect* rect) { // Set the focus to the window the tooltip refers to to make it look active. win->SetFocus(); diff --git a/src/msw/richtooltip.cpp b/src/msw/richtooltip.cpp index c1d0e5f2b9..9a50ab2271 100644 --- a/src/msw/richtooltip.cpp +++ b/src/msw/richtooltip.cpp @@ -151,7 +151,7 @@ public: wxRichToolTipGenericImpl::SetTitleFont(font); } - virtual void ShowFor(wxWindow* win, wxRect* rect) + virtual void ShowFor(wxWindow* win, const wxRect* rect) { // TODO: We could use native tooltip control to show native balloon // tooltips for any window but right now we use the simple