PHP-GTK
Saturday, July 04, 2009 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGlade Classes
GladeXML Constructornext

Last updated: Tue, 28 Mar 2006
view this page in English | Czech | French | German | Italian | Japanese | Brazilian | Russian | Spanish | Plain HTML

GladeXML

Loading XML GUI definition files on the fly

Object Hierarchy

Direct subclasses

None.

Description

Glade is a user interface builder for Gtk. With it you can create your the surface of your applications in a WYSIWYG manner withouth having to worry about commands like add() , pack_start() and pack_end() .

Glade has the ability to generate source code which creates the whole interface - but only for C, C++ and Ada95. Another way of using the interfaces created with glade is to load the .glade files dynamically from the application with the GladeXML class, and PHP-Gtk supports this.

When using glade in your PHP-Gtk applications, you have at least 2 files:

When starting the program, the glade class is used to load the full contents (if you designed the full UI in glade) or only a part of the user interface (if you e.g. created just the menus with glade) from the .glade file. After loading, the widgets behave the same as if they were created the "normal" way.

Single widgets can be accessed with the get_widget() functions. Signals which can be assigned directly in Glade can be connected automatically with signal_autoconnect() .

The original glade application can be found at glade.gnome.org and a windows port at wingtk.sourceforge.net. There is also a tool called AppWizard which creates the php framework from .glade files so that you can concentrate on implementing the real application functions.

PHP-Gtk 1.x supports glade 1 files only. This means you can not use Glade2 for user interface creation but Glade1.

Constructor

GladeXML (string fname, [string root = NULL, [string domain = NULL]]);
-- Creates a new GladeXML instance.

Methods

get_widget()
  Returns the widget with the given name.
get_widget_by_long_name()
  Returns the widget specified by the given path.
signal_connect()
  Connects all signals with the given handler to a callback function.
signal_connect_object()
  Connects all signals with the given handler to a callback function.
signal_autoconnect()
  Connects all signal handlers to functions.
signal_autoconnect_object()
  Connects all signal handlers to functions.
relative_file()
  Creates an absolute filename from a relative one.


User Contributed Notes
GladeXML
add a note about notes
There are no user contributed notes for this page.


previousGlade Classes
GladeXML Constructornext

Last updated: Tue, 28 Mar 2006
view this page in English | Czech | French | German | Italian | Japanese | Brazilian | Russian | Spanish | Plain HTML


credits 

PHP  Copyright © 2001-2009 The PHP Group
 All rights reserved.
Last updated: Tue Mar 28 03:00:43 2006 UTC