GtkSimpleLayout ==

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

Copyright 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 ‘gtk3’ 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
  _box :vertical do
    _label 'Hello'
    _button 'World !'
  end
end

end

MyWin.new.show_all Gtk.main