Created
June 16, 2015 01:39
-
-
Save anonymous/58bd927178eb59699da8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ruby | |
require 'gtk3' | |
class RubyApp < Gtk::Window | |
def initialize | |
super | |
grid = Gtk::Grid.new | |
grid.set_property "row-homogeneous", true | |
grid.set_property "column-homogeneous", true | |
grid.attach Gtk::Button.new(:label => "Information"), 0, 0, 1, 1 | |
grid.attach Gtk::Button.new(:label => "Software"), 1, 0, 1, 1 | |
grid.attach Gtk::Button.new(:label => "Maintenance"), 2, 0, 1, 1 | |
grid.attach exitbutton = Gtk::Button.new(:label => "Exit"), 3, 0, 1, 1 | |
exitbutton.signal_connect "clicked" do | |
Gtk.main_quit | |
end | |
add grid | |
set_title "Prototype" | |
signal_connect "destroy" do | |
Gtk.main_quit | |
end | |
set_default_size 300, 100 | |
set_window_position(Gtk::Window::Position::CENTER) | |
show_all | |
end | |
end | |
Gtk.init | |
window = RubyApp.new | |
Gtk.main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment