NAME
UI::Various::RichTerm::container - abstract helper class for RichTerm's container UI elements
SYNOPSIS
# This module should only be used by the container UI element classes of
# UI::Various::RichTerm!
ABSTRACT
This module provides some helper functions for the container UI elements of the rich terminal UI.
DESCRIPTION
The documentation of this module is only intended for developers of the package itself.
All functions of the module will be included as second "base class" (in @ISA
) like (and instead of) UI::Various::RichTerm::base
.
Attributes
- _active [ro, global]
-
Top-level container elements (windows or dialogues) may contain a reference to an array containing the references to all their active UI elements (those that are accessible, basically everything not just a simple text output). This allows accessing the functions behind the active UI elements.
- _active_index [ro, global]
-
In addition the top-level container elements may also contain a reference to a hash containing the reverse index of that array. This allows any container to access the indices of their own children.
METHODS
The module provides the following common (internal) methods for all UI::Various::RichTerm container UI element classes:
_all_active - gather and return list of active children
my @active = $ui_element->_all_active;
description:
Recursively gather all active children in an array and return it. The top-level window or dialogue will store the final full array and its reverse hash, see _active
and _active_index
above.
returns:
array with active children
_self_destruct - remove children and self-destruct
$ui_element->_self_destruct;
description:
Remove all children (to get rid of possible circular references) and remove itself from "Window Manager" UI::Various::RichTerm::Main
.
SEE ALSO
LICENSE
Copyright (C) Thomas Dorner.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See LICENSE file for more details.
AUTHOR
Thomas Dorner <dorner (at) cpan (dot) org>