This package provides the low level Gate API to generate code for the GUI builder. see section Package Gtk.Glade for the high level routines.
Types |
---|
type XML_Data is record Created : Boolean := False; -- True if the corresponding object has been created Has_Container : Boolean := False; -- True if object has a container Initialized : Boolean := False; -- True if object has been initialized, in other words, no further -- action is required on this widget. Has_Accel_Group : Boolean := False; -- True if object has created an accelerator group Has_Radio_Group : Boolean := False; -- True if object has created a radio button/menu_item group end record; | |
Extra Data added to each node of the XML tree when parsing a
Glade file. This node summarizes the characteristics of the widget
bound to that node.
|
Subprograms |
---|
procedure Add_Package (S : String); | ||
Add package S in the list of packages if S isn't already present. | ||
function Adjust (S : String) return String; | ||
Replace non "compilable" characters (e.g ASCII.LF). | ||
function Find_Parent (N : Node_Ptr; Class : String) return Node_Ptr; | ||
Find a node in the ancestors of N with a given class.
| ||
function Find_Top_Widget (N : Node_Ptr) return Node_Ptr; | ||
Find a node in the ancestors of N that represents a root widget.
| ||
function Find_Child (N : Node_Ptr; Tag : String) return Node_Ptr; | ||
Find a node in the children of N with a given Tag.
| ||
function To_Ada (S : String; Separator : Character := '_') return String; | ||
Convert S by adding a separator before each upper case character. | ||
function To_Float (S : String) return String; | ||
Convert S to an Ada Float by adding a trailing ".0" when needed.
| ||
function Get_Part (S : String; Part : Positive; Separator : Character := ':') return String; | ||
Get the Part-th part of S delimited by Separator.
| ||
procedure Gen_Set (N : Node_Ptr; Class, Name : String; File : File_Type; Prefix : String := ""; Postfix : String := ""; Is_Float : Boolean := False); | ||
Generate a Set_<Name> call in File. | ||
procedure Gen_Set (N : Node_Ptr; Class, Name, Field : String; File : File_Type); | ||
Generate a Set_<Name> (Field) call in File.
| ||
procedure Gen_Set (N : Node_Ptr; Class, Name, Field1, Field2, Field3, Field4 : String; File : File_Type; Is_Float : Boolean := False); | ||
Generate a Set_<Name> (Field1) call in File if Field2 is a null string. | ||
procedure Gen_New (N : Node_Ptr; Class : String; Param1, Param2, New_Name : String := ""; File : File_Type; Prefix : String := ""; Postfix : String := ""); | ||
Output a call to <Class>.Gtk_New in File. | ||
procedure Gen_New (N : Node_Ptr; Class, Param1, Param2, Param3, Param4, Param5 : String; File : File_Type; Prefix : String := ""; Postfix : String := ""); | ||
Output a call to <Class>.Gtk_New in File. | ||
procedure Gen_Child (N, Child : Node_Ptr; File : File_Type); | ||
Output an assignment in File of the form: | ||
procedure Gen_Call_Child (N, Child : Node_Ptr; Class, Call : String; Param1, Param2, Param3 : String := ""; File : File_Type); | ||
If N has a field "name", Output a call to Call in File of the form: | ||
procedure Gen_Packages (File : File_Type); | ||
Output to file all the packages that have been referenced in previous
with Gtk.xxx; use Gtk.xxx;
with Gtk.yyy; use Gtk.yyy;
| ||
procedure Reset_Packages; | ||
Reset the global table of packages.
| ||
procedure Reset_Tree (N : Node_Ptr; Check_Next : Boolean := True); | ||
Reset the value of the flags for each node contained in N. | ||
procedure Gen_Signal (N : Node_Ptr; File : File_Type; Widget_Class : String_Ptr := null); | ||
Output to file calls to connect if N contains any signal. | ||
function Gen_Signal_Instantiations (Project : String; File : File_Type) return Natural; | ||
Output to file all the instantiations of Gtk.Signal that have been | ||
function Gettext_Support (N : Node_Ptr) return Boolean; | ||
Return True if the project's parameter "gettext_support" is True.
| ||
function To_Package_Name (S : String) return String; | ||
Transform the name of a given Gtk+ widget into the corresponding GtkAda |