Curses::UI::Container(3pm) User Contributed Perl Documentation Curses::UI::Container(3pm)

Curses::UI::Container - Create and manipulate container widgets

 Curses::UI::Widget
    |
    +----Curses::UI::Container

    use Curses::UI;
    my $cui = new Curses::UI;
    my $win = $cui->add('window_id', 'Window');
    my $container = $win->add(
        'mycontainer', 'Container'
    );
    $container->add(
        'contained', 'SomeWidget',
        .....
    );
    $container->focus();

A container provides an easy way of managing multiple widgets in a single "form". A lot of Curses::UI functionality is built around containers. The main class Curses::UI itself is a container. A Curses::UI::Window is a container. Some of the widgets are implemented as containers.

-parent, -x, -y, -width, -height, -pad, -padleft, -padright, -padtop, -padbottom, -ipad, -ipadleft, -ipadright, -ipadtop, -ipadbottom, -title, -titlefullwidth, -titlereverse, -onfocus, -onblur

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

-releasefocus

If this option is set, the widgets inside this Container will be part of the focus ordering of the parent widget. This means that when this Container gets the focus, its first widget will be focused. When the focus leaves the last widget inside the Container it will give the focus back to the parent instead of cycling back to the first widget in this Container. This option is useful to create a sub-class packed with common used widgets, making the reuse easier.

Since interacting is not handled by the container itself, but by the contained widgets, this class does not have any key bindings.

Curses::UI,

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.

2021-01-01 perl v5.32.0