[][src]Module conrod_core::text::cursor

Logic related to the positioning of the cursor within text.

Structs

Index

An index representing the position of a cursor within some text.

Xs

Each possible cursor position along the x axis within a line of text.

XysPerLine

Every possible cursor position within each line of text yielded by the given iterator.

XysPerLineFromText

Similarly to XysPerLine, yields every possible cursor position within each line of text yielded by the given iterator.

Functions

closest_cursor_index_and_xy

Find the closest cursor index to the given xy position, and the center Point of that cursor.

closest_cursor_index_on_line

Find the closest cursor index to the given x position on the given line along with the x position of that cursor.

closest_line

Find the closest line for the given y position, and return the line index, Xs iterator, and y-range of that line

index_before_char

Convert the given character index into a cursor Index.

xy_at

Determine the xy location of the cursor at the given cursor Index.

xys_per_line

Every possible cursor position within each line of text yielded by the given iterator.

xys_per_line_from_text

Similarly to xys_per_line, this produces an iterator yielding every possible cursor position within each line of text yielded by the given iterator.