GtkSimpleLayout ==

The GtkSimpleLayout is a helper module for RubyGnome2, it provides a builder style layout producing much better readable UI codes.

Copy Right 2009, Ricky Zheng <[email protected]>

Licence: GPLv2

Main functions ==

  • builder-style layout

  • UI group

  • attribute proxy

  • event handler map

  • sigleton event helper

  • component reference by name

  • inspector

About inspector:

- set environment variable INSPECTOR_ENABLE=1 will enable inspector
- inspector boxes border width can be setup by e.g. INSPECTOR_BORDER_WIDTH=5

Example ==

require ‘gtk2’ require ‘simple_layout’

class MyWin < Gtk::Window

include SimpleLayout::Base
def initialize
  super
  add my_layout
  signal_connect('destroy') do
    Gtk.main_quit
  end
end

def my_layout
  vbox do
    label 'Hello'
    button 'World !'
  end
end

end

MyWin.new.show_all Gtk.main