Toddy.Iced.Wrapping (Toddy v0.3.0)

Copy Markdown View Source

Line-break strategy for the text wrapping prop.

Maps to iced's text::Wrapping enum.

Summary

Functions

Encodes a wrapping value to the wire format.

Types

t()

@type t() :: :none | :word | :glyph | :word_or_glyph

Functions

encode(value)

@spec encode(wrapping :: t()) :: String.t()

Encodes a wrapping value to the wire format.

Examples

iex> Toddy.Iced.Wrapping.encode(:none)
"none"

iex> Toddy.Iced.Wrapping.encode(:word)
"word"

iex> Toddy.Iced.Wrapping.encode(:glyph)
"glyph"

iex> Toddy.Iced.Wrapping.encode(:word_or_glyph)
"word_or_glyph"