X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e0af0bcdaedd6cb7a0d49f7752905e8bc3415cd..316189733a8b7f28aa7f9f555884bb45da30da33:/docs/latex/wx/vscroll.tex diff --git a/docs/latex/wx/vscroll.tex b/docs/latex/wx/vscroll.tex index 83d151170f..d304d6f172 100644 --- a/docs/latex/wx/vscroll.tex +++ b/docs/latex/wx/vscroll.tex @@ -33,7 +33,7 @@ moment on the scrolling is handled entirely by wxVScrolledWindow, you only need to draw the visible part of contents in your {\tt OnPaint()} method as usual. You should use \helpref{GetFirstVisibleLine()}{wxvscrolledwindowgetfirstvisibleline} and \helpref{GetLastVisibleLine()}{wxvscrolledwindowgetlastvisibleline} to -select the lines to display. ote that the device context origin is not shifted +select the lines to display. Note that the device context origin is not shifted so the first visible line always appears at the point $(0, 0)$ in physical as well as logical coordinates. @@ -115,12 +115,22 @@ try to make the best guess possible. Returns the index of the first currently visible line. +This is same as \helpref{GetVisibleBegin}{wxvscrolledwindowgetvisiblebegin} and +exists only for symmetry with \helpref{GetLastVisibleLine}{wxvscrolledwindowgetlastvisibleline}. + \membersection{wxVScrolledWindow::GetLastVisibleLine}\label{wxvscrolledwindowgetlastvisibleline} \constfunc{size\_t}{GetLastVisibleLine}{\void} -Returns the index of the last currently visible line. +Returns the index of the last currently visible line. Note that this method +returns \texttt{(size\_t)-1} (i.e. a huge positive number) if the control is +empty so if this is possible you should use \helpref{GetVisibleEnd}{wxvscrolledwindowgetvisibleend} +instead. + +\wxheading{See also} + +\helpref{GetFirstVisibleLine}{wxvscrolledwindowgetfirstvisibleline} \membersection{wxVScrolledWindow::GetLineCount}\label{wxvscrolledwindowgetlinecount} @@ -131,6 +141,31 @@ Get the number of lines this window contains (previously set by \helpref{SetLineCount()}{wxvscrolledwindowsetlinecount}) +\membersection{wxVScrolledWindow::GetVisibleBegin}\label{wxvscrolledwindowgetvisiblebegin} + +\constfunc{size\_t}{GetVisibleBegin}{\void} + +Returns the index of the first currently visible line. + +\wxheading{See also} + +\helpref{GetVisibleEnd}{wxvscrolledwindowgetvisibleend} + + +\membersection{wxVScrolledWindow::GetVisibleEnd}\label{wxvscrolledwindowgetvisibleend} + +\constfunc{size\_t}{GetVisibleEnd}{\void} + +Returns the index of the first line after the currently visible one. If the +return value is $0$ it means that no lines are currently shown (which only +happens if the control is empty). Note that the index returned by this method +is not always a valid index as it may be equal to \helpref{GetLineCount}{wxvscrolledwindowsetlinecount}. + +\wxheading{See also} + +\helpref{GetVisibleBegin}{wxvscrolledwindowgetvisiblebegin} + + \membersection{wxVScrolledWindow::HitTest}\label{wxvscrolledwindowhittest} \constfunc{int}{HitTest}{\param{wxCoord }{x}, \param{wxCoord }{y}} @@ -210,7 +245,7 @@ should be less than or equal to {\it to}. \func{void}{RefreshAll}{\void} This function completely refreshes the control, recalculating the number of -items shown on screen and repaining them. It should be called when the values +items shown on screen and repainting them. It should be called when the values returned by \helpref{OnGetLineHeight}{wxvscrolledwindowongetlineheight} change for some reason and the window must be updated to reflect this.