]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/scrolevt.inc
wxMenuBar derives from wxWindow...
[wxWidgets.git] / docs / latex / wx / scrolevt.inc
1 \wxheading{Event table macros}
2
3 To process a scroll event, use these event handler macros to direct input to
4 member functions that take a wxScrollEvent argument. You can use
5 {\tt EVT\_COMMAND\_SCROLL...} macros with window IDs for when intercepting
6 scroll events from controls, or {\tt EVT\_SCROLL...} macros without window IDs
7 for intercepting scroll events from the receiving window - except for this,
8 the macros behave exactly the same.
9
10 \twocolwidtha{9cm}
11 \begin{twocollist}\itemsep=0pt
12 \twocolitem{{\bf EVT\_SCROLL(func)}}{Process all scroll events.}
13 \twocolitem{{\bf EVT\_SCROLL\_TOP(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events (minium position).}
14 \twocolitem{{\bf EVT\_SCROLL\_BOTTOM(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events (maximum position).}
15 \twocolitem{{\bf EVT\_SCROLL\_LINEUP(func)}}{Process wxEVT\_SCROLL\_LINEUP line up events.}
16 \twocolitem{{\bf EVT\_SCROLL\_LINEDOWN(func)}}{Process wxEVT\_SCROLL\_LINEDOWN line down events.}
17 \twocolitem{{\bf EVT\_SCROLL\_PAGEUP(func)}}{Process wxEVT\_SCROLL\_PAGEUP page up events.}
18 \twocolitem{{\bf EVT\_SCROLL\_PAGEDOWN(func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.}
19 \twocolitem{{\bf EVT\_SCROLL\_THUMBTRACK(func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events
20 sent as the user drags the thumbtrack).}
21 \twocolitem{{\bf EVT\_SCROLL\_THUMBRELEASE(func)}}{Process wxEVT\_SCROLL\_THUMBRELEASE thumb release events.}
22 \twocolitem{{\bf EVT\_SCROLL\_ENDSCROLL(func)}}{Process wxEVT\_SCROLL\_ENDSCROLL end of scrolling events (MSW only).}
23 \twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Process all scroll events.}
24 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_TOP(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events (minimum position).}
25 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_BOTTOM(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events (maximum position).}
26 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_LINEUP(id, func)}}{Process wxEVT\_SCROLL\_LINEUP line up events.}
27 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_LINEDOWN(id, func)}}{Process wxEVT\_SCROLL\_LINEDOWN line down events.}
28 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_PAGEUP(id, func)}}{Process wxEVT\_SCROLL\_PAGEUP page up events.}
29 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_PAGEDOWN(id, func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.}
30 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBTRACK(id, func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events
31 sent as the user drags the thumbtrack).}
32 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBRELEASE(func)}}{Process wxEVT\_SCROLL\_THUMBRELEASE thumb release events.}
33 \twocolitem{{\bf EVT\_COMMAND\_SCROLL\_ENDSCROLL(func)}}{Process wxEVT\_SCROLL\_ENDSCROLL end of scrolling events (MSW only).}
34 \end{twocollist}%
35
36
37
38 \wxheading{The difference between {\tt EVT\_SCROLL\_THUMBRELEASE} and {\tt EVT\_SCROLL\_ENDSCROLL}}
39
40 The {\tt EVT\_SCROLL\_THUMBRELEASE} event is only emitted when actually dragging
41 the thumb using the mouse and releasing it (This {\tt EVT\_SCROLL\_THUMBRELEASE}
42 event is also followed by an {\tt EVT\_SCROLL\_ENDSCROLL} event).
43
44 The {\tt EVT\_SCROLL\_ENDSCROLL} event also occurs when using the keyboard to
45 change the thumb position, and when clicking next to the thumb (In all these
46 cases the {\tt EVT\_SCROLL\_THUMBRELEASE} event does not happen).
47
48 In short, the {\tt EVT\_SCROLL\_ENDSCROLL} event is triggered when scrolling/
49 moving has finished. The only exception (unfortunately) is that changing the
50 thumb position using the mousewheel does give a {\tt EVT\_SCROLL\_THUMBRELEASE}
51 event but NOT an {\tt EVT\_SCROLL\_ENDSCROLL} event.
52
53 Please see the widgets sample ("Slider" page) to see the difference
54 between {\tt EVT\_SCROLL\_THUMBRELEASE} and {\tt EVT\_SCROLL\_ENDSCROLL} in action.
55