[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.

Types

type Custom_Widget_Handler is access function
    (XML       : access Glade_XML_Record'Class;




Subprograms

procedure Gtk_New              
  (XML                : out    Glade_XML;
   Fname              :        String;
   Root               :        String := "";
   Domain             :        String := "");

Create a new Glade_XML.
Fname is the file name of the XML file to load into XML. Root if not null is the root widget to start from. 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_Memory  
  (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_Memory
  (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 Gtk.Gtk_Type;

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);




procedure Signal_Autoconnect   
  (XML                : access Glade_XML_Record);

Use gmodule to connect signals automatically.
Basically a symbol with the name of the signal handler is searched for, and that is connected to the associated symbols. So setting gtk_main_quit as a signal handler for the destroy signal of a window will do what you expect.


function Get_Widget            
  (XML                : access Glade_XML_Record;
   Name               :        String)
   return Gtk_Widget;




function Get_Widget_By_Long_Name
  (XML                : access Glade_XML_Record;
   Longname           :        String)
   return Gtk_Widget;




function Relative_File         
  (XML                : access Glade_XML_Record;
   Filename           :        String)
   return String;




function Get_Widget_Name       
  (Widget             : access Gtk_Widget_Record'Class)
   return String;




function Get_Widget_Long_Name  
  (Widget             : access Gtk_Widget_Record'Class)
   return String;




function Get_Widget_Tree       
  (Widget             : access Gtk_Widget_Record'Class)
   return Glade_XML;




procedure Set_Custom_Handler   
  (Handler            :        Custom_Widget_Handler);





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