Class: Wx::ListEvent
- Inherits:
-
NotifyEvent
- Object
- Object
- Event
- CommandEvent
- NotifyEvent
- Wx::ListEvent
- Defined in:
- lib/wx/doc/gen/list_event.rb
Overview
A list event holds information about events associated with ListCtrl objects.
Events using this class
The following event-handler methods redirect the events to member method or handler blocks for ListEvent events. Event handler methods:
-
EvtHandler#evt_list_begin_drag(id, meth = nil, &block): Begin dragging with the left mouse button.
-
EvtHandler#evt_list_begin_rdrag(id, meth = nil, &block): Begin dragging with the right mouse button.
-
EvtHandler#evt_list_begin_label_edit(id, meth = nil, &block): Begin editing a label. This can be prevented by calling NotifyEvent#veto.
-
EvtHandler#evt_list_end_label_edit(id, meth = nil, &block): Finish editing a label. This can be prevented by calling NotifyEvent#veto.
-
EvtHandler#evt_list_delete_item(id, meth = nil, &block): Delete an item.
-
EvtHandler#evt_list_delete_all_items(id, meth = nil, &block): Delete all items.
-
EvtHandler#evt_list_item_selected(id, meth = nil, &block): The item has been selected. Notice that the mouse is captured by the control itself when this event is generated, see event handling overview.
-
EvtHandler#evt_list_item_deselected(id, meth = nil, &block): The item has been deselected. #get_index may be -1 with virtual lists.
-
EvtHandler#evt_list_item_activated(id, meth = nil, &block): The item has been activated (ENTER or double click).
-
EvtHandler#evt_list_item_focused(id, meth = nil, &block): The currently focused item has changed.
-
EvtHandler#evt_list_item_middle_click(id, meth = nil, &block): The middle mouse button has been clicked on an item.
-
EvtHandler#evt_list_item_right_click(id, meth = nil, &block): The right mouse button has been clicked on an item.
-
EvtHandler#evt_list_key_down(id, meth = nil, &block): A key has been pressed. #get_index may be -1 if no item is selected.
-
EvtHandler#evt_list_insert_item(id, meth = nil, &block): An item has been inserted.
-
EvtHandler#evt_list_col_click(id, meth = nil, &block): A column (m_col) has been left-clicked.
-
EvtHandler#evt_list_col_right_click(id, meth = nil, &block): A column (m_col) (which can be -1 if the click occurred outside any column) has been right-clicked.
-
EvtHandler#evt_list_col_begin_drag(id, meth = nil, &block): The user started resizing a column - can be vetoed.
-
EvtHandler#evt_list_col_dragging(id, meth = nil, &block): The divider between columns is being dragged.
-
EvtHandler#evt_list_col_end_drag(id, meth = nil, &block): A column has been resized by the user.
-
EvtHandler#evt_list_cache_hint(id, meth = nil, &block): Prepare cache for a virtual list control
-
EvtHandler#evt_list_item_checked(id, meth = nil, &block): The item has been checked (new since wxWidgets 3.1.0).
-
EvtHandler#evt_list_item_unchecked(id, meth = nil, &block): The item has been unchecked (new since wxWidgets 3.1.0).
Category: Events
Instance Method Summary collapse
-
#get_cache_from ⇒ Integer
(also: #cache_from)
For EVT_LIST_CACHE_HINT event only: return the first item which the list control advises us to cache.
-
#get_cache_to ⇒ Integer
(also: #cache_to)
For EVT_LIST_CACHE_HINT event only: return the last item (inclusive) which the list control advises us to cache.
-
#get_column ⇒ Integer
(also: #column)
The column position: it is only used with COL events.
-
#get_data ⇒ Integer
(also: #data)
The data.
-
#get_image ⇒ Integer
(also: #image)
The image.
-
#get_index ⇒ Integer
(also: #index)
The item index.
-
#get_item ⇒ Wx::ListItem
(also: #item)
An item object, used by some events.
-
#get_key_code ⇒ Integer
(also: #key_code)
Key code if the event is a keypress event.
-
#get_label ⇒ Wx::String
(also: #label)
The (new) item label for EVT_LIST_END_LABEL_EDIT event.
-
#get_mask ⇒ Integer
(also: #mask)
The mask.
-
#get_point ⇒ Wx::Point
(also: #point)
The position of the mouse pointer if the event is a drag event.
-
#get_text ⇒ Wx::String
(also: #text)
The text.
-
#initialize(commandType = Wx::EVT_NULL, id = 0) ⇒ Wx::ListEvent
constructor
Constructor.
-
#is_edit_cancelled ⇒ Boolean
(also: #edit_cancelled?)
This method only makes sense for EVT_LIST_END_LABEL_EDIT message and returns true if it the label editing has been cancelled by the user (#get_label returns an empty string in this case but it doesn’t allow the application to distinguish between really cancelling the edit and the admittedly rare case when the user wants to rename it to an empty string).
- #set_cache_from(cacheFrom) ⇒ void (also: #cache_from=)
- #set_cache_to(cacheTo) ⇒ void (also: #cache_to=)
- #set_column(col) ⇒ void (also: #column=)
- #set_index(index) ⇒ void (also: #index=)
- #set_item(item) ⇒ void (also: #item=)
- #set_key_code(code) ⇒ void (also: #key_code=)
- #set_point(point) ⇒ void (also: #point=)
Methods inherited from NotifyEvent
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::ListEvent
Constructor.
71 |
# File 'lib/wx/doc/gen/list_event.rb', line 71 def initialize(commandType=Wx::EVT_NULL, id=0) end |
Instance Method Details
#get_cache_from ⇒ Integer Also known as: cache_from
For EVT_LIST_CACHE_HINT event only: return the first item which the list control advises us to cache.
75 |
# File 'lib/wx/doc/gen/list_event.rb', line 75 def get_cache_from; end |
#get_cache_to ⇒ Integer Also known as: cache_to
For EVT_LIST_CACHE_HINT event only: return the last item (inclusive) which the list control advises us to cache.
80 |
# File 'lib/wx/doc/gen/list_event.rb', line 80 def get_cache_to; end |
#get_column ⇒ Integer Also known as: column
The column position: it is only used with COL events.
For the column dragging events, it is the column to the left of the divider being dragged, for the column click events it may be -1 if the user clicked in the list control header outside any column.
87 |
# File 'lib/wx/doc/gen/list_event.rb', line 87 def get_column; end |
#get_data ⇒ Integer Also known as: data
The data.
92 |
# File 'lib/wx/doc/gen/list_event.rb', line 92 def get_data; end |
#get_image ⇒ Integer Also known as: image
The image.
97 |
# File 'lib/wx/doc/gen/list_event.rb', line 97 def get_image; end |
#get_index ⇒ Integer Also known as: index
The item index.
102 |
# File 'lib/wx/doc/gen/list_event.rb', line 102 def get_index; end |
#get_item ⇒ Wx::ListItem Also known as: item
An item object, used by some events.
See also Wx::ListCtrl#set_item.
109 |
# File 'lib/wx/doc/gen/list_event.rb', line 109 def get_item; end |
#get_key_code ⇒ Integer Also known as: key_code
Key code if the event is a keypress event.
114 |
# File 'lib/wx/doc/gen/list_event.rb', line 114 def get_key_code; end |
#get_label ⇒ Wx::String Also known as: label
The (new) item label for EVT_LIST_END_LABEL_EDIT event.
119 |
# File 'lib/wx/doc/gen/list_event.rb', line 119 def get_label; end |
#get_mask ⇒ Integer Also known as: mask
The mask.
124 |
# File 'lib/wx/doc/gen/list_event.rb', line 124 def get_mask; end |
#get_point ⇒ Wx::Point Also known as: point
The position of the mouse pointer if the event is a drag event.
129 |
# File 'lib/wx/doc/gen/list_event.rb', line 129 def get_point; end |
#get_text ⇒ Wx::String Also known as: text
The text.
134 |
# File 'lib/wx/doc/gen/list_event.rb', line 134 def get_text; end |
#is_edit_cancelled ⇒ Boolean Also known as: edit_cancelled?
This method only makes sense for EVT_LIST_END_LABEL_EDIT message and returns true if it the label editing has been cancelled by the user (#get_label returns an empty string in this case but it doesn’t allow the application to distinguish between really cancelling the edit and the admittedly rare case when the user wants to rename it to an empty string).
139 |
# File 'lib/wx/doc/gen/list_event.rb', line 139 def is_edit_cancelled; end |
#set_cache_from(cacheFrom) ⇒ void Also known as: cache_from=
This method returns an undefined value.
193 |
# File 'lib/wx/doc/gen/list_event.rb', line 193 def set_cache_from(cacheFrom) end |
#set_cache_to(cacheTo) ⇒ void Also known as: cache_to=
This method returns an undefined value.
202 |
# File 'lib/wx/doc/gen/list_event.rb', line 202 def set_cache_to(cacheTo) end |
#set_column(col) ⇒ void Also known as: column=
This method returns an undefined value.
166 |
# File 'lib/wx/doc/gen/list_event.rb', line 166 def set_column(col) end |
#set_index(index) ⇒ void Also known as: index=
This method returns an undefined value.
157 |
# File 'lib/wx/doc/gen/list_event.rb', line 157 def set_index(index) end |
#set_item(item) ⇒ void Also known as: item=
This method returns an undefined value.
184 |
# File 'lib/wx/doc/gen/list_event.rb', line 184 def set_item(item) end |
#set_key_code(code) ⇒ void Also known as: key_code=
This method returns an undefined value.
148 |
# File 'lib/wx/doc/gen/list_event.rb', line 148 def set_key_code(code) end |
#set_point(point) ⇒ void Also known as: point=
This method returns an undefined value.
175 |
# File 'lib/wx/doc/gen/list_event.rb', line 175 def set_point(point) end |