]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/varhvscrollhelper.tex
added wxDebugContext::SetShutdownNotifyFunction() (patch 1887210)
[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{Library}
43
44 \helpref{wxCore}{librarieslist}
45
46 \wxheading{See also}
47
48 \helpref{wxHScrolledWindow}{wxhscrolledwindow},
49 \rtfsp\helpref{wxHVScrolledWindow}{wxhvscrolledwindow},
50 \rtfsp\helpref{wxVScrolledWindow}{wxvscrolledwindow}
51
52 \latexignore{\rtfignore{\wxheading{Members}}}
53
54
55 \membersection{wxVarHVScrollHelper::wxVarHVScrollHelper}\label{wxvarhvscrollhelperwxvarhvscrollhelper}
56
57 \func{}{wxVarHVScrollHelper}{\param{wxWindow* }{winToScroll}}
58
59 Constructor taking the target window to be scrolled by this helper class.
60 This will attach scroll event handlers to the target window to catch and
61 handle scroll events appropriately.
62
63
64 \membersection{wxVarHVScrollHelper::EnablePhysicalScrolling}\label{wxvarhvscrollhelperenablephysicalscrolling}
65
66 \func{void}{EnablePhysicalScrolling}{\param{bool }{vscrolling = true}, \param{bool }{hscrolling = true}}
67
68 With physical scrolling on (when this is {\tt true}), the device origin is
69 changed properly when a \rtfsp\helpref{wxPaintDC}{wxpaintdc} is prepared,
70 children are actually moved and laid out properly, and the contents of the
71 window (pixels) are actually moved. When this is {\tt false}, you are
72 responsible for repainting any invalidated areas of the window yourself to
73 account for the new scroll position.
74
75 \wxheading{Parameters}
76
77 \docparam{vscrolling}{Specifies if physical scrolling should be turned on when scrolling vertically.}
78
79 \docparam{hscrolling}{Specifies if physical scrolling should be turned on when scrolling horizontally.}
80
81
82 \membersection{wxVarHVScrollHelper::GetRowColumnCount}\label{wxvarhvscrollhelpergetrowcolumncount}
83
84 \constfunc{wxSize}{GetRowColumnCount}{\void}
85
86 Returns the number of columns and rows the target window contains.
87
88 \wxheading{See also}
89
90 \helpref{SetRowColumnCount()}{wxvarhvscrollhelpersetrowcolumncount}
91
92
93 \membersection{wxVarHVScrollHelper::GetVisibleBegin}\label{wxvarhvscrollhelpergetvisiblebegin}
94
95 \constfunc{wxPosition}{GetVisibleBegin}{\void}
96
97 Returns the index of the first visible column and row based on the current
98 scroll position.
99
100
101 \membersection{wxVarHVScrollHelper::GetVisibleEnd}\label{wxvarhvscrollhelpergetvisibleend}
102
103 \constfunc{wxPosition}{GetVisibleEnd}{\void}
104
105 Returns the index of the last visible column and row based on the scroll
106 position. This includes any partially visible columns or rows.
107
108
109 \membersection{wxVarHVScrollHelper::VirtualHitTest}\label{wxvarhvscrollhelpervirtualhittest}
110
111 \constfunc{wxPosition}{VirtualHitTest}{\param{wxCoord }{x}, \param{wxCoord }{y}}
112
113 \constfunc{wxPosition}{VirtualHitTest}{\param{const wxPoint\& }{pos}}
114
115 Returns the virtual scroll unit under the device unit given accounting for
116 scroll position or {\tt wxNOT\_FOUND} (for the row, column, or possibly both
117 values) if none.
118
119
120 \membersection{wxVarHVScrollHelper::IsVisible}\label{wxvarhvscrollhelperisvisible}
121
122 \constfunc{bool}{IsVisible}{\param{size\_t }{row}, \param{size\_t }{column}}
123
124 \constfunc{bool}{IsVisible}{\param{const wxPosition\& }{pos}}
125
126 Returns {\tt true} if both the given row and column are currently visible
127 (even if only partially visible) or {\tt false} otherwise.
128
129
130 \membersection{wxVarHVScrollHelper::RefreshRowColumn}\label{wxvarhvscrollhelperrefreshrowcolumn}
131
132 \func{virtual void}{RefreshRowColumn}{\param{size\_t }{row}, \param{size\_t }{column}}
133
134 \func{virtual void}{RefreshRowColumn}{\param{const wxPosition\& }{pos}}
135
136 Triggers a refresh for just the area shared between the given row and column
137 of the window if it is visible.
138
139
140 \membersection{wxVarHVScrollHelper::RefreshRowsColumns}\label{wxvarhvscrollhelperrefreshrowscolumns}
141
142 \func{virtual void}{RefreshRowsColumns}{\param{size\_t }{fromRow}, \param{size\_t }{toRow}, \param{size\_t }{fromColumn}, \param{size\_t }{toColumn}}
143
144 \func{virtual void}{RefreshRowsColumns}{\param{const wxPosition\& }{from}, \param{const wxPosition\& }{to}}
145
146 Triggers a refresh for the visible area shared between all given rows and
147 columns (inclusive) of the window. If the target window for both orientations
148 is the same, the rectangle of cells is refreshed; if the target windows
149 differ, the entire client size opposite the orientation direction is
150 refreshed between the specified limits.
151
152
153 \membersection{wxVarHVScrollHelper::ScrollToRowColumn}\label{wxvarhvscrollhelperscrolltorowcolumn}
154
155 \func{bool}{ScrollToRowColumn}{\param{size\_t }{row}, \param{size\_t }{column}}
156
157 \func{bool}{ScrollToRowColumn}{\param{const wxPosition\& }{pos}}
158
159 Scroll to the specified row and column. It will become the first visible row
160 and column in the window. Returns {\tt true} if we scrolled the window,
161 {\tt false} if nothing was done.
162
163
164 \membersection{wxVarHVScrollHelper::SetRowColumnCount}\label{wxvarhvscrollhelpersetrowcolumncount}
165
166 \func{void}{SetRowColumnCount}{\param{size\_t }{rowCount}, \param{size\_t }{columnCount}}
167
168 Set the number of rows and columns the target window will contain. The
169 derived class must provide the sizes for all rows and columns with indices up
170 to the ones given here in it's \helpref{OnGetRowHeight()}{wxvarvscrollhelperongetrowheight}
171 and \helpref{OnGetColumnWidth()}{wxvarhscrollhelperongetcolumnwidth} implementations,
172 respectively.
173
174 \wxheading{See also}
175
176 \helpref{GetRowColumnCount()}{wxvarhvscrollhelpergetrowcolumncount}
177