]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/varhscrollhelper.tex
Don't use const bool.
[wxWidgets.git] / docs / latex / wx / varhscrollhelper.tex
... / ...
CommitLineData
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: varhscrollhelper.tex
3%% Purpose: wxVarHScrollHelper Documentation
4%% Author: Bryan Petty
5%% Modified by:
6%% Created: 2007-04-04
7%% RCS-ID: $Id$
8%% Copyright: (c) 2007 wxWidgets Team
9%% License: wxWindows Licence
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxVarHScrollHelper}}\label{wxvarhscrollhelper}
13
14This class provides functions wrapping the
15\helpref{wxVarScrollHelperBase}{wxvarscrollhelperbase} class, targeted for
16horizontal-specific scrolling using \helpref{wxHScrolledWindow}{wxhscrolledwindow}.
17
18Like wxVarScrollHelperBase, this class is mostly only useful to those classes
19built into wxWidgets deriving from here, and this documentation is mostly
20only provided for referencing those functions provided. You will likely want
21to derive your window from wxHScrolledWindow rather than from here directly.
22
23\wxheading{Derived from}
24
25\helpref{wxVarScrollHelperBase}{wxvarscrollhelperbase}
26
27\wxheading{Include files}
28
29<wx/vscroll.h>
30
31\wxheading{See also}
32
33\helpref{wxHScrolledWindow}{wxhscrolledwindow},
34\rtfsp\helpref{wxHVScrolledWindow}{wxhvscrolledwindow},
35\rtfsp\helpref{wxVScrolledWindow}{wxvscrolledwindow}
36
37\latexignore{\rtfignore{\wxheading{Members}}}
38
39
40\membersection{wxVarHScrollHelper::wxVarHScrollHelper}\label{wxvarhscrollhelperwxvarhscrollhelper}
41
42\func{}{wxVarHScrollHelper}{\param{wxWindow* }{winToScroll}}
43
44Constructor taking the target window to be scrolled by this helper class.
45This will attach scroll event handlers to the target window to catch and
46handle scroll events appropriately.
47
48
49\membersection{wxVarHScrollHelper::EstimateTotalWidth}\label{wxvarhscrollhelperestimatetotalwidth}
50
51\constfunc{virtual wxCoord}{EstimateTotalWidth}{\void}
52
53This class forwards calls from
54\helpref{wxVarScrollHelperBase::EstimateTotalSize}{wxvarscrollhelperbaseestimatetotalsize}
55to this function so derived classes can override either just the height or
56the width estimation, or just estimate both differently if desired in any
57\helpref{wxHVScrolledWindow}{wxhvscrolledwindow} derived class.
58
59Please note that this function will not be called if {\tt EstimateTotalSize()}
60is overridden in your derived class.
61
62
63\membersection{wxVarHScrollHelper::GetColumnCount}\label{wxvarhscrollhelpergetcolumncount}
64
65\constfunc{size\_t}{GetColumnCount}{\void}
66
67Returns the number of columns the target window contains.
68
69\wxheading{See also}
70
71\helpref{SetColumnCount()}{wxvarhscrollhelpersetcolumncount}
72
73
74\membersection{wxVarHScrollHelper::GetVisibleColumnsBegin}\label{wxvarhscrollhelpergetvisiblecolumnsbegin}
75
76\constfunc{size\_t}{GetVisibleColumnsBegin}{\void}
77
78Returns the index of the first visible column based on the scroll position.
79
80
81\membersection{wxVarHScrollHelper::GetVisibleColumnsEnd}\label{wxvarhscrollhelpergetvisiblecolumnsend}
82
83\constfunc{size\_t}{GetVisibleColumnsEnd}{\void}
84
85Returns the index of the last visible column based on the scroll position. This
86includes the last column even if it is only partially visible.
87
88
89\membersection{wxVarHScrollHelper::IsColumnVisible}\label{wxvarhscrollhelperiscolumnvisible}
90
91\constfunc{bool}{IsColumnVisible}{\param{size\_t }{column}}
92
93Returns {\tt true} if the given column is currently visible (even if only
94partially visible) or {\tt false} otherwise.
95
96
97\membersection{wxVarHScrollHelper::OnGetColumnWidth}\label{wxvarhscrollhelperongetcolumnwidth}
98
99\constfunc{virtual wxCoord}{OnGetColumnWidth}{\param{size\_t }{column}}
100
101This function must be overridden in the derived class, and should return the
102width of the given column in pixels.
103
104
105\membersection{wxVarHScrollHelper::OnGetColumnsWidthHint}\label{wxvarhscrollhelperongetcolumnswidthhint}
106
107\constfunc{virtual void}{OnGetColumnsWidthHint}{\param{size\_t }{columnMin}, \param{size\_t }{columnMax}}
108
109This function doesn't have to be overridden but it may be useful to do so if
110calculating the columns' sizes is a relatively expensive operation as it gives
111your code a chance to calculate several of them at once and cache the result
112if necessary.
113
114{\tt OnGetColumnsWidthHint()} is normally called just before
115\helpref{OnGetColumnWidth()}{wxvarhscrollhelperongetcolumnwidth} but you
116shouldn't rely on the latter being called for all columns in the interval
117specified here. It is also possible that OnGetColumnWidth() will be called for
118units outside of this interval, so this is really just a hint, not a promise.
119
120Finally, note that columnMin is inclusive, while columnMax is exclusive.
121
122
123\membersection{wxVarHScrollHelper::RefreshColumn}\label{wxvarhscrollhelperrefreshcolumn}
124
125\func{virtual void}{RefreshColumn}{\param{size\_t }{column}}
126
127Triggers a refresh for just the given column's area of the window if it's visible.
128
129
130\membersection{wxVarHScrollHelper::RefreshColumns}\label{wxvarhscrollhelperrefreshcolumns}
131
132\func{virtual void}{RefreshColumns}{\param{size\_t }{from}, \param{size\_t }{to}}
133
134Triggers a refresh for the area between the specified range of columns given
135(inclusively).
136
137
138\membersection{wxVarHScrollHelper::ScrollColumnPages}\label{wxvarhscrollhelperscrollcolumnpages}
139
140\func{virtual bool}{ScrollColumnPages}{\param{int }{pages}}
141
142Scroll by the specified number of pages which may be positive (to scroll right)
143or negative (to scroll left).
144
145
146\membersection{wxVarHScrollHelper::ScrollColumns}\label{wxvarhscrollhelperscrollcolumns}
147
148\func{virtual bool}{ScrollColumns}{\param{int }{columns}}
149
150Scroll by the specified number of columns which may be positive (to scroll right)
151or negative (to scroll left).
152
153Returns {\tt true} if the window was scrolled, {\tt false} otherwise (for
154example, if we're trying to scroll right but we are already showing the last
155column).
156
157
158\membersection{wxVarHScrollHelper::ScrollToColumn}\label{wxvarhscrollhelperscrolltocolumn}
159
160\func{bool}{ScrollToColumn}{\param{size\_t }{column}}
161
162Scroll to the specified column. It will become the first visible column in the window.
163
164Returns {\tt true} if we scrolled the window, {\tt false} if nothing was done.
165
166
167\membersection{wxVarHScrollHelper::SetColumnCount}\label{wxvarhscrollhelpersetcolumncount}
168
169\func{void}{SetColumnCount}{\param{size\_t }{columnCount}}
170
171Set the number of columns the window contains. The derived class must provide
172the widths for all columns with indices up to the one given here in it's
173\helpref{OnGetColumnWidth()}{wxvarhscrollhelperongetcolumnwidth} implementation.
174
175\wxheading{See also}
176
177\helpref{GetColumnCount()}{wxvarhscrollhelpergetcolumncount}
178