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-2006 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. --  The Gtk_Color_Selection_Dialog provides a standard dialog which allows the 
  32. --  user to select a color much like the Gtk_File_Selection provides a standard 
  33. --  dialog for file selection. 
  34. --  </description> 
  35. --  <c_version>2.8.17</c_version> 
  36. --  <group>Drawing</group> 
  37.  
  38. with Gtk.Dialog; 
  39. with Gtk.Button; 
  40. with Gtk.Color_Selection; 
  41.  
  42. package Gtk.Color_Selection_Dialog is 
  43.  
  44.    type Gtk_Color_Selection_Dialog_Record is new 
  45.      Gtk.Dialog.Gtk_Dialog_Record with private; 
  46.    type Gtk_Color_Selection_Dialog 
  47.      is access all Gtk_Color_Selection_Dialog_Record'Class; 
  48.  
  49.    procedure Gtk_New 
  50.      (Color_Selection_Dialog : out Gtk_Color_Selection_Dialog; 
  51.       Title                  : UTF8_String); 
  52.    --  Create a new Color_Selection_Dialog with a specified title. 
  53.  
  54.    procedure Initialize 
  55.      (Color_Selection_Dialog : access Gtk_Color_Selection_Dialog_Record'Class; 
  56.       Title                  : UTF8_String); 
  57.    --  Internal initialization function. 
  58.    --  See the section "Creating your own widgets" in the documentation. 
  59.  
  60.    function Get_Type return Gtk.Gtk_Type; 
  61.    --  Return the internal value associated with a Gtk_Menu. 
  62.  
  63.    ----------------------------------------------- 
  64.    -- Functions to get the fields of the dialog -- 
  65.    ----------------------------------------------- 
  66.  
  67.    function Get_Colorsel 
  68.      (Color_Selection_Dialog : access Gtk_Color_Selection_Dialog_Record) 
  69.       return Gtk.Color_Selection.Gtk_Color_Selection; 
  70.    --  Get the Gtk_Color_Selection widget contained within the dialog. 
  71.    --  Use this widget and its Gtk.Color_Selection.Get_Color function to gain 
  72.    --  access to the selected color. Connect a handler for this widget's 
  73.    --  color_changed signal to be notified when the color changes. 
  74.  
  75.    function Get_OK_Button 
  76.      (Color_Selection_Dialog : access Gtk_Color_Selection_Dialog_Record) 
  77.       return Gtk.Button.Gtk_Button; 
  78.    --  Get the OK button widget contained within the dialog. 
  79.  
  80.    function Get_Cancel_Button 
  81.      (Color_Selection_Dialog : access Gtk_Color_Selection_Dialog_Record) 
  82.       return Gtk.Button.Gtk_Button; 
  83.    --  Get the cancel button widget contained within the dialog. 
  84.  
  85.    function Get_Help_Button 
  86.      (Color_Selection_Dialog : access Gtk_Color_Selection_Dialog_Record) 
  87.       return Gtk.Button.Gtk_Button; 
  88.    --  Get the help button widget contained within the dialog. 
  89.  
  90.    ---------------- 
  91.    -- Properties -- 
  92.    ---------------- 
  93.  
  94.    --  <properties> 
  95.    --  The following properties are defined for this widget. See 
  96.    --  Glib.Properties for more information on properties. 
  97.    -- 
  98.    --  </properties> 
  99.  
  100.    ------------- 
  101.    -- Signals -- 
  102.    ------------- 
  103.  
  104.    --  <signals> 
  105.    --  The following new signals are defined for this widget: 
  106.    -- 
  107.    --  </signals> 
  108.  
  109. private 
  110.    type Gtk_Color_Selection_Dialog_Record is new 
  111.      Gtk.Dialog.Gtk_Dialog_Record with null record; 
  112.  
  113.    pragma Import (C, Get_Type, "gtk_color_selection_dialog_get_type"); 
  114. end Gtk.Color_Selection_Dialog;