S or /

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_index
def byte_index_from_char_index(s: str, char_index: int) -> int

SourceFunction ccursor_next_word§

from egui import ccursor_next_word
def ccursor_next_word(text: str, ccursor: CCursor) -> CCursor

SourceFunction ccursor_previous_word§

from egui import ccursor_previous_word
def ccursor_previous_word(text: str, ccursor: CCursor) -> CCursor

SourceFunction char_index_from_byte_index§

from egui import char_index_from_byte_index
def char_index_from_byte_index(input: str, byte_index: int) -> int

SourceFunction cursor_rect§

from egui import cursor_rect
def cursor_rect(galley: Galley, cursor: CCursor, row_height: float) -> Rect

The 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_start
def find_line_start(text: str, current_index: CCursor) -> CCursor

Accepts and returns character offset (NOT byte offset!).

SourceFunction is_word_char§

from egui import is_word_char
def is_word_char(c: str) -> bool

SourceFunction slice_char_range§

from egui import slice_char_range
def slice_char_range(s: str, start: int, end: int) -> str

Constants§

Re-exports§