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
Tickit::Widget::Static(3) User Contributed Perl Documentation Tickit::Widget::Static(3)

"Tickit::Widget::Static" - a widget displaying static text

   use Tickit;
   use Tickit::Widget::Static;

   my $hello = Tickit::Widget::Static->new(
      text   => "Hello, world",
      align  => "centre",
      valign => "middle",
   );

   Tickit->new( root => $hello )->run;

This class provides a widget which displays a single piece of static text. The text may contain more than one line, separated by linefeed ("\n") characters. No other control sequences are allowed in the string.

The default style pen is used as the widget pen.

Note that while the widget pen is mutable and changes to it will result in immediate redrawing, any changes made will be lost if the widget style is changed.

   $static = Tickit::Widget::Static->new( %args )

Constructs a new "Tickit::Widget::Static" object.

Takes the following named arguments in addition to those taken by the base Tickit::Widget constructor:

text => STRING
The text to display
align => FLOAT|STRING
Optional. Defaults to 0.0 if unspecified.
valign => FLOAT|STRING
Optional. Defaults to 0.0 if unspecified.
on_click => CODE
Optional. Defaults to "undef" if unspecified.

For more details see the accessors below.

   $text = $static->text

   $static->set_text( $text )

Accessor for "text" property; the actual text on display in the widget

   $align = $static->align

   $static->set_align( $align )

Accessor for horizontal alignment value.

Gives a value in the range from 0.0 to 1.0 to align the text display within the window. If the window is larger than the width of the text, it will be aligned according to this value; with 0.0 on the left, 1.0 on the right, and other values inbetween.

See also Tickit::WidgetRole::Alignable.

Paul Evans <leonerd@leonerd.org.uk>
2022-04-07 perl v5.32.1

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

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