]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/sashevt.tex
more LaTeX error fixes
[wxWidgets.git] / docs / latex / wx / sashevt.tex
CommitLineData
6fb26ea3
JS
1\section{\class{wxSashEvent}}\label{wxsashevent}
2
3A sash event is sent when the sash of a \helpref{wxSashWindow}{wxsashwindow} has been
4dragged by the user.
5
6\wxheading{Derived from}
7
8\helpref{wxCommandEvent}{wxcommandevent}\\
9\helpref{wxEvent}{wxevent}\\
10\helpref{wxObject}{wxobject}
11
954b8ae6
JS
12\wxheading{Include files}
13
14<wx/sashwin.h>
15
a7af285d
VZ
16\wxheading{Library}
17
18\helpref{wxAdv}{librarieslist}
19
6fb26ea3
JS
20\wxheading{Event table macros}
21
22To process an activate event, use these event handler macros to direct input to a member
23function that takes a wxSashEvent argument.
24
25\twocolwidtha{7cm}%
26\begin{twocollist}\itemsep=0pt
27\twocolitem{{\bf EVT\_SASH\_DRAGGED(id, func)}}{Process a wxEVT\_SASH\_DRAGGED event,
28when the user has finished dragging a sash.}
29\twocolitem{{\bf EVT\_SASH\_DRAGGED\_RANGE(id1, id2, func)}}{Process a wxEVT\_SASH\_DRAGGED\_RANGE event,
30when the user has finished dragging a sash. The event handler is called when windows with ids in the
31given range have their sashes dragged.}
32\end{twocollist}
33
34\wxheading{Data structures}
35
36{\small
37\begin{verbatim}
38enum wxSashDragStatus
39{
40 wxSASH_STATUS_OK,
41 wxSASH_STATUS_OUT_OF_RANGE
42};
43\end{verbatim}
44}
45
46\wxheading{Remarks}
47
48When a sash belonging to a sash window is dragged by the user, and then released,
49this event is sent to the window, where it may be processed by an event table
50entry in a derived class, a plug-in event handler or an ancestor class.
51
52Note that the wxSashWindow doesn't change the window's size itself. It relies on the application's
53event handler to do that. This is because the application may have to handle other consequences
54of the resize, or it may wish to veto it altogether. The event handler should
55look at the drag rectangle: see \helpref{wxSashEvent::GetDragRect}{wxsasheventgetdragrect} to see
56what the new size of the window would be if the resize were to be applied. It should
57also call \helpref{wxSashEvent::GetDragStatus}{wxsasheventgetdragstatus} to see whether the
58drag was OK or out of the current allowed range.
59
60\wxheading{See also}
61
6b037754 62\helpref{wxSashWindow}{wxsashwindow},\rtfsp
6fb26ea3
JS
63\helpref{Event handling overview}{eventhandlingoverview}
64
65\latexignore{\rtfignore{\wxheading{Members}}}
66
39275175 67\membersection{wxSashEvent::wxSashEvent}\label{wxsasheventctor}
6fb26ea3
JS
68
69\func{}{wxSashEvent}{\param{int }{id = 0}, \param{wxSashEdgePosition}{ edge = wxSASH\_NONE}}
70
71Constructor.
72
73\membersection{wxSashEvent::GetEdge}\label{wxsasheventgetedge}
74
75\constfunc{wxSashEdgePosition}{GetEdge}{\void}
76
77Returns the dragged edge. The return value is one of wxSASH\_TOP, wxSASH\_RIGHT, wxSASH\_BOTTOM, wxSASH\_LEFT.
78
79\membersection{wxSashEvent::GetDragRect}\label{wxsasheventgetdragrect}
80
81\constfunc{wxRect}{GetDragRect}{\void}
82
83Returns the rectangle representing the new size the window would be if the resize was applied. It is
84up to the application to set the window size if required.
85
86\membersection{wxSashEvent::GetDragStatus}\label{wxsasheventgetdragstatus}
87
88\constfunc{wxSashDragStatus}{GetDragStatus}{\void}
89
90Returns the status of the sash: one of wxSASH\_STATUS\_OK, wxSASH\_STATUS\_OUT\_OF\_RANGE.
91If the drag caused the notional bounding box of the window to flip over, for example, the drag will be out of rage.
92
93