cvs: presentations / vancouver-gtk.xml /slides/gtk agata.png agata.xml callbacks.xml containers.xml creating.xml events.xml gensteps.xml intro.xml
phpmole-ss1.png phpmole-ss2.png phpmole-ss3.png phpmole.xml signals.xml titlepage.xml widgets.xml
| From: | Andrei Zmievski | Date: | Wed, 07 Jan 2004 23:49:19 +0000 |
| Subject: | cvs: presentations / vancouver-gtk.xml /slides/gtk agata.png agata.xml callbacks.xml containers.xml creating.xml events.xml gensteps.xml intro.xml phpmole-ss1.png phpmole-ss2.png phpmole-ss3.png phpmole.xml signals.xml titlepage.xml widgets.xml |
||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-926@lists.php.net to get a copy of this message | ||
andrei Wed Jan 7 18:49:19 2004 EDT
Added files:
/presentations vancouver-gtk.xml
/presentations/slides/gtk agata.png agata.xml callbacks.xml
containers.xml creating.xml events.xml
gensteps.xml intro.xml phpmole-ss1.png
phpmole-ss2.png phpmole-ss3.png
phpmole.xml signals.xml titlepage.xml
widgets.xml
Log:
Index: presentations/vancouver-gtk.xml +++ presentations/vancouver-gtk.xml <presentation template="php" navmode="html" navbarbackground="#0099cc"> <topic>PHP-GTK</topic> <title>PHP-GTK: Something Old, Something New</title> <event>Vancouver PHP Conference</event> <location>Vancouver, Canada</location> <date>January 22, 2004</date> <speaker>Andrei Zmievski (Yahoo! Inc)</speaker> <email>andrei@gravitonic.com</email> <url>http://talks.php.net/show/vancouver-gtk</url> <slide>slides/gtk/titlepage.xml</slide> <slide>slides/gtk/intro.xml</slide> <slide>slides/gtk/phpmole.xml</slide> <slide>slides/gtk/agata.xml</slide> <slide>slides/gtk/widgets.xml</slide> <slide>slides/gtk/containers.xml</slide> <slide>slides/gtk/signals.xml</slide> <slide>slides/gtk/events.xml</slide> <slide>slides/gtk/callbacks.xml</slide> <slide>slides/gtk/gensteps.xml</slide> <slide>slides/gtk/creating.xml</slide> <!-- <slide>slides/gtk/showing.xml</slide> <slide>slides/gtk/focus.xml</slide> <slide>slides/gtk/sensitivity.xml</slide> <slide>slides/gtk/sizepos.xml</slide> <slide>slides/gtk/gencontainer.xml</slide> <slide>slides/gtk/boxes.xml</slide> <slide>slides/gtk/windows.xml</slide> <slide>slides/gtk/connecting.xml</slide> <slide>slides/gtk/disconnecting.xml</slide> <slide>slides/gtk/disabling.xml</slide> --> </presentation> Index: presentations/slides/gtk/agata.xml +++ presentations/slides/gtk/agata.xml <slide title="AgataReport" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <image filename="agata.png" align="center" /> <link leader="More info: " align="center" href="http://www.agata.org.br/" /> <blurb> </blurb> </slide> Index: presentations/slides/gtk/callbacks.xml +++ presentations/slides/gtk/callbacks.xml <slide title="Theory: Callbacks" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>The user-defined signal handlers are called ~callbacks~.</blurb> <blurb>The first parameter normally passed to callbacks is the widget that emitted the signal. The rest are signal-dependent. For example, the callback for 'switch_page' signal of GtkNotebook class would look like this:</blurb> <example fontsize="1.5ex"><![CDATA[<?php function on_switch_page($notebook, $page, page_num) { } ?>]]></example> <blurb>The low-level event callbacks receive an additional parameter object describing the event. It has fields for event type, button number if it was a mouse click, key code if it was a key press, etc.</blurb> <blurb>It is possible to connect more than one callback to the same signal. They will be run in the order they are connected. It is also possible to simulate emission of a signal by the widget, for some custom purposes.</blurb> </slide> Index: presentations/slides/gtk/containers.xml +++ presentations/slides/gtk/containers.xml <slide title="Theory: Containers" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>Some widgets serve a higher purpose: they organize and present other widgets.</blurb> <blurb>These widgets are called ~containers~. This means that they may contain one or more of other widgets and control their relative layout as well as present some decoration alongside the contained widgets. Examples:</blurb> <list> <bullet fontsize="3ex">vertical box</bullet> <bullet fontsize="3ex">horizontal box</bullet> <bullet fontsize="3ex">table</bullet> <bullet fontsize="3ex">button</bullet> </list> <blurb>The contained widgets are called container ~children~.</blurb> <blurb>Containers usually respond to resize events and addition and removal of children by reallocating the available space among its remaining children.</blurb> <blurb>Since a container is also a widget, we can nest containers to an arbitrary degree: a vertical box containing a table containing a button containing a label.</blurb> </slide> Index: presentations/slides/gtk/creating.xml +++ presentations/slides/gtk/creating.xml <slide title="Creating and Destroying" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb> To create a widget, use %&new% operator instead of %new%. Some widgets take constructor parameters to initialize themselves to some state. </blurb> <blurb> To destroy a widget, use %destroy()% method. This is rarely used because all widgets are destroyed automatically upon the application's exit. </blurb> <blurb> Destroying a widget will not </blurb> </slide> Index: presentations/slides/gtk/events.xml +++ presentations/slides/gtk/events.xml <slide title="Theory: Events" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>In addition to signals, there are low-level ~events~ corresponding to the X Window system event mechanism. They can be connected to, just like signals. These events are:</blurb> <list fontsize="1.2ex"> <bullet>event</bullet> <bullet>button_press_event</bullet> <bullet>button_release_event</bullet> <bullet>motion_notify_event</bullet> <bullet>delete_event</bullet> <bullet>destroy_event</bullet> <bullet>expose_event</bullet> <bullet>key_press_event</bullet> <bullet>key_release_event</bullet> <bullet>enter_notify_event</bullet> <bullet>leave_notify_event</bullet> <bullet>configure_event</bullet> <bullet>focus_in_event</bullet> <bullet>focus_out_event</bullet> <bullet>map_event</bullet> <bullet>unmap_event</bullet> <bullet>property_notify_event</bullet> <bullet>selection_clear_event</bullet> <bullet>selection_request_event</bullet> <bullet>selection_notify_event</bullet> <bullet>proximity_in_event</bullet> <bullet>proximity_out_event</bullet> <bullet>drag_begin_event</bullet> <bullet>drag_request_event</bullet> <bullet>drag_end_event</bullet> <bullet>drop_enter_event</bullet> <bullet>drop_leave_event</bullet> <bullet>drop_data_available_event</bullet> <bullet>other_event</bullet> </list> </slide> Index: presentations/slides/gtk/gensteps.xml +++ presentations/slides/gtk/gensteps.xml <slide title="General Steps" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>The general steps involved in working with a widget are:</blurb> <list type="number" fontsize="2ex"> <bullet>Instantiate the widget object of the appropriate class</bullet> </list> <example fontsize="1ex"><![CDATA[<?php $ok = &new GtkButton('OK'); ?>]]></example> <list type="number" num="2" fontsize="2ex"> <bullet>Connect the signals to callbacks</bullet> </list> <example fontsize="1ex"><![CDATA[<?php $ok->connect('clicked', 'on_ok_clicked'); ?>]]></example> <list type="number" num="3" fontsize="2ex"> <bullet>Set any additional attributes via properties or function calls</bullet> </list> <example fontsize="1ex"><![CDATA[<?php $ok->set_border_width(3); ?>]]></example> <list type="number" num="4" fontsize="2ex"> <bullet>Put the widget into a pre-existing container</bullet> </list> <example fontsize="1ex"><![CDATA[<?php $top_window->add($ok); ?>]]></example> <list type="number" num="5" fontsize="2ex"> <bullet>Display the widget</bullet> </list> <example fontsize="1ex"><![CDATA[<?php $ok->show(); ?>]]></example> </slide> Index: presentations/slides/gtk/intro.xml +++ presentations/slides/gtk/intro.xml <slide title="Survey" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <list title="Raise your hand.." effect="hide"> <bullet effect="hide">if you know what PHP is</bullet> <bullet effect="hide">if you know what Gtk+ or Qt or Motif is</bullet> <bullet effect="hide">if you know what PHP-GTK is</bullet> </list> <blurb effect="hide">Do you really know what PHP + just the right amount of other technology can do?</blurb> </slide> Index: presentations/slides/gtk/phpmole.xml +++ presentations/slides/gtk/phpmole.xml <slide title="PHP Mole" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <image title="Main work area" filename="phpmole-ss3.png" align="center" /> <image title="Class Browser" filename="phpmole-ss2.png" align="center" /> <image title="Autocompletion" filename="phpmole-ss1.png" align="center" /> <link leader="More info: " href="http://www.akbkhome.com/Projects/Phpmole-IDE/" /> </slide> Index: presentations/slides/gtk/signals.xml +++ presentations/slides/gtk/signals.xml <slide title="Theory: Signals" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>Gtk+ is an event-driven toolkit. This means that the application sleeps in the main loop until something happens, after which the control is passed to the appropriate function.</blurb> <blurb>The passing of control is implemented via ~signals~. When a widget experiences an event, it ~emits~ a signal. Every signal is uniquely identified by name, but two different widgets may have the signal of the same name but different meaning.</blurb> <blurb>Signals present a way to customize application's behavior according to the developer's needs and user's actions. Each signal has a default internal ~handler~, but one or more custom handlers can be ~connected~ to a signal to initiate some sort of response.</blurb> <blurb>For example, the 'OK' button in a dialog (a GtkButton) has the *clicked* signal that is emitted when the user clicks the button with the mouse. You may want to connect a custom handler to this signal in order to perform an action that the 'OK' button implies.</blurb> </slide> Index: presentations/slides/gtk/titlepage.xml +++ presentations/slides/gtk/titlepage.xml <slide template="titlepage" logo1="images/php-gtk.gif" fontsize="3em" navColor="#b0c2d3" navsize="1.4em"> <title>Welcome!</title> </slide> Index: presentations/slides/gtk/widgets.xml +++ presentations/slides/gtk/widgets.xml <slide title="Theory: Widgets" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>In simplest terms, a GUI building block, similar to LEGOs.</blurb> <list> <bullet fontsize="3ex">window</bullet> <bullet fontsize="3ex">button</bullet> <bullet fontsize="3ex">progress bar</bullet> <bullet fontsize="3ex">menu</bullet> <bullet fontsize="3ex">tree</bullet> </list> <blurb>A widget usually has a window on which it draws itself.</blurb> <blurb>Some widgets are invisible.</blurb> </slide>
Index: presentations/vancouver-gtk.xml +++ presentations/vancouver-gtk.xml <presentation template="php" navmode="html" navbarbackground="#0099cc"> <topic>PHP-GTK</topic> <title>PHP-GTK: Something Old, Something New</title> <event>Vancouver PHP Conference</event> <location>Vancouver, Canada</location> <date>January 22, 2004</date> <speaker>Andrei Zmievski (Yahoo! Inc)</speaker> <email>andrei@gravitonic.com</email> <url>http://talks.php.net/show/vancouver-gtk</url> <slide>slides/gtk/titlepage.xml</slide> <slide>slides/gtk/intro.xml</slide> <slide>slides/gtk/phpmole.xml</slide> <slide>slides/gtk/agata.xml</slide> <slide>slides/gtk/widgets.xml</slide> <slide>slides/gtk/containers.xml</slide> <slide>slides/gtk/signals.xml</slide> <slide>slides/gtk/events.xml</slide> <slide>slides/gtk/callbacks.xml</slide> <slide>slides/gtk/gensteps.xml</slide> <slide>slides/gtk/creating.xml</slide> <!-- <slide>slides/gtk/showing.xml</slide> <slide>slides/gtk/focus.xml</slide> <slide>slides/gtk/sensitivity.xml</slide> <slide>slides/gtk/sizepos.xml</slide> <slide>slides/gtk/gencontainer.xml</slide> <slide>slides/gtk/boxes.xml</slide> <slide>slides/gtk/windows.xml</slide> <slide>slides/gtk/connecting.xml</slide> <slide>slides/gtk/disconnecting.xml</slide> <slide>slides/gtk/disabling.xml</slide> --> </presentation> Index: presentations/slides/gtk/agata.xml +++ presentations/slides/gtk/agata.xml <slide title="AgataReport" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <image filename="agata.png" align="center" /> <link leader="More info: " align="center" href="http://www.agata.org.br/" /> <blurb> </blurb> </slide> Index: presentations/slides/gtk/callbacks.xml +++ presentations/slides/gtk/callbacks.xml <slide title="Theory: Callbacks" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>The user-defined signal handlers are called ~callbacks~.</blurb> <blurb>The first parameter normally passed to callbacks is the widget that emitted the signal. The rest are signal-dependent. For example, the callback for 'switch_page' signal of GtkNotebook class would look like this:</blurb> <example fontsize="1.5ex"><![CDATA[<?php function on_switch_page($notebook, $page, page_num) { } ?>]]></example> <blurb>The low-level event callbacks receive an additional parameter object describing the event. It has fields for event type, button number if it was a mouse click, key code if it was a key press, etc.</blurb> <blurb>It is possible to connect more than one callback to the same signal. They will be run in the order they are connected. It is also possible to simulate emission of a signal by the widget, for some custom purposes.</blurb> </slide> Index: presentations/slides/gtk/containers.xml +++ presentations/slides/gtk/containers.xml <slide title="Theory: Containers" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>Some widgets serve a higher purpose: they organize and present other widgets.</blurb> <blurb>These widgets are called ~containers~. This means that they may contain one or more of other widgets and control their relative layout as well as present some decoration alongside the contained widgets. Examples:</blurb> <list> <bullet fontsize="3ex">vertical box</bullet> <bullet fontsize="3ex">horizontal box</bullet> <bullet fontsize="3ex">table</bullet> <bullet fontsize="3ex">button</bullet> </list> <blurb>The contained widgets are called container ~children~.</blurb> <blurb>Containers usually respond to resize events and addition and removal of children by reallocating the available space among its remaining children.</blurb> <blurb>Since a container is also a widget, we can nest containers to an arbitrary degree: a vertical box containing a table containing a button containing a label.</blurb> </slide> Index: presentations/slides/gtk/creating.xml +++ presentations/slides/gtk/creating.xml <slide title="Creating and Destroying" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb> To create a widget, use %&new% operator instead of %new%. Some widgets take constructor parameters to initialize themselves to some state. </blurb> <blurb> To destroy a widget, use %destroy()% method. This is rarely used because all widgets are destroyed automatically upon the application's exit. </blurb> <blurb> Destroying a widget will not </blurb> </slide> Index: presentations/slides/gtk/events.xml +++ presentations/slides/gtk/events.xml <slide title="Theory: Events" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>In addition to signals, there are low-level ~events~ corresponding to the X Window system event mechanism. They can be connected to, just like signals. These events are:</blurb> <list fontsize="1.2ex"> <bullet>event</bullet> <bullet>button_press_event</bullet> <bullet>button_release_event</bullet> <bullet>motion_notify_event</bullet> <bullet>delete_event</bullet> <bullet>destroy_event</bullet> <bullet>expose_event</bullet> <bullet>key_press_event</bullet> <bullet>key_release_event</bullet> <bullet>enter_notify_event</bullet> <bullet>leave_notify_event</bullet> <bullet>configure_event</bullet> <bullet>focus_in_event</bullet> <bullet>focus_out_event</bullet> <bullet>map_event</bullet> <bullet>unmap_event</bullet> <bullet>property_notify_event</bullet> <bullet>selection_clear_event</bullet> <bullet>selection_request_event</bullet> <bullet>selection_notify_event</bullet> <bullet>proximity_in_event</bullet> <bullet>proximity_out_event</bullet> <bullet>drag_begin_event</bullet> <bullet>drag_request_event</bullet> <bullet>drag_end_event</bullet> <bullet>drop_enter_event</bullet> <bullet>drop_leave_event</bullet> <bullet>drop_data_available_event</bullet> <bullet>other_event</bullet> </list> </slide> Index: presentations/slides/gtk/gensteps.xml +++ presentations/slides/gtk/gensteps.xml <slide title="General Steps" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>The general steps involved in working with a widget are:</blurb> <list type="number" fontsize="2ex"> <bullet>Instantiate the widget object of the appropriate class</bullet> </list> <example fontsize="1ex"><![CDATA[<?php $ok = &new GtkButton('OK'); ?>]]></example> <list type="number" num="2" fontsize="2ex"> <bullet>Connect the signals to callbacks</bullet> </list> <example fontsize="1ex"><![CDATA[<?php $ok->connect('clicked', 'on_ok_clicked'); ?>]]></example> <list type="number" num="3" fontsize="2ex"> <bullet>Set any additional attributes via properties or function calls</bullet> </list> <example fontsize="1ex"><![CDATA[<?php $ok->set_border_width(3); ?>]]></example> <list type="number" num="4" fontsize="2ex"> <bullet>Put the widget into a pre-existing container</bullet> </list> <example fontsize="1ex"><![CDATA[<?php $top_window->add($ok); ?>]]></example> <list type="number" num="5" fontsize="2ex"> <bullet>Display the widget</bullet> </list> <example fontsize="1ex"><![CDATA[<?php $ok->show(); ?>]]></example> </slide> Index: presentations/slides/gtk/intro.xml +++ presentations/slides/gtk/intro.xml <slide title="Survey" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <list title="Raise your hand.." effect="hide"> <bullet effect="hide">if you know what PHP is</bullet> <bullet effect="hide">if you know what Gtk+ or Qt or Motif is</bullet> <bullet effect="hide">if you know what PHP-GTK is</bullet> </list> <blurb effect="hide">Do you really know what PHP + just the right amount of other technology can do?</blurb> </slide> Index: presentations/slides/gtk/phpmole.xml +++ presentations/slides/gtk/phpmole.xml <slide title="PHP Mole" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <image title="Main work area" filename="phpmole-ss3.png" align="center" /> <image title="Class Browser" filename="phpmole-ss2.png" align="center" /> <image title="Autocompletion" filename="phpmole-ss1.png" align="center" /> <link leader="More info: " href="http://www.akbkhome.com/Projects/Phpmole-IDE/" /> </slide> Index: presentations/slides/gtk/signals.xml +++ presentations/slides/gtk/signals.xml <slide title="Theory: Signals" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>Gtk+ is an event-driven toolkit. This means that the application sleeps in the main loop until something happens, after which the control is passed to the appropriate function.</blurb> <blurb>The passing of control is implemented via ~signals~. When a widget experiences an event, it ~emits~ a signal. Every signal is uniquely identified by name, but two different widgets may have the signal of the same name but different meaning.</blurb> <blurb>Signals present a way to customize application's behavior according to the developer's needs and user's actions. Each signal has a default internal ~handler~, but one or more custom handlers can be ~connected~ to a signal to initiate some sort of response.</blurb> <blurb>For example, the 'OK' button in a dialog (a GtkButton) has the *clicked* signal that is emitted when the user clicks the button with the mouse. You may want to connect a custom handler to this signal in order to perform an action that the 'OK' button implies.</blurb> </slide> Index: presentations/slides/gtk/titlepage.xml +++ presentations/slides/gtk/titlepage.xml <slide template="titlepage" logo1="images/php-gtk.gif" fontsize="3em" navColor="#b0c2d3" navsize="1.4em"> <title>Welcome!</title> </slide> Index: presentations/slides/gtk/widgets.xml +++ presentations/slides/gtk/widgets.xml <slide title="Theory: Widgets" logo1="images/php-gtk.gif" navColor="#b0c2d3" navsize="1.4em"> <blurb>In simplest terms, a GUI building block, similar to LEGOs.</blurb> <list> <bullet fontsize="3ex">window</bullet> <bullet fontsize="3ex">button</bullet> <bullet fontsize="3ex">progress bar</bullet> <bullet fontsize="3ex">menu</bullet> <bullet fontsize="3ex">tree</bullet> </list> <blurb>A widget usually has a window on which it draws itself.</blurb> <blurb>Some widgets are invisible.</blurb> </slide>