[prev in list] [next in list] [prev in thread] [next in thread]
List: php-gtk-general
Subject: Re: [PHP-GTK] object oriented approach
From: epplestun <epplestun () alaplaya ! com>
Date: 2003-12-13 12:12:55
[Download RAW message or body]
Hi you can do the hello world example with OOP with this form:
<?PHP
dl("php_gtk.so");
class HelloWorld {
var $widgets = array();
function HelloWorld() {
$this->widgets['window'] = new GtkWindow();
$this->widgets['window'] ->connect('destroy', array('gtk',
'main_quit'));
$this->widgets['window'] ->set_usize(500, 500);
$this->widgets['window'] ->show_all();
gtk::main();
}
}
$window = new HelloWorld();
?>
Regards
Ivan
El sáb, 13 de 12 de 2003 a las 12:18, Szilard Novaki escribió:
> Hi!
>
> I'm a newbie at php-gtk. It's very impressive, but i'd like to use it in
> object oriented way.
>
> I've read a hello-world application. It very simple, but I could not
> convert it to an object oriented structure, because the event callback
> (as far as I see) is a php function. Could anyone send me an object
> oriented php-gtk application, where the gtk widgets are objects? A hello
> world application would be just fine.
>
> Thank you,
> Szilard
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic