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