~ubuntu-branches/ubuntu/intrepid/libgtkada2/intrepid

« back to all changes in this revision

Viewing changes to src/gtk-icon_view.ads

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-08-11 09:46:51 UTC
  • mfrom: (6.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20080811094651-9mjd6acwa98ffw5c
Tags: 2.12.0-2ubuntu1
Add lpia to supported architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-----------------------------------------------------------------------
 
2
--              GtkAda - Ada95 binding for Gtk+/Gnome                --
 
3
--                                                                   --
 
4
--                Copyright (C) 2006-2007 AdaCore                    --
 
5
--                                                                   --
 
6
-- This library is free software; you can redistribute it and/or     --
 
7
-- modify it under the terms of the GNU General Public               --
 
8
-- License as published by the Free Software Foundation; either      --
 
9
-- version 2 of the License, or (at your option) any later version.  --
 
10
--                                                                   --
 
11
-- This library is distributed in the hope that it will be useful,   --
 
12
-- but WITHOUT ANY WARRANTY; without even the implied warranty of    --
 
13
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --
 
14
-- General Public License for more details.                          --
 
15
--                                                                   --
 
16
-- You should have received a copy of the GNU General Public         --
 
17
-- License along with this library; if not, write to the             --
 
18
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --
 
19
-- Boston, MA 02111-1307, USA.                                       --
 
20
--                                                                   --
 
21
-----------------------------------------------------------------------
 
22
 
 
23
--  <description>
 
24
--  Gtk_Icon_View provides an alternative view on a list model. It displays the
 
25
--  model as a grid of icons with labels. Like Gtk_Tree_View, it allows to
 
26
--  select one or multiple items (depending on the selection mode, see
 
27
--  Set_Selection_Mode). In addition to selection with the arrow keys,
 
28
--  Gtk_Icon_View supports rubberband selection, which is controlled by
 
29
--  dragging the pointer.
 
30
--  </description>
 
31
--  <c_version>2.8.17</c_version>
 
32
--  <group>Trees and Lists</group>
 
33
--  <screenshot>icon-view</screenshot>
 
34
--  <testgtk>create_icon_view.adb</testgtk>
 
35
 
 
36
with Glib.Types;
 
37
with Gdk.Color;
 
38
with Gdk.Dnd;
 
39
with Gdk.Types;
 
40
with Glib.Properties;
 
41
with Gtk.Cell_Layout;
 
42
with Gtk.Cell_Renderer;
 
43
with Gtk.Container;
 
44
with Gtk.Enums;
 
45
with Gtk.Selection;
 
46
with Gtk.Tree_Model;
 
47
 
 
48
package Gtk.Icon_View is
 
49
 
 
50
   type Gtk_Icon_View_Record is new Gtk.Container.Gtk_Container_Record with
 
51
     null record;
 
52
   type Gtk_Icon_View is access all Gtk_Icon_View_Record'Class;
 
53
 
 
54
   type Gtk_Icon_View_Drop_Position is
 
55
     (No_Drop,
 
56
      Drop_Into,
 
57
      Drop_Left,
 
58
      Drop_Right,
 
59
      Drop_Above,
 
60
      Drop_Below);
 
61
   --  An enum for determining where a dropped item goes.
 
62
   --  If Drop_Into, then the drop item replaces the item.
 
63
 
 
64
   procedure Gtk_New    (Icon_View : out Gtk_Icon_View);
 
65
   procedure Initialize (Icon_View : access Gtk_Icon_View_Record'Class);
 
66
   --  Creates a new Gtk_Icon_View widget
 
67
 
 
68
   procedure Gtk_New_With_Model
 
69
     (Icon_View : out Gtk_Icon_View;
 
70
      Model     : access Gtk.Tree_Model.Gtk_Tree_Model_Record'Class);
 
71
   procedure Initialize_With_Model
 
72
     (Icon_View : access Gtk_Icon_View_Record'Class;
 
73
      Model     : access Gtk.Tree_Model.Gtk_Tree_Model_Record'Class);
 
74
   --  Creates a new Gtk_Icon_View widget with the model Model.
 
75
 
 
76
   function Get_Type return GType;
 
77
   --  Return the internal type used for a Gtk_Icon_View.
 
78
 
 
79
   procedure Set_Column_Spacing
 
80
     (Icon_View      : access Gtk_Icon_View_Record;
 
81
      Column_Spacing : Glib.Gint);
 
82
   function Get_Column_Spacing
 
83
     (Icon_View : access Gtk_Icon_View_Record) return Glib.Gint;
 
84
   --  Sets the ::column-spacing property which specifies the space
 
85
   --  which is inserted between the columns of the icon view.
 
86
 
 
87
   procedure Set_Columns
 
88
     (Icon_View : access Gtk_Icon_View_Record;
 
89
      Columns   : Glib.Gint);
 
90
   function Get_Columns
 
91
     (Icon_View : access Gtk_Icon_View_Record) return Glib.Gint;
 
92
   --  Sets the ::columns property which determines in how many columns the
 
93
   --  icons are arranged. If Columns is -1, the number of columns will be
 
94
   --  chosen automatically to fill the available area.
 
95
 
 
96
   procedure Set_Cursor
 
97
     (Icon_View     : access Gtk_Icon_View_Record;
 
98
      Path          : Gtk.Tree_Model.Gtk_Tree_Path;
 
99
      Cell          : Gtk.Cell_Renderer.Gtk_Cell_Renderer := null;
 
100
      Start_Editing : Boolean := False);
 
101
   --  Sets the current keyboard focus to be at Path, and selects it. This is
 
102
   --  useful when you want to focus the user's attention on a particular item.
 
103
   --   If Cell is not null, then focus is given to the cell specified by it.
 
104
   --  Additionally, if Start_Editing is True, then editing should be started
 
105
   --  in the specified cell.
 
106
   --
 
107
   --  This function is often followed by Grab_Focus in order to give keyboard
 
108
   --  focus to the widget.  Please note that editing can only happen when the
 
109
   --  widget is realized.
 
110
 
 
111
   procedure Get_Cursor
 
112
     (Icon_View     : access Gtk_Icon_View_Record;
 
113
      Path          : out Gtk.Tree_Model.Gtk_Tree_Path;
 
114
      Cell          : out Gtk.Cell_Renderer.Gtk_Cell_Renderer;
 
115
      Cursor_Is_Set : out Boolean);
 
116
   --  Fills in Path and Cell with the current cursor path and cell.
 
117
   --  If the cursor isn't currently set, then Ppath will be null.
 
118
   --  If no cell currently has focus, then Cell will be null.
 
119
   --  The returned Path must be freed with Gtk.Tree_Model.Path_Free.
 
120
   --  Cursor_Is_Set is set to True if the cursor is set.
 
121
 
 
122
   procedure Set_Item_Width
 
123
     (Icon_View  : access Gtk_Icon_View_Record;
 
124
      Item_Width : Glib.Gint);
 
125
   function Get_Item_Width
 
126
     (Icon_View : access Gtk_Icon_View_Record) return Glib.Gint;
 
127
   --  Sets the ::item-width property which specifies the width to use for each
 
128
   --  item. If it is set to -1, the icon view will automatically determine a
 
129
   --  suitable item size.
 
130
 
 
131
   procedure Set_Margin
 
132
     (Icon_View : access Gtk_Icon_View_Record;
 
133
      Margin    : Glib.Gint);
 
134
   function Get_Margin
 
135
     (Icon_View : access Gtk_Icon_View_Record) return Glib.Gint;
 
136
   --  Sets the ::margin property which specifies the space which is inserted
 
137
   --  at the top, bottom, left and right of the icon view.
 
138
 
 
139
   procedure Set_Orientation
 
140
     (Icon_View   : access Gtk_Icon_View_Record;
 
141
      Orientation : Gtk.Enums.Gtk_Orientation);
 
142
   function Get_Orientation
 
143
     (Icon_View : access Gtk_Icon_View_Record)
 
144
      return Gtk.Enums.Gtk_Orientation;
 
145
   --  Sets the ::orientation property which determines whether the labels
 
146
   --  are drawn beside the icons instead of below.
 
147
 
 
148
   procedure Set_Reorderable
 
149
     (Icon_View   : access Gtk_Icon_View_Record;
 
150
      Reorderable : Boolean);
 
151
   function Get_Reorderable
 
152
     (Icon_View : access Gtk_Icon_View_Record) return Boolean;
 
153
   --  This function is a convenience function to allow you to reorder models
 
154
   --  that support the Gtk_Tree_Drag_Source interface and the
 
155
   --  Gtk_Tree_Drag_Dest interface. Both Gtk_Tree_Store and Gtk_List_Store
 
156
   --  support these. If Reorderable is True, then the user can reorder the
 
157
   --  model by dragging and dropping rows. The developer can listen to these
 
158
   --  changes by connecting to the model's row_inserted and row_deleted
 
159
   --  signals.
 
160
   --
 
161
   --  This function does not give you any degree of control over the order --
 
162
   --  any reordering is allowed. If more control is needed, you should
 
163
   --  probably handle drag and drop manually.
 
164
 
 
165
   procedure Set_Row_Spacing
 
166
     (Icon_View   : access Gtk_Icon_View_Record;
 
167
      Row_Spacing : Glib.Gint);
 
168
   function Get_Row_Spacing
 
169
     (Icon_View : access Gtk_Icon_View_Record) return Glib.Gint;
 
170
   --  Sets the ::row-spacing property which specifies the space
 
171
   --  which is inserted between the rows of the icon view.
 
172
 
 
173
   procedure Set_Spacing
 
174
     (Icon_View : access Gtk_Icon_View_Record;
 
175
      Spacing   : Glib.Gint);
 
176
   function Get_Spacing
 
177
     (Icon_View : access Gtk_Icon_View_Record) return Glib.Gint;
 
178
   --  Sets the ::spacing property which specifies the space
 
179
   --  which is inserted between the cells (i.e. the icon and
 
180
   --  the text) of an item.
 
181
 
 
182
   procedure Item_Activated
 
183
     (Icon_View : access Gtk_Icon_View_Record;
 
184
      Path      : Gtk.Tree_Model.Gtk_Tree_Path);
 
185
   --  Activates the item determined by Path.
 
186
 
 
187
   ---------------
 
188
   -- Scrolling --
 
189
   ---------------
 
190
 
 
191
   procedure Get_Visible_Range
 
192
     (Icon_View : access Gtk_Icon_View_Record;
 
193
      Start_Path : out Gtk.Tree_Model.Gtk_Tree_Path;
 
194
      End_Path   : out Gtk.Tree_Model.Gtk_Tree_Path);
 
195
   --  Sets Start_Path and End_Path to be the first and last visible path.
 
196
   --  Note that there may be invisible paths in between.
 
197
   --  Both paths should be freed with Path_Free after use.
 
198
 
 
199
   procedure Scroll_To_Path
 
200
     (Icon_View : access Gtk_Icon_View_Record;
 
201
      Path      : Gtk.Tree_Model.Gtk_Tree_Path;
 
202
      Use_Align : Boolean := True;
 
203
      Row_Align : Glib.Gfloat := 0.5;
 
204
      Col_Align : Glib.Gfloat := 0.0);
 
205
   --  Moves the alignments of Icon_View to the position specified by Path.
 
206
   --  Row_Align determines where the row is placed, and Col_Align determines
 
207
   --  where column is placed. Both are expected to be between 0.0 and 1.0.
 
208
   --  0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5
 
209
   --  means center.
 
210
   --
 
211
   --  If Use_Align is False, then the alignment arguments are ignored, and the
 
212
   --  tree does the minimum amount of work to scroll the item onto the screen.
 
213
   --  This means that the item will be scrolled to the edge closest to its
 
214
   --  current position. If the item is currently visible on the screen,
 
215
   --  nothing is done.
 
216
   --
 
217
   --  This function only works if the model is set, and Path is a valid row on
 
218
   --  the model. If the model changes before the Icon_View is realized, the
 
219
   --  centered path will be modified to reflect this change.
 
220
 
 
221
   ----------------
 
222
   -- Tree Model --
 
223
   ----------------
 
224
 
 
225
   procedure Set_Model
 
226
     (Icon_View : access Gtk_Icon_View_Record;
 
227
      Model     : Gtk.Tree_Model.Gtk_Tree_Model := null);
 
228
   function Get_Model
 
229
     (Icon_View : access Gtk_Icon_View_Record)
 
230
      return Gtk.Tree_Model.Gtk_Tree_Model;
 
231
   --  Sets the model for a Gtk_Icon_View.  If the Icon_View already has a
 
232
   --  model set, it will remove it before setting the new model. If Model is
 
233
   --  null, then it will unset the old model.
 
234
 
 
235
   procedure Set_Text_Column
 
236
     (Icon_View : access Gtk_Icon_View_Record;
 
237
      Column    : Glib.Gint);
 
238
   function Get_Text_Column
 
239
     (Icon_View : access Gtk_Icon_View_Record) return Glib.Gint;
 
240
   --  Sets the column with text for Icon_View to be Column. The text
 
241
   --  column must be of type GType_String.
 
242
 
 
243
   procedure Set_Pixbuf_Column
 
244
     (Icon_View : access Gtk_Icon_View_Record; Column    : Glib.Gint);
 
245
   function Get_Pixbuf_Column
 
246
     (Icon_View : access Gtk_Icon_View_Record) return Glib.Gint;
 
247
   --  Sets the column with pixbufs for Icon_View to be Column. The pixbuf
 
248
   --  column must be of type Gdk.Pixbuf.Get_Type
 
249
 
 
250
   procedure Set_Markup_Column
 
251
     (Icon_View : access Gtk_Icon_View_Record;
 
252
      Column    : Glib.Gint);
 
253
   function Get_Markup_Column
 
254
     (Icon_View : access Gtk_Icon_View_Record) return Glib.Gint;
 
255
   --  Sets the column with markup information for Icon_View to be
 
256
   --  Column. The markup column must be of type GType_String.
 
257
   --  If the markup column is set to something, it overrides
 
258
   --  the text column set by Set_Text_Column.
 
259
 
 
260
   function Get_Path_At_Pos
 
261
     (Icon_View : access Gtk_Icon_View_Record;
 
262
      X         : Glib.Gint;
 
263
      Y         : Glib.Gint) return Gtk.Tree_Model.Gtk_Tree_Path;
 
264
   --  Finds the path at the point (X, Y), relative to widget coordinates. See
 
265
   --  Get_Item_At_Pos, if you are also interested in the cell at the specified
 
266
   --  position.
 
267
 
 
268
   procedure Get_Item_At_Pos
 
269
     (Icon_View : access Gtk_Icon_View_Record;
 
270
      X         : Gint;
 
271
      Y         : Gint;
 
272
      Path      : out Gtk.Tree_Model.Gtk_Tree_Path;
 
273
      Cell      : out Gtk.Cell_Renderer.Gtk_Cell_Renderer;
 
274
      Has_Item  : out Boolean);
 
275
   --  Finds the path at the point (X, Y), relative to widget coordinates.
 
276
   --  In contrast to Get_Path_At_Pos, this function also
 
277
   --  obtains the cell at the specified position. The returned path should
 
278
   --  be freed with Path_Free.
 
279
   --  Has_Item is set to True if an item exists at the specified position.
 
280
 
 
281
   ---------------
 
282
   -- Selection --
 
283
   ---------------
 
284
 
 
285
   procedure Set_Selection_Mode
 
286
     (Icon_View : access Gtk_Icon_View_Record;
 
287
      Mode      : Gtk.Enums.Gtk_Selection_Mode);
 
288
   function Get_Selection_Mode
 
289
     (Icon_View : access Gtk_Icon_View_Record)
 
290
      return Gtk.Enums.Gtk_Selection_Mode;
 
291
   --  Sets the selection mode of the Icon_View.
 
292
 
 
293
   procedure Select_All   (Icon_View : access Gtk_Icon_View_Record);
 
294
   procedure Unselect_All (Icon_View : access Gtk_Icon_View_Record);
 
295
   --  Selects all the icons. Icon_View must has its selection mode set
 
296
   --  to Selection_Multiple
 
297
 
 
298
   procedure Select_Path
 
299
     (Icon_View : access Gtk_Icon_View_Record;
 
300
      Path      : Gtk.Tree_Model.Gtk_Tree_Path);
 
301
   procedure Unselect_Path
 
302
     (Icon_View : access Gtk_Icon_View_Record;
 
303
      Path      : Gtk.Tree_Model.Gtk_Tree_Path);
 
304
   --  Selects the row at Path.
 
305
 
 
306
   function Get_Selected_Items
 
307
     (Icon_View : access Gtk_Icon_View_Record)
 
308
      return Gtk.Tree_Model.Gtk_Tree_Path_List.Glist;
 
309
   --  Creates a list of paths of all selected items. Additionally, if you are
 
310
   --  planning on modifying the model after calling this function, you may
 
311
   --  want to convert the returned list into a list of Gtk_Tree_Row_Reference.
 
312
   --  To free the returend value, use:
 
313
   --      Foreach (List, Gtk.Tree_Model.Path_Free, Null);
 
314
   --      Free (List);
 
315
 
 
316
   function Path_Is_Selected
 
317
     (Icon_View : access Gtk_Icon_View_Record;
 
318
      Path      : Gtk.Tree_Model.Gtk_Tree_Path) return Boolean;
 
319
   --  Returns True if the icon pointed to by Path is currently
 
320
   --  selected. If Path does not point to a valid location, False is returned.
 
321
 
 
322
   -------------------
 
323
   -- Drag and drop --
 
324
   -------------------
 
325
 
 
326
   function Create_Drag_Icon
 
327
     (Icon_View : access Gtk_Icon_View_Record;
 
328
      Path      : Gtk.Tree_Model.Gtk_Tree_Path) return Gdk.Gdk_Pixmap;
 
329
   --  Creates a Gdk_Pixmap representation of the item at Path.
 
330
   --  This image is used for a drag icon.
 
331
   --  The returned value must be Unref'd by the caller.
 
332
 
 
333
   procedure Enable_Model_Drag_Dest
 
334
     (Icon_View : access Gtk_Icon_View_Record;
 
335
      Targets   : Gtk.Selection.Target_Entry_Array;
 
336
      Actions   : Gdk.Dnd.Drag_Action);
 
337
   procedure Unset_Model_Drag_Dest
 
338
     (Icon_View : access Gtk_Icon_View_Record);
 
339
   --  Turns Icon_view into a drop destination for automatic DND.
 
340
   --  Targets is the list of targets that the drag will support.
 
341
 
 
342
   procedure Enable_Model_Drag_Source
 
343
     (Icon_View         : access Gtk_Icon_View_Record;
 
344
      Start_Button_Mask : Gdk.Types.Gdk_Modifier_Type;
 
345
      Targets           : Gtk.Selection.Target_Entry_Array;
 
346
      Actions           : Gdk.Dnd.Drag_Action);
 
347
   procedure Unset_Model_Drag_Source
 
348
     (Icon_View : access Gtk_Icon_View_Record);
 
349
   --  Turns Icon_view into a drag source for automatic DND.
 
350
   --  Start_Button_Mask is the allowed buttons to start drag.
 
351
 
 
352
   procedure Get_Dest_Item_At_Pos
 
353
     (Icon_View : access Gtk_Icon_View_Record;
 
354
      Drag_X    : Glib.Gint;
 
355
      Drag_Y    : Glib.Gint;
 
356
      Path      : out Gtk.Tree_Model.Gtk_Tree_Path;
 
357
      Pos       : out Gtk_Icon_View_Drop_Position;
 
358
      Has_Item  : out Boolean);
 
359
   --  Determines the destination item for a given position.
 
360
   --  Return value: whether there is an item at the given position.
 
361
 
 
362
   procedure Set_Drag_Dest_Item
 
363
     (Icon_View : access Gtk_Icon_View_Record;
 
364
      Path      : Gtk.Tree_Model.Gtk_Tree_Path;
 
365
      Pos       : Gtk_Icon_View_Drop_Position);
 
366
   procedure Get_Drag_Dest_Item
 
367
     (Icon_View : access Gtk_Icon_View_Record;
 
368
      Path      : out Gtk.Tree_Model.Gtk_Tree_Path;
 
369
      Pos       : out Gtk_Icon_View_Drop_Position);
 
370
   --  Sets the item that is highlighted for feedback.
 
371
 
 
372
   ----------------
 
373
   -- Interfaces --
 
374
   ----------------
 
375
   --  This class implements several interfaces. See Glib.Types
 
376
   --
 
377
   --  - "Gtk_Cell_Layout"
 
378
 
 
379
   package Implements_Cell_Layout is new Glib.Types.Implements
 
380
     (Gtk.Cell_Layout.Gtk_Cell_Layout, Gtk_Icon_View_Record, Gtk_Icon_View);
 
381
   function "+"
 
382
     (Widget : access Gtk_Icon_View_Record'Class)
 
383
      return Gtk.Cell_Layout.Gtk_Cell_Layout
 
384
      renames Implements_Cell_Layout.To_Interface;
 
385
   function "-"
 
386
     (Interf : Gtk.Cell_Layout.Gtk_Cell_Layout)
 
387
      return Gtk_Icon_View
 
388
      renames Implements_Cell_Layout.To_Object;
 
389
   --  Converts to and from the Gtk_Cell_Layout interface
 
390
 
 
391
   ----------------
 
392
   -- Properties --
 
393
   ----------------
 
394
 
 
395
   --  <properties>
 
396
   --  The following properties are defined for this widget. See
 
397
   --  Glib.Properties for more information on properties.
 
398
   --
 
399
   --  Name:  Column_Spacing_Property
 
400
   --  Type:  Int
 
401
   --  Descr: Space which is inserted between grid column
 
402
   --
 
403
   --  Name:  Columns_Property
 
404
   --  Type:  Int
 
405
   --  Descr: Number of columns to display
 
406
   --
 
407
   --  Name:  Item_Width_Property
 
408
   --  Type:  Int
 
409
   --  Descr: The width used for each item
 
410
   --
 
411
   --  Name:  Margin_Property
 
412
   --  Type:  Int
 
413
   --  Descr: Space which is inserted at the edges of the icon view
 
414
   --
 
415
   --  Name:  Markup_Column_Property
 
416
   --  Type:  Int
 
417
   --  Descr: Model column used to retrieve the text if using Pango markup
 
418
   --
 
419
   --  Name:  Model_Property
 
420
   --  Type:  Object
 
421
   --  Descr: The model for the icon view
 
422
   --
 
423
   --  Name:  Orientation_Property
 
424
   --  Type:  Enum
 
425
   --  Descr: How the text and icon of each item are positioned relative to
 
426
   --         each other
 
427
   --
 
428
   --  Name:  Pixbuf_Column_Property
 
429
   --  Type:  Int
 
430
   --  Descr: Model column used to retrieve the icon pixbuf from
 
431
   --
 
432
   --  Name:  Reorderable_Property
 
433
   --  Type:  Boolean
 
434
   --  Descr: View is reorderable
 
435
   --
 
436
   --  Name:  Row_Spacing_Property
 
437
   --  Type:  Int
 
438
   --  Descr: Space which is inserted between grid rows
 
439
   --
 
440
   --  Name:  Selection_Mode_Property
 
441
   --  Type:  Enum
 
442
   --  Descr: The selection mode
 
443
   --
 
444
   --  Name:  Spacing_Property
 
445
   --  Type:  Int
 
446
   --  Descr: Space which is inserted between cells of an item
 
447
   --
 
448
   --  Name:  Text_Column_Property
 
449
   --  Type:  Int
 
450
   --  Descr: Model column used to retrieve the text from
 
451
   --
 
452
   --  </properties>
 
453
 
 
454
   Column_Spacing_Property : constant Glib.Properties.Property_Int;
 
455
   Columns_Property        : constant Glib.Properties.Property_Int;
 
456
   Item_Width_Property     : constant Glib.Properties.Property_Int;
 
457
   Margin_Property         : constant Glib.Properties.Property_Int;
 
458
   Markup_Column_Property  : constant Glib.Properties.Property_Int;
 
459
   Model_Property          : constant Glib.Properties.Property_Object;
 
460
   Orientation_Property    : constant Gtk.Enums.Property_Gtk_Orientation;
 
461
   Pixbuf_Column_Property  : constant Glib.Properties.Property_Int;
 
462
   Reorderable_Property    : constant Glib.Properties.Property_Boolean;
 
463
   Row_Spacing_Property    : constant Glib.Properties.Property_Int;
 
464
   --  Selection_Mode_Property : constant Glib.Properties.Property_Enum;
 
465
   Spacing_Property        : constant Glib.Properties.Property_Int;
 
466
   Text_Column_Property    : constant Glib.Properties.Property_Int;
 
467
 
 
468
   ----------------------
 
469
   -- Style Properties --
 
470
   ----------------------
 
471
   --  The following properties can be changed through the gtk theme and
 
472
   --  configuration files, and retrieved through Gtk.Widget.Style_Get_Property
 
473
   --
 
474
   --  <style_properties>
 
475
   --  Name:  Selection_Box_Alpha_Property
 
476
   --  Type:  Uchar
 
477
   --  Descr: Opacity of the selection box
 
478
   --
 
479
   --  Name:  Selection_Box_Color_Property
 
480
   --  Type:  Boxed
 
481
   --  Descr: Color of the selection box
 
482
   --
 
483
 
 
484
   Selection_Box_Alpha_Property : constant Glib.Properties.Property_Uchar;
 
485
   Selection_Box_Color_Property : constant Gdk.Color.Property_Gdk_Color;
 
486
 
 
487
   -------------
 
488
   -- Signals --
 
489
   -------------
 
490
 
 
491
   --  <signals>
 
492
   --  The following new signals are defined for this widget:
 
493
   --
 
494
   --  - "activate_cursor_item"
 
495
   --  - "item_activated"
 
496
   --  - "move_cursor"
 
497
   --  - "select_all"
 
498
   --  - "select_cursor_item"
 
499
   --  - "selection_changed"
 
500
   --  - "set_scroll_adjustments"
 
501
   --  - "toggle_cursor_item"
 
502
   --  - "unselect_all"
 
503
   --  </signals>
 
504
 
 
505
   Signal_Activate_Cursor_Item   : constant Glib.Signal_Name :=
 
506
                                     "activate_cursor_item";
 
507
   Signal_Item_Activated         : constant Glib.Signal_Name :=
 
508
                                     "item_activated";
 
509
   Signal_Move_Cursor            : constant Glib.Signal_Name :=
 
510
                                     "move_cursor";
 
511
   Signal_Select_All             : constant Glib.Signal_Name :=
 
512
                                     "select_all";
 
513
   Signal_Select_Cursor_Item     : constant Glib.Signal_Name :=
 
514
                                     "select_cursor_item";
 
515
   Signal_Selection_Changed      : constant Glib.Signal_Name :=
 
516
                                     "selection_changed";
 
517
   Signal_Set_Scroll_Adjustments : constant Glib.Signal_Name :=
 
518
                                     "set_scroll_adjustments";
 
519
   Signal_Toggle_Cursor_Item     : constant Glib.Signal_Name :=
 
520
                                     "toggle_cursor_item";
 
521
   Signal_Unselect_All           : constant Glib.Signal_Name :=
 
522
                                     "unselect_all";
 
523
 
 
524
private
 
525
 
 
526
   Selection_Box_Alpha_Property : constant Glib.Properties.Property_Uchar :=
 
527
     Glib.Properties.Build ("selection-box-alpha");
 
528
   Selection_Box_Color_Property : constant Gdk.Color.Property_Gdk_Color :=
 
529
     Gdk.Color.Property_Gdk_Color (Glib.Build ("selection-box-color"));
 
530
 
 
531
   Column_Spacing_Property : constant Glib.Properties.Property_Int :=
 
532
     Glib.Properties.Build ("column-spacing");
 
533
   Columns_Property : constant Glib.Properties.Property_Int :=
 
534
     Glib.Properties.Build ("columns");
 
535
   Item_Width_Property : constant Glib.Properties.Property_Int :=
 
536
     Glib.Properties.Build ("item-width");
 
537
   Margin_Property : constant Glib.Properties.Property_Int :=
 
538
     Glib.Properties.Build ("margin");
 
539
   Markup_Column_Property : constant Glib.Properties.Property_Int :=
 
540
     Glib.Properties.Build ("markup-column");
 
541
   Model_Property : constant Glib.Properties.Property_Object :=
 
542
     Glib.Properties.Build ("model");
 
543
   Orientation_Property    : constant Gtk.Enums.Property_Gtk_Orientation :=
 
544
     Gtk.Enums.Property_Gtk_Orientation (Glib.Build ("orientation"));
 
545
   Pixbuf_Column_Property : constant Glib.Properties.Property_Int :=
 
546
     Glib.Properties.Build ("pixbuf-column");
 
547
   Reorderable_Property : constant Glib.Properties.Property_Boolean :=
 
548
     Glib.Properties.Build ("reorderable");
 
549
   Row_Spacing_Property : constant Glib.Properties.Property_Int :=
 
550
     Glib.Properties.Build ("row-spacing");
 
551
--     Selection_Mode_Property : constant Glib.Properties.Property_Enum :=
 
552
--     Glib.Properties.Build ("selection-mode");
 
553
   Spacing_Property : constant Glib.Properties.Property_Int :=
 
554
     Glib.Properties.Build ("spacing");
 
555
   Text_Column_Property : constant Glib.Properties.Property_Int :=
 
556
     Glib.Properties.Build ("text-column");
 
557
 
 
558
   pragma Import (C, Get_Type, "gtk_icon_view_get_type");
 
559
 
 
560
end Gtk.Icon_View;
 
561
 
 
562
--  binding might be useful later:
 
563
--  No binding: gtk_icon_view_selected_foreach