![]() |
CUGL 2.5
Cornell University Game Library
|
#include <CUTextInput.h>
Public Member Functions | |
| TextEditEvent () | |
| TextEditEvent (const std::string text, size_t begin, size_t end) | |
| TextEditEvent (const std::string text, size_t begin, size_t end, const Timestamp &stamp) | |
| ~TextEditEvent () | |
Public Attributes | |
| Timestamp | timestamp |
| std::string | buffer |
| size_t | begin |
| size_t | end |
This simple class is a struct to hold text editing information
Text input does not necessarily correspond to a single keystroke. Some unicode characters are the results of intermediate keystrokes. Examples include extended Latin characters like ΓΌ, or Chinese characters created by Pinyin - Simplified on macOS. This event allows an application to look at the keystroke buffer before it resolves into a unicode character.
|
inline |
Constructs a new text edit event with the default values
| cugl::TextEditEvent::TextEditEvent | ( | const std::string | text, |
| size_t | begin, | ||
| size_t | end | ||
| ) |
Constructs a new text edit event with the given buffer and edit positions.
The timestamp will be the time of construction.
| text | The current text editing buffer |
| begin | The beginning edit position in the buffer |
| end | The ending (not inclusive) edit position |
| cugl::TextEditEvent::TextEditEvent | ( | const std::string | text, |
| size_t | begin, | ||
| size_t | end, | ||
| const Timestamp & | stamp | ||
| ) |
Constructs a new text edit event with the given values
| text | The current text editing buffer |
| begin | The beginning edit position in the buffer |
| end | The ending (not inclusive) edit position |
| stamp | The timestamp for the event |
|
inline |
Deletes a text input event, releasing all resources
| size_t cugl::TextEditEvent::begin |
The beginning position of the change
| std::string cugl::TextEditEvent::buffer |
The edit buffer for the intermediate text
| size_t cugl::TextEditEvent::end |
The end (not inclusive) position of the change
| Timestamp cugl::TextEditEvent::timestamp |
The time of the text edit event