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