GtkAda Reference Manual - Package Glade.XML

[Contents] [Back] [Prev] [Up] [Next] [Forward]

# Package Glade.XML

This package is a binding to the libglade library that provides routines to create widgets dynamically from an XML definition file. see section Package Glade.

- Glade.XML Subprograms

## Subprograms

    procedure Gtk_New
      (XML                : out    Glade_XML;
       Fname              :        String;
       Root               :        String := "";
       Domain             :        String := "");
| Create 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 empty). 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. Domain, if not null, is the international domain to use for string translation. see section Package Gtkada.Intl for more information.
    procedure Gtk_New_From_Buffer
      (XML                : out    Glade_XML;
       Buffer             :        String;
       Root               :        String := "";
       Domain             :        String := "");
| Create a new Glade_XML. Similar to previous procedure, but the XML contents are read from memory directly.
    procedure Initialize_From_Buffer
      (XML                : access Glade_XML_Record'Class;
       Buffer             :        String;
       Root               :        String := "";
       Domain             :        String := "");
| Internal initialization function. See the section "Creating your own widgets" in the documentation.
    function Get_Type              return Glib.GType;
| Return the internal value associated with a Glade_XML.
    procedure Signal_Connect
      (XML                : access Glade_XML_Record;
       Handlername        :        String;
       Func               :        System.Address;
       User_Data          :        System.Address);
| Warning: Func should be a lowel level C callback, taking a low level C widget as the first parameter, e.g: procedure Func (Widget : Gtk.Item_Factory.Limited_Widget);
    function Get_Widget
      (XML                : access Glade_XML_Record;
       Name               :        String)
       return Gtk_Widget;
| This function is used to get the Gtk_Widget corresponding to name in the interface description. You would use this if you have to do anything to the widget after loading.
    function Relative_File
      (XML                : access Glade_XML_Record;
       Filename           :        String)
       return String;
| This function resolves a relative pathname, using the directory of the XML file as a base. If the pathname is absolute, then the original filename is returned.
    function Get_Widget_Name
      (Widget             : access Gtk_Widget_Record'Class)
       return String;
    function Get_Widget_Tree
      (Widget             : access Gtk_Widget_Record'Class)
       return Glade_XML;
| This function is used to get the GladeXML object that built this widget.

[Contents] [Back] [Prev] [Up] [Next] [Forward]