1. ----------------------------------------------------------------------- 
  2. --              GtkAda - Ada95 binding for Gtk+/Gnome                -- 
  3. --                                                                   -- 
  4. --                 Copyright (C) 2001-2013, 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. --  General organization of the tree_view widgets: 
  31. -- 
  32. --  <example> 
  33. --    ______________Tree_View___________________________________ 
  34. --   |   _________________________     ________________________| 
  35. --   |  |_____Tree_View_Column1__|    |___Tree_View_Column2 __|| 
  36. --   |  |                        |    |                       || 
  37. --   |  |  ----------- ---------||    |                       || 
  38. --   |  |  |Renderer1| |render2 ||    |                       || 
  39. --   |  |  |         | |        ||    |                       || 
  40. --   |  |  |         | |        ||    |                       || 
  41. --   |  |  |         | |        ||    |                       || 
  42. --   |  |  |---------| |--------||    |                       || 
  43. --   |  |________________________|    |_______________________|| 
  44. --   |_________________________________________________________| 
  45. -- 
  46. --  </example> 
  47. --  A tree view can contain multiple physical columns on the screen. These 
  48. --  columns can have a button at the top, typically to force an ordering 
  49. --  of the tree). They can also be reorganized interactively by the user. 
  50. -- 
  51. --  Each physical column can display several information, like buttons, 
  52. --  strings, ... Each of this display comes from a cell_renderer, that displays 
  53. --  some data it reads from the model associated with the tree_view. 
  54. -- 
  55. --  The renderers are then divided into lines, which are typically pointed to 
  56. --  by iterators (Gtk_Tree_Iter). 
  57. --  </description> 
  58. --  <c_version>2.8.17</c_version> 
  59. --  <group>Trees and Lists</group> 
  60.  
  61. with Glib.Properties; 
  62. with Glib.Generic_Properties; 
  63. with Glib.Object; 
  64. with Gdk.Rectangle; 
  65. with Gtk; 
  66. with Gtk.Cell_Renderer; 
  67. with Gtk.Enums; use Gtk.Enums; 
  68. with Gtk.Tree_Model; 
  69. with Gtk.Widget; 
  70.  
  71. with Glib.Glist; 
  72. pragma Elaborate_All (Glib.Glist); 
  73. with Ada.Unchecked_Conversion; 
  74.  
  75. package Gtk.Tree_View_Column is 
  76.  
  77.    type Gtk_Tree_View_Column_Record is 
  78.      new Glib.Object.GObject_Record with private; 
  79.    type Gtk_Tree_View_Column is access all Gtk_Tree_View_Column_Record'Class; 
  80.  
  81.    function Convert is new Ada.Unchecked_Conversion 
  82.      (Gtk_Tree_View_Column, System.Address); 
  83.    function Convert is new Ada.Unchecked_Conversion 
  84.      (System.Address, Gtk_Tree_View_Column); 
  85.    package Column_List is new Glib.Glist.Generic_List (Gtk_Tree_View_Column); 
  86.  
  87.    type Gtk_Tree_View_Column_Sizing is 
  88.      (Tree_View_Column_Grow_Only, 
  89.       Tree_View_Column_Autosize, 
  90.       Tree_View_Column_Fixed); 
  91.    pragma Convention (C, Gtk_Tree_View_Column_Sizing); 
  92.  
  93.    procedure Gtk_New (Widget : out Gtk_Tree_View_Column); 
  94.    procedure Initialize (Widget : access Gtk_Tree_View_Column_Record'Class); 
  95.    --  Creates or initializes a new Gtk_Tree_View_Column. 
  96.  
  97.    function Get_Type return Glib.GType; 
  98.    --  Return the internal value associated with this widget. 
  99.  
  100.    --  function Get_Tree_View 
  101.    --    (Tree_Column : access Gtk_Tree_View_Column_Record) 
  102.    --     return Gtk_Tree_View; 
  103.    --  Returns the Gtk_Tree_View wherein Tree_Column has been inserted. 
  104.    --  This function has been relocated to the Gtk.Tree_View package to 
  105.    --  avoid a dependency circularity. 
  106.  
  107.    --------------------------------------- 
  108.    -- Visual representation of the data -- 
  109.    --------------------------------------- 
  110.    --  All the cells in a column have a similar graphical representation. This 
  111.    --  could be either a simple text, an editable text, a toggle button, ... 
  112.    --  This visual representation is independent from the actual data to 
  113.    --  represent. For instance, the same data from the model could be used for 
  114.    --  two different columns, once for a text and once for a button. 
  115.    -- 
  116.    --  The visual representation is specified through a "renderer". See the 
  117.    --  various Gtk.Cell_Renderer* packages for more information on the 
  118.    --  available renderers. 
  119.    -- 
  120.    --  Note that the same renderer can be used for multiple columns, even 
  121.    --  though its properties can be different each time. This means that for 
  122.    --  instance you can instantiate only one Gtk_Cell_Renderer_Text, and use it 
  123.    --  for all the columns that need to display text. 
  124.  
  125.    procedure Pack_Start 
  126.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  127.       Cell        : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  128.       Expand      : Boolean); 
  129.    --  Add a renderer to the Tree_Column. 
  130.    --  Multiple renderers can be put in a specific column, and each of them can 
  131.    --  be associated with different data from the model. This provides a very 
  132.    --  powerful way to display different data in the same column. 
  133.  
  134.    procedure Pack_End 
  135.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  136.       Cell        : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  137.       Expand      : Boolean); 
  138.    --  Same as the above. See the description of Pack_Start and Pack_End in 
  139.    --  Gtk.Box for the precise difference between the two 
  140.  
  141.    procedure Clear (Tree_Column : access Gtk_Tree_View_Column_Record); 
  142.    --  Remove all the renderers set in the column. 
  143.    --  The column will always be empty until you put some new renderers. 
  144.  
  145.    function Get_Cell_Renderers 
  146.      (Tree_Column : access Gtk_Tree_View_Column_Record) 
  147.       return Gtk.Cell_Renderer.Cell_Renderer_List.Glist; 
  148.    pragma Obsolescent (Get_Cell_Renderers); 
  149.    --  Return the list of cell renderers set in the column. The returned list 
  150.    --  must be freed by the caller. 
  151.  
  152.    ------------------------------------ 
  153.    -- Specifying the data to display -- 
  154.    ------------------------------------ 
  155.    --  The data to display in a column is always read from the model associated 
  156.    --  with the tree. In some cases (like if you are using the Gtk_Tree_Store 
  157.    --  model), this means that is has to be physically stored in a data 
  158.    --  structure. However, if you define your own models, you could also 
  159.    --  compute it on the fly. 
  160.    -- 
  161.    --  For instance, if you have a database that contains some distance and 
  162.    --  time information, and you want to display the speed in a tree view: if 
  163.    --  you are using a Gtk_Tree_Store model, you have to create a third column 
  164.    --  in the model to store the string, and have a renderer point to that 
  165.    --  third column. 
  166.    -- 
  167.    --  However, if you are using your own model, it is conceivable that the 
  168.    --  speed is computed on the fly from the distance and time. 
  169.    -- 
  170.    --  The subprograms below use two or three parameters to precisely identify 
  171.    --  the part of the tree they impact: the column, the renderer in the 
  172.    --  column, and in some cases the specific line. 
  173.    -- 
  174.    --  A renderer is always associated with a column in the model (even if that 
  175.    --  is a virtual column not associated with physical data). This is done 
  176.    --  through the Add_Attribute subprogram. This will read the data from the 
  177.    --  model. The type of the data read depends on the type of the column in 
  178.    --  the model. 
  179.    --  The type of data that Add_Attribute excepts to find in the column is 
  180.    --  documented in the packages for each of the renderer. 
  181.  
  182.    procedure Add_Attribute 
  183.      (Tree_Column   : access Gtk_Tree_View_Column_Record; 
  184.       Cell_Renderer : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  185.       Attribute     : String; 
  186.       Column        : Gint); 
  187.    --  Add an attribute mapping to the list in Tree_Column. 
  188.    --  The Column is the column of the model to get a value from, and the 
  189.    --  Attribute is the parameter on Cell_Renderer to be set from the value. So 
  190.    --  for example if column 2 of the model contains strings, you could have 
  191.    --  the "text" attribute of a Gtk_Cell_Renderer_Text get its values from 
  192.    --  column 2. 
  193.    -- 
  194.    --  For a list of properties available for each Cell_Renderer, please 
  195.    --  refer to the corresponding package specifications. 
  196.    -- 
  197.    --  See also the function Set_Cell_Data_Func for another way to query the 
  198.    --  data to display in the tree. 
  199.  
  200.    type Cell_Data_Func is access procedure 
  201.      (Tree_Column : access Gtk_Tree_View_Column_Record'Class; 
  202.       Cell        : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  203.       Model       : access Gtk.Tree_Model.Gtk_Tree_Model_Record'Class; 
  204.       Iter        : Gtk.Tree_Model.Gtk_Tree_Iter); 
  205.    --  This subprogram can be used to globally modify an attribute of the 
  206.    --  Cell renderer. 
  207.    --  It is called every time some event happens in the tree (a line was 
  208.    --  clicked, the mouse moved into or out of a line,...). Iter and 
  209.    --  Tree_Column point to the location in the tree that received the event. 
  210.  
  211.    procedure Set_Cell_Data_Func 
  212.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  213.       Cell        : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  214.       Func        : Cell_Data_Func); 
  215.    --  Set the function to use for the column. 
  216.    --  This function is used instead of the standard attributes mapping for 
  217.    --  setting the column value, and should set the value of Tree_Column's cell 
  218.    --  renderer as appropriate. 
  219.    --  Func may be null to remove an older one. 
  220.    --  It should be used when values from the model should be computed from 
  221.    --  application-specific data structures rather than stored in the model. 
  222.  
  223.    generic 
  224.       type Data_Type (<>) is private; 
  225.    package Cell_Data_Functions is 
  226.       type Cell_Data_Func is access procedure 
  227.         (Tree_Column : access Gtk_Tree_View_Column_Record'Class; 
  228.          Cell        : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  229.          Model       : access Gtk.Tree_Model.Gtk_Tree_Model_Record'Class; 
  230.          Iter        : Gtk.Tree_Model.Gtk_Tree_Iter; 
  231.          Data        : Data_Type); 
  232.  
  233.       procedure Set_Cell_Data_Func 
  234.         (Tree_Column : access Gtk_Tree_View_Column_Record'Class; 
  235.          Cell        : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  236.          Func        : Cell_Data_Func; 
  237.          Data        : Data_Type); 
  238.  
  239.    private 
  240.       --  <doc_ignore> 
  241.       type Data_Type_Access is access Data_Type; 
  242.  
  243.       type Data_Type_Record is record 
  244.          Func : Cell_Data_Func; 
  245.          Data : Data_Type_Access; 
  246.       end record; 
  247.       type Data_Type_Record_Access is access Data_Type_Record; 
  248.       pragma Convention (C, Data_Type_Record_Access); 
  249.  
  250.       procedure Internal_Destroy_Notify (Data : Data_Type_Record_Access); 
  251.       pragma Convention (C, Internal_Destroy_Notify); 
  252.  
  253.       procedure Internal_Data_Cell_Data_Func 
  254.         (Tree_Column, Cell, Model, Iter : System.Address; 
  255.          Data : Data_Type_Record_Access); 
  256.       pragma Convention (C, Internal_Data_Cell_Data_Func); 
  257.       --  </doc_ignore> 
  258.    end Cell_Data_Functions; 
  259.  
  260.    procedure Clear_Attributes 
  261.      (Tree_Column   : access Gtk_Tree_View_Column_Record; 
  262.       Cell_Renderer : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class); 
  263.    --  Clear all existing attributes previously set with 
  264.    --  Gtk.Tree_View_Column.Set_Attributes. 
  265.  
  266.    ------------------------------------------ 
  267.    -- Options for manipulating the columns -- 
  268.    ------------------------------------------ 
  269.  
  270.    procedure Set_Spacing 
  271.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  272.       Spacing     : Gint); 
  273.    function Get_Spacing 
  274.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Gint; 
  275.    --  Set the spacing field of Tree_Column. 
  276.    --  The spacing field is the number of pixels to place between cell 
  277.    --  renderers packed into it. 
  278.  
  279.    procedure Set_Visible 
  280.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  281.       Visible     : Boolean); 
  282.    function Get_Visible 
  283.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Boolean; 
  284.    --  Set the visibility of Tree_Column. 
  285.  
  286.    procedure Set_Resizable 
  287.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  288.       Resizable   : Boolean); 
  289.    function Get_Resizable 
  290.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Boolean; 
  291.    --  Set whether the Tree_Column is resizable. 
  292.  
  293.    procedure Set_Sizing 
  294.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  295.       The_Type    : Gtk_Tree_View_Column_Sizing); 
  296.    function Get_Sizing 
  297.      (Tree_Column : access Gtk_Tree_View_Column_Record) 
  298.       return Gtk_Tree_View_Column_Sizing; 
  299.    --  Set the growth behavior of Tree_Column to The_Type. 
  300.  
  301.    function Get_Width 
  302.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Gint; 
  303.    --  Return the current size of the Tree_Column in pixels. 
  304.  
  305.    procedure Queue_Resize 
  306.      (Tree_Column : access Gtk_Tree_View_Column_Record); 
  307.    --  Flags the column, and the cell renderers added to this column, to have 
  308.    --  their sizes renegotiated. 
  309.  
  310.    procedure Set_Fixed_Width 
  311.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  312.       Fixed_Width : Gint); 
  313.    function Get_Fixed_Width 
  314.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Gint; 
  315.    --  Set the size of the column in pixels. 
  316.    --  This is meaningful only if the sizing type is 
  317.    --  Gtk_Tree_View_Column_Fixed. In this case, the value is discarded as the 
  318.    --  size of the column is based on the calculated width of the column. The 
  319.    --  width is clamped to the min/max width for the column. 
  320.    --  The value returned by Get_Fixed_width may not be the actual width of the 
  321.    --  column on the screen, just what is requested. 
  322.  
  323.    procedure Set_Min_Width 
  324.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  325.       Min_Width   : Gint); 
  326.    function Get_Min_Width 
  327.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Gint; 
  328.    --  Set the minimum width of the Tree_Column. 
  329.    --  If Min_Width is -1, then the minimum width is unset. 
  330.  
  331.    procedure Set_Max_Width 
  332.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  333.       Max_Width   : Gint); 
  334.    function Get_Max_Width 
  335.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Gint; 
  336.    --  Set the maximum width of the Tree_Column. 
  337.    --  If Max_Width is -1, then the maximum width is unset. 
  338.    --  Note, the column can actually be wider than max width if it's the last 
  339.    --  column in a view. In this case, the column expands to fill the view. 
  340.  
  341.    procedure Clicked (Tree_Column : access Gtk_Tree_View_Column_Record); 
  342.    --  Emit the "clicked" signal on the column. 
  343.    --  This function will only work if the user could have conceivably clicked 
  344.    --  on the button. 
  345.  
  346.    procedure Set_Expand 
  347.      (Tree_Column : access Gtk_Tree_View_Column_Record; Expand : Boolean); 
  348.    function Get_Expand 
  349.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Boolean; 
  350.    --  Sets the column to take available extra space. This space is shared 
  351.    --  equally amongst all columns that have the expand set to TRUE. If no 
  352.    --  column has this option set, then the last column gets all extra space. 
  353.    --  By default, every column is created with this FALSE. 
  354.  
  355.    procedure Set_Title 
  356.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  357.       Title       : UTF8_String); 
  358.    function Get_Title 
  359.      (Tree_Column : access Gtk_Tree_View_Column_Record) return UTF8_String; 
  360.    --  Set the title of the Tree_Column. 
  361.    --  If a custom widget has been set, then this value is ignored. 
  362.  
  363.    procedure Set_Clickable 
  364.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  365.       Clickable   : Boolean); 
  366.    function Get_Clickable 
  367.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Boolean; 
  368.    --  Set the header to be active if Active is True. 
  369.    --  When the header is active, then it can take keyboard focus, and can be 
  370.    --  clicked. 
  371.  
  372.    procedure Set_Widget 
  373.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  374.       Widget      : access Gtk.Widget.Gtk_Widget_Record'Class); 
  375.    function Get_Widget 
  376.      (Tree_Column : access Gtk_Tree_View_Column_Record) 
  377.        return Gtk.Widget.Gtk_Widget; 
  378.    --  Return the Gtk_Widget in the button in the column header. 
  379.    --  If a custom widget has not been set, then this will be a Gtk_Alignment 
  380.    --  with a Gtk_Label in it. 
  381.  
  382.    procedure Set_Alignment 
  383.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  384.       Xalign      : Gfloat); 
  385.    function Get_Alignment 
  386.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Gfloat; 
  387.    --  Set the alignment of the title or custom widget inside the column header 
  388.    --  The alignment determines its location inside the button 
  389.    --  0.0 for left, 0.5 for center, 1.0 for right. 
  390.  
  391.    procedure Set_Reorderable 
  392.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  393.       Reorderable : Boolean); 
  394.    function Get_Reorderable 
  395.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Boolean; 
  396.    --  Whether this column can be drag-and-dropped to some other place in the 
  397.    --  tree. 
  398.  
  399.    procedure Set_Sort_Column_Id 
  400.      (Tree_Column    : access Gtk_Tree_View_Column_Record; 
  401.       Sort_Column_Id : Gint); 
  402.    function Get_Sort_Column_Id 
  403.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Gint; 
  404.    --  Set the logical model columns that this column sorts on when this 
  405.    --  column is selected for sorting. Doing so makes the column header 
  406.    --  clickable. 
  407.    --  Get_Sort_Column_Id returns -1 if this column can't be used for sorting. 
  408.  
  409.    procedure Set_Sort_Indicator 
  410.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  411.       Setting     : Boolean); 
  412.    function Get_Sort_Indicator 
  413.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Boolean; 
  414.    --  Call this function with a Setting of True to display an arrow in 
  415.    --  the header button indicating the column is sorted. Call 
  416.    --  Set_Sort_Order to change the direction of the arrow. 
  417.  
  418.    procedure Set_Sort_Order 
  419.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  420.       Order       : Gtk_Sort_Type); 
  421.    function Get_Sort_Order 
  422.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Gtk_Sort_Type; 
  423.    --  Change the appearance of the sort indicator. 
  424.    --  This does *not* actually sort the model. Use 
  425.    --  Gtk.Tree_View_Column.Set_Sort_Column_Id if you want automatic sorting 
  426.    --  support. This function is primarily for custom sorting behavior, and 
  427.    --  should be used in conjunction with Gtk.Tree_Sortable.Set_Sort_Column 
  428.    --  to do that. For custom models, the mechanism will vary. The sort 
  429.    --  indicator changes direction to indicate normal sort or reverse sort. 
  430.    --  Note that you must have the sort indicator enabled to see anything 
  431.    --  when calling this function; see Set_Sort_Indicator. 
  432.  
  433.    procedure Cell_Set_Cell_Data 
  434.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  435.       Tree_Model  : access Gtk.Tree_Model.Gtk_Tree_Model_Record'Class; 
  436.       Iter        : Gtk.Tree_Model.Gtk_Tree_Iter; 
  437.       Is_Expander : Boolean; 
  438.       Is_Expanded : Boolean); 
  439.    --  Set the cell renderer based on the Tree_Model and Tree_Node. 
  440.    --  That is, for every attribute mapping in Tree_Column, it will get a 
  441.    --  value from the set column on the Tree_Node, and use that value to 
  442.    --  set the attribute on the cell renderer.  This is used primarily by 
  443.    --  the Gtk_Tree_View. 
  444.  
  445.    procedure Cell_Get_Size 
  446.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  447.       Cell_Area   : Gdk.Rectangle.Gdk_Rectangle; 
  448.       X_Offset    : out Gint; 
  449.       Y_Offset    : out Gint; 
  450.       Width       : out Gint; 
  451.       Height      : out Gint); 
  452.    --  Obtain the width and height needed to render the column. 
  453.    --  This is used primarily by the Gtk_Tree_View. 
  454.  
  455.    function Cell_Is_Visible 
  456.      (Tree_Column : access Gtk_Tree_View_Column_Record) return Boolean; 
  457.    --  Returns true if any of the cells packed in the column is visible 
  458.  
  459.    procedure Cell_Get_Position 
  460.      (Tree_Column   : access Gtk_Tree_View_Column_Record; 
  461.       Cell_Renderer : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  462.       Start_Pos     : out Gint; 
  463.       Width         : out Gint; 
  464.       Success       : out Boolean); 
  465.    --  Obtains the horizontal position and size of a cell in a column. If the 
  466.    --  cell is not found in the column, start_pos and width are not changed 
  467.    --  and FALSE is returned. 
  468.  
  469.    procedure Focus_Cell 
  470.      (Tree_Column : access Gtk_Tree_View_Column_Record; 
  471.       Cell        : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class); 
  472.    --  Sets the current keyboard focus to be at Cell, if the column contains 
  473.    --  2 or more editable and activatable cells. 
  474.  
  475.    ---------------- 
  476.    -- Properties -- 
  477.    ---------------- 
  478.  
  479.    --  <properties> 
  480.    --  The following properties are defined for this widget. See 
  481.    --  Glib.Properties for more information on properties. 
  482.    -- 
  483.    --  Name:  Alignment_Property 
  484.    --  Type:  Float 
  485.    --  Descr: X Alignment of the column header text or widget 
  486.    -- 
  487.    --  Name:  Clickable_Property 
  488.    --  Type:  Boolean 
  489.    --  Descr: Whether the header can be clicked 
  490.    -- 
  491.    --  Name:  Expand_Property 
  492.    --  Type:  Boolean 
  493.    --  Descr: Column gets share of extra width allocated to the widget 
  494.    -- 
  495.    --  Name:  Fixed_Width_Property 
  496.    --  Type:  Int 
  497.    --  Descr: Current fixed width of the column 
  498.    -- 
  499.    --  Name:  Max_Width_Property 
  500.    --  Type:  Int 
  501.    --  Descr: Maximum allowed width of the column 
  502.    -- 
  503.    --  Name:  Min_Width_Property 
  504.    --  Type:  Int 
  505.    --  Descr: Minimum allowed width of the column 
  506.    -- 
  507.    --  Name:  Reorderable_Property 
  508.    --  Type:  Boolean 
  509.    --  Descr: Whether the column can be reordered around the headers 
  510.    -- 
  511.    --  Name:  Resizable_Property 
  512.    --  Type:  Boolean 
  513.    --  Descr: Column is user-resizable 
  514.    -- 
  515.    --  Name:  Sizing_Property 
  516.    --  Type:  Enum 
  517.    --  Descr: Resize mode of the column 
  518.    -- 
  519.    --  Name:  Sort_Indicator_Property 
  520.    --  Type:  Boolean 
  521.    --  Descr: Whether to show a sort indicator 
  522.    -- 
  523.    --  Name:  Sort_Order_Property 
  524.    --  Type:  Enum 
  525.    --  Descr: Sort direction the sort indicator should indicate 
  526.    -- 
  527.    --  Name:  Spacing_Property 
  528.    --  Type:  Int 
  529.    --  Descr: Space which is inserted between cells 
  530.    -- 
  531.    --  Name:  Title_Property 
  532.    --  Type:  String 
  533.    --  Descr: Title to appear in column header 
  534.    -- 
  535.    --  Name:  Visible_Property 
  536.    --  Type:  Boolean 
  537.    --  Descr: Whether to display the column 
  538.    -- 
  539.    --  Name:  Widget_Property 
  540.    --  Type:  Object 
  541.    --  Descr: Widget to put in column header button instead of column title 
  542.    -- 
  543.    --  Name:  Width_Property 
  544.    --  Type:  Int 
  545.    --  Descr: Current width of the column 
  546.    -- 
  547.    --  </properties> 
  548.  
  549.    package Column_Sizing_Properties is new 
  550.      Glib.Generic_Properties.Generic_Internal_Discrete_Property 
  551.        (Gtk_Tree_View_Column_Sizing); 
  552.    type Property_Column_Sizing is new Column_Sizing_Properties.Property; 
  553.  
  554.    Alignment_Property      : constant Glib.Properties.Property_Float; 
  555.    Clickable_Property      : constant Glib.Properties.Property_Boolean; 
  556.    Expand_Property         : constant Glib.Properties.Property_Boolean; 
  557.    Fixed_Width_Property    : constant Glib.Properties.Property_Int; 
  558.    Max_Width_Property      : constant Glib.Properties.Property_Int; 
  559.    Min_Width_Property      : constant Glib.Properties.Property_Int; 
  560.    Reorderable_Property    : constant Glib.Properties.Property_Boolean; 
  561.    Resizable_Property      : constant Glib.Properties.Property_Boolean; 
  562.    Sizing_Property         : constant Property_Column_Sizing; 
  563.    Sort_Indicator_Property : constant Glib.Properties.Property_Boolean; 
  564.    Sort_Order_Property     : constant Gtk.Enums.Property_Sort_Type; 
  565.    Spacing_Property        : constant Glib.Properties.Property_Int; 
  566.    Title_Property          : constant Glib.Properties.Property_String; 
  567.    Visible_Property        : constant Glib.Properties.Property_Boolean; 
  568.    Widget_Property         : constant Glib.Properties.Property_Object; 
  569.    Width_Property          : constant Glib.Properties.Property_Int; 
  570.  
  571.    ------------- 
  572.    -- Signals -- 
  573.    ------------- 
  574.  
  575.    --  <signals> 
  576.    --  The following new signals are defined for this widget: 
  577.    -- 
  578.    --  - "clicked" 
  579.    --    procedure Handler (Widget : access Gtk_Tree_View_Column_Record'Class); 
  580.    -- 
  581.    --  </signals> 
  582.  
  583.    Signal_Clicked : constant Glib.Signal_Name := "clicked"; 
  584.  
  585. private 
  586.    type Gtk_Tree_View_Column_Record is 
  587.      new Glib.Object.GObject_Record with null record; 
  588.  
  589.       Alignment_Property : constant Glib.Properties.Property_Float := 
  590.      Glib.Properties.Build ("alignment"); 
  591.    Clickable_Property : constant Glib.Properties.Property_Boolean := 
  592.      Glib.Properties.Build ("clickable"); 
  593.    Expand_Property : constant Glib.Properties.Property_Boolean := 
  594.      Glib.Properties.Build ("expand"); 
  595.    Fixed_Width_Property : constant Glib.Properties.Property_Int := 
  596.      Glib.Properties.Build ("fixed-width"); 
  597.    Max_Width_Property : constant Glib.Properties.Property_Int := 
  598.      Glib.Properties.Build ("max-width"); 
  599.    Min_Width_Property : constant Glib.Properties.Property_Int := 
  600.      Glib.Properties.Build ("min-width"); 
  601.    Reorderable_Property : constant Glib.Properties.Property_Boolean := 
  602.      Glib.Properties.Build ("reorderable"); 
  603.    Resizable_Property : constant Glib.Properties.Property_Boolean := 
  604.      Glib.Properties.Build ("resizable"); 
  605.    Sizing_Property : constant Property_Column_Sizing := 
  606.      Build ("sizing"); 
  607.    Sort_Indicator_Property : constant Glib.Properties.Property_Boolean := 
  608.      Glib.Properties.Build ("sort-indicator"); 
  609.    Sort_Order_Property : constant Gtk.Enums.Property_Sort_Type := 
  610.      Gtk.Enums.Build ("sort-order"); 
  611.    Spacing_Property : constant Glib.Properties.Property_Int := 
  612.      Glib.Properties.Build ("spacing"); 
  613.    Title_Property : constant Glib.Properties.Property_String := 
  614.      Glib.Properties.Build ("title"); 
  615.    Visible_Property : constant Glib.Properties.Property_Boolean := 
  616.      Glib.Properties.Build ("visible"); 
  617.    Widget_Property : constant Glib.Properties.Property_Object := 
  618.      Glib.Properties.Build ("widget"); 
  619.    Width_Property : constant Glib.Properties.Property_Int := 
  620.      Glib.Properties.Build ("width"); 
  621.  
  622.    pragma Import (C, Get_Type, "gtk_tree_view_column_get_type"); 
  623. end Gtk.Tree_View_Column; 
  624.  
  625. --  No binding: gtk_tree_view_column_new_with_attributes 
  626. --  No binding: gtk_tree_view_column_set_attributes 
  627.  
  628. --  Implemented in Gtk.Tree_View: 
  629. --  No binding: gtk_tree_view_column_get_tree_view