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