📄 clipevent.tex
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Name: clipevent.tex%% Purpose: wxClipboardTextEvent documentation%% Author: Evgeniy Tarassov, Vadim Zeitlin%% Modified by:%% Created: 2005-10-04%% RCS-ID: $Id: clipevent.tex,v 1.1 2006/05/12 15:21:30 VZ Exp $%% 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 aswell) 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 eventhandler, the corresponding operation doesn't take place which allows to preventthe text from being copied from or pasted to a control. It is also possible toexamine the clipboard contents in the PASTE event handler and transform it insome way before inserting in a control -- for example, changing its case orremoving invalid characters.Finally notice that a CUT event is always preceded by the COPY event whichmakes it possible to only process the latter if it doesn't matter if the textwas copied or cut.\wxheading{Remarks}These events are currently only generated by \helpref{wxComboBox}{wxcombobox} andunder Windows and \helpref{wxTextCtrl}{wxtextctrl} under Windows and GTK andare not generated for the text controls with \texttt{wxTE\_RICH} style underWindows.\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 controlscontent was copied to the clipboard.}\twocolitem{{\bf EVT\_TEXT\_CUT(id, func)}}{Some or all of the controls contentwas cut (i.e. copied and deleted).}\twocolitem{{\bf EVT\_TEXT\_PASTE(id, func)}}{Clipboard content was pasted intothe 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}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -