GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CURSES::UI::LABEL (3)

.ds Aq ’

NAME

Curses::UI::Label - Create and manipulate label widgets

CONTENTS

CLASS HIERARCHY



 Curses::UI::Widget
    |
    +----Curses::UI::Label



SYNOPSIS



    use Curses::UI;
    my $cui = new Curses::UI;
    my $win = $cui->add(window_id, Window);

    my $label = $win->add(
        mylabel, Label,
        -text      => Hello, world!,
        -bold      => 1,
    );

    $label->draw;



DESCRIPTION

Curses::UI::Label is a widget that shows a textstring. This textstring can be drawn using these special features: bold, dimmed, reverse, underlined, and blinking.

See exampes/demo-Curses::UI::Label in the distribution for a short demo.

STANDARD OPTIONS

<B>-parentB>, <B>-xB>, <B>-yB>, <B>-widthB>, <B>-heightB>, <B>-padB>, <B>-padleftB>, <B>-padrightB>, <B>-padtopB>, <B>-padbottomB>, <B>-ipadB>, <B>-ipadleftB>, <B>-ipadrightB>, <B>-ipadtopB>, <B>-ipadbottomB>, <B>-titleB>, <B>-titlefullwidthB>, <B>-titlereverseB>, <B>-onfocusB>, <B>-onblurB>

For an explanation of these standard options, see Curses::UI::Widget.

WIDGET-SPECIFIC OPTIONS

o <B>-heightB> < VALUE >

If you do not define <B>-heightB>, the label will compute its needed height using the initial <B>-textB>.

o <B>-textB> < TEXT >

This will set the text on the label to TEXT.

o <B>-textalignmentB> < VALUE >

This option controls how the text should be aligned inside the label. VALUE can be ’left’, ’middle’ and ’right’. The default value for this option is ’left’.

o <B>-paddingspacesB> < BOOLEAN >

This option controls if padding spaces should be added to the text if the text does not fill the complete width of the widget. The default value for BOOLEAN is false. An example use of this option is:



    $win->add(
        label, Label,
        -width         => -1,
        -paddingspaces => 1,
        -text          => A bit of text,
    );



This will create a label that fills the complete width of your screen and which will be completely in reverse font (also the part that has no text on it). See the demo in the distribution (examples/demo-Curses::UI::Label) for a clear example of this)

o <B>-boldB> < BOOLEAN >

If BOOLEAN is true, text on the label will be drawn in a bold font.

o <B>-dimB> < BOOLEAN >

If BOOLEAN is true, text on the label will be drawn in a dim font.

o <B>-reverseB> < BOOLEAN >

If BOOLEAN is true, text on the label will be drawn in a reverse font.

o <B>-underlineB> < BOOLEAN >

If BOOLEAN is true, text on the label will be drawn in an underlined font.

o <B>-blinkB> < BOOLEAN >

If BOOLEAN is option is true, text on the label will be drawn in a blinking font.

METHODS

o <B>newB> ( OPTIONS )
o <B>layoutB> ( )
o <B>drawB> ( BOOLEAN )
o <B>intellidrawB> ( )
o <B>focusB> ( )
o <B>onFocusB> ( CODEREF )
o <B>onBlurB> ( CODEREF )

These are standard methods. See Curses::UI::Widget for an explanation of these.

o <B>boldB> ( BOOLEAN )
o <B>dimB> ( BOOLEAN )
o <B>reverseB> ( BOOLEAN )
o <B>underlineB> ( BOOLEAN )
o <B>blinkB> ( BOOLEAN )

These methods can be used to control the font in which the text on the label is drawn, after creating the widget. The font option will be turned on for a true value of BOOLEAN.

o <B>textalignmentB> ( VALUE )

Set the textalignment. VALUE can be ’left’, ’middle’ or ’right’.

o <B>textB> ( [TEXT] )

Without the TEXT argument, this method will return the current text of the widget. With a TEXT argument, the text on the widget will be set to TEXT.

o <B>getB> ( )

This will call the <B>textB> method without any argument and thus it will return the current text of the label.

DEFAULT BINDINGS

Since a Label is a non-interacting widget, it does not have any bindings.

SEE ALSO

Curses::UI, Curses::UI::Widget,

AUTHOR

Copyright (c) 2001-2002 Maurice Makaay. All rights reserved.

Maintained by Marcus Thiesen (marcus@cpan.thiesenweb.de)

This package is free software and is provided as is without express or implied warranty. It may be used, redistributed and/or modified under the same terms as perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CURSES::UI::LABEL (3) 2011-09-01

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.