renamed wxControlWithArrows::HitTest() to HitTestArrow() to avoid conflict with wxWindow::HitTest()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2006-10-30 12:24:13 +00:00
parent a7f958f2d8
commit 6236b8b477
6 changed files with 10 additions and 9 deletions

View File

@@ -53,8 +53,9 @@ public:
bool scrollbarLike = false) const; bool scrollbarLike = false) const;
// process a mouse move, enter or leave event, possibly calling // process a mouse move, enter or leave event, possibly calling
// wxControlWithArrows::SetArrowState() if wxControlWithArrows::HitTest() // wxControlWithArrows::SetArrowState() if
// says that the mosue has left/entered an arrow // wxControlWithArrows::HitTestArrow() says that the mouse has left/entered
// an arrow
bool HandleMouseMove(const wxMouseEvent& event) const; bool HandleMouseMove(const wxMouseEvent& event) const;
// process a mouse click event // process a mouse click event
@@ -101,7 +102,7 @@ public:
int flag, bool set = true) = 0; int flag, bool set = true) = 0;
// hit testing: return on which arrow the point is (or Arrow_None) // hit testing: return on which arrow the point is (or Arrow_None)
virtual wxScrollArrows::Arrow HitTest(const wxPoint& pt) const = 0; virtual wxScrollArrows::Arrow HitTestArrow(const wxPoint& pt) const = 0;
// called when the arrow is pressed, return true to continue scrolling and // called when the arrow is pressed, return true to continue scrolling and
// false to stop it // false to stop it

View File

@@ -116,7 +116,7 @@ public:
virtual int GetArrowState(wxScrollArrows::Arrow arrow) const; virtual int GetArrowState(wxScrollArrows::Arrow arrow) const;
virtual void SetArrowFlag(wxScrollArrows::Arrow arrow, int flag, bool set); virtual void SetArrowFlag(wxScrollArrows::Arrow arrow, int flag, bool set);
virtual bool OnArrow(wxScrollArrows::Arrow arrow); virtual bool OnArrow(wxScrollArrows::Arrow arrow);
virtual wxScrollArrows::Arrow HitTest(const wxPoint& pt) const; virtual wxScrollArrows::Arrow HitTestArrow(const wxPoint& pt) const;
// for wxControlRenderer::DrawScrollbar() only // for wxControlRenderer::DrawScrollbar() only
const wxScrollArrows& GetArrows() const { return m_arrows; } const wxScrollArrows& GetArrows() const { return m_arrows; }

View File

@@ -53,7 +53,7 @@ public:
virtual int GetArrowState(wxScrollArrows::Arrow arrow) const; virtual int GetArrowState(wxScrollArrows::Arrow arrow) const;
virtual void SetArrowFlag(wxScrollArrows::Arrow arrow, int flag, bool set); virtual void SetArrowFlag(wxScrollArrows::Arrow arrow, int flag, bool set);
virtual bool OnArrow(wxScrollArrows::Arrow arrow); virtual bool OnArrow(wxScrollArrows::Arrow arrow);
virtual wxScrollArrows::Arrow HitTest(const wxPoint& pt) const; virtual wxScrollArrows::Arrow HitTestArrow(const wxPoint& pt) const;
// for wxStdSpinButtonInputHandler // for wxStdSpinButtonInputHandler
const wxScrollArrows& GetArrows() { return m_arrows; } const wxScrollArrows& GetArrows() { return m_arrows; }

View File

@@ -173,7 +173,7 @@ bool wxScrollArrows::HandleMouseMove(const wxMouseEvent& event) const
} }
else // Moving() or Entering(), treat them the same here else // Moving() or Entering(), treat them the same here
{ {
arrow = m_control->HitTest(event.GetPosition()); arrow = m_control->HitTestArrow(event.GetPosition());
} }
#if wxUSE_TIMER #if wxUSE_TIMER
@@ -234,7 +234,7 @@ bool wxScrollArrows::HandleMouse(const wxMouseEvent& event) const
{ {
if ( !m_captureData ) if ( !m_captureData )
{ {
Arrow arrow = m_control->HitTest(event.GetPosition()); Arrow arrow = m_control->HitTestArrow(event.GetPosition());
if ( arrow == Arrow_None ) if ( arrow == Arrow_None )
{ {
// mouse pressed over something else // mouse pressed over something else

View File

@@ -298,7 +298,7 @@ wxSize wxScrollBar::DoGetBestClientSize() const
return size; return size;
} }
wxScrollArrows::Arrow wxScrollBar::HitTest(const wxPoint& pt) const wxScrollArrows::Arrow wxScrollBar::HitTestArrow(const wxPoint& pt) const
{ {
switch ( m_renderer->HitTestScrollbar(this, pt) ) switch ( m_renderer->HitTestScrollbar(this, pt) )
{ {

View File

@@ -324,7 +324,7 @@ void wxSpinButton::CalcArrowRects(wxRect *rect1, wxRect *rect2) const
} }
} }
wxScrollArrows::Arrow wxSpinButton::HitTest(const wxPoint& pt) const wxScrollArrows::Arrow wxSpinButton::HitTestArrow(const wxPoint& pt) const
{ {
wxRect rectArrow1, rectArrow2; wxRect rectArrow1, rectArrow2;
CalcArrowRects(&rectArrow1, &rectArrow2); CalcArrowRects(&rectArrow1, &rectArrow2);