1. ----------------------------------------------------------------------- 
  2. --          GtkAda - Ada95 binding for the Gimp Toolkit              -- 
  3. --                                                                   -- 
  4. --                     Copyright (C) 2008, AdaCore                   -- 
  5. --                                                                   -- 
  6. -- This library is free software; you can redistribute it and/or     -- 
  7. -- modify it under the terms of the GNU General Public               -- 
  8. -- License as published by the Free Software Foundation; either      -- 
  9. -- version 2 of the License, or (at your option) any later version.  -- 
  10. --                                                                   -- 
  11. -- This library is distributed in the hope that it will be useful,   -- 
  12. -- but WITHOUT ANY WARRANTY; without even the implied warranty of    -- 
  13. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -- 
  14. -- General Public License for more details.                          -- 
  15. --                                                                   -- 
  16. -- You should have received a copy of the GNU General Public         -- 
  17. -- License along with this library; if not, write to the             -- 
  18. -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      -- 
  19. -- Boston, MA 02111-1307, USA.                                       -- 
  20. --                                                                   -- 
  21. -- -- -- -- -- -- -- -- -- -- -- --
  22. ----------------------------------------------------------------------- 
  23.  
  24. with Gtk.Tree_Model; 
  25. with Gtkada.Abstract_Tree_Model; 
  26.  
  27. package Gtkada.Abstract_List_Model is 
  28.  
  29.    type Gtk_Abstract_List_Model_Record is 
  30.    abstract new Gtkada.Abstract_Tree_Model.Gtk_Abstract_Tree_Model_Record 
  31.    with private; 
  32.  
  33.    type Gtk_Abstract_List_Model is 
  34.       access all Gtk_Abstract_List_Model_Record'Class; 
  35.  
  36.    procedure Initialize (Self : access Gtk_Abstract_List_Model_Record'Class); 
  37.  
  38.    function Get_Flags 
  39.      (Self : access Gtk_Abstract_List_Model_Record) 
  40.       return Gtk.Tree_Model.Tree_Model_Flags; 
  41.    --  Return a set of flags supported by this interface. 
  42.  
  43.    function Has_Child 
  44.      (Self : access Gtk_Abstract_List_Model_Record; 
  45.       Iter : Gtk.Tree_Model.Gtk_Tree_Iter) return Boolean; 
  46.    --  Return True if Iter has children, False otherwise. 
  47.  
  48.    function Children 
  49.      (Self   : access Gtk_Abstract_List_Model_Record; 
  50.       Parent : Gtk.Tree_Model.Gtk_Tree_Iter) 
  51.       return Gtk.Tree_Model.Gtk_Tree_Iter; 
  52.    --  Returns the first child of Parent. 
  53.  
  54.    function Parent 
  55.      (Self  : access Gtk_Abstract_List_Model_Record; 
  56.       Child : Gtk.Tree_Model.Gtk_Tree_Iter) 
  57.       return Gtk.Tree_Model.Gtk_Tree_Iter; 
  58.    --  Returns the parent of Child. For the list it always returns Null_Iter. 
  59.  
  60. private 
  61.  
  62.    type Gtk_Abstract_List_Model_Record is 
  63.    abstract new Gtkada.Abstract_Tree_Model.Gtk_Abstract_Tree_Model_Record 
  64.    with null record; 
  65.  
  66. end Gtkada.Abstract_List_Model;