1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: varhvscrollhelper.tex
3 %% Purpose: wxVarHVScrollHelper Documentation
8 %% Copyright: (c) 2007 wxWidgets Team
9 %% License: wxWindows Licence
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxVarHVScrollHelper
}}\label{wxvarhvscrollhelper
}
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
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.
30 \wxheading{Derived from
}
32 \helpref{wxVarVScrollHelper
}{wxvarvscrollhelper
}\\
33 \helpref{wxVarScrollHelperBase
}{wxvarscrollhelperbase
}
35 \helpref{wxVarHScrollHelper
}{wxvarhscrollhelper
}\\
36 \helpref{wxVarScrollHelperBase
}{wxvarscrollhelperbase
}
38 \wxheading{Include files
}
44 \helpref{wxCore
}{librarieslist
}
48 \helpref{wxHScrolledWindow
}{wxhscrolledwindow
},
49 \rtfsp\helpref{wxHVScrolledWindow
}{wxhvscrolledwindow
},
50 \rtfsp\helpref{wxVScrolledWindow
}{wxvscrolledwindow
}
52 \latexignore{\rtfignore{\wxheading{Members
}}}
55 \membersection{wxVarHVScrollHelper::wxVarHVScrollHelper
}\label{wxvarhvscrollhelperwxvarhvscrollhelper
}
57 \func{}{wxVarHVScrollHelper
}{\param{wxWindow*
}{winToScroll
}}
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.
64 \membersection{wxVarHVScrollHelper::EnablePhysicalScrolling
}\label{wxvarhvscrollhelperenablephysicalscrolling
}
66 \func{void
}{EnablePhysicalScrolling
}{\param{bool
}{vscrolling = true
},
\param{bool
}{hscrolling = true
}}
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.
75 \wxheading{Parameters
}
77 \docparam{vscrolling
}{Specifies if physical scrolling should be turned on when scrolling vertically.
}
79 \docparam{hscrolling
}{Specifies if physical scrolling should be turned on when scrolling horizontally.
}
82 \membersection{wxVarHVScrollHelper::GetRowColumnCount
}\label{wxvarhvscrollhelpergetrowcolumncount
}
84 \constfunc{wxSize
}{GetRowColumnCount
}{\void}
86 Returns the number of columns and rows the target window contains.
90 \helpref{SetRowColumnCount()
}{wxvarhvscrollhelpersetrowcolumncount
}
93 \membersection{wxVarHVScrollHelper::GetVisibleBegin
}\label{wxvarhvscrollhelpergetvisiblebegin
}
95 \constfunc{wxPosition
}{GetVisibleBegin
}{\void}
97 Returns the index of the first visible column and row based on the current
101 \membersection{wxVarHVScrollHelper::GetVisibleEnd
}\label{wxvarhvscrollhelpergetvisibleend
}
103 \constfunc{wxPosition
}{GetVisibleEnd
}{\void}
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.
109 \membersection{wxVarHVScrollHelper::VirtualHitTest
}\label{wxvarhvscrollhelpervirtualhittest
}
111 \constfunc{wxPosition
}{VirtualHitTest
}{\param{wxCoord
}{x
},
\param{wxCoord
}{y
}}
113 \constfunc{wxPosition
}{VirtualHitTest
}{\param{const wxPoint\&
}{pos
}}
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
120 \membersection{wxVarHVScrollHelper::IsVisible
}\label{wxvarhvscrollhelperisvisible
}
122 \constfunc{bool
}{IsVisible
}{\param{size
\_t }{row
},
\param{size
\_t }{column
}}
124 \constfunc{bool
}{IsVisible
}{\param{const wxPosition\&
}{pos
}}
126 Returns
{\tt true
} if both the given row and column are currently visible
127 (even if only partially visible) or
{\tt false
} otherwise.
130 \membersection{wxVarHVScrollHelper::RefreshRowColumn
}\label{wxvarhvscrollhelperrefreshrowcolumn
}
132 \func{virtual void
}{RefreshRowColumn
}{\param{size
\_t }{row
},
\param{size
\_t }{column
}}
134 \func{virtual void
}{RefreshRowColumn
}{\param{const wxPosition\&
}{pos
}}
136 Triggers a refresh for just the area shared between the given row and column
137 of the window if it is visible.
140 \membersection{wxVarHVScrollHelper::RefreshRowsColumns
}\label{wxvarhvscrollhelperrefreshrowscolumns
}
142 \func{virtual void
}{RefreshRowsColumns
}{\param{size
\_t }{fromRow
},
\param{size
\_t }{toRow
},
\param{size
\_t }{fromColumn
},
\param{size
\_t }{toColumn
}}
144 \func{virtual void
}{RefreshRowsColumns
}{\param{const wxPosition\&
}{from
},
\param{const wxPosition\&
}{to
}}
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.
153 \membersection{wxVarHVScrollHelper::ScrollToRowColumn
}\label{wxvarhvscrollhelperscrolltorowcolumn
}
155 \func{bool
}{ScrollToRowColumn
}{\param{size
\_t }{row
},
\param{size
\_t }{column
}}
157 \func{bool
}{ScrollToRowColumn
}{\param{const wxPosition\&
}{pos
}}
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.
164 \membersection{wxVarHVScrollHelper::SetRowColumnCount
}\label{wxvarhvscrollhelpersetrowcolumncount
}
166 \func{void
}{SetRowColumnCount
}{\param{size
\_t }{rowCount
},
\param{size
\_t }{columnCount
}}
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,
176 \helpref{GetRowColumnCount()
}{wxvarhvscrollhelpergetrowcolumncount
}