How to make PHP-GTK Menus!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to make PHP-GTK Menus!

    We have published a new blog post on our Web Hosting Blog on how to create menus in PHP-GTK.

    How to create PHP-GTK GTK+ menus / menu items?

    What is PHP-GTK?
    PHP-GTK is a language binding to the GTK+ widget toolkit. "GTK" is short for "GIMP Toolkit" and is a widget toolkit for the creation of graphical user interfaces. It was originally developed for the GIMP graphics editor. GTK+ is licensed under a non-restrictive LGPL (Lesser General Public License) permitting users to use GTK+ for the creation of both free and proprietary applications. GTK+ as it stands is maintained by the GNOME Foundation.

    GTK+ is extensively used on Linux distributions. In fact, many of the appliations you may use on a Linux distribution such as Ubuntu is using the GTK+ widget toolkit for the GUI. And because GTK+ has many, many language bindings - you can make use of GTK+ in your favourite language - whether that's PHP, Python, C, C++ and even C#.

    A very basic application is as follows:

    PHP Code:
    <?php
    $window 
    = new  GtkWindow(); // create a window
    $window->set_title("PHP-GTK Tutorial"); // set the title
    $window->connect_simple('destroy',array('Gtk','main_quit')); // this quits the application when the window is closed (when a window is closed, the destroy signal is fired) - then we execute Gtk::main_quit
    $window->show_all(); // there is a show() method, and this would work in this instance. However, when you have widgets on a window, show_all() is necessary to show the widgets on the GtkWindow as well. 
    Gtk::main(); // this keeps the application active
    ?>

    #2
    Nice tutorial! I like. Might try PHP-GTK myself.

    Comment


      #3
      Thanks Reece! PHP-GTK is great . Although I'm a little biased. See my signature for evidence .

      Comment

      Working...
      X