Tickit::Widget::Scroller::Item - interface for renderable scroller items
Tickit::Widget::Scroller::Item
Items added to a Tickit::Widget::Scroller must adhere to the interface documented here.
Tickit::Widget::Scroller
Returns the number of screen lines the item would occupy if rendered to the given width.
Renders the item to the given Tickit::RenderBuffer. %args will contain the following keys:
%args
The (inclusive) bounds of the line numbers to render. If these do not cover the entire height of the item, then they imply that clipping will occur; the item need draw only the lines indicated.
These are passed for informational purposes. Item implementations are free to ignore this if they wish, as clipping will be performed by the RenderBuffer.
The line of $rc to consider as the top of the item. This is passed for legacy purposes and will always be zero. Item implementations are free to ignore this value, as it will now be performed using the translate facility of the RenderBuffer.
$rc
translate
The width in columns and the height in lines to render the item. This will correspond to the most recent call to height_for_width, and is passed in for consistency and convenience of the item's render method. This is given as the full dimensions of the item, which may be larger than the subset of lines requested by the firstline and lastline parameters.
height_for_width
firstline
lastline
Paul Evans <leonerd@leonerd.org.uk>
To install Tickit::Widget::Scroller, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit::Widget::Scroller
CPAN shell
perl -MCPAN -e shell install Tickit::Widget::Scroller
For more information on module installation, please visit the detailed CPAN module installation guide.