Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > ca81b57b553ae75608ba0fc5e7925e4e > files > 284

libgtkmm1.2-devel-1.2.10-1mdk.ppc.rpm

<html>
<head><title>Gtk-- Reference: Gtk::Box</title></head>

<body bgcolor="#F0F0F0" text="#000000" link="#0000FF"
vlink="#000077" alink="#FF0000">
<table align=center border=0 cellspacing=10> <tr>
<td><a href="class_index.html">Class Index</a></td>
<td><a href="cross_index.html">Cross Index</a></td>
<td><a href="name_index.html">Namespace Index</a></td>
</table>
<h1 align=center>Class Gtk::Box</h1><p>
<b>  Abstract base class for horizontal and vertical boxes</b><br>
Contained in: <a href="Gtk.html">Gtk</a><br>
Derived from:
<a href="Gtk%3A%3AContainer.html">Gtk::Container</a>
<br>
Derived by:
<a href="Gtk::ButtonBox.html">Gtk::ButtonBox</a>
<a href="Gtk::HBox.html">Gtk::HBox</a>
<a href="Gtk::VBox.html">Gtk::VBox</a>
<p>
#include &lt;gtk--/box.h&gt;
<p>
<hr noshade>
<table border=0>
<tr><td colspan=3><h3>public function member index:</h3></td>
<tr valign=top><td align=right><tt><a href="Gtk%3A%3ABox.html#318">BoxList</a>&</tt> </td><td align=right><a href="Gtk%3A%3ABox.html#324"><tt><font color=blue><b>children</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt>const</tt> <a href="Gtk%3A%3ABox.html#318">BoxList</a>&</tt> </td><td align=right><a href="Gtk%3A%3ABox.html#325"><tt><font color=blue><b>children</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=navy>GtkBox</font></tt>*</tt> </td><td align=right><a href="Gtk%3A%3ABox.html#314"><tt><font color=blue><b>gtkobj</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt>const</tt> <tt><font color=navy>GtkBox</font></tt>*</tt> </td><td align=right><a href="Gtk%3A%3ABox.html#315"><tt><font color=blue><b>gtkobj</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>static</tt> <tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="Gtk%3A%3ABox.html#316"><tt><font color=blue><b>isA</b></font></tt></a></td><td><tt>(<a href="Gtk%3A%3AObject.html"><tt><font color=navy><b>Object</b></font></tt></a>* <tt><font color=blue>object</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3ABox.html#320"><tt><font color=blue><b>pack_end</b></font></tt></a></td><td><tt>(<a href="Gtk%3A%3AWidget.html"><tt><font color=navy><b>Widget</b></font></tt></a>& <tt><font color=blue>child</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>expand</font></tt>=true, <tt><font color=purple>bool</font></tt> <tt><font color=blue>fill</font></tt>=true, <tt><font color=purple>guint</font></tt> <tt><font color=blue>padding</font></tt>=0)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3ABox.html#319"><tt><font color=blue><b>pack_start</b></font></tt></a></td><td><tt>(<a href="Gtk%3A%3AWidget.html"><tt><font color=navy><b>Widget</b></font></tt></a>& <tt><font color=blue>child</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>expand</font></tt>=true, <tt><font color=purple>bool</font></tt> <tt><font color=blue>fill</font></tt>=true, <tt><font color=purple>guint</font></tt> <tt><font color=blue>padding</font></tt>=0)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3ABox.html#323"><tt><font color=blue><b>reorder_child</b></font></tt></a></td><td><tt>(<a href="Gtk%3A%3AWidget.html"><tt><font color=navy><b>Widget</b></font></tt></a>& <tt><font color=blue>child</font></tt>, <tt><font color=purple>gint</font></tt> <tt><font color=blue>pos</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3ABox.html#321"><tt><font color=blue><b>set_homogeneous</b></font></tt></a></td><td><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>homogeneous</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3ABox.html#322"><tt><font color=blue><b>set_spacing</b></font></tt></a></td><td><tt>(<tt><font color=purple>gint</font></tt> <tt><font color=blue>spacing</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> </tt> </td><td align=right><a href="Gtk%3A%3ABox.html#317"><tt><font color=blue><b>~Box</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr><td>&nbsp;</td><tr><td colspan=3><h3>protected function member index:</h3></td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="Gtk%3A%3ABox.html#326"><tt><font color=blue><b>Box</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr><td>&nbsp;</td></table>
<hr noshade>
<h2>Description:</h2>
  <tt><a href="Gtk.html"><tt><font color=navy><b>Gtk</b></font></tt></a>::<a href="Gtk%3A%3ABox.html"><tt><font color=navy><b>Box</b></font></tt></a></tt> is an abstract class and it defers choice of which
  way the widgets are packed to the screen to the derived classes.
  <tt><a href="Gtk.html"><tt><font color=navy><b>Gtk</b></font></tt></a>::<a href="Gtk%3A%3ABox.html"><tt><font color=navy><b>Box</b></font></tt></a></tt> provides common interface for inserting widgets
  to a box indepenently of how it is shown in the screen.
<P>
  The most common use of <tt><a href="Gtk.html"><tt><font color=navy><b>Gtk</b></font></tt></a>::<a href="Gtk%3A%3ABox.html"><tt><font color=navy><b>Box</b></font></tt></a></tt> is like this:
  <pre>
  class mywindow : public Gtk_Window {
     Gtk_Label label1,label2;
     Gtk_VBox vbox;
  public:
     mywindow();
  };
  mywindow::mywindow()
  {
     add(vbox);
     vbox.pack_end(label1, true, true, 0);
     vbox.pack_end(label2, true, true, 0);
  }
<P>
  </pre><br>
<p>
<hr noshade>
<h2>Function Member Descriptions:</h2>
<a name="314"><font size=+1><b>Gtk::Box::gtkobj</b></font></a> -   Returns the underlaying gtk+ object.<br>
<hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=navy>GtkBox</font></tt>*</tt> <a href="Gtk%3A%3ABox.html#314"><tt><font color=blue><b>gtkobj</b></font></tt></a><tt>()</tt>;<br><br>
<a name="316"><font size=+1><b>Gtk::Box::isA</b></font></a> -   Returns true if object is this type.<br>
<hr size="1" width="70%" align="left" noshade="noshade"><tt><tt>static</tt> <tt><font color=purple>bool</font></tt></tt> <a href="Gtk%3A%3ABox.html#316"><tt><font color=blue><b>isA</b></font></tt></a><tt>(<a href="Gtk%3A%3AObject.html"><tt><font color=navy><b>Object</b></font></tt></a>* <tt><font color=blue>object</font></tt>)</tt>;<br><br>
<a name="320"><font size=+1><b>Gtk::Box::pack_end</b></font></a> -   right side insert a widget to a box.<br>
<hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3ABox.html#320"><tt><font color=blue><b>pack_end</b></font></tt></a><tt>(<a href="Gtk%3A%3AWidget.html"><tt><font color=navy><b>Widget</b></font></tt></a>& <tt><font color=blue>child</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>expand</font></tt>=true, <tt><font color=purple>bool</font></tt> <tt><font color=blue>fill</font></tt>=true, <tt><font color=purple>guint</font></tt> <tt><font color=blue>padding</font></tt>=0)</tt>;<br><br>
<a name="319"><font size=+1><b>Gtk::Box::pack_start</b></font></a> -   left side insert a widget to a box.<br>
<hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3ABox.html#319"><tt><font color=blue><b>pack_start</b></font></tt></a><tt>(<a href="Gtk%3A%3AWidget.html"><tt><font color=navy><b>Widget</b></font></tt></a>& <tt><font color=blue>child</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>expand</font></tt>=true, <tt><font color=purple>bool</font></tt> <tt><font color=blue>fill</font></tt>=true, <tt><font color=purple>guint</font></tt> <tt><font color=blue>padding</font></tt>=0)</tt>;<br><blockquote>  The expand argument to <a href="Gtk%3A%3ABox.html#319"><tt><font color=blue><b>pack_start</b></font></tt></a> or <a href="Gtk%3A%3ABox.html#320"><tt><font color=blue><b>pack_end</b></font></tt></a>
  controls whether the widgets are laid out in the box to <tt><tt><font color=blue>fill</font></tt></tt> in all
  the extra space in the box so the box is expanded to fill the area
  alloted to it (<tt><font color=black><b>true</b></font></tt>). Or the box is shrunk to just fit the widgets
  (<tt><font color=black><b>false</b></font></tt>).  Setting <tt><tt><font color=blue>expand</font></tt></tt> to <tt><font color=black><b>false</b></font></tt> will allow you
  to do right and left
  justifying of your widgets.  Otherwise, they will all expand to fit in
  the box, and the same effect could be achieved by using only one of
  <a href="Gtk%3A%3ABox.html#319"><tt><font color=blue><b>pack_start</b></font></tt></a> or <a href="Gtk%3A%3ABox.html#320"><tt><font color=blue><b>pack_end</b></font></tt></a> functions.
<P>
  The fill argument to the <a href="Gtk%3A%3ABox.html#319"><tt><font color=blue><b>pack_start</b></font></tt></a>/<a href="Gtk%3A%3ABox.html#320"><tt><font color=blue><b>pack_end</b></font></tt></a> functions control whether the
  extra space is allocated to the objects themselves (<tt><font color=black><b>true</b></font></tt>), or as extra
  padding in the box around these objects (<tt><font color=black><b>false</b></font></tt>). It only has an effect
  if the <tt><tt><font color=blue>expand</font></tt></tt> argument is also <tt><font color=black><b>true</b></font></tt>.
<P>
  The difference between spacing (set when the box is created)
  and <tt><tt><font color=blue>padding</font></tt></tt> (set when elements are packed), spacing is added between
  objects, and <tt><tt><font color=blue>padding</font></tt></tt> is added on either side of an object.</blockquote>
<br><br>
<a name="323"><font size=+1><b>Gtk::Box::reorder_child</b></font></a> -   Reorder children by integer index.<br>
<hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3ABox.html#323"><tt><font color=blue><b>reorder_child</b></font></tt></a><tt>(<a href="Gtk%3A%3AWidget.html"><tt><font color=navy><b>Widget</b></font></tt></a>& <tt><font color=blue>child</font></tt>, <tt><font color=purple>gint</font></tt> <tt><font color=blue>pos</font></tt>)</tt>;<br><br>
<a name="321"><font size=+1><b>Gtk::Box::set_homogeneous</b></font></a> -   Change box child sizing policy.<br>
<hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3ABox.html#321"><tt><font color=blue><b>set_homogeneous</b></font></tt></a><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>homogeneous</font></tt>)</tt>;<br><blockquote>  allows setting homongeneous afterwards. This is usually given on
  <a href="Gtk%3A%3AVBox.html#334"><tt><font color=blue><b>VBox</b></font></tt></a> or <a href="Gtk%3A%3AHBox.html#342"><tt><font color=blue><b>HBox</b></font></tt></a></blockquote>
<br><br>
<a name="322"><font size=+1><b>Gtk::Box::set_spacing</b></font></a> -   Change spacing between children.<br>
<hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3ABox.html#322"><tt><font color=blue><b>set_spacing</b></font></tt></a><tt>(<tt><font color=purple>gint</font></tt> <tt><font color=blue>spacing</font></tt>)</tt>;<br><br>
<hr noshade>
</html>