added clipboard events (wxEVT_COMMAND_TEXT_COPY/CUT/PASTE) and implemented them for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -218,6 +218,7 @@ An event object contains information about a specific event. Event handlers
|
||||
\twocolitem{\helpref{wxActivateEvent}{wxactivateevent}}{A window or application activation event}
|
||||
\twocolitem{\helpref{wxCalendarEvent}{wxcalendarevent}}{Used with \helpref{wxCalendarCtrl}{wxcalendarctrl}}
|
||||
\twocolitem{\helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}}{Used to calculate window layout}
|
||||
\twocolitem{\helpref{wxClipboardTextEvent}{wxclipboardtextevent}}{A clipboard copy/cut/paste treebook event event}
|
||||
\twocolitem{\helpref{wxCloseEvent}{wxcloseevent}}{A close window or end session event}
|
||||
\twocolitem{\helpref{wxCommandEvent}{wxcommandevent}}{An event from a variety of standard controls}
|
||||
\twocolitem{\helpref{wxContextMenuEvent}{wxcontextmenuevent}}{An event generated when the user issues a context menu command}
|
||||
|
@@ -39,6 +39,7 @@
|
||||
\input clientdc.tex
|
||||
\input clientdat.tex
|
||||
\input clipbrd.tex
|
||||
\input clipevent.tex
|
||||
\input closeevt.tex
|
||||
\input cmdlpars.tex
|
||||
\input colour.tex
|
||||
|
84
docs/latex/wx/clipevent.tex
Normal file
84
docs/latex/wx/clipevent.tex
Normal file
@@ -0,0 +1,84 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Name: clipevent.tex
|
||||
%% Purpose: wxClipboardTextEvent documentation
|
||||
%% Author: Evgeniy Tarassov, Vadim Zeitlin
|
||||
%% Modified by:
|
||||
%% Created: 2005-10-04
|
||||
%% RCS-ID: $Id$
|
||||
%% 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}}
|
||||
|
||||
|
Reference in New Issue
Block a user