]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/scrolevt.tex
1. panels pass focus to the next item in parent panel
[wxWidgets.git] / docs / latex / wx / scrolevt.tex
1 \section{\class{wxScrollEvent}}\label{wxscrollevent}
2
3 A scroll event holds information about events sent from scrollbars and scrolling windows.
4
5 \wxheading{Derived from}
6
7 \helpref{wxCommandEvent}{wxcommandevent}\\
8 \helpref{wxEvent}{wxevent}\\
9 \helpref{wxObject}{wxobject}
10
11 \wxheading{Include files}
12
13 <wx/event.h>
14
15 \wxheading{Event table macros}
16
17 To process a scroll event, use these event handler macros to direct input to member
18 functions that take a wxScrollEvent argument. You can use EVT\_COMMAND\_SCROLL... macros
19 with window IDs for when intercepting scroll events from controls, or EVT\_SCROLL... macros
20 without window IDs for intercepting scroll events from the receiving window.
21
22 \twocolwidtha{7cm}
23 \begin{twocollist}\itemsep=0pt
24 \twocolitem{{\bf EVT\_SCROLL(func)}}{Process all scroll events.}
25 \twocolitem{{\bf EVT\_SCROLL\_TOP(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events.}
26 \twocolitem{{\bf EVT\_SCROLL\_BOTTOM(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events.}
27 \twocolitem{{\bf EVT\_SCROLL\_LINEUP(func)}}{Process wxEVT\_SCROLL\_LINEUP line up events.}
28 \twocolitem{{\bf EVT\_SCROLL\_LINEDOWN(func)}}{Process wxEVT\_SCROLL\_LINEDOWN line down events.}
29 \twocolitem{{\bf EVT\_SCROLL\_PAGEUP(func)}}{Process wxEVT\_SCROLL\_PAGEUP page up events.}
30 \twocolitem{{\bf EVT\_SCROLL\_PAGEDOWN(func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.}
31 \twocolitem{{\bf EVT\_SCROLL\_THUMBTRACK(func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events
32 sent as the user drags the thumtrack).}
33 \twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Process all scroll events.}
34 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_TOP(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events.}
35 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_BOTTOM(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events.}
36 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_LINEUP(id, func)}}{Process wxEVT\_SCROLL\_LINEUP line up events.}
37 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_LINEDOWN(id, func)}}{Process wxEVT\_SCROLL\_LINEDOWN line down events.}
38 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_PAGEUP(id, func)}}{Process wxEVT\_SCROLL\_PAGEUP page up events.}
39 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_PAGEDOWN(id, func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.}
40 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBTRACK(id, func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events
41 sent as the user drags the thumtrack).}
42 \end{twocollist}%
43
44 \wxheading{Remarks}
45
46 Note that unless specifying a scroll control identifier, you will need to test for scrollbar
47 orientation with \helpref{wxScrollEvent::GetOrientation}{wxscrolleventgetorientation}, since
48 horizontal and vertical scroll events are processed using the same event handler.
49
50 \wxheading{See also}
51
52 \helpref{wxWindow::OnScroll}{wxwindowonscroll}, \helpref{wxScrollBar}{wxscrollbar}, \helpref{Event handling overview}{eventhandlingoverview}
53
54 \latexignore{\rtfignore{\wxheading{Members}}}
55
56 \membersection{wxScrollEvent::wxScrollEvent}
57
58 \func{}{wxScrollEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}, \param{int}{ pos = 0},
59 \rtfsp\param{int}{ orientation = 0}}
60
61 Constructor.
62
63 \membersection{wxScrollEvent::GetOrientation}\label{wxscrolleventgetorientation}
64
65 \constfunc{int}{GetOrientation}{\void}
66
67 Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the scrollbar.
68
69 \membersection{wxScrollEvent::GetPosition}\label{wxscrolleventgetposition}
70
71 \constfunc{int}{GetPosition}{\void}
72
73 Returns the position of the scrollbar.
74
75