[][src]Module nannou::text::line

Text handling logic related to individual lines of text.

This module is the core of multi-line text handling.

Structs

Info

Information about a single line of text within a &str.

Infos

An iterator yielding an Info struct for each line in the given text wrapped by the given next_break_fn.

NextBreak

The type yielded by functions dedicated to finding the next line break.

Rects

An iterator yielding a Rect for each line in

SelectedRects

An iterator yielding a Rect for each selected line in a block of text.

Enums

Break

The two types of Break indices returned by the WrapIndicesBy iterators.

Functions

infos

Produce an Infos iterator that yields an Info for every line in the given text.

infos_maybe_wrapped

Simplify the retrieval of line information for text that may or may not be wrapped.

infos_wrapped_by

Produce an Infos iterator wrapped by the given next_break_fn.

rects

Produce an iterator yielding the bounding Rect for each line in the text.

selected_rects

Produces an iterator yielding a Rect for the selected range in each selected line in a block of text.

width

Produce the width of the given line of text including spaces (i.e. ' ').

Type Definitions

NextBreakFnPtr

An alias for function pointers that are compatible with the Block's required text wrapping function.