Gtk2::GladeXML::SimpleGtk2::GladeXML::Simple is a clean object-oriented interface to Gtk2::GladeXML. | |
Download |
Gtk2::GladeXML::Simple Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Marco Antonio Manzo
- Publisher web site:
- http://search.cpan.org/~amnesiac/Gtk2-GladeXML-Simple-0.32/lib/Gtk2/GladeXML/Simple.pm
Gtk2::GladeXML::Simple Tags
Gtk2::GladeXML::Simple Description
Gtk2::GladeXML::Simple is a clean object-oriented interface to Gtk2::GladeXML. Gtk2::GladeXML::Simple is a clean object-oriented interface to Gtk2::GladeXML.SYNOPSIS package MyApp; use base qw( Gtk2::GladeXML::Simple ); sub new { my $class = shift; my $self = $class->SUPER::new( $gladefile ); return $self; } ... # Signal handlers are methods of your class sub on_button_clicked { my $self = shift; # You have access to your widgets directly # or using $self->get_widget( widget_name ) my $button = $self->{button1}; }Gtk2::GladeXML::Simple is a module that provides a clean and easy interface for Gnome/Gtk2 and Glade applications using an object-oriented syntax. You just make Gtk2::GladeXML::Simple your application's base class, have your new call SUPER::new, and the module will do the tedious and dirty work for you.Gtk2::GladeXML::Simple offers:Signal handler callbacks as methods of your class. sub on_button1_clicked { my $self = shift; # $self always received as first parameter ... # do anything you want in a OO fashioned way }Autoconnection of signal handlers.Autocalling of creation functions for custom widgets.Access to the widgets as instance attributes. my $btn = $self->{button1}; # fetch widgets as instance attributes by their names my $window = $self->{main_window}; my $custom = $self->{custom_widget}; Requirements: · Perl
Gtk2::GladeXML::Simple Related Software