#include <wx/grid.h>
Represents a source of cell activation, which may be either a user event (mouse or keyboard) or the program itself.
An object of this class is passed to wxGridCellEditor::TryActivate() by the library and the code overriding this method may use its GetOrigin() method to determine how exactly the cell is being activated.
Public Types | |
enum | Origin { Program , Key , Mouse } |
Result of GetOrigin(). More... | |
Public Member Functions | |
Origin | GetOrigin () const |
Get the origin of the activation. More... | |
const wxKeyEvent & | GetKeyEvent () const |
Get the key event corresponding to the key press activating the cell. More... | |
const wxMouseEvent & | GetMouseEvent () const |
Get the mouse event corresponding to the click activating the cell. More... | |
Result of GetOrigin().
Enumerator | |
---|---|
Program | Activated due to an explicit wxGrid::EnableCellEditControl() call. |
Key | Activated due to the user pressing a key, see GetKeyEvent(). |
Mouse | Activated due to the user clicking on a cell, see GetMouseEvent(). |
const wxKeyEvent& wxGridActivationSource::GetKeyEvent | ( | ) | const |
Get the key event corresponding to the key press activating the cell.
This method can be called for objects with Key origin only, use GetOrigin() to check for this first.
const wxMouseEvent& wxGridActivationSource::GetMouseEvent | ( | ) | const |
Get the mouse event corresponding to the click activating the cell.
This method can be called for objects with Mouse origin only, use GetOrigin() to check for this first.
Origin wxGridActivationSource::GetOrigin | ( | ) | const |
Get the origin of the activation.