IWL 0.52

IWL project is a widget library for the web.

  Add it to your Download Basket!

 Add it to your Watch List!


Rate it!
send us
an update
Perl Artistic License 
3.1/5 15
Viktor Kojouharov
ROOT \ Internet \ HTTP (WWW)
1 IWL Screenshot:
IWL project is a widget library for the web.

use IWL;

# create the main container, and a few widgets
my $page = IWL::Page->new;
my $frame = IWL::Frame->new;
my $iconbox = IWL::Iconbox->new
(width => '800px', height => '600px');
my $button = IWL::Button->newFromStock
my %some_icon_info = ("foo.jpg" => 'foo', "bar.png" => 'bar');

# Setting up the icons and adding them to the iconbox
foreach (keys %some_icon_info) {
my $icon = IWL::Iconbox::Icon->new;
$icon->setDimensions('64px', '64px');
$icon->setSelected(1) if $_ == 'something';

$page->appendMetaEquiv("Cache-control" => "no-cache");
$frame->setLabel("Frame label");
# Adding the children to their parents

# Finally printing the page

The IWL includes several widgets with which consistent web pages can be built quickly. The structure resembles the DOM tree, with the API mimicking Javascript very closely. The widgets themselves can be used either as standalone object in an already existing scripts, or can be used to build new scripts from the grounds up. They can be finalized in both HTML markup, and JSON notation, which can be used for scripts. More advanced widgets like the Iconbox come with Javascript files which are automatically included when the widget is finalized as HTML.


The following widgets have so far been written. They have extensive documentation for their methods
IWL::Anchor - An anchor widget ("< a >")
IWL::Break - A break widget ("< br >")
IWL::Button - A graphic button widget
IWL::Canvas - The html5 canvas element ("< canvas >")
IWL::Checkbox - A checkbox widget (checkbox + text)
IWL::Combo - A combobox widget ("< select >")
IWL::Combo::Option - The content of a combobox ("< option >")
IWL::Comment - A widget for placing comments (and conditional comments)
IWL::Container - A basic container widget ("< div >")
IWL::Contentbox - A generic window-like contentbox
IWL::Druid - A step-based druid widget
IWL::Entry - An entry widget with support for icons
IWL::File - A file upload widget ("< input type="file" >")
IWL::Form - A form widget ("< form >")
IWL::Frame - A frame widget ("< fieldset >")
IWL::Hidden - A hidden input object ("< input type="hidden" >")
IWL::Hbox - A container widget for positioning widgets horizontally
IWL::Iconbox - An iconbox widget (holds icons and has keyboard navigation)
IWL::Iconbox::Icon - An icon widget for the iconbox
IWL::Image - An image widget ("< img >")
IWL::Input - A generic input widget ("< input >")
IWL::InputButton - A generic button widget ("< input type="button" >")
IWL::Label - A label widget
IWL::List - A widget for creating bulleted or numbered lists
IWL::List::Definition - A definition list item
IWL::Menu - A menu widget
IWL::Menu::Item - A menu item widget for menus and menubars
IWL::Menubar - A menubar widget
IWL::NavBar - A navigation bar widget
IWL::Notebook - A tab notebook widget
IWL::Notebook::Tab - A tab widget for the notebook
IWL::Page - A page widget, for creating new pages
IWL::Page::Link - A link object for the page widget ("< link >")
IWL::Page::Meta - A meta object for the page widget ("< meta >")
IWL::PageControl - A page control widget for paginating other widgets
IWL::RadioButton - A radiobutton widget (radiobutton + text)
IWL::RPC - A helper class for ajax connections and cgi parameters
IWL::Script - A script object ("< script >")
IWL::Slider - A slider widget
IWL::Stash - A stash class for form information encapsulation
IWL::Stock - A stock object, for buttons and images
IWL::Style - A style object ("< style >")
IWL::SubmitImage - An input image widget ("< input type="image" >")
IWL::Table - A table widget ("< table >")
IWL::Table::Cell - A cell widget for the table row ("< td >", "< th >")
IWL::Table::Row - A row widget for the table ("< tr ">)
IWL::Text - A simple text container
IWL::Textarea - A textarea widget ("< textarea >")
IWL::Tooltip - A tooltip widget
IWL::Tree - A tree widget (has keyboard navigation)
IWL::Tree::Cell - A tree cell widget
IWL::Tree::Row - A tree row widget
IWL::Upload - A theme-able upload widget


Configuration is done by editing the ''iwl.conf'' file. It can be placed in the directory of the scripts that use IWL, or it's full path and name can be fiven in the ''IWL_CONFIG_FILE'' environment variable. A default configuration is provided inside IWL::Config(3pm). See IWL::Config(3pm) for more details
In order to actually use the library, the javascript and css files will also have to be installed in the server's document root. To do that, the 'iwl-install' script is provided. It is usually located in '/usr/bin'. The script also creates a ''iwl.conf'' file from the user input.


· Scalar::Util
· Locale::Messages
· Locale::TextDomain
· HTML::Parser


· In Internet explorer, floats will escape a container with scrollbars, if the positioning on the container is static, or the floats have a relative positioning
· The JSON library used in IWL has a bug where it will incorrectly unescape double quotes. It is preferred to escape potentially dangerous strings beforehand, or not use JSON at all

Last updated on November 23rd, 2007

#web widgets #widget library #DOM tree #IWL #web #widget #library

Add your review!