ManaPlus
|
#include <key.h>
Public Member Functions | |
Key (const int value) | |
bool | isCharacter () const |
bool | isNumber () const |
bool | isLetter () const |
int | getValue () const |
bool | operator== (const Key &key) const |
bool | operator!= (const Key &key) const |
Protected Attributes | |
int | mValue |
|
explicit |
Constructor.
value | The ascii or enum value for the key. |
int 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 99 of file key.cpp.
References mValue.
Referenced by TextBox::keyPressed(), and ChatWindow::keyPressed().
bool Key::isCharacter | ( | ) | const |
Checks if a key is a character.
Definition at line 78 of file key.cpp.
References mValue.
Referenced by TextBox::keyPressed().
bool Key::isLetter | ( | ) | const |
bool Key::isNumber | ( | ) | const |
bool Key::operator!= | ( | const Key & | key | ) | const |
bool Key::operator== | ( | const Key & | key | ) | const |
|
protected |
Holds the value of the key. It may be an ascii value or an enum value.
Definition at line 145 of file key.h.
Referenced by getValue(), isCharacter(), isLetter(), isNumber(), operator!=(), and operator==().