glade.Glade.Glade Class Reference

Inheritance diagram for glade.Glade.Glade:

gobject.ObjectG.ObjectG List of all members.

Public Member Functions

GladeXML * getGladeStruct ()
 this (GladeXML *gladeXML)
 Sets our main struct and passes it to the parent class.
Widget getWidget (char[] name)
 This function is used to get a pointer to the GtkWidget corresponding to name in the interface description.
 this (char[] fname, char[] root=null, char[] domain=null)
 Creates a new GladeXML object (and the corresponding widgets) from the XML file fname.
Widget[] getWidgetPrefix (char[] name)
 This function is used to get a list of pointers to the GtkWidget(s) with names that start with the string name in the interface description.
Widget newFromWidget (void *ptr)
 this (char[] buffer, int size, char[] root, char[] domain)
 Creates a new GladeXML object (and the corresponding widgets) from the buffer buffer.
int construct (char[] fname, char[] root, char[] domain)
 This routine can be used by bindings (such as gtk--) to help construct a GladeXML object, if it is needed.

Static Public Member Functions

static char[] gladeGetWidgetName (Widget widget)
 Used to get the name of a widget that was generated by a GladeXML object.
static Glade gladeGetWidgetTree (Widget widget)
 This function is used to get the GladeXML object that built this widget.
static void init ()
 It used to be necessary to call glade_init() before creating GladeXML objects.
static void require (char[] library)
 Ensure that a required library is available.
static void provide (char[] library)
 This function should be called by a module to assert that it provides wrappers for a particular library.

Protected Member Functions

void * getStruct ()
 the main Gtk struct as a void*

Protected Attributes

GladeXML * gladeXML
 the main Gtk struct

Constructor & Destructor Documentation

glade.Glade.Glade.this ( GladeXML *  gladeXML  ) 

Sets our main struct and passes it to the parent class.

glade.Glade.Glade.this ( char[]  fname,
char[]  root = null,
char[]  domain = null 
)

Creates a new GladeXML object (and the corresponding widgets) from the XML file fname.

Optionally it will only build the interface from the widget node root (if it is not NULL). This feature is useful if you only want to build say a toolbar or menu from the XML file, but not the window it is embedded in. Note also that the XML parse tree is cached to speed up creating another GladeXML object for the same file fname: the XML file name. root: the widget node in fname to start building from (or NULL) domain: the translation domain for the XML file (or NULL for default) Returns: the newly created GladeXML object, or NULL on failure.

glade.Glade.Glade.this ( char[]  buffer,
int  size,
char[]  root,
char[]  domain 
)

Creates a new GladeXML object (and the corresponding widgets) from the buffer buffer.

Optionally it will only build the interface from the widget node root (if it is not NULL). This feature is useful if you only want to build say a toolbar or menu from the XML document, but not the window it is embedded in. buffer: the memory buffer containing the XML document. size: the size of the buffer. root: the widget node in buffer to start building from (or NULL) domain: the translation domain to use for this interface (or NULL) Returns: the newly created GladeXML object, or NULL on failure.


Member Function Documentation

int glade.Glade.Glade.construct ( char[]  fname,
char[]  root,
char[]  domain 
)

This routine can be used by bindings (such as gtk--) to help construct a GladeXML object, if it is needed.

self: the GladeXML object fname: the XML filename root: the root widget node (or NULL for none) domain: the translation domain (or NULL for the default) Returns: TRUE if the construction succeeded.

GladeXML* glade.Glade.Glade.getGladeStruct (  ) 

void* glade.Glade.Glade.getStruct (  )  [protected]

the main Gtk struct as a void*

Reimplemented from gobject.ObjectG.ObjectG.

Widget glade.Glade.Glade.getWidget ( char[]  name  ) 

This function is used to get a pointer to the GtkWidget corresponding to name in the interface description.

You would use this if you have to do anything to the widget after loading. self: the GladeXML object. name: the name of the widget. Returns: the widget matching name, or NULL if none exists.

Widget [] glade.Glade.Glade.getWidgetPrefix ( char[]  name  ) 

This function is used to get a list of pointers to the GtkWidget(s) with names that start with the string name in the interface description.

You would use this if you have to do something to all of these widgets after loading. self: the GladeXML object. name: the name of the widget. Returns: A list of the widget that match name as the start of their name, or NULL if none exists.

static char [] glade.Glade.Glade.gladeGetWidgetName ( Widget  widget  )  [static]

Used to get the name of a widget that was generated by a GladeXML object.

widget: the widget Returns: the name of the widget.

static Glade glade.Glade.Glade.gladeGetWidgetTree ( Widget  widget  )  [static]

This function is used to get the GladeXML object that built this widget.

widget: the widget Returns: the GladeXML object that built this widget.

static void glade.Glade.Glade.init (  )  [static]

It used to be necessary to call glade_init() before creating GladeXML objects.

This is now no longer the case, as libglade will be initialised on demand now. Calling glade_init() manually will not cause any problems though.

Widget glade.Glade.Glade.newFromWidget ( void *  ptr  ) 

static void glade.Glade.Glade.provide ( char[]  library  )  [static]

This function should be called by a module to assert that it provides wrappers for a particular library.

This should be called by the register_widgets() function of a libglade module so that it isn't loaded twice, for instance. library: the provided library

static void glade.Glade.Glade.require ( char[]  library  )  [static]

Ensure that a required library is available.

If it is not already available, libglade will attempt to dynamically load a module that contains the handlers for that library. library: the required library


Member Data Documentation

GladeXML* glade.Glade.Glade.gladeXML [protected]

the main Gtk struct


SourceForge.net Logo DSource.org Logo digitalmars.com Logo