Class: Wx::ClipboardTextEvent

Inherits:
CommandEvent show all
Defined in:
lib/wx/doc/gen/events.rb

Overview

This class represents the events generated by a control (typically a TextCtrl 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 EVT_TEXT_COPY, EVT_TEXT_CUT and EVT_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 preventing 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.

Note:

These events are currently only generated by TextCtrl in WXGTK and WXOSX but are also generated by ComboBox without CB_READONLY style in WXMSW.

Events using this class

The following event-handler methods redirect the events to member method or handler blocks for ClipboardTextEvent events. Event handler methods:

Category: Events

See Also:

Instance Method Summary collapse

Methods inherited from CommandEvent

#client_data, #client_data=, #get_client_data, #get_client_object, #get_int, #get_selection, #get_string, #is_checked, #is_selection, #set_client_data, #set_client_object, #set_extra_long, #set_int, #set_string

Methods inherited from Event

#clone, #get_event_category, #get_event_object, #get_event_type, #get_id, #get_skipped, #get_timestamp, #is_command_event, #resume_propagation, #set_event_object, #set_event_type, #set_id, #set_timestamp, #should_propagate, #skip, #stop_propagation

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize(commandType = Wx::EVT_NULL, id = 0) ⇒ Wx::ClipboardTextEvent

Constructor.

Parameters:

  • commandType (Wx::GenericCollapsiblePane::EventType) (defaults to: Wx::EVT_NULL)
  • id (Integer) (defaults to: 0)


2742
# File 'lib/wx/doc/gen/events.rb', line 2742

def initialize(commandType=Wx::EVT_NULL, id=0) end