Name
vptk_w::Project - base class for project elements
Synopsis
# general use of top-class
use vptk_w::Project;
my $project = vptk_w::Project->new();
my $project_header = vptk_w::Project::Header->new();
$project->push('Header'=>$project_header);
$project_header->push('perl executable' => $perl_exe);
my $pe = $project_header->get('perl executable');
foreach my $element ( @{$project->elements()} ) {
print OUTPUT $element->print
if $element->can('print');
}
# extended sub-class
my $widgets_data = vptk_w::Project::Widgets->new();
$widgets_data->add($path,$name,$object);
my $data = $widgets_data->get_by_path($path);
Description
The goal of this class is to unify I/O and access operations for
project elements. As 'built-in' feature we allow by-name access
along with order relation between elements.
Typical project consists of:
- Options (perl executable, use strict, all Tk components 'use')
- Widgets (main part of the project)
- Code (user-defined code placed after MainLoop)