NAME

Tickit::Widget::VHBox - distribute child widgets vertically or horizontally

VERSION

version 0.001

SYNOPSIS

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

my $vbox = Tickit::Widget::VBox->new;

foreach my $position (qw( top middle bottom )) {
   $vbox->add(
      Tickit::Widget::Static->new(
         text   => $position,
         align  => "centre",
         valign => $position,
      ),
      expand => 1
   );
}

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

DESCRIPTION

This subclass of Tickit::Widget::LinearBox distributes its children horizontally if there is room, falling back to a vertical layout if necessary.

INHERITED METHODS

Tickit::Widget::LinearBox

add, child_opts, children, new, remove, render_to_rb, reshape, set_child, set_child_opts

Tickit::ContainerWidget

child_resized, children_changed, find_child, focus_next, window_gained, window_lost

Tickit::Widget

get_style_pen, get_style_text, get_style_values, key_focus_next_after, key_focus_next_before, on_pen_changed, parent, pen, redraw, requested_cols, requested_lines, requested_size, resized, set_parent, set_pen, set_requested_size, set_style, set_style_tag, set_window, style_classes, take_focus, window

STYLE

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.

The following style keys are used:

spacing => INT

The spacing (lines or columns) between children

LICENSE

Almost entirely based on Tickit::Widget::VBox and Tickit::Widget::HBox, see those for more details.

Licensed under the same terms as Perl itself.