#include <PlotEvent.h>
Inheritance diagram for casa::PlotKeyEvent:


An example of a keyboard command would be "ctrl+s" or "n" or "shift+g" or "F3". Note that this event is only valid for key commands that can be represented with a char (or, in the case of the F1-F12 keys, the F modifier plus the character representation of the number).
Definition at line 218 of file PlotEvent.h.
Public Types | |
| enum | Modifier { CONTROL, SHIFT, ALT, F } |
| Modifier for a key press. More... | |
Public Member Functions | |
| PlotKeyEvent (PlotCanvas *canvas, char key, const vector< Modifier > &mods) | |
| Constructor that takes the originating canvas, the key pressed, and any modifiers. | |
| ~PlotKeyEvent () | |
| Destructor. | |
| void * | origin () const |
| Overrides PlotEvent::origin(). | |
| PlotCanvas * | canvas () const |
| Returns the originating canvas. | |
| char | key () const |
| Returns the pressed character key. | |
| vector< Modifier > | modifiers () const |
| Returns the key modifiers. | |
| String | toString () const |
| Returns a String representation of this key event. | |
Static Public Member Functions | |
| static String | modifier (Modifier f) |
| Converts between KeyModifier and its String representation. | |
| static Modifier | modifier (String f) |
Protected Attributes | |
| PlotCanvas * | m_canvas |
| char | m_key |
| vector< Modifier > | m_mods |
| casa::PlotKeyEvent::PlotKeyEvent | ( | PlotCanvas * | canvas, | |
| char | key, | |||
| const vector< Modifier > & | mods | |||
| ) |
Constructor that takes the originating canvas, the key pressed, and any modifiers.
| casa::PlotKeyEvent::~PlotKeyEvent | ( | ) |
Destructor.
| void* casa::PlotKeyEvent::origin | ( | ) | const [inline, virtual] |
Overrides PlotEvent::origin().
Implements casa::PlotEvent.
Definition at line 233 of file PlotEvent.h.
References canvas().
| PlotCanvas* casa::PlotKeyEvent::canvas | ( | ) | const |
| char casa::PlotKeyEvent::key | ( | ) | const |
Returns the pressed character key.
| vector<Modifier> casa::PlotKeyEvent::modifiers | ( | ) | const |
Returns the key modifiers.
| String casa::PlotKeyEvent::toString | ( | ) | const |
Returns a String representation of this key event.
| static String casa::PlotKeyEvent::modifier | ( | Modifier | f | ) | [inline, static] |
| static Modifier casa::PlotKeyEvent::modifier | ( | String | f | ) | [inline, static] |
PlotCanvas* casa::PlotKeyEvent::m_canvas [protected] |
Definition at line 273 of file PlotEvent.h.
char casa::PlotKeyEvent::m_key [protected] |
Definition at line 274 of file PlotEvent.h.
vector<Modifier> casa::PlotKeyEvent::m_mods [protected] |
Definition at line 275 of file PlotEvent.h.
1.5.1