]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/scrolevt.tex
1. made ScrollLines/Pages return bool indicating if we scrolled till the
[wxWidgets.git] / docs / latex / wx / scrolevt.tex
CommitLineData
a660d684
KB
1\section{\class{wxScrollEvent}}\label{wxscrollevent}
2
9c7a49b5
VZ
3A scroll event holds information about events sent from stand-alone
4scrollbars, spin-buttons and sliders. Note that starting from wxWindows 2.1,
5scrolled windows send the \helpref{wxScrollWinEvent}{wxscrollwinevent} which
6does not derive from wxCommandEvent, but from wxEvent directly - don't confuse
7these two kinds of events and use the event table macros mentioned below only
8for the scrollbar-like controls.
a660d684
KB
9
10\wxheading{Derived from}
11
12\helpref{wxCommandEvent}{wxcommandevent}\\
13\helpref{wxEvent}{wxevent}\\
14\helpref{wxObject}{wxobject}
15
954b8ae6
JS
16\wxheading{Include files}
17
18<wx/event.h>
19
a660d684
KB
20\wxheading{Event table macros}
21
9c7a49b5
VZ
22To process a scroll event, use these event handler macros to direct input to
23member functions that take a wxScrollEvent argument. You can use
24{\tt EVT\_COMMAND\_SCROLL...} macros with window IDs for when intercepting
25scroll events from controls, or {\tt EVT\_SCROLL...} macros without window IDs
26for intercepting scroll events from the receiving window - except for this,
27the macros behave exactly the same
a660d684
KB
28
29\twocolwidtha{7cm}
30\begin{twocollist}\itemsep=0pt
31\twocolitem{{\bf EVT\_SCROLL(func)}}{Process all scroll events.}
32\twocolitem{{\bf EVT\_SCROLL\_TOP(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events.}
33\twocolitem{{\bf EVT\_SCROLL\_BOTTOM(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events.}
34\twocolitem{{\bf EVT\_SCROLL\_LINEUP(func)}}{Process wxEVT\_SCROLL\_LINEUP line up events.}
35\twocolitem{{\bf EVT\_SCROLL\_LINEDOWN(func)}}{Process wxEVT\_SCROLL\_LINEDOWN line down events.}
36\twocolitem{{\bf EVT\_SCROLL\_PAGEUP(func)}}{Process wxEVT\_SCROLL\_PAGEUP page up events.}
37\twocolitem{{\bf EVT\_SCROLL\_PAGEDOWN(func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.}
38\twocolitem{{\bf EVT\_SCROLL\_THUMBTRACK(func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events
39sent as the user drags the thumtrack).}
530a7383 40\twocolitem{{\bf EVT\_SCROLL\_THUMBRELEASE(func)}}{Process wxEVT\_SCROLL\_THUMBRELEASE thumb release events.}
a660d684
KB
41\twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Process all scroll events.}
42\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_TOP(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events.}
43\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_BOTTOM(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events.}
44\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_LINEUP(id, func)}}{Process wxEVT\_SCROLL\_LINEUP line up events.}
45\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_LINEDOWN(id, func)}}{Process wxEVT\_SCROLL\_LINEDOWN line down events.}
46\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_PAGEUP(id, func)}}{Process wxEVT\_SCROLL\_PAGEUP page up events.}
47\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_PAGEDOWN(id, func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.}
48\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBTRACK(id, func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events
49sent as the user drags the thumtrack).}
9c7a49b5 50\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBRELEASE(func)}}{Process wxEVT\_SCROLL\_THUMBRELEASE thumb release events.}
a660d684
KB
51\end{twocollist}%
52
53\wxheading{Remarks}
54
55Note that unless specifying a scroll control identifier, you will need to test for scrollbar
56orientation with \helpref{wxScrollEvent::GetOrientation}{wxscrolleventgetorientation}, since
57horizontal and vertical scroll events are processed using the same event handler.
58
59\wxheading{See also}
60
fd128b0c
RR
61\helpref{wxScrollBar}{wxscrollbar}, \helpref{wxSlider}{wxslider}, \helpref{wxSpinButton}{wxspinbutton}, \\
62\helpref{wxScrollWinEvent}{wxscrollwinevent}, \helpref{Event handling overview}{eventhandlingoverview}
a660d684
KB
63
64\latexignore{\rtfignore{\wxheading{Members}}}
65
66\membersection{wxScrollEvent::wxScrollEvent}
67
68\func{}{wxScrollEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}, \param{int}{ pos = 0},
69\rtfsp\param{int}{ orientation = 0}}
70
71Constructor.
72
73\membersection{wxScrollEvent::GetOrientation}\label{wxscrolleventgetorientation}
74
75\constfunc{int}{GetOrientation}{\void}
76
77Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the scrollbar.
78
79\membersection{wxScrollEvent::GetPosition}\label{wxscrolleventgetposition}
80
81\constfunc{int}{GetPosition}{\void}
82
83Returns the position of the scrollbar.
84