CUGL 2.1
Cornell University Game Library
Public Member Functions | Public Attributes | List of all members
cugl::TextInputEvent Class Reference

#include <CUTextInput.h>

Public Member Functions

 TextInputEvent ()
 
 TextInputEvent (Uint32 code)
 
 TextInputEvent (Uint32 code, const Timestamp &stamp)
 
 ~TextInputEvent ()
 

Public Attributes

Timestamp timestamp
 
Uint32 unicode
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TextInputEvent() [1/3]

cugl::TextInputEvent::TextInputEvent ( )
inline

Constructs a new text input event with the default values

◆ TextInputEvent() [2/3]

cugl::TextInputEvent::TextInputEvent ( Uint32  code)

Constructs a new text input event with the given unicode value

The timestamp will be the time of construction.

Parameters
codeThe unicode character

◆ TextInputEvent() [3/3]

cugl::TextInputEvent::TextInputEvent ( Uint32  code,
const Timestamp stamp 
)

Constructs a new text input event with the given values

Parameters
codeThe unicode character
stampThe timestamp for the event

◆ ~TextInputEvent()

cugl::TextInputEvent::~TextInputEvent ( )
inline

Deletes a text input event, releasing all resources

Member Data Documentation

◆ timestamp

Timestamp cugl::TextInputEvent::timestamp

The time of the text input event

◆ unicode

Uint32 cugl::TextInputEvent::unicode

The unicode character for this input


The documentation for this class was generated from the following file: