man Lire::UI::Utils () - Utility functions for UI management

NAME

Lire::UI::Utils - Utility functions for UI management

SYNOPSIS

  use Lire::UI::Utils;

DESCRIPTION

Utility functions for UI code. Computes the width required to draw the button box described by the 'buttons' parameter. This parameter is a hash reference. Returns a label suitable for a button considering that the maximum width of the button is CW$max_button_width. Crops the labels of the Curses::UI::Buttonbox CW$box until it fits in the canvaswidth() of the CW$container. CW$padleft and CW$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.

SEE ALSO

VERSION

$Id: Utils.pm,v 1.6 2004/07/09 20:25:07 flacoste Exp $

AUTHORS

Wolfgang Sourdeau <wolfgang@logreport.org>

COPYRIGHT

Copyright (C) 2004 Stichting LogReport Foundation LogReport@LogReport.org

This file is part of Lire.

Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html or write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.