utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
utility::event::TextEditingEvent Class Reference

Text editing event for IME/dead-key preedit state. More...

#include <headers/utility/event/text_editing_event.hpp>

Inheritance diagram for utility::event::TextEditingEvent:
Collaboration diagram for utility::event::TextEditingEvent:

Classes

class  Factory
 Factory for creating TextEditingEvent instances. More...
 

Public Member Functions

 TextEditingEvent (void)
 Default constructor.
 
 ~TextEditingEvent (void) override
 Default destructor.
 
TextEditingEventsetText (const std::string &text)
 Set preedit UTF-8 text.
 
std::string getText (void) const
 Get preedit UTF-8 text.
 
TextEditingEventsetStart (const int start) noexcept
 Set cursor start position in preedit text.
 
int getStart (void) const noexcept
 Get cursor start position in preedit text.
 
TextEditingEventsetLength (const int length) noexcept
 Set selection length in preedit text.
 
int getLength (void) const noexcept
 Get selection length in preedit text.
 
- Public Member Functions inherited from utility::event::Event
 Event (void)=default
 Default constructor.
 
virtual ~Event (void)=default
 Virtual destructor.
 

Detailed Description

Text editing event for IME/dead-key preedit state.

Definition at line 36 of file text_editing_event.hpp.

Member Function Documentation

◆ getLength()

int utility::event::TextEditingEvent::getLength ( void  ) const
noexcept

Get selection length in preedit text.

Returns
Selection length.

Definition at line 73 of file text_editing_event.cpp.

◆ getStart()

int utility::event::TextEditingEvent::getStart ( void  ) const
noexcept

Get cursor start position in preedit text.

Returns
Cursor start position.

Definition at line 62 of file text_editing_event.cpp.

◆ getText()

std::string utility::event::TextEditingEvent::getText ( void  ) const

Get preedit UTF-8 text.

Returns
The preedit text.

Definition at line 51 of file text_editing_event.cpp.

◆ setLength()

TextEditingEvent & utility::event::TextEditingEvent::setLength ( const int  length)
noexcept

Set selection length in preedit text.

Parameters
lengthSelection length.
Returns
Reference to this TextEditingEvent for method chaining.

Definition at line 67 of file text_editing_event.cpp.

◆ setStart()

TextEditingEvent & utility::event::TextEditingEvent::setStart ( const int  start)
noexcept

Set cursor start position in preedit text.

Parameters
startCursor start position.
Returns
Reference to this TextEditingEvent for method chaining.

Definition at line 56 of file text_editing_event.cpp.

◆ setText()

TextEditingEvent & utility::event::TextEditingEvent::setText ( const std::string &  text)

Set preedit UTF-8 text.

Parameters
textThe preedit text.
Returns
Reference to this TextEditingEvent for method chaining.

Definition at line 45 of file text_editing_event.cpp.


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