File: simple7.pl

package info (click to toggle)
libgtk-perl 0.1.17-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,352 kB
  • ctags: 1,100
  • sloc: ansic: 4,393; perl: 3,463; makefile: 36
file content (23 lines) | stat: -rw-r--r-- 414 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use Gtk;

init Gtk::Gnome "App_id";

$app = new Gtk::Gnome::App "appname", "title";

$button = new Gtk::Button "button";

$button->signal_connect (clicked => sub {
	my($w) = new Gtk::Gnome::MessageBox "message", "messagebox_type", "button1", "button2";
	$w->signal_connect(clicked => sub {
		print "Button $_[1] clicked\n";
	});
	#$w->set_modal;
	show $w;
});

$app->set_contents($button);

show $app;

main Gtk;