1. ----------------------------------------------------------------------- 
  2. --               GtkAda - Ada95 binding for Gtk+/Gnome               -- 
  3. --                                                                   -- 
  4. --      Copyright (C) 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. -- -- -- -- -- -- -- -- -- -- -- --
  23. ----------------------------------------------------------------------- 
  24.  
  25. --  <description> 
  26. --  A Gtk_Item_Entry is a special kind of entry item used in a 
  27. --  Gtk_Sheet to edit the current cell. 
  28. --  It can be used independently, but you should rather use a more general 
  29. --  Gtk_Entry widget. 
  30. --  </description> 
  31. --  <c_version>gtkextra 2.1.1</c_version> 
  32. --  <group>GtkExtra, additional widgets</group> 
  33.  
  34. with Gtk.Enums; 
  35. with Gtk.GEntry; 
  36.  
  37. package Gtk.Extra.Item_Entry is 
  38.  
  39.    type Gtk_IEntry_Record is new Gtk.GEntry.Gtk_Entry_Record with private; 
  40.    type Gtk_IEntry is access all Gtk_IEntry_Record'Class; 
  41.  
  42.    subtype Gtk_Item_Entry_Record is Gtk_IEntry_Record; 
  43.    subtype Gtk_Item_Entry is Gtk_IEntry; 
  44.    --  This type is provided so as to be compatible with the new name used 
  45.    --  in gtk+extra. Both names are kept for backward compatibility. 
  46.  
  47.    procedure Gtk_New (Widget : out Gtk_IEntry; 
  48.                       Max    : in Guint16 := 0); 
  49.    --  Create a new entry item. 
  50.    --  By default, the maximal length depends only on the size of the widget. 
  51.  
  52.    procedure Initialize (Widget : access Gtk_IEntry_Record'Class; 
  53.                          Max    : in Guint16); 
  54.    --  Internal initialization function. 
  55.    --  See the section "Creating your own widgets" in the documentation. 
  56.  
  57.    function Get_Type return Gtk.Gtk_Type; 
  58.    --  Return the internal value associated with a Gtk_Item_Entry. 
  59.  
  60.    procedure Set_Justification 
  61.      (Item_Entry    : access Gtk_IEntry_Record; 
  62.       Justification : Gtk.Enums.Gtk_Justification); 
  63.    --  Change the justification of the text in the entry. 
  64.  
  65.    procedure Set_Text 
  66.      (Item_Entry    : access Gtk_IEntry_Record; 
  67.       Text          : String; 
  68.       Justification : Gtk.Enums.Gtk_Justification); 
  69.    --  Change the text in the entry. 
  70.  
  71.    procedure Set_Cursor_Visible 
  72.      (Item_Entry : access Gtk_IEntry_Record; Visible : Boolean); 
  73.    --  Whether the cursor should be visible 
  74.  
  75.    function Get_Cursor_Visible 
  76.      (Item_Entry : access Gtk_IEntry_Record) return Boolean; 
  77.    --  Whether the cursor is visible 
  78.  
  79.    ------------- 
  80.    -- Signals -- 
  81.    ------------- 
  82.  
  83.    --  <signals> 
  84.    --  The following new signals are defined for this widget: 
  85.    --  </signals> 
  86. private 
  87.    type Gtk_IEntry_Record is new Gtk.GEntry.Gtk_Entry_Record with null record; 
  88.    pragma Import (C, Get_Type, "gtk_item_entry_get_type"); 
  89. end Gtk.Extra.Item_Entry;