1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. --  <description> 
  25. --  Gtk.Icon_View.Gtk_Icon_View provides an alternative view on a 
  26. --  Gtk.Tree_Model.Gtk_Tree_Model. It displays the model as a grid of icons 
  27. --  with labels. Like Gtk.Tree_View.Gtk_Tree_View, it allows to select one or 
  28. --  multiple items (depending on the selection mode, see 
  29. --  Gtk.Icon_View.Set_Selection_Mode). In addition to selection with the arrow 
  30. --  keys, Gtk.Icon_View.Gtk_Icon_View supports rubberband selection, which is 
  31. --  controlled by dragging the pointer. 
  32. -- 
  33. --  Note that if the tree model is backed by an actual tree store (as opposed 
  34. --  to a flat list where the mapping to icons is obvious), 
  35. --  Gtk.Icon_View.Gtk_Icon_View will only display the first level of the tree 
  36. --  and ignore the tree's branches. 
  37. -- 
  38. --  </description> 
  39. pragma Ada_2005; 
  40.  
  41. pragma Warnings (Off, "*is already use-visible*"); 
  42. with Cairo;                   use Cairo; 
  43. with Gdk.Dnd;                 use Gdk.Dnd; 
  44. with Gdk.Rectangle;           use Gdk.Rectangle; 
  45. with Gdk.Types;               use Gdk.Types; 
  46. with Glib;                    use Glib; 
  47. with Glib.Generic_Properties; use Glib.Generic_Properties; 
  48. with Glib.Object;             use Glib.Object; 
  49. with Glib.Properties;         use Glib.Properties; 
  50. with Glib.Types;              use Glib.Types; 
  51. with Gtk.Adjustment;          use Gtk.Adjustment; 
  52. with Gtk.Buildable;           use Gtk.Buildable; 
  53. with Gtk.Cell_Area;           use Gtk.Cell_Area; 
  54. with Gtk.Cell_Layout;         use Gtk.Cell_Layout; 
  55. with Gtk.Cell_Renderer;       use Gtk.Cell_Renderer; 
  56. with Gtk.Container;           use Gtk.Container; 
  57. with Gtk.Enums;               use Gtk.Enums; 
  58. with Gtk.Scrollable;          use Gtk.Scrollable; 
  59. with Gtk.Target_List;         use Gtk.Target_List; 
  60. with Gtk.Tooltip;             use Gtk.Tooltip; 
  61. with Gtk.Tree_Model;          use Gtk.Tree_Model; 
  62.  
  63. package Gtk.Icon_View is 
  64.  
  65.    type Gtk_Icon_View_Record is new Gtk_Container_Record with null record; 
  66.    type Gtk_Icon_View is access all Gtk_Icon_View_Record'Class; 
  67.  
  68.    type Gtk_Icon_View_Drop_Position is ( 
  69.       No_Drop, 
  70.       Drop_Into, 
  71.       Drop_Left, 
  72.       Drop_Right, 
  73.       Drop_Above, 
  74.       Drop_Below); 
  75.    pragma Convention (C, Gtk_Icon_View_Drop_Position); 
  76.    --  An enum for determining where a dropped item goes. 
  77.  
  78.    --------------- 
  79.    -- Callbacks -- 
  80.    --------------- 
  81.  
  82.    type Gtk_Icon_View_Foreach_Func is access procedure 
  83.      (Icon_View : not null access Gtk_Icon_View_Record'Class; 
  84.       Path      : Gtk.Tree_Model.Gtk_Tree_Path); 
  85.    --  A function used by Gtk.Icon_View.Selected_Foreach to map all selected 
  86.    --  rows. It will be called on every selected row in the view. 
  87.    --  "icon_view": a Gtk.Icon_View.Gtk_Icon_View 
  88.    --  "path": The Gtk.Tree_Model.Gtk_Tree_Path of a selected row 
  89.  
  90.    type Gtk_Cell_Layout_Data_Func is access procedure 
  91.      (Cell_Layout : Gtk.Cell_Layout.Gtk_Cell_Layout; 
  92.       Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  93.       Tree_Model  : Gtk.Tree_Model.Gtk_Tree_Model; 
  94.       Iter        : Gtk.Tree_Model.Gtk_Tree_Iter); 
  95.    --  A function which should set the value of Cell_Layout's cell renderer(s) 
  96.    --  as appropriate. 
  97.    --  "cell_layout": a Gtk.Cell_Layout.Gtk_Cell_Layout 
  98.    --  "cell": the cell renderer whose value is to be set 
  99.    --  "tree_model": the model 
  100.    --  "iter": a Gtk.Tree_Model.Gtk_Tree_Iter indicating the row to set the 
  101.    --  value for 
  102.  
  103.    ---------------------------- 
  104.    -- Enumeration Properties -- 
  105.    ---------------------------- 
  106.  
  107.    package Gtk_Icon_View_Drop_Position_Properties is 
  108.       new Generic_Internal_Discrete_Property (Gtk_Icon_View_Drop_Position); 
  109.    type Property_Gtk_Icon_View_Drop_Position is new Gtk_Icon_View_Drop_Position_Properties.Property; 
  110.  
  111.    ------------------ 
  112.    -- Constructors -- 
  113.    ------------------ 
  114.  
  115.    procedure Gtk_New (Icon_View : out Gtk_Icon_View); 
  116.    procedure Initialize 
  117.       (Icon_View : not null access Gtk_Icon_View_Record'Class); 
  118.    --  Creates a new Gtk.Icon_View.Gtk_Icon_View widget 
  119.    --  Since: gtk+ 2.6 
  120.  
  121.    function Gtk_Icon_View_New return Gtk_Icon_View; 
  122.    --  Creates a new Gtk.Icon_View.Gtk_Icon_View widget 
  123.    --  Since: gtk+ 2.6 
  124.  
  125.    procedure Gtk_New_With_Area 
  126.       (Icon_View : out Gtk_Icon_View; 
  127.        Area      : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class); 
  128.    procedure Initialize_With_Area 
  129.       (Icon_View : not null access Gtk_Icon_View_Record'Class; 
  130.        Area      : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class); 
  131.    --  Creates a new Gtk.Icon_View.Gtk_Icon_View widget using the specified 
  132.    --  Area to layout cells inside the icons. 
  133.    --  Since: gtk+ 3.0 
  134.    --  "area": the Gtk.Cell_Area.Gtk_Cell_Area to use to layout cells 
  135.  
  136.    function Gtk_Icon_View_New_With_Area 
  137.       (Area : not null access Gtk.Cell_Area.Gtk_Cell_Area_Record'Class) 
  138.        return Gtk_Icon_View; 
  139.    --  Creates a new Gtk.Icon_View.Gtk_Icon_View widget using the specified 
  140.    --  Area to layout cells inside the icons. 
  141.    --  Since: gtk+ 3.0 
  142.    --  "area": the Gtk.Cell_Area.Gtk_Cell_Area to use to layout cells 
  143.  
  144.    procedure Gtk_New_With_Model 
  145.       (Icon_View : out Gtk_Icon_View; 
  146.        Model     : Gtk.Tree_Model.Gtk_Tree_Model); 
  147.    procedure Initialize_With_Model 
  148.       (Icon_View : not null access Gtk_Icon_View_Record'Class; 
  149.        Model     : Gtk.Tree_Model.Gtk_Tree_Model); 
  150.    --  Creates a new Gtk.Icon_View.Gtk_Icon_View widget with the model Model. 
  151.    --  Since: gtk+ 2.6 
  152.    --  "model": The model. 
  153.  
  154.    function Gtk_Icon_View_New_With_Model 
  155.       (Model : Gtk.Tree_Model.Gtk_Tree_Model) return Gtk_Icon_View; 
  156.    --  Creates a new Gtk.Icon_View.Gtk_Icon_View widget with the model Model. 
  157.    --  Since: gtk+ 2.6 
  158.    --  "model": The model. 
  159.  
  160.    function Get_Type return Glib.GType; 
  161.    pragma Import (C, Get_Type, "gtk_icon_view_get_type"); 
  162.  
  163.    ------------- 
  164.    -- Methods -- 
  165.    ------------- 
  166.  
  167.    procedure Convert_Widget_To_Bin_Window_Coords 
  168.       (Icon_View : not null access Gtk_Icon_View_Record; 
  169.        Wx        : Gint; 
  170.        Wy        : Gint; 
  171.        Bx        : out Gint; 
  172.        By        : out Gint); 
  173.    --  Converts widget coordinates to coordinates for the bin_window, as 
  174.    --  expected by e.g. Gtk.Icon_View.Get_Path_At_Pos. 
  175.    --  Since: gtk+ 2.12 
  176.    --  "wx": X coordinate relative to the widget 
  177.    --  "wy": Y coordinate relative to the widget 
  178.    --  "bx": return location for bin_window X coordinate 
  179.    --  "by": return location for bin_window Y coordinate 
  180.  
  181.    function Create_Drag_Icon 
  182.       (Icon_View : not null access Gtk_Icon_View_Record; 
  183.        Path      : Gtk.Tree_Model.Gtk_Tree_Path) return Cairo.Cairo_Surface; 
  184.    --  Creates a cairo_surface_t representation of the item at Path. This 
  185.    --  image is used for a drag icon. 
  186.    --  Since: gtk+ 2.8 
  187.    --  "path": a Gtk.Tree_Model.Gtk_Tree_Path in Icon_View 
  188.  
  189.    function Get_Activate_On_Single_Click 
  190.       (Icon_View : not null access Gtk_Icon_View_Record) return Boolean; 
  191.    --  Gets the setting set by Gtk.Icon_View.Set_Activate_On_Single_Click. 
  192.    --  Since: gtk+ 3.8 
  193.  
  194.    procedure Set_Activate_On_Single_Click 
  195.       (Icon_View : not null access Gtk_Icon_View_Record; 
  196.        Single    : Boolean); 
  197.    --  Causes the Gtk.Icon_View.Gtk_Icon_View::item-activated signal to be 
  198.    --  emitted on a single click instead of a double click. 
  199.    --  Since: gtk+ 3.8 
  200.    --  "single": True to emit item-activated on a single click 
  201.  
  202.    function Get_Cell_Rect 
  203.       (Icon_View : not null access Gtk_Icon_View_Record; 
  204.        Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  205.        Cell      : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  206.        Rect      : access Gdk.Rectangle.Gdk_Rectangle) return Boolean; 
  207.    --  Fills the bounding rectangle in widget coordinates for the cell 
  208.    --  specified by Path and Cell. If Cell is null the main cell area is used. 
  209.    --  This function is only valid if Icon_View is realized. 
  210.    --  Since: gtk+ 3.6 
  211.    --  "path": a Gtk.Tree_Model.Gtk_Tree_Path 
  212.    --  "cell": a Gtk.Cell_Renderer.Gtk_Cell_Renderer or null 
  213.    --  "rect": rectangle to fill with cell rect 
  214.  
  215.    function Get_Column_Spacing 
  216.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  217.    --  Returns the value of the ::column-spacing property. 
  218.    --  Since: gtk+ 2.6 
  219.  
  220.    procedure Set_Column_Spacing 
  221.       (Icon_View      : not null access Gtk_Icon_View_Record; 
  222.        Column_Spacing : Gint); 
  223.    --  Sets the ::column-spacing property which specifies the space which is 
  224.    --  inserted between the columns of the icon view. 
  225.    --  Since: gtk+ 2.6 
  226.    --  "column_spacing": the column spacing 
  227.  
  228.    function Get_Columns 
  229.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  230.    --  Returns the value of the ::columns property. 
  231.    --  Since: gtk+ 2.6 
  232.  
  233.    procedure Set_Columns 
  234.       (Icon_View : not null access Gtk_Icon_View_Record; 
  235.        Columns   : Gint); 
  236.    --  Sets the ::columns property which determines in how many columns the 
  237.    --  icons are arranged. If Columns is -1, the number of columns will be 
  238.    --  chosen automatically to fill the available area. 
  239.    --  Since: gtk+ 2.6 
  240.    --  "columns": the number of columns 
  241.  
  242.    procedure Get_Cursor 
  243.       (Icon_View     : not null access Gtk_Icon_View_Record; 
  244.        Path          : out Gtk.Tree_Model.Gtk_Tree_Path; 
  245.        Cell          : out Gtk.Cell_Renderer.Gtk_Cell_Renderer; 
  246.        Cursor_Is_Set : out Boolean); 
  247.    --  Fills in Path and Cell with the current cursor path and cell. If the 
  248.    --  cursor isn't currently set, then *Path will be null. If no cell 
  249.    --  currently has focus, then *Cell will be null. 
  250.    --  The returned Gtk.Tree_Model.Gtk_Tree_Path must be freed with 
  251.    --  Gtk.Tree_Model.Path_Free. 
  252.    --  Since: gtk+ 2.8 
  253.    --  "path": Return location for the current cursor path, or null 
  254.    --  "cell": Return location the current focus cell, or null 
  255.  
  256.    procedure Set_Cursor 
  257.       (Icon_View     : not null access Gtk_Icon_View_Record; 
  258.        Path          : Gtk.Tree_Model.Gtk_Tree_Path; 
  259.        Cell          : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  260.        Start_Editing : Boolean); 
  261.    --  Sets the current keyboard focus to be at Path, and selects it. This is 
  262.    --  useful when you want to focus the user's attention on a particular item. 
  263.    --  If Cell is not null, then focus is given to the cell specified by it. 
  264.    --  Additionally, if Start_Editing is True, then editing should be started 
  265.    --  in the specified cell. 
  266.    --  This function is often followed by 'gtk_widget_grab_focus (icon_view)' 
  267.    --  in order to give keyboard focus to the widget. Please note that editing 
  268.    --  can only happen when the widget is realized. 
  269.    --  Since: gtk+ 2.8 
  270.    --  "path": A Gtk.Tree_Model.Gtk_Tree_Path 
  271.    --  "cell": One of the cell renderers of Icon_View, or null 
  272.    --  "start_editing": True if the specified cell should start being edited. 
  273.  
  274.    procedure Get_Dest_Item_At_Pos 
  275.       (Icon_View : not null access Gtk_Icon_View_Record; 
  276.        Drag_X    : Gint; 
  277.        Drag_Y    : Gint; 
  278.        Path      : out Gtk.Tree_Model.Gtk_Tree_Path; 
  279.        Pos       : out Gtk_Icon_View_Drop_Position; 
  280.        Has_Item  : out Boolean); 
  281.    --  Determines the destination item for a given position. 
  282.    --  Since: gtk+ 2.8 
  283.    --  "drag_x": the position to determine the destination item for 
  284.    --  "drag_y": the position to determine the destination item for 
  285.    --  "path": Return location for the path of the item, or null. 
  286.    --  "pos": Return location for the drop position, or null 
  287.  
  288.    procedure Get_Drag_Dest_Item 
  289.       (Icon_View : not null access Gtk_Icon_View_Record; 
  290.        Path      : out Gtk.Tree_Model.Gtk_Tree_Path; 
  291.        Pos       : out Gtk_Icon_View_Drop_Position); 
  292.    --  Gets information about the item that is highlighted for feedback. 
  293.    --  Since: gtk+ 2.8 
  294.    --  "path": Return location for the path of the highlighted item, or null. 
  295.    --  "pos": Return location for the drop position, or null 
  296.  
  297.    procedure Set_Drag_Dest_Item 
  298.       (Icon_View : not null access Gtk_Icon_View_Record; 
  299.        Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  300.        Pos       : Gtk_Icon_View_Drop_Position); 
  301.    --  Sets the item that is highlighted for feedback. 
  302.    --  Since: gtk+ 2.8 
  303.    --  "path": The path of the item to highlight, or null. 
  304.    --  "pos": Specifies where to drop, relative to the item 
  305.  
  306.    procedure Get_Item_At_Pos 
  307.       (Icon_View : not null access Gtk_Icon_View_Record; 
  308.        X         : Gint; 
  309.        Y         : Gint; 
  310.        Path      : out Gtk.Tree_Model.Gtk_Tree_Path; 
  311.        Cell      : out Gtk.Cell_Renderer.Gtk_Cell_Renderer; 
  312.        Has_Item  : out Boolean); 
  313.    --  Finds the path at the point (X, Y), relative to bin_window coordinates. 
  314.    --  In contrast to Gtk.Icon_View.Get_Path_At_Pos, this function also obtains 
  315.    --  the cell at the specified position. The returned path should be freed 
  316.    --  with Gtk.Tree_Model.Path_Free. See 
  317.    --  Gtk.Icon_View.Convert_Widget_To_Bin_Window_Coords for converting widget 
  318.    --  coordinates to bin_window coordinates. 
  319.    --  Since: gtk+ 2.8 
  320.    --  "x": The x position to be identified 
  321.    --  "y": The y position to be identified 
  322.    --  "path": Return location for the path, or null 
  323.    --  "cell": Return location for the renderer responsible for the cell at 
  324.    --  (X, Y), or null 
  325.  
  326.    function Get_Item_Column 
  327.       (Icon_View : not null access Gtk_Icon_View_Record; 
  328.        Path      : Gtk.Tree_Model.Gtk_Tree_Path) return Gint; 
  329.    --  Gets the column in which the item Path is currently displayed. Column 
  330.    --  numbers start at 0. 
  331.    --  Since: gtk+ 2.22 
  332.    --  "path": the Gtk.Tree_Model.Gtk_Tree_Path of the item 
  333.  
  334.    function Get_Item_Orientation 
  335.       (Icon_View : not null access Gtk_Icon_View_Record) 
  336.        return Gtk.Enums.Gtk_Orientation; 
  337.    --  Returns the value of the ::item-orientation property which determines 
  338.    --  whether the labels are drawn beside the icons instead of below. 
  339.    --  Since: gtk+ 2.6 
  340.  
  341.    procedure Set_Item_Orientation 
  342.       (Icon_View   : not null access Gtk_Icon_View_Record; 
  343.        Orientation : Gtk.Enums.Gtk_Orientation); 
  344.    --  Sets the ::item-orientation property which determines whether the 
  345.    --  labels are drawn beside the icons instead of below. 
  346.    --  Since: gtk+ 2.6 
  347.    --  "orientation": the relative position of texts and icons 
  348.  
  349.    function Get_Item_Padding 
  350.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  351.    --  Returns the value of the ::item-padding property. 
  352.    --  Since: gtk+ 2.18 
  353.  
  354.    procedure Set_Item_Padding 
  355.       (Icon_View    : not null access Gtk_Icon_View_Record; 
  356.        Item_Padding : Gint); 
  357.    --  Sets the Gtk.Icon_View.Gtk_Icon_View:item-padding property which 
  358.    --  specifies the padding around each of the icon view's items. 
  359.    --  Since: gtk+ 2.18 
  360.    --  "item_padding": the item padding 
  361.  
  362.    function Get_Item_Row 
  363.       (Icon_View : not null access Gtk_Icon_View_Record; 
  364.        Path      : Gtk.Tree_Model.Gtk_Tree_Path) return Gint; 
  365.    --  Gets the row in which the item Path is currently displayed. Row numbers 
  366.    --  start at 0. 
  367.    --  Since: gtk+ 2.22 
  368.    --  "path": the Gtk.Tree_Model.Gtk_Tree_Path of the item 
  369.  
  370.    function Get_Item_Width 
  371.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  372.    --  Returns the value of the ::item-width property. 
  373.    --  Since: gtk+ 2.6 
  374.  
  375.    procedure Set_Item_Width 
  376.       (Icon_View  : not null access Gtk_Icon_View_Record; 
  377.        Item_Width : Gint); 
  378.    --  Sets the ::item-width property which specifies the width to use for 
  379.    --  each item. If it is set to -1, the icon view will automatically 
  380.    --  determine a suitable item size. 
  381.    --  Since: gtk+ 2.6 
  382.    --  "item_width": the width for each item 
  383.  
  384.    function Get_Margin 
  385.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  386.    --  Returns the value of the ::margin property. 
  387.    --  Since: gtk+ 2.6 
  388.  
  389.    procedure Set_Margin 
  390.       (Icon_View : not null access Gtk_Icon_View_Record; 
  391.        Margin    : Gint); 
  392.    --  Sets the ::margin property which specifies the space which is inserted 
  393.    --  at the top, bottom, left and right of the icon view. 
  394.    --  Since: gtk+ 2.6 
  395.    --  "margin": the margin 
  396.  
  397.    function Get_Markup_Column 
  398.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  399.    --  Returns the column with markup text for Icon_View. 
  400.    --  Since: gtk+ 2.6 
  401.  
  402.    procedure Set_Markup_Column 
  403.       (Icon_View : not null access Gtk_Icon_View_Record; 
  404.        Column    : Gint); 
  405.    --  Sets the column with markup information for Icon_View to be Column. The 
  406.    --  markup column must be of type G_TYPE_STRING. If the markup column is set 
  407.    --  to something, it overrides the text column set by 
  408.    --  Gtk.Icon_View.Set_Text_Column. 
  409.    --  Since: gtk+ 2.6 
  410.    --  "column": A column in the currently used model, or -1 to display no 
  411.    --  text 
  412.  
  413.    function Get_Model 
  414.       (Icon_View : not null access Gtk_Icon_View_Record) 
  415.        return Gtk.Tree_Model.Gtk_Tree_Model; 
  416.    --  Returns the model the Gtk.Icon_View.Gtk_Icon_View is based on. Returns 
  417.    --  null if the model is unset. 
  418.    --  Since: gtk+ 2.6 
  419.  
  420.    procedure Set_Model 
  421.       (Icon_View : not null access Gtk_Icon_View_Record; 
  422.        Model     : Gtk.Tree_Model.Gtk_Tree_Model); 
  423.    --  Sets the model for a Gtk.Icon_View.Gtk_Icon_View. If the Icon_View 
  424.    --  already has a model set, it will remove it before setting the new model. 
  425.    --  If Model is null, then it will unset the old model. 
  426.    --  Since: gtk+ 2.6 
  427.    --  "model": The model. 
  428.  
  429.    function Get_Path_At_Pos 
  430.       (Icon_View : not null access Gtk_Icon_View_Record; 
  431.        X         : Gint; 
  432.        Y         : Gint) return Gtk.Tree_Model.Gtk_Tree_Path; 
  433.    --  Finds the path at the point (X, Y), relative to bin_window coordinates. 
  434.    --  See Gtk.Icon_View.Get_Item_At_Pos, if you are also interested in the 
  435.    --  cell at the specified position. See 
  436.    --  Gtk.Icon_View.Convert_Widget_To_Bin_Window_Coords for converting widget 
  437.    --  coordinates to bin_window coordinates. 
  438.    --  Since: gtk+ 2.6 
  439.    --  "x": The x position to be identified 
  440.    --  "y": The y position to be identified 
  441.  
  442.    function Get_Pixbuf_Column 
  443.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  444.    --  Returns the column with pixbufs for Icon_View. 
  445.    --  Since: gtk+ 2.6 
  446.  
  447.    procedure Set_Pixbuf_Column 
  448.       (Icon_View : not null access Gtk_Icon_View_Record; 
  449.        Column    : Gint); 
  450.    --  Sets the column with pixbufs for Icon_View to be Column. The pixbuf 
  451.    --  column must be of type GDK_TYPE_PIXBUF 
  452.    --  Since: gtk+ 2.6 
  453.    --  "column": A column in the currently used model, or -1 to disable 
  454.  
  455.    function Get_Reorderable 
  456.       (Icon_View : not null access Gtk_Icon_View_Record) return Boolean; 
  457.    --  Retrieves whether the user can reorder the list via drag-and-drop. See 
  458.    --  Gtk.Icon_View.Set_Reorderable. 
  459.    --  Since: gtk+ 2.8 
  460.  
  461.    procedure Set_Reorderable 
  462.       (Icon_View   : not null access Gtk_Icon_View_Record; 
  463.        Reorderable : Boolean); 
  464.    --  This function is a convenience function to allow you to reorder models 
  465.    --  that support the Gtk_Tree_Drag_Source_Iface and the 
  466.    --  Gtk_Tree_Drag_Dest_Iface. Both Gtk.Tree_Store.Gtk_Tree_Store and 
  467.    --  Gtk.List_Store.Gtk_List_Store support these. If Reorderable is True, 
  468.    --  then the user can reorder the model by dragging and dropping rows. The 
  469.    --  developer can listen to these changes by connecting to the model's 
  470.    --  row_inserted and row_deleted signals. The reordering is implemented by 
  471.    --  setting up the icon view as a drag source and destination. Therefore, 
  472.    --  drag and drop can not be used in a reorderable view for any other 
  473.    --  purpose. 
  474.    --  This function does not give you any degree of control over the order -- 
  475.    --  any reordering is allowed. If more control is needed, you should 
  476.    --  probably handle drag and drop manually. 
  477.    --  Since: gtk+ 2.8 
  478.    --  "reorderable": True, if the list of items can be reordered. 
  479.  
  480.    function Get_Row_Spacing 
  481.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  482.    --  Returns the value of the ::row-spacing property. 
  483.    --  Since: gtk+ 2.6 
  484.  
  485.    procedure Set_Row_Spacing 
  486.       (Icon_View   : not null access Gtk_Icon_View_Record; 
  487.        Row_Spacing : Gint); 
  488.    --  Sets the ::row-spacing property which specifies the space which is 
  489.    --  inserted between the rows of the icon view. 
  490.    --  Since: gtk+ 2.6 
  491.    --  "row_spacing": the row spacing 
  492.  
  493.    function Get_Selected_Items 
  494.       (Icon_View : not null access Gtk_Icon_View_Record) 
  495.        return Gtk.Tree_Model.Gtk_Tree_Path_List.Glist; 
  496.    --  Creates a list of paths of all selected items. Additionally, if you are 
  497.    --  planning on modifying the model after calling this function, you may 
  498.    --  want to convert the returned list into a list of 
  499.    --  Gtk.Tree_Row_Reference.Gtk_Tree_Row_Reference<!-- -->s. To do this, you 
  500.    --  can use gtk_tree_row_reference_new. 
  501.    --  To free the return value, use: |[ g_list_free_full (list, 
  502.    --  (GDestroyNotify) gtk_tree_path_free); ]| 
  503.    --  Since: gtk+ 2.6 
  504.  
  505.    function Get_Selection_Mode 
  506.       (Icon_View : not null access Gtk_Icon_View_Record) 
  507.        return Gtk.Enums.Gtk_Selection_Mode; 
  508.    --  Gets the selection mode of the Icon_View. 
  509.    --  Since: gtk+ 2.6 
  510.  
  511.    procedure Set_Selection_Mode 
  512.       (Icon_View : not null access Gtk_Icon_View_Record; 
  513.        Mode      : Gtk.Enums.Gtk_Selection_Mode); 
  514.    --  Sets the selection mode of the Icon_View. 
  515.    --  Since: gtk+ 2.6 
  516.    --  "mode": The selection mode 
  517.  
  518.    function Get_Spacing 
  519.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  520.    --  Returns the value of the ::spacing property. 
  521.    --  Since: gtk+ 2.6 
  522.  
  523.    procedure Set_Spacing 
  524.       (Icon_View : not null access Gtk_Icon_View_Record; 
  525.        Spacing   : Gint); 
  526.    --  Sets the ::spacing property which specifies the space which is inserted 
  527.    --  between the cells (i.e. the icon and the text) of an item. 
  528.    --  Since: gtk+ 2.6 
  529.    --  "spacing": the spacing 
  530.  
  531.    function Get_Text_Column 
  532.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  533.    --  Returns the column with text for Icon_View. 
  534.    --  Since: gtk+ 2.6 
  535.  
  536.    procedure Set_Text_Column 
  537.       (Icon_View : not null access Gtk_Icon_View_Record; 
  538.        Column    : Gint); 
  539.    --  Sets the column with text for Icon_View to be Column. The text column 
  540.    --  must be of type G_TYPE_STRING. 
  541.    --  Since: gtk+ 2.6 
  542.    --  "column": A column in the currently used model, or -1 to display no 
  543.    --  text 
  544.  
  545.    function Get_Tooltip_Column 
  546.       (Icon_View : not null access Gtk_Icon_View_Record) return Gint; 
  547.    --  Returns the column of Icon_View's model which is being used for 
  548.    --  displaying tooltips on Icon_View's rows. 
  549.    --  Since: gtk+ 2.12 
  550.  
  551.    procedure Set_Tooltip_Column 
  552.       (Icon_View : not null access Gtk_Icon_View_Record; 
  553.        Column    : Gint); 
  554.    --  If you only plan to have simple (text-only) tooltips on full items, you 
  555.    --  can use this function to have Gtk.Icon_View.Gtk_Icon_View handle these 
  556.    --  automatically for you. Column should be set to the column in Icon_View's 
  557.    --  model containing the tooltip texts, or -1 to disable this feature. 
  558.    --  When enabled, Gtk.Widget.Gtk_Widget:has-tooltip will be set to True and 
  559.    --  Icon_View will connect a Gtk.Widget.Gtk_Widget::query-tooltip signal 
  560.    --  handler. 
  561.    --  Note that the signal handler sets the text with Gtk.Tooltip.Set_Markup, 
  562.    --  so &amp;, <, etc have to be escaped in the text. 
  563.    --  Since: gtk+ 2.12 
  564.    --  "column": an integer, which is a valid column number for Icon_View's 
  565.    --  model 
  566.  
  567.    procedure Get_Tooltip_Context 
  568.       (Icon_View    : not null access Gtk_Icon_View_Record; 
  569.        X            : in out Gint; 
  570.        Y            : in out Gint; 
  571.        Keyboard_Tip : Boolean; 
  572.        Model        : out Gtk.Tree_Model.Gtk_Tree_Model; 
  573.        Path         : out Gtk.Tree_Model.Gtk_Tree_Path; 
  574.        Iter         : out Gtk.Tree_Model.Gtk_Tree_Iter; 
  575.        Success      : out Boolean); 
  576.    --  This function is supposed to be used in a 
  577.    --  Gtk.Widget.Gtk_Widget::query-tooltip signal handler for 
  578.    --  Gtk.Icon_View.Gtk_Icon_View. The X, Y and Keyboard_Tip values which are 
  579.    --  received in the signal handler, should be passed to this function 
  580.    --  without modification. 
  581.    --  The return value indicates whether there is an icon view item at the 
  582.    --  given coordinates (True) or not (False) for mouse tooltips. For keyboard 
  583.    --  tooltips the item returned will be the cursor item. When True, then any 
  584.    --  of Model, Path and Iter which have been provided will be set to point to 
  585.    --  that row and the corresponding model. X and Y will always be converted 
  586.    --  to be relative to Icon_View's bin_window if Keyboard_Tooltip is False. 
  587.    --  Since: gtk+ 2.12 
  588.    --  "x": the x coordinate (relative to widget coordinates) 
  589.    --  "y": the y coordinate (relative to widget coordinates) 
  590.    --  "keyboard_tip": whether this is a keyboard tooltip or not 
  591.    --  "model": a pointer to receive a Gtk.Tree_Model.Gtk_Tree_Model or null 
  592.    --  "path": a pointer to receive a Gtk.Tree_Model.Gtk_Tree_Path or null 
  593.    --  "iter": a pointer to receive a Gtk.Tree_Model.Gtk_Tree_Iter or null 
  594.  
  595.    procedure Get_Visible_Range 
  596.       (Icon_View  : not null access Gtk_Icon_View_Record; 
  597.        Start_Path : out Gtk.Tree_Model.Gtk_Tree_Path; 
  598.        End_Path   : out Gtk.Tree_Model.Gtk_Tree_Path); 
  599.    --  Sets Start_Path and End_Path to be the first and last visible path. 
  600.    --  Note that there may be invisible paths in between. 
  601.    --  Both paths should be freed with Gtk.Tree_Model.Path_Free after use. 
  602.    --  Since: gtk+ 2.8 
  603.    --  "start_path": Return location for start of region, or null 
  604.    --  "end_path": Return location for end of region, or null 
  605.  
  606.    procedure Item_Activated 
  607.       (Icon_View : not null access Gtk_Icon_View_Record; 
  608.        Path      : Gtk.Tree_Model.Gtk_Tree_Path); 
  609.    --  Activates the item determined by Path. 
  610.    --  Since: gtk+ 2.6 
  611.    --  "path": The Gtk.Tree_Model.Gtk_Tree_Path to be activated 
  612.  
  613.    function Path_Is_Selected 
  614.       (Icon_View : not null access Gtk_Icon_View_Record; 
  615.        Path      : Gtk.Tree_Model.Gtk_Tree_Path) return Boolean; 
  616.    --  Returns True if the icon pointed to by Path is currently selected. If 
  617.    --  Path does not point to a valid location, False is returned. 
  618.    --  Since: gtk+ 2.6 
  619.    --  "path": A Gtk.Tree_Model.Gtk_Tree_Path to check selection on. 
  620.  
  621.    procedure Scroll_To_Path 
  622.       (Icon_View : not null access Gtk_Icon_View_Record; 
  623.        Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  624.        Use_Align : Boolean; 
  625.        Row_Align : Gfloat; 
  626.        Col_Align : Gfloat); 
  627.    --  Moves the alignments of Icon_View to the position specified by Path. 
  628.    --  Row_Align determines where the row is placed, and Col_Align determines 
  629.    --  where Column is placed. Both are expected to be between 0.0 and 1.0. 0.0 
  630.    --  means left/top alignment, 1.0 means right/bottom alignment, 0.5 means 
  631.    --  center. 
  632.    --  If Use_Align is False, then the alignment arguments are ignored, and 
  633.    --  the tree does the minimum amount of work to scroll the item onto the 
  634.    --  screen. This means that the item will be scrolled to the edge closest to 
  635.    --  its current position. If the item is currently visible on the screen, 
  636.    --  nothing is done. 
  637.    --  This function only works if the model is set, and Path is a valid row 
  638.    --  on the model. If the model changes before the Icon_View is realized, the 
  639.    --  centered path will be modified to reflect this change. 
  640.    --  Since: gtk+ 2.8 
  641.    --  "path": The path of the item to move to. 
  642.    --  "use_align": whether to use alignment arguments, or False. 
  643.    --  "row_align": The vertical alignment of the item specified by Path. 
  644.    --  "col_align": The horizontal alignment of the item specified by Path. 
  645.  
  646.    procedure Select_All (Icon_View : not null access Gtk_Icon_View_Record); 
  647.    --  Selects all the icons. Icon_View must has its selection mode set to 
  648.    --  GTK_SELECTION_MULTIPLE. 
  649.    --  Since: gtk+ 2.6 
  650.  
  651.    procedure Select_Path 
  652.       (Icon_View : not null access Gtk_Icon_View_Record; 
  653.        Path      : Gtk.Tree_Model.Gtk_Tree_Path); 
  654.    --  Selects the row at Path. 
  655.    --  Since: gtk+ 2.6 
  656.    --  "path": The Gtk.Tree_Model.Gtk_Tree_Path to be selected. 
  657.  
  658.    procedure Selected_Foreach 
  659.       (Icon_View : not null access Gtk_Icon_View_Record; 
  660.        Func      : Gtk_Icon_View_Foreach_Func); 
  661.    --  Calls a function for each selected icon. Note that the model or 
  662.    --  selection cannot be modified from within this function. 
  663.    --  Since: gtk+ 2.6 
  664.    --  "func": The function to call for each selected icon. 
  665.  
  666.    generic 
  667.       type User_Data_Type (<>) is private; 
  668.       with procedure Destroy (Data : in out User_Data_Type) is null; 
  669.    package Selected_Foreach_User_Data is 
  670.  
  671.       type Gtk_Icon_View_Foreach_Func is access procedure 
  672.         (Icon_View : not null access Gtk.Icon_View.Gtk_Icon_View_Record'Class; 
  673.          Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  674.          Data      : User_Data_Type); 
  675.       --  A function used by Gtk.Icon_View.Selected_Foreach to map all selected 
  676.       --  rows. It will be called on every selected row in the view. 
  677.       --  "icon_view": a Gtk.Icon_View.Gtk_Icon_View 
  678.       --  "path": The Gtk.Tree_Model.Gtk_Tree_Path of a selected row 
  679.       --  "data": user data 
  680.  
  681.       procedure Selected_Foreach 
  682.          (Icon_View : not null access Gtk.Icon_View.Gtk_Icon_View_Record'Class; 
  683.           Func      : Gtk_Icon_View_Foreach_Func; 
  684.           Data      : User_Data_Type); 
  685.       --  Calls a function for each selected icon. Note that the model or 
  686.       --  selection cannot be modified from within this function. 
  687.       --  Since: gtk+ 2.6 
  688.       --  "func": The function to call for each selected icon. 
  689.       --  "data": User data to pass to the function. 
  690.  
  691.    end Selected_Foreach_User_Data; 
  692.  
  693.    procedure Set_Tooltip_Cell 
  694.       (Icon_View : not null access Gtk_Icon_View_Record; 
  695.        Tooltip   : not null access Gtk.Tooltip.Gtk_Tooltip_Record'Class; 
  696.        Path      : Gtk.Tree_Model.Gtk_Tree_Path; 
  697.        Cell      : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class); 
  698.    --  Sets the tip area of Tooltip to the area which Cell occupies in the 
  699.    --  item pointed to by Path. See also Gtk.Tooltip.Set_Tip_Area. 
  700.    --  See also Gtk.Icon_View.Set_Tooltip_Column for a simpler alternative. 
  701.    --  Since: gtk+ 2.12 
  702.    --  "tooltip": a Gtk.Tooltip.Gtk_Tooltip 
  703.    --  "path": a Gtk.Tree_Model.Gtk_Tree_Path 
  704.    --  "cell": a Gtk.Cell_Renderer.Gtk_Cell_Renderer or null 
  705.  
  706.    procedure Set_Tooltip_Item 
  707.       (Icon_View : not null access Gtk_Icon_View_Record; 
  708.        Tooltip   : not null access Gtk.Tooltip.Gtk_Tooltip_Record'Class; 
  709.        Path      : Gtk.Tree_Model.Gtk_Tree_Path); 
  710.    --  Sets the tip area of Tooltip to be the area covered by the item at 
  711.    --  Path. See also Gtk.Icon_View.Set_Tooltip_Column for a simpler 
  712.    --  alternative. See also Gtk.Tooltip.Set_Tip_Area. 
  713.    --  Since: gtk+ 2.12 
  714.    --  "tooltip": a Gtk.Tooltip.Gtk_Tooltip 
  715.    --  "path": a Gtk.Tree_Model.Gtk_Tree_Path 
  716.  
  717.    procedure Unselect_All (Icon_View : not null access Gtk_Icon_View_Record); 
  718.    --  Unselects all the icons. 
  719.    --  Since: gtk+ 2.6 
  720.  
  721.    procedure Unselect_Path 
  722.       (Icon_View : not null access Gtk_Icon_View_Record; 
  723.        Path      : Gtk.Tree_Model.Gtk_Tree_Path); 
  724.    --  Unselects the row at Path. 
  725.    --  Since: gtk+ 2.6 
  726.    --  "path": The Gtk.Tree_Model.Gtk_Tree_Path to be unselected. 
  727.  
  728.    procedure Unset_Model_Drag_Dest 
  729.       (Icon_View : not null access Gtk_Icon_View_Record); 
  730.    --  Undoes the effect of gtk_icon_view_enable_model_drag_dest. Calling this 
  731.    --  method sets Gtk.Icon_View.Gtk_Icon_View:reorderable to False. 
  732.    --  Since: gtk+ 2.8 
  733.  
  734.    procedure Unset_Model_Drag_Source 
  735.       (Icon_View : not null access Gtk_Icon_View_Record); 
  736.    --  Undoes the effect of gtk_icon_view_enable_model_drag_source. Calling 
  737.    --  this method sets Gtk.Icon_View.Gtk_Icon_View:reorderable to False. 
  738.    --  Since: gtk+ 2.8 
  739.  
  740.    procedure Set_Cell_Data_Func 
  741.       (Cell_Layout : not null access Gtk_Icon_View_Record; 
  742.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  743.        Func        : Gtk_Cell_Layout_Data_Func); 
  744.    --  Sets the Gtk_Cell_Layout_Data_Func to use for Cell_Layout. 
  745.    --  This function is used instead of the standard attributes mapping for 
  746.    --  setting the column value, and should set the value of Cell_Layout's cell 
  747.    --  renderer(s) as appropriate. 
  748.    --  Func may be null to remove a previously set function. 
  749.    --  Since: gtk+ 2.4 
  750.    --  "cell": a Gtk.Cell_Renderer.Gtk_Cell_Renderer 
  751.    --  "func": the Gtk_Cell_Layout_Data_Func to use, or null 
  752.  
  753.    generic 
  754.       type User_Data_Type (<>) is private; 
  755.       with procedure Destroy (Data : in out User_Data_Type) is null; 
  756.    package Set_Cell_Data_Func_User_Data is 
  757.  
  758.       type Gtk_Cell_Layout_Data_Func is access procedure 
  759.         (Cell_Layout : Gtk.Cell_Layout.Gtk_Cell_Layout; 
  760.          Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  761.          Tree_Model  : Gtk.Tree_Model.Gtk_Tree_Model; 
  762.          Iter        : Gtk.Tree_Model.Gtk_Tree_Iter; 
  763.          Data        : User_Data_Type); 
  764.       --  A function which should set the value of Cell_Layout's cell renderer(s) 
  765.       --  as appropriate. 
  766.       --  "cell_layout": a Gtk.Cell_Layout.Gtk_Cell_Layout 
  767.       --  "cell": the cell renderer whose value is to be set 
  768.       --  "tree_model": the model 
  769.       --  "iter": a Gtk.Tree_Model.Gtk_Tree_Iter indicating the row to set the 
  770.       --  value for 
  771.       --  "data": user data passed to Gtk.Cell_Layout.Set_Cell_Data_Func 
  772.  
  773.       procedure Set_Cell_Data_Func 
  774.          (Cell_Layout : not null access Gtk.Icon_View.Gtk_Icon_View_Record'Class; 
  775.           Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  776.           Func        : Gtk_Cell_Layout_Data_Func; 
  777.           Func_Data   : User_Data_Type); 
  778.       --  Sets the Gtk_Cell_Layout_Data_Func to use for Cell_Layout. 
  779.       --  This function is used instead of the standard attributes mapping for 
  780.       --  setting the column value, and should set the value of Cell_Layout's 
  781.       --  cell renderer(s) as appropriate. 
  782.       --  Func may be null to remove a previously set function. 
  783.       --  Since: gtk+ 2.4 
  784.       --  "cell": a Gtk.Cell_Renderer.Gtk_Cell_Renderer 
  785.       --  "func": the Gtk_Cell_Layout_Data_Func to use, or null 
  786.       --  "func_data": user data for Func 
  787.  
  788.    end Set_Cell_Data_Func_User_Data; 
  789.  
  790.    ---------------------- 
  791.    -- GtkAda additions -- 
  792.    ---------------------- 
  793.  
  794.    procedure Enable_Model_Drag_Dest 
  795.      (Icon_View : access Gtk_Icon_View_Record; 
  796.       Targets   : Gtk.Target_List.Target_Entry_Array; 
  797.       Actions   : Gdk.Dnd.Drag_Action); 
  798.    --  Turns Icon_view into a drop destination for automatic DND. 
  799.    --  Targets is the list of targets that the drag will support. 
  800.  
  801.    procedure Enable_Model_Drag_Source 
  802.      (Icon_View         : access Gtk_Icon_View_Record; 
  803.       Start_Button_Mask : Gdk.Types.Gdk_Modifier_Type; 
  804.       Targets           : Gtk.Target_List.Target_Entry_Array; 
  805.       Actions           : Gdk.Dnd.Drag_Action); 
  806.    --  Turns Icon_view into a drag source for automatic DND. 
  807.    --  Start_Button_Mask is the allowed buttons to start drag. 
  808.  
  809.    --------------------------------------------- 
  810.    -- Inherited subprograms (from interfaces) -- 
  811.    --------------------------------------------- 
  812.    --  Methods inherited from the Buildable interface are not duplicated here 
  813.    --  since they are meant to be used by tools, mostly. If you need to call 
  814.    --  them, use an explicit cast through the "-" operator below. 
  815.  
  816.    procedure Add_Attribute 
  817.       (Cell_Layout : not null access Gtk_Icon_View_Record; 
  818.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  819.        Attribute   : UTF8_String; 
  820.        Column      : Gint); 
  821.  
  822.    procedure Clear (Cell_Layout : not null access Gtk_Icon_View_Record); 
  823.  
  824.    procedure Clear_Attributes 
  825.       (Cell_Layout : not null access Gtk_Icon_View_Record; 
  826.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class); 
  827.  
  828.    function Get_Cells 
  829.       (Cell_Layout : not null access Gtk_Icon_View_Record) 
  830.        return Glib.Object.Object_Simple_List.Glist; 
  831.  
  832.    procedure Pack_End 
  833.       (Cell_Layout : not null access Gtk_Icon_View_Record; 
  834.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  835.        Expand      : Boolean); 
  836.  
  837.    procedure Pack_Start 
  838.       (Cell_Layout : not null access Gtk_Icon_View_Record; 
  839.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  840.        Expand      : Boolean); 
  841.  
  842.    procedure Reorder 
  843.       (Cell_Layout : not null access Gtk_Icon_View_Record; 
  844.        Cell        : not null access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class; 
  845.        Position    : Gint); 
  846.  
  847.    function Get_Hadjustment 
  848.       (Self : not null access Gtk_Icon_View_Record) 
  849.        return Gtk.Adjustment.Gtk_Adjustment; 
  850.  
  851.    procedure Set_Hadjustment 
  852.       (Self        : not null access Gtk_Icon_View_Record; 
  853.        Hadjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class); 
  854.  
  855.    function Get_Hscroll_Policy 
  856.       (Self : not null access Gtk_Icon_View_Record) 
  857.        return Gtk.Enums.Gtk_Scrollable_Policy; 
  858.  
  859.    procedure Set_Hscroll_Policy 
  860.       (Self   : not null access Gtk_Icon_View_Record; 
  861.        Policy : Gtk.Enums.Gtk_Scrollable_Policy); 
  862.  
  863.    function Get_Vadjustment 
  864.       (Self : not null access Gtk_Icon_View_Record) 
  865.        return Gtk.Adjustment.Gtk_Adjustment; 
  866.  
  867.    procedure Set_Vadjustment 
  868.       (Self        : not null access Gtk_Icon_View_Record; 
  869.        Vadjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class); 
  870.  
  871.    function Get_Vscroll_Policy 
  872.       (Self : not null access Gtk_Icon_View_Record) 
  873.        return Gtk.Enums.Gtk_Scrollable_Policy; 
  874.  
  875.    procedure Set_Vscroll_Policy 
  876.       (Self   : not null access Gtk_Icon_View_Record; 
  877.        Policy : Gtk.Enums.Gtk_Scrollable_Policy); 
  878.  
  879.    ---------------- 
  880.    -- Properties -- 
  881.    ---------------- 
  882.    --  The following properties are defined for this widget. See 
  883.    --  Glib.Properties for more information on properties) 
  884.  
  885.    Activate_On_Single_Click_Property : constant Glib.Properties.Property_Boolean; 
  886.    --  The activate-on-single-click property specifies whether the 
  887.    --  "item-activated" signal will be emitted after a single click. 
  888.  
  889.    Cell_Area_Property : constant Glib.Properties.Property_Object; 
  890.    --  Type: Gtk.Cell_Area.Gtk_Cell_Area 
  891.    --  The Gtk.Cell_Area.Gtk_Cell_Area used to layout cell renderers for this 
  892.    --  view. 
  893.    -- 
  894.    --  If no area is specified when creating the icon view with 
  895.    --  Gtk.Icon_View.Gtk_New_With_Area a Gtk.Cell_Area_Box.Gtk_Cell_Area_Box 
  896.    --  will be used. 
  897.  
  898.    Column_Spacing_Property : constant Glib.Properties.Property_Int; 
  899.    --  The column-spacing property specifies the space which is inserted 
  900.    --  between the columns of the icon view. 
  901.  
  902.    Columns_Property : constant Glib.Properties.Property_Int; 
  903.    --  The columns property contains the number of the columns in which the 
  904.    --  items should be displayed. If it is -1, the number of columns will be 
  905.    --  chosen automatically to fill the available area. 
  906.  
  907.    Item_Orientation_Property : constant Gtk.Enums.Property_Gtk_Orientation; 
  908.    --  The item-orientation property specifies how the cells (i.e. the icon 
  909.    --  and the text) of the item are positioned relative to each other. 
  910.  
  911.    Item_Padding_Property : constant Glib.Properties.Property_Int; 
  912.    --  The item-padding property specifies the padding around each of the icon 
  913.    --  view's item. 
  914.  
  915.    Item_Width_Property : constant Glib.Properties.Property_Int; 
  916.    --  The item-width property specifies the width to use for each item. If it 
  917.    --  is set to -1, the icon view will automatically determine a suitable item 
  918.    --  size. 
  919.  
  920.    Margin_Property : constant Glib.Properties.Property_Int; 
  921.    --  The margin property specifies the space which is inserted at the edges 
  922.    --  of the icon view. 
  923.  
  924.    Markup_Column_Property : constant Glib.Properties.Property_Int; 
  925.    --  The ::markup-column property contains the number of the model column 
  926.    --  containing markup information to be displayed. The markup column must be 
  927.    --  of type G_TYPE_STRING. If this property and the :text-column property 
  928.    --  are both set to column numbers, it overrides the text column. If both 
  929.    --  are set to -1, no texts are displayed. 
  930.  
  931.    Model_Property : constant Glib.Properties.Property_Interface; 
  932.    --  Type: Gtk.Tree_Model.Gtk_Tree_Model 
  933.  
  934.    Pixbuf_Column_Property : constant Glib.Properties.Property_Int; 
  935.    --  The ::pixbuf-column property contains the number of the model column 
  936.    --  containing the pixbufs which are displayed. The pixbuf column must be of 
  937.    --  type GDK_TYPE_PIXBUF. Setting this property to -1 turns off the display 
  938.    --  of pixbufs. 
  939.  
  940.    Reorderable_Property : constant Glib.Properties.Property_Boolean; 
  941.    --  The reorderable property specifies if the items can be reordered by 
  942.    --  DND. 
  943.  
  944.    Row_Spacing_Property : constant Glib.Properties.Property_Int; 
  945.    --  The row-spacing property specifies the space which is inserted between 
  946.    --  the rows of the icon view. 
  947.  
  948.    Selection_Mode_Property : constant Gtk.Enums.Property_Gtk_Selection_Mode; 
  949.    --  The ::selection-mode property specifies the selection mode of icon 
  950.    --  view. If the mode is GTK_SELECTION_MULTIPLE, rubberband selection is 
  951.    --  enabled, for the other modes, only keyboard selection is possible. 
  952.  
  953.    Spacing_Property : constant Glib.Properties.Property_Int; 
  954.    --  The spacing property specifies the space which is inserted between the 
  955.    --  cells (i.e. the icon and the text) of an item. 
  956.  
  957.    Text_Column_Property : constant Glib.Properties.Property_Int; 
  958.    --  The ::text-column property contains the number of the model column 
  959.    --  containing the texts which are displayed. The text column must be of 
  960.    --  type G_TYPE_STRING. If this property and the :markup-column property are 
  961.    --  both set to -1, no texts are displayed. 
  962.  
  963.    Tooltip_Column_Property : constant Glib.Properties.Property_Int; 
  964.  
  965.    ------------- 
  966.    -- Signals -- 
  967.    ------------- 
  968.  
  969.    type Cb_Gtk_Icon_View_Boolean is not null access function 
  970.      (Self : access Gtk_Icon_View_Record'Class) return Boolean; 
  971.  
  972.    type Cb_GObject_Boolean is not null access function 
  973.      (Self : access Glib.Object.GObject_Record'Class) 
  974.    return Boolean; 
  975.  
  976.    Signal_Activate_Cursor_Item : constant Glib.Signal_Name := "activate-cursor-item"; 
  977.    procedure On_Activate_Cursor_Item 
  978.       (Self  : not null access Gtk_Icon_View_Record; 
  979.        Call  : Cb_Gtk_Icon_View_Boolean; 
  980.        After : Boolean := False); 
  981.    procedure On_Activate_Cursor_Item 
  982.       (Self  : not null access Gtk_Icon_View_Record; 
  983.        Call  : Cb_GObject_Boolean; 
  984.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  985.        After : Boolean := False); 
  986.    --  A <link linkend="keybinding-signals">keybinding signal</link> which 
  987.    --  gets emitted when the user activates the currently focused item. 
  988.    -- 
  989.    --  Applications should not connect to it, but may emit it with 
  990.    --  g_signal_emit_by_name if they need to control activation 
  991.    --  programmatically. 
  992.    -- 
  993.    --  The default bindings for this signal are Space, Return and Enter. 
  994.  
  995.    type Cb_Gtk_Icon_View_Gtk_Tree_Path_Void is not null access procedure 
  996.      (Self : access Gtk_Icon_View_Record'Class; 
  997.       Path : Gtk.Tree_Model.Gtk_Tree_Path); 
  998.  
  999.    type Cb_GObject_Gtk_Tree_Path_Void is not null access procedure 
  1000.      (Self : access Glib.Object.GObject_Record'Class; 
  1001.       Path : Gtk.Tree_Model.Gtk_Tree_Path); 
  1002.  
  1003.    Signal_Item_Activated : constant Glib.Signal_Name := "item-activated"; 
  1004.    procedure On_Item_Activated 
  1005.       (Self  : not null access Gtk_Icon_View_Record; 
  1006.        Call  : Cb_Gtk_Icon_View_Gtk_Tree_Path_Void; 
  1007.        After : Boolean := False); 
  1008.    procedure On_Item_Activated 
  1009.       (Self  : not null access Gtk_Icon_View_Record; 
  1010.        Call  : Cb_GObject_Gtk_Tree_Path_Void; 
  1011.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1012.        After : Boolean := False); 
  1013.    --  The ::item-activated signal is emitted when the method 
  1014.    --  Gtk.Icon_View.Item_Activated is called, when the user double clicks an 
  1015.    --  item with the "activate-on-single-click" property set to False, or when 
  1016.    --  the user single clicks an item when the "activate-on-single-click" 
  1017.    --  property set to True. It is also emitted when a non-editable item is 
  1018.    --  selected and one of the keys: Space, Return or Enter is pressed. 
  1019.  
  1020.    type Cb_Gtk_Icon_View_Gtk_Movement_Step_Gint_Boolean is not null access function 
  1021.      (Self  : access Gtk_Icon_View_Record'Class; 
  1022.       Step  : Gtk.Enums.Gtk_Movement_Step; 
  1023.       Count : Gint) return Boolean; 
  1024.  
  1025.    type Cb_GObject_Gtk_Movement_Step_Gint_Boolean is not null access function 
  1026.      (Self  : access Glib.Object.GObject_Record'Class; 
  1027.       Step  : Gtk.Enums.Gtk_Movement_Step; 
  1028.       Count : Gint) return Boolean; 
  1029.  
  1030.    Signal_Move_Cursor : constant Glib.Signal_Name := "move-cursor"; 
  1031.    procedure On_Move_Cursor 
  1032.       (Self  : not null access Gtk_Icon_View_Record; 
  1033.        Call  : Cb_Gtk_Icon_View_Gtk_Movement_Step_Gint_Boolean; 
  1034.        After : Boolean := False); 
  1035.    procedure On_Move_Cursor 
  1036.       (Self  : not null access Gtk_Icon_View_Record; 
  1037.        Call  : Cb_GObject_Gtk_Movement_Step_Gint_Boolean; 
  1038.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1039.        After : Boolean := False); 
  1040.    --  The ::move-cursor signal is a <link 
  1041.    --  linkend="keybinding-signals">keybinding signal</link> which gets emitted 
  1042.    --  when the user initiates a cursor movement. 
  1043.    -- 
  1044.    --  Applications should not connect to it, but may emit it with 
  1045.    --  g_signal_emit_by_name if they need to control the cursor 
  1046.    --  programmatically. 
  1047.    -- 
  1048.    --  The default bindings for this signal include 
  1049.    -- 
  1050.    --     * Arrow keys which move by individual steps 
  1051.    -- 
  1052.    --     * Home/End keys which move to the first/last item 
  1053.    -- 
  1054.    --     * PageUp/PageDown which move by "pages" 
  1055.    -- 
  1056.    --  All of these will extend the selection when combined with the Shift 
  1057.    --  modifier. 
  1058.    --  
  1059.    --  Callback parameters: 
  1060.    --    --  "step": the granularity of the move, as a Gtk.Enums.Gtk_Movement_Step 
  1061.    --    --  "count": the number of Step units to move 
  1062.  
  1063.    type Cb_Gtk_Icon_View_Void is not null access procedure (Self : access Gtk_Icon_View_Record'Class); 
  1064.  
  1065.    type Cb_GObject_Void is not null access procedure 
  1066.      (Self : access Glib.Object.GObject_Record'Class); 
  1067.  
  1068.    Signal_Select_All : constant Glib.Signal_Name := "select-all"; 
  1069.    procedure On_Select_All 
  1070.       (Self  : not null access Gtk_Icon_View_Record; 
  1071.        Call  : Cb_Gtk_Icon_View_Void; 
  1072.        After : Boolean := False); 
  1073.    procedure On_Select_All 
  1074.       (Self  : not null access Gtk_Icon_View_Record; 
  1075.        Call  : Cb_GObject_Void; 
  1076.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1077.        After : Boolean := False); 
  1078.    --  A <link linkend="keybinding-signals">keybinding signal</link> which 
  1079.    --  gets emitted when the user selects all items. 
  1080.    -- 
  1081.    --  Applications should not connect to it, but may emit it with 
  1082.    --  g_signal_emit_by_name if they need to control selection 
  1083.    --  programmatically. 
  1084.    -- 
  1085.    --  The default binding for this signal is Ctrl-a. 
  1086.  
  1087.    Signal_Select_Cursor_Item : constant Glib.Signal_Name := "select-cursor-item"; 
  1088.    procedure On_Select_Cursor_Item 
  1089.       (Self  : not null access Gtk_Icon_View_Record; 
  1090.        Call  : Cb_Gtk_Icon_View_Void; 
  1091.        After : Boolean := False); 
  1092.    procedure On_Select_Cursor_Item 
  1093.       (Self  : not null access Gtk_Icon_View_Record; 
  1094.        Call  : Cb_GObject_Void; 
  1095.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1096.        After : Boolean := False); 
  1097.    --  A <link linkend="keybinding-signals">keybinding signal</link> which 
  1098.    --  gets emitted when the user selects the item that is currently focused. 
  1099.    -- 
  1100.    --  Applications should not connect to it, but may emit it with 
  1101.    --  g_signal_emit_by_name if they need to control selection 
  1102.    --  programmatically. 
  1103.    -- 
  1104.    --  There is no default binding for this signal. 
  1105.  
  1106.    Signal_Selection_Changed : constant Glib.Signal_Name := "selection-changed"; 
  1107.    procedure On_Selection_Changed 
  1108.       (Self  : not null access Gtk_Icon_View_Record; 
  1109.        Call  : Cb_Gtk_Icon_View_Void; 
  1110.        After : Boolean := False); 
  1111.    procedure On_Selection_Changed 
  1112.       (Self  : not null access Gtk_Icon_View_Record; 
  1113.        Call  : Cb_GObject_Void; 
  1114.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1115.        After : Boolean := False); 
  1116.    --  The ::selection-changed signal is emitted when the selection (i.e. the 
  1117.    --  set of selected items) changes. 
  1118.  
  1119.    Signal_Toggle_Cursor_Item : constant Glib.Signal_Name := "toggle-cursor-item"; 
  1120.    procedure On_Toggle_Cursor_Item 
  1121.       (Self  : not null access Gtk_Icon_View_Record; 
  1122.        Call  : Cb_Gtk_Icon_View_Void; 
  1123.        After : Boolean := False); 
  1124.    procedure On_Toggle_Cursor_Item 
  1125.       (Self  : not null access Gtk_Icon_View_Record; 
  1126.        Call  : Cb_GObject_Void; 
  1127.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1128.        After : Boolean := False); 
  1129.    --  A <link linkend="keybinding-signals">keybinding signal</link> which 
  1130.    --  gets emitted when the user toggles whether the currently focused item is 
  1131.    --  selected or not. The exact effect of this depend on the selection mode. 
  1132.    -- 
  1133.    --  Applications should not connect to it, but may emit it with 
  1134.    --  g_signal_emit_by_name if they need to control selection 
  1135.    --  programmatically. 
  1136.    -- 
  1137.    --  There is no default binding for this signal is Ctrl-Space. 
  1138.  
  1139.    Signal_Unselect_All : constant Glib.Signal_Name := "unselect-all"; 
  1140.    procedure On_Unselect_All 
  1141.       (Self  : not null access Gtk_Icon_View_Record; 
  1142.        Call  : Cb_Gtk_Icon_View_Void; 
  1143.        After : Boolean := False); 
  1144.    procedure On_Unselect_All 
  1145.       (Self  : not null access Gtk_Icon_View_Record; 
  1146.        Call  : Cb_GObject_Void; 
  1147.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1148.        After : Boolean := False); 
  1149.    --  A <link linkend="keybinding-signals">keybinding signal</link> which 
  1150.    --  gets emitted when the user unselects all items. 
  1151.    -- 
  1152.    --  Applications should not connect to it, but may emit it with 
  1153.    --  g_signal_emit_by_name if they need to control selection 
  1154.    --  programmatically. 
  1155.    -- 
  1156.    --  The default binding for this signal is Ctrl-Shift-a. 
  1157.  
  1158.    ---------------- 
  1159.    -- Interfaces -- 
  1160.    ---------------- 
  1161.    --  This class implements several interfaces. See Glib.Types 
  1162.    -- 
  1163.    --  - "Buildable" 
  1164.    -- 
  1165.    --  - "CellLayout" 
  1166.    -- 
  1167.    --  - "Scrollable" 
  1168.  
  1169.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  1170.      (Gtk.Buildable.Gtk_Buildable, Gtk_Icon_View_Record, Gtk_Icon_View); 
  1171.    function "+" 
  1172.      (Widget : access Gtk_Icon_View_Record'Class) 
  1173.    return Gtk.Buildable.Gtk_Buildable 
  1174.    renames Implements_Gtk_Buildable.To_Interface; 
  1175.    function "-" 
  1176.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  1177.    return Gtk_Icon_View 
  1178.    renames Implements_Gtk_Buildable.To_Object; 
  1179.  
  1180.    package Implements_Gtk_Cell_Layout is new Glib.Types.Implements 
  1181.      (Gtk.Cell_Layout.Gtk_Cell_Layout, Gtk_Icon_View_Record, Gtk_Icon_View); 
  1182.    function "+" 
  1183.      (Widget : access Gtk_Icon_View_Record'Class) 
  1184.    return Gtk.Cell_Layout.Gtk_Cell_Layout 
  1185.    renames Implements_Gtk_Cell_Layout.To_Interface; 
  1186.    function "-" 
  1187.      (Interf : Gtk.Cell_Layout.Gtk_Cell_Layout) 
  1188.    return Gtk_Icon_View 
  1189.    renames Implements_Gtk_Cell_Layout.To_Object; 
  1190.  
  1191.    package Implements_Gtk_Scrollable is new Glib.Types.Implements 
  1192.      (Gtk.Scrollable.Gtk_Scrollable, Gtk_Icon_View_Record, Gtk_Icon_View); 
  1193.    function "+" 
  1194.      (Widget : access Gtk_Icon_View_Record'Class) 
  1195.    return Gtk.Scrollable.Gtk_Scrollable 
  1196.    renames Implements_Gtk_Scrollable.To_Interface; 
  1197.    function "-" 
  1198.      (Interf : Gtk.Scrollable.Gtk_Scrollable) 
  1199.    return Gtk_Icon_View 
  1200.    renames Implements_Gtk_Scrollable.To_Object; 
  1201.  
  1202. private 
  1203.    Tooltip_Column_Property : constant Glib.Properties.Property_Int := 
  1204.      Glib.Properties.Build ("tooltip-column"); 
  1205.    Text_Column_Property : constant Glib.Properties.Property_Int := 
  1206.      Glib.Properties.Build ("text-column"); 
  1207.    Spacing_Property : constant Glib.Properties.Property_Int := 
  1208.      Glib.Properties.Build ("spacing"); 
  1209.    Selection_Mode_Property : constant Gtk.Enums.Property_Gtk_Selection_Mode := 
  1210.      Gtk.Enums.Build ("selection-mode"); 
  1211.    Row_Spacing_Property : constant Glib.Properties.Property_Int := 
  1212.      Glib.Properties.Build ("row-spacing"); 
  1213.    Reorderable_Property : constant Glib.Properties.Property_Boolean := 
  1214.      Glib.Properties.Build ("reorderable"); 
  1215.    Pixbuf_Column_Property : constant Glib.Properties.Property_Int := 
  1216.      Glib.Properties.Build ("pixbuf-column"); 
  1217.    Model_Property : constant Glib.Properties.Property_Interface := 
  1218.      Glib.Properties.Build ("model"); 
  1219.    Markup_Column_Property : constant Glib.Properties.Property_Int := 
  1220.      Glib.Properties.Build ("markup-column"); 
  1221.    Margin_Property : constant Glib.Properties.Property_Int := 
  1222.      Glib.Properties.Build ("margin"); 
  1223.    Item_Width_Property : constant Glib.Properties.Property_Int := 
  1224.      Glib.Properties.Build ("item-width"); 
  1225.    Item_Padding_Property : constant Glib.Properties.Property_Int := 
  1226.      Glib.Properties.Build ("item-padding"); 
  1227.    Item_Orientation_Property : constant Gtk.Enums.Property_Gtk_Orientation := 
  1228.      Gtk.Enums.Build ("item-orientation"); 
  1229.    Columns_Property : constant Glib.Properties.Property_Int := 
  1230.      Glib.Properties.Build ("columns"); 
  1231.    Column_Spacing_Property : constant Glib.Properties.Property_Int := 
  1232.      Glib.Properties.Build ("column-spacing"); 
  1233.    Cell_Area_Property : constant Glib.Properties.Property_Object := 
  1234.      Glib.Properties.Build ("cell-area"); 
  1235.    Activate_On_Single_Click_Property : constant Glib.Properties.Property_Boolean := 
  1236.      Glib.Properties.Build ("activate-on-single-click"); 
  1237. end Gtk.Icon_View;