%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name:        clipevent.tex
%% Purpose:     wxClipboardTextEvent documentation
%% Author:      Evgeniy Tarassov, Vadim Zeitlin
%% Modified by:
%% Created:     2005-10-04
%% RCS-ID:      $Id: clipevent.tex 39141 2006-05-12 15:21:41Z VZ $
%% Copyright:   (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
%% License:     wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{\class{wxClipboardTextEvent}}\label{wxclipboardtextevent}

This class represents the events generated by a control (typically a 
\helpref{wxTextCtrl}{wxtextctrl} but other windows can generate these events as
well) when its content gets copied or cut to, or pasted from the clipboard.
There are three types of corresponding events wxEVT\_COMMAND\_TEXT\_COPY,
wxEVT\_COMMAND\_TEXT\_CUT and wxEVT\_COMMAND\_TEXT\_PASTE.

If any of these events is processed (without being skipped) by an event
handler, the corresponding operation doesn't take place which allows to prevent
the text from being copied from or pasted to a control. It is also possible to
examine the clipboard contents in the PASTE event handler and transform it in
some way before inserting in a control -- for example, changing its case or
removing invalid characters.

Finally notice that a CUT event is always preceded by the COPY event which
makes it possible to only process the latter if it doesn't matter if the text
was copied or cut.

\wxheading{Remarks}

These events are currently only generated by \helpref{wxComboBox}{wxcombobox} and
under Windows and \helpref{wxTextCtrl}{wxtextctrl} under Windows and GTK and
are not generated for the text controls with \texttt{wxTE\_RICH} style under
Windows.


\wxheading{Derived from}

\helpref{wxCommandEvent}{wxcommandevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}



\wxheading{Include files}

<wx/event.h>



\wxheading{Event handling}

To process this type of events use the following event handling macros. The
\arg{func} parameter must be a member functions that takes an argument of type
\texttt{wxClipboardTextEvent \&}.

\twocolwidtha{10cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_TEXT\_COPY(id, func)}}{Some or all of the controls
content was copied to the clipboard.}
\twocolitem{{\bf EVT\_TEXT\_CUT(id, func)}}{Some or all of the controls content
was cut (i.e. copied and deleted).}
\twocolitem{{\bf EVT\_TEXT\_PASTE(id, func)}}{Clipboard content was pasted into
the control.}
\end{twocollist}



\wxheading{See also}

\helpref{wxClipboard}{wxclipboard}



\latexignore{\rtfignore{\wxheading{Members}}}


\membersection{wxClipboardTextEvent::wxClipboardTextEvent}\label{wxclipboardtexteventwxclipboardtextevent}

\func{}{wxClipboardTextEvent}{\param{wxEventType }{commandType = wxEVT\_NULL}, \param{int }{id = 0}}


