Tickit::ContainerWidget - abstract base class for widgets that contain other widgets
Tickit::ContainerWidget
TODO
This class acts as an abstract base class for widgets that contain at leaast one other widget object.
It maintains an ordered list of child widgets, and associates a hash of named/value pairs as options for each child. Concrete subclasses of this base can use these options to implement their required behaviour.
In scalar context, returns the number of contained children. In list context, returns a list of all the child widgets.
Returns the options currently set for the given child, specified either by reference or by index.
Sets new options on the given child, specified either by reference or by index. Any options whose value is given as undef are deleted.
undef
Executes the code block once for each stored child, in order. The code block is passed the child widget and the options, as key/value pairs
$code->( $child, %opts )
Adds the widget as a new child of this one, with the given options
Removes the given child widget if present, by reference or index
Optional. An empty render method is provided for the case where the widget is purely a layout container that does not directly draw to its window. If the container requires drawing, this method may be overridden. Since the default implementation is empty, there is no need for a subclass to SUPER call it.
render
SUPER
Optional. If implemented, this method will be called after any change of the contained child widgets or their options. Typically this will be used to set windows on them by sub-dividing the window of the parent.
Optional. If implemented, this method will be called after a child widget changes or may have changed its size requirements. Typically this will be used to adjusts the windows allocated to children.
Paul Evans <leonerd@leonerd.org.uk>
To install Tickit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit
CPAN shell
perl -MCPAN -e shell install Tickit
For more information on module installation, please visit the detailed CPAN module installation guide.