ruby-****@sourc*****
ruby-****@sourc*****
2004年 4月 28日 (水) 11:35:03 JST
------------------------- REMOTE_ADDR = 128.88.255.106 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp//?Ruby%2FLibglade ------------------------- - = Class GladeXML - The Ruby binding to libglade. - - == Class Functions - --- GladeXML.new(fname, root = nil, domain = nil) {|handler| ... } - Creates a new GladeXML object (and the corresponding widgets) from the XML file fname. - Optionally it will only build the interface from the widget node root (if it is not nil). - This feature is useful if you only want to build say a toolbar or menu from the XML file, but not the window it is embedded in. - Note also that the XML parse tree is cached to speed up creating another GladeXML object for the same file - - The additional block is connected to all signal handlers. - It recieves the signal handler name as the only argument. - A common block is - - {|handler| method(handler)} - - which calls the method with the same name as the signal handler. - * fname: the XML file name. - * root: the widget node in fname to start building from. - * domain: the translation domain for the XML file. - * Returns: a GladeXML instance - - --- GladeXML.require(library) - Ensure that a required library is available. - If it is not already available, libglade will attempt to dynamically load a module that contains the handlers for that library. - * library: the required library. - * Returns: self - - --- GladeXML.provide(library) - This function should be called by a module to assert that it provides wrappers for a particular library. - This should be called by the register_widgets() function of a libglade module so that it isn't loaded twice, for instance. - * library: the provided library. - * Returns: self - - --- GladeXML.set_custom_widget_handler(setting) - Turns the custom widget handler on or off. This is internal use only. - * setting: true or false - * Returns: self - - == Instance Functions - --- get_widget(name) - This function is used to get a reference to the Gtk::Widget corresponding to name in the interface description. - You would use this if you have to do anything to the widget after loading. - * name: the widget's name in the glade tree. - * Returns: a reference(Gtk::Widget) to name or nil if name does not exist - - --- [name] - This is the same as get_widget(name). - * name: the widget's name in the glade tree. - * Returns: a reference(Gtk::Widget) to name or nil if name does not exist - - --- filename - Gets the name of the original XML file. - * Returns: the name of the glade file - - * 2004-04-27 Revised some methods. ((<Masao>)) - * 2004-04-24 Initial release. ((<jawebada>)) + = Ruby/Libglade API Reference + * GladeXML