position. This includes any partially visible columns or rows.
-\membersection{wxVarHVScrollHelper::HitTest}\label{wxvarhvscrollhelperhittest}
+\membersection{wxVarHVScrollHelper::VirtualHitTest}\label{wxvarhvscrollhelpervirtualhittest}
-\constfunc{virtual wxPosition}{HitTest}{\param{wxCoord }{x}, \param{wxCoord }{y}}
+\constfunc{wxPosition}{VirtualHitTest}{\param{wxCoord }{x}, \param{wxCoord }{y}}
-\constfunc{virtual wxPosition}{HitTest}{\param{const wxPoint\& }{pos}}
+\constfunc{wxPosition}{VirtualHitTest}{\param{const wxPoint\& }{pos}}
-Returns the scroll unit under the device unit given accounting for scroll
-position or {\tt wxNOT\_FOUND} (for the row, column, or possibly both values)
-if none.
+Returns the virtual scroll unit under the device unit given accounting for
+scroll position or {\tt wxNOT\_FOUND} (for the row, column, or possibly both
+values) if none.
\membersection{wxVarHVScrollHelper::IsVisible}\label{wxvarhvscrollhelperisvisible}
{ m_physicalScrolling = scrolling; }
// wxNOT_FOUND if none, i.e. if it is below the last item
- virtual int HitTest(wxCoord coord) const;
+ int VirtualHitTest(wxCoord coord) const;
// recalculate all our parameters and redisplay all units
virtual void RefreshAll();
virtual void RefreshRows(size_t from, size_t to)
{ RefreshUnits(from, to); }
- virtual int HitTest(wxCoord y) const
- { return wxVarScrollHelperBase::HitTest(y); }
-
// accessors
size_t GetRowCount() const { return GetUnitCount(); }
{ RefreshUnit(column); }
virtual void RefreshColumns(size_t from, size_t to)
{ RefreshUnits(from, to); }
- virtual int HitTest(wxCoord x) const
- { return wxVarScrollHelperBase::HitTest(x); }
// accessors
from.GetColumn(), to.GetColumn());
}
- // Override wxPanel::HitTest to use our version
- virtual wxPosition HitTest(wxCoord x, wxCoord y) const;
- virtual wxPosition HitTest(const wxPoint &pos) const
- { return HitTest(pos.x, pos.y); }
+ // locate the virtual position from the given device coordinates
+ wxPosition VirtualHitTest(wxCoord x, wxCoord y) const;
+ wxPosition VirtualHitTest(const wxPoint &pos) const
+ { return VirtualHitTest(pos.x, pos.y); }
// change the DC origin according to the scroll position. To properly
// forward calls to wxWindow::Layout use WX_FORWARD_TO_SCROLL_HELPER()
return wxPanel::Create(parent, id, pos, size, style | wxVSCROLL, name);
}
+#if WXWIN_COMPATIBILITY_2_8
// Make sure we prefer our version of HitTest rather than wxWindow's
+ // These functions should no longer be masked in favor of VirtualHitTest()
int HitTest(wxCoord WXUNUSED(x), wxCoord y) const
- { return wxVarVScrollHelper::HitTest(y); }
+ { return wxVarVScrollHelper::VirtualHitTest(y); }
int HitTest(const wxPoint& pt) const
{ return HitTest(pt.x, pt.y); }
+#endif // WXWIN_COMPATIBILITY_2_8
WX_FORWARD_TO_VAR_SCROLL_HELPER()
return wxPanel::Create(parent, id, pos, size, style | wxHSCROLL, name);
}
- // Make sure we prefer our version of HitTest rather than wxWindow's
- int HitTest(wxCoord x, wxCoord WXUNUSED(y)) const
- { return wxVarHScrollHelper::HitTest(x); }
- int HitTest(const wxPoint& pt) const
- { return HitTest(pt.x, pt.y); }
-
WX_FORWARD_TO_VAR_SCROLL_HELPER()
#ifdef __WXMAC__
style | wxVSCROLL | wxHSCROLL, name);
}
- // Make sure we prefer our version of HitTest rather than wxWindow's
- wxPosition HitTest(wxCoord x, wxCoord y) const
- { return wxVarHVScrollHelper::HitTest(x, y); }
- wxPosition HitTest(const wxPoint &pt) const
- { return HitTest(pt.x, pt.y); }
-
WX_FORWARD_TO_VAR_SCROLL_HELPER()
#ifdef __WXMAC__
return m_targetWindow->wxWindow::Layout();
}
-int wxVarScrollHelperBase::HitTest(wxCoord coord) const
+int wxVarScrollHelperBase::VirtualHitTest(wxCoord coord) const
{
const size_t unitMax = GetVisibleEnd();
for ( size_t unit = GetVisibleBegin(); unit < unitMax; ++unit )
}
}
-wxPosition wxVarHVScrollHelper::HitTest(wxCoord x, wxCoord y) const
+wxPosition wxVarHVScrollHelper::VirtualHitTest(wxCoord x, wxCoord y) const
{
- return wxPosition(wxVarVScrollHelper::HitTest(y),
- wxVarHScrollHelper::HitTest(x));
+ return wxPosition(wxVarVScrollHelper::VirtualHitTest(y),
+ wxVarHScrollHelper::VirtualHitTest(x));
}
void wxVarHVScrollHelper::DoPrepareDC(wxDC& dc)