wxGridActivationSource Class Reference | wxWidgets

| Version: 3.2.11

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

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/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.