|$layout-><B>build_TYPEB> ($widget)||<B>B>$widget<B>B> is the actual Gtk2::Ex::FormFactory::Widget, e.g. Gtk2::Ex::FormFactory::Form for <B>build_formB>($form).|
If you like to do more layout things which require to add the primary Gtk2 widget to a container, e.g. a Gtk2::Frame, you must call $widget-><B>set_gtk_parent_widgetB>($gtk_parent_widget) with the most top level container widget.
<B>Note:B> the implemenations of all the FormFactorys widgets expect a specific <B>gtk_widgetB> to be set. If you like to change the primary Gtk widget you need to create your own Gtk2::Ex::FormFactory::Widget for this, because the default implemention most probably wont work with a another Gtk2::Widget.
The second type of methods are so called add-to methods, which place a widget inside a container. The prototye is as follows:
$layout-><B>add_TYPE_to_TYPEB> ($widget, $container) <B>B>$widget<B>B> is the actual Gtk2::Ex::FormFactory::Widget, e.g. Gtk2::Ex::FormFactory::Form for <B>build_formB>($form).
add_form_to_window ( ... ) add_table_to_form ( ... )
This way you can adjust layout at a very detailed level, but you need not. E.g. the implementation of these methods is most likely the same:
add_entry_to_form ( ... ) add_popup_to_form ( ... )
Thats why Gtk2::Ex::FormFactory::Layout knows a default mechanism: if no add-to method is found for a specific widget/container pair, a generic default implementation is used instead. These are named as follows:
add_widget_to_window ( ... ) add_widget_to_form ( ... ) add_widget_to_table ( ... ) add_widget_to_vbox ( ... ) ...
For a new Container you just need to implement the generic <B>add_widget_to_TYPEB> method, and everything will work. If you want to slightly modify the implementation for specific child widgets, you implement only the methods for these and youre done.
For a example for such a specific add-to message refer to <B>add_menu_to_windowB>() which attaches the menu without any space around it. The default of a Gtk2::Ex::FormFactory::Window is to have some spacing, which looks ugly around a menu.
This class has not attributes.
Joern Reder <joern at zyn dot de>
Copyright 2004-2006 by Joern Reder.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.
Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 1275: Non-ASCII character seen before =encoding in Joern. Assuming ISO8859-1
|perl v5.20.3||GTK2::EX::FORMFACTORY::LAYOUT (3)||2011-08-10|