## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --              GtkAda - Ada95 binding for Gtk+/Gnome                --

3.     --                                                                   --

4.     --                Copyright (C) 2006-2010 AdaCore                    --

5.     --                                                                   --

6.     -- This library is free software; you can redistribute it and/or     --

7.     -- modify it under the terms of the GNU General Public               --

8.     -- License as published by the Free Software Foundation; either      --

9.     -- version 2 of the License, or (at your option) any later version.  --

10.     --                                                                   --

11.     -- This library is distributed in the hope that it will be useful,   --

12.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

13.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

14.     -- General Public License for more details.                          --

15.     --                                                                   --

16.     -- You should have received a copy of the GNU General Public         --

17.     -- License along with this library; if not, write to the             --

18.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

19.     -- Boston, MA 02111-1307, USA.                                       --

20.     --                                                                   --

21.     -- As a special exception, if other files instantiate generics from  --

22.     -- this unit, or you link this unit with other files to produce an   --

23.     -- executable, this  unit  does not  by itself cause  the resulting  --

24.     -- executable to be covered by the GNU General Public License. This  --

25.     -- exception does not however invalidate any other reasons why the   --

26.     -- executable file  might be covered by the  GNU Public License.     --

27.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  Gtk_Icon_View provides an alternative view on a list model. It displays the

31.     --  model as a grid of icons with labels. Like Gtk_Tree_View, it allows to

32.     --  select one or multiple items (depending on the selection mode, see

33.     --  Set_Selection_Mode). In addition to selection with the arrow keys,

34.     --  Gtk_Icon_View supports rubberband selection, which is controlled by

35.     --  dragging the pointer.

36.     --  </description>

37.     --  <c_version>2.16.6</c_version>

38.     --  <group>Trees and Lists</group>

39.     --  <screenshot>icon-view</screenshot>

40.     --  <testgtk>create_icon_view.adb</testgtk>

42.     with Glib.TypesTo API docTo specTo body;

43.     with Gdk.ColorTo API docTo specTo body;

44.     with Gdk.DndTo API docTo specTo body;

45.     with Gdk.TypesTo API docTo spec;

46.     with Glib.PropertiesTo API docTo specTo body;

47.     with Gtk.Cell_LayoutTo API docTo specTo body;

48.     with Gtk.Cell_RendererTo API docTo specTo body;

49.     with Gtk.ContainerTo API docTo specTo body;

50.     with Gtk.EnumsTo API docTo specTo body;

51.     with Gtk.SelectionTo API docTo specTo body;

52.     with Gtk.TooltipTo API docTo specTo body;

53.     with Gtk.Tree_ModelTo API docTo specTo body;

55.     package Gtk.Icon_ViewTo API docTo specTo body is

57.        type Gtk_Icon_View_Record is new Gtk.Container.Gtk_Container_RecordTo API docTo specTo body with

58.          null record;

59.        type Gtk_Icon_View is access all Gtk_Icon_View_RecordTo API docTo spec'Class;

61.        type Gtk_Icon_View_Drop_Position is

62.          (No_Drop,

63.           Drop_Into,

64.           Drop_Left,

65.           Drop_Right,

66.           Drop_Above,

67.           Drop_Below);

68.        --  An enum for determining where a dropped item goes.

69.        --  If Drop_Into, then the drop item replaces the item.

71.        procedure Gtk_NewTo API docTo body    (Icon_View : out Gtk_Icon_ViewTo API docTo spec);

72.        procedure InitializeTo API docTo body (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec'Class);

73.        --  Creates a new Gtk_Icon_View widget

75.        procedure Gtk_New_With_ModelTo API docTo body

76.          (Icon_View : out Gtk_Icon_ViewTo API docTo spec;

77.           Model     : access Gtk.Tree_Model.Gtk_Tree_Model_RecordTo API docTo specTo body'Class);

78.        procedure Initialize_With_ModelTo API docTo body

79.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec'Class;

80.           Model     : access Gtk.Tree_Model.Gtk_Tree_Model_RecordTo API docTo specTo body'Class);

81.        --  Creates a new Gtk_Icon_View widget with the model Model.

83.        function Get_TypeTo API docTo body return GTypeTo API docTo spec;

84.        --  Return the internal type used for a Gtk_Icon_View.

86.        procedure Set_Column_SpacingTo API docTo body

87.          (Icon_View      : access Gtk_Icon_View_RecordTo API docTo spec;

88.           Column_Spacing : Glib.GintTo API docTo spec);

89.        function Get_Column_SpacingTo API docTo body

90.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

91.        --  Sets the ::column-spacing property which specifies the space

92.        --  which is inserted between the columns of the icon view.

94.        procedure Set_ColumnsTo API docTo body

95.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

96.           Columns   : Glib.GintTo API docTo spec);

97.        function Get_ColumnsTo API docTo body

98.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

99.        --  Sets the ::columns property which determines in how many columns the

100.        --  icons are arranged. If Columns is -1, the number of columns will be

101.        --  chosen automatically to fill the available area.

103.        procedure Set_CursorTo API docTo body

104.          (Icon_View     : access Gtk_Icon_View_RecordTo API docTo spec;

105.           Path          : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

106.           Cell          : Gtk.Cell_Renderer.Gtk_Cell_RendererTo API docTo spec := null;

107.           Start_Editing : Boolean := False);

108.        --  Sets the current keyboard focus to be at Path, and selects it. This is

109.        --  useful when you want to focus the user's attention on a particular item.

110.        --   If Cell is not null, then focus is given to the cell specified by it.

111.        --  Additionally, if Start_Editing is True, then editing should be started

112.        --  in the specified cell.

113.        --

114.        --  This function is often followed by Grab_Focus in order to give keyboard

115.        --  focus to the widget.  Please note that editing can only happen when the

116.        --  widget is realized.

118.        procedure Get_CursorTo API docTo body

119.          (Icon_View     : access Gtk_Icon_View_RecordTo API docTo spec;

120.           Path          : out Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

121.           Cell          : out Gtk.Cell_Renderer.Gtk_Cell_RendererTo API docTo spec;

122.           Cursor_Is_Set : out Boolean);

123.        --  Fills in Path and Cell with the current cursor path and cell.

124.        --  If the cursor isn't currently set, then Ppath will be null.

125.        --  If no cell currently has focus, then Cell will be null.

126.        --  The returned Path must be freed with Gtk.Tree_Model.Path_Free.

127.        --  Cursor_Is_Set is set to True if the cursor is set.

129.        procedure Set_Item_WidthTo API docTo body

130.          (Icon_View  : access Gtk_Icon_View_RecordTo API docTo spec;

131.           Item_Width : Glib.GintTo API docTo spec);

132.        function Get_Item_WidthTo API docTo body

133.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

134.        --  Sets the ::item-width property which specifies the width to use for each

135.        --  item. If it is set to -1, the icon view will automatically determine a

136.        --  suitable item size.

138.        procedure Set_MarginTo API docTo body

139.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

140.           Margin    : Glib.GintTo API docTo spec);

141.        function Get_MarginTo API docTo body

142.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

143.        --  Sets the ::margin property which specifies the space which is inserted

144.        --  at the top, bottom, left and right of the icon view.

146.        procedure Set_OrientationTo API docTo body

147.          (Icon_View   : access Gtk_Icon_View_RecordTo API docTo spec;

148.           OrientationTo API docTo body : Gtk.Enums.Gtk_OrientationTo API docTo spec);

149.        function Get_OrientationTo API docTo body

150.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec)

151.           return Gtk.Enums.Gtk_OrientationTo API docTo spec;

152.        --  Sets the ::orientation property which determines whether the labels

153.        --  are drawn beside the icons instead of below.

155.        procedure Set_ReorderableTo API docTo body

156.          (Icon_View   : access Gtk_Icon_View_RecordTo API docTo spec;

157.           Reorderable : Boolean);

158.        function Get_ReorderableTo API docTo body

159.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return Boolean;

160.        --  This function is a convenience function to allow you to reorder models

161.        --  that support the Gtk_Tree_Drag_Source interface and the

162.        --  Gtk_Tree_Drag_Dest interface. Both Gtk_Tree_Store and Gtk_List_Store

163.        --  support these. If Reorderable is True, then the user can reorder the

164.        --  model by dragging and dropping rows. The developer can listen to these

165.        --  changes by connecting to the model's row_inserted and row_deleted

166.        --  signals.

167.        --

168.        --  This function does not give you any degree of control over the order --

169.        --  any reordering is allowed. If more control is needed, you should

170.        --  probably handle drag and drop manually.

172.        procedure Set_Row_SpacingTo API docTo body

173.          (Icon_View   : access Gtk_Icon_View_RecordTo API docTo spec;

174.           Row_Spacing : Glib.GintTo API docTo spec);

175.        function Get_Row_SpacingTo API docTo body

176.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

177.        --  Sets the ::row-spacing property which specifies the space

178.        --  which is inserted between the rows of the icon view.

180.        procedure Set_SpacingTo API docTo body

181.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

182.           Spacing   : Glib.GintTo API docTo spec);

183.        function Get_SpacingTo API docTo body

184.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

185.        --  Sets the ::spacing property which specifies the space

186.        --  which is inserted between the cells (i.e. the icon and

187.        --  the text) of an item.

189.        procedure Item_ActivatedTo API docTo body

190.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

191.           Path      : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec);

192.        --  Activates the item determined by Path.

194.        ---------------

195.        -- Scrolling --

196.        ---------------

198.        procedure Get_Visible_RangeTo API docTo body

199.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

200.           Start_Path : out Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

201.           End_Path   : out Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec);

202.        --  Sets Start_Path and End_Path to be the first and last visible path.

203.        --  Note that there may be invisible paths in between.

204.        --  Both paths should be freed with Path_Free after use.

206.        procedure Scroll_To_PathTo API docTo body

207.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

208.           Path      : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

209.           Use_Align : Boolean := True;

210.           Row_Align : Glib.GfloatTo API docTo spec := 0.5;

211.           Col_Align : Glib.GfloatTo API docTo spec := 0.0);

212.        --  Moves the alignments of Icon_View to the position specified by Path.

213.        --  Row_Align determines where the row is placed, and Col_Align determines

214.        --  where column is placed. Both are expected to be between 0.0 and 1.0.

215.        --  0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5

216.        --  means center.

217.        --

218.        --  If Use_Align is False, then the alignment arguments are ignored, and the

219.        --  tree does the minimum amount of work to scroll the item onto the screen.

220.        --  This means that the item will be scrolled to the edge closest to its

221.        --  current position. If the item is currently visible on the screen,

222.        --  nothing is done.

223.        --

224.        --  This function only works if the model is set, and Path is a valid row on

225.        --  the model. If the model changes before the Icon_View is realized, the

226.        --  centered path will be modified to reflect this change.

228.        --------------

229.        -- Tooltips --

230.        --------------

232.        procedure Set_Tooltip_ColumnTo API docTo body

233.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

234.           Column    : GintTo API docTo spec);

235.        function Get_Tooltip_ColumnTo API docTo body

236.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return GintTo API docTo spec;

237.        --  If you only plan to have simple (text-only) tooltips on full items, you

238.        --  can use Set_Tooltip_Column to have Gtk_Icon_View handle these

239.        --  automatically for you. Column should be set to the column in

240.        --  Icon_View's model containing the tooltip texts, or -1 to disable this

241.        --  feature.

242.        --

243.        --  When enabled, #GtkWidget::has-tooltip will be set to True and

244.        --  Icon_View will connect a #GtkWidget::query-tooltip signal handler.

245.        --

246.        --  Get_Tooltip_Column returns the index of the tooltip column that is

247.        --  currently being used, or -1 if this is disabled.

249.        procedure Get_Tooltip_ContextTo API docTo body

250.          (Icon_View    : access Gtk_Icon_View_RecordTo API docTo spec;

251.           X            : in out GintTo API docTo spec;

252.           Y            : in out GintTo API docTo spec;

253.           Keyboard_Tip : Boolean;

254.           Model        : out Gtk.Tree_Model.Gtk_Tree_ModelTo API docTo spec;

255.           Path         : out Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

256.           IterTo API docTo body         : out Gtk.Tree_Model.Gtk_Tree_IterTo API docTo specTo body;

257.           Success      : out Boolean);

258.        --  Icon_View: a Gtk_Icon_View

259.        --  X: the x coordinate (relative to widget coordinates)

260.        --  Y: the y coordinate (relative to widget coordinates)

261.        --  Keyboard_Tip: whether or not this is a keyboard tooltip

262.        --  Model: a Gtk_Tree_Model

263.        --  Path: a Gtk_Tree_Path

264.        --  Iter: a Gtk_Tree_Iter

265.        --

266.        --  This subprogram is supposed to be used in a #GtkWidget::query-tooltip

267.        --  signal handler for Gtk_Icon_View.  The X, Y and Keyboard_Tip values

268.        --  which are received in the signal handler should be passed to this

269.        --  subprogram without modification.

270.        --

271.        --  The Success value indicates whether there is an icon view item at the

272.        --  given coordinates (True) or not (False) for mouse tooltips. For keyboard

273.        --  tooltips the item returned will be the cursor item. When True, then any

274.        --  of Model, Path and Iter which have been provided will be set to point to

275.        --  that row and the corresponding model. X and Y will always be converted

276.        --  to be relative to Icon_View's bin_window if Keyboard_Tip is False.

278.        procedure Set_Tooltip_CellTo API docTo body

279.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

280.           Tooltip   : access Gtk.Tooltip.Gtk_Tooltip_RecordTo API docTo specTo body'Class;

281.           Path      : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

282.           Cell      : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_RecordTo API docTo specTo body'Class);

283.        --  Sets the tip area of Tooltip to the area which Cell occupies in

284.        --  the item pointed to by Path. See also Gtk.Tooltip.Set_Tip_Area.

285.        --

286.        --  See also Set_Tooltip_Column for a simpler alternative.

288.        procedure Set_Tooltip_ItemTo API docTo body

289.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

290.           Tooltip   : access Gtk.Tooltip.Gtk_Tooltip_RecordTo API docTo specTo body'Class;

291.           Path      : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec);

292.        --  Sets the tip area of Tooltip to be the area covered by the item at Path.

293.        --

294.        --  See also Set_Tooltip_Column for a simpler alternative.

295.        --  See also Gtk.Tooltip.Set_Tip_Area.

297.        ----------------

298.        -- Tree Model --

299.        ----------------

301.        procedure Set_ModelTo API docTo body

302.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

303.           Model     : Gtk.Tree_Model.Gtk_Tree_ModelTo API docTo spec := null);

304.        function Get_ModelTo API docTo body

305.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec)

306.           return Gtk.Tree_Model.Gtk_Tree_ModelTo API docTo spec;

307.        --  Sets the model for a Gtk_Icon_View.  If the Icon_View already has a

308.        --  model set, it will remove it before setting the new model. If Model is

309.        --  null, then it will unset the old model.

311.        procedure Set_Text_ColumnTo API docTo body

312.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

313.           Column    : Glib.GintTo API docTo spec);

314.        function Get_Text_ColumnTo API docTo body

315.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

316.        --  Sets the column with text for Icon_View to be Column. The text

317.        --  column must be of type GType_String.

319.        procedure Set_Pixbuf_ColumnTo API docTo body

320.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec; Column    : Glib.GintTo API docTo spec);

321.        function Get_Pixbuf_ColumnTo API docTo body

322.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

323.        --  Sets the column with pixbufs for Icon_View to be Column. The pixbuf

324.        --  column must be of type Gdk.Pixbuf.Get_Type

326.        procedure Set_Markup_ColumnTo API docTo body

327.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

328.           Column    : Glib.GintTo API docTo spec);

329.        function Get_Markup_ColumnTo API docTo body

330.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

331.        --  Sets the column with markup information for Icon_View to be

332.        --  Column. The markup column must be of type GType_String.

333.        --  If the markup column is set to something, it overrides

334.        --  the text column set by Set_Text_Column.

336.        function Get_Path_At_PosTo API docTo body

337.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

338.           X         : Glib.GintTo API docTo spec;

339.           Y         : Glib.GintTo API docTo spec) return Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

340.        --  Finds the path at the point (X, Y), relative to widget coordinates. See

341.        --  Get_Item_At_Pos, if you are also interested in the cell at the specified

342.        --  position.

344.        procedure Get_Item_At_PosTo API docTo body

345.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

346.           X         : GintTo API docTo spec;

347.           Y         : GintTo API docTo spec;

348.           Path      : out Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

349.           Cell      : out Gtk.Cell_Renderer.Gtk_Cell_RendererTo API docTo spec;

350.           Has_Item  : out Boolean);

351.        --  Finds the path at the point (X, Y), relative to widget coordinates.

352.        --  In contrast to Get_Path_At_Pos, this function also

353.        --  obtains the cell at the specified position. The returned path should

354.        --  be freed with Path_Free.

355.        --  Has_Item is set to True if an item exists at the specified position.

357.        procedure Convert_Widget_To_Bin_Window_CoordsTo API docTo body

358.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

359.           Wx        : GintTo API docTo spec;

360.           Wy        : GintTo API docTo spec;

361.           Bx        : out GintTo API docTo spec;

362.           By        : out GintTo API docTo spec);

363.        --  Icon_View: a Gtk_Icon_View

364.        --  Wx: X coordinate relative to the widget

365.        --  Wy: Y coordinate relative to the widget

366.        --  Bx: bin_window X coordinate

367.        --  By: bin_window Y coordinate

368.        --

369.        --  Converts widget coordinates to coordinates for the bin_window,

370.        --  as expected by e.g. Get_Path_At_Pos.

372.        ---------------

373.        -- Selection --

374.        ---------------

376.        procedure Set_Selection_ModeTo API docTo body

377.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

378.           ModeTo API docTo body      : Gtk.Enums.Gtk_Selection_ModeTo API docTo spec);

379.        function Get_Selection_ModeTo API docTo body

380.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec)

381.           return Gtk.Enums.Gtk_Selection_ModeTo API docTo spec;

382.        --  Sets the selection mode of the Icon_View.

384.        procedure Select_AllTo API docTo body   (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec);

385.        procedure Unselect_AllTo API docTo body (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec);

386.        --  Selects all the icons. Icon_View must has its selection mode set

387.        --  to Selection_Multiple

389.        procedure Select_PathTo API docTo body

390.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

391.           Path      : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec);

392.        procedure Unselect_PathTo API docTo body

393.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

394.           Path      : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec);

395.        --  Selects the row at Path.

397.        function Get_Selected_ItemsTo API docTo body

398.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec)

399.           return Gtk.Tree_Model.Gtk_Tree_Path_List.GlistTo API docTo specTo body;

400.        --  Creates a list of paths of all selected items. Additionally, if you are

401.        --  planning on modifying the model after calling this function, you may

402.        --  want to convert the returned list into a list of Gtk_Tree_Row_Reference.

403.        --  To free the returend value, use:

404.        --      Foreach (List, Gtk.Tree_Model.Path_Free, Null);

405.        --      Free (List);

407.        function Path_Is_SelectedTo API docTo body

408.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

409.           Path      : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec) return Boolean;

410.        --  Returns True if the icon pointed to by Path is currently

411.        --  selected. If Path does not point to a valid location, False is returned.

413.        -------------------

414.        -- Drag and drop --

415.        -------------------

417.        function Create_Drag_IconTo API docTo body

418.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

419.           Path      : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec) return Gdk.Gdk_PixmapTo API docTo spec;

420.        --  Creates a Gdk_Pixmap representation of the item at Path.

421.        --  This image is used for a drag icon.

422.        --  The returned value must be Unref'd by the caller.

424.        procedure Enable_Model_Drag_DestTo API docTo body

425.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

426.           Targets   : Gtk.Selection.Target_Entry_ArrayTo API docTo spec;

427.           Actions   : Gdk.Dnd.Drag_ActionTo API docTo spec);

428.        procedure Unset_Model_Drag_DestTo API docTo body

429.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec);

430.        --  Turns Icon_view into a drop destination for automatic DND.

431.        --  Targets is the list of targets that the drag will support.

433.        procedure Enable_Model_Drag_SourceTo API docTo body

434.          (Icon_View         : access Gtk_Icon_View_RecordTo API docTo spec;

435.           Start_Button_Mask : Gdk.Types.Gdk_Modifier_TypeTo API docTo spec;

436.           Targets           : Gtk.Selection.Target_Entry_ArrayTo API docTo spec;

437.           Actions           : Gdk.Dnd.Drag_ActionTo API docTo spec);

438.        procedure Unset_Model_Drag_SourceTo API docTo body

439.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec);

440.        --  Turns Icon_view into a drag source for automatic DND.

441.        --  Start_Button_Mask is the allowed buttons to start drag.

443.        procedure Get_Dest_Item_At_PosTo API docTo body

444.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

445.           Drag_X    : Glib.GintTo API docTo spec;

446.           Drag_Y    : Glib.GintTo API docTo spec;

447.           Path      : out Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

448.           PosTo API docTo body       : out Gtk_Icon_View_Drop_PositionTo API docTo spec;

449.           Has_Item  : out Boolean);

450.        --  Determines the destination item for a given position.

451.        --  Return value: whether there is an item at the given position.

453.        procedure Set_Drag_Dest_ItemTo API docTo body

454.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

455.           Path      : Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

456.           PosTo API docTo body       : Gtk_Icon_View_Drop_PositionTo API docTo spec);

457.        procedure Get_Drag_Dest_ItemTo API docTo body

458.          (Icon_View : access Gtk_Icon_View_RecordTo API docTo spec;

459.           Path      : out Gtk.Tree_Model.Gtk_Tree_PathTo API docTo spec;

460.           PosTo API docTo body       : out Gtk_Icon_View_Drop_PositionTo API docTo spec);

461.        --  Sets the item that is highlighted for feedback.

463.        ----------------

464.        -- Interfaces --

465.        ----------------

466.        --  This class implements several interfaces. See Glib.Types

467.        --

468.        --  - "Gtk_Cell_Layout"

470.        package Implements_Cell_Layout is new Glib.Types.ImplementsTo API docTo specTo body

471.          (Gtk.Cell_Layout.Gtk_Cell_LayoutTo API docTo spec, Gtk_Icon_View_RecordTo API docTo spec, Gtk_Icon_ViewTo API docTo spec);

472.        function "+"

473.          (Widget : access Gtk_Icon_View_RecordTo API docTo spec'Class)

474.           return Gtk.Cell_Layout.Gtk_Cell_LayoutTo API docTo spec

475.           renames Implements_Cell_Layout.To_InterfaceTo API docTo specTo body;

476.        function "-"

477.          (Interf : Gtk.Cell_Layout.Gtk_Cell_LayoutTo API docTo spec)

478.           return Gtk_Icon_ViewTo API docTo spec

479.           renames Implements_Cell_Layout.To_ObjectTo API docTo specTo body;

480.        --  Converts to and from the Gtk_Cell_Layout interface

482.        ----------------

483.        -- Properties --

484.        ----------------

486.        --  <properties>

487.        --  The following properties are defined for this widget. See

488.        --  Glib.Properties for more information on properties.

489.        --

490.        --  Name:  Column_Spacing_Property

491.        --  Type:  Int

492.        --  Descr: Space which is inserted between grid column

493.        --

494.        --  Name:  Columns_Property

495.        --  Type:  Int

496.        --  Descr: Number of columns to display

497.        --

498.        --  Name:  Item_Width_Property

499.        --  Type:  Int

500.        --  Descr: The width used for each item

501.        --

502.        --  Name:  Margin_Property

503.        --  Type:  Int

504.        --  Descr: Space which is inserted at the edges of the icon view

505.        --

506.        --  Name:  Markup_Column_Property

507.        --  Type:  Int

508.        --  Descr: Model column used to retrieve the text if using Pango markup

509.        --

510.        --  Name:  Model_Property

511.        --  Type:  Object

512.        --  Descr: The model for the icon view

513.        --

514.        --  Name:  Orientation_Property

515.        --  Type:  Enum

516.        --  Descr: How the text and icon of each item are positioned relative to

517.        --         each other

518.        --

519.        --  Name:  Pixbuf_Column_Property

520.        --  Type:  Int

521.        --  Descr: Model column used to retrieve the icon pixbuf from

522.        --

523.        --  Name:  Reorderable_Property

524.        --  Type:  Boolean

525.        --  Descr: View is reorderable

526.        --

527.        --  Name:  Row_Spacing_Property

528.        --  Type:  Int

529.        --  Descr: Space which is inserted between grid rows

530.        --

531.        --  Name:  Selection_Mode_Property

532.        --  Type:  Enum

533.        --  Descr: The selection mode

534.        --

535.        --  Name:  Spacing_Property

536.        --  Type:  Int

537.        --  Descr: Space which is inserted between cells of an item

538.        --

539.        --  Name:  Text_Column_Property

540.        --  Type:  Int

541.        --  Descr: Model column used to retrieve the text from

542.        --

543.        --  Name:  Tooltip_Column_Property

544.        --  Type:  Int

545.        --  Descr: The column in the model containing the tooltip texts for

546.        --         the items

547.        --

548.        --  </properties>

550.        Column_Spacing_Property : constant Glib.Properties.Property_IntTo API docTo spec;

551.        Columns_Property        : constant Glib.Properties.Property_IntTo API docTo spec;

552.        Item_Width_Property     : constant Glib.Properties.Property_IntTo API docTo spec;

553.        Margin_Property         : constant Glib.Properties.Property_IntTo API docTo spec;

554.        Markup_Column_Property  : constant Glib.Properties.Property_IntTo API docTo spec;

555.        Model_Property          : constant Glib.Properties.Property_ObjectTo API docTo spec;

556.        Orientation_Property    : constant Gtk.Enums.Property_Gtk_OrientationTo API docTo spec;

557.        Pixbuf_Column_Property  : constant Glib.Properties.Property_IntTo API docTo spec;

558.        Reorderable_Property    : constant Glib.Properties.Property_BooleanTo API docTo spec;

559.        Row_Spacing_Property    : constant Glib.Properties.Property_IntTo API docTo spec;

560.        --  Selection_Mode_Property : constant Glib.Properties.Property_Enum;

561.        Spacing_Property        : constant Glib.Properties.Property_IntTo API docTo spec;

562.        Text_Column_Property    : constant Glib.Properties.Property_IntTo API docTo spec;

563.        Tooltip_Column_Property : constant Glib.Properties.Property_IntTo API docTo spec;

565.        ----------------------

566.        -- Style Properties --

567.        ----------------------

568.        --  The following properties can be changed through the gtk theme and

569.        --  configuration files, and retrieved through Gtk.Widget.Style_Get_Property

570.        --

571.        --  <style_properties>

572.        --  Name:  Selection_Box_Alpha_Property

573.        --  Type:  Uchar

574.        --  Descr: Opacity of the selection box

575.        --

576.        --  Name:  Selection_Box_Color_Property

577.        --  Type:  Boxed

578.        --  Descr: Color of the selection box

579.        --

581.        Selection_Box_Alpha_Property : constant Glib.Properties.Property_UcharTo API docTo spec;

582.        Selection_Box_Color_Property : constant Gdk.Color.Property_Gdk_ColorTo API docTo spec;

584.        -------------

585.        -- Signals --

586.        -------------

588.        --  <signals>

589.        --  The following new signals are defined for this widget:

590.        --

591.        --  - "activate_cursor_item"

592.        --  - "item_activated"

593.        --  - "move_cursor"

594.        --  - "select_all"

595.        --  - "select_cursor_item"

596.        --  - "selection_changed"

597.        --  - "set_scroll_adjustments"

598.        --  - "toggle_cursor_item"

599.        --  - "unselect_all"

600.        --  </signals>

602.        Signal_Activate_Cursor_Item   : constant Glib.Signal_NameTo API docTo spec :=

603.                                          "activate_cursor_item";

604.        Signal_Item_Activated         : constant Glib.Signal_NameTo API docTo spec :=

605.                                          "item_activated";

606.        Signal_Move_Cursor            : constant Glib.Signal_NameTo API docTo spec :=

607.                                          "move_cursor";

608.        Signal_Select_All             : constant Glib.Signal_NameTo API docTo spec :=

609.                                          "select_all";

610.        Signal_Select_Cursor_Item     : constant Glib.Signal_NameTo API docTo spec :=

611.                                          "select_cursor_item";

612.        Signal_Selection_Changed      : constant Glib.Signal_NameTo API docTo spec :=

613.                                          "selection_changed";

614.        Signal_Set_Scroll_Adjustments : constant Glib.Signal_NameTo API docTo spec :=

615.                                          "set_scroll_adjustments";

616.        Signal_Toggle_Cursor_Item     : constant Glib.Signal_NameTo API docTo spec :=

617.                                          "toggle_cursor_item";

618.        Signal_Unselect_All           : constant Glib.Signal_NameTo API docTo spec :=

619.                                          "unselect_all";

621.     private

623.        Selection_Box_Alpha_PropertyTo API docTo spec : constant Glib.Properties.Property_UcharTo API docTo spec :=

624.          Glib.Properties.BuildTo API docTo specTo body ("selection-box-alpha");

625.        Selection_Box_Color_PropertyTo API docTo spec : constant Gdk.Color.Property_Gdk_ColorTo API docTo spec :=

626.          Gdk.Color.Property_Gdk_ColorTo API docTo spec (Glib.BuildTo API docTo specTo body ("selection-box-color"));

628.        Column_Spacing_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

629.          Glib.Properties.BuildTo API docTo specTo body ("column-spacing");

630.        Columns_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

631.          Glib.Properties.BuildTo API docTo specTo body ("columns");

632.        Item_Width_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

633.          Glib.Properties.BuildTo API docTo specTo body ("item-width");

634.        Margin_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

635.          Glib.Properties.BuildTo API docTo specTo body ("margin");

636.        Markup_Column_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

637.          Glib.Properties.BuildTo API docTo specTo body ("markup-column");

638.        Model_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

639.          Glib.Properties.BuildTo API docTo specTo body ("model");

640.        Orientation_PropertyTo API docTo spec    : constant Gtk.Enums.Property_Gtk_OrientationTo API docTo spec :=

641.          Gtk.Enums.Property_Gtk_OrientationTo API docTo spec (Glib.BuildTo API docTo specTo body ("orientation"));

642.        Pixbuf_Column_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

643.          Glib.Properties.BuildTo API docTo specTo body ("pixbuf-column");

644.        Reorderable_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

645.          Glib.Properties.BuildTo API docTo specTo body ("reorderable");

646.        Row_Spacing_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

647.          Glib.Properties.BuildTo API docTo specTo body ("row-spacing");

648.     --     Selection_Mode_Property : constant Glib.Properties.Property_Enum :=

649.     --     Glib.Properties.Build ("selection-mode");

650.        Spacing_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

651.          Glib.Properties.BuildTo API docTo specTo body ("spacing");

652.        Text_Column_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

653.          Glib.Properties.BuildTo API docTo specTo body ("text-column");

654.        Tooltip_Column_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

655.          Glib.Properties.BuildTo API docTo specTo body ("tooltip-column");

657.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_icon_view_get_type");

659.     end Gtk.Icon_ViewTo API docTo specTo body;

661.     --  binding might be useful later:

662.     --  No binding: gtk_icon_view_selected_foreach