![]() |
CUGL 2.5
Cornell University Game Library
|
#include <CUTextInput.h>
Public Member Functions | |
| TextInputEvent () | |
| TextInputEvent (Uint32 code) | |
| TextInputEvent (Uint32 code, const Timestamp &stamp) | |
| ~TextInputEvent () | |
Public Attributes | |
| Timestamp | timestamp |
| Uint32 | unicode |
This simple class is a struct to hold text input information
Text input is sent one unicode character at a time. This is true even when this is not how the OS handles it (e.g. macOS and Pinyin-Simplified). When the input sends multiple characters, they are transmitted as a sequence of TextInputEvents with ordered time stamps.
|
inline |
Constructs a new text input event with the default values
| cugl::TextInputEvent::TextInputEvent | ( | Uint32 | code | ) |
Constructs a new text input event with the given unicode value
The timestamp will be the time of construction.
| code | The unicode character |
| cugl::TextInputEvent::TextInputEvent | ( | Uint32 | code, |
| const Timestamp & | stamp | ||
| ) |
Constructs a new text input event with the given values
| code | The unicode character |
| stamp | The timestamp for the event |
|
inline |
Deletes a text input event, releasing all resources
| Timestamp cugl::TextInputEvent::timestamp |
The time of the text input event
| Uint32 cugl::TextInputEvent::unicode |
The unicode character for this input