]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/clipevent.tex
Patches-1851591 ] dataview sample is crashing (under MSW)
[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
a7af285d
VZ
51\wxheading{Library}
52
53\helpref{wxCore}{librarieslist}
54
78c91815
VZ
55
56
57\wxheading{Event handling}
58
59To process this type of events use the following event handling macros. The
60\arg{func} parameter must be a member functions that takes an argument of type
61\texttt{wxClipboardTextEvent \&}.
62
63\twocolwidtha{10cm}
64\begin{twocollist}\itemsep=0pt
65\twocolitem{{\bf EVT\_TEXT\_COPY(id, func)}}{Some or all of the controls
66content was copied to the clipboard.}
67\twocolitem{{\bf EVT\_TEXT\_CUT(id, func)}}{Some or all of the controls content
68was cut (i.e. copied and deleted).}
69\twocolitem{{\bf EVT\_TEXT\_PASTE(id, func)}}{Clipboard content was pasted into
70the control.}
71\end{twocollist}
72
73
74
75\wxheading{See also}
76
77\helpref{wxClipboard}{wxclipboard}
78
79
80
81\latexignore{\rtfignore{\wxheading{Members}}}
82
83
84\membersection{wxClipboardTextEvent::wxClipboardTextEvent}\label{wxclipboardtexteventwxclipboardtextevent}
85
86\func{}{wxClipboardTextEvent}{\param{wxEventType }{commandType = wxEVT\_NULL}, \param{int }{id = 0}}
87
88