UI::Various::RichTerm::container - abstract helper class for RichTerm's container UI elements
# This module should only be used by the container UI element classes of # UI::Various::RichTerm!
This module provides some helper functions for the container UI elements of the rich terminal UI.
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.
@ISA
UI::Various::RichTerm::base
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.
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.
The module provides the following common (internal) methods for all UI::Various::RichTerm container UI element classes:
my @active = $ui_element->_all_active;
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.
_active
_active_index
array with active children
$ui_element->_self_destruct;
Remove all children (to get rid of possible circular references) and remove itself from "Window Manager" UI::Various::RichTerm::Main.
UI::Various::RichTerm::Main
UI::Various
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.
Thomas Dorner <dorner (at) cpan (dot) org>
To install UI::Various, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UI::Various
CPAN shell
perl -MCPAN -e shell install UI::Various
For more information on module installation, please visit the detailed CPAN module installation guide.