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. --  A separator is a vertical or horizontal line that can be displayed between 
  32. --  widgets, to provide visual grouping of the widgets into meaningful groups. 
  33. --  It is for instance used in dialogs to isolate the actual contents of the 
  34. --  dialogs and the various buttons to acknowledge the dialog (OK, Cancel,...) 
  35. -- 
  36. --  </description> 
  37. --  <screenshot>gtk-separator</screenshot> 
  38. --  <group>Ornaments</group> 
  39.  
  40. pragma Warnings (Off, "*is already use-visible*"); 
  41. with Glib;           use Glib; 
  42. with Glib.Types;     use Glib.Types; 
  43. with Gtk.Buildable;  use Gtk.Buildable; 
  44. with Gtk.Enums;      use Gtk.Enums; 
  45. with Gtk.Orientable; use Gtk.Orientable; 
  46. with Gtk.Widget;     use Gtk.Widget; 
  47.  
  48. package Gtk.Separator is 
  49.  
  50.    type Gtk_Separator_Record is new Gtk_Widget_Record with null record; 
  51.    type Gtk_Separator is access all Gtk_Separator_Record'Class; 
  52.  
  53.    subtype Gtk_Vseparator_Record is Gtk_Separator_Record; 
  54.    subtype Gtk_Vseparator is Gtk_Separator; 
  55.  
  56.    subtype Gtk_Hseparator_Record is Gtk_Separator_Record; 
  57.    subtype Gtk_Hseparator is Gtk_Separator; 
  58.  
  59.    ------------------ 
  60.    -- Constructors -- 
  61.    ------------------ 
  62.  
  63.    function Get_Type return Glib.GType; 
  64.    pragma Import (C, Get_Type, "gtk_separator_get_type"); 
  65.  
  66.    procedure Gtk_New_Vseparator (Separator : out Gtk_Vseparator); 
  67.    procedure Initialize_Vseparator 
  68.       (Separator : access Gtk_Vseparator_Record'Class); 
  69.    --  Creates a new Gtk.Separator.Gtk_Vseparator. 
  70.  
  71.    function Vseparator_Get_Type return Glib.GType; 
  72.    pragma Import (C, Vseparator_Get_Type, "gtk_vseparator_get_type"); 
  73.  
  74.    procedure Gtk_New_Hseparator (Separator : out Gtk_Hseparator); 
  75.    procedure Initialize_Hseparator 
  76.       (Separator : access Gtk_Hseparator_Record'Class); 
  77.  
  78.    function Hseparator_Get_Type return Glib.GType; 
  79.    pragma Import (C, Hseparator_Get_Type, "gtk_hseparator_get_type"); 
  80.  
  81.    --------------------- 
  82.    -- Interfaces_Impl -- 
  83.    --------------------- 
  84.  
  85.    function Get_Orientation 
  86.       (Self : access Gtk_Separator_Record) return Gtk.Enums.Gtk_Orientation; 
  87.    procedure Set_Orientation 
  88.       (Self        : access Gtk_Separator_Record; 
  89.        Orientation : Gtk.Enums.Gtk_Orientation); 
  90.  
  91.    ---------------- 
  92.    -- Interfaces -- 
  93.    ---------------- 
  94.    --  This class implements several interfaces. See Glib.Types 
  95.    -- 
  96.    --  - "Buildable" 
  97.    -- 
  98.    --  - "Orientable" 
  99.  
  100.    package Implements_Buildable is new Glib.Types.Implements 
  101.      (Gtk.Buildable.Gtk_Buildable, Gtk_Separator_Record, Gtk_Separator); 
  102.    function "+" 
  103.      (Widget : access Gtk_Separator_Record'Class) 
  104.    return Gtk.Buildable.Gtk_Buildable 
  105.    renames Implements_Buildable.To_Interface; 
  106.    function "-" 
  107.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  108.    return Gtk_Separator 
  109.    renames Implements_Buildable.To_Object; 
  110.  
  111.    package Implements_Orientable is new Glib.Types.Implements 
  112.      (Gtk.Orientable.Gtk_Orientable, Gtk_Separator_Record, Gtk_Separator); 
  113.    function "+" 
  114.      (Widget : access Gtk_Separator_Record'Class) 
  115.    return Gtk.Orientable.Gtk_Orientable 
  116.    renames Implements_Orientable.To_Interface; 
  117.    function "-" 
  118.      (Interf : Gtk.Orientable.Gtk_Orientable) 
  119.    return Gtk_Separator 
  120.    renames Implements_Orientable.To_Object; 
  121.  
  122. end Gtk.Separator;