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. --  GtkSeparator is a horizontal or vertical separator widget, depending on 
  26. --  the value of the Gtk.Orientable.Gtk_Orientable:orientation property, used 
  27. --  to group the widgets within a window. It displays a line with a shadow to 
  28. --  make it appear sunken into the interface. 
  29. -- 
  30. --  </description> 
  31. --  <screenshot>gtk-separator</screenshot> 
  32. --  <group>Ornaments</group> 
  33. pragma Ada_2005; 
  34.  
  35. pragma Warnings (Off, "*is already use-visible*"); 
  36. with Glib;           use Glib; 
  37. with Glib.Types;     use Glib.Types; 
  38. with Gtk.Buildable;  use Gtk.Buildable; 
  39. with Gtk.Enums;      use Gtk.Enums; 
  40. with Gtk.Orientable; use Gtk.Orientable; 
  41. with Gtk.Widget;     use Gtk.Widget; 
  42.  
  43. package Gtk.Separator is 
  44.  
  45.    type Gtk_Separator_Record is new Gtk_Widget_Record with null record; 
  46.    type Gtk_Separator is access all Gtk_Separator_Record'Class; 
  47.  
  48.    subtype Gtk_Hseparator_Record is Gtk_Separator_Record; 
  49.    subtype Gtk_Hseparator is Gtk_Separator; 
  50.  
  51.    subtype Gtk_Vseparator_Record is Gtk_Separator_Record; 
  52.    subtype Gtk_Vseparator is Gtk_Separator; 
  53.  
  54.    ------------------ 
  55.    -- Constructors -- 
  56.    ------------------ 
  57.  
  58.    procedure Gtk_New 
  59.       (Separator   : out Gtk_Separator; 
  60.        Orientation : Gtk.Enums.Gtk_Orientation); 
  61.    procedure Initialize 
  62.       (Separator   : not null access Gtk_Separator_Record'Class; 
  63.        Orientation : Gtk.Enums.Gtk_Orientation); 
  64.    --  Creates a new Gtk.Separator.Gtk_Separator with the given orientation. 
  65.    --  Since: gtk+ 3.0 
  66.    --  "orientation": the separator's orientation. 
  67.  
  68.    function Gtk_Separator_New 
  69.       (Orientation : Gtk.Enums.Gtk_Orientation) return Gtk_Separator; 
  70.    --  Creates a new Gtk.Separator.Gtk_Separator with the given orientation. 
  71.    --  Since: gtk+ 3.0 
  72.    --  "orientation": the separator's orientation. 
  73.  
  74.    function Get_Type return Glib.GType; 
  75.    pragma Import (C, Get_Type, "gtk_separator_get_type"); 
  76.  
  77.    procedure Gtk_New_Hseparator (Separator : out Gtk_Hseparator); 
  78.    procedure Initialize_Hseparator 
  79.       (Separator : not null access Gtk_Hseparator_Record'Class); 
  80.    --  Creates a new Gtk.Separator.Gtk_Hseparator. 
  81.  
  82.    function Gtk_Hseparator_New return Gtk_Hseparator; 
  83.    --  Creates a new Gtk.Separator.Gtk_Hseparator. 
  84.  
  85.    function Hseparator_Get_Type return Glib.GType; 
  86.    pragma Import (C, Hseparator_Get_Type, "gtk_hseparator_get_type"); 
  87.  
  88.    procedure Gtk_New_Vseparator (Separator : out Gtk_Vseparator); 
  89.    procedure Initialize_Vseparator 
  90.       (Separator : not null access Gtk_Vseparator_Record'Class); 
  91.    --  Creates a new Gtk.Separator.Gtk_Vseparator. 
  92.  
  93.    function Gtk_Vseparator_New return Gtk_Vseparator; 
  94.    --  Creates a new Gtk.Separator.Gtk_Vseparator. 
  95.  
  96.    function Vseparator_Get_Type return Glib.GType; 
  97.    pragma Import (C, Vseparator_Get_Type, "gtk_vseparator_get_type"); 
  98.  
  99.    --------------------------------------------- 
  100.    -- Inherited subprograms (from interfaces) -- 
  101.    --------------------------------------------- 
  102.    --  Methods inherited from the Buildable interface are not duplicated here 
  103.    --  since they are meant to be used by tools, mostly. If you need to call 
  104.    --  them, use an explicit cast through the "-" operator below. 
  105.  
  106.    function Get_Orientation 
  107.       (Self : not null access Gtk_Separator_Record) 
  108.        return Gtk.Enums.Gtk_Orientation; 
  109.  
  110.    procedure Set_Orientation 
  111.       (Self        : not null access Gtk_Separator_Record; 
  112.        Orientation : Gtk.Enums.Gtk_Orientation); 
  113.  
  114.    ---------------- 
  115.    -- Interfaces -- 
  116.    ---------------- 
  117.    --  This class implements several interfaces. See Glib.Types 
  118.    -- 
  119.    --  - "Buildable" 
  120.    -- 
  121.    --  - "Orientable" 
  122.  
  123.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  124.      (Gtk.Buildable.Gtk_Buildable, Gtk_Separator_Record, Gtk_Separator); 
  125.    function "+" 
  126.      (Widget : access Gtk_Separator_Record'Class) 
  127.    return Gtk.Buildable.Gtk_Buildable 
  128.    renames Implements_Gtk_Buildable.To_Interface; 
  129.    function "-" 
  130.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  131.    return Gtk_Separator 
  132.    renames Implements_Gtk_Buildable.To_Object; 
  133.  
  134.    package Implements_Gtk_Orientable is new Glib.Types.Implements 
  135.      (Gtk.Orientable.Gtk_Orientable, Gtk_Separator_Record, Gtk_Separator); 
  136.    function "+" 
  137.      (Widget : access Gtk_Separator_Record'Class) 
  138.    return Gtk.Orientable.Gtk_Orientable 
  139.    renames Implements_Gtk_Orientable.To_Interface; 
  140.    function "-" 
  141.      (Interf : Gtk.Orientable.Gtk_Orientable) 
  142.    return Gtk_Separator 
  143.    renames Implements_Gtk_Orientable.To_Object; 
  144.  
  145. end Gtk.Separator;