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-2011, 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. -- -- -- -- -- -- -- -- -- -- -- --
  23. ----------------------------------------------------------------------- 
  24.  
  25. --  <description> 
  26. --  This package defines a separator widget that can be inserted in a toolbar, 
  27. --  to create groups of widgets in the latter. 
  28. -- 
  29. --  </description> 
  30. --  <group>Menus and Toolbars</group> 
  31.  
  32. pragma Warnings (Off, "*is already use-visible*"); 
  33. with Glib;            use Glib; 
  34. with Glib.Properties; use Glib.Properties; 
  35. with Glib.Types;      use Glib.Types; 
  36. with Gtk.Action;      use Gtk.Action; 
  37. with Gtk.Activatable; use Gtk.Activatable; 
  38. with Gtk.Buildable;   use Gtk.Buildable; 
  39. with Gtk.Tool_Item;   use Gtk.Tool_Item; 
  40.  
  41. package Gtk.Separator_Tool_Item is 
  42.  
  43.    type Gtk_Separator_Tool_Item_Record is new Gtk_Tool_Item_Record with null record; 
  44.    type Gtk_Separator_Tool_Item is access all Gtk_Separator_Tool_Item_Record'Class; 
  45.  
  46.    ------------------ 
  47.    -- Constructors -- 
  48.    ------------------ 
  49.  
  50.    procedure Gtk_New (Item : out Gtk_Separator_Tool_Item); 
  51.    procedure Initialize (Item : access Gtk_Separator_Tool_Item_Record'Class); 
  52.    --  Create a new Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item 
  53.    --  Since: gtk+ 2.4 
  54.  
  55.    function Get_Type return Glib.GType; 
  56.    pragma Import (C, Get_Type, "gtk_separator_tool_item_get_type"); 
  57.  
  58.    ------------- 
  59.    -- Methods -- 
  60.    ------------- 
  61.  
  62.    function Get_Draw 
  63.       (Item : access Gtk_Separator_Tool_Item_Record) return Boolean; 
  64.    procedure Set_Draw 
  65.       (Item : access Gtk_Separator_Tool_Item_Record; 
  66.        Draw : Boolean); 
  67.    --  Whether Item is drawn as a vertical line, or just blank. Setting this 
  68.    --  to False along with Gtk.Tool_Item.Set_Expand is useful to create an item 
  69.    --  that forces following items to the end of the toolbar. 
  70.    --  Since: gtk+ 2.4 
  71.    --  "draw": whether Item is drawn as a vertical line 
  72.  
  73.    --------------------- 
  74.    -- Interfaces_Impl -- 
  75.    --------------------- 
  76.  
  77.    procedure Do_Set_Related_Action 
  78.       (Self   : access Gtk_Separator_Tool_Item_Record; 
  79.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  80.  
  81.    function Get_Related_Action 
  82.       (Self : access Gtk_Separator_Tool_Item_Record) 
  83.        return Gtk.Action.Gtk_Action; 
  84.    procedure Set_Related_Action 
  85.       (Self   : access Gtk_Separator_Tool_Item_Record; 
  86.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  87.  
  88.    function Get_Use_Action_Appearance 
  89.       (Self : access Gtk_Separator_Tool_Item_Record) return Boolean; 
  90.    procedure Set_Use_Action_Appearance 
  91.       (Self           : access Gtk_Separator_Tool_Item_Record; 
  92.        Use_Appearance : Boolean); 
  93.  
  94.    procedure Sync_Action_Properties 
  95.       (Self   : access Gtk_Separator_Tool_Item_Record; 
  96.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  97.  
  98.    ---------------- 
  99.    -- Interfaces -- 
  100.    ---------------- 
  101.    --  This class implements several interfaces. See Glib.Types 
  102.    -- 
  103.    --  - "Activatable" 
  104.    -- 
  105.    --  - "Buildable" 
  106.  
  107.    package Implements_Activatable is new Glib.Types.Implements 
  108.      (Gtk.Activatable.Gtk_Activatable, Gtk_Separator_Tool_Item_Record, Gtk_Separator_Tool_Item); 
  109.    function "+" 
  110.      (Widget : access Gtk_Separator_Tool_Item_Record'Class) 
  111.    return Gtk.Activatable.Gtk_Activatable 
  112.    renames Implements_Activatable.To_Interface; 
  113.    function "-" 
  114.      (Interf : Gtk.Activatable.Gtk_Activatable) 
  115.    return Gtk_Separator_Tool_Item 
  116.    renames Implements_Activatable.To_Object; 
  117.  
  118.    package Implements_Buildable is new Glib.Types.Implements 
  119.      (Gtk.Buildable.Gtk_Buildable, Gtk_Separator_Tool_Item_Record, Gtk_Separator_Tool_Item); 
  120.    function "+" 
  121.      (Widget : access Gtk_Separator_Tool_Item_Record'Class) 
  122.    return Gtk.Buildable.Gtk_Buildable 
  123.    renames Implements_Buildable.To_Interface; 
  124.    function "-" 
  125.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  126.    return Gtk_Separator_Tool_Item 
  127.    renames Implements_Buildable.To_Object; 
  128.  
  129.    ---------------- 
  130.    -- Properties -- 
  131.    ---------------- 
  132.    --  The following properties are defined for this widget. See 
  133.    --  Glib.Properties for more information on properties) 
  134.    -- 
  135.    --  Name: Draw_Property 
  136.    --  Type: Boolean 
  137.    --  Flags: read-write 
  138.  
  139.    Draw_Property : constant Glib.Properties.Property_Boolean; 
  140.  
  141. private 
  142.    Draw_Property : constant Glib.Properties.Property_Boolean := 
  143.      Glib.Properties.Build ("draw"); 
  144. end Gtk.Separator_Tool_Item;