Create a new, self-drawing widget in Perl code. This example shows how to subclass Glib::Object/Gtk2::Widget types, how to override class closures, how to define how much size you want to request for yourself, how to draw shapes and text with Gdk, how to handle mouse events, why you'd want to implement SET_PROPERTY for yourself, and how to emit signals. And the widget is actually functional, too. :-)
1 POD Error
The following errors were encountered while parsing the POD:
Unknown directive: =doc
To install Gtk2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gtk2
CPAN shell
perl -MCPAN -e shell install Gtk2
For more information on module installation, please visit the detailed CPAN module installation guide.