cvs: php-gtk /docs manual.xml.in /docs/en/chapters widget.xml

From: Date: Thu, 08 Mar 2001 21:01:22 +0000
Subject: cvs: php-gtk /docs manual.xml.in /docs/en/chapters widget.xml
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-579@lists.php.net to get a copy of this message
jmoore Thu Mar 8 13:01:22 2001 EDT Added files: /php-gtk/docs/en/chapters widget.xml Modified files: /php-gtk/docs manual.xml.in Log: Some brief background information about Widgets and Containers. Index: php-gtk/docs/manual.xml.in diff -u php-gtk/docs/manual.xml.in:1.5 php-gtk/docs/manual.xml.in:1.6 --- php-gtk/docs/manual.xml.in:1.5 Wed Mar 7 15:06:05 2001 +++ php-gtk/docs/manual.xml.in Thu Mar 8 13:01:18 2001 @@ -37,6 +37,7 @@ <part id="introduction"> <title>&Introduction;</title> &chapters.intro; + &chapters.widget; </part> <part id="getting-started"> Index: php-gtk/docs/en/chapters/widget.xml +++ php-gtk/docs/en/chapters/widget.xml <chapter id="gtk.widgets"> <title>Widgets and Containers</title> <sect1 id="gtk.widgets.intro"> <title>Introduction</title> <simpara> This chapter will explain some of the concepts behind GTK and how you can use them. </simpara> </sect1> <sect1 id="gtk.widgets.whatare"> <title>What are Widgets</title> <simpara> A Widget is a term used in the world of X for any user interface. A Widget can be a text box, label, frames, windows or anything else that you might need. GTK Widgets are all derived from the base class <literal>GtkWidget</literal>. </simpara> <simpara> From a programmers point of view a widget has five parts to its life cycle. </simpara> <para> <orderedlist> <listitem> <simpara>Creation</simpara> <simpara> In PHP-GTK terms this is all done in the creation of an object, e.g. <literal>$window = &amp;new GtkWindow;</literal> </simpara> </listitem> <listitem> <simpara>Placement</simpara> <simpara> This is the step of adding a widget to a <link linkend="gtk.containers.whatare">container</link>. This is achived in php-gtk by <literal>$container-&gt;add($widget)</literal> </simpara> </listitem> <listitem> <simpara>Signal Connection</simpara> <simpara> This is the step of setting up call back functions for use when various signals are sent by GTK+. an example of this might be <literal> $widget-&gt;connect("focus-in-event","my_focus_func")</literal> </simpara> </listitem> <listitem> <simpara>Display</simpara> <simpara> This section is the actual time when the widget is on display to the user, this is started by calling <literal>$widget-&gt;show()</literal> and is finished by <literal>$widget-&gt;hide()</literal>. </simpara> </listitem> <listitem> <simpara>Destruction</simpara> <simpara> This occurs when your program is shut down, all actions that are necessary here are handled by PHP-GTK itself. </simpara> </listitem> </orderedlist> </para> </sect1> <sect1 id="gtk.containers.whatare"> <title>What are Containers</title> <simpara> A container is simply a <link linkend="gtk.widgets.whatare">widget</link> that can contain another widget, examples of these are <literal>GtkWindow</literal>'s and <literal>GtkLable</literal>'s other than this fact they are exactly the same as widgets. They are all derived from the <literal>GtkContainer</literal> base class, which itself is derived from the <literal>GtkWindow</literal> class. </simpara> </sect1> </chapter>

« previous php.gtk (#579) next »