Lire::UI::Utils3pm
Utility functions for ui management
Usage
use Lire::UI::Utils;
Overview
Utility functions for UI code.
button_box_width( $buttons )
Computes the width required to draw the button box described by the 'buttons' parameter. This parameter is a hash reference.
button_label( $label, $max_button_width )
Returns a label suitable for a button considering that the maximum width of the button is $max_button_width.
layout_buttonbox( $container, $box, [ $padleft ], [ $padright ] )
Crops the labels of the Curses::UI::Buttonbox $box until it fits in the canvaswidth() of the $container. $padleft and $padright can be used to allow space for padding. The function will set the '-width' and '-x' attributes of the Buttonbox. In the worst case, the label will be reduced to their first letter. The Buttonbox's buttons should have their '-label' attribute set to the full label without any button decorations (like '['), these will be added by the function after cropping.
Version
$Id: Utils.pm,v 1.7 2006/07/23 13:16:32 vanbaal Exp $
Releases
6 releases since Debian 3.1 (Sarge); the text changed 5 times.