#include <wx/grid.h>
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 wxGrid::ProcessTableMessage() 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 wxGridTableBase::InsertRows() implementation should first insert the rows into its own data storage and only then notify the grid:
The same rule applies to the other row and column modification messages: update the table first, then notify the grid.
Public Member Functions | |
| wxGridTableMessage () | |
| Default constructor initializes the object to invalid state. | |
| wxGridTableMessage (wxGridTableBase *table, int id, int comInt1=-1, int comInt2=-1) | |
| Constructor initializes the message. | |
| void | SetTableObject (wxGridTableBase *table) |
| Sets the table object. | |
| wxGridTableBase * | GetTableObject () const |
| Gets the table object. | |
| void | SetId (int id) |
| Sets an id. | |
| int | GetId () const |
| Gets an id. | |
| void | SetCommandInt (int comInt1) |
| Set the position at which the insertion/deletion occurs. | |
| int | GetCommandInt () const |
| Get the position at which the insertion/deletion occurs. | |
| void | SetCommandInt2 (int comInt2) |
| Set the number of rows to be inserted/deleted. | |
| int | GetCommandInt2 () const |
| Get the number of rows to be inserted/deleted. | |
| wxGridTableMessage::wxGridTableMessage | ( | ) |
Default constructor initializes the object to invalid state.
| wxGridTableMessage::wxGridTableMessage | ( | wxGridTableBase * | table, |
| int | id, | ||
| int | comInt1 = -1, | ||
| int | comInt2 = -1 ) |
Constructor initializes the message.
| table | Pointer to the grid table |
| id | One of wxGridTableRequest enum elements. |
| comInt1 | For the insert/delete messages, position at which the rows or columns are inserted/deleted. For the append messages, the number of rows or columns that were appended. |
| comInt2 | For the insert/delete messages, number of rows or columns to be inserted/deleted. For the append messages, this parameter is not used. |
| int wxGridTableMessage::GetCommandInt | ( | ) | const |
Get the position at which the insertion/deletion occurs.
| int wxGridTableMessage::GetCommandInt2 | ( | ) | const |
Get the number of rows to be inserted/deleted.
| int wxGridTableMessage::GetId | ( | ) | const |
Gets an id.
| wxGridTableBase * wxGridTableMessage::GetTableObject | ( | ) | const |
Gets the table object.
| void wxGridTableMessage::SetCommandInt | ( | int | comInt1 | ) |
Set the position at which the insertion/deletion occurs.
| void wxGridTableMessage::SetCommandInt2 | ( | int | comInt2 | ) |
Set the number of rows to be inserted/deleted.
| void wxGridTableMessage::SetId | ( | int | id | ) |
Sets an id.
| void wxGridTableMessage::SetTableObject | ( | wxGridTableBase * | table | ) |
Sets the table object.