Widget::Meta

Metadata for user interface widgets
Download

Widget::Meta Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • David E. Wheeler
  • Publisher web site:
  • http://search.cpan.org/~dwheeler/

Widget::Meta Tags


Widget::Meta Description

Metadata for user interface widgets Widget::Meta is a Perl module that specifies simple objects that describe UI widgets. The idea is to associate Widget::Meta objects with the attributes of a class in order to automate the generation of UI widgets for instances of the class. At its core, this class a very simple module that stores value and returns them on demand. The assigning of values to its attributes and checking the validity of those attributes happens entirely in the new() constructor. Its attributes are read-only; the options attribute is actually a code reference, the return value of which is returned for every call to the options() accessor.Synopsis use Widget::Meta; my @wms; push @wms, Widget::Meta->new( name => 'foo', type => 'text', tip => 'Fill me in', size => 32, ); push @wms, Widget::Meta->new( name => 'bar', type => 'select', tip => 'Pick a number from 1 to 3', options => , , ], ); # And later, assuming functions for generating UI fields... for my $wm (@wms) { if ($wm->type eq 'text') output_text_field($wm); } elsif ($wm->type eq 'select') { output_select_list($wm); } else { die "Huh, wha?"; } } Requirements: · Perl


Widget::Meta Related Software