File: demo-vbox.pl

package info (click to toggle)
libtickit-widgets-perl 0.42-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 568 kB
  • sloc: perl: 5,636; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl

use v5.20;
use warnings;

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

my $vbox = Tickit::Widget::VBox->new(
   style => {
      spacing => 1,
   },
);

foreach ( 1 .. 6 ) {
   $vbox->add(
      Tickit::Widget::Static->new(
         text => "Row $_",
         style => { bg => $_, fg => "hi-white" },
         align => "centre", valign => "middle",
      ),
      expand => 1,
   )
}

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