cvs: php-gtk-doc /examples/reference/gtk/gtkbox start_vs_end.phpw /images/reference/gtk gtkbox.pack_start_end.png /manual/en/reference/gtk
gtkbox.xml

From: Date: Mon, 31 Oct 2005 12:27:22 +0000
Subject: cvs: php-gtk-doc /examples/reference/gtk/gtkbox start_vs_end.phpw /images/reference/gtk gtkbox.pack_start_end.png /manual/en/reference/gtk
gtkbox.xml
Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-1595@lists.php.net to get a copy of this message
cweiske Mon Oct 31 07:27:22 2005 EDT Added files: /php-gtk-doc/examples/reference/gtk/gtkbox start_vs_end.phpw /php-gtk-doc/images/reference/gtk gtkbox.pack_start_end.png Modified files: /php-gtk-doc/manual/en/reference/gtk gtkbox.xml Log: Difference between pack_start and pack_end http://cvs.php.net/diff.php/php-gtk-doc/manual/en/reference/gtk/gtkbox.xml?r1=1.4&r2=1.5&ty=u Index: php-gtk-doc/manual/en/reference/gtk/gtkbox.xml diff -u php-gtk-doc/manual/en/reference/gtk/gtkbox.xml:1.4 php-gtk-doc/manual/en/reference/gtk/gtkbox.xml:1.5 --- php-gtk-doc/manual/en/reference/gtk/gtkbox.xml:1.4 Mon Oct 31 06:40:20 2005 +++ php-gtk-doc/manual/en/reference/gtk/gtkbox.xml Mon Oct 31 07:27:22 2005 @@ -58,32 +58,55 @@ <paramdef>GtkWidget <parameter>child</parameter></paramdef> <paramdef>bool <parameter><optional>expand = TRUE</optional></parameter></paramdef> <paramdef>bool <parameter><optional>fill = TRUE</optional></parameter></paramdef> - <paramdef>int <parameter><optional>padding = TRUE</optional></parameter></paramdef> + <paramdef>int <parameter><optional>padding = 0</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Adds a widget to the box in the next available position starting from the + end. </shortdesc> <desc> <simpara> - See also: - <function class="GtkBox">pack_start</function> + Adds <parameter>child</parameter> to the box starting from the end. See + <function class="GtkBox">pack_start</function> for the parameter + description. </simpara> - </desc> - </method> - <method id="gtk.gtkbox.method.pack_end_defaults"> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pack_end_defaults</function></funcdef> - <paramdef>GtkWidget <parameter>widget</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <shortdesc> - Deprecated. Remove from documentation. - </shortdesc> - <desc> + <para> + The difference between <function class="GtkBox">pack_start</function> and + <function class="GtkBox">pack_end</function> can be explained with curtains: + <literal>pack_start</literal> adds the widgets from the left side of the box, + and <literal>pack_end</literal> does the same, but from the right side. The + more widgets you add, the more of the free space of the "window" between the + curtains is taken by the widgets. If the box is full, the "curtains" meet + in the center. + </para> + + <simpara> + The buttons in the following image have been packed one after the other + in numerical order: Button 1 first, Button 5 at last. You see that + they are in order when using <function class="GtkBox">pack_start</function>, + but turned order when with <function class="GtkBox">pack_end</function> as + places are taken from the end. + </simpara> + + <graphic fileref="&directory.images;/reference/gtk/gtkbox.pack_start_end.png"/> + + <example> + <title>pack_start versus pack_end</title> + <programlisting role="php"> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="&directory.examples;/reference/gtk/gtkbox/start_vs_end.phpw" parse="text"> + <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback> + </xi:include> + </programlisting> + </example> + + <simpara> + See also: + <function class="GtkBox">pack_start</function> + </simpara> </desc> </method> @@ -155,21 +178,6 @@ </desc> </method> - <method id="gtk.gtkbox.method.pack_start_defaults"> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>pack_start_defaults</function></funcdef> - <paramdef>GtkWidget <parameter>widget</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <shortdesc> - Deprecated. Remove from documentation. - </shortdesc> - <desc> - - </desc> - </method> - <method id="gtk.gtkbox.method.query_child_packing"> <funcsynopsis> <funcprototype> http://cvs.php.net/co.php/php-gtk-doc/examples/reference/gtk/gtkbox/start_vs_end.phpw?r=1.1&p=1 Index: php-gtk-doc/examples/reference/gtk/gtkbox/start_vs_end.phpw +++ php-gtk-doc/examples/reference/gtk/gtkbox/start_vs_end.phpw <?php /** * Demonstrates the difference between pack_start and pack_end * by adding several buttons to a GtkVBox with pack_start * and pack_end */ //That's our demo box. All buttons are added here $box = new GtkVBox(); //Add the first button. Note that we pack_end is used //here. This one will be the last button on the box $box->pack_end(new GtkButton('pack_end #1', false)); //Add the first button with pack_start. It will be the first //on the box, although it's added at second. $box->pack_start(new GtkButton('pack_start #1', false)); //Add the second button with pack_start. It will be number //2, directly after the first button added with pack_start $box->pack_start(new GtkButton('pack_start #2', false)); //This fourth button will be at position 3 in the box: //After all button which have been added with pack_start, //but before the previous one added with pack_end. $box->pack_end(new GtkButton('pack_end #2', false)); //Initialize the window and add the demo box $wnd = new GtkWindow(); $wnd->set_title('pack_start vs. pack_end'); $wnd->connect_simple('destroy', array('gtk', 'main_quit')); $wnd->add($box); $wnd->show_all(); Gtk::main(); ?>

« previous php.gtk.doc (#1595) next »