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-2007 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 declares an abstract type, parent of several widgets in 
  32. --  GtkAda. 
  33. --  </description> 
  34. --  <c_version>2.8.17</c_version> 
  35. --  <group>Abstract base classes</group> 
  36.  
  37. with Gtk.Bin; 
  38.  
  39. package Gtk.Item is 
  40.  
  41.    type Gtk_Item_Record is new Bin.Gtk_Bin_Record with private; 
  42.    type Gtk_Item is access all Gtk_Item_Record'Class; 
  43.  
  44.    function Get_Type return Gtk.Gtk_Type; 
  45.    --  Return the internal value associated with a Gtk_Item. 
  46.  
  47.    procedure Item_Select (Item : access Gtk_Item_Record); 
  48.    --  Emits the "select" signal on Item 
  49.  
  50.    procedure Item_Deselect (Item : access Gtk_Item_Record); 
  51.    --  Emits the "deselect" signal on item 
  52.  
  53.    procedure Toggle (Item : access Gtk_Item_Record); 
  54.    --  Emits the "toggle" signal on item 
  55.  
  56.    ---------------- 
  57.    -- Properties -- 
  58.    ---------------- 
  59.  
  60.    --  <properties> 
  61.    --  The following properties are defined for this widget. See 
  62.    --  Glib.Properties for more information on properties. 
  63.    -- 
  64.    --  </properties> 
  65.  
  66.    ------------- 
  67.    -- Signals -- 
  68.    ------------- 
  69.  
  70.    --  <signals> 
  71.    --  The following new signals are defined for this widget: 
  72.    -- 
  73.    --  - "select" 
  74.    --    procedure Handler (Item : access Gtk_Item_Record'Class); 
  75.    --    Emitted when the item is selected 
  76.    -- 
  77.    --  - "deselect" 
  78.    --    procedure Handler (Item : access Gtk_Item_Record'Class); 
  79.    --    Emitted when the item is deselected 
  80.    -- 
  81.    --  - "toggle" 
  82.    --    procedure Handler (Item : access Gtk_Item_Record'Class); 
  83.    --    Emitted when the item is toggled 
  84.    --  </signals> 
  85.  
  86.    Signal_Deselect : constant Glib.Signal_Name := "deselect"; 
  87.    Signal_Select   : constant Glib.Signal_Name := "select"; 
  88.    Signal_Toggle   : constant Glib.Signal_Name := "toggle"; 
  89.  
  90. private 
  91.    type Gtk_Item_Record is new Gtk.Bin.Gtk_Bin_Record with null record; 
  92.  
  93.    pragma Import (C, Get_Type, "gtk_item_get_type"); 
  94. end Gtk.Item;