1. ----------------------------------------------------------------------- 
  2. --               GtkAda - Ada95 binding for Gtk+/Gnome               -- 
  3. --                                                                   -- 
  4. --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   -- 
  5. --                Copyright (C) 2000-2006 AdaCore                    -- 
  6. --                                                                   -- 
  7. -- This library is free software; you can redistribute it and/or     -- 
  8. -- modify it under the terms of the GNU General Public               -- 
  9. -- License as published by the Free Software Foundation; either      -- 
  10. -- version 2 of the License, or (at your option) any later version.  -- 
  11. --                                                                   -- 
  12. -- This library is distributed in the hope that it will be useful,   -- 
  13. -- but WITHOUT ANY WARRANTY; without even the implied warranty of    -- 
  14. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -- 
  15. -- General Public License for more details.                          -- 
  16. --                                                                   -- 
  17. -- You should have received a copy of the GNU General Public         -- 
  18. -- License along with this library; if not, write to the             -- 
  19. -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      -- 
  20. -- Boston, MA 02111-1307, USA.                                       -- 
  21. --                                                                   -- 
  22. -- As a special exception, if other files instantiate generics from  -- 
  23. -- this unit, or you link this unit with other files to produce an   -- 
  24. -- executable, this  unit  does not  by itself cause  the resulting  -- 
  25. -- executable to be covered by the GNU General Public License. This  -- 
  26. -- exception does not however invalidate any other reasons why the   -- 
  27. -- executable file  might be covered by the  GNU Public License.     -- 
  28. ----------------------------------------------------------------------- 
  29.  
  30. --  <description> 
  31. --  Gtk_Menu_Bar is a subclass of Gtk_Menu_Shell which contains one to many 
  32. --  Gtk_Menu_Item. The result is a standard menu bar which can hold many menu 
  33. --  items. Gtk_Menu_Bar allows for a shadow type to be set for aesthetic 
  34. --  purposes. 
  35. --  </description> 
  36. --  <c_version>2.8.17</c_version> 
  37. --  <group>Menus and Toolbars</group> 
  38. --  <screenshot>gtk-menu_bar</screenshot> 
  39.  
  40. with Glib.Properties; 
  41. with Gtk.Enums; 
  42. with Gtk.Menu_Shell; 
  43.  
  44. package Gtk.Menu_Bar is 
  45.  
  46.    type Gtk_Menu_Bar_Record is new 
  47.      Gtk.Menu_Shell.Gtk_Menu_Shell_Record with private; 
  48.    type Gtk_Menu_Bar is access all Gtk_Menu_Bar_Record'Class; 
  49.  
  50.    procedure Gtk_New (Menu_Bar : out Gtk_Menu_Bar); 
  51.    --  Create a menu bar. 
  52.  
  53.    procedure Initialize (Menu_Bar : access Gtk_Menu_Bar_Record'Class); 
  54.    --  Internal initialization function. 
  55.    --  See the section "Creating your own widgets" in the documentation. 
  56.  
  57.    function Get_Type return Gtk.Gtk_Type; 
  58.    --  Return the internal value associated with a Gtk_Menu_Bar. 
  59.  
  60.    procedure Set_Child_Pack_Direction 
  61.      (Menubar        : access Gtk_Menu_Bar_Record; 
  62.       Child_Pack_Dir : Gtk.Enums.Gtk_Pack_Direction); 
  63.    function Get_Child_Pack_Direction 
  64.      (Menubar : access Gtk_Menu_Bar_Record) 
  65.       return Gtk.Enums.Gtk_Pack_Direction; 
  66.    --  Sets how widgets should be packed inside the children of a menubar. 
  67.  
  68.    procedure Set_Pack_Direction 
  69.      (Menubar  : access Gtk_Menu_Bar_Record; 
  70.       Pack_Dir : Gtk.Enums.Gtk_Pack_Direction); 
  71.    function Get_Pack_Direction 
  72.      (Menubar : access Gtk_Menu_Bar_Record) 
  73.       return Gtk.Enums.Gtk_Pack_Direction; 
  74.    --  Sets how items should be packed inside a menubar. 
  75.  
  76.    ---------------- 
  77.    -- Properties -- 
  78.    ---------------- 
  79.    --  The following properties are defined for this widget. See 
  80.    --  Glib.Properties for more information on properties. 
  81.  
  82.    --  <properties> 
  83.    --  Name:  Child_Pack_Direction_Property 
  84.    --  Type:  Enum 
  85.    --  Descr: The child pack direction of the menubar 
  86.    -- 
  87.    --  Name:  Pack_Direction_Property 
  88.    --  Type:  Enum 
  89.    --  Descr: The pack direction of the menubar 
  90.    --  </properties> 
  91.  
  92.    Child_Pack_Direction_Property : constant Gtk.Enums.Property_Pack_Direction; 
  93.    Pack_Direction_Property       : constant Gtk.Enums.Property_Pack_Direction; 
  94.  
  95.    ---------------------- 
  96.    -- Style Properties -- 
  97.    ---------------------- 
  98.    --  The following properties can be changed through the gtk theme and 
  99.    --  configuration files, and retrieved through Gtk.Widget.Style_Get_Property 
  100.  
  101.    --  <style_properties> 
  102.    --  Name:  Internal_Padding_Property 
  103.    --  Type:  Int 
  104.    --  Descr: Amount of border space between the menubar shadow and the menu 
  105.    --         items 
  106.    -- 
  107.    --  Name:  Shadow_Type_Property 
  108.    --  Type:  Enum 
  109.    --  Descr: Style of bevel around the menubar 
  110.    --  </style_properties> 
  111.  
  112.    Internal_Padding_Property : constant Glib.Properties.Property_Int; 
  113.    Shadow_Type_Property      : constant Gtk.Enums.Property_Gtk_Shadow_Type; 
  114.  
  115. private 
  116.    type Gtk_Menu_Bar_Record is new Gtk.Menu_Shell.Gtk_Menu_Shell_Record 
  117.      with null record; 
  118.  
  119.    Child_Pack_Direction_Property : constant Gtk.Enums.Property_Pack_Direction 
  120.      := Gtk.Enums.Build ("child-pack-direction"); 
  121.    Pack_Direction_Property : constant Gtk.Enums.Property_Pack_Direction := 
  122.      Gtk.Enums.Build ("pack-direction"); 
  123.  
  124.    Internal_Padding_Property : constant Glib.Properties.Property_Int := 
  125.      Glib.Properties.Build ("internal-padding"); 
  126.    Shadow_Type_Property : constant Gtk.Enums.Property_Gtk_Shadow_Type := 
  127.      Gtk.Enums.Build ("shadow-type"); 
  128.  
  129.    pragma Import (C, Get_Type, "gtk_menu_bar_get_type"); 
  130.  
  131. end Gtk.Menu_Bar;