]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/varhvscrollhelper.tex
don't use obsolete functions (mostly copystring() and Count()), remove their document...
[wxWidgets.git] / docs / latex / wx / varhvscrollhelper.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: varhvscrollhelper.tex
3 %% Purpose: wxVarHVScrollHelper 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{wxVarHVScrollHelper}}\label{wxvarhvscrollhelper}
13
14 This class provides functions wrapping the
15 \helpref{wxVarHScrollHelper}{wxvarhscrollhelper} and
16 \helpref{wxVarVScrollHelper}{wxvarvscrollhelper} classes, targeted for
17 scrolling a window in both axis using
18 \helpref{wxHVScrolledWindow}{wxhvscrolledwindow}. Since this class is also
19 the join class of the horizontal and vertical scrolling functionality, it
20 also addresses some wrappers that help avoid the need to specify class scope
21 in your wxHVScrolledWindow-derived class when using wxVarScrollHelperBase
22 functionality.
23
24 Like all three of it's scroll helper base classes, this class is mostly only
25 useful to those classes built into wxWidgets deriving from here, and this
26 documentation is mostly only provided for referencing those functions
27 provided. You will likely want to derive your window from wxHVScrolledWindow
28 rather than from here directly.
29
30 \wxheading{Derived from}
31
32 \helpref{wxVarVScrollHelper}{wxvarvscrollhelper}\\
33 \helpref{wxVarScrollHelperBase}{wxvarscrollhelperbase}
34
35 \helpref{wxVarHScrollHelper}{wxvarhscrollhelper}\\
36 \helpref{wxVarScrollHelperBase}{wxvarscrollhelperbase}
37
38 \wxheading{Include files}
39
40 <wx/vscroll.h>
41
42 \wxheading{See also}
43
44 \helpref{wxHScrolledWindow}{wxhscrolledwindow},
45 \rtfsp\helpref{wxHVScrolledWindow}{wxhvscrolledwindow},
46 \rtfsp\helpref{wxVScrolledWindow}{wxvscrolledwindow}
47
48 \latexignore{\rtfignore{\wxheading{Members}}}
49
50
51 \membersection{wxVarHVScrollHelper::wxVarHVScrollHelper}\label{wxvarhvscrollhelperwxvarhvscrollhelper}
52
53 \func{}{wxVarHVScrollHelper}{\param{wxWindow* }{winToScroll}}
54
55 Constructor taking the target window to be scrolled by this helper class.
56 This will attach scroll event handlers to the target window to catch and
57 handle scroll events appropriately.
58
59
60 \membersection{wxVarHVScrollHelper::EnablePhysicalScrolling}\label{wxvarhvscrollhelperenablephysicalscrolling}
61
62 \func{void}{EnablePhysicalScrolling}{\param{bool }{vscrolling = true}, \param{bool }{hscrolling = true}}
63
64 With physical scrolling on (when this is {\tt true}), the device origin is
65 changed properly when a \rtfsp\helpref{wxPaintDC}{wxpaintdc} is prepared,
66 children are actually moved and laid out properly, and the contents of the
67 window (pixels) are actually moved. When this is {\tt false}, you are
68 responsible for repainting any invalidated areas of the window yourself to
69 account for the new scroll position.
70
71 \wxheading{Parameters}
72
73 \docparam{vscrolling}{Specifies if physical scrolling should be turned on when scrolling vertically.}
74
75 \docparam{hscrolling}{Specifies if physical scrolling should be turned on when scrolling horizontally.}
76
77
78 \membersection{wxVarHVScrollHelper::GetRowColumnCount}\label{wxvarhvscrollhelpergetrowcolumncount}
79
80 \constfunc{wxSize}{GetRowColumnCount}{\void}
81
82 Returns the number of columns and rows the target window contains.
83
84 \wxheading{See also}
85
86 \helpref{SetRowColumnCount()}{wxvarhvscrollhelpersetrowcolumncount}
87
88
89 \membersection{wxVarHVScrollHelper::GetVisibleBegin}\label{wxvarhvscrollhelpergetvisiblebegin}
90
91 \constfunc{wxPosition}{GetVisibleBegin}{\void}
92
93 Returns the index of the first visible column and row based on the current
94 scroll position.
95
96
97 \membersection{wxVarHVScrollHelper::GetVisibleEnd}\label{wxvarhvscrollhelpergetvisibleend}
98
99 \constfunc{wxPosition}{GetVisibleEnd}{\void}
100
101 Returns the index of the last visible column and row based on the scroll
102 position. This includes any partially visible columns or rows.
103
104
105 \membersection{wxVarHVScrollHelper::HitTest}\label{wxvarhvscrollhelperhittest}
106
107 \constfunc{virtual wxPosition}{HitTest}{\param{wxCoord }{x}, \param{wxCoord }{y}}
108
109 \constfunc{virtual wxPosition}{HitTest}{\param{const wxPoint\& }{pos}}
110
111 Returns the scroll unit under the device unit given accounting for scroll
112 position or {\tt wxNOT\_FOUND} (for the row, column, or possibly both values)
113 if none.
114
115
116 \membersection{wxVarHVScrollHelper::IsVisible}\label{wxvarhvscrollhelperisvisible}
117
118 \constfunc{bool}{IsVisible}{\param{size\_t }{row}, \param{size\_t }{column}}
119
120 \constfunc{bool}{IsVisible}{\param{const wxPosition\& }{pos}}
121
122 Returns {\tt true} if both the given row and column are currently visible
123 (even if only partially visible) or {\tt false} otherwise.
124
125
126 \membersection{wxVarHVScrollHelper::RefreshRowColumn}\label{wxvarhvscrollhelperrefreshrowcolumn}
127
128 \func{virtual void}{RefreshRowColumn}{\param{size\_t }{row}, \param{size\_t }{column}}
129
130 \func{virtual void}{RefreshRowColumn}{\param{const wxPosition\& }{pos}}
131
132 Triggers a refresh for just the area shared between the given row and column
133 of the window if it is visible.
134
135
136 \membersection{wxVarHVScrollHelper::RefreshRowsColumns}\label{wxvarhvscrollhelperrefreshrowscolumns}
137
138 \func{virtual void}{RefreshRowsColumns}{\param{size\_t }{fromRow}, \param{size\_t }{toRow}, \param{size\_t }{fromColumn}, \param{size\_t }{toColumn}}
139
140 \func{virtual void}{RefreshRowsColumns}{\param{const wxPosition\& }{from}, \param{const wxPosition\& }{to}}
141
142 Triggers a refresh for the visible area shared between all given rows and
143 columns (inclusive) of the window. If the target window for both orientations
144 is the same, the rectangle of cells is refreshed; if the target windows
145 differ, the entire client size opposite the orientation direction is
146 refreshed between the specified limits.
147
148
149 \membersection{wxVarHVScrollHelper::ScrollToRowColumn}\label{wxvarhvscrollhelperscrolltorowcolumn}
150
151 \func{bool}{ScrollToRowColumn}{\param{size\_t }{row}, \param{size\_t }{column}}
152
153 \func{bool}{ScrollToRowColumn}{\param{const wxPosition\& }{pos}}
154
155 Scroll to the specified row and column. It will become the first visible row
156 and column in the window. Returns {\tt true} if we scrolled the window,
157 {\tt false} if nothing was done.
158
159
160 \membersection{wxVarHVScrollHelper::SetRowColumnCount}\label{wxvarhvscrollhelpersetrowcolumncount}
161
162 \func{void}{SetRowColumnCount}{\param{size\_t }{rowCount}, \param{size\_t }{columnCount}}
163
164 Set the number of rows and columns the target window will contain. The
165 derived class must provide the sizes for all rows and columns with indices up
166 to the ones given here in it's \helpref{OnGetRowHeight()}{wxvarvscrollhelperongetrowheight}
167 and \helpref{OnGetColumnWidth()}{wxvarhscrollhelperongetcolumnwidth} implementations,
168 respectively.
169
170 \wxheading{See also}
171
172 \helpref{GetRowColumnCount()}{wxvarhvscrollhelpergetrowcolumncount}
173