#include <key.hpp>
Definition at line 67 of file key.hpp.
Public Types | |
| enum | { SPACE = ' ', TAB = '\t', ENTER = '\n', LEFT_ALT = 1000, RIGHT_ALT, LEFT_SHIFT, RIGHT_SHIFT, LEFT_CONTROL, RIGHT_CONTROL, LEFT_META, RIGHT_META, LEFT_SUPER, RIGHT_SUPER, INSERT, HOME, PAGE_UP, DELETE, END, PAGE_DOWN, ESCAPE, CAPS_LOCK, BACKSPACE, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, PRINT_SCREEN, SCROLL_LOCK, PAUSE, NUM_LOCK, ALT_GR, LEFT, RIGHT, UP, DOWN } |
| An enum with key values. More... | |
Public Member Functions | |
| int | getValue () const |
| Gets the value of the key. | |
| bool | isCharacter () const |
| Checks if a key is a character. | |
| bool | isLetter () const |
| Checks if a key is a letter. | |
| bool | isNumber () const |
| Checks if a key is a number. | |
| Key (int value=0) | |
| Constructor. | |
Protected Attributes | |
| int | mValue |
| Holds the value of the key. | |
| anonymous enum |
An enum with key values.
| gcn::Key::Key | ( | int | value = 0 |
) |
| int gcn::Key::getValue | ( | ) | const |
Gets the value of the key.
If an ascii value exists it will be returned. Otherwise an enum value will be returned.
Definition at line 90 of file key.cpp.
References mValue.
Referenced by gcn::TextField::keyPressed(), gcn::TextBox::keyPressed(), gcn::TabbedArea::keyPressed(), gcn::Slider::keyPressed(), gcn::RadioButton::keyPressed(), gcn::ListBox::keyPressed(), gcn::DropDown::keyPressed(), gcn::CheckBox::keyPressed(), gcn::Button::keyPressed(), and gcn::Button::keyReleased().
| bool gcn::Key::isCharacter | ( | ) | const |
Checks if a key is a character.
Definition at line 70 of file key.cpp.
References mValue.
Referenced by gcn::TextField::keyPressed(), and gcn::TextBox::keyPressed().
| bool gcn::Key::isLetter | ( | ) | const |
| bool gcn::Key::isNumber | ( | ) | const |
int gcn::Key::mValue [protected] |
Holds the value of the key.
It may be an ascii value or an enum value.
Definition at line 168 of file key.hpp.
Referenced by getValue(), isCharacter(), isLetter(), and isNumber().
1.5.2