NAME
Tickit::OneLineWidget
- a widget which occupies only one line
DESCRIPTION
This subclass of Tickit::Widget provides a convenient base for widgets that only want to occupy a single line of the window. It provides the valign
accessor to control alignment of the widget's content within the window, and a render
method that clears all the unused lines of the window. This class also provides the lines
method, returning a constant value of 1
.
ACCESSORS
$valign = $widget->valign
$widget->set_valign( $valign )
Accessor for vertical alignment value.
Gives a value in the range from 0.0
to 1.0
to align the content display within the window. If the window is taller than one line, it will be aligned according to this value; with 0.0
at the top, 1.0
at the bottom, and other values inbetween.
See also Tickit::WidgetRole::Alignable
SUBCLASS METHODS
Because this is an abstract class, the constructor must be called on a subclass which implements the following methods.
$widget->render_line
Called to redraw the widget's content to its window. When invoked, the window cursor will already be in column 0
of the required line of the window, as determined by the valign
value.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>