text (cellium v0.1.0)
View SourceText widget module for displaying static text.
This module provides a simple text widget that can display static text with optional word wrapping.
Usage
Basic text widget:
text:new(my_text, "Hello, World!")Text widget with wrapping (requires expand or size to get width from layout):
Widget = text:new(my_text, "This is a long text that will wrap"),
WrappingWidget = Widget#{wrap => true, expand => true}Properties
wrap(boolean): Enable word wrapping. When true, text wraps at the widget's width (set by the layout system). Default: falseexpand(boolean): Request the layout system to assign width and height. Required when using wrap. Default: falsewidth(integer): Set by the layout system when expand is true
Summary
Functions
Creates a new text widget with empty content.
Creates a new text widget with the specified content.
Renders the text widget to the buffer.
Functions
Creates a new text widget with empty content.
Creates a new text widget with the specified content.
Renders the text widget to the buffer.
If wrap is enabled and width is set by layout, text wraps at word boundaries at the widget's width.