]> git.saurik.com Git - wxWidgets.git/commitdiff
tested and applied http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/85790/
authorChris Elliott <biol75@york.ac.uk>
Thu, 26 Apr 2007 10:50:54 +0000 (10:50 +0000)
committerChris Elliott <biol75@york.ac.uk>
Thu, 26 Apr 2007 10:50:54 +0000 (10:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/varhvscrollhelper.tex
docs/latex/wx/varscrollhelperbase.tex
docs/latex/wx/vscrolledwindow.tex
include/wx/vscroll.h
src/common/config.cpp
src/generic/vscroll.cpp

index c50f0f8bbdec4dcec261f0231320bbd00db18f53..21b0f1eb4d9c999bc56cbdd21de6c283a56a0fcd 100644 (file)
@@ -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.
 
 
 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}
 
 
 \membersection{wxVarHVScrollHelper::IsVisible}\label{wxvarhvscrollhelperisvisible}
index 223cd84eba3e3ba16f90834bde2dca4976fea124..ad8e3f7d4fa07e4e1cf9062cb9064218820afd80 100644 (file)
@@ -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.
 
 
 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}
 
 
 \membersection{wxVarScrollHelperBase::IsVisible}\label{wxvarscrollhelperbaseisvisible}
index b66c55bca5276bb7c111c732df28477de5b56ab4..1d05234c5f38defdf5e80469d55fb970f8ebe728 100644 (file)
@@ -94,6 +94,11 @@ position was 0 and the first line wasn't completely visible.
 
 Deprecated for \helpref{GetRowCount()}{wxvarvscrollhelpergetrowcount}.
 
 
 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}.
 \constfunc{virtual wxCoord}{OnGetLineHeight}{\param{size\_t }{line}}
 
 Deprecated for \helpref{OnGetRowHeight()}{wxvarvscrollhelperongetrowheight}.
index 4b18ca6333e3396103c45503b5eb511064a726cd..4da294ce6055ec1e3cc980833ae2938e265ef96a 100644 (file)
@@ -78,7 +78,7 @@ public:
         { m_physicalScrolling = scrolling; }
 
     // wxNOT_FOUND if none, i.e. if it is below the last item
         { 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();
 
     // 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 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(); }
     // 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); }
         { 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
 
 
     // accessors
 
@@ -514,10 +509,10 @@ public:
                           from.GetColumn(), to.GetColumn());
     }
 
                           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()
 
     // 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);
     }
 
         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
     // 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
     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); }
     int HitTest(const wxPoint& pt) const
         { return HitTest(pt.x, pt.y); }
+#endif // WXWIN_COMPATIBILITY_2_8
 
     WX_FORWARD_TO_VAR_SCROLL_HELPER()
 
 
     WX_FORWARD_TO_VAR_SCROLL_HELPER()
 
@@ -809,12 +807,6 @@ public:
         return wxPanel::Create(parent, id, pos, size, style | wxHSCROLL, name);
     }
 
         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__
     WX_FORWARD_TO_VAR_SCROLL_HELPER()
 
 #ifdef __WXMAC__
@@ -880,12 +872,6 @@ public:
                                style | wxVSCROLL | wxHSCROLL, name);
     }
 
                                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__
     WX_FORWARD_TO_VAR_SCROLL_HELPER()
 
 #ifdef __WXMAC__
index 660932e4697aa927a42a7ebd771a376323485a09..17db0fca5aedaa314917dc19ed1851ac5e2cae8a 100644 (file)
@@ -382,7 +382,7 @@ wxString wxExpandEnvVars(const wxString& str)
 
           while ( m < str.length() && (wxIsalnum(str[m]) || str[m] == wxT('_')) )
             m++;
 
           while ( m < str.length() && (wxIsalnum(str[m]) || str[m] == wxT('_')) )
             m++;
-
           wxString strVarName(str.c_str() + n + 1, m - n - 1);
 
 #ifdef __WXWINCE__
           wxString strVarName(str.c_str() + n + 1, m - n - 1);
 
 #ifdef __WXWINCE__
index 492b3ead2c3e267c154abc6e2cff771ade9cf11d..e6cf0713d815ebe101cd774571cf48968ec6c175 100644 (file)
@@ -539,7 +539,7 @@ bool wxVarScrollHelperBase::ScrollLayout()
     return m_targetWindow->wxWindow::Layout();
 }
 
     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 )
 {
     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)
 }
 
 void wxVarHVScrollHelper::DoPrepareDC(wxDC& dc)