%% Created: 30.05.03
%% RCS-ID: $Id$
%% Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
-%% License: wxWindows license
+%% License: wxWidgets license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxVScrolledWindow}}\label{wxvscrolledwindow}
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.
need to specify it explicitly.
+\membersection{wxVScrolledWindow::EstimateTotalHeight}\label{wxvscrolledwindowestimatetotalheight}
+
+\constfunc{virtual wxCoord}{EstimateTotalHeight}{\void}
+
+This protected function is used internally by wxVScrolledWindow to estimate the
+total height of the window when \helpref{SetLineCount}{wxvscrolledwindowsetlinecount}
+is called. The default implementation uses the brute force approach if the
+number of the items in the control is small enough. Otherwise, it tries to find
+the average line height using some lines in the beginning, middle and the end.
+
+If it is undesirable to access all these lines (some of which might be never
+shown) just for the total height calculation, you may override the function and
+provide your own guess better and/or faster.
+
+Note that although returning a totally wrong value would still work, it risks
+to result in very strange scrollbar behaviour so this function should really
+try to make the best guess possible.
+
+
\membersection{wxVScrolledWindow::GetFirstVisibleLine}\label{wxvscrolledwindowgetfirstvisibleline}
\constfunc{size\_t}{GetFirstVisibleLine}{\void}
\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.