Class: Wx::GRID::GridTableMessage
- Inherits:
-
Object
- Object
- Wx::GRID::GridTableMessage
- Defined in:
- lib/wx/doc/gen/grid/grid_table_message.rb
Overview
This class is untracked and should not be derived from nor instances extended!
Message class used by the grid table to send requests and notifications to the grid view.
A message object of this class must be sent to the grid using Wx::GRID::Grid#process_table_message every time the table changes, e.g. rows are added/deleted. The messages are just notifications and don't result in any changes to the table data, but allow the view to react to changes to the model. The table must be updated before sending the notification. For example, a custom Wx::GRID::GridTableBase#insert_rows implementation should first insert the rows into its own data storage and only then notify the grid:
bool MyTable::InsertRows(size_t pos, size_t numRows)
{
DoInsertRowsInDataModel(pos, numRows);
if ( GetView() )
{
GetView()->ProcessTableMessage(
this, wxGRIDTABLE_NOTIFY_ROWS_INSERTED, pos, numRows);
}
return true;
}
The same rule applies to the other row and column modification messages: update the table first, then notify the grid.
Instance Method Summary collapse
-
#get_command_int ⇒ Integer
(also: #command_int)
Get the position at which the insertion/deletion occurs.
-
#get_command_int2 ⇒ Integer
(also: #command_int2)
Get the number of rows to be inserted/deleted.
-
#get_id ⇒ Integer
(also: #id)
Gets an id.
-
#get_table_object ⇒ Wx::GRID::GridTableBase
(also: #table_object)
Gets the table object.
-
#initialize(*args) ⇒ GridTableMessage
constructor
A new instance of GridTableMessage.
-
#set_command_int(comInt1) ⇒ void
(also: #command_int=)
Set the position at which the insertion/deletion occurs.
-
#set_command_int2(comInt2) ⇒ void
(also: #command_int2=)
Set the number of rows to be inserted/deleted.
-
#set_id(id) ⇒ void
(also: #id=)
Sets an id.
-
#set_table_object(table) ⇒ void
(also: #table_object=)
Sets the table object.
Constructor Details
#initialize ⇒ Wx::GRID::GridTableMessage #initialize(table, id, comInt1 = -1, comInt2 = -1) ⇒ Wx::GRID::GridTableMessage
Returns a new instance of GridTableMessage.
48 |
# File 'lib/wx/doc/gen/grid/grid_table_message.rb', line 48 def initialize(*args) end |
Instance Method Details
#get_command_int ⇒ Integer Also known as: command_int
Get the position at which the insertion/deletion occurs.
80 |
# File 'lib/wx/doc/gen/grid/grid_table_message.rb', line 80 def get_command_int; end |
#get_command_int2 ⇒ Integer Also known as: command_int2
Get the number of rows to be inserted/deleted.
91 |
# File 'lib/wx/doc/gen/grid/grid_table_message.rb', line 91 def get_command_int2; end |
#get_id ⇒ Integer Also known as: id
Gets an id.
69 |
# File 'lib/wx/doc/gen/grid/grid_table_message.rb', line 69 def get_id; end |
#get_table_object ⇒ Wx::GRID::GridTableBase Also known as: table_object
Gets the table object.
58 |
# File 'lib/wx/doc/gen/grid/grid_table_message.rb', line 58 def get_table_object; end |
#set_command_int(comInt1) ⇒ void Also known as: command_int=
This method returns an undefined value.
Set the position at which the insertion/deletion occurs.
75 |
# File 'lib/wx/doc/gen/grid/grid_table_message.rb', line 75 def set_command_int(comInt1) end |
#set_command_int2(comInt2) ⇒ void Also known as: command_int2=
This method returns an undefined value.
Set the number of rows to be inserted/deleted.
86 |
# File 'lib/wx/doc/gen/grid/grid_table_message.rb', line 86 def set_command_int2(comInt2) end |
#set_id(id) ⇒ void Also known as: id=
This method returns an undefined value.
Sets an id.
64 |
# File 'lib/wx/doc/gen/grid/grid_table_message.rb', line 64 def set_id(id) end |
#set_table_object(table) ⇒ void Also known as: table_object=
This method returns an undefined value.
Sets the table object.
53 |
# File 'lib/wx/doc/gen/grid/grid_table_message.rb', line 53 def set_table_object(table) end |