S or /

SourceClass TextWrapping

from egui import TextWrapping
class TextWrapping:

Controls the text wrapping and elision of a LayoutJob.

Properties§

@property def break_anywhere(self, /) -> bool§
@break_anywhere.setter def break_anywhere(self, /, value: bool) -> None§
@property def max_rows(self, /) -> int§
@max_rows.setter def max_rows(self, /, value: int) -> None§
@property def max_width(self, /) -> float§
@max_width.setter def max_width(self, /, value: float) -> None§
@property def overflow_character(self, /) -> str |None§
@overflow_character.setter def overflow_character(self, /, value: str |None) -> None§

Methods§

@staticmethod def default() -> TextWrapping§
Source@staticmethod def from_wrap_mode_and_width(mode: TextWrapMode, max_width: float) -> TextWrapping§

Create a TextWrapping from a TextWrapMode and an available width.

Source@staticmethod def no_max_width() -> TextWrapping§

A row can be as long as it need to be.

Source@staticmethod def truncate_at_width(max_width: float) -> TextWrapping§

Elide text that doesn't fit within the given width, replaced with .

Source@staticmethod def wrap_at_width(max_width: float) -> TextWrapping§

A row can be at most max_width wide but can wrap in any number of lines.