]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/clipevent.tex
added FindFileInPath() (part of an otherwise rejected patch)
[wxWidgets.git] / docs / latex / wx / clipevent.tex
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
14 This class represents the events generated by a control (typically a
15 \helpref{wxTextCtrl}{wxtextctrl} but other windows can generate these events as
16 well) when its content gets copied or cut to, or pasted from the clipboard.
17 There are three types of corresponding events wxEVT\_COMMAND\_TEXT\_COPY,
18 wxEVT\_COMMAND\_TEXT\_CUT and wxEVT\_COMMAND\_TEXT\_PASTE.
19
20 If any of these events is processed (without being skipped) by an event
21 handler, the corresponding operation doesn't take place which allows to prevent
22 the text from being copied from or pasted to a control. It is also possible to
23 examine the clipboard contents in the PASTE event handler and transform it in
24 some way before inserting in a control -- for example, changing its case or
25 removing invalid characters.
26
27 Finally notice that a CUT event is always preceded by the COPY event which
28 makes it possible to only process the latter if it doesn't matter if the text
29 was copied or cut.
30
31 \wxheading{Remarks}
32
33 These events are currently only generated by \helpref{wxComboBox}{wxcombobox} and
34 under Windows and \helpref{wxTextCtrl}{wxtextctrl} under Windows and GTK and
35 are not generated for the text controls with \texttt{wxTE\_RICH} style under
36 Windows.
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
55 To 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
62 content was copied to the clipboard.}
63 \twocolitem{{\bf EVT\_TEXT\_CUT(id, func)}}{Some or all of the controls content
64 was cut (i.e. copied and deleted).}
65 \twocolitem{{\bf EVT\_TEXT\_PASTE(id, func)}}{Clipboard content was pasted into
66 the 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