UI::Various::RichTerm::Box - concrete implementation of UI::Various::Box
# This module should never be used directly! # It is used indirectly via the following: use UI::Various::Box;
This module is the specific implementation of UI::Various::Box using the rich terminal UI.
The documentation of this module is only intended for developers of the package itself.
($width, $height) = $ui_element->_prepare($content_width, $prefix_length);
my ($w, $h) = $_->_prepare($content_width, $pre_len); $width < $w and $width = $w; $height += $h;
$content_width preferred width of content $prefix_length the length of a prefix for active UI elements
Prepare output of the UI element by determining and returning the space it wants or needs. The method should only be called from other UI::Various::RichTerm container elements!
UI::Various::RichTerm
Note that $content_width initially already includes one prefix length as that's the standard needed by all other UI elements.
$content_width
width and height the UI element will require or need when printed
$string = $ui_element->_show($prefix, $width, $height, $pre_active);
my ($w, $h) = $_->_prepare($content_width, $pre_len); ... $_->_show(' ', $w, $h, $pre_active);
$prefix text in front of first line $width the width returned by _prepare above $height the height returned by _prepare above $pre_active format string for prefixes
Return the formatted (rectangular) text box of the UI element. Its height will be exactly as specified, unless there hasn't been enough space. The weight is similarly as specified (as the widths of all possible prefixes already have been returned by _prepare). The method should only be called from other UI::Various::RichTerm container elements!
_prepare
the rectangular text box for UI element
UI::Various, UI::Various::Box
Copyright (C) Thomas Dorner.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See LICENSE file for more details.
Thomas Dorner <dorner (at) cpan (dot) org>
To install UI::Various, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UI::Various
CPAN shell
perl -MCPAN -e shell install UI::Various
For more information on module installation, please visit the detailed CPAN module installation guide.