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

"Tickit::Widget::Frame" - draw a frame around another widget

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

   my $frame = Tickit::Widget::Frame->new(
      style => { linetype => "single" },
   )
      ->set_child(
         Tickit::Widget::Static->new(
            text   => "Hello, world",
            align  => "centre",
            valign => "middle",
         )
      );

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

This container widget draws a frame around a single child widget.

The default style pen is used as the widget pen. The following style pen prefixes are also used:
frame => PEN
The pen used to render the frame lines

The following style keys are used:

linetype => STRING
Controls the type of line characters used to draw the frame. Must be one of the following names:

 ascii single double thick solid_inside solid_outside
    

The "ascii" linetype is default, and uses only the "-|+" ASCII characters. Other linetypes use Unicode box-drawing characters. These may not be supported by all terminals or fonts.

linetype_top => STRING
linetype_bottom => STRING
linetype_left => STRING
linetype_right => STRING
Overrides the "linetype" attribute for each side of the frame specifically. If two line-drawing styles meet at corners they should be drawn correctly if "Tickit::RenderBuffer" can combine the line segments, but in other circumstances the corners are drawn as extensions of the top or bottom line, and the left and right lines do not meet it.

Any edge's linetype may be set to "none" to cause that edge not to have a line at all; no extra space will be consumed on that side.

   $frame = Tickit::Widget::Frame->new( %args )

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

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

title => STRING
Optional.
title_align => FLOAT|STRING
Optional. Defaults to 0.0 if unspecified.

For more details see the accessors below.

   $title = $frame->title

   $frame->set_title( $title )

Accessor for the "title" property, a string written in the top of the frame.

   $title_align = $frame->title_align

   $frame->set_title_align( $title_align )

Accessor for the "title_align" property. Gives a vlaue in the range 0.0 to 1.0 to align the title in the top of the frame.

See also Tickit::WidgetRole::Alignable.

  • Specific pen for title. Layered on top of frame pen.
  • Caption at the bottom of the frame as well. Identical to title.
  • Consider if it's useful to provide accessors to apply extra padding inside the frame, surrounding the child window.

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.