Class: Wx::TreeEvent

Inherits:
NotifyEvent show all
Defined in:
lib/wx/doc/gen/tree_event.rb

Overview

A tree event holds information about events associated with TreeCtrl objects.

To process input from a tree control, use these event handler macros to direct input to member functions that take a TreeEvent argument.

Events using this class

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

Category: Events

See Also:

Requires:

  • USE_TREECTRL

Instance Method Summary collapse

Methods inherited from NotifyEvent

#allow, #is_allowed, #veto

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, tree, item = (Wx::TreeItemId.new())) ⇒ Wx::TreeEvent

Constructor, used by wxWidgets itself only.

Parameters:

  • commandType (Wx::GenericCollapsiblePane::EventType)
  • tree (Wx::TreeCtrl)
  • item (Wx::TreeItemId) (defaults to: (Wx::TreeItemId.new()))


71
# File 'lib/wx/doc/gen/tree_event.rb', line 71

def initialize(commandType, tree, item=(Wx::TreeItemId.new())) end

Instance Method Details

#get_itemWx::TreeItemId Also known as: item

Returns the item.

Note that the item may be invalid for EVT_TREE_SEL_CHANGED events when the previously selected item has been deselected and there is no new selection any longer, as it notably happens when deleting all tree control items.

Returns:



77
# File 'lib/wx/doc/gen/tree_event.rb', line 77

def get_item; end

#get_key_codeInteger Also known as: key_code

Returns the key code if the event is a key event.

Use #get_key_event to get the values of the modifier keys for this event (i.e. Shift or Ctrl).

Returns:

  • (Integer)


84
# File 'lib/wx/doc/gen/tree_event.rb', line 84

def get_key_code; end

#get_key_eventWx::KeyEvent Also known as: key_event

Returns the key event for EVT_TREE_KEY_DOWN events.

Returns:



89
# File 'lib/wx/doc/gen/tree_event.rb', line 89

def get_key_event; end

#get_labelWx::String Also known as: label

Returns the label if the event is a begin or end edit label event.

Returns:

  • (Wx::String)


94
# File 'lib/wx/doc/gen/tree_event.rb', line 94

def get_label; end

#get_old_itemWx::TreeItemId Also known as: old_item

Returns the old item index (valid for EVT_TREE_SEL_CHANGING and EVT_TREE_SEL_CHANGED events).

Returns:



99
# File 'lib/wx/doc/gen/tree_event.rb', line 99

def get_old_item; end

#get_pointWx::Point Also known as: point

Returns the position of the mouse pointer if the event is a drag or menu-context event.

In both cases the position is in client coordinates - i.e. relative to the Wx::TreeCtrl window (so that you can pass it directly to e.g. Window#popup_menu).

Returns:



106
# File 'lib/wx/doc/gen/tree_event.rb', line 106

def get_point; end

#is_edit_cancelledBoolean Also known as: edit_cancelled?

Returns true if the label edit was cancelled.

This should be called from within an EVT_TREE_END_LABEL_EDIT handler.

Returns:

  • (Boolean)


113
# File 'lib/wx/doc/gen/tree_event.rb', line 113

def is_edit_cancelled; end

#set_tool_tip(tooltip) ⇒ void Also known as: tool_tip=

This method returns an undefined value.

Set the tooltip for the item (valid for EVT_TREE_ITEM_GETTOOLTIP events).

Windows only.

Parameters:

  • tooltip (String)


121
# File 'lib/wx/doc/gen/tree_event.rb', line 121

def set_tool_tip(tooltip) end