1. ----------------------------------------------------------------------- 
  2. --              GtkAda - Ada95 binding for Gtk+/Gnome                -- 
  3. --                                                                   -- 
  4. --                Copyright (C) 2001-2006 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. -- As a special exception, if other files instantiate generics from  -- 
  22. -- this unit, or you link this unit with other files to produce an   -- 
  23. -- executable, this  unit  does not  by itself cause  the resulting  -- 
  24. -- executable to be covered by the GNU General Public License. This  -- 
  25. -- exception does not however invalidate any other reasons why the   -- 
  26. -- executable file  might be covered by the  GNU Public License.     -- 
  27. ----------------------------------------------------------------------- 
  28.  
  29. --  <description> 
  30. --  Marks are positions in a buffer which move when the buffer is modified, 
  31. --  so that they always point to the same place in the buffer. 
  32. --  They are automatically destroyed when the buffer is destroyed, unless 
  33. --  you have explicitly call Ref on the mark. 
  34. --  See Gtk.Text_Buffer for various functions dealing with marks. In 
  35. --  particular, Gtk.Text_Buffer.Get_Buffer can be used to retrieve the 
  36. --  buffer from a mark. 
  37. --  </description> 
  38. --  <c_version>2.8.17</c_version> 
  39. --  <group>Multiline Text Editor</group> 
  40.  
  41. with Glib.Values; 
  42.  
  43. package Gtk.Text_Mark is 
  44.  
  45.    type Gtk_Text_Mark_Record is new GObject_Record with private; 
  46.    type Gtk_Text_Mark is access all Gtk_Text_Mark_Record'Class; 
  47.  
  48.    function Get_Type return Glib.GType; 
  49.    --  Return the internal value associated with a Gtk_Label. 
  50.  
  51.    procedure Set_Visible 
  52.      (Mark    : access Gtk_Text_Mark_Record; 
  53.       Setting : Boolean := True); 
  54.    function Get_Visible 
  55.      (Mark : access Gtk_Text_Mark_Record) return Boolean; 
  56.    --  Set the visibility of Mark. 
  57.    --  The insertion point is normally visible, i.e. you can see it as a 
  58.    --  vertical bar. Also, the text widget uses a visible mark to indicate 
  59.    --  where a drop will occur when dragging-and-dropping text. Most other 
  60.    --  marks are not visible. 
  61.    --  Marks are not visible by default. 
  62.  
  63.    function Get_Name (Mark : access Gtk_Text_Mark_Record) return String; 
  64.    --  Return the mark name; Return "" for anonymous marks. 
  65.  
  66.    function Get_Deleted (Mark : access Gtk_Text_Mark_Record) return Boolean; 
  67.    --  Returns True if the mark has been removed from its buffer with 
  68.    --  Gtk.Text_Buffer.Delete_Mark. Marks can't be used once deleted. 
  69.  
  70.    function Get_Left_Gravity 
  71.      (Mark : access Gtk_Text_Mark_Record) return Boolean; 
  72.    --  Return True if the mark has left gravity, False otherwise. 
  73.  
  74.    ------------------------------- 
  75.    -- Converting to/from GValue -- 
  76.    ------------------------------- 
  77.  
  78.    procedure Set_Text_Mark 
  79.      (Val  : in out Glib.Values.GValue; 
  80.       Mark : access Gtk_Text_Mark_Record); 
  81.    function Get_Text_Mark (Val : Glib.Values.GValue) return Gtk_Text_Mark; 
  82.    --  Set the value of the given GValue to Mark. 
  83.  
  84.    ---------------- 
  85.    -- Properties -- 
  86.    ---------------- 
  87.  
  88.    --  <properties> 
  89.    --  The following properties are defined for this widget. See 
  90.    --  Glib.Properties for more information on properties. 
  91.    -- 
  92.    --  </properties> 
  93.  
  94. private 
  95.  
  96.    type Gtk_Text_Mark_Record is new GObject_Record with null record; 
  97.  
  98.    pragma Import (C, Get_Type, "gtk_text_mark_get_type"); 
  99. end Gtk.Text_Mark; 
  100.  
  101. --  The following subprogram is implemented in gtk-text_buffer.ads for 
  102. --  circularity reasons: 
  103. --  No binding: gtk_text_mark_get_buffer