]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/scrolevt.tex
Removed the '\' quote on some '_' characters where it should not have been (inside...
[wxWidgets.git] / docs / latex / wx / scrolevt.tex
1 \section{\class{wxScrollEvent}}\label{wxscrollevent}
2
3 A scroll event holds information about events sent from stand-alone
4 scrollbars, spin-buttons and sliders. Note that starting from wxWindows 2.1,
5 scrolled windows send the \helpref{wxScrollWinEvent}{wxscrollwinevent} which
6 does not derive from wxCommandEvent, but from wxEvent directly - don't confuse
7 these two kinds of events and use the event table macros mentioned below only
8 for the scrollbar-like controls.
9
10 \wxheading{Derived from}
11
12 \helpref{wxCommandEvent}{wxcommandevent}\\
13 \helpref{wxEvent}{wxevent}\\
14 \helpref{wxObject}{wxobject}
15
16 \wxheading{Include files}
17
18 <wx/event.h>
19
20 \wxheading{Event table macros}
21
22 To process a scroll event, use these event handler macros to direct input to
23 member functions that take a wxScrollEvent argument. You can use
24 {\tt EVT\_COMMAND\_SCROLL...} macros with window IDs for when intercepting
25 scroll events from controls, or {\tt EVT\_SCROLL...} macros without window IDs
26 for intercepting scroll events from the receiving window - except for this,
27 the macros behave exactly the same
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
39 sent as the user drags the thumtrack).}
40 \twocolitem{{\bf EVT\_SCROLL\_THUMBRELEASE(func)}}{Process wxEVT\_SCROLL\_THUMBRELEASE thumb release events.}
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
49 sent as the user drags the thumtrack).}
50 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBRELEASE(func)}}{Process wxEVT\_SCROLL\_THUMBRELEASE thumb release events.}
51 \end{twocollist}%
52
53 \wxheading{Remarks}
54
55 Note that unless specifying a scroll control identifier, you will need to test for scrollbar
56 orientation with \helpref{wxScrollEvent::GetOrientation}{wxscrolleventgetorientation}, since
57 horizontal and vertical scroll events are processed using the same event handler.
58
59 \wxheading{See also}
60
61 \helpref{wxScrollBar}{wxscrollbar}, \helpref{wxSlider}{wxslider}, \helpref{wxSpinButton}{wxspinbutton}, \\
62 \helpref{wxScrollWinEvent}{wxscrollwinevent}, \helpref{Event handling overview}{eventhandlingoverview}
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
71 Constructor.
72
73 \membersection{wxScrollEvent::GetOrientation}\label{wxscrolleventgetorientation}
74
75 \constfunc{int}{GetOrientation}{\void}
76
77 Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the scrollbar.
78
79 \membersection{wxScrollEvent::GetPosition}\label{wxscrolleventgetposition}
80
81 \constfunc{int}{GetPosition}{\void}
82
83 Returns the position of the scrollbar.
84