TVision - Perl glue to the TurboVision library
SYNOPSIS
use TVision;
my $tapp = tnew 'TVApp';
my $w = tnew 'TWindow', [1,1,120,15], 'моё окно, товарищи',5;
my $b = tnew 'TButton', [1,1,30,3], 'кнопка', 125, 0;
my $checkboxes = tnew 'TCheckBoxes', [3,3,81,9], ['a'..'s'];
my $e = tnew TInputLine => ([3,11,81,13],100);
$tapp->deskTop->insert($w);
$w->insert($_) for ($checkboxes, $e, $b);
$e->focus();
$tapp->run;
DESCRIPTION
The TVision package is a perl glue to the TurboVision library github.com/magiblot/tvision.
TVision namespace contains subpakages of 2 types: * turbovision widgets (or 'controls') such as TButton, etc * and also some helper packages, these are: ..........
All the TVision::xxxx widgets are array refs, where first item at index 0 holds address of the underlying C++ object, 2nd ($obj->[1]) generated widget name, 3rd - its path.
Some widgets (TButton) has 'num' key, which is usually small integer for the onCommand event. If 0 - then next availlable is taken.
TRect is array ref of 4 integers, which isn't always blessed to TVision::TRect. TPoint is array ref of 2 integers, which isn't always blessed to TVision::TPoint. TKey is array ref of 2 integers or just integer.
Geometry managers
Geometry manager tkpack stolen/hijacked from tcl/tk. In order for it to function properly, each widget gets its name ("path") TDesktop is '.', frame on it is .f, buttin on it could be named as .f.btn2, etc. Ideally widget's name is either specified by user, or generated on the fly at creation time. However we don't know who is widget's parent until it is "inserted" by the ...->insert method.
We hold widget's path in widget object, which is array ref, at item 2.
Mapping of widget names to correspoiding objects is held in %TVision::names, widget paths in %TVision::paths.