wxWidgets: wxGridActivationSource Class Reference

| Version: 3.1.7

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
wxGridActivationSource Class Reference

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.7-1.x86_64/src/wxWidgets-3.1.7/interface/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.
const wxKeyEvent & | GetKeyEvent () const
| Get the key event corresponding to the key press activating the cell.
const wxMouseEvent & | GetMouseEvent () const
| Get the mouse event corresponding to the click activating the cell.

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