1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. --  <description> 
  25. --  You may wish to begin by reading the <link linkend="TextWidget">text 
  26. --  widget conceptual overview</link> which gives an overview of all the 
  27. --  objects and data types related to the text widget and how they work 
  28. --  together. 
  29. -- 
  30. --  </description> 
  31. pragma Ada_2005; 
  32.  
  33. pragma Warnings (Off, "*is already use-visible*"); 
  34. with Gdk.Pixbuf;            use Gdk.Pixbuf; 
  35. with Gdk.Types;             use Gdk.Types; 
  36. with Glib;                  use Glib; 
  37. with Glib.Object;           use Glib.Object; 
  38. with Glib.Properties;       use Glib.Properties; 
  39. with Gtk.Clipboard;         use Gtk.Clipboard; 
  40. with Gtk.Target_List;       use Gtk.Target_List; 
  41. with Gtk.Text_Child_Anchor; use Gtk.Text_Child_Anchor; 
  42. with Gtk.Text_Iter;         use Gtk.Text_Iter; 
  43. with Gtk.Text_Mark;         use Gtk.Text_Mark; 
  44. with Gtk.Text_Tag;          use Gtk.Text_Tag; 
  45. with Gtk.Text_Tag_Table;    use Gtk.Text_Tag_Table; 
  46. with Gtkada.Types;          use Gtkada.Types; 
  47.  
  48. package Gtk.Text_Buffer is 
  49.  
  50.    type Gtk_Text_Buffer_Record is new GObject_Record with null record; 
  51.    type Gtk_Text_Buffer is access all Gtk_Text_Buffer_Record'Class; 
  52.  
  53.    ------------------ 
  54.    -- Constructors -- 
  55.    ------------------ 
  56.  
  57.    procedure Gtk_New 
  58.       (Buffer : out Gtk_Text_Buffer; 
  59.        Table  : Gtk.Text_Tag_Table.Gtk_Text_Tag_Table := null); 
  60.    procedure Initialize 
  61.       (Buffer : not null access Gtk_Text_Buffer_Record'Class; 
  62.        Table  : Gtk.Text_Tag_Table.Gtk_Text_Tag_Table := null); 
  63.    --  Creates a new text buffer. 
  64.    --  "table": a tag table, or null to create a new one 
  65.  
  66.    function Gtk_Text_Buffer_New 
  67.       (Table : Gtk.Text_Tag_Table.Gtk_Text_Tag_Table := null) 
  68.        return Gtk_Text_Buffer; 
  69.    --  Creates a new text buffer. 
  70.    --  "table": a tag table, or null to create a new one 
  71.  
  72.    function Get_Type return Glib.GType; 
  73.    pragma Import (C, Get_Type, "gtk_text_buffer_get_type"); 
  74.  
  75.    ------------- 
  76.    -- Methods -- 
  77.    ------------- 
  78.  
  79.    procedure Add_Mark 
  80.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  81.        Mark   : not null access Gtk.Text_Mark.Gtk_Text_Mark_Record'Class; 
  82.        Where  : Gtk.Text_Iter.Gtk_Text_Iter); 
  83.    --  Adds the mark at position Where. The mark must not be added to another 
  84.    --  buffer, and if its name is not null then there must not be another mark 
  85.    --  in the buffer with the same name. 
  86.    --  Emits the "mark-set" signal as notification of the mark's initial 
  87.    --  placement. 
  88.    --  Since: gtk+ 2.12 
  89.    --  "mark": the mark to add 
  90.    --  "where": location to place mark 
  91.  
  92.    procedure Add_Selection_Clipboard 
  93.       (Buffer    : not null access Gtk_Text_Buffer_Record; 
  94.        Clipboard : not null access Gtk.Clipboard.Gtk_Clipboard_Record'Class); 
  95.    --  Adds Clipboard to the list of clipboards in which the selection 
  96.    --  contents of Buffer are available. In most cases, Clipboard will be the 
  97.    --  Gtk.Clipboard.Gtk_Clipboard of type GDK_SELECTION_PRIMARY for a view of 
  98.    --  Buffer. 
  99.    --  "clipboard": a Gtk.Clipboard.Gtk_Clipboard 
  100.  
  101.    procedure Apply_Tag 
  102.       (Buffer  : not null access Gtk_Text_Buffer_Record; 
  103.        Tag     : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class; 
  104.        Start   : Gtk.Text_Iter.Gtk_Text_Iter; 
  105.        The_End : Gtk.Text_Iter.Gtk_Text_Iter); 
  106.    --  Emits the "apply-tag" signal on Buffer. The default handler for the 
  107.    --  signal applies Tag to the given range. Start and End do not have to be 
  108.    --  in order. 
  109.    --  "tag": a Gtk.Text_Tag.Gtk_Text_Tag 
  110.    --  "start": one bound of range to be tagged 
  111.    --  "end": other bound of range to be tagged 
  112.  
  113.    procedure Apply_Tag_By_Name 
  114.       (Buffer  : not null access Gtk_Text_Buffer_Record; 
  115.        Name    : UTF8_String; 
  116.        Start   : Gtk.Text_Iter.Gtk_Text_Iter; 
  117.        The_End : Gtk.Text_Iter.Gtk_Text_Iter); 
  118.    --  Calls Gtk.Text_Tag_Table.Lookup on the buffer's tag table to get a 
  119.    --  Gtk.Text_Tag.Gtk_Text_Tag, then calls Gtk.Text_Buffer.Apply_Tag. 
  120.    --  "name": name of a named Gtk.Text_Tag.Gtk_Text_Tag 
  121.    --  "start": one bound of range to be tagged 
  122.    --  "end": other bound of range to be tagged 
  123.  
  124.    function Backspace 
  125.       (Buffer           : not null access Gtk_Text_Buffer_Record; 
  126.        Iter             : Gtk.Text_Iter.Gtk_Text_Iter; 
  127.        Interactive      : Boolean; 
  128.        Default_Editable : Boolean) return Boolean; 
  129.    --  Performs the appropriate action as if the user hit the delete key with 
  130.    --  the cursor at the position specified by Iter. In the normal case a 
  131.    --  single character will be deleted, but when combining accents are 
  132.    --  involved, more than one character can be deleted, and when precomposed 
  133.    --  character and accent combinations are involved, less than one character 
  134.    --  will be deleted. 
  135.    --  Because the buffer is modified, all outstanding iterators become 
  136.    --  invalid after calling this function; however, the Iter will be 
  137.    --  re-initialized to point to the location where text was deleted. 
  138.    --  Since: gtk+ 2.6 
  139.    --  "iter": a position in Buffer 
  140.    --  "interactive": whether the deletion is caused by user interaction 
  141.    --  "default_editable": whether the buffer is editable by default 
  142.  
  143.    procedure Begin_User_Action 
  144.       (Buffer : not null access Gtk_Text_Buffer_Record); 
  145.    --  Called to indicate that the buffer operations between here and a call 
  146.    --  to Gtk.Text_Buffer.End_User_Action are part of a single user-visible 
  147.    --  operation. The operations between Gtk.Text_Buffer.Begin_User_Action and 
  148.    --  Gtk.Text_Buffer.End_User_Action can then be grouped when creating an 
  149.    --  undo stack. Gtk.Text_Buffer.Gtk_Text_Buffer maintains a count of calls 
  150.    --  to Gtk.Text_Buffer.Begin_User_Action that have not been closed with a 
  151.    --  call to Gtk.Text_Buffer.End_User_Action, and emits the 
  152.    --  "begin-user-action" and "end-user-action" signals only for the outermost 
  153.    --  pair of calls. This allows you to build user actions from other user 
  154.    --  actions. 
  155.    --  The "interactive" buffer mutation functions, such as 
  156.    --  Gtk.Text_Buffer.Insert_Interactive, automatically call begin/end user 
  157.    --  action around the buffer operations they perform, so there's no need to 
  158.    --  add extra calls if you user action consists solely of a single call to 
  159.    --  one of those functions. 
  160.  
  161.    procedure Copy_Clipboard 
  162.       (Buffer    : not null access Gtk_Text_Buffer_Record; 
  163.        Clipboard : not null access Gtk.Clipboard.Gtk_Clipboard_Record'Class); 
  164.    --  Copies the currently-selected text to a clipboard. 
  165.    --  "clipboard": the Gtk.Clipboard.Gtk_Clipboard object to copy to 
  166.  
  167.    function Create_Child_Anchor 
  168.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  169.        Iter   : Gtk.Text_Iter.Gtk_Text_Iter) 
  170.        return Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor; 
  171.    --  This is a convenience function which simply creates a child anchor with 
  172.    --  Gtk.Text_Child_Anchor.Gtk_New and inserts it into the buffer with 
  173.    --  Gtk.Text_Buffer.Insert_Child_Anchor. The new anchor is owned by the 
  174.    --  buffer; no reference count is returned to the caller of 
  175.    --  Gtk.Text_Buffer.Create_Child_Anchor. 
  176.    --  "iter": location in the buffer 
  177.  
  178.    function Create_Mark 
  179.       (Buffer       : not null access Gtk_Text_Buffer_Record; 
  180.        Mark_Name    : UTF8_String := ""; 
  181.        Where        : Gtk.Text_Iter.Gtk_Text_Iter; 
  182.        Left_Gravity : Boolean := True) return Gtk.Text_Mark.Gtk_Text_Mark; 
  183.    --  Creates a mark at position Where. If Mark_Name is null, the mark is 
  184.    --  anonymous; otherwise, the mark can be retrieved by name using 
  185.    --  Gtk.Text_Buffer.Get_Mark. If a mark has left gravity, and text is 
  186.    --  inserted at the mark's current location, the mark will be moved to the 
  187.    --  left of the newly-inserted text. If the mark has right gravity 
  188.    --  (Left_Gravity = False), the mark will end up on the right of 
  189.    --  newly-inserted text. The standard left-to-right cursor is a mark with 
  190.    --  right gravity (when you type, the cursor stays on the right side of the 
  191.    --  text you're typing). 
  192.    --  The caller of this function does *not* own a reference to the returned 
  193.    --  Gtk.Text_Mark.Gtk_Text_Mark, so you can ignore the return value if you 
  194.    --  like. Marks are owned by the buffer and go away when the buffer does. 
  195.    --  Emits the "mark-set" signal as notification of the mark's initial 
  196.    --  placement. 
  197.    --  "mark_name": name for mark, or null 
  198.    --  "where": location to place mark 
  199.    --  "left_gravity": whether the mark has left gravity 
  200.  
  201.    procedure Cut_Clipboard 
  202.       (Buffer           : not null access Gtk_Text_Buffer_Record; 
  203.        Clipboard        : not null access Gtk.Clipboard.Gtk_Clipboard_Record'Class; 
  204.        Default_Editable : Boolean); 
  205.    --  Copies the currently-selected text to a clipboard, then deletes said 
  206.    --  text if it's editable. 
  207.    --  "clipboard": the Gtk.Clipboard.Gtk_Clipboard object to cut to 
  208.    --  "default_editable": default editability of the buffer 
  209.  
  210.    procedure Delete 
  211.       (Buffer  : not null access Gtk_Text_Buffer_Record; 
  212.        Start   : in out Gtk.Text_Iter.Gtk_Text_Iter; 
  213.        The_End : in out Gtk.Text_Iter.Gtk_Text_Iter); 
  214.    --  Deletes text between Start and End. The order of Start and End is not 
  215.    --  actually relevant; Gtk.Text_Buffer.Delete will reorder them. This 
  216.    --  function actually emits the "delete-range" signal, and the default 
  217.    --  handler of that signal deletes the text. Because the buffer is modified, 
  218.    --  all outstanding iterators become invalid after calling this function; 
  219.    --  however, the Start and End will be re-initialized to point to the 
  220.    --  location where text was deleted. 
  221.    --  "start": a position in Buffer 
  222.    --  "end": another position in Buffer 
  223.  
  224.    procedure Delete_Interactive 
  225.       (Buffer           : not null access Gtk_Text_Buffer_Record; 
  226.        Start_Iter       : Gtk.Text_Iter.Gtk_Text_Iter; 
  227.        End_Iter         : Gtk.Text_Iter.Gtk_Text_Iter; 
  228.        Default_Editable : Boolean; 
  229.        Result           : out Boolean); 
  230.    --  Deletes all *editable* text in the given range. Calls 
  231.    --  Gtk.Text_Buffer.Delete for each editable sub-range of [Start,End). Start 
  232.    --  and End are revalidated to point to the location of the last deleted 
  233.    --  range, or left untouched if no text was deleted. 
  234.    --  "start_iter": start of range to delete 
  235.    --  "end_iter": end of range 
  236.    --  "default_editable": whether the buffer is editable by default 
  237.  
  238.    procedure Delete_Mark 
  239.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  240.        Mark   : not null access Gtk.Text_Mark.Gtk_Text_Mark_Record'Class); 
  241.    --  Deletes Mark, so that it's no longer located anywhere in the buffer. 
  242.    --  Removes the reference the buffer holds to the mark, so if you haven't 
  243.    --  called g_object_ref on the mark, it will be freed. Even if the mark 
  244.    --  isn't freed, most operations on Mark become invalid, until it gets added 
  245.    --  to a buffer again with Gtk.Text_Buffer.Add_Mark. Use 
  246.    --  Gtk.Text_Mark.Get_Deleted to find out if a mark has been removed from 
  247.    --  its buffer. The "mark-deleted" signal will be emitted as notification 
  248.    --  after the mark is deleted. 
  249.    --  "mark": a Gtk.Text_Mark.Gtk_Text_Mark in Buffer 
  250.  
  251.    procedure Delete_Mark_By_Name 
  252.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  253.        Name   : UTF8_String); 
  254.    --  Deletes the mark named Name; the mark must exist. See 
  255.    --  Gtk.Text_Buffer.Delete_Mark for details. 
  256.    --  "name": name of a mark in Buffer 
  257.  
  258.    function Delete_Selection 
  259.       (Buffer           : not null access Gtk_Text_Buffer_Record; 
  260.        Interactive      : Boolean; 
  261.        Default_Editable : Boolean) return Boolean; 
  262.    --  Deletes the range between the "insert" and "selection_bound" marks, 
  263.    --  that is, the currently-selected text. If Interactive is True, the 
  264.    --  editability of the selection will be considered (users can't delete 
  265.    --  uneditable text). 
  266.    --  "interactive": whether the deletion is caused by user interaction 
  267.    --  "default_editable": whether the buffer is editable by default 
  268.  
  269.    function Deserialize_Get_Can_Create_Tags 
  270.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  271.        Format : Gdk.Types.Gdk_Atom) return Boolean; 
  272.    --  This functions returns the value set with 
  273.    --  Gtk.Text_Buffer.Deserialize_Set_Can_Create_Tags 
  274.    --  Since: gtk+ 2.10 
  275.    --  "format": a Gdk.Types.Gdk_Atom representing a registered rich text 
  276.    --  format 
  277.  
  278.    procedure Deserialize_Set_Can_Create_Tags 
  279.       (Buffer          : not null access Gtk_Text_Buffer_Record; 
  280.        Format          : Gdk.Types.Gdk_Atom; 
  281.        Can_Create_Tags : Boolean); 
  282.    --  Use this function to allow a rich text deserialization function to 
  283.    --  create new tags in the receiving buffer. Note that using this function 
  284.    --  is almost always a bad idea, because the rich text functions you 
  285.    --  register should know how to map the rich text format they handler to 
  286.    --  your text buffers set of tags. 
  287.    --  The ability of creating new (arbitrary!) tags in the receiving buffer 
  288.    --  is meant for special rich text formats like the internal one that is 
  289.    --  registered using Gtk.Text_Buffer.Register_Deserialize_Tagset, because 
  290.    --  that format is essentially a dump of the internal structure of the 
  291.    --  source buffer, including its tag names. 
  292.    --  You should allow creation of tags only if you know what you are doing, 
  293.    --  e.g. if you defined a tagset name for your application suite's text 
  294.    --  buffers and you know that it's fine to receive new tags from these 
  295.    --  buffers, because you know that your application can handle the newly 
  296.    --  created tags. 
  297.    --  Since: gtk+ 2.10 
  298.    --  "format": a Gdk.Types.Gdk_Atom representing a registered rich text 
  299.    --  format 
  300.    --  "can_create_tags": whether deserializing this format may create tags 
  301.  
  302.    procedure End_User_Action 
  303.       (Buffer : not null access Gtk_Text_Buffer_Record); 
  304.    --  Should be paired with a call to Gtk.Text_Buffer.Begin_User_Action. See 
  305.    --  that function for a full explanation. 
  306.  
  307.    procedure Get_Bounds 
  308.       (Buffer  : not null access Gtk_Text_Buffer_Record; 
  309.        Start   : out Gtk.Text_Iter.Gtk_Text_Iter; 
  310.        The_End : out Gtk.Text_Iter.Gtk_Text_Iter); 
  311.    --  Retrieves the first and last iterators in the buffer, i.e. the entire 
  312.    --  buffer lies within the range [Start,End). 
  313.    --  "start": iterator to initialize with first position in the buffer 
  314.    --  "end": iterator to initialize with the end iterator 
  315.  
  316.    function Get_Char_Count 
  317.       (Buffer : not null access Gtk_Text_Buffer_Record) return Gint; 
  318.    --  Gets the number of characters in the buffer; note that characters and 
  319.    --  bytes are not the same, you can't e.g. expect the contents of the buffer 
  320.    --  in string form to be this many bytes long. The character count is 
  321.    --  cached, so this function is very fast. 
  322.  
  323.    function Get_Copy_Target_List 
  324.       (Buffer : not null access Gtk_Text_Buffer_Record) 
  325.        return Gtk.Target_List.Gtk_Target_List; 
  326.    --  This function returns the list of targets this text buffer can provide 
  327.    --  for copying and as DND source. The targets in the list are added with 
  328.    --  %info values from the Gtk_Text_Buffer_Target_Info enum, using 
  329.    --  gtk_target_list_add_rich_text_targets and 
  330.    --  Gtk.Target_List.Add_Text_Targets. 
  331.    --  Since: gtk+ 2.10 
  332.  
  333.    procedure Get_End_Iter 
  334.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  335.        Iter   : out Gtk.Text_Iter.Gtk_Text_Iter); 
  336.    --  Initializes Iter with the "end iterator," one past the last valid 
  337.    --  character in the text buffer. If dereferenced with 
  338.    --  Gtk.Text_Iter.Get_Char, the end iterator has a character value of 0. The 
  339.    --  entire buffer lies in the range from the first position in the buffer 
  340.    --  (call Gtk.Text_Buffer.Get_Start_Iter to get character position 0) to the 
  341.    --  end iterator. 
  342.    --  "iter": iterator to initialize 
  343.  
  344.    function Get_Has_Selection 
  345.       (Buffer : not null access Gtk_Text_Buffer_Record) return Boolean; 
  346.    --  Indicates whether the buffer has some text currently selected. 
  347.    --  Since: gtk+ 2.10 
  348.  
  349.    function Get_Insert 
  350.       (Buffer : not null access Gtk_Text_Buffer_Record) 
  351.        return Gtk.Text_Mark.Gtk_Text_Mark; 
  352.    --  Returns the mark that represents the cursor (insertion point). 
  353.    --  Equivalent to calling Gtk.Text_Buffer.Get_Mark to get the mark named 
  354.    --  "insert", but very slightly more efficient, and involves less typing. 
  355.  
  356.    procedure Insert 
  357.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  358.        Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter; 
  359.        Text   : UTF8_String); 
  360.    --  Inserts Len bytes of Text at position Iter. If Len is -1, Text must be 
  361.    --  nul-terminated and will be inserted in its entirety. Emits the 
  362.    --  "insert-text" signal; insertion actually occurs in the default handler 
  363.    --  for the signal. Iter is invalidated when insertion occurs (because the 
  364.    --  buffer contents change), but the default signal handler revalidates it 
  365.    --  to point to the end of the inserted text. 
  366.    --  "iter": a position in the buffer 
  367.    --  "text": text in UTF-8 format 
  368.  
  369.    procedure Get_Iter_At_Child_Anchor 
  370.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  371.        Iter   : out Gtk.Text_Iter.Gtk_Text_Iter; 
  372.        Anchor : not null access Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor_Record'Class); 
  373.    --  Obtains the location of Anchor within Buffer. 
  374.    --  "iter": an iterator to be initialized 
  375.    --  "anchor": a child anchor that appears in Buffer 
  376.  
  377.    procedure Get_Iter_At_Line 
  378.       (Buffer      : not null access Gtk_Text_Buffer_Record; 
  379.        Iter        : out Gtk.Text_Iter.Gtk_Text_Iter; 
  380.        Line_Number : Gint); 
  381.    --  Initializes Iter to the start of the given line. 
  382.    --  "iter": iterator to initialize 
  383.    --  "line_number": line number counting from 0 
  384.  
  385.    procedure Get_Iter_At_Line_Index 
  386.       (Buffer      : not null access Gtk_Text_Buffer_Record; 
  387.        Iter        : out Gtk.Text_Iter.Gtk_Text_Iter; 
  388.        Line_Number : Gint; 
  389.        Byte_Index  : Gint); 
  390.    --  Obtains an iterator pointing to Byte_Index within the given line. 
  391.    --  Byte_Index must be the start of a UTF-8 character, and must not be 
  392.    --  beyond the end of the line. Note *bytes*, not characters; UTF-8 may 
  393.    --  encode one character as multiple bytes. 
  394.    --  "iter": iterator to initialize 
  395.    --  "line_number": line number counting from 0 
  396.    --  "byte_index": byte index from start of line 
  397.  
  398.    procedure Get_Iter_At_Line_Offset 
  399.       (Buffer      : not null access Gtk_Text_Buffer_Record; 
  400.        Iter        : out Gtk.Text_Iter.Gtk_Text_Iter; 
  401.        Line_Number : Gint; 
  402.        Char_Offset : Gint); 
  403.    --  Obtains an iterator pointing to Char_Offset within the given line. The 
  404.    --  Char_Offset must exist, offsets off the end of the line are not allowed. 
  405.    --  Note *characters*, not bytes; UTF-8 may encode one character as multiple 
  406.    --  bytes. 
  407.    --  "iter": iterator to initialize 
  408.    --  "line_number": line number counting from 0 
  409.    --  "char_offset": char offset from start of line 
  410.  
  411.    procedure Get_Iter_At_Mark 
  412.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  413.        Iter   : out Gtk.Text_Iter.Gtk_Text_Iter; 
  414.        Mark   : not null access Gtk.Text_Mark.Gtk_Text_Mark_Record'Class); 
  415.    --  Initializes Iter with the current position of Mark. 
  416.    --  "iter": iterator to initialize 
  417.    --  "mark": a Gtk.Text_Mark.Gtk_Text_Mark in Buffer 
  418.  
  419.    procedure Get_Iter_At_Offset 
  420.       (Buffer      : not null access Gtk_Text_Buffer_Record; 
  421.        Iter        : out Gtk.Text_Iter.Gtk_Text_Iter; 
  422.        Char_Offset : Gint); 
  423.    --  Initializes Iter to a position Char_Offset chars from the start of the 
  424.    --  entire buffer. If Char_Offset is -1 or greater than the number of 
  425.    --  characters in the buffer, Iter is initialized to the end iterator, the 
  426.    --  iterator one past the last valid character in the buffer. 
  427.    --  "iter": iterator to initialize 
  428.    --  "char_offset": char offset from start of buffer, counting from 0, or -1 
  429.  
  430.    function Get_Line_Count 
  431.       (Buffer : not null access Gtk_Text_Buffer_Record) return Gint; 
  432.    --  Obtains the number of lines in the buffer. This value is cached, so the 
  433.    --  function is very fast. 
  434.  
  435.    function Get_Mark 
  436.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  437.        Name   : UTF8_String) return Gtk.Text_Mark.Gtk_Text_Mark; 
  438.    --  Returns the mark named Name in buffer Buffer, or null if no such mark 
  439.    --  exists in the buffer. 
  440.    --  "name": a mark name 
  441.  
  442.    function Get_Modified 
  443.       (Buffer : not null access Gtk_Text_Buffer_Record) return Boolean; 
  444.    --  Indicates whether the buffer has been modified since the last call to 
  445.    --  Gtk.Text_Buffer.Set_Modified set the modification flag to False. Used 
  446.    --  for example to enable a "save" function in a text editor. 
  447.  
  448.    procedure Set_Modified 
  449.       (Buffer  : not null access Gtk_Text_Buffer_Record; 
  450.        Setting : Boolean); 
  451.    --  Used to keep track of whether the buffer has been modified since the 
  452.    --  last time it was saved. Whenever the buffer is saved to disk, call 
  453.    --  gtk_text_buffer_set_modified (Buffer, FALSE). When the buffer is 
  454.    --  modified, it will automatically toggled on the modified bit again. When 
  455.    --  the modified bit flips, the buffer emits a "modified-changed" signal. 
  456.    --  "setting": modification flag setting 
  457.  
  458.    function Get_Paste_Target_List 
  459.       (Buffer : not null access Gtk_Text_Buffer_Record) 
  460.        return Gtk.Target_List.Gtk_Target_List; 
  461.    --  This function returns the list of targets this text buffer supports for 
  462.    --  pasting and as DND destination. The targets in the list are added with 
  463.    --  %info values from the Gtk_Text_Buffer_Target_Info enum, using 
  464.    --  gtk_target_list_add_rich_text_targets and 
  465.    --  Gtk.Target_List.Add_Text_Targets. 
  466.    --  Since: gtk+ 2.10 
  467.  
  468.    function Get_Selection_Bound 
  469.       (Buffer : not null access Gtk_Text_Buffer_Record) 
  470.        return Gtk.Text_Mark.Gtk_Text_Mark; 
  471.    --  Returns the mark that represents the selection bound. Equivalent to 
  472.    --  calling Gtk.Text_Buffer.Get_Mark to get the mark named 
  473.    --  "selection_bound", but very slightly more efficient, and involves less 
  474.    --  typing. 
  475.    --  The currently-selected text in Buffer is the region between the 
  476.    --  "selection_bound" and "insert" marks. If "selection_bound" and "insert" 
  477.    --  are in the same place, then there is no current selection. 
  478.    --  Gtk.Text_Buffer.Get_Selection_Bounds is another convenient function for 
  479.    --  handling the selection, if you just want to know whether there's a 
  480.    --  selection and what its bounds are. 
  481.  
  482.    procedure Get_Selection_Bounds 
  483.       (Buffer  : not null access Gtk_Text_Buffer_Record; 
  484.        Start   : out Gtk.Text_Iter.Gtk_Text_Iter; 
  485.        The_End : out Gtk.Text_Iter.Gtk_Text_Iter; 
  486.        Result  : out Boolean); 
  487.    --  Returns True if some text is selected; places the bounds of the 
  488.    --  selection in Start and End (if the selection has length 0, then Start 
  489.    --  and End are filled in with the same value). Start and End will be in 
  490.    --  ascending order. If Start and End are NULL, then they are not filled in, 
  491.    --  but the return value still indicates whether text is selected. 
  492.    --  "start": iterator to initialize with selection start 
  493.    --  "end": iterator to initialize with selection end 
  494.  
  495.    function Get_Slice 
  496.       (Buffer               : not null access Gtk_Text_Buffer_Record; 
  497.        Start                : Gtk.Text_Iter.Gtk_Text_Iter; 
  498.        The_End              : Gtk.Text_Iter.Gtk_Text_Iter; 
  499.        Include_Hidden_Chars : Boolean := False) return UTF8_String; 
  500.    --  Returns the text in the range [Start,End). Excludes undisplayed text 
  501.    --  (text marked with tags that set the invisibility attribute) if 
  502.    --  Include_Hidden_Chars is False. The returned string includes a 0xFFFC 
  503.    --  character whenever the buffer contains embedded images, so byte and 
  504.    --  character indexes into the returned string *do* correspond to byte and 
  505.    --  character indexes into the buffer. Contrast with 
  506.    --  Gtk.Text_Buffer.Get_Text. Note that 0xFFFC can occur in normal text as 
  507.    --  well, so it is not a reliable indicator that a pixbuf or widget is in 
  508.    --  the buffer. 
  509.    --  "start": start of a range 
  510.    --  "end": end of a range 
  511.    --  "include_hidden_chars": whether to include invisible text 
  512.  
  513.    procedure Get_Start_Iter 
  514.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  515.        Iter   : out Gtk.Text_Iter.Gtk_Text_Iter); 
  516.    --  Initialized Iter with the first position in the text buffer. This is 
  517.    --  the same as using Gtk.Text_Buffer.Get_Iter_At_Offset to get the iter at 
  518.    --  character offset 0. 
  519.    --  "iter": iterator to initialize 
  520.  
  521.    function Get_Tag_Table 
  522.       (Buffer : not null access Gtk_Text_Buffer_Record) 
  523.        return Gtk.Text_Tag_Table.Gtk_Text_Tag_Table; 
  524.    --  Get the Gtk.Text_Tag_Table.Gtk_Text_Tag_Table associated with this 
  525.    --  buffer. 
  526.  
  527.    function Get_Text 
  528.       (Buffer               : not null access Gtk_Text_Buffer_Record; 
  529.        Start                : Gtk.Text_Iter.Gtk_Text_Iter; 
  530.        The_End              : Gtk.Text_Iter.Gtk_Text_Iter; 
  531.        Include_Hidden_Chars : Boolean := False) return UTF8_String; 
  532.    --  Returns the text in the range [Start,End). Excludes undisplayed text 
  533.    --  (text marked with tags that set the invisibility attribute) if 
  534.    --  Include_Hidden_Chars is False. Does not include characters representing 
  535.    --  embedded images, so byte and character indexes into the returned string 
  536.    --  do *not* correspond to byte and character indexes into the buffer. 
  537.    --  Contrast with Gtk.Text_Buffer.Get_Slice. 
  538.    --  "start": start of a range 
  539.    --  "end": end of a range 
  540.    --  "include_hidden_chars": whether to include invisible text 
  541.  
  542.    procedure Set_Text 
  543.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  544.        Text   : UTF8_String); 
  545.    --  Deletes current contents of Buffer, and inserts Text instead. If Len is 
  546.    --  -1, Text must be nul-terminated. Text must be valid UTF-8. 
  547.    --  "text": UTF-8 text to insert 
  548.  
  549.    procedure Insert_At_Cursor 
  550.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  551.        Text   : UTF8_String); 
  552.    --  Simply calls Gtk.Text_Buffer.Insert, using the current cursor position 
  553.    --  as the insertion point. 
  554.    --  "text": text in UTF-8 format 
  555.  
  556.    procedure Insert_Child_Anchor 
  557.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  558.        Iter   : Gtk.Text_Iter.Gtk_Text_Iter; 
  559.        Anchor : not null access Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor_Record'Class); 
  560.    --  Inserts a child widget anchor into the text buffer at Iter. The anchor 
  561.    --  will be counted as one character in character counts, and when obtaining 
  562.    --  the buffer contents as a string, will be represented by the Unicode 
  563.    --  "object replacement character" 0xFFFC. Note that the "slice" variants 
  564.    --  for obtaining portions of the buffer as a string include this character 
  565.    --  for child anchors, but the "text" variants do not. E.g. see 
  566.    --  Gtk.Text_Buffer.Get_Slice and Gtk.Text_Buffer.Get_Text. Consider 
  567.    --  Gtk.Text_Buffer.Create_Child_Anchor as a more convenient alternative to 
  568.    --  this function. The buffer will add a reference to the anchor, so you can 
  569.    --  unref it after insertion. 
  570.    --  "iter": location to insert the anchor 
  571.    --  "anchor": a Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor 
  572.  
  573.    function Insert_Interactive 
  574.       (Buffer           : not null access Gtk_Text_Buffer_Record; 
  575.        Iter             : access Gtk.Text_Iter.Gtk_Text_Iter; 
  576.        Text             : UTF8_String; 
  577.        Default_Editable : Boolean) return Boolean; 
  578.    --  Like Gtk.Text_Buffer.Insert, but the insertion will not occur if Iter 
  579.    --  is at a non-editable location in the buffer. Usually you want to prevent 
  580.    --  insertions at ineditable locations if the insertion results from a user 
  581.    --  action (is interactive). 
  582.    --  Default_Editable indicates the editability of text that doesn't have a 
  583.    --  tag affecting editability applied to it. Typically the result of 
  584.    --  Gtk.Text_View.Get_Editable is appropriate here. 
  585.    --  "iter": a position in Buffer 
  586.    --  "text": some UTF-8 text 
  587.    --  "default_editable": default editability of buffer 
  588.  
  589.    function Insert_Interactive_At_Cursor 
  590.       (Buffer           : not null access Gtk_Text_Buffer_Record; 
  591.        Text             : UTF8_String; 
  592.        Default_Editable : Boolean) return Boolean; 
  593.    --  Calls Gtk.Text_Buffer.Insert_Interactive at the cursor position. 
  594.    --  Default_Editable indicates the editability of text that doesn't have a 
  595.    --  tag affecting editability applied to it. Typically the result of 
  596.    --  Gtk.Text_View.Get_Editable is appropriate here. 
  597.    --  "text": text in UTF-8 format 
  598.    --  "default_editable": default editability of buffer 
  599.  
  600.    procedure Insert_Pixbuf 
  601.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  602.        Iter   : Gtk.Text_Iter.Gtk_Text_Iter; 
  603.        Pixbuf : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); 
  604.    --  Inserts an image into the text buffer at Iter. The image will be 
  605.    --  counted as one character in character counts, and when obtaining the 
  606.    --  buffer contents as a string, will be represented by the Unicode "object 
  607.    --  replacement character" 0xFFFC. Note that the "slice" variants for 
  608.    --  obtaining portions of the buffer as a string include this character for 
  609.    --  pixbufs, but the "text" variants do not. e.g. see 
  610.    --  Gtk.Text_Buffer.Get_Slice and Gtk.Text_Buffer.Get_Text. 
  611.    --  "iter": location to insert the pixbuf 
  612.    --  "pixbuf": a Gdk.Pixbuf.Gdk_Pixbuf 
  613.  
  614.    procedure Insert_Range 
  615.       (Buffer  : not null access Gtk_Text_Buffer_Record; 
  616.        Iter    : Gtk.Text_Iter.Gtk_Text_Iter; 
  617.        Start   : Gtk.Text_Iter.Gtk_Text_Iter; 
  618.        The_End : Gtk.Text_Iter.Gtk_Text_Iter); 
  619.    --  Copies text, tags, and pixbufs between Start and End (the order of 
  620.    --  Start and End doesn't matter) and inserts the copy at Iter. Used instead 
  621.    --  of simply getting/inserting text because it preserves images and tags. 
  622.    --  If Start and End are in a different buffer from Buffer, the two buffers 
  623.    --  must share the same tag table. 
  624.    --  Implemented via emissions of the insert_text and apply_tag signals, so 
  625.    --  expect those. 
  626.    --  "iter": a position in Buffer 
  627.    --  "start": a position in a Gtk.Text_Buffer.Gtk_Text_Buffer 
  628.    --  "end": another position in the same buffer as Start 
  629.  
  630.    function Insert_Range_Interactive 
  631.       (Buffer           : not null access Gtk_Text_Buffer_Record; 
  632.        Iter             : Gtk.Text_Iter.Gtk_Text_Iter; 
  633.        Start            : Gtk.Text_Iter.Gtk_Text_Iter; 
  634.        The_End          : Gtk.Text_Iter.Gtk_Text_Iter; 
  635.        Default_Editable : Boolean) return Boolean; 
  636.    --  Same as Gtk.Text_Buffer.Insert_Range, but does nothing if the insertion 
  637.    --  point isn't editable. The Default_Editable parameter indicates whether 
  638.    --  the text is editable at Iter if no tags enclosing Iter affect 
  639.    --  editability. Typically the result of Gtk.Text_View.Get_Editable is 
  640.    --  appropriate here. 
  641.    --  "iter": a position in Buffer 
  642.    --  "start": a position in a Gtk.Text_Buffer.Gtk_Text_Buffer 
  643.    --  "end": another position in the same buffer as Start 
  644.    --  "default_editable": default editability of the buffer 
  645.  
  646.    procedure Move_Mark 
  647.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  648.        Mark   : not null access Gtk.Text_Mark.Gtk_Text_Mark_Record'Class; 
  649.        Where  : Gtk.Text_Iter.Gtk_Text_Iter); 
  650.    --  Moves Mark to the new location Where. Emits the "mark-set" signal as 
  651.    --  notification of the move. 
  652.    --  "mark": a Gtk.Text_Mark.Gtk_Text_Mark 
  653.    --  "where": new location for Mark in Buffer 
  654.  
  655.    procedure Move_Mark_By_Name 
  656.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  657.        Name   : UTF8_String; 
  658.        Where  : Gtk.Text_Iter.Gtk_Text_Iter); 
  659.    --  Moves the mark named Name (which must exist) to location Where. See 
  660.    --  Gtk.Text_Buffer.Move_Mark for details. 
  661.    --  "name": name of a mark 
  662.    --  "where": new location for mark 
  663.  
  664.    procedure Paste_Clipboard 
  665.       (Buffer           : not null access Gtk_Text_Buffer_Record; 
  666.        Clipboard        : not null access Gtk.Clipboard.Gtk_Clipboard_Record'Class; 
  667.        Default_Editable : Boolean := True); 
  668.    --  Pastes the contents of a clipboard at the insertion point, or at 
  669.    --  Override_Location. (Note: pasting is asynchronous, that is, we'll ask 
  670.    --  for the paste data and return, and at some point later after the main 
  671.    --  loop runs, the paste data will be inserted.) 
  672.    --  "clipboard": the Gtk.Clipboard.Gtk_Clipboard to paste from 
  673.    --  "default_editable": whether the buffer is editable by default 
  674.  
  675.    procedure Place_Cursor 
  676.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  677.        Where  : Gtk.Text_Iter.Gtk_Text_Iter); 
  678.    --  This function moves the "insert" and "selection_bound" marks 
  679.    --  simultaneously. If you move them to the same place in two steps with 
  680.    --  Gtk.Text_Buffer.Move_Mark, you will temporarily select a region in 
  681.    --  between their old and new locations, which can be pretty inefficient 
  682.    --  since the temporarily-selected region will force stuff to be 
  683.    --  recalculated. This function moves them as a unit, which can be 
  684.    --  optimized. 
  685.    --  "where": where to put the cursor 
  686.  
  687.    function Register_Deserialize_Tagset 
  688.       (Buffer      : not null access Gtk_Text_Buffer_Record; 
  689.        Tagset_Name : UTF8_String := "") return Gdk.Types.Gdk_Atom; 
  690.    --  This function registers GTK+'s internal rich text serialization format 
  691.    --  with the passed Buffer. See Gtk.Text_Buffer.Register_Serialize_Tagset 
  692.    --  for details. 
  693.    --  Since: gtk+ 2.10 
  694.    --  "tagset_name": an optional tagset name, on null 
  695.  
  696.    function Register_Serialize_Tagset 
  697.       (Buffer      : not null access Gtk_Text_Buffer_Record; 
  698.        Tagset_Name : UTF8_String := "") return Gdk.Types.Gdk_Atom; 
  699.    --  This function registers GTK+'s internal rich text serialization format 
  700.    --  with the passed Buffer. The internal format does not comply to any 
  701.    --  standard rich text format and only works between 
  702.    --  Gtk.Text_Buffer.Gtk_Text_Buffer instances. It is capable of serializing 
  703.    --  all of a text buffer's tags and embedded pixbufs. 
  704.    --  This function is just a wrapper around 
  705.    --  gtk_text_buffer_register_serialize_format. The mime type used for 
  706.    --  registering is "application/x-gtk-text-buffer-rich-text", or 
  707.    --  "application/x-gtk-text-buffer-rich-text;format=Tagset_Name" if a 
  708.    --  Tagset_Name was passed. 
  709.    --  The Tagset_Name can be used to restrict the transfer of rich text to 
  710.    --  buffers with compatible sets of tags, in order to avoid unknown tags 
  711.    --  from being pasted. It is probably the common case to pass an identifier 
  712.    --  != null here, since the null tagset requires the receiving buffer to 
  713.    --  deal with with pasting of arbitrary tags. 
  714.    --  Since: gtk+ 2.10 
  715.    --  "tagset_name": an optional tagset name, on null 
  716.  
  717.    procedure Remove_All_Tags 
  718.       (Buffer  : not null access Gtk_Text_Buffer_Record; 
  719.        Start   : Gtk.Text_Iter.Gtk_Text_Iter; 
  720.        The_End : Gtk.Text_Iter.Gtk_Text_Iter); 
  721.    --  Removes all tags in the range between Start and End. Be careful with 
  722.    --  this function; it could remove tags added in code unrelated to the code 
  723.    --  you're currently writing. That is, using this function is probably a bad 
  724.    --  idea if you have two or more unrelated code sections that add tags. 
  725.    --  "start": one bound of range to be untagged 
  726.    --  "end": other bound of range to be untagged 
  727.  
  728.    procedure Remove_Selection_Clipboard 
  729.       (Buffer    : not null access Gtk_Text_Buffer_Record; 
  730.        Clipboard : not null access Gtk.Clipboard.Gtk_Clipboard_Record'Class); 
  731.    --  Removes a Gtk.Clipboard.Gtk_Clipboard added with 
  732.    --  Gtk.Text_Buffer.Add_Selection_Clipboard. 
  733.    --  "clipboard": a Gtk.Clipboard.Gtk_Clipboard added to Buffer by 
  734.    --  Gtk.Text_Buffer.Add_Selection_Clipboard 
  735.  
  736.    procedure Remove_Tag 
  737.       (Buffer  : not null access Gtk_Text_Buffer_Record; 
  738.        Tag     : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class; 
  739.        Start   : Gtk.Text_Iter.Gtk_Text_Iter; 
  740.        The_End : Gtk.Text_Iter.Gtk_Text_Iter); 
  741.    --  Emits the "remove-tag" signal. The default handler for the signal 
  742.    --  removes all occurrences of Tag from the given range. Start and End don't 
  743.    --  have to be in order. 
  744.    --  "tag": a Gtk.Text_Tag.Gtk_Text_Tag 
  745.    --  "start": one bound of range to be untagged 
  746.    --  "end": other bound of range to be untagged 
  747.  
  748.    procedure Remove_Tag_By_Name 
  749.       (Buffer  : not null access Gtk_Text_Buffer_Record; 
  750.        Name    : UTF8_String; 
  751.        Start   : Gtk.Text_Iter.Gtk_Text_Iter; 
  752.        The_End : Gtk.Text_Iter.Gtk_Text_Iter); 
  753.    --  Calls Gtk.Text_Tag_Table.Lookup on the buffer's tag table to get a 
  754.    --  Gtk.Text_Tag.Gtk_Text_Tag, then calls Gtk.Text_Buffer.Remove_Tag. 
  755.    --  "name": name of a Gtk.Text_Tag.Gtk_Text_Tag 
  756.    --  "start": one bound of range to be untagged 
  757.    --  "end": other bound of range to be untagged 
  758.  
  759.    procedure Select_Range 
  760.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  761.        Ins    : Gtk.Text_Iter.Gtk_Text_Iter; 
  762.        Bound  : Gtk.Text_Iter.Gtk_Text_Iter); 
  763.    --  This function moves the "insert" and "selection_bound" marks 
  764.    --  simultaneously. If you move them in two steps with 
  765.    --  Gtk.Text_Buffer.Move_Mark, you will temporarily select a region in 
  766.    --  between their old and new locations, which can be pretty inefficient 
  767.    --  since the temporarily-selected region will force stuff to be 
  768.    --  recalculated. This function moves them as a unit, which can be 
  769.    --  optimized. 
  770.    --  Since: gtk+ 2.4 
  771.    --  "ins": where to put the "insert" mark 
  772.    --  "bound": where to put the "selection_bound" mark 
  773.  
  774.    procedure Unregister_Deserialize_Format 
  775.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  776.        Format : Gdk.Types.Gdk_Atom); 
  777.    --  This function unregisters a rich text format that was previously 
  778.    --  registered using gtk_text_buffer_register_deserialize_format or 
  779.    --  Gtk.Text_Buffer.Register_Deserialize_Tagset. 
  780.    --  Since: gtk+ 2.10 
  781.    --  "format": a Gdk.Types.Gdk_Atom representing a registered rich text 
  782.    --  format. 
  783.  
  784.    procedure Unregister_Serialize_Format 
  785.       (Buffer : not null access Gtk_Text_Buffer_Record; 
  786.        Format : Gdk.Types.Gdk_Atom); 
  787.    --  This function unregisters a rich text format that was previously 
  788.    --  registered using gtk_text_buffer_register_serialize_format or 
  789.    --  Gtk.Text_Buffer.Register_Serialize_Tagset 
  790.    --  Since: gtk+ 2.10 
  791.    --  "format": a Gdk.Types.Gdk_Atom representing a registered rich text 
  792.    --  format. 
  793.  
  794.    ---------------------- 
  795.    -- GtkAda additions -- 
  796.    ---------------------- 
  797.  
  798.    procedure Insert 
  799.      (Buffer : access Gtk_Text_Buffer_Record; 
  800.       Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter; 
  801.       Text   : Gtkada.Types.Chars_Ptr); 
  802.    --  More efficient version of Insert, which doesn't require a string copy. 
  803.  
  804.    procedure Insert_At_Cursor 
  805.      (Buffer : access Gtk_Text_Buffer_Record; 
  806.       Text   : Gtkada.Types.Chars_Ptr; 
  807.       Len    : Gint := -1); 
  808.    --  Call Buffer_Insert, using the current cursor position 
  809.    --  as the insertion point. 
  810.    --  Text: UTF-8 format C string to insert. 
  811.  
  812.    function Get_Text 
  813.      (Buffer               : access Gtk_Text_Buffer_Record; 
  814.       Start                : Gtk.Text_Iter.Gtk_Text_Iter; 
  815.       The_End              : Gtk.Text_Iter.Gtk_Text_Iter; 
  816.       Include_Hidden_Chars : Boolean := False) return Gtkada.Types.Chars_Ptr; 
  817.    --  Same as Get_Text above, but return a pointer to a C string, for 
  818.    --  efficiency. 
  819.    --  The caller is responsible for freeing (using Gtkada.Types.g_free) the 
  820.    --  returned pointer. 
  821.  
  822.    function Selection_Exists 
  823.      (Buffer : access Gtk_Text_Buffer_Record) return Boolean; 
  824.    --  Return True if some text in the buffer is currently selected. 
  825.  
  826.    procedure Insert_With_Tags 
  827.      (Buffer : access Gtk_Text_Buffer_Record; 
  828.       Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter; 
  829.       Text   : UTF8_String; 
  830.       Tag    : Gtk_Text_Tag); 
  831.    procedure Insert_With_Tags 
  832.      (Buffer : access Gtk_Text_Buffer_Record; 
  833.       Iter   : in out Gtk.Text_Iter.Gtk_Text_Iter; 
  834.       Text   : Gtkada.Types.Chars_Ptr; 
  835.       Tag    : Gtk.Text_Tag.Gtk_Text_Tag); 
  836.    --  Same as Insert, but specifies the tag to apply to the range. 
  837.  
  838.    function Get_Buffer 
  839.      (Iter : Gtk_Text_Iter) return Gtk.Text_Buffer.Gtk_Text_Buffer; 
  840.    --  Returns the Gtk.Text_Buffer.Gtk_Text_Buffer this iterator is associated 
  841.    --  with. 
  842.  
  843.    function Get_Buffer 
  844.      (Mark : Gtk_Text_Mark) 
  845.    return Gtk.Text_Buffer.Gtk_Text_Buffer; 
  846.    --  Gets the buffer this mark is located inside, or null if the mark is 
  847.    --  deleted. 
  848.  
  849.    function Create_Tag 
  850.      (Buffer              : access Gtk_Text_Buffer_Record; 
  851.       Tag_Name            : String := "") 
  852.    return Gtk.Text_Tag.Gtk_Text_Tag; 
  853.    --  Creates a tag and adds it to the tag table for Buffer. Equivalent to 
  854.    --  calling gtk.text_tag.gtk_new and then adding the tag to the buffer's tag 
  855.    --  table. The returned tag is owned by the buffer's tag table, so the ref 
  856.    --  count will be equal to one. 
  857.    -- 
  858.    --  If Tag_Name is NULL, the tag is anonymous, otherwise a tag called 
  859.    --  Tag_Name must not already exist in the tag table for this buffer. 
  860.  
  861.    ---------------- 
  862.    -- Properties -- 
  863.    ---------------- 
  864.    --  The following properties are defined for this widget. See 
  865.    --  Glib.Properties for more information on properties) 
  866.  
  867.    Copy_Target_List_Property : constant Glib.Properties.Property_Object; 
  868.    --  Type: Gtk.Target_List.Gtk_Target_List 
  869.    --  The list of targets this buffer supports for clipboard copying and as 
  870.    --  DND source. 
  871.  
  872.    Cursor_Position_Property : constant Glib.Properties.Property_Int; 
  873.    --  The position of the insert mark (as offset from the beginning of the 
  874.    --  buffer). It is useful for getting notified when the cursor moves. 
  875.  
  876.    Has_Selection_Property : constant Glib.Properties.Property_Boolean; 
  877.    --  Whether the buffer has some text currently selected. 
  878.  
  879.    Paste_Target_List_Property : constant Glib.Properties.Property_Object; 
  880.    --  Type: Gtk.Target_List.Gtk_Target_List 
  881.    --  The list of targets this buffer supports for clipboard pasting and as 
  882.    --  DND destination. 
  883.  
  884.    Tag_Table_Property : constant Glib.Properties.Property_Object; 
  885.    --  Type: Gtk.Text_Tag_Table.Gtk_Text_Tag_Table 
  886.  
  887.    Text_Property : constant Glib.Properties.Property_String; 
  888.    --  The text content of the buffer. Without child widgets and images, see 
  889.    --  Gtk.Text_Buffer.Get_Text for more information. 
  890.  
  891.    ------------- 
  892.    -- Signals -- 
  893.    ------------- 
  894.  
  895.    type Cb_Gtk_Text_Buffer_Gtk_Text_Tag_Gtk_Text_Iter_Gtk_Text_Iter_Void is not null access procedure 
  896.      (Self    : access Gtk_Text_Buffer_Record'Class; 
  897.       Tag     : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class; 
  898.       Start   : Gtk.Text_Iter.Gtk_Text_Iter; 
  899.       The_End : Gtk.Text_Iter.Gtk_Text_Iter); 
  900.  
  901.    type Cb_GObject_Gtk_Text_Tag_Gtk_Text_Iter_Gtk_Text_Iter_Void is not null access procedure 
  902.      (Self    : access Glib.Object.GObject_Record'Class; 
  903.       Tag     : not null access Gtk.Text_Tag.Gtk_Text_Tag_Record'Class; 
  904.       Start   : Gtk.Text_Iter.Gtk_Text_Iter; 
  905.       The_End : Gtk.Text_Iter.Gtk_Text_Iter); 
  906.  
  907.    Signal_Apply_Tag : constant Glib.Signal_Name := "apply-tag"; 
  908.    procedure On_Apply_Tag 
  909.       (Self  : not null access Gtk_Text_Buffer_Record; 
  910.        Call  : Cb_Gtk_Text_Buffer_Gtk_Text_Tag_Gtk_Text_Iter_Gtk_Text_Iter_Void; 
  911.        After : Boolean := False); 
  912.    procedure On_Apply_Tag 
  913.       (Self  : not null access Gtk_Text_Buffer_Record; 
  914.        Call  : Cb_GObject_Gtk_Text_Tag_Gtk_Text_Iter_Gtk_Text_Iter_Void; 
  915.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  916.        After : Boolean := False); 
  917.    --  The ::apply-tag signal is emitted to apply a tag to a range of text in 
  918.    --  a Gtk.Text_Buffer.Gtk_Text_Buffer. Applying actually occurs in the 
  919.    --  default handler. 
  920.    -- 
  921.    --  Note that if your handler runs before the default handler it must not 
  922.    --  invalidate the Start and End iters (or has to revalidate them). 
  923.    -- 
  924.    --  See also: Gtk.Text_Buffer.Apply_Tag, gtk_text_buffer_insert_with_tags, 
  925.    --  Gtk.Text_Buffer.Insert_Range. 
  926.    --  
  927.    --  Callback parameters: 
  928.    --    --  "tag": the applied tag 
  929.    --    --  "start": the start of the range the tag is applied to 
  930.    --    --  "end": the end of the range the tag is applied to 
  931.  
  932.    type Cb_Gtk_Text_Buffer_Void is not null access procedure 
  933.      (Self : access Gtk_Text_Buffer_Record'Class); 
  934.  
  935.    type Cb_GObject_Void is not null access procedure 
  936.      (Self : access Glib.Object.GObject_Record'Class); 
  937.  
  938.    Signal_Begin_User_Action : constant Glib.Signal_Name := "begin-user-action"; 
  939.    procedure On_Begin_User_Action 
  940.       (Self  : not null access Gtk_Text_Buffer_Record; 
  941.        Call  : Cb_Gtk_Text_Buffer_Void; 
  942.        After : Boolean := False); 
  943.    procedure On_Begin_User_Action 
  944.       (Self  : not null access Gtk_Text_Buffer_Record; 
  945.        Call  : Cb_GObject_Void; 
  946.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  947.        After : Boolean := False); 
  948.    --  The ::begin-user-action signal is emitted at the beginning of a single 
  949.    --  user-visible operation on a Gtk.Text_Buffer.Gtk_Text_Buffer. 
  950.    -- 
  951.    --  See also: Gtk.Text_Buffer.Begin_User_Action, 
  952.    --  Gtk.Text_Buffer.Insert_Interactive, 
  953.    --  Gtk.Text_Buffer.Insert_Range_Interactive, 
  954.    --  Gtk.Text_Buffer.Delete_Interactive, Gtk.Text_Buffer.Backspace, 
  955.    --  Gtk.Text_Buffer.Delete_Selection. 
  956.  
  957.    Signal_Changed : constant Glib.Signal_Name := "changed"; 
  958.    procedure On_Changed 
  959.       (Self  : not null access Gtk_Text_Buffer_Record; 
  960.        Call  : Cb_Gtk_Text_Buffer_Void; 
  961.        After : Boolean := False); 
  962.    procedure On_Changed 
  963.       (Self  : not null access Gtk_Text_Buffer_Record; 
  964.        Call  : Cb_GObject_Void; 
  965.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  966.        After : Boolean := False); 
  967.    --  The ::changed signal is emitted when the content of a 
  968.    --  Gtk.Text_Buffer.Gtk_Text_Buffer has changed. 
  969.  
  970.    type Cb_Gtk_Text_Buffer_Gtk_Text_Iter_Gtk_Text_Iter_Void is not null access procedure 
  971.      (Self    : access Gtk_Text_Buffer_Record'Class; 
  972.       Start   : Gtk.Text_Iter.Gtk_Text_Iter; 
  973.       The_End : Gtk.Text_Iter.Gtk_Text_Iter); 
  974.  
  975.    type Cb_GObject_Gtk_Text_Iter_Gtk_Text_Iter_Void is not null access procedure 
  976.      (Self    : access Glib.Object.GObject_Record'Class; 
  977.       Start   : Gtk.Text_Iter.Gtk_Text_Iter; 
  978.       The_End : Gtk.Text_Iter.Gtk_Text_Iter); 
  979.  
  980.    Signal_Delete_Range : constant Glib.Signal_Name := "delete-range"; 
  981.    procedure On_Delete_Range 
  982.       (Self  : not null access Gtk_Text_Buffer_Record; 
  983.        Call  : Cb_Gtk_Text_Buffer_Gtk_Text_Iter_Gtk_Text_Iter_Void; 
  984.        After : Boolean := False); 
  985.    procedure On_Delete_Range 
  986.       (Self  : not null access Gtk_Text_Buffer_Record; 
  987.        Call  : Cb_GObject_Gtk_Text_Iter_Gtk_Text_Iter_Void; 
  988.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  989.        After : Boolean := False); 
  990.    --  The ::delete-range signal is emitted to delete a range from a 
  991.    --  Gtk.Text_Buffer.Gtk_Text_Buffer. 
  992.    -- 
  993.    --  Note that if your handler runs before the default handler it must not 
  994.    --  invalidate the Start and End iters (or has to revalidate them). The 
  995.    --  default signal handler revalidates the Start and End iters to both point 
  996.    --  point to the location where text was deleted. Handlers which run after 
  997.    --  the default handler (see g_signal_connect_after) do not have access to 
  998.    --  the deleted text. 
  999.    -- 
  1000.    --  See also: Gtk.Text_Buffer.Delete. 
  1001.    --  
  1002.    --  Callback parameters: 
  1003.    --    --  "start": the start of the range to be deleted 
  1004.    --    --  "end": the end of the range to be deleted 
  1005.  
  1006.    Signal_End_User_Action : constant Glib.Signal_Name := "end-user-action"; 
  1007.    procedure On_End_User_Action 
  1008.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1009.        Call  : Cb_Gtk_Text_Buffer_Void; 
  1010.        After : Boolean := False); 
  1011.    procedure On_End_User_Action 
  1012.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1013.        Call  : Cb_GObject_Void; 
  1014.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1015.        After : Boolean := False); 
  1016.    --  The ::end-user-action signal is emitted at the end of a single 
  1017.    --  user-visible operation on the Gtk.Text_Buffer.Gtk_Text_Buffer. 
  1018.    -- 
  1019.    --  See also: Gtk.Text_Buffer.End_User_Action, 
  1020.    --  Gtk.Text_Buffer.Insert_Interactive, 
  1021.    --  Gtk.Text_Buffer.Insert_Range_Interactive, 
  1022.    --  Gtk.Text_Buffer.Delete_Interactive, Gtk.Text_Buffer.Backspace, 
  1023.    --  Gtk.Text_Buffer.Delete_Selection, Gtk.Text_Buffer.Backspace. 
  1024.  
  1025.    type Cb_Gtk_Text_Buffer_Gtk_Text_Iter_Gtk_Text_Child_Anchor_Void is not null access procedure 
  1026.      (Self     : access Gtk_Text_Buffer_Record'Class; 
  1027.       Location : Gtk.Text_Iter.Gtk_Text_Iter; 
  1028.       Anchor   : not null access Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor_Record'Class); 
  1029.  
  1030.    type Cb_GObject_Gtk_Text_Iter_Gtk_Text_Child_Anchor_Void is not null access procedure 
  1031.      (Self     : access Glib.Object.GObject_Record'Class; 
  1032.       Location : Gtk.Text_Iter.Gtk_Text_Iter; 
  1033.       Anchor   : not null access Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor_Record'Class); 
  1034.  
  1035.    Signal_Insert_Child_Anchor : constant Glib.Signal_Name := "insert-child-anchor"; 
  1036.    procedure On_Insert_Child_Anchor 
  1037.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1038.        Call  : Cb_Gtk_Text_Buffer_Gtk_Text_Iter_Gtk_Text_Child_Anchor_Void; 
  1039.        After : Boolean := False); 
  1040.    procedure On_Insert_Child_Anchor 
  1041.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1042.        Call  : Cb_GObject_Gtk_Text_Iter_Gtk_Text_Child_Anchor_Void; 
  1043.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1044.        After : Boolean := False); 
  1045.    --  The ::insert-child-anchor signal is emitted to insert a 
  1046.    --  Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor in a 
  1047.    --  Gtk.Text_Buffer.Gtk_Text_Buffer. Insertion actually occurs in the 
  1048.    --  default handler. 
  1049.    -- 
  1050.    --  Note that if your handler runs before the default handler it must not 
  1051.    --  invalidate the Location iter (or has to revalidate it). The default 
  1052.    --  signal handler revalidates it to be placed after the inserted Anchor. 
  1053.    -- 
  1054.    --  See also: Gtk.Text_Buffer.Insert_Child_Anchor. 
  1055.    --  
  1056.    --  Callback parameters: 
  1057.    --    --  "location": position to insert Anchor in Textbuffer 
  1058.    --    --  "anchor": the Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor to be 
  1059.    --    --  inserted 
  1060.  
  1061.    type Cb_Gtk_Text_Buffer_Gtk_Text_Iter_Gdk_Pixbuf_Void is not null access procedure 
  1062.      (Self     : access Gtk_Text_Buffer_Record'Class; 
  1063.       Location : Gtk.Text_Iter.Gtk_Text_Iter; 
  1064.       Pixbuf   : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); 
  1065.  
  1066.    type Cb_GObject_Gtk_Text_Iter_Gdk_Pixbuf_Void is not null access procedure 
  1067.      (Self     : access Glib.Object.GObject_Record'Class; 
  1068.       Location : Gtk.Text_Iter.Gtk_Text_Iter; 
  1069.       Pixbuf   : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); 
  1070.  
  1071.    Signal_Insert_Pixbuf : constant Glib.Signal_Name := "insert-pixbuf"; 
  1072.    procedure On_Insert_Pixbuf 
  1073.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1074.        Call  : Cb_Gtk_Text_Buffer_Gtk_Text_Iter_Gdk_Pixbuf_Void; 
  1075.        After : Boolean := False); 
  1076.    procedure On_Insert_Pixbuf 
  1077.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1078.        Call  : Cb_GObject_Gtk_Text_Iter_Gdk_Pixbuf_Void; 
  1079.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1080.        After : Boolean := False); 
  1081.    --  The ::insert-pixbuf signal is emitted to insert a Gdk.Pixbuf.Gdk_Pixbuf 
  1082.    --  in a Gtk.Text_Buffer.Gtk_Text_Buffer. Insertion actually occurs in the 
  1083.    --  default handler. 
  1084.    -- 
  1085.    --  Note that if your handler runs before the default handler it must not 
  1086.    --  invalidate the Location iter (or has to revalidate it). The default 
  1087.    --  signal handler revalidates it to be placed after the inserted Pixbuf. 
  1088.    -- 
  1089.    --  See also: Gtk.Text_Buffer.Insert_Pixbuf. 
  1090.    --  
  1091.    --  Callback parameters: 
  1092.    --    --  "location": position to insert Pixbuf in Textbuffer 
  1093.    --    --  "pixbuf": the Gdk.Pixbuf.Gdk_Pixbuf to be inserted 
  1094.  
  1095.    type Cb_Gtk_Text_Buffer_Gtk_Text_Iter_UTF8_String_Gint_Void is not null access procedure 
  1096.      (Self     : access Gtk_Text_Buffer_Record'Class; 
  1097.       Location : Gtk.Text_Iter.Gtk_Text_Iter; 
  1098.       Text     : UTF8_String; 
  1099.       Len      : Gint); 
  1100.  
  1101.    type Cb_GObject_Gtk_Text_Iter_UTF8_String_Gint_Void is not null access procedure 
  1102.      (Self     : access Glib.Object.GObject_Record'Class; 
  1103.       Location : Gtk.Text_Iter.Gtk_Text_Iter; 
  1104.       Text     : UTF8_String; 
  1105.       Len      : Gint); 
  1106.  
  1107.    Signal_Insert_Text : constant Glib.Signal_Name := "insert-text"; 
  1108.    procedure On_Insert_Text 
  1109.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1110.        Call  : Cb_Gtk_Text_Buffer_Gtk_Text_Iter_UTF8_String_Gint_Void; 
  1111.        After : Boolean := False); 
  1112.    procedure On_Insert_Text 
  1113.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1114.        Call  : Cb_GObject_Gtk_Text_Iter_UTF8_String_Gint_Void; 
  1115.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1116.        After : Boolean := False); 
  1117.    --  The ::insert-text signal is emitted to insert text in a 
  1118.    --  Gtk.Text_Buffer.Gtk_Text_Buffer. Insertion actually occurs in the 
  1119.    --  default handler. 
  1120.    -- 
  1121.    --  Note that if your handler runs before the default handler it must not 
  1122.    --  invalidate the Location iter (or has to revalidate it). The default 
  1123.    --  signal handler revalidates it to point to the end of the inserted text. 
  1124.    -- 
  1125.    --  See also: Gtk.Text_Buffer.Insert, Gtk.Text_Buffer.Insert_Range. 
  1126.    --  
  1127.    --  Callback parameters: 
  1128.    --    --  "location": position to insert Text in Textbuffer 
  1129.    --    --  "text": the UTF-8 text to be inserted 
  1130.    --    --  "len": length of the inserted text in bytes 
  1131.  
  1132.    type Cb_Gtk_Text_Buffer_Gtk_Text_Mark_Void is not null access procedure 
  1133.      (Self : access Gtk_Text_Buffer_Record'Class; 
  1134.       Mark : not null access Gtk.Text_Mark.Gtk_Text_Mark_Record'Class); 
  1135.  
  1136.    type Cb_GObject_Gtk_Text_Mark_Void is not null access procedure 
  1137.      (Self : access Glib.Object.GObject_Record'Class; 
  1138.       Mark : not null access Gtk.Text_Mark.Gtk_Text_Mark_Record'Class); 
  1139.  
  1140.    Signal_Mark_Deleted : constant Glib.Signal_Name := "mark-deleted"; 
  1141.    procedure On_Mark_Deleted 
  1142.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1143.        Call  : Cb_Gtk_Text_Buffer_Gtk_Text_Mark_Void; 
  1144.        After : Boolean := False); 
  1145.    procedure On_Mark_Deleted 
  1146.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1147.        Call  : Cb_GObject_Gtk_Text_Mark_Void; 
  1148.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1149.        After : Boolean := False); 
  1150.    --  The ::mark-deleted signal is emitted as notification after a 
  1151.    --  Gtk.Text_Mark.Gtk_Text_Mark is deleted. 
  1152.    -- 
  1153.    --  See also: Gtk.Text_Buffer.Delete_Mark. 
  1154.  
  1155.    type Cb_Gtk_Text_Buffer_Gtk_Text_Iter_Gtk_Text_Mark_Void is not null access procedure 
  1156.      (Self     : access Gtk_Text_Buffer_Record'Class; 
  1157.       Location : Gtk.Text_Iter.Gtk_Text_Iter; 
  1158.       Mark     : not null access Gtk.Text_Mark.Gtk_Text_Mark_Record'Class); 
  1159.  
  1160.    type Cb_GObject_Gtk_Text_Iter_Gtk_Text_Mark_Void is not null access procedure 
  1161.      (Self     : access Glib.Object.GObject_Record'Class; 
  1162.       Location : Gtk.Text_Iter.Gtk_Text_Iter; 
  1163.       Mark     : not null access Gtk.Text_Mark.Gtk_Text_Mark_Record'Class); 
  1164.  
  1165.    Signal_Mark_Set : constant Glib.Signal_Name := "mark-set"; 
  1166.    procedure On_Mark_Set 
  1167.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1168.        Call  : Cb_Gtk_Text_Buffer_Gtk_Text_Iter_Gtk_Text_Mark_Void; 
  1169.        After : Boolean := False); 
  1170.    procedure On_Mark_Set 
  1171.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1172.        Call  : Cb_GObject_Gtk_Text_Iter_Gtk_Text_Mark_Void; 
  1173.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1174.        After : Boolean := False); 
  1175.    --  The ::mark-set signal is emitted as notification after a 
  1176.    --  Gtk.Text_Mark.Gtk_Text_Mark is set. 
  1177.    -- 
  1178.    --  See also: Gtk.Text_Buffer.Create_Mark, Gtk.Text_Buffer.Move_Mark. 
  1179.    --  
  1180.    --  Callback parameters: 
  1181.    --    --  "location": The location of Mark in Textbuffer 
  1182.    --    --  "mark": The mark that is set 
  1183.  
  1184.    Signal_Modified_Changed : constant Glib.Signal_Name := "modified-changed"; 
  1185.    procedure On_Modified_Changed 
  1186.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1187.        Call  : Cb_Gtk_Text_Buffer_Void; 
  1188.        After : Boolean := False); 
  1189.    procedure On_Modified_Changed 
  1190.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1191.        Call  : Cb_GObject_Void; 
  1192.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1193.        After : Boolean := False); 
  1194.    --  The ::modified-changed signal is emitted when the modified bit of a 
  1195.    --  Gtk.Text_Buffer.Gtk_Text_Buffer flips. 
  1196.    -- 
  1197.    --  See also: Gtk.Text_Buffer.Set_Modified. 
  1198.  
  1199.    type Cb_Gtk_Text_Buffer_Gtk_Clipboard_Void is not null access procedure 
  1200.      (Self   : access Gtk_Text_Buffer_Record'Class; 
  1201.       Object : not null access Gtk.Clipboard.Gtk_Clipboard_Record'Class); 
  1202.  
  1203.    type Cb_GObject_Gtk_Clipboard_Void is not null access procedure 
  1204.      (Self   : access Glib.Object.GObject_Record'Class; 
  1205.       Object : not null access Gtk.Clipboard.Gtk_Clipboard_Record'Class); 
  1206.  
  1207.    Signal_Paste_Done : constant Glib.Signal_Name := "paste-done"; 
  1208.    procedure On_Paste_Done 
  1209.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1210.        Call  : Cb_Gtk_Text_Buffer_Gtk_Clipboard_Void; 
  1211.        After : Boolean := False); 
  1212.    procedure On_Paste_Done 
  1213.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1214.        Call  : Cb_GObject_Gtk_Clipboard_Void; 
  1215.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1216.        After : Boolean := False); 
  1217.    --  The paste-done signal is emitted after paste operation has been 
  1218.    --  completed. This is useful to properly scroll the view to the end of the 
  1219.    --  pasted text. See Gtk.Text_Buffer.Paste_Clipboard for more details. 
  1220.  
  1221.    Signal_Remove_Tag : constant Glib.Signal_Name := "remove-tag"; 
  1222.    procedure On_Remove_Tag 
  1223.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1224.        Call  : Cb_Gtk_Text_Buffer_Gtk_Text_Tag_Gtk_Text_Iter_Gtk_Text_Iter_Void; 
  1225.        After : Boolean := False); 
  1226.    procedure On_Remove_Tag 
  1227.       (Self  : not null access Gtk_Text_Buffer_Record; 
  1228.        Call  : Cb_GObject_Gtk_Text_Tag_Gtk_Text_Iter_Gtk_Text_Iter_Void; 
  1229.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1230.        After : Boolean := False); 
  1231.    --  The ::remove-tag signal is emitted to remove all occurrences of Tag 
  1232.    --  from a range of text in a Gtk.Text_Buffer.Gtk_Text_Buffer. Removal 
  1233.    --  actually occurs in the default handler. 
  1234.    -- 
  1235.    --  Note that if your handler runs before the default handler it must not 
  1236.    --  invalidate the Start and End iters (or has to revalidate them). 
  1237.    -- 
  1238.    --  See also: Gtk.Text_Buffer.Remove_Tag. 
  1239.    --  
  1240.    --  Callback parameters: 
  1241.    --    --  "tag": the tag to be removed 
  1242.    --    --  "start": the start of the range the tag is removed from 
  1243.    --    --  "end": the end of the range the tag is removed from 
  1244.  
  1245. private 
  1246.    Text_Property : constant Glib.Properties.Property_String := 
  1247.      Glib.Properties.Build ("text"); 
  1248.    Tag_Table_Property : constant Glib.Properties.Property_Object := 
  1249.      Glib.Properties.Build ("tag-table"); 
  1250.    Paste_Target_List_Property : constant Glib.Properties.Property_Object := 
  1251.      Glib.Properties.Build ("paste-target-list"); 
  1252.    Has_Selection_Property : constant Glib.Properties.Property_Boolean := 
  1253.      Glib.Properties.Build ("has-selection"); 
  1254.    Cursor_Position_Property : constant Glib.Properties.Property_Int := 
  1255.      Glib.Properties.Build ("cursor-position"); 
  1256.    Copy_Target_List_Property : constant Glib.Properties.Property_Object := 
  1257.      Glib.Properties.Build ("copy-target-list"); 
  1258. end Gtk.Text_Buffer;