Libglade wrapper for Ruby
originally by Avi Bryant <avi@beta4.com>
   (now maintained by Masao Mutoh <mutoh@highway.ne.jp>)

This provides a very simple interface to the libglade library,
to load interfaces dynamically from a glade file.

Installing:

>ruby extconf.rb
>make
>su
>make install

It requires libglade, libglade-gnome, libxml (1.x), and libz.
And it also requires Ruby/GTK, Ruby/GNOME.  
You may have to provide extconf.rb with the paths to these.

If you don't use Ruby/GNOME and GNOME widgets from within your Ruby-libglade
applications, pass the '--disable-gnome' flag to extconf.rb; 
in the status messages that follow, you should see this:

$ ruby extconf.rb --disable-gnome
GNOME support is: disabled.
...

Usage:

The constructor takes the path to a glade file, and optionally the name
of the widget at the root of the desired section of the interface
(by default, the entire file will be loaded).  It expects an iterator
block to be supplied, which takes the name of a handler (as specified
in the glade file) and returns a Method or Proc to bind that handler to.

For example:

	GladeXML.new("file.glade") do |handler|
		case handler
		when "button_clicked"
			proc { |aButton| puts "#{aButton} clicked"}
		when "quit"
			proc {Gtk.main_quit}
		end
	end

Alternatively:

	def button_clicked(aButton)
		puts "#{aButton} clicked"
	end

	def quit
		Gtk.main_quit
	end

	GladeXML.new("file.glade") { |handler| method(handler) }

The other two methods are widget and widget_by_long_name, which will
return a gtk widget object based on the name given to it in the glade
file (widget_by_long_name takes a full widget path to resolve ambiguity).

e.g.

	glade = GladeXML.new("file.glade") {}
	@myEntryBox = glade.widget("entry1")
	@myList = glade.widget_by_long_name("window2.hbox.clist")

A note about signal handlers:

If you're using methods as signal handlers, you need to be somewhat careful
about their arity.  Currently, for 0 argument signals, GladeXML supports
three forms of method: no argument, a single argument (the widget the signal
came from), or two arguments (the widget, and the contents of the data field
for that signal in the glade file).
For signals with one or more arguments (such as select_column),
only one format is supported: (widget, ... args ..., data).

-----------

GladeXML class

instance methods:

initialize(glade_file [, root_widget], &handler_block)
widget(widget_name) -> aWidget
widget_by_long_name(long_widget_name) -> aWidget
