1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. --  <description> 
  25. --  A Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item is a 
  26. --  Gtk.Tool_Item.Gtk_Tool_Item that separates groups of other Gtk_Tool_Items. 
  27. --  Depending on the theme, a Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item 
  28. --  will often look like a vertical line on horizontally docked toolbars. 
  29. -- 
  30. --  If the Gtk.Toolbar.Gtk_Toolbar child property "expand" is True and the 
  31. --  property Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item:draw is False, a 
  32. --  Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item will act as a "spring" that 
  33. --  forces other items to the ends of the toolbar. 
  34. -- 
  35. --  Use Gtk.Separator_Tool_Item.Gtk_New to create a new 
  36. --  Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item. 
  37. -- 
  38. --  </description> 
  39. --  <group>Menus and Toolbars</group> 
  40. pragma Ada_2005; 
  41.  
  42. pragma Warnings (Off, "*is already use-visible*"); 
  43. with Glib;            use Glib; 
  44. with Glib.Properties; use Glib.Properties; 
  45. with Glib.Types;      use Glib.Types; 
  46. with Gtk.Action;      use Gtk.Action; 
  47. with Gtk.Activatable; use Gtk.Activatable; 
  48. with Gtk.Buildable;   use Gtk.Buildable; 
  49. with Gtk.Tool_Item;   use Gtk.Tool_Item; 
  50.  
  51. package Gtk.Separator_Tool_Item is 
  52.  
  53.    type Gtk_Separator_Tool_Item_Record is new Gtk_Tool_Item_Record with null record; 
  54.    type Gtk_Separator_Tool_Item is access all Gtk_Separator_Tool_Item_Record'Class; 
  55.  
  56.    ------------------ 
  57.    -- Constructors -- 
  58.    ------------------ 
  59.  
  60.    procedure Gtk_New (Item : out Gtk_Separator_Tool_Item); 
  61.    procedure Initialize 
  62.       (Item : not null access Gtk_Separator_Tool_Item_Record'Class); 
  63.    --  Create a new Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item 
  64.    --  Since: gtk+ 2.4 
  65.  
  66.    function Gtk_Separator_Tool_Item_New return Gtk_Separator_Tool_Item; 
  67.    --  Create a new Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item 
  68.    --  Since: gtk+ 2.4 
  69.  
  70.    function Get_Type return Glib.GType; 
  71.    pragma Import (C, Get_Type, "gtk_separator_tool_item_get_type"); 
  72.  
  73.    ------------- 
  74.    -- Methods -- 
  75.    ------------- 
  76.  
  77.    function Get_Draw 
  78.       (Item : not null access Gtk_Separator_Tool_Item_Record) return Boolean; 
  79.    --  Returns whether Item is drawn as a line, or just blank. See 
  80.    --  Gtk.Separator_Tool_Item.Set_Draw. 
  81.    --  Since: gtk+ 2.4 
  82.  
  83.    procedure Set_Draw 
  84.       (Item : not null access Gtk_Separator_Tool_Item_Record; 
  85.        Draw : Boolean); 
  86.    --  Whether Item is drawn as a vertical line, or just blank. Setting this 
  87.    --  to False along with Gtk.Tool_Item.Set_Expand is useful to create an item 
  88.    --  that forces following items to the end of the toolbar. 
  89.    --  Since: gtk+ 2.4 
  90.    --  "draw": whether Item is drawn as a vertical line 
  91.  
  92.    --------------------------------------------- 
  93.    -- Inherited subprograms (from interfaces) -- 
  94.    --------------------------------------------- 
  95.    --  Methods inherited from the Buildable interface are not duplicated here 
  96.    --  since they are meant to be used by tools, mostly. If you need to call 
  97.    --  them, use an explicit cast through the "-" operator below. 
  98.  
  99.    procedure Do_Set_Related_Action 
  100.       (Self   : not null access Gtk_Separator_Tool_Item_Record; 
  101.        Action : not null access Gtk.Action.Gtk_Action_Record'Class); 
  102.  
  103.    function Get_Related_Action 
  104.       (Self : not null access Gtk_Separator_Tool_Item_Record) 
  105.        return Gtk.Action.Gtk_Action; 
  106.  
  107.    procedure Set_Related_Action 
  108.       (Self   : not null access Gtk_Separator_Tool_Item_Record; 
  109.        Action : not null access Gtk.Action.Gtk_Action_Record'Class); 
  110.  
  111.    function Get_Use_Action_Appearance 
  112.       (Self : not null access Gtk_Separator_Tool_Item_Record) return Boolean; 
  113.  
  114.    procedure Set_Use_Action_Appearance 
  115.       (Self           : not null access Gtk_Separator_Tool_Item_Record; 
  116.        Use_Appearance : Boolean); 
  117.  
  118.    procedure Sync_Action_Properties 
  119.       (Self   : not null access Gtk_Separator_Tool_Item_Record; 
  120.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  121.  
  122.    ---------------- 
  123.    -- Properties -- 
  124.    ---------------- 
  125.    --  The following properties are defined for this widget. See 
  126.    --  Glib.Properties for more information on properties) 
  127.  
  128.    Draw_Property : constant Glib.Properties.Property_Boolean; 
  129.  
  130.    ---------------- 
  131.    -- Interfaces -- 
  132.    ---------------- 
  133.    --  This class implements several interfaces. See Glib.Types 
  134.    -- 
  135.    --  - "Activatable" 
  136.    -- 
  137.    --  - "Buildable" 
  138.  
  139.    package Implements_Gtk_Activatable is new Glib.Types.Implements 
  140.      (Gtk.Activatable.Gtk_Activatable, Gtk_Separator_Tool_Item_Record, Gtk_Separator_Tool_Item); 
  141.    function "+" 
  142.      (Widget : access Gtk_Separator_Tool_Item_Record'Class) 
  143.    return Gtk.Activatable.Gtk_Activatable 
  144.    renames Implements_Gtk_Activatable.To_Interface; 
  145.    function "-" 
  146.      (Interf : Gtk.Activatable.Gtk_Activatable) 
  147.    return Gtk_Separator_Tool_Item 
  148.    renames Implements_Gtk_Activatable.To_Object; 
  149.  
  150.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  151.      (Gtk.Buildable.Gtk_Buildable, Gtk_Separator_Tool_Item_Record, Gtk_Separator_Tool_Item); 
  152.    function "+" 
  153.      (Widget : access Gtk_Separator_Tool_Item_Record'Class) 
  154.    return Gtk.Buildable.Gtk_Buildable 
  155.    renames Implements_Gtk_Buildable.To_Interface; 
  156.    function "-" 
  157.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  158.    return Gtk_Separator_Tool_Item 
  159.    renames Implements_Gtk_Buildable.To_Object; 
  160.  
  161. private 
  162.    Draw_Property : constant Glib.Properties.Property_Boolean := 
  163.      Glib.Properties.Build ("draw"); 
  164. end Gtk.Separator_Tool_Item;