require 'gtk3' window = Gtk::Window.new window.signal_connect(:destroy) { Gtk.main_quit } window.show Gtk.main require 'gtk3' class MyWindow < Gtk::Window def initialize super box = Gtk::Box.new(:vertical, spacing = 6) add(box) button = Gtk::Button.new(label: 'Click Me') button.signal_connect('clicked') { on_click_me_clicked } box.pack_start(button) end def on_click_me_clicked puts '"Click me" but