]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/clipevent.tex
Clarify docs about wxSizer::SetSizeHints().
[wxWidgets.git] / docs / latex / wx / clipevent.tex
CommitLineData
78c91815
VZ
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: clipevent.tex
3%% Purpose: wxClipboardTextEvent documentation
4%% Author: Evgeniy Tarassov, Vadim Zeitlin
5%% Modified by:
6%% Created: 2005-10-04
7%% RCS-ID: $Id$
8%% Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
9%% License: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxClipboardTextEvent}}\label{wxclipboardtextevent}
13
14This class represents the events generated by a control (typically a
15\helpref{wxTextCtrl}{wxtextctrl} but other windows can generate these events as
16well) when its content gets copied or cut to, or pasted from the clipboard.
17There are three types of corresponding events wxEVT\_COMMAND\_TEXT\_COPY,
18wxEVT\_COMMAND\_TEXT\_CUT and wxEVT\_COMMAND\_TEXT\_PASTE.
19
20If any of these events is processed (without being skipped) by an event
21handler, the corresponding operation doesn't take place which allows to prevent
22the text from being copied from or pasted to a control. It is also possible to
23examine the clipboard contents in the PASTE event handler and transform it in
24some way before inserting in a control -- for example, changing its case or
25removing invalid characters.
26
27Finally notice that a CUT event is always preceded by the COPY event which
28makes it possible to only process the latter if it doesn't matter if the text
29was copied or cut.
30
31\wxheading{Remarks}
32
33These events are currently only generated by \helpref{wxComboBox}{wxcombobox} and
34under Windows and \helpref{wxTextCtrl}{wxtextctrl} under Windows and GTK and
35are not generated for the text controls with \texttt{wxTE\_RICH} style under
36Windows.
37
38
39\wxheading{Derived from}
40
41\helpref{wxCommandEvent}{wxcommandevent}\\
42\helpref{wxEvent}{wxevent}\\
43\helpref{wxObject}{wxobject}
44
45
46
47\wxheading{Include files}
48
49<wx/event.h>
50
51
52
53\wxheading{Event handling}
54
55To process this type of events use the following event handling macros. The
56\arg{func} parameter must be a member functions that takes an argument of type
57\texttt{wxClipboardTextEvent \&}.
58
59\twocolwidtha{10cm}
60\begin{twocollist}\itemsep=0pt
61\twocolitem{{\bf EVT\_TEXT\_COPY(id, func)}}{Some or all of the controls
62content was copied to the clipboard.}
63\twocolitem{{\bf EVT\_TEXT\_CUT(id, func)}}{Some or all of the controls content
64was cut (i.e. copied and deleted).}
65\twocolitem{{\bf EVT\_TEXT\_PASTE(id, func)}}{Clipboard content was pasted into
66the control.}
67\end{twocollist}
68
69
70
71\wxheading{See also}
72
73\helpref{wxClipboard}{wxclipboard}
74
75
76
77\latexignore{\rtfignore{\wxheading{Members}}}
78
79
80\membersection{wxClipboardTextEvent::wxClipboardTextEvent}\label{wxclipboardtexteventwxclipboardtextevent}
81
82\func{}{wxClipboardTextEvent}{\param{wxEventType }{commandType = wxEVT\_NULL}, \param{int }{id = 0}}
83
84