| Version: 3.2.5

Public Types | Public Member Functions | List of all members
wxGridActivationSource Class Reference

`#include <wx/grid.h>`

## Detailed Description

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.

Since
  3.1.4

## 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...

## Member Enumeration Documentation

## ◆ Origin

enum wxGridActivationSource::Origin

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().

## Member Function Documentation

## ◆ GetKeyEvent()

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.

## ◆ GetMouseEvent()

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.

## ◆ GetOrigin()

Origin wxGridActivationSource::GetOrigin | ( |  | ) | const

Get the origin of the activation.