Skip to content

Instantly share code, notes, and snippets.

@karottenreibe
Created November 20, 2012 13:53
Show Gist options
  • Save karottenreibe/4118073 to your computer and use it in GitHub Desktop.
Save karottenreibe/4118073 to your computer and use it in GitHub Desktop.
An example of old ruby-gtk code
@hbox = Gtk::HBox.new(true, 0)
self.add(@hbox)
@vbox = Gtk::VBox.new(false, 0)
@hbox.pack_start(@vbox, true, true, WIDGET_SPACING)
@image = Gtk::DrawingArea.new
@vbox.pack_start(@image, true, true, WIDGET_SPACING)
@code_text = Gtk::TextView.new
@code_text.set_size_request(200, 200)
@vbox.pack_start(@code_text, false, false, WIDGET_SPACING)
@button = Gtk::Button.new("Run")
@button.signal_connect("clicked") { self.run_code }
@vbox.pack_start(@button, false, false, WIDGET_SPACING)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment