1. ----------------------------------------------------------------------- 
  2. --              GtkAda - Ada95 binding for Gtk+/Gnome                -- 
  3. --                                                                   -- 
  4. --                Copyright (C) 2001-2010, 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. --  See extended documentation in Gtk.Tree_View_Column and Gtk.Tree_Store. 
  31. --  </description> 
  32. --  <c_version>2.16.6</c_version> 
  33. --  <group>Trees and Lists</group> 
  34. --  <testgtk>create_tree_view.adb</testgtk> 
  35. --  <screenshot>gtk-tree_view</screenshot> 
  36.  
  37. with Glib.Properties; 
  38. with Gdk.Dnd; 
  39. with Gdk.Pixmap; 
  40. with Gdk.Rectangle; 
  41. with Gdk.Types; 
  42. with Gdk.Window; 
  43. with Gtk; 
  44. with Gtk.Adjustment; 
  45. with Gtk.Cell_Renderer; 
  46. with Gtk.Container; 
  47. with Gtk.Enums; 
  48. with Gtk.GEntry; 
  49. with Gtk.Selection; 
  50. with Gtk.Tooltips; 
  51. with Gtk.Tooltip; 
  52. with Gtk.Tree_Model; 
  53. with Gtk.Tree_Selection; 
  54. with Gtk.Tree_View_Column; 
  55. with Interfaces.C.Strings; 
  56.  
  57. package Gtk.Tree_View is 
  58.  
  59.    type Gtk_Tree_View_Record is 
  60.      new Gtk.Container.Gtk_Container_Record with private; 
  61.    type Gtk_Tree_View is access all Gtk_Tree_View_Record'Class; 
  62.  
  63.    type Gtk_Tree_View_Drop_Position is 
  64.      (Tree_View_Drop_Before, 
  65.       Tree_View_Drop_After, 
  66.       Tree_View_Drop_Into_Or_Before, 
  67.       Tree_View_Drop_Into_Or_After); 
  68.    pragma Convention (C, Gtk_Tree_View_Drop_Position); 
  69.  
  70.    procedure Gtk_New (Widget : out Gtk_Tree_View); 
  71.    procedure Initialize (Widget : access Gtk_Tree_View_Record'Class); 
  72.    --  Creates or initializes a new tree view 
  73.  
  74.    function Get_Type return Gtk.Gtk_Type; 
  75.    --  Return the internal value associated with this widget. 
  76.  
  77.    procedure Gtk_New 
  78.      (Widget : out Gtk_Tree_View; 
  79.       Model  : access Gtk.Tree_Model.Gtk_Tree_Model_Record'Class); 
  80.  
  81.    procedure Initialize 
  82.      (Widget : access Gtk_Tree_View_Record'Class; 
  83.       Model  : access Gtk.Tree_Model.Gtk_Tree_Model_Record'Class); 
  84.    --  Internal initialization function. 
  85.    --  See the section "Creating your own widgets" in the documentation. 
  86.  
  87.    procedure Set_Model 
  88.      (Tree_View : access Gtk_Tree_View_Record; 
  89.       Model     : Gtk.Tree_Model.Gtk_Tree_Model); 
  90.    function Get_Model 
  91.      (Tree_View : access Gtk_Tree_View_Record) 
  92.       return Gtk.Tree_Model.Gtk_Tree_Model; 
  93.    --  Sets the model for a Gtk_Tree_View.  If the Tree_View already has a 
  94.    --  model set, it will remove it before setting the new model. 
  95.    --  If Model is Null, then it will unset the old model. 
  96.  
  97.    function Get_Selection 
  98.      (Tree_View : access Gtk_Tree_View_Record) 
  99.       return Gtk.Tree_Selection.Gtk_Tree_Selection; 
  100.    --  Gets the Gtk_Tree_Selection associated with Tree_View. 
  101.  
  102.    procedure Set_Hadjustment 
  103.      (Tree_View  : access Gtk_Tree_View_Record; 
  104.       Adjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class); 
  105.    function Get_Hadjustment 
  106.      (Tree_View : access Gtk_Tree_View_Record) 
  107.       return Gtk.Adjustment.Gtk_Adjustment; 
  108.    --  Sets or gets the Gtk_Adjustment for the current horizontal aspect. 
  109.  
  110.    procedure Set_Vadjustment 
  111.      (Tree_View  : access Gtk_Tree_View_Record; 
  112.       Adjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class); 
  113.    function Get_Vadjustment 
  114.      (Tree_View : access Gtk_Tree_View_Record) 
  115.       return Gtk.Adjustment.Gtk_Adjustment; 
  116.    --  Sets or Gets the Gtk_Adjustment currently being used for the vertical 
  117.    --  aspect. 
  118.  
  119.    function Get_Enable_Tree_Lines 
  120.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  121.    procedure Set_Enable_Tree_Lines 
  122.      (Tree_View : access Gtk_Tree_View_Record; 
  123.       Enabled   : Boolean); 
  124.    --  Whether to draw lines interconnecting the expanders in Tree_View. 
  125.    --  This does not have any visible effects for lists. 
  126.  
  127.    function Get_Grid_Lines 
  128.      (Tree_View : access Gtk_Tree_View_Record) return Gtk.Enums.Gtk_Grid_Lines; 
  129.    procedure Set_Grid_Lines 
  130.      (Tree_View  : access Gtk_Tree_View_Record; 
  131.       Grid_Lines : Gtk.Enums.Gtk_Grid_Lines); 
  132.    --  Which grid lines to draw in Tree_View. 
  133.  
  134.    function Get_Level_Indentation 
  135.      (Tree_View : access Gtk_Tree_View_Record) return Gint; 
  136.    procedure Set_Level_Indentation 
  137.      (Tree_View   : access Gtk_Tree_View_Record; 
  138.       Indentation : Gint); 
  139.    --  Sets the amount of extra indentation for child levels to use in 
  140.    --  Tree_View in addition to the default indentation.  The value should be 
  141.    --  specified in pixels, a value of 0 disables this feature and in this case 
  142.    --  only the default indentation will be used. 
  143.    --  This does not have any visible effects for lists. 
  144.  
  145.    function Get_Rubber_Banding 
  146.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  147.    procedure Set_Rubber_Banding 
  148.      (Tree_View : access Gtk_Tree_View_Record; 
  149.       Enable    : Boolean); 
  150.    --  Enables or disables rubber banding in Tree_View.  If the selection mode 
  151.    --  is Selection_Multiple, rubber banding will allow the user to select 
  152.    --  multiple rows by dragging the mouse. 
  153.  
  154.    function Is_Rubber_Banding_Active 
  155.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  156.    --  Returns whether a rubber banding operation is currently being done 
  157.    --  in Tree_View. 
  158.  
  159.    function Get_Show_Expanders 
  160.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  161.    procedure Set_Show_Expanders 
  162.      (Tree_View : access Gtk_Tree_View_Record; 
  163.       Enabled   : Boolean); 
  164.    --  Whether to draw and enable expanders and indent child rows in Tree_View. 
  165.    --  When disabled there will be no expanders visible in trees and there will 
  166.    --  be no way to expand and collapse rows by default.  Also note that hiding 
  167.    --  the expanders will disable the default indentation.  You can set a 
  168.    --  custom indentation in this case using Set_Level_Indentation. 
  169.    --  This does not have any visible effects for lists. 
  170.  
  171.    ---------------------------------- 
  172.    -- Column and header operations -- 
  173.    ---------------------------------- 
  174.  
  175.    procedure Set_Headers_Visible 
  176.      (Tree_View       : access Gtk_Tree_View_Record; 
  177.       Headers_Visible : Boolean); 
  178.    function Get_Headers_Visible 
  179.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  180.    --  Returns True if the headers on the Tree_View are visible. 
  181.  
  182.    procedure Columns_Autosize (Tree_View : access Gtk_Tree_View_Record); 
  183.    --  Resizes all columns to their optimal width. 
  184.  
  185.    function Get_Headers_Clickable 
  186.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  187.    procedure Set_Headers_Clickable 
  188.      (Tree_View : access Gtk_Tree_View_Record; 
  189.       Setting   : Boolean); 
  190.    --  Allow the column title buttons to be clicked. 
  191.  
  192.    procedure Set_Rules_Hint 
  193.      (Tree_View : access Gtk_Tree_View_Record; 
  194.       Setting   : Boolean); 
  195.    function Get_Rules_Hint 
  196.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  197.    --  This function tells GtkAda that the user interface for your 
  198.    --  application requires users to read across tree rows and associate 
  199.    --  cells with one another. By default, GtkAda will then render the tree 
  200.    --  with alternating row colors. Do *not* use it just because you prefer the 
  201.    --  appearance of the ruled tree; that's a question for the theme. Some 
  202.    --  themes will draw tree rows in alternating colors even when rules are 
  203.    --  turned off, and users who prefer that appearance all the time can choose 
  204.    --  those themes. You should call this function only as a *semantic* 
  205.    --  hint to the theme engine that your tree makes alternating colors 
  206.    --  useful from a functional standpoint (since it has lots of columns, 
  207.    --  generally). 
  208.  
  209.    ----------------------------- 
  210.    -- Public Column functions -- 
  211.    ----------------------------- 
  212.  
  213.    function Append_Column 
  214.      (Tree_View : access Gtk_Tree_View_Record; 
  215.       Column    : Gtk.Tree_View_Column.Gtk_Tree_View_Column) return Gint; 
  216.    --  Append Column to the list of columns. 
  217.  
  218.    function Remove_Column 
  219.      (Tree_View : access Gtk_Tree_View_Record; 
  220.       Column    : Gtk.Tree_View_Column.Gtk_Tree_View_Column) return Gint; 
  221.    --  Remove Column from Tree_View. 
  222.    --  Return value: The number of columns in Tree_View after removing. 
  223.  
  224.    function Insert_Column 
  225.      (Tree_View : access Gtk_Tree_View_Record; 
  226.       Column    : Gtk.Tree_View_Column.Gtk_Tree_View_Column; 
  227.       Position  : Gint := -1) return Gint; 
  228.    --  Insert the Column into the Tree_View at Position. 
  229.    --  If Position is -1, then the column is inserted at the end. 
  230.    --  Return the number of columns in Tree_View after insertion. 
  231.  
  232.    function Insert_Column_With_Data_Func 
  233.      (Tree_View : access Gtk_Tree_View_Record; 
  234.       Position  : Gint; 
  235.       Title     : String; 
  236.       Cell      : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  237.       Func      : Gtk.Tree_View_Column.Cell_Data_Func) 
  238.       return Gint; 
  239.    --  Convenience function that inserts a new column into the tree view 
  240.    --  with the given cell renderer and a function to set cell renderer 
  241.    --  attributes (normally using data from the model). See also 
  242.    --  Gtk.Tree_View_Column.Set_Cell_Data_Func and 
  243.    --  Gtk.Tree_View_Column.Pack_Start. 
  244.    --  If Tree_View has "fixed_height" mode enabled, then Column must have its 
  245.    --  "sizing" property set to be TREE_VIEW_COLUMN_FIXED. 
  246.    -- 
  247.    --  Return value: number of columns in the tree view post-insert 
  248.  
  249.    function Get_Column 
  250.      (Tree_View : access Gtk_Tree_View_Record; 
  251.       N         : Gint) 
  252.       return Gtk.Tree_View_Column.Gtk_Tree_View_Column; 
  253.    --  Gets the Gtk_Tree_View_Column at the given position in the Tree_View. 
  254.  
  255.    function Get_Tree_View 
  256.      (Tree_Column : access Gtk.Tree_View_Column.Gtk_Tree_View_Column_Record) 
  257.       return Gtk_Tree_View; 
  258.    --  Returns the Gtk_Tree_View wherein Tree_Column has been inserted.  If 
  259.    --  Column is currently not inserted in any tree view, null is 
  260.    --  returned. 
  261.  
  262.    function Get_Columns 
  263.      (Tree_View : access Gtk_Tree_View_Record) 
  264.       return Gtk.Tree_View_Column.Column_List.Glist; 
  265.    --  Return a list of all the Gtk_Tree_View_Column s currently in Tree_View. 
  266.    --  The returned list must be freed with g_list_free (). 
  267.  
  268.    procedure Move_Column_After 
  269.      (Tree_View   : access Gtk_Tree_View_Record; 
  270.       Column      : Gtk.Tree_View_Column.Gtk_Tree_View_Column; 
  271.       Base_Column : Gtk.Tree_View_Column.Gtk_Tree_View_Column); 
  272.    --  Move Column to be after to Base_Column.  If Base_Column is Null, then 
  273.    --  Column is placed in the first position. 
  274.  
  275.    procedure Set_Expander_Column 
  276.      (Tree_View : access Gtk_Tree_View_Record; 
  277.       Column    : Gtk.Tree_View_Column.Gtk_Tree_View_Column); 
  278.    --  Set the column to draw the expander arrow at. It must be in Tree_View. 
  279.    --  If Column is Null, then the expander arrow is fixed at the first column. 
  280.  
  281.    function Get_Expander_Column 
  282.      (Tree_View : access Gtk_Tree_View_Record) 
  283.       return Gtk.Tree_View_Column.Gtk_Tree_View_Column; 
  284.    --  Return the column that is the current expander column. 
  285.    --  This column has the expander arrow drawn next to it. 
  286.  
  287.    procedure Scroll_To_Point 
  288.      (Tree_View : access Gtk_Tree_View_Record; 
  289.       Tree_X    : Gint; 
  290.       Tree_Y    : Gint); 
  291.    --  Scroll the tree view such that the top-left corner of the visible 
  292.    --  area is Tree_X, Tree_Y, where Tree_X and Tree_Y are specified 
  293.    --  in tree window coordinates. The Tree_View must be realized before 
  294.    --  this function is called. If it isn't, you probably want to be 
  295.    --  using Scroll_To_Cell. 
  296.  
  297.    procedure Scroll_To_Cell 
  298.      (Tree_View : access Gtk_Tree_View_Record; 
  299.       Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  300.       Column    : Gtk.Tree_View_Column.Gtk_Tree_View_Column; 
  301.       Use_Align : Boolean; 
  302.       Row_Align : Gfloat; 
  303.       Col_Align : Gfloat); 
  304.    --  Move the alignments of Tree_View to the position specified by Column and 
  305.    --  Path. If Column is Null, then no horizontal scrolling occurs. Likewise, 
  306.    --  if Path is Null no vertical scrolling occurs. Row_Align determines where 
  307.    --  the row is placed, and Col_align determines where Column is placed. Both 
  308.    --  are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 
  309.    --  1.0 means right/bottom alignment, 0.5 means center. 
  310.    --  If Use_Align is False, then the alignment arguments are ignored, and the 
  311.    --  tree does the minimum amount of work to scroll the cell onto the screen. 
  312.  
  313.    procedure Get_Visible_Range 
  314.      (Tree_View  : access Gtk_Tree_View_Record; 
  315.       Start_Path : out Gtk.Tree_Model.Gtk_Tree_Path; 
  316.       End_Path   : out Gtk.Tree_Model.Gtk_Tree_Path; 
  317.       Success    : out Boolean); 
  318.    --  Sets Start_path and End_path to be the first and last visible path. 
  319.    --  Note that there may be invisible paths in between. 
  320.    --  The paths should be freed with Free after use. 
  321.  
  322.    procedure Row_Activated 
  323.      (Tree_View : access Gtk_Tree_View_Record; 
  324.       Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  325.       Column    : Gtk.Tree_View_Column.Gtk_Tree_View_Column); 
  326.    --  Activate the cell determined by Path and Column. 
  327.  
  328.    procedure Expand_All (Tree_View : access Gtk_Tree_View_Record); 
  329.    --  Recursively expand all nodes in the Tree_View. 
  330.  
  331.    procedure Collapse_All (Tree_View : access Gtk_Tree_View_Record); 
  332.    --  Recursively collapse all visible, expanded nodes in Tree_View. 
  333.  
  334.    function Expand_Row 
  335.      (Tree_View : access Gtk_Tree_View_Record; 
  336.       Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  337.       Open_All  : Boolean) return Boolean; 
  338.    --  Open the row so its children are visible 
  339.    --  Return True if the row existed and had children 
  340.  
  341.    procedure Expand_To_Path 
  342.      (Tree_View : access Gtk_Tree_View_Record; 
  343.       Path      : Gtk.Tree_Model.Gtk_Tree_Path); 
  344.    --  Expands the row at Path. This will also expand all parent rows of 
  345.    --  Path as necessary. 
  346.  
  347.    type Gtk_Tree_View_Mapping_Func is access 
  348.      procedure (Tree_View : System.Address;  --  Gtk_Tree_View 
  349.                 Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  350.                 User_Data : System.Address); 
  351.    pragma Convention (C, Gtk_Tree_View_Mapping_Func); 
  352.    --  Function called on each matching row. Since this is low-level, you must 
  353.    --  convert Tree_View to a proper Gtk_Tree_View with 
  354.    --     Tree := Gtk_Tree_View (Gtk.Widget.Convert (Tree_View)); 
  355.  
  356.    procedure Map_Expanded_Rows 
  357.      (Tree_View : access Gtk_Tree_View_Record; 
  358.       Func      : Gtk_Tree_View_Mapping_Func; 
  359.       Data      : System.Address); 
  360.    --  Calls Func on all expanded rows. 
  361.  
  362.    function Collapse_Row 
  363.      (Tree_View : access Gtk_Tree_View_Record; 
  364.       Path      : Gtk.Tree_Model.Gtk_Tree_Path) return Boolean; 
  365.    --  Collapse a row (hides its child rows, if they exist.) 
  366.  
  367.    function Row_Expanded 
  368.      (Tree_View : access Gtk_Tree_View_Record; 
  369.       Path      : Gtk.Tree_Model.Gtk_Tree_Path) return Boolean; 
  370.    --  Return True if the node pointed to by Path is expanded in Tree_View. 
  371.  
  372.    procedure Set_Fixed_Height_Mode 
  373.      (Tree_View : access Gtk_Tree_View_Record; Enable : Boolean); 
  374.    function Get_Fixed_Height_Mode 
  375.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  376.    --  Enables or disables the fixed height mode of tree_view. 
  377.    --  Fixed height mode speeds up the rendering by assuming that all 
  378.    --  rows have the same height. 
  379.    --  Only enable this option if all rows are the same height and all 
  380.    --  columns are of type TREE_VIEW_COLUMN_FIXED. 
  381.  
  382.    procedure Set_Hover_Expand 
  383.      (Tree_View : access Gtk_Tree_View_Record; Expand : Boolean); 
  384.    function Get_Hover_Expand 
  385.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  386.    --  Enables of disables the hover expansion mode of Tree_view. 
  387.    --  Hover expansion makes rows expand or collaps if the pointer 
  388.    --  moves over them. 
  389.  
  390.    procedure Set_Hover_Selection 
  391.      (Tree_View : access Gtk_Tree_View_Record; Hover : Boolean); 
  392.    function Get_Hover_Selection 
  393.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  394.    --  Enables of disables the hover selection mode of Tree_View. 
  395.    --  Hover selection makes the selected row follow the pointer. 
  396.    --  Currently, this works only for the selection modes 
  397.    --  SELECTION_SINGLE and SELECTION_BROWSE. 
  398.  
  399.    procedure Set_Cursor 
  400.      (Tree_View     : access Gtk_Tree_View_Record; 
  401.       Path          : Gtk.Tree_Model.Gtk_Tree_Path; 
  402.       Focus_Column  : Gtk.Tree_View_Column.Gtk_Tree_View_Column; 
  403.       Start_Editing : Boolean); 
  404.    --  Sets the current keyboard focus to be at Path, and selects it.  This is 
  405.    --  useful when you want to focus the user's attention on a particular row. 
  406.    --  If Column is not Null, then focus is given to that column. 
  407.    --  Additionally, if Column is specified, and Start_Editing is True, then 
  408.    --  editing should be started in the specified cell. 
  409.    --  Keyboard focus is given to the widget after this is called. 
  410.    --  Please note that editing can only happen when the widget is realized. 
  411.  
  412.    procedure Get_Cursor 
  413.      (Tree_View    : access Gtk_Tree_View_Record; 
  414.       Path         : out Gtk.Tree_Model.Gtk_Tree_Path; 
  415.       Focus_Column : out Gtk.Tree_View_Column.Gtk_Tree_View_Column); 
  416.    --  Fills in Path and Focus_Column with the current path and focus column. 
  417.    --  If the cursor isn't currently set, then *path will be Null. If no column 
  418.    --  currently has focus, then *focus_column will be Null. 
  419.  
  420.    procedure Set_Cursor_On_Cell 
  421.      (Tree_View     : access Gtk_Tree_View_Record; 
  422.       Path          : Gtk.Tree_Model.Gtk_Tree_Path; 
  423.       Focus_Column  : Gtk.Tree_View_Column.Gtk_Tree_View_Column := null; 
  424.       Focus_Cell    : Gtk.Cell_Renderer.Gtk_Cell_Renderer := null; 
  425.       Start_Editing : Boolean); 
  426.    --  Sets the current keyboard focus to be at Path, and selects it. This is 
  427.    --  useful when you want to focus the user's attention on a particular row. 
  428.    --  If Focus_Column is not null, then focus is given to the column specified 
  429.    --  by it. If Focus_Column and Focus_Cell are not null, and Focus_Column 
  430.    --  contains 2 or more editable or activatable cells, then focus is given to 
  431.    --  the cell specified by Focus_Cell. Additionally, if Focus_Column is 
  432.    --  specified, and Start_Editing is true, then editing should be started in 
  433.    --  the specified cell. This function is often followed by 
  434.    --  gtk.widget.grab_focus (Tree_View) in order to give keyboard focus to the 
  435.    --  widget. Please note that editing can only happen when the widget is 
  436.    --  realized. 
  437.  
  438.    function Get_Bin_Window 
  439.      (Tree_View : access Gtk_Tree_View_Record) return Gdk.Window.Gdk_Window; 
  440.    --  Return the window that Tree_View renders to. 
  441.    --  This is used primarily to compare to Get_Window (Event) to confirm that 
  442.    --  the event on Tree_View is on the right window. 
  443.  
  444.    type Gtk_Tree_View_Row_Separator_Func is access 
  445.      function (Model     : System.Address; 
  446.                Iter      : Gtk.Tree_Model.Gtk_Tree_Iter; 
  447.                User_Data : System.Address) return Gboolean; 
  448.    pragma Convention (C, Gtk_Tree_View_Row_Separator_Func); 
  449.    --  This function is used to determine whether a row should be drawn with a 
  450.    --  separator. If it returns True, a separator is displayed. 
  451.    --  This is a low-level function, since it isn't used very often, and you 
  452.    --  should convert the Model to a Gtk_Tree_Model with 
  453.    --     declare 
  454.    --        Stub : Gtk_Tree_Model_Record; 
  455.    --     begin 
  456.    --        My_Model := Gtk_Tree_Model (Get_User_Data (Model, Stub)); 
  457.    --     end; 
  458.  
  459.    procedure Set_Row_Separator_Func 
  460.      (Tree_View : access Gtk_Tree_View_Record; 
  461.       Func      : Gtk_Tree_View_Row_Separator_Func; 
  462.       Data      : System.Address; 
  463.       Destroy   : Glib.G_Destroy_Notify_Address := null); 
  464.    function Get_Row_Separator_Func 
  465.      (Tree_View : access Gtk_Tree_View_Record) 
  466.       return Gtk_Tree_View_Row_Separator_Func; 
  467.    --  Sets the row separator function, which is used to determine 
  468.    --  whether a row should be drawn as a separator. If the row separator 
  469.    --  function is NULL, no separators are drawn. This is the default value. 
  470.  
  471.    procedure Get_Path_At_Pos 
  472.      (Tree_View : access Gtk_Tree_View_Record; 
  473.       X         : Gint; 
  474.       Y         : Gint; 
  475.       Path      : out Gtk.Tree_Model.Gtk_Tree_Path; 
  476.       Column    : out Gtk.Tree_View_Column.Gtk_Tree_View_Column; 
  477.       Cell_X    : out Gint; 
  478.       Cell_Y    : out Gint; 
  479.       Row_Found : out Boolean); 
  480.    --  Find the path at the point (X, Y) relative to Window. 
  481.    --  If Window is null, then the point is found relative to the widget 
  482.    --  coordinates. This function is expected to be called after an event. 
  483.    --  It is primarily for things like popup menus. Path will be filled 
  484.    --  with the Gtk_Tree_Path at that point. It should be freed with 
  485.    --  Tree_Path_Free. Column will be filled with the column at that point. 
  486.    --  Cell_X and Cell_Y return the coordinates relative to the cell background 
  487.    --  (i.e. the background_area passed to gtk_cell_renderer_render()). 
  488.    --  This function only works if Tree_View is realized. 
  489.    --  Row_Found is set to True if a row exists at that coordinate. 
  490.  
  491.    procedure Get_Cell_Area 
  492.      (Tree_View : access Gtk_Tree_View_Record; 
  493.       Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  494.       Column    : Gtk.Tree_View_Column.Gtk_Tree_View_Column; 
  495.       Rect      : out Gdk.Rectangle.Gdk_Rectangle); 
  496.    --  Fills the bounding rectangle in tree window coordinates for the cell at 
  497.    --  the row specified by Path and the column specified by Column. If Path is 
  498.    --  Null, or points to a path not currently displayed, the Y and Height 
  499.    --  fields of the rectangle will be filled with 0. If Column is Null, 
  500.    --  the X and Width fields will be filled with 0. 
  501.    --  The sum of all cell rects does not cover the entire tree; 
  502.    --  there are extra pixels in between rows, for example. The 
  503.    --  returned rectangle is equivalent to the Cell_Area passed to 
  504.    --  gtk_cell_renderer_render().  This function is only valid if Tree_View is 
  505.    --  realized. 
  506.  
  507.    procedure Get_Background_Area 
  508.      (Tree_View : access Gtk_Tree_View_Record; 
  509.       Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  510.       Column    : Gtk.Tree_View_Column.Gtk_Tree_View_Column; 
  511.       Rect      : out Gdk.Rectangle.Gdk_Rectangle); 
  512.    --  Fills the bounding rectangle in tree window coordinates for the cell 
  513.    --  at the row specified by Path and the column specified by Column.  If 
  514.    --  Path is Null, or points to a node not found in the tree, the Y and 
  515.    --  Height fields of the rectangle will be filled with 0. If Column is Null, 
  516.    --  the X and Width fields will be filled with 0. 
  517.    --  The returned rectangle is equivalent to the Background_Area passed to 
  518.    --  Gtk.Cell_Renderer.Render.  These background areas tile to cover the 
  519.    --  entire tree window (except for the area used for 
  520.    --  header buttons). Contrast with the cell_area, returned by 
  521.    --  gtk_tree_view_get_cell_area(), which returns only the cell itself, 
  522.    --  excluding surrounding borders and the tree expander area. 
  523.  
  524.    procedure Get_Visible_Rect 
  525.      (Tree_View    : access Gtk_Tree_View_Record; 
  526.       Visible_Rect : out Gdk.Rectangle.Gdk_Rectangle); 
  527.    --  Fills Visible_Rect with the currently-visible region of the 
  528.    --  buffer, in tree coordinates. Convert to widget coordinates with 
  529.    --  gtk_tree_view_tree_to_widget_coords(). Tree coordinates start at 
  530.    --  0,0 for row 0 of the tree, and cover the entire scrollable area of 
  531.    --  the tree. 
  532.  
  533.    ------------------------ 
  534.    -- Coordinate Systems -- 
  535.    ------------------------ 
  536.  
  537.    --  Several different coordinate systems are exposed in the Gtk.Tree_View 
  538.    --  API. These are: 
  539.    --                   _____________________________ 
  540.    --               /   | _________________________ | 
  541.    --              /    | |                       | | 
  542.    --             /     | |     Header_Window     | | 
  543.    --             |     | |_______________________| | 
  544.    --             |     | _________________________ | 
  545.    --             |     | |  ...................  | |    \ 
  546.    --    widget- -+     | |  :                 :  | |     \ 
  547.    --  relative   |     | |  :   Bin_Window    :  | |      \ 
  548.    --             |     | |  :                 :  | |       \ 
  549.    --             |     | |  :                 :  | |       | 
  550.    --             \     | |  :                 :  | |       | 
  551.    --              \    | |__:_________________:__| |       +- tree 
  552.    --               \   |____:_________________:____|       |  coordinates 
  553.    --                        :                 :            | 
  554.    --                        :                 :            / 
  555.    --                        :                 :           / 
  556.    --                        :                 :          / 
  557.    --                        :.................:         / 
  558.    -- 
  559.    --  Widget coordinates ------ coordinates relative to the widget (usually 
  560.    --                            widget->window). 
  561.    -- 
  562.    --  Bin window coordinates -- coordinates relative to the window that 
  563.    --                            Gtk_Tree_View renders to. 
  564.    -- 
  565.    --  Tree coordinates -------- coordinates relative to the entire scrollable 
  566.    --                            area of Gtk_Tree_View. These coordinates start 
  567.    --                            at (0, 0) for row 0 of the tree. 
  568.    -- 
  569.    --  Several functions are available for converting between the different 
  570.    --  coordinate systems. The most common translations are between widget and 
  571.    --  bin window coordinates and between bin window and tree coordinates. For 
  572.    --  the former you can use Convert_Widget_To_Bin_Window_Coords (and vice 
  573.    --  versa), for the latter Convert_Bin_Window_To_Tree_Coords (and vice 
  574.    --  versa). 
  575.  
  576.    procedure Widget_To_Tree_Coords 
  577.      (Tree_View : access Gtk_Tree_View_Record; 
  578.       Wx        : Gint; 
  579.       Wy        : Gint; 
  580.       Tx        : out Gint; 
  581.       Ty        : out Gint); 
  582.    pragma Obsolescent; --  Widget_To_Tree_Coords 
  583.    --  Converts widget coordinates to coordinates for the 
  584.    --  tree window (the full scrollable area of the tree). 
  585.    -- 
  586.    --  Obsolescent; use Convert_Widget_To_Tree_Coords instead. 
  587.  
  588.    procedure Tree_To_Widget_Coords 
  589.      (Tree_View : access Gtk_Tree_View_Record; 
  590.       Tx        : Gint; 
  591.       Ty        : Gint; 
  592.       Wx        : out Gint; 
  593.       Wy        : out Gint); 
  594.    pragma Obsolescent; --  Tree_To_Widget_Coords 
  595.    --  Converts tree coordinates (coordinates in full scrollable area of 
  596.    --  the tree) to widget coordinates. 
  597.    -- 
  598.    --  Obsolescent; use Convert_Tree_To_Widget_Coords instead. 
  599.  
  600.    procedure Convert_Widget_To_Tree_Coords 
  601.      (Tree_View : access Gtk_Tree_View_Record; 
  602.       Wx        : Gint; 
  603.       Wy        : Gint; 
  604.       Tx        : out Gint; 
  605.       Ty        : out Gint); 
  606.    --  Converts widget coordinates to coordinates for the tree (the full 
  607.    --  scrollable area of the tree). 
  608.  
  609.    procedure Convert_Tree_To_Widget_Coords 
  610.      (Tree_View : access Gtk_Tree_View_Record; 
  611.       Tx        : Gint; 
  612.       Ty        : Gint; 
  613.       Wx        : out Gint; 
  614.       Wy        : out Gint); 
  615.    --  Converts tree coordinates (coordinates in full scrollable area of the 
  616.    --  tree) to widget coordinates. 
  617.  
  618.    procedure Convert_Bin_Window_To_Tree_Coords 
  619.      (Tree_View : access Gtk_Tree_View_Record; 
  620.       Bx        : Gint; 
  621.       By        : Gint; 
  622.       Tx        : out Gint; 
  623.       Ty        : out Gint); 
  624.    --  Converts bin_window coordinates to coordinates for the 
  625.    --  tree (the full scrollable area of the tree). 
  626.  
  627.    procedure Convert_Tree_To_Bin_Window_Coords 
  628.      (Tree_View : access Gtk_Tree_View_Record; 
  629.       Tx        : Gint; 
  630.       Ty        : Gint; 
  631.       Bx        : out Gint; 
  632.       By        : out Gint); 
  633.    --  Converts tree coordinates (coordinates in full scrollable area of the 
  634.    --  tree) to bin_window coordinates. 
  635.  
  636.    procedure Convert_Widget_To_Bin_Window_Coords 
  637.      (Tree_View : access Gtk_Tree_View_Record; 
  638.       Wx        : Gint; 
  639.       Wy        : Gint; 
  640.       Bx        : out Gint; 
  641.       By        : out Gint); 
  642.    --  Converts widget coordinates to coordinates for the Bin_Window 
  643.    --  (see Get_Bin_Window). 
  644.  
  645.    procedure Convert_Bin_Window_To_Widget_Coords 
  646.      (Tree_View : access Gtk_Tree_View_Record; 
  647.       Bx        : Gint; 
  648.       By        : Gint; 
  649.       Wx        : out Gint; 
  650.       Wy        : out Gint); 
  651.    --  Converts Bin_Window coordinates (see Get_Bin_Window) to widget 
  652.    --  relative coordinates. 
  653.  
  654.    --------------- 
  655.    -- Searching -- 
  656.    --------------- 
  657.  
  658.    procedure Set_Enable_Search 
  659.      (Tree_View     : access Gtk_Tree_View_Record; 
  660.       Enable_Search : Boolean); 
  661.    function Get_Enable_Search 
  662.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  663.    --  If enable_search is set, then the user can type in text to search 
  664.    --  through the tree interactively (this is sometimes called "typeahead 
  665.    --  find"). 
  666.    --  Note that even if this is FALSE, the user can still initiate a search 
  667.    --  using the "start-interactive-search" key binding. 
  668.  
  669.    procedure Set_Search_Column 
  670.      (Tree_View : access Gtk_Tree_View_Record; 
  671.       Column    : Gint); 
  672.    function Get_Search_Column 
  673.      (Tree_View : access Gtk_Tree_View_Record) return Gint; 
  674.    --  Sets column as the column where the interactive search code should 
  675.    --  search in. 
  676.    --  If the sort column is set, users can use the "start-interactive-search" 
  677.    --  key binding to bring up search popup. The enable-search property 
  678.    --  controls whether simply typing text will also start an interactive 
  679.    --  search. 
  680.    --  Note that column refers to a column of the model. 
  681.  
  682.    type Gtk_Tree_View_Search_Equal_Func is access 
  683.      function (Model  : System.Address; 
  684.                Column : Gint; 
  685.                Key    : Interfaces.C.Strings.chars_ptr; 
  686.                Iter   : Gtk.Tree_Model.Gtk_Tree_Iter; 
  687.                User_Data : System.Address) return Gboolean; 
  688.    pragma Convention (C, Gtk_Tree_View_Search_Equal_Func); 
  689.    --  The function used to compare for the interactive search capabilities. 
  690.    --  This function should return False on match, similar to C's strcmp(). 
  691.    --  This is a low-level function, and you should convert the model to a 
  692.    --  Gtk_Tree_Model (see Gtk_Tree_View_Row_Separator_Func 
  693.  
  694.    procedure Set_Search_Equal_Func 
  695.      (Tree_View         : access Gtk_Tree_View_Record; 
  696.       Search_Equal_Func : Gtk_Tree_View_Search_Equal_Func; 
  697.       Search_User_Data  : System.Address; 
  698.       Search_Destroy    : G_Destroy_Notify_Address := null); 
  699.    function Get_Search_Equal_Func 
  700.      (Tree_View : access Gtk_Tree_View_Record) 
  701.       return Gtk_Tree_View_Search_Equal_Func; 
  702.    --  Sets the compare function for the interactive search capabilities 
  703.  
  704.    function Get_Search_Entry 
  705.      (Tree_View : access Gtk_Tree_View_Record) return Gtk.GEntry.Gtk_Entry; 
  706.    procedure Set_Search_Entry 
  707.      (Tree_View : access Gtk_Tree_View_Record; 
  708.       The_Entry : access Gtk.GEntry.Gtk_Entry_Record'Class); 
  709.    --  Gets/Sets the entry which the interactive search code will use for this 
  710.    --  Tree_View.  This is useful when you want to provide a search entry 
  711.    --  in our interface at all time at a fixed position.  A null Gtk_Entry will 
  712.    --  make the interactive search code use the built-in popup entry again. 
  713.  
  714.    type Gtk_Tree_View_Search_Position_Func is access procedure 
  715.      (Tree_View     : System.Address;  --  Get_Object (Gtk_Tree_View_Record) 
  716.       Search_Dialog : System.Address;  --  Get_Object (Gtk_Widget'Class) 
  717.       User_Data     : System.Address); 
  718.    pragma Convention (C, Gtk_Tree_View_Search_Position_Func); 
  719.  
  720.    function Get_Search_Position_Func 
  721.      (Tree_View : access Gtk_Tree_View_Record) 
  722.       return Gtk_Tree_View_Search_Position_Func; 
  723.    procedure Set_Search_Position_Func 
  724.      (Tree_View : access Gtk_Tree_View_Record; 
  725.       Func      : Gtk_Tree_View_Search_Position_Func; 
  726.       Data      : System.Address; 
  727.       Destroy   : G_Destroy_Notify); 
  728.    --  Gets/Sets the function to use when positioning the search dialog. 
  729.  
  730.    -------------- 
  731.    -- Tooltips -- 
  732.    -------------- 
  733.  
  734.    procedure Set_Tooltip_Cell 
  735.      (Tree_View : access Gtk_Tree_View_Record; 
  736.       Tooltip   : access Gtk.Tooltip.Gtk_Tooltip_Record'Class; 
  737.       Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  738.       Column    : access 
  739.                   Gtk.Tree_View_Column.Gtk_Tree_View_Column_Record'Class; 
  740.       Cell      : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class); 
  741.    --  Sets the tip area of Tooltip to the area Path, Column and Cell have 
  742.    --  in common.  For example, if Path is null and Column is set, the tip 
  743.    --  area will be set to the full area covered by Column.  See also 
  744.    --  Gtk.Tooltip.Set_Tip_Area. 
  745.    -- 
  746.    --  Note that if Path is not specified and Cell is set and part of a column 
  747.    --  containing the expander, the tooltip might not show and hide at the 
  748.    --  correct position.  In such cases Path must be set to the current node 
  749.    --  under the mouse cursor for this function to operate correctly. 
  750.    -- 
  751.    --  See also Set_Tooltip_Column for a simpler alternative. 
  752.  
  753.    procedure Set_Tooltip_Column 
  754.      (Tree_View : access Gtk_Tree_View_Record; 
  755.       Column    : Gint); 
  756.    function Get_Tooltip_Column 
  757.      (Tree_View : access Gtk_Tree_View_Record) return Gint; 
  758.    --  If you only plan to have simple (text-only) tooltips on full rows, you 
  759.    --  can use this function to have Gtk_Tree_View handle these automatically 
  760.    --  for you. Column should be set to the column in tree_view's model 
  761.    --  containing the tooltip texts, or -1 to disable this feature. 
  762.    -- 
  763.    --  When enabled, "has-tooltip" will be set to TRUE and tree_view will 
  764.    --  connect a "query-tooltip" signal handler. 
  765.    -- 
  766.    --  Note that the signal handler sets the text with 
  767.    --  gtk_tooltip_set_markup(), so &, <, etc have to be escaped in the text. 
  768.  
  769.    procedure Get_Tooltip_Context 
  770.      (Tree_View     : access Gtk_Tree_View_Record; 
  771.       X             : in out Glib.Gint; 
  772.       Y             : in out Glib.Gint; 
  773.       Keyboard_Mode : Boolean; 
  774.       Model         : out Gtk.Tree_Model.Gtk_Tree_Model; 
  775.       Path          : out Gtk.Tree_Model.Gtk_Tree_Path; 
  776.       Iter          : out Gtk.Tree_Model.Gtk_Tree_Iter; 
  777.       Success       : out Boolean); 
  778.    --  This function is supposed to be used in a "query-tooltip" signal handler 
  779.    --  for Gtk_Tree_View. The x, y and keyboard_tip values which are received 
  780.    --  in the signal handler, should be passed to this function without 
  781.    --  modification. 
  782.    -- 
  783.    --  The Success indicates whether there is a tree view row at the given 
  784.    --  coordinates (True) or not (False) for mouse tooltips. For keyboard 
  785.    --  tooltips the row returned will be the cursor row. When True, then any of 
  786.    --  model, path and iter which have been provided will be set to point to 
  787.    --  that row and the corresponding model. x and y will always be converted 
  788.    --  to be relative to tree_view's bin_window if keyboard_tooltip is False. 
  789.  
  790.    procedure Set_Tooltip_Row 
  791.      (Tree_View : access Gtk_Tree_View_Record; 
  792.       Tooltip   : access Gtk.Tooltips.Gtk_Tooltips_Record'Class; 
  793.       Path      : Gtk.Tree_Model.Gtk_Tree_Path); 
  794.    --  Sets the tip area of tooltip to be the area covered by the row at path. 
  795.    --  See also Set_Tooltip_Column for a simpler alternative. See also 
  796.    --  Gtk.Tooltips.Set_Tip_Area. 
  797.  
  798.    ------------------------ 
  799.    -- Columns reordering -- 
  800.    ------------------------ 
  801.  
  802.    procedure Set_Reorderable 
  803.      (Tree_View   : access Gtk_Tree_View_Record; 
  804.       Reorderable : Boolean); 
  805.    function Get_Reorderable 
  806.      (Tree_View : access Gtk_Tree_View_Record) return Boolean; 
  807.    --  This function is a convenience function to allow you to reorder models 
  808.    --  that support the Gtk_Drag_Source_Iface and the Gtk_Drag_Dest_Iface. Both 
  809.    --  Gtk_Tree_Store and Gtk_List_Store support these. 
  810.    --  If Reorderable is True, then the user can reorder the model by dragging 
  811.    --  and dropping columns.  The developer can listen to these changes by 
  812.    --  connecting to the model's signals. 
  813.    --  This function does not give you any degree of control over the order 
  814.    --  - any reorderering is allowed. If more control is needed, you should 
  815.    --  probably handle drag and drop manually. 
  816.  
  817.    type Gtk_Tree_View_Column_Drop_Func is access 
  818.      function (Tree_View   : System.Address; --  Gtk_Tree_View 
  819.                Column      : System.Address; --  Gtk_Tree_View_Column 
  820.                Prev_Column : System.Address; --  Gtk_Tree_View_Column 
  821.                Next_Column : System.Address; --  Gtk_Tree_View_Column 
  822.                User_Data   : System.Address) return Gboolean; 
  823.    pragma Convention (C, Gtk_Tree_View_Column_Drop_Func); 
  824.    --  This function is used to determine whether a column may be dropped in 
  825.    --  a given location. 
  826.    --  This function is called on every column pair in turn at the beginning of 
  827.    --  a column drag to determine where a drop can take place. The arguments 
  828.    --  are: the tree_view, the column being dragged, the two columns 
  829.    --  determining the drop spot, and user_data. If either of the column 
  830.    --  arguments for the drop spot are null, then they indicate an edge. 
  831.    -- 
  832.    --  This is a low-level function, and you should use Get_User_Data to 
  833.    --  convert to the appropriate GtkAda widgets 
  834.  
  835.    procedure Set_Column_Drag_Function 
  836.      (Tree_View : access Gtk_Tree_View_Record; 
  837.       Func      : Gtk_Tree_View_Column_Drop_Func; 
  838.       User_Data : System.Address; 
  839.       Destroy   : Glib.G_Destroy_Notify_Address); 
  840.    --  Sets a user function for determining where a column may be dropped. 
  841.    --  If Func is set to be %NULL, then Tree_View reverts to the default 
  842.    --  behavior of allowing all columns to be dropped everywhere. 
  843.  
  844.    ------------------- 
  845.    -- Drag-and-drop -- 
  846.    ------------------- 
  847.  
  848.    procedure Enable_Model_Drag_Dest 
  849.      (Tree_View : access Gtk_Tree_View_Record; 
  850.       Targets   : Gtk.Selection.Target_Entry_Array; 
  851.       Actions   : Gdk.Dnd.Drag_Action); 
  852.    --  Turns Tree_View into a drop destination for automatic drag-and-drop. 
  853.    --  Targets is the table of targets that the drag will support. 
  854.    --  Actions is a bitmask of possible actions for a drag to this widget. 
  855.  
  856.    procedure Enable_Model_Drag_Source 
  857.      (Tree_View         : access Gtk_Tree_View_Record; 
  858.       Start_Button_Mask : Gdk.Types.Gdk_Modifier_Type; 
  859.       Targets           : Gtk.Selection.Target_Entry_Array; 
  860.       Actions           : Gdk.Dnd.Drag_Action); 
  861.    --  Turns Tree_View into a drag source for automatic DND. 
  862.    --  Targets is the list of targets that the drag will support. 
  863.    --  Actions is the bitmask of possible actions for a drag from this widget. 
  864.    --  Start_Button_Mask is the mask of allowed buttons to start the drag. 
  865.    --  You need to connect to the usual dnd signals (see gtk-dnd.ads) to 
  866.    --  provide the actual data upon request. 
  867.  
  868.    procedure Unset_Rows_Drag_Source (Tree_View : access Gtk_Tree_View_Record); 
  869.    --  Undoes the effect of Enable_Model_Drag_Source. 
  870.  
  871.    procedure Unset_Rows_Drag_Dest (Tree_View : access Gtk_Tree_View_Record); 
  872.    --  Undoes the effect of Enable_Model_Drag_Dest. 
  873.  
  874.    function Create_Row_Drag_Icon 
  875.      (Tree_View : access Gtk_Tree_View_Record; 
  876.       Path      : Gtk.Tree_Model.Gtk_Tree_Path) 
  877.       return Gdk.Pixmap.Gdk_Pixmap; 
  878.    --  Creates a Gdk_Pixmap representation of the row at path. This image is 
  879.    --  used for a drag icon. 
  880.    --  The returned pixmap must be freed by the user 
  881.  
  882.    procedure Get_Dest_Row_At_Pos 
  883.      (Tree_View : access Gtk_Tree_View_Record; 
  884.       Drag_X    : Gint; 
  885.       Drag_Y    : Gint; 
  886.       Path      : out Gtk.Tree_Model.Gtk_Tree_Path; 
  887.       Pos       : out Gtk_Tree_View_Drop_Position; 
  888.       Success   : out Boolean); 
  889.    --  Determines the destination row for a given position. 
  890.    --  (Drag_X, Drag_Y) is the position to determine the destination row for. 
  891.  
  892.    procedure Set_Drag_Dest_Row 
  893.      (Tree_View : access Gtk_Tree_View_Record; 
  894.       Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  895.       Pos       : Gtk_Tree_View_Drop_Position); 
  896.    procedure Get_Drag_Dest_Row 
  897.      (Tree_View : access Gtk_Tree_View_Record; 
  898.       Path      : out Gtk.Tree_Model.Gtk_Tree_Path; 
  899.       Pos       : out Gtk_Tree_View_Drop_Position); 
  900.    --  Sets or gets information about the row that is highlighted for feedback. 
  901.  
  902.    ---------------- 
  903.    -- Properties -- 
  904.    ---------------- 
  905.    --  The following properties are defined for this widget. See 
  906.    --  Glib.Properties for more information on properties. 
  907.  
  908.    --  <properties> 
  909.    --  Name:  Enable_Grid_Lines_Property 
  910.    --  Type:  Enum 
  911.    --  Descr: Whether grid lines should be drawn in the tree view 
  912.    -- 
  913.    --  Name:  Enable_Search_Property 
  914.    --  Type:  Boolean 
  915.    --  Descr: View allows user to search through columns interactively 
  916.    -- 
  917.    --  Name:  Enable_Tree_Lines_Property 
  918.    --  Type:  Boolean 
  919.    --  Descr: Whether tree lines should be drawn in the tree view 
  920.    -- 
  921.    --  Name:  Expander_Column_Property 
  922.    --  Type:  Object 
  923.    --  Descr: Set the column for the expander column 
  924.    -- 
  925.    --  Name:  Fixed_Height_Mode_Property 
  926.    --  Type:  Boolean 
  927.    --  Descr: Speeds up Gtk_Tree_View by assuming that all rows have the same 
  928.    --         height 
  929.    -- 
  930.    --  Name:  Hadjustment_Property 
  931.    --  Type:  Object 
  932.    --  Descr: Horizontal Adjustment for the widget 
  933.    -- 
  934.    --  Name:  Headers_Clickable_Property 
  935.    --  Type:  Boolean 
  936.    --  Descr: Column headers respond to click events 
  937.    -- 
  938.    --  Name:  Headers_Visible_Property 
  939.    --  Type:  Boolean 
  940.    --  Descr: Show the column header buttons 
  941.    -- 
  942.    --  Name:  Hover_Expand_Property 
  943.    --  Type:  Boolean 
  944.    --  Descr: Whether rows should be expanded/collapsed when the pointer moves 
  945.    --         over them 
  946.    -- 
  947.    --  Name:  Hover_Selection_Property 
  948.    --  Type:  Boolean 
  949.    --  Descr: Whether the selection should follow the pointer 
  950.    -- 
  951.    --  Name:  Level_Indentation_Property 
  952.    --  Type:  Int 
  953.    --  Descr: Extra indentation for each level 
  954.    -- 
  955.    --  Name:  Model_Property 
  956.    --  Type:  Object 
  957.    --  Descr: The model for the tree view 
  958.    -- 
  959.    --  Name:  Reorderable_Property 
  960.    --  Type:  Boolean 
  961.    --  Descr: View is reorderable 
  962.    -- 
  963.    --  Name:  Rubber_Banding_Property 
  964.    --  Type:  Boolean 
  965.    --  Descr: Whether to enable selection of multiple items by dragging the 
  966.    --         mouse pointer 
  967.    -- 
  968.    --  Name:  Rules_Hint_Property 
  969.    --  Type:  Boolean 
  970.    --  Descr: Set a hint to the theme engine to draw rows in alternating colors 
  971.    -- 
  972.    --  Name:  Search_Column_Property 
  973.    --  Type:  Int 
  974.    --  Descr: Model column to search through when searching through code 
  975.    -- 
  976.    --  Name:  Show_Expanders_Property 
  977.    --  Type:  Boolean 
  978.    --  Descr: View has expanders 
  979.    -- 
  980.    --  Name:  Tooltip_Column_Property 
  981.    --  Type:  Int 
  982.    --  Descr: The column in the model containing the tooltip texts for the rows 
  983.    -- 
  984.    --  Name:  Vadjustment_Property 
  985.    --  Type:  Object 
  986.    --  Descr: Vertical Adjustment for the widget 
  987.    --  </properties> 
  988.  
  989.    Enable_Grid_Lines_Property : constant Glib.Properties.Property_Enum; 
  990.    Enable_Search_Property     : constant Glib.Properties.Property_Boolean; 
  991.    Enable_Tree_Lines_Property : constant Glib.Properties.Property_Boolean; 
  992.    Expander_Column_Property   : constant Glib.Properties.Property_Object; 
  993.    Fixed_Height_Mode_Property : constant Glib.Properties.Property_Boolean; 
  994.    Hadjustment_Property       : constant Glib.Properties.Property_Object; 
  995.    Headers_Clickable_Property : constant Glib.Properties.Property_Boolean; 
  996.    Headers_Visible_Property   : constant Glib.Properties.Property_Boolean; 
  997.    Hover_Expand_Property      : constant Glib.Properties.Property_Boolean; 
  998.    Hover_Selection_Property   : constant Glib.Properties.Property_Boolean; 
  999.    Level_Indentation_Property : constant Glib.Properties.Property_Int; 
  1000.    Model_Property             : constant Glib.Properties.Property_Object; 
  1001.    Reorderable_Property       : constant Glib.Properties.Property_Boolean; 
  1002.    Rubber_Banding_Property    : constant Glib.Properties.Property_Boolean; 
  1003.    Rules_Hint_Property        : constant Glib.Properties.Property_Boolean; 
  1004.    Search_Column_Property     : constant Glib.Properties.Property_Int; 
  1005.    Show_Expanders_Property    : constant Glib.Properties.Property_Boolean; 
  1006.    Tooltip_Column_Property    : constant Glib.Properties.Property_Int; 
  1007.    Vadjustment_Property       : constant Glib.Properties.Property_Object; 
  1008.  
  1009.    ---------------------- 
  1010.    -- Style Properties -- 
  1011.    ---------------------- 
  1012.    --  The following properties can be changed through the gtk theme and 
  1013.    --  configuration files, and retrieved through Gtk.Widget.Style_Get_Property 
  1014.  
  1015.    --  <style_properties> 
  1016.    --  Name:  Allow_Rules_Property 
  1017.    --  Type:  Boolean 
  1018.    --  Descr: Allow drawing of alternating color rows 
  1019.    -- 
  1020.    --  Name:  Even_Row_Color_Property 
  1021.    --  Type:  Boxed 
  1022.    --  Descr: Color to use for even rows 
  1023.    -- 
  1024.    --  Name:  Expander_Size_Property 
  1025.    --  Type:  Int 
  1026.    --  Descr: Size of the expander arrow 
  1027.    -- 
  1028.    --  Name:  Grid_Line_Pattern_Property 
  1029.    --  Type:  String 
  1030.    --  Descr: Dash pattern used to draw the tree view grid lines 
  1031.    -- 
  1032.    --  Name:  Grid_Line_Width_Property 
  1033.    --  Type:  Int 
  1034.    --  Descr: Width, in pixels, of the tree view grid lines 
  1035.    -- 
  1036.    --  Name:  Horizontal_Separator_Property 
  1037.    --  Type:  Int 
  1038.    --  Descr: Horizontal space between cells.  Must be an even number 
  1039.    -- 
  1040.    --  Name:  Indent_Expanders_Property 
  1041.    --  Type:  Boolean 
  1042.    --  Descr: Make the expanders indented 
  1043.    -- 
  1044.    --  Name:  Odd_Row_Color_Property 
  1045.    --  Type:  Boxed 
  1046.    --  Descr: Color to use for odd rows 
  1047.    -- 
  1048.    --  Name:  Row_Ending_Details_Property 
  1049.    --  Type:  Boolean 
  1050.    --  Descr: Enable extended row background theming 
  1051.    -- 
  1052.    --  Name:  Tree_Line_Pattern_Property 
  1053.    --  Type:  String 
  1054.    --  Descr: Dash pattern used to draw the tree view lines 
  1055.    -- 
  1056.    --  Name:  Tree_Line_Width_Property 
  1057.    --  Type:  Int 
  1058.    --  Descr: Width, in pixels, of the tree view lines 
  1059.    -- 
  1060.    --  Name:  Vertical_Separator_Property 
  1061.    --  Type:  Int 
  1062.    --  Descr: Vertical space between cells.  Must be an even number 
  1063.    --  </style_properties> 
  1064.  
  1065.    Allow_Rules_Property          : constant Glib.Properties.Property_Boolean; 
  1066.    --  Even_Row_Color_Property   : constant Glib.Properties.Property_Boxed; 
  1067.    Expander_Size_Property        : constant Glib.Properties.Property_Int; 
  1068.    Grid_Line_Pattern_Property    : constant Glib.Properties.Property_String; 
  1069.    Grid_Line_Width_Property      : constant Glib.Properties.Property_Int; 
  1070.    Horizontal_Separator_Property : constant Glib.Properties.Property_Int; 
  1071.    Indent_Expanders_Property     : constant Glib.Properties.Property_Boolean; 
  1072.    --  Odd_Row_Color_Property    : constant Glib.Properties.Property_Boxed; 
  1073.    Row_Ending_Details_Property   : constant Glib.Properties.Property_Boolean; 
  1074.    Tree_Line_Pattern_Property    : constant Glib.Properties.Property_String; 
  1075.    Tree_Line_Width_Property      : constant Glib.Properties.Property_Int; 
  1076.    Vertical_Separator_Property   : constant Glib.Properties.Property_Int; 
  1077.  
  1078.    ------------- 
  1079.    -- Signals -- 
  1080.    ------------- 
  1081.  
  1082.    --  <signals> 
  1083.    --  The following new signals are defined for this widget: 
  1084.    -- 
  1085.    --  - "set_scroll_adjustments" 
  1086.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class; 
  1087.    --       Hadjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class; 
  1088.    --       Vadjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class); 
  1089.    -- 
  1090.    --  - "row_activated" 
  1091.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class; 
  1092.    --       Path : Gtk.Tree_Model.Gtk_Tree_Path; 
  1093.    --       Column : Gtk.Tree_View_Column.Gtk_Tree_View_Column); 
  1094.    -- 
  1095.    --  - "test_expand_row" 
  1096.    --    function Handler (Widget : access Gtk_Tree_View_Record'Class; 
  1097.    --       Iter : access Gtk.Tree_Iter.Gtk_Tree_Iter_Record'Class; 
  1098.    --       Path : Gtk.Tree_Model.Gtk_Tree_Path) 
  1099.    --       return Gboolean; 
  1100.    -- 
  1101.    --  - "test_collapse_row" 
  1102.    --    function Handler (Widget : access Gtk_Tree_View_Record'Class; 
  1103.    --       Iter : access Gtk.Tree_Iter.Gtk_Tree_Iter_Record'Class; 
  1104.    --       Path : Gtk.Tree_Model.Gtk_Tree_Path) 
  1105.    --       return Gboolean; 
  1106.    -- 
  1107.    --  - "row_expanded" 
  1108.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class; 
  1109.    --       Iter : access Gtk.Tree_Iter.Gtk_Tree_Iter_Record'Class; 
  1110.    --       Path : Gtk.Tree_Model.Gtk_Tree_Path); 
  1111.    -- 
  1112.    --  - "row_collapsed" 
  1113.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class; 
  1114.    --       Iter : access Gtk.Tree_Iter.Gtk_Tree_Iter_Record'Class; 
  1115.    --       Path : Gtk.Tree_Model.Gtk_Tree_Path); 
  1116.    -- 
  1117.    --  - "columns_changed" 
  1118.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class); 
  1119.    -- 
  1120.    --  - "move_cursor" 
  1121.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class; 
  1122.    --       Step : Gtk_Movement_Step; 
  1123.    --       Count : Gint); 
  1124.    -- 
  1125.    --  - "select_all" 
  1126.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class); 
  1127.    -- 
  1128.    --  - "select_cursor_row" 
  1129.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class; 
  1130.    --       Start_Editing : Boolean); 
  1131.    -- 
  1132.    --  - "toggle_cursor_row" 
  1133.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class); 
  1134.    -- 
  1135.    --  - "expand_collapse_cursor_row" 
  1136.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class; 
  1137.    --       Logical : Boolean; 
  1138.    --       Expand : Boolean; 
  1139.    --       Open_All : Boolean); 
  1140.    -- 
  1141.    --  - "select_cursor_parent" 
  1142.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class); 
  1143.    -- 
  1144.    --  - "start_interactive_search" 
  1145.    --    procedure Handler (Widget : access Gtk_Tree_View_Record'Class); 
  1146.    -- 
  1147.    --  </signals> 
  1148.  
  1149.    Signal_Columns_Changed            : constant Glib.Signal_Name := 
  1150.                                          "columns_changed"; 
  1151.    Signal_Cursor_Changed             : constant Glib.Signal_Name := 
  1152.                                          "cursor_changed"; 
  1153.    Signal_Expand_Collapse_Cursor_Row : constant Glib.Signal_Name := 
  1154.                                          "expand_collapse_cursor_row"; 
  1155.    Signal_Move_Cursor                : constant Glib.Signal_Name := 
  1156.                                          "move_cursor"; 
  1157.    Signal_Row_Activated              : constant Glib.Signal_Name := 
  1158.                                          "row_activated"; 
  1159.    Signal_Row_Collapsed              : constant Glib.Signal_Name := 
  1160.                                          "row_collapsed"; 
  1161.    Signal_Row_Expanded               : constant Glib.Signal_Name := 
  1162.                                          "row_expanded"; 
  1163.    Signal_Select_All                 : constant Glib.Signal_Name := 
  1164.                                          "select_all"; 
  1165.    Signal_Select_Cursor_Parent       : constant Glib.Signal_Name := 
  1166.                                          "select_cursor_parent"; 
  1167.    Signal_Select_Cursor_Row          : constant Glib.Signal_Name := 
  1168.                                          "select_cursor_row"; 
  1169.    Signal_Set_Scroll_Adjustments     : constant Glib.Signal_Name := 
  1170.                                          "set_scroll_adjustments"; 
  1171.    Signal_Start_Interactive_Search   : constant Glib.Signal_Name := 
  1172.                                          "start_interactive_search"; 
  1173.    Signal_Test_Collapse_Row          : constant Glib.Signal_Name := 
  1174.                                          "test_collapse_row"; 
  1175.    Signal_Test_Expand_Row            : constant Glib.Signal_Name := 
  1176.                                          "test_expand_row"; 
  1177.    Signal_Toggle_Cursor_Row          : constant Glib.Signal_Name := 
  1178.                                          "toggle_cursor_row"; 
  1179.    Signal_Unselect_All               : constant Glib.Signal_Name := 
  1180.                                          "unselect_all"; 
  1181.  
  1182. private 
  1183.    type Gtk_Tree_View_Record is 
  1184.      new Gtk.Container.Gtk_Container_Record with null record; 
  1185.  
  1186.    Enable_Grid_Lines_Property : constant Glib.Properties.Property_Enum := 
  1187.      Glib.Properties.Build ("enable-grid-lines"); 
  1188.    Enable_Search_Property : constant Glib.Properties.Property_Boolean := 
  1189.      Glib.Properties.Build ("enable-search"); 
  1190.    Enable_Tree_Lines_Property : constant Glib.Properties.Property_Boolean := 
  1191.      Glib.Properties.Build ("enable-tree-lines"); 
  1192.    Expander_Column_Property : constant Glib.Properties.Property_Object := 
  1193.      Glib.Properties.Build ("expander-column"); 
  1194.    Fixed_Height_Mode_Property : constant Glib.Properties.Property_Boolean := 
  1195.      Glib.Properties.Build ("fixed-height-mode"); 
  1196.    Hadjustment_Property : constant Glib.Properties.Property_Object := 
  1197.      Glib.Properties.Build ("hadjustment"); 
  1198.    Headers_Clickable_Property : constant Glib.Properties.Property_Boolean := 
  1199.      Glib.Properties.Build ("headers-clickable"); 
  1200.    Headers_Visible_Property : constant Glib.Properties.Property_Boolean := 
  1201.      Glib.Properties.Build ("headers-visible"); 
  1202.    Hover_Expand_Property : constant Glib.Properties.Property_Boolean := 
  1203.      Glib.Properties.Build ("hover-expand"); 
  1204.    Hover_Selection_Property : constant Glib.Properties.Property_Boolean := 
  1205.      Glib.Properties.Build ("hover-selection"); 
  1206.    Level_Indentation_Property : constant Glib.Properties.Property_Int := 
  1207.      Glib.Properties.Build ("level-indentation"); 
  1208.    Model_Property : constant Glib.Properties.Property_Object := 
  1209.      Glib.Properties.Build ("model"); 
  1210.    Reorderable_Property : constant Glib.Properties.Property_Boolean := 
  1211.      Glib.Properties.Build ("reorderable"); 
  1212.    Rubber_Banding_Property : constant Glib.Properties.Property_Boolean := 
  1213.      Glib.Properties.Build ("rubber-banding"); 
  1214.    Rules_Hint_Property : constant Glib.Properties.Property_Boolean := 
  1215.      Glib.Properties.Build ("rules-hint"); 
  1216.    Search_Column_Property : constant Glib.Properties.Property_Int := 
  1217.      Glib.Properties.Build ("search-column"); 
  1218.    Show_Expanders_Property : constant Glib.Properties.Property_Boolean := 
  1219.      Glib.Properties.Build ("show-expanders"); 
  1220.    Tooltip_Column_Property : constant Glib.Properties.Property_Int := 
  1221.      Glib.Properties.Build ("tooltip-column"); 
  1222.    Vadjustment_Property : constant Glib.Properties.Property_Object := 
  1223.      Glib.Properties.Build ("vadjustment"); 
  1224.  
  1225.    Allow_Rules_Property : constant Glib.Properties.Property_Boolean := 
  1226.      Glib.Properties.Build ("allow-rules"); 
  1227. --     Even_Row_Color_Property : constant Glib.Properties.Property_Boxed := 
  1228. --       Glib.Properties.Build ("even-row-color"); 
  1229.    Expander_Size_Property : constant Glib.Properties.Property_Int := 
  1230.      Glib.Properties.Build ("expander-size"); 
  1231.    Grid_Line_Pattern_Property : constant Glib.Properties.Property_String := 
  1232.      Glib.Properties.Build ("grid-line-pattern"); 
  1233.    Grid_Line_Width_Property : constant Glib.Properties.Property_Int := 
  1234.      Glib.Properties.Build ("grid-line-width"); 
  1235.    Horizontal_Separator_Property : constant Glib.Properties.Property_Int := 
  1236.      Glib.Properties.Build ("horizontal-separator"); 
  1237.    Indent_Expanders_Property : constant Glib.Properties.Property_Boolean := 
  1238.      Glib.Properties.Build ("indent-expanders"); 
  1239. --     Odd_Row_Color_Property : constant Glib.Properties.Property_Boxed := 
  1240. --       Glib.Properties.Build ("odd-row-color"); 
  1241.    Row_Ending_Details_Property : constant Glib.Properties.Property_Boolean := 
  1242.      Glib.Properties.Build ("row-ending-details"); 
  1243.    Tree_Line_Pattern_Property : constant Glib.Properties.Property_String := 
  1244.      Glib.Properties.Build ("tree-line-pattern"); 
  1245.    Tree_Line_Width_Property : constant Glib.Properties.Property_Int := 
  1246.      Glib.Properties.Build ("tree-line-width"); 
  1247.    Vertical_Separator_Property : constant Glib.Properties.Property_Int := 
  1248.      Glib.Properties.Build ("vertical-separator"); 
  1249.  
  1250.    pragma Import (C, Get_Type, "gtk_tree_view_get_type"); 
  1251. end Gtk.Tree_View; 
  1252.  
  1253. --  No binding: gtk_tree_view_set_destroy_count_func 
  1254. --  No binding: gtk_tree_view_insert_column_with_attributes