1. ----------------------------------------------------------------------- 
  2. --                   Gate - GtkAda Components                        -- 
  3. --                                                                   -- 
  4. --                   Copyright (C) 1999-2001                         -- 
  5. --        Emmanuel Briot, Joel Brobecker and Arnaud Charlet          -- 
  6. --                   Copyright (C) 2002-2009, AdaCore                -- 
  7. --                                                                   -- 
  8. -- GATE is free software;  you can redistribute it and/or modify  it -- 
  9. -- under the terms of the GNU General Public License as published by -- 
  10. -- the Free Software Foundation; either version 2 of the License, or -- 
  11. -- (at your option) any later version.                               -- 
  12. --                                                                   -- 
  13. -- This program is  distributed in the hope that it will be  useful, -- 
  14. -- but  WITHOUT ANY WARRANTY;  without even the  implied warranty of -- 
  15. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -- 
  16. -- General Public License for more details. You should have received -- 
  17. -- a copy of the GNU General Public License along with this library; -- 
  18. -- if not,  write to the  Free Software Foundation, Inc.,  59 Temple -- 
  19. -- Place - Suite 330, Boston, MA 02111-1307, USA.                    -- 
  20. ----------------------------------------------------------------------- 
  21.  
  22. --  This package contains high level support for the Glade GUI builder. 
  23. --  It provides routines to generate Ada code from an XML definition file. 
  24. --  See package Glib.Glade for the low level GUI builder support. 
  25. --  <c_version>2.8.17</c_version> 
  26.  
  27. with Ada.Text_IO; use Ada.Text_IO; 
  28. with Glib.Glade; use Glib.Glade; use Glib.Glade.Glib_XML; 
  29.  
  30. package Gtk.Glade is 
  31.  
  32.    --------------------- 
  33.    -- Code Generation -- 
  34.    --------------------- 
  35.  
  36.    --  <doc_ignore> 
  37.  
  38.    type Generate_Ptr is access procedure (N : Node_Ptr; File : File_Type); 
  39.  
  40.    procedure Generic_Ptr (N : Node_Ptr; File : File_Type); 
  41.    --  Dummy Generate_Ptr that does nothing. 
  42.  
  43.    --  </doc_ignore> 
  44.  
  45.    function Get_Gate (Class : String) return Generate_Ptr; 
  46.    --  Return a Generate_Ptr corresponding to a specific Class. 
  47.    --  If class isn't found, return a pointer to Generic_Ptr. 
  48.  
  49.    procedure Generate (File : String); 
  50.    --  Parse file File and generate the corresponding Ada code on standard 
  51.    --  output. Note the .glade file should be passed here and not the 
  52.    --  .gladep file. 
  53.  
  54.    procedure Generate (Project_Name : String; Window : Node_Ptr); 
  55.    --  Generate the Ada code corresponding the creation of the 
  56.    --  Project and Window and its children on standard output. 
  57.  
  58.    procedure Register_Generate (Widget : String; Generate : Generate_Ptr); 
  59.    --  Register Callback as a procedure that knows how to generate code 
  60.    --  for a given Widget class. 
  61.    --  Widget is the C string representing the widget, e.g "GnomeCanvas". 
  62.  
  63. end Gtk.Glade;