App-ErrorCalculator
view release on metacpan or search on metacpan
lib/App/ErrorCalculator.pm view on Meta::CPAN
# When the window is given the "delete_event" signal (this is given
# by the window manager, usually by the "close" option, or on the
# titlebar), we ask it to call the delete_event () functio
# as defined above. No data is passed to the callback function.
$window->signal_connect(delete_event => \&_delete_event);
# Here we connect the "destroy" event to a signal handler.
# This event occurs when we call Gtk2::Widget::destroy on the window,
# or if we return FALSE in the "delete_event" callback. Perl supports
# anonymous subs, so we can use one of them for one line callbacks.
$window->signal_connect(destroy => sub { Gtk2->main_quit; });
my $table = Gtk2::Table->new(5, 4, FALSE);
$window->add($table);
# Labels
my $l = Gtk2::Label->new('Function:');
$table->attach_defaults(
$l, 0, 1, # left/right
1, 2, # top/bottom
( run in 0.269 second using v1.01-cache-2.11-cpan-8d75d55dd25 )