$szTitle = "wxclipboardtextevent"; include "./_header.inc"; ?>
this class represents the events generated by a control (typically a 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.
remarks
these events are currently only generated by wxcombobox and under windows and wxtextctrl under windows and gtk and are not generated for the text controls with wxte_rich style under windows.
derived from
wxcommandevent
wxevent
wxobject
include files
<wx/event.h>
event handling
to process this type of events use the following event handling macros. the func parameter must be a member functions that takes an argument of type wxclipboardtextevent &.
evt_text_copy(id, func) | some or all of the controls content was copied to the clipboard. |
evt_text_cut(id, func) | some or all of the controls content was cut (i.e. copied and deleted). |
evt_text_paste(id, func) | clipboard content was pasted into the control. |
see also
members
wxclipboardtextevent::wxclipboardtextevent
wxclipboardtextevent(wxeventtype commandtype = wxevt_null, int id = 0)
include "./_footer.inc"; ?>