Added some hexadecimal display capabilities to aclox ascii clock
[mirrors/Programs.git] / misc / multiplatform-ui / hello.pl
CommitLineData
21c4e167
H
1#!/usr/bin/env perl
2#GTK Hello world! by Harvie 2oo9
3
4use strict;
5use warnings;
6use utf8;
7use Gtk2 qw(-init);
8
9my $builder = Gtk2::Builder->new();
10$builder->add_from_file('hello.ui');
11
12my %widgets;
13foreach my $widget qw(window1 button1 entry1)
14{
15 $widgets{$widget}=$builder->get_object($widget);
16}
17
18$builder->connect_signals( undef );
19$builder = undef;
20
21$widgets{'window1'}->show();
22
23Gtk2->main();
24exit;
25
26sub on_window1_destroy
27{
28 Gtk2->main_quit();
29}
30
31sub on_button1_clicked
32{
33 $widgets{'button1'}->set_label($widgets{'entry1'}->get_text());
34 print $widgets{'entry1'}->get_text()."\n";
35}
36
37
38
This page took 0.306607 seconds and 4 git commands to generate.