hello.pl
来自「基于网络编程的例子」· PL 代码 · 共 32 行
PL
32 行
#!/usr/bin/perl -wuse Gtk;use vars qw($window $button);sub hello { Gtk->print("hello world\n"); destroy $button; destroy $window; exit;}init Gtk;$window = new Gtk::Widget "GtkWindow", GtkWindow::type => -toplevel, GtkWindow::title => "hello world", GtkWindow::allow_grow => 1, GtkWindow::allow_shrink => 1, GtkContainer::border_width => 10;$button = new_child $window "GtkButton", GtkButton::label => "hello world", GtkObject::signal::clicked => "hello", GtkWidget::visible => 1;show $window;main Gtk;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?