SourceModule text_cursor_state
Text cursor changes/interaction, without modifying the text.
Classes§
| TextCursorState | The state of a text cursor selection. |
Functions§
| byte_index_from_char_index | |
| ccursor_next_word | |
| ccursor_previous_word | |
| char_index_from_byte_index | |
| cursor_rect | The thin rectangle of one end of the selection, e.g. the primary cursor, in local galley coordinates. |
| find_line_start | Accepts and returns character offset (NOT byte offset!). |
| is_word_char | |
| slice_char_range |
SourceFunction byte_index_from_char_index§
from egui import byte_index_from_char_indexdef byte_index_from_char_index(s: str, char_index: int) -> intSourceFunction ccursor_next_word§
from egui import ccursor_next_worddef ccursor_next_word(text: str, ccursor: CCursor) -> CCursorSourceFunction ccursor_previous_word§
from egui import ccursor_previous_worddef ccursor_previous_word(text: str, ccursor: CCursor) -> CCursorSourceFunction char_index_from_byte_index§
from egui import char_index_from_byte_indexdef char_index_from_byte_index(input: str, byte_index: int) -> intSourceFunction cursor_rect§
from egui import cursor_rectdef cursor_rect(galley: Galley, cursor: CCursor, row_height: float) -> RectThe thin rectangle of one end of the selection, e.g. the primary cursor, in local galley coordinates.
SourceFunction find_line_start§
from egui import find_line_startdef find_line_start(text: str, current_index: CCursor) -> CCursorAccepts and returns character offset (NOT byte offset!).
SourceFunction is_word_char§
from egui import is_word_chardef is_word_char(c: str) -> boolSourceFunction slice_char_range§
from egui import slice_char_rangedef slice_char_range(s: str, start: int, end: int) -> str