Class: Wx::GRID::GridEvent

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

Overview

This event class contains information about various grid events.

Notice that all grid event table macros are available in two versions: EVT_GRID_XXX and EVT_GRID_CMD_XXX. The only difference between the two is that the former doesn’t allow to specify the grid window identifier and so takes a single parameter, the event handler, but is not suitable if there is more than one grid control in the window where the event table is used (as it would catch the events from all the grids). The version with CMD takes the id as first argument and the event handler as the second one and so can be used with multiple grids as well. Otherwise there are no difference between the two and only the versions without the id are documented below for brevity.

Events using this class

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

Category: Grid Related Classes, Events

Requires:

  • USE_GRID

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

#initializeWx::GRID::GridEvent #initialize(id, type, obj, row = -1, col = -1, x = -1, y = -1, sel = true, kbd = (Wx::KeyboardState.new())) ⇒ Wx::GRID::GridEvent

Returns a new instance of GridEvent.

Overloads:

  • #initializeWx::GRID::GridEvent

    Default constructor.

  • #initialize(id, type, obj, row = -1, col = -1, x = -1, y = -1, sel = true, kbd = (Wx::KeyboardState.new())) ⇒ Wx::GRID::GridEvent

    Constructor for initializing all event attributes.

    Parameters:

    • id (Integer)
    • type (Wx::GenericCollapsiblePane::EventType)
    • obj (Wx::Object)
    • row (Integer) (defaults to: -1)
    • col (Integer) (defaults to: -1)
    • x (Integer) (defaults to: -1)
    • y (Integer) (defaults to: -1)
    • sel (Boolean) (defaults to: true)
    • kbd (Wx::KeyboardState) (defaults to: (Wx::KeyboardState.new()))


73
# File 'lib/wx/doc/gen/grid/grid_event.rb', line 73

def initialize(*args) end

Instance Method Details

#alt_downBoolean

Returns true if the Alt key was down at the time of the event.

Returns:

  • (Boolean)


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

def alt_down; end

#control_downBoolean

Returns true if the Control key was down at the time of the event.

Returns:

  • (Boolean)


81
# File 'lib/wx/doc/gen/grid/grid_event.rb', line 81

def control_down; end

#get_colInteger Also known as: col

Column at which the event occurred.

Notice that for a EVT_GRID_SELECT_CELL event this column is the column of the newly selected cell while the previously selected cell can be retrieved using Wx::GRID::Grid#get_grid_cursor_col.

Returns:

  • (Integer)


87
# File 'lib/wx/doc/gen/grid/grid_event.rb', line 87

def get_col; end

#get_positionWx::Point Also known as: position

Position in pixels at which the event occurred.

Returns:



92
# File 'lib/wx/doc/gen/grid/grid_event.rb', line 92

def get_position; end

#get_rowInteger Also known as: row

Row at which the event occurred.

Notice that for a EVT_GRID_SELECT_CELL event this row is the row of the newly selected cell while the previously selected cell can be retrieved using Wx::GRID::Grid#get_grid_cursor_row.

Returns:

  • (Integer)


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

def get_row; end

#meta_downBoolean

Returns true if the Meta key was down at the time of the event.

Returns:

  • (Boolean)


104
# File 'lib/wx/doc/gen/grid/grid_event.rb', line 104

def meta_down; end

#selectingBoolean

Returns true if the user is selecting grid cells, or false if deselecting.

Returns:

  • (Boolean)


108
# File 'lib/wx/doc/gen/grid/grid_event.rb', line 108

def selecting; end

#shift_downBoolean

Returns true if the Shift key was down at the time of the event.

Returns:

  • (Boolean)


112
# File 'lib/wx/doc/gen/grid/grid_event.rb', line 112

def shift_down; end