HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions
tt::editable_text Class Reference

Public Member Functions

 editable_text (text_style style)
 
 operator std::string () const noexcept
 
editable_textoperator= (std::string_view str) noexcept
 
void updateshaped_text () noexcept
 Update the shaped text after changed to text.
 
shaped_text shapedText () const noexcept
 
void setWidth (float _width) noexcept
 
void setCurrentStyle (text_style style) noexcept
 
void setStyleOfAll (text_style style) noexcept
 Change the text style of all graphemes.
 
size_t size () const noexcept
 
decltype(auto) it (ssize_t index) noexcept
 Return the text iterator at index.
 
decltype(auto) cit (ssize_t index) const noexcept
 Return the text iterator at index.
 
decltype(auto) it (ssize_t index) const noexcept
 
aarect partialgraphemeCaret () const noexcept
 Get carets at the cursor position.
 
aarect leftToRightCaret () const noexcept
 Get carets at the cursor position.
 
std::vector< aarectselectionRectangles () const noexcept
 Get a set of rectangles for which text is selected.
 
void deleteSelection () noexcept
 Delete a selection.
 
ssize_t characterIndexAtPosition (f32x4 position) const noexcept
 
void setmouse_cursorAtCoordinate (f32x4 coordinate) noexcept
 
void selectWordAtCoordinate (f32x4 coordinate) noexcept
 
void selectParagraphAtCoordinate (f32x4 coordinate) noexcept
 
void dragmouse_cursorAtCoordinate (f32x4 coordinate) noexcept
 
void dragWordAtCoordinate (f32x4 coordinate) noexcept
 
void dragParagraphAtCoordinate (f32x4 coordinate) noexcept
 
void cancelPartialgrapheme () noexcept
 
void insertPartialgrapheme (grapheme character) noexcept
 
void insertgrapheme (grapheme character) noexcept
 
void handlePaste (std::string str) noexcept
 
std::string handleCopy () noexcept
 
std::string handleCut () noexcept
 
bool handle_event (command command) noexcept
 

Member Function Documentation

◆ characterIndexAtPosition()

ssize_t tt::editable_text::characterIndexAtPosition ( f32x4 position) const
noexcept

Find the nearest character at position and return it's index.

◆ cit()

decltype(auto) tt::editable_text::cit ( ssize_t index) const
inlinenoexcept

Return the text iterator at index.

◆ deleteSelection()

void tt::editable_text::deleteSelection ( )
inlinenoexcept

Delete a selection.

This function should be called when a selection is active while new text is being inserted.

◆ insertgrapheme()

void tt::editable_text::insertgrapheme ( grapheme character)
inlinenoexcept

insert character at the cursor position. Selected text will be deleted.

◆ insertPartialgrapheme()

void tt::editable_text::insertPartialgrapheme ( grapheme character)
inlinenoexcept

Insert a temporary partial character. This partial character is currently being constructed by the operating system.

Since the insertion has not been completed any selected text should not yet be deleted.

◆ it()

decltype(auto) tt::editable_text::it ( ssize_t index)
inlinenoexcept

Return the text iterator at index.

◆ leftToRightCaret()

aarect tt::editable_text::leftToRightCaret ( ) const
inlinenoexcept

Get carets at the cursor position.

◆ partialgraphemeCaret()

aarect tt::editable_text::partialgraphemeCaret ( ) const
inlinenoexcept

Get carets at the cursor position.

◆ selectionRectangles()

std::vector< aarect > tt::editable_text::selectionRectangles ( ) const
inlinenoexcept

Get a set of rectangles for which text is selected.

◆ setStyleOfAll()

void tt::editable_text::setStyleOfAll ( text_style style)
inlinenoexcept

Change the text style of all graphemes.

◆ updateshaped_text()

void tt::editable_text::updateshaped_text ( )
inlinenoexcept

Update the shaped text after changed to text.


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