there are ruby bindings to libglade.
the glade user interface builder is easy to use and its much more efficient than picturing the interface in your head and writing the code for it, the way i did my last gtk interface.
glade outputs an XML file. libglade interprets this file at runtime to build your interface.
to use the resultant xml file in ruby, use the $ ruby-glade-create-template my_new_ui.glade > my_new_app.rb
Loading the file in IRB, you can see that the glade object gives access to each GTK object in the UI. irb(main):015:0> my_app= BigthreeGlade.new( "bigthree/bigthree.glade", nil, "ya") => #<BigthreeGlade:0xb69cb650 @glade="#<GladeXML:0xb69cb614" ptr="0x80ab4c8">
irb(main):016:0> my_app.glade => #<GladeXML:0xb69cb614 ptr="0x80ab4c8">
irb(main):018:0> my_app.glade.widget_names => ["window1", "hpaned1", "vbox1", "button1", "button2", "button3", "image1"]
Using the array accessor method, you can get access to any of the widgets.
irb(main):019:0> my_app.glade["image1"] => #<Gtk::Image:0xb69c2b90 ptr="0x829cd48">