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
This commit is contained in:
parent
23dd0dcea9
commit
f6268c151c
@ -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,
|
||||
|
@ -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() { }
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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.
|
||||
|
@ -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") );
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user