CUGL 2.3
Cornell University Game Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
cugl::TextEditEvent Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TextEditEvent() [1/3]

cugl::TextEditEvent::TextEditEvent ( )
inline

Constructs a new text edit event with the default values

◆ TextEditEvent() [2/3]

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.

Parameters
textThe current text editing buffer
beginThe beginning edit position in the buffer
endThe ending (not inclusive) edit position

◆ TextEditEvent() [3/3]

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

Parameters
textThe current text editing buffer
beginThe beginning edit position in the buffer
endThe ending (not inclusive) edit position
stampThe timestamp for the event

◆ ~TextEditEvent()

cugl::TextEditEvent::~TextEditEvent ( )
inline

Deletes a text input event, releasing all resources

Member Data Documentation

◆ begin

size_t cugl::TextEditEvent::begin

The beginning position of the change

◆ buffer

std::string cugl::TextEditEvent::buffer

The edit buffer for the intermediate text

◆ end

size_t cugl::TextEditEvent::end

The end (not inclusive) position of the change

◆ timestamp

Timestamp cugl::TextEditEvent::timestamp

The time of the text edit event


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