Module nannou::text::cursor

source ·
Expand description

Logic related to the positioning of the cursor within text.

Structs

  • An index representing the position of a cursor within some text.
  • Each possible cursor position along the x axis within a line of text.
  • Every possible cursor position within each line of text yielded by the given iterator.
  • Similarly to XysPerLine, yields every possible cursor position within each line of text yielded by the given iterator.

Functions

  • Find the closest cursor index to the given xy position, and the center Point of that cursor.
  • Find the closest cursor index to the given x position on the given line along with the x position of that cursor.
  • Find the closest line for the given y position, and return the line index, Xs iterator, and y-range of that line
  • Convert the given character index into a cursor Index.
  • Determine the xy location of the cursor at the given cursor Index.
  • Every possible cursor position within each line of text yielded by the given iterator.
  • Similarly to xys_per_line, this produces an iterator yielding every possible cursor position within each line of text yielded by the given iterator.