Term::Stool::Container
Term::Stool::CoUsernContributed Perl DocTerm::Stool::Container(r)



NAME
       Term::Stool::Container - container widget

DESCRIPTION
       This is a base class for any type of widget that can con-
       tain other widgets.

       Term::Stool::Widget is the parent of this class.

FIELDS
       contents
           A reference to a list of the widgets inside this one.

       leftborder
           The width of the left border of the container. Used to
           make widgets inside the container be offset off the
           border.

       rightborder
           The width of the right border of the container.

       topborder
           The height of the top border of the container.

       bottomborder
           The height of the bottom border of the container.

METHODS
       init
           Initializes all fields listed above to reasonable
           defaults.

       add Add the passed widgets to my contents, also updating
           their container fields.

       remove
           Remove the passed widget from my contents.

       clear
           Clear out all my contents.

       display
           Ask all elements inside this one to display them-
           selves. If active, display the active element last, so
           it can have the cursor positioned over it.

       resize
           Ask all elements inside this one to resize themselves.

       keypress
           Traps tab and all arrow keys, and uses them to change
           the focus from one object in the container to the
           next.

           Feeds any other keypresses it gets through any HotKey
           widgets that are inside the container.

           If the keypress has still not been handled, it is
           passed up to the enclosing container.

       move_focus
           Move the focus backward or forward by one widget.

           If a positive value is passed, move focus forward. A
           mositive value means move focus forward.

       move_focus_fallback
           Called if move_focus fails to find a widget to focus.
           The default behavior is to move the focus out of the
           current container, and into the container enclosing
           it.

           Containers may override this if they prefer to do
           something else, like loop focus.

       activate
           If this is called in an attempt to make the container
           itself active (with no second parameter), the first
           widget inside the container is made active.

           More commonly, this is called when a widget inside the
           container becomes active. That means the container
           should become active too, if it isn't already.

           If the container is already active, we have reached
           the top of the ripple display effect that making the
           widget active caused. So the widget needs to be
           redrawn, but the container does not. This miminizes
           redraws.

           It also always propigates the activation up to the
           next container, so the next container can update its
           active field as well.

AUTHOR
       Joey Hess <joey@kitenet.net>



2001-05-23                 perl v5.6.1  Term::Stool::Container(r)