tested and applied http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/85790/
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -102,15 +102,15 @@ Returns the index of the last visible column and row based on the scroll
|
||||
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}
|
||||
|
@@ -172,12 +172,13 @@ Returns the index of the last visible unit based on the scroll position. This
|
||||
includes the last unit even if it is only partially visible.
|
||||
|
||||
|
||||
\membersection{wxVarScrollHelperBase::HitTest}\label{wxvarscrollhelperbasehittest}
|
||||
\membersection{wxVarScrollHelperBase::VirtualHitTest}\label{wxvarscrollhelperbasevirtualhittest}
|
||||
|
||||
\constfunc{virtual int}{HitTest}{\param{wxCoord }{coord}}
|
||||
\constfunc{int}{VirtualHitTest}{\param{wxCoord }{coord}}
|
||||
|
||||
Returns the scroll unit under the device unit given accounting for scroll
|
||||
position or {\tt wxNOT\_FOUND} if none (i.e. if it is below the last item).
|
||||
Returns the virtual scroll unit under the device unit given accounting for
|
||||
scroll position or {\tt wxNOT\_FOUND} if none (i.e. if it is below the last
|
||||
item).
|
||||
|
||||
|
||||
\membersection{wxVarScrollHelperBase::IsVisible}\label{wxvarscrollhelperbaseisvisible}
|
||||
|
@@ -94,6 +94,11 @@ position was 0 and the first line wasn't completely visible.
|
||||
|
||||
Deprecated for \helpref{GetRowCount()}{wxvarvscrollhelpergetrowcount}.
|
||||
|
||||
\constfunc{int}{HitTest}{\param{wxCoord }{x}, \param{wxCoord }{y}}
|
||||
\constfunc{int}{HitTest}{\param{const wxPoint\& }{pt}}
|
||||
|
||||
Deprecated for \helpref{VirtualHitTest()}{wxvarscrollhelperbasevirtualhittest}.
|
||||
|
||||
\constfunc{virtual wxCoord}{OnGetLineHeight}{\param{size\_t }{line}}
|
||||
|
||||
Deprecated for \helpref{OnGetRowHeight()}{wxvarvscrollhelperongetrowheight}.
|
||||
|
@@ -78,7 +78,7 @@ public:
|
||||
{ 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();
|
||||
@@ -324,9 +324,6 @@ public:
|
||||
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(); }
|
||||
@@ -401,8 +398,6 @@ public:
|
||||
{ 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
|
||||
|
||||
@@ -514,10 +509,10 @@ public:
|
||||
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()
|
||||
@@ -736,11 +731,14 @@ public:
|
||||
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()
|
||||
|
||||
@@ -809,12 +807,6 @@ public:
|
||||
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__
|
||||
@@ -880,12 +872,6 @@ public:
|
||||
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__
|
||||
|
@@ -539,7 +539,7 @@ bool wxVarScrollHelperBase::ScrollLayout()
|
||||
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 )
|
||||
@@ -874,10 +874,10 @@ void wxVarHVScrollHelper::RefreshRowsColumns(size_t fromRow, size_t toRow,
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
|
Reference in New Issue
Block a user