cvs: php-gtk-doc /manual/en/reference/gtk gtkwidget.xml gtkwindow.xml
| From: | Scott Mattocks | Date: | Fri, 17 Jun 2005 19:47:46 +0000 |
| Subject: | cvs: php-gtk-doc /manual/en/reference/gtk gtkwidget.xml gtkwindow.xml | ||
| Groups: | php.gtk.doc | ||
| Request: | Send a blank email to php-gtk-doc+get-1461@lists.php.net to get a copy of this message | ||
scottmattocks Fri Jun 17 15:47:46 2005 EDT
Modified files:
/php-gtk-doc/manual/en/reference/gtk gtkwidget.xml gtkwindow.xml
Log:
Filling in some small pieces.
http://cvs.php.net/diff.php/php-gtk-doc/manual/en/reference/gtk/gtkwidget.xml?r1=1.5&r2=1.6&ty=u
Index: php-gtk-doc/manual/en/reference/gtk/gtkwidget.xml
diff -u php-gtk-doc/manual/en/reference/gtk/gtkwidget.xml:1.5
php-gtk-doc/manual/en/reference/gtk/gtkwidget.xml:1.6
--- php-gtk-doc/manual/en/reference/gtk/gtkwidget.xml:1.5 Thu May 26 18:42:06 2005
+++ php-gtk-doc/manual/en/reference/gtk/gtkwidget.xml Fri Jun 17 15:47:43 2005
@@ -2360,9 +2360,14 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Requests a new size for the widget.
</shortdesc>
<desc>
+ <simpara>
+ Requests that the widget's size be changed to
+ <parameter>width<parameter> pixels wide by
+ <parameter>height<parameter> pixels high.
+ </simpara>
<para>
See also:
<function class="GtkWidget">get_size_request</function>
@@ -2437,10 +2442,19 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Sets a widgets size.
</shortdesc>
<desc>
-
+ <simpara>
+ Requests that the widget's size be changed to
+ <parameter>width<parameter> pixels wide by
+ <parameter>height<parameter> pixels high.
+ </simpara>
+ <note>
+ This method is DEPRECATED. It should not be used in any newly
+ written code and should be phased out of any existing code.
+ Instead used <function class="GtkWidget">set_size_request</function>.
+ </note>
</desc>
</method>
http://cvs.php.net/diff.php/php-gtk-doc/manual/en/reference/gtk/gtkwindow.xml?r1=1.4&r2=1.5&ty=u
Index: php-gtk-doc/manual/en/reference/gtk/gtkwindow.xml
diff -u php-gtk-doc/manual/en/reference/gtk/gtkwindow.xml:1.4
php-gtk-doc/manual/en/reference/gtk/gtkwindow.xml:1.5
--- php-gtk-doc/manual/en/reference/gtk/gtkwindow.xml:1.4 Thu Apr 28 14:10:28 2005
+++ php-gtk-doc/manual/en/reference/gtk/gtkwindow.xml Fri Jun 17 15:47:43 2005
@@ -3,10 +3,54 @@
<classtitle>GtkWindow</classtitle>
<classparent>GtkBin</classparent>
<shortdesc>
-
+ A window which will likely contain the rest of the application.
</shortdesc>
<desc>
-
+ <simpara>
+ A window is the framework that contains the application. It
+ provides a context for the other widgets that make up the
+ application.
+ </simpara>
+ <simpara>
+ As a subclass of <classname>GtkBin</classname> a window may
+ only have one child. To add more widgets to a window first
+ add a widget which can accept more than one child like a
+ <classname>GtkHBox</classname> or a <classname>GtkVBox</classname>.
+ Then add the other widgets to the child container. Trying to
+ add more than one child will produce a warning.
+ </simpara>
+ <para>
+ <example>
+ <title>Adding too many children.</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// Make sure the PHP-GTK 2 extension is loaded.
+if (!extension_loaded('php-gtk')) {
+ dl( 'php_gtk2.' . PHP_SHLIB_SUFFIX);
+}
+
+// Create a new window.
+$window = new GtkWindow();
+
+// Add two buttons.
+$window->add(new GtkButton('1'));
+$window->add(new GtkButton('2'));
+
+/*
+Spits out:
+Gtk-WARNING **: Attempting to add a widget with type GtkButton to a GtkWindow, but as a GtkBin
subclass a GtkWindow can only contain one widget at a time; it already contains a widget of type
GtkButton
+*/
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <simpara>
+ <classname>GtkWindow</classname> is a top level widget. This
+ means that it may not be added as a child of another widget.
+ Trying to do so will produce a Gtk-WARNING.
+ </simpara>
</desc>
</classmeta>