cvs: php-gtk /docs/en/classes gtkwindow.xml

From: Date: Wed, 07 Mar 2001 14:53:25 +0000
Subject: cvs: php-gtk /docs/en/classes gtkwindow.xml
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-472@lists.php.net to get a copy of this message
jmoore Wed Mar 7 06:53:25 2001 EDT Added files: /php-gtk/docs/en/classes gtkwindow.xml Log: Adding an outline doc for how Classes "should" be documentated. Comments please. Index: php-gtk/docs/en/classes/gtkwindow.xml +++ php-gtk/docs/en/classes/gtkwindow.xml <reference id="ref.gtkwindow"> <title>GtkWindow</title> <partintro> <simpara> Creates a new window on the screen. This is a container for other widgets. </simpara> </partintro> <refentry id="class.gtkwindow.constructor"> <refnamediv> <refname>GtkWindow</refname> <refpurpose>GtkWindow Constructor</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> <funcdef> resource <function>GtkWindow</function> </funcdef> <paramdef> <parameter><literal>void</literal></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> The <function>GtkWindow</function> is the constructor for the GtkWindow widget, it should be called to create a new Window on the screen, it returns a reference to the new window on success, returns <literal>NULL</literal> on error. </para> <simpara> GtkWindows must be constructed by reference, this is due to the way the underlying GtkObjects have to be stored in PHP/Zend Wrappers as well as the way Zend handles objects. If you dont use refence's when calling the constructor you will find earlier windows overwritten by later ones. </simpara> <example> <title>Creating a new GTK+ Window from PHP</title> <programlisting> <lineannotation> /* -- The Correct Way to Create a new window -- */ </lineannotation> <varname>$window</varname> = &amp;new GtkWindow(); </programlisting> <programlisting> <lineannotation> /* -- This will cause problems later on -- */ </lineannotation> <varname>$window</varname> = new GtkWindow(); </programlisting> </example> </refsect1> </refentry> <refentry id="class.gtkwindow.set_policy"> <refnamediv> <refname>GtkWindow::set_policy</refname> <refpurpose>Sets how resize requests are delt with</refpurpose> </refnamediv> <refsect1> <title>Descriptin</title> <funcsynopsis> <funcprototype> <funcdef>viod <function>GtkWindow::set_policy</function></funcdef> <paramdef>int <parameter>allw_shrink</parameter></paramdef> <paramdef>int <parameter>allw_grow</parameter></paramdef> <paramdef>int <parameter>auto_shrink</parameter></paramdef> </funcprototype> </funcsynopsis> <simpara> This function controls how GTK+ will resize the window. The parameters <parameter>allw_shirk</parameter> and <parameter>allw_grow</parameter> allow the user to resize the window if they are set to <literal>TRUE</literal>. The thrid parameter, if set to <literal>TRUE</literal> tells GTK+ to resize the window so that it will be the optimal size for its children. </simpara> </refsect1> </refentry> </reference>

« previous php.gtk (#472) next »