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. --  The Gtk_Color_Selection_Dialog provides a standard dialog which allows the 
  26. --  user to select a color much like the Gtk_File_Selection provides a standard 
  27. --  dialog for file selection. 
  28. -- 
  29. --  </description> 
  30. --  <group>Drawing</group> 
  31. pragma Ada_2005; 
  32.  
  33. pragma Warnings (Off, "*is already use-visible*"); 
  34. with Glib;                use Glib; 
  35. with Glib.Properties;     use Glib.Properties; 
  36. with Glib.Types;          use Glib.Types; 
  37. with Gtk.Buildable;       use Gtk.Buildable; 
  38. with Gtk.Color_Selection; use Gtk.Color_Selection; 
  39. with Gtk.Dialog;          use Gtk.Dialog; 
  40.  
  41. package Gtk.Color_Selection_Dialog is 
  42.  
  43.    type Gtk_Color_Selection_Dialog_Record is new Gtk_Dialog_Record with null record; 
  44.    type Gtk_Color_Selection_Dialog is access all Gtk_Color_Selection_Dialog_Record'Class; 
  45.  
  46.    ------------------ 
  47.    -- Constructors -- 
  48.    ------------------ 
  49.  
  50.    procedure Gtk_New 
  51.       (Color_Selection_Dialog : out Gtk_Color_Selection_Dialog; 
  52.        Title                  : UTF8_String); 
  53.    procedure Initialize 
  54.       (Color_Selection_Dialog : not null access Gtk_Color_Selection_Dialog_Record'Class; 
  55.        Title                  : UTF8_String); 
  56.    --  Creates a new Gtk.Color_Selection_Dialog.Gtk_Color_Selection_Dialog. 
  57.    --  "title": a string containing the title text for the dialog. 
  58.  
  59.    function Gtk_Color_Selection_Dialog_New 
  60.       (Title : UTF8_String) return Gtk_Color_Selection_Dialog; 
  61.    --  Creates a new Gtk.Color_Selection_Dialog.Gtk_Color_Selection_Dialog. 
  62.    --  "title": a string containing the title text for the dialog. 
  63.  
  64.    function Get_Type return Glib.GType; 
  65.    pragma Import (C, Get_Type, "gtk_color_selection_dialog_get_type"); 
  66.  
  67.    ------------- 
  68.    -- Methods -- 
  69.    ------------- 
  70.  
  71.    function Get_Color_Selection 
  72.       (Color_Selection_Dialog : not null access Gtk_Color_Selection_Dialog_Record) 
  73.        return Gtk.Color_Selection.Gtk_Color_Selection; 
  74.    --  Retrieves the Gtk.Color_Selection.Gtk_Color_Selection widget embedded 
  75.    --  in the dialog. 
  76.    --  Since: gtk+ 2.14 
  77.  
  78.    ---------------- 
  79.    -- Properties -- 
  80.    ---------------- 
  81.    --  The following properties are defined for this widget. See 
  82.    --  Glib.Properties for more information on properties) 
  83.  
  84.    Cancel_Button_Property : constant Glib.Properties.Property_Object; 
  85.    --  Type: Gtk.Widget.Gtk_Widget 
  86.  
  87.    Color_Selection_Property : constant Glib.Properties.Property_Object; 
  88.    --  Type: Gtk.Widget.Gtk_Widget 
  89.  
  90.    Help_Button_Property : constant Glib.Properties.Property_Object; 
  91.    --  Type: Gtk.Widget.Gtk_Widget 
  92.  
  93.    Ok_Button_Property : constant Glib.Properties.Property_Object; 
  94.    --  Type: Gtk.Widget.Gtk_Widget 
  95.  
  96.    ---------------- 
  97.    -- Interfaces -- 
  98.    ---------------- 
  99.    --  This class implements several interfaces. See Glib.Types 
  100.    -- 
  101.    --  - "Buildable" 
  102.  
  103.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  104.      (Gtk.Buildable.Gtk_Buildable, Gtk_Color_Selection_Dialog_Record, Gtk_Color_Selection_Dialog); 
  105.    function "+" 
  106.      (Widget : access Gtk_Color_Selection_Dialog_Record'Class) 
  107.    return Gtk.Buildable.Gtk_Buildable 
  108.    renames Implements_Gtk_Buildable.To_Interface; 
  109.    function "-" 
  110.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  111.    return Gtk_Color_Selection_Dialog 
  112.    renames Implements_Gtk_Buildable.To_Object; 
  113.  
  114. private 
  115.    Ok_Button_Property : constant Glib.Properties.Property_Object := 
  116.      Glib.Properties.Build ("ok-button"); 
  117.    Help_Button_Property : constant Glib.Properties.Property_Object := 
  118.      Glib.Properties.Build ("help-button"); 
  119.    Color_Selection_Property : constant Glib.Properties.Property_Object := 
  120.      Glib.Properties.Build ("color-selection"); 
  121.    Cancel_Button_Property : constant Glib.Properties.Property_Object := 
  122.      Glib.Properties.Build ("cancel-button"); 
  123. end Gtk.Color_Selection_Dialog;