Version: 2.9.4
Public Member Functions
wxClipboardTextEvent Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/event.h>

Inheritance diagram for wxClipboardTextEvent:

Detailed Description

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.

注:
These events are currently only generated by wxTextCtrl in wxGTK and wxOSX but are also generated by wxComboBox without wxCB_READONLY style in wxMSW.

Events using this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxClipboardTextEvent& event)

Event macros:

Library:  wxCore
Category:  Events
参照:
wxClipboard

Public Member Functions

 wxClipboardTextEvent (wxEventType commandType=wxEVT_NULL, int id=0)
 Constructor.

List of all members.


Constructor & Destructor Documentation

wxClipboardTextEvent::wxClipboardTextEvent ( wxEventType  commandType = wxEVT_NULL,
int  id = 0 
)

Constructor.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines