Etk::Simple - Simplified function calls for Etk
use Etk::Simple; use Etk::Stock qw/:all/; my $button = Etk::Button->new(); my $button_with_label = Etk::Button->new("This is a label"); my $button_from_stock = Etk::Button->new(DocumentNew);
Many widgets in Etk have different constructors and require different calls for each type of constructor.
This module tries to simplify this process by providing a single "new" constructor that, depending on the number and type of arguments, calls the required C constructor.
The following are the widgets that have had their constructors overloaded. For each widget we list the type/number of arguments it accepts
undef - creates an empty button string - creates a button with a label number - creates a button from stock
undef - creates an empty checkbutton string - creates a checkbutton with a label
undef - creates an empty image number,number - creates an image from stock with a stock size string,string - creates an image from edje with key string - creates an image from file
undef - creates empty menu item number - creates menu item from stock string - creates menu item with label
undef - creates empty menu item string - creates menu item with label
undef - creates empty menu item object - creates menu item from the specified object string - creates menu item with label string,object - creates menu item with label from the specified object
undef - creates empty progressbar string - creates a progressbar with text
undef - creates empty radio button object - creates radio button from the specified object string - creates radio button with label string,object - creates radio button with label from the specified object
undef - creates empty tool button number - creates tool button from stock string - creates tool button with label
undef - creates empty tool togglebutton number - creates tool togglebutton from stock string - creates tool togglebutton with label
undef - creates empty togglebutton number - creates togglebutton from stock string - creates togglebutton with label
Since this module redefines the new() subroutines, it includes a `no warnings 'redefine'` to remove warnings.
Chady 'Leviathan' Kassouf, <chady.kassouf@gmail.com>
Copyright (C) 2007 by Chady Kassouf
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
To install Etk, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Etk
CPAN shell
perl -MCPAN -e shell install Etk
For more information on module installation, please visit the detailed CPAN module installation guide.