1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gtk.IconView;
26 
27 private import cairo.Surface;
28 private import glib.ConstructionException;
29 private import glib.ListG;
30 private import gobject.ObjectG;
31 private import gobject.Signals;
32 private import gtk.CellArea;
33 private import gtk.CellLayoutIF;
34 private import gtk.CellLayoutT;
35 private import gtk.CellRenderer;
36 private import gtk.Container;
37 private import gtk.ScrollableIF;
38 private import gtk.ScrollableT;
39 private import gtk.TargetEntry;
40 private import gtk.Tooltip;
41 private import gtk.TreeIter;
42 private import gtk.TreeModel;
43 private import gtk.TreeModelIF;
44 private import gtk.TreePath;
45 private import gtk.Widget;
46 public  import gtkc.gdktypes;
47 private import gtkc.gtk;
48 public  import gtkc.gtktypes;
49 
50 
51 /**
52  * #GtkIconView provides an alternative view on a #GtkTreeModel.
53  * It displays the model as a grid of icons with labels. Like
54  * #GtkTreeView, it allows to select one or multiple items
55  * (depending on the selection mode, see gtk_icon_view_set_selection_mode()).
56  * In addition to selection with the arrow keys, #GtkIconView supports
57  * rubberband selection, which is controlled by dragging the pointer.
58  * 
59  * Note that if the tree model is backed by an actual tree store (as
60  * opposed to a flat list where the mapping to icons is obvious),
61  * #GtkIconView will only display the first level of the tree and
62  * ignore the tree’s branches.
63  */
64 public class IconView : Container, CellLayoutIF, ScrollableIF
65 {
66 	/** the main Gtk struct */
67 	protected GtkIconView* gtkIconView;
68 
69 	/** Get the main Gtk struct */
70 	public GtkIconView* getIconViewStruct()
71 	{
72 		return gtkIconView;
73 	}
74 
75 	/** the main Gtk struct as a void* */
76 	protected override void* getStruct()
77 	{
78 		return cast(void*)gtkIconView;
79 	}
80 
81 	protected override void setStruct(GObject* obj)
82 	{
83 		gtkIconView = cast(GtkIconView*)obj;
84 		super.setStruct(obj);
85 	}
86 
87 	/**
88 	 * Sets our main struct and passes it to the parent class.
89 	 */
90 	public this (GtkIconView* gtkIconView, bool ownedRef = false)
91 	{
92 		this.gtkIconView = gtkIconView;
93 		super(cast(GtkContainer*)gtkIconView, ownedRef);
94 	}
95 
96 	// add the CellLayout capabilities
97 	mixin CellLayoutT!(GtkIconView);
98 
99 	// add the Scrollable capabilities
100 	mixin ScrollableT!(GtkIconView);
101 
102 	/**
103 	 */
104 
105 	public static GType getType()
106 	{
107 		return gtk_icon_view_get_type();
108 	}
109 
110 	/**
111 	 * Creates a new #GtkIconView widget
112 	 *
113 	 * Return: A newly created #GtkIconView widget
114 	 *
115 	 * Since: 2.6
116 	 *
117 	 * Throws: ConstructionException GTK+ fails to create the object.
118 	 */
119 	public this()
120 	{
121 		auto p = gtk_icon_view_new();
122 		
123 		if(p is null)
124 		{
125 			throw new ConstructionException("null returned by new");
126 		}
127 		
128 		this(cast(GtkIconView*) p);
129 	}
130 
131 	/**
132 	 * Creates a new #GtkIconView widget using the
133 	 * specified @area to layout cells inside the icons.
134 	 *
135 	 * Params:
136 	 *     area = the #GtkCellArea to use to layout cells
137 	 *
138 	 * Return: A newly created #GtkIconView widget
139 	 *
140 	 * Since: 3.0
141 	 *
142 	 * Throws: ConstructionException GTK+ fails to create the object.
143 	 */
144 	public this(CellArea area)
145 	{
146 		auto p = gtk_icon_view_new_with_area((area is null) ? null : area.getCellAreaStruct());
147 		
148 		if(p is null)
149 		{
150 			throw new ConstructionException("null returned by new_with_area");
151 		}
152 		
153 		this(cast(GtkIconView*) p);
154 	}
155 
156 	/**
157 	 * Creates a new #GtkIconView widget with the model @model.
158 	 *
159 	 * Params:
160 	 *     model = The model.
161 	 *
162 	 * Return: A newly created #GtkIconView widget.
163 	 *
164 	 * Since: 2.6
165 	 *
166 	 * Throws: ConstructionException GTK+ fails to create the object.
167 	 */
168 	public this(TreeModelIF model)
169 	{
170 		auto p = gtk_icon_view_new_with_model((model is null) ? null : model.getTreeModelStruct());
171 		
172 		if(p is null)
173 		{
174 			throw new ConstructionException("null returned by new_with_model");
175 		}
176 		
177 		this(cast(GtkIconView*) p);
178 	}
179 
180 	/**
181 	 * Converts widget coordinates to coordinates for the bin_window,
182 	 * as expected by e.g. gtk_icon_view_get_path_at_pos().
183 	 *
184 	 * Params:
185 	 *     wx = X coordinate relative to the widget
186 	 *     wy = Y coordinate relative to the widget
187 	 *     bx = return location for bin_window X coordinate
188 	 *     by = return location for bin_window Y coordinate
189 	 *
190 	 * Since: 2.12
191 	 */
192 	public void convertWidgetToBinWindowCoords(int wx, int wy, out int bx, out int by)
193 	{
194 		gtk_icon_view_convert_widget_to_bin_window_coords(gtkIconView, wx, wy, &bx, &by);
195 	}
196 
197 	/**
198 	 * Creates a #cairo_surface_t representation of the item at @path.
199 	 * This image is used for a drag icon.
200 	 *
201 	 * Params:
202 	 *     path = a #GtkTreePath in @icon_view
203 	 *
204 	 * Return: a newly-allocated surface of the drag icon.
205 	 *
206 	 * Since: 2.8
207 	 */
208 	public Surface createDragIcon(TreePath path)
209 	{
210 		auto p = gtk_icon_view_create_drag_icon(gtkIconView, (path is null) ? null : path.getTreePathStruct());
211 		
212 		if(p is null)
213 		{
214 			return null;
215 		}
216 		
217 		return new Surface(cast(cairo_surface_t*) p);
218 	}
219 
220 	/**
221 	 * Turns @icon_view into a drop destination for automatic DND. Calling this
222 	 * method sets #GtkIconView:reorderable to %FALSE.
223 	 *
224 	 * Params:
225 	 *     targets = the table of targets that the drag will
226 	 *         support
227 	 *     nTargets = the number of items in @targets
228 	 *     actions = the bitmask of possible actions for a drag to this
229 	 *         widget
230 	 *
231 	 * Since: 2.8
232 	 */
233 	public void enableModelDragDest(TargetEntry[] targets, GdkDragAction actions)
234 	{
235 		GtkTargetEntry[] targetsArray = new GtkTargetEntry[targets.length];
236 		for ( int i = 0; i < targets.length; i++ )
237 		{
238 			targetsArray[i] = *(targets[i].getTargetEntryStruct());
239 		}
240 		
241 		gtk_icon_view_enable_model_drag_dest(gtkIconView, targetsArray.ptr, cast(int)targets.length, actions);
242 	}
243 
244 	/**
245 	 * Turns @icon_view into a drag source for automatic DND. Calling this
246 	 * method sets #GtkIconView:reorderable to %FALSE.
247 	 *
248 	 * Params:
249 	 *     startButtonMask = Mask of allowed buttons to start drag
250 	 *     targets = the table of targets that the drag will
251 	 *         support
252 	 *     nTargets = the number of items in @targets
253 	 *     actions = the bitmask of possible actions for a drag from this
254 	 *         widget
255 	 *
256 	 * Since: 2.8
257 	 */
258 	public void enableModelDragSource(GdkModifierType startButtonMask, TargetEntry[] targets, GdkDragAction actions)
259 	{
260 		GtkTargetEntry[] targetsArray = new GtkTargetEntry[targets.length];
261 		for ( int i = 0; i < targets.length; i++ )
262 		{
263 			targetsArray[i] = *(targets[i].getTargetEntryStruct());
264 		}
265 		
266 		gtk_icon_view_enable_model_drag_source(gtkIconView, startButtonMask, targetsArray.ptr, cast(int)targets.length, actions);
267 	}
268 
269 	/**
270 	 * Gets the setting set by gtk_icon_view_set_activate_on_single_click().
271 	 *
272 	 * Return: %TRUE if item-activated will be emitted on a single click
273 	 *
274 	 * Since: 3.8
275 	 */
276 	public bool getActivateOnSingleClick()
277 	{
278 		return gtk_icon_view_get_activate_on_single_click(gtkIconView) != 0;
279 	}
280 
281 	/**
282 	 * Fills the bounding rectangle in widget coordinates for the cell specified by
283 	 * @path and @cell. If @cell is %NULL the main cell area is used.
284 	 *
285 	 * This function is only valid if @icon_view is realized.
286 	 *
287 	 * Params:
288 	 *     path = a #GtkTreePath
289 	 *     cell = a #GtkCellRenderer or %NULL
290 	 *     rect = rectangle to fill with cell rect
291 	 *
292 	 * Return: %FALSE if there is no such item, %TRUE otherwise
293 	 *
294 	 * Since: 3.6
295 	 */
296 	public bool getCellRect(TreePath path, CellRenderer cell, out GdkRectangle rect)
297 	{
298 		return gtk_icon_view_get_cell_rect(gtkIconView, (path is null) ? null : path.getTreePathStruct(), (cell is null) ? null : cell.getCellRendererStruct(), &rect) != 0;
299 	}
300 
301 	/**
302 	 * Returns the value of the ::column-spacing property.
303 	 *
304 	 * Return: the space between columns
305 	 *
306 	 * Since: 2.6
307 	 */
308 	public int getColumnSpacing()
309 	{
310 		return gtk_icon_view_get_column_spacing(gtkIconView);
311 	}
312 
313 	/**
314 	 * Returns the value of the ::columns property.
315 	 *
316 	 * Return: the number of columns, or -1
317 	 *
318 	 * Since: 2.6
319 	 */
320 	public int getColumns()
321 	{
322 		return gtk_icon_view_get_columns(gtkIconView);
323 	}
324 
325 	/**
326 	 * Fills in @path and @cell with the current cursor path and cell.
327 	 * If the cursor isn’t currently set, then *@path will be %NULL.
328 	 * If no cell currently has focus, then *@cell will be %NULL.
329 	 *
330 	 * The returned #GtkTreePath must be freed with gtk_tree_path_free().
331 	 *
332 	 * Params:
333 	 *     path = Return location for the current
334 	 *         cursor path, or %NULL
335 	 *     cell = Return location the current
336 	 *         focus cell, or %NULL
337 	 *
338 	 * Return: %TRUE if the cursor is set.
339 	 *
340 	 * Since: 2.8
341 	 */
342 	public bool getCursor(out TreePath path, out CellRenderer cell)
343 	{
344 		GtkTreePath* outpath = null;
345 		GtkCellRenderer* outcell = null;
346 		
347 		auto p = gtk_icon_view_get_cursor(gtkIconView, &outpath, &outcell) != 0;
348 		
349 		path = ObjectG.getDObject!(TreePath)(outpath);
350 		cell = ObjectG.getDObject!(CellRenderer)(outcell);
351 		
352 		return p;
353 	}
354 
355 	/**
356 	 * Determines the destination item for a given position.
357 	 *
358 	 * Params:
359 	 *     dragX = the position to determine the destination item for
360 	 *     dragY = the position to determine the destination item for
361 	 *     path = Return location for the path of the item,
362 	 *         or %NULL.
363 	 *     pos = Return location for the drop position, or %NULL
364 	 *
365 	 * Return: whether there is an item at the given position.
366 	 *
367 	 * Since: 2.8
368 	 */
369 	public bool getDestItemAtPos(int dragX, int dragY, out TreePath path, out GtkIconViewDropPosition pos)
370 	{
371 		GtkTreePath* outpath = null;
372 		
373 		auto p = gtk_icon_view_get_dest_item_at_pos(gtkIconView, dragX, dragY, &outpath, &pos) != 0;
374 		
375 		path = ObjectG.getDObject!(TreePath)(outpath);
376 		
377 		return p;
378 	}
379 
380 	/**
381 	 * Gets information about the item that is highlighted for feedback.
382 	 *
383 	 * Params:
384 	 *     path = Return location for the path of
385 	 *         the highlighted item, or %NULL.
386 	 *     pos = Return location for the drop position, or %NULL
387 	 *
388 	 * Since: 2.8
389 	 */
390 	public void getDragDestItem(out TreePath path, out GtkIconViewDropPosition pos)
391 	{
392 		GtkTreePath* outpath = null;
393 		
394 		gtk_icon_view_get_drag_dest_item(gtkIconView, &outpath, &pos);
395 		
396 		path = ObjectG.getDObject!(TreePath)(outpath);
397 	}
398 
399 	/**
400 	 * Finds the path at the point (@x, @y), relative to bin_window coordinates.
401 	 * In contrast to gtk_icon_view_get_path_at_pos(), this function also
402 	 * obtains the cell at the specified position. The returned path should
403 	 * be freed with gtk_tree_path_free().
404 	 * See gtk_icon_view_convert_widget_to_bin_window_coords() for converting
405 	 * widget coordinates to bin_window coordinates.
406 	 *
407 	 * Params:
408 	 *     x = The x position to be identified
409 	 *     y = The y position to be identified
410 	 *     path = Return location for the path, or %NULL
411 	 *     cell = Return location for the renderer
412 	 *         responsible for the cell at (@x, @y), or %NULL
413 	 *
414 	 * Return: %TRUE if an item exists at the specified position
415 	 *
416 	 * Since: 2.8
417 	 */
418 	public bool getItemAtPos(int x, int y, out TreePath path, out CellRenderer cell)
419 	{
420 		GtkTreePath* outpath = null;
421 		GtkCellRenderer* outcell = null;
422 		
423 		auto p = gtk_icon_view_get_item_at_pos(gtkIconView, x, y, &outpath, &outcell) != 0;
424 		
425 		path = ObjectG.getDObject!(TreePath)(outpath);
426 		cell = ObjectG.getDObject!(CellRenderer)(outcell);
427 		
428 		return p;
429 	}
430 
431 	/**
432 	 * Gets the column in which the item @path is currently
433 	 * displayed. Column numbers start at 0.
434 	 *
435 	 * Params:
436 	 *     path = the #GtkTreePath of the item
437 	 *
438 	 * Return: The column in which the item is displayed
439 	 *
440 	 * Since: 2.22
441 	 */
442 	public int getItemColumn(TreePath path)
443 	{
444 		return gtk_icon_view_get_item_column(gtkIconView, (path is null) ? null : path.getTreePathStruct());
445 	}
446 
447 	/**
448 	 * Returns the value of the ::item-orientation property which determines
449 	 * whether the labels are drawn beside the icons instead of below.
450 	 *
451 	 * Return: the relative position of texts and icons
452 	 *
453 	 * Since: 2.6
454 	 */
455 	public GtkOrientation getItemOrientation()
456 	{
457 		return gtk_icon_view_get_item_orientation(gtkIconView);
458 	}
459 
460 	/**
461 	 * Returns the value of the ::item-padding property.
462 	 *
463 	 * Return: the padding around items
464 	 *
465 	 * Since: 2.18
466 	 */
467 	public int getItemPadding()
468 	{
469 		return gtk_icon_view_get_item_padding(gtkIconView);
470 	}
471 
472 	/**
473 	 * Gets the row in which the item @path is currently
474 	 * displayed. Row numbers start at 0.
475 	 *
476 	 * Params:
477 	 *     path = the #GtkTreePath of the item
478 	 *
479 	 * Return: The row in which the item is displayed
480 	 *
481 	 * Since: 2.22
482 	 */
483 	public int getItemRow(TreePath path)
484 	{
485 		return gtk_icon_view_get_item_row(gtkIconView, (path is null) ? null : path.getTreePathStruct());
486 	}
487 
488 	/**
489 	 * Returns the value of the ::item-width property.
490 	 *
491 	 * Return: the width of a single item, or -1
492 	 *
493 	 * Since: 2.6
494 	 */
495 	public int getItemWidth()
496 	{
497 		return gtk_icon_view_get_item_width(gtkIconView);
498 	}
499 
500 	/**
501 	 * Returns the value of the ::margin property.
502 	 *
503 	 * Return: the space at the borders
504 	 *
505 	 * Since: 2.6
506 	 */
507 	public int getMargin()
508 	{
509 		return gtk_icon_view_get_margin(gtkIconView);
510 	}
511 
512 	/**
513 	 * Returns the column with markup text for @icon_view.
514 	 *
515 	 * Return: the markup column, or -1 if it’s unset.
516 	 *
517 	 * Since: 2.6
518 	 */
519 	public int getMarkupColumn()
520 	{
521 		return gtk_icon_view_get_markup_column(gtkIconView);
522 	}
523 
524 	/**
525 	 * Returns the model the #GtkIconView is based on.  Returns %NULL if the
526 	 * model is unset.
527 	 *
528 	 * Return: A #GtkTreeModel, or %NULL if none is
529 	 *     currently being used.
530 	 *
531 	 * Since: 2.6
532 	 */
533 	public TreeModelIF getModel()
534 	{
535 		auto p = gtk_icon_view_get_model(gtkIconView);
536 		
537 		if(p is null)
538 		{
539 			return null;
540 		}
541 		
542 		return ObjectG.getDObject!(TreeModel, TreeModelIF)(cast(GtkTreeModel*) p);
543 	}
544 
545 	/**
546 	 * Finds the path at the point (@x, @y), relative to bin_window coordinates.
547 	 * See gtk_icon_view_get_item_at_pos(), if you are also interested in
548 	 * the cell at the specified position.
549 	 * See gtk_icon_view_convert_widget_to_bin_window_coords() for converting
550 	 * widget coordinates to bin_window coordinates.
551 	 *
552 	 * Params:
553 	 *     x = The x position to be identified
554 	 *     y = The y position to be identified
555 	 *
556 	 * Return: The #GtkTreePath corresponding to the icon or %NULL
557 	 *     if no icon exists at that position.
558 	 *
559 	 * Since: 2.6
560 	 */
561 	public TreePath getPathAtPos(int x, int y)
562 	{
563 		auto p = gtk_icon_view_get_path_at_pos(gtkIconView, x, y);
564 		
565 		if(p is null)
566 		{
567 			return null;
568 		}
569 		
570 		return ObjectG.getDObject!(TreePath)(cast(GtkTreePath*) p);
571 	}
572 
573 	/**
574 	 * Returns the column with pixbufs for @icon_view.
575 	 *
576 	 * Return: the pixbuf column, or -1 if it’s unset.
577 	 *
578 	 * Since: 2.6
579 	 */
580 	public int getPixbufColumn()
581 	{
582 		return gtk_icon_view_get_pixbuf_column(gtkIconView);
583 	}
584 
585 	/**
586 	 * Retrieves whether the user can reorder the list via drag-and-drop.
587 	 * See gtk_icon_view_set_reorderable().
588 	 *
589 	 * Return: %TRUE if the list can be reordered.
590 	 *
591 	 * Since: 2.8
592 	 */
593 	public bool getReorderable()
594 	{
595 		return gtk_icon_view_get_reorderable(gtkIconView) != 0;
596 	}
597 
598 	/**
599 	 * Returns the value of the ::row-spacing property.
600 	 *
601 	 * Return: the space between rows
602 	 *
603 	 * Since: 2.6
604 	 */
605 	public int getRowSpacing()
606 	{
607 		return gtk_icon_view_get_row_spacing(gtkIconView);
608 	}
609 
610 	/**
611 	 * Creates a list of paths of all selected items. Additionally, if you are
612 	 * planning on modifying the model after calling this function, you may
613 	 * want to convert the returned list into a list of #GtkTreeRowReferences.
614 	 * To do this, you can use gtk_tree_row_reference_new().
615 	 *
616 	 * To free the return value, use:
617 	 * |[<!-- language="C" -->
618 	 * g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
619 	 * ]|
620 	 *
621 	 * Return: A #GList containing a #GtkTreePath for each selected row.
622 	 *
623 	 * Since: 2.6
624 	 */
625 	public ListG getSelectedItems()
626 	{
627 		auto p = gtk_icon_view_get_selected_items(gtkIconView);
628 		
629 		if(p is null)
630 		{
631 			return null;
632 		}
633 		
634 		return new ListG(cast(GList*) p);
635 	}
636 
637 	/**
638 	 * Gets the selection mode of the @icon_view.
639 	 *
640 	 * Return: the current selection mode
641 	 *
642 	 * Since: 2.6
643 	 */
644 	public GtkSelectionMode getSelectionMode()
645 	{
646 		return gtk_icon_view_get_selection_mode(gtkIconView);
647 	}
648 
649 	/**
650 	 * Returns the value of the ::spacing property.
651 	 *
652 	 * Return: the space between cells
653 	 *
654 	 * Since: 2.6
655 	 */
656 	public int getSpacing()
657 	{
658 		return gtk_icon_view_get_spacing(gtkIconView);
659 	}
660 
661 	/**
662 	 * Returns the column with text for @icon_view.
663 	 *
664 	 * Return: the text column, or -1 if it’s unset.
665 	 *
666 	 * Since: 2.6
667 	 */
668 	public int getTextColumn()
669 	{
670 		return gtk_icon_view_get_text_column(gtkIconView);
671 	}
672 
673 	/**
674 	 * Returns the column of @icon_view’s model which is being used for
675 	 * displaying tooltips on @icon_view’s rows.
676 	 *
677 	 * Return: the index of the tooltip column that is currently being
678 	 *     used, or -1 if this is disabled.
679 	 *
680 	 * Since: 2.12
681 	 */
682 	public int getTooltipColumn()
683 	{
684 		return gtk_icon_view_get_tooltip_column(gtkIconView);
685 	}
686 
687 	/**
688 	 * This function is supposed to be used in a #GtkWidget::query-tooltip
689 	 * signal handler for #GtkIconView.  The @x, @y and @keyboard_tip values
690 	 * which are received in the signal handler, should be passed to this
691 	 * function without modification.
692 	 *
693 	 * The return value indicates whether there is an icon view item at the given
694 	 * coordinates (%TRUE) or not (%FALSE) for mouse tooltips. For keyboard
695 	 * tooltips the item returned will be the cursor item. When %TRUE, then any of
696 	 * @model, @path and @iter which have been provided will be set to point to
697 	 * that row and the corresponding model. @x and @y will always be converted
698 	 * to be relative to @icon_view’s bin_window if @keyboard_tooltip is %FALSE.
699 	 *
700 	 * Params:
701 	 *     x = the x coordinate (relative to widget coordinates)
702 	 *     y = the y coordinate (relative to widget coordinates)
703 	 *     keyboardTip = whether this is a keyboard tooltip or not
704 	 *     model = a pointer to receive a
705 	 *         #GtkTreeModel or %NULL
706 	 *     path = a pointer to receive a #GtkTreePath or %NULL
707 	 *     iter = a pointer to receive a #GtkTreeIter or %NULL
708 	 *
709 	 * Return: whether or not the given tooltip context points to a item
710 	 *
711 	 * Since: 2.12
712 	 */
713 	public bool getTooltipContext(ref int x, ref int y, bool keyboardTip, out TreeModelIF model, out TreePath path, out TreeIter iter)
714 	{
715 		GtkTreeModel* outmodel = null;
716 		GtkTreePath* outpath = null;
717 		GtkTreeIter* outiter = new GtkTreeIter;
718 		
719 		auto p = gtk_icon_view_get_tooltip_context(gtkIconView, &x, &y, keyboardTip, &outmodel, &outpath, outiter) != 0;
720 		
721 		model = ObjectG.getDObject!(TreeModel, TreeModelIF)(outmodel);
722 		path = ObjectG.getDObject!(TreePath)(outpath);
723 		iter = ObjectG.getDObject!(TreeIter)(outiter);
724 		
725 		return p;
726 	}
727 
728 	/**
729 	 * Sets @start_path and @end_path to be the first and last visible path.
730 	 * Note that there may be invisible paths in between.
731 	 *
732 	 * Both paths should be freed with gtk_tree_path_free() after use.
733 	 *
734 	 * Params:
735 	 *     startPath = Return location for start of region,
736 	 *         or %NULL
737 	 *     endPath = Return location for end of region, or %NULL
738 	 *
739 	 * Return: %TRUE, if valid paths were placed in @start_path and @end_path
740 	 *
741 	 * Since: 2.8
742 	 */
743 	public bool getVisibleRange(out TreePath startPath, out TreePath endPath)
744 	{
745 		GtkTreePath* outstartPath = null;
746 		GtkTreePath* outendPath = null;
747 		
748 		auto p = gtk_icon_view_get_visible_range(gtkIconView, &outstartPath, &outendPath) != 0;
749 		
750 		startPath = ObjectG.getDObject!(TreePath)(outstartPath);
751 		endPath = ObjectG.getDObject!(TreePath)(outendPath);
752 		
753 		return p;
754 	}
755 
756 	/**
757 	 * Activates the item determined by @path.
758 	 *
759 	 * Params:
760 	 *     path = The #GtkTreePath to be activated
761 	 *
762 	 * Since: 2.6
763 	 */
764 	public void itemActivated(TreePath path)
765 	{
766 		gtk_icon_view_item_activated(gtkIconView, (path is null) ? null : path.getTreePathStruct());
767 	}
768 
769 	/**
770 	 * Returns %TRUE if the icon pointed to by @path is currently
771 	 * selected. If @path does not point to a valid location, %FALSE is returned.
772 	 *
773 	 * Params:
774 	 *     path = A #GtkTreePath to check selection on.
775 	 *
776 	 * Return: %TRUE if @path is selected.
777 	 *
778 	 * Since: 2.6
779 	 */
780 	public bool pathIsSelected(TreePath path)
781 	{
782 		return gtk_icon_view_path_is_selected(gtkIconView, (path is null) ? null : path.getTreePathStruct()) != 0;
783 	}
784 
785 	/**
786 	 * Moves the alignments of @icon_view to the position specified by @path.
787 	 * @row_align determines where the row is placed, and @col_align determines
788 	 * where @column is placed.  Both are expected to be between 0.0 and 1.0.
789 	 * 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means
790 	 * center.
791 	 *
792 	 * If @use_align is %FALSE, then the alignment arguments are ignored, and the
793 	 * tree does the minimum amount of work to scroll the item onto the screen.
794 	 * This means that the item will be scrolled to the edge closest to its current
795 	 * position.  If the item is currently visible on the screen, nothing is done.
796 	 *
797 	 * This function only works if the model is set, and @path is a valid row on
798 	 * the model. If the model changes before the @icon_view is realized, the
799 	 * centered path will be modified to reflect this change.
800 	 *
801 	 * Params:
802 	 *     path = The path of the item to move to.
803 	 *     useAlign = whether to use alignment arguments, or %FALSE.
804 	 *     rowAlign = The vertical alignment of the item specified by @path.
805 	 *     colAlign = The horizontal alignment of the item specified by @path.
806 	 *
807 	 * Since: 2.8
808 	 */
809 	public void scrollToPath(TreePath path, bool useAlign, float rowAlign, float colAlign)
810 	{
811 		gtk_icon_view_scroll_to_path(gtkIconView, (path is null) ? null : path.getTreePathStruct(), useAlign, rowAlign, colAlign);
812 	}
813 
814 	/**
815 	 * Selects all the icons. @icon_view must has its selection mode set
816 	 * to #GTK_SELECTION_MULTIPLE.
817 	 *
818 	 * Since: 2.6
819 	 */
820 	public void selectAll()
821 	{
822 		gtk_icon_view_select_all(gtkIconView);
823 	}
824 
825 	/**
826 	 * Selects the row at @path.
827 	 *
828 	 * Params:
829 	 *     path = The #GtkTreePath to be selected.
830 	 *
831 	 * Since: 2.6
832 	 */
833 	public void selectPath(TreePath path)
834 	{
835 		gtk_icon_view_select_path(gtkIconView, (path is null) ? null : path.getTreePathStruct());
836 	}
837 
838 	/**
839 	 * Calls a function for each selected icon. Note that the model or
840 	 * selection cannot be modified from within this function.
841 	 *
842 	 * Params:
843 	 *     func = The function to call for each selected icon.
844 	 *     data = User data to pass to the function.
845 	 *
846 	 * Since: 2.6
847 	 */
848 	public void selectedForeach(GtkIconViewForeachFunc func, void* data)
849 	{
850 		gtk_icon_view_selected_foreach(gtkIconView, func, data);
851 	}
852 
853 	/**
854 	 * Causes the #GtkIconView::item-activated signal to be emitted on
855 	 * a single click instead of a double click.
856 	 *
857 	 * Params:
858 	 *     single = %TRUE to emit item-activated on a single click
859 	 *
860 	 * Since: 3.8
861 	 */
862 	public void setActivateOnSingleClick(bool single)
863 	{
864 		gtk_icon_view_set_activate_on_single_click(gtkIconView, single);
865 	}
866 
867 	/**
868 	 * Sets the ::column-spacing property which specifies the space
869 	 * which is inserted between the columns of the icon view.
870 	 *
871 	 * Params:
872 	 *     columnSpacing = the column spacing
873 	 *
874 	 * Since: 2.6
875 	 */
876 	public void setColumnSpacing(int columnSpacing)
877 	{
878 		gtk_icon_view_set_column_spacing(gtkIconView, columnSpacing);
879 	}
880 
881 	/**
882 	 * Sets the ::columns property which determines in how
883 	 * many columns the icons are arranged. If @columns is
884 	 * -1, the number of columns will be chosen automatically
885 	 * to fill the available area.
886 	 *
887 	 * Params:
888 	 *     columns = the number of columns
889 	 *
890 	 * Since: 2.6
891 	 */
892 	public void setColumns(int columns)
893 	{
894 		gtk_icon_view_set_columns(gtkIconView, columns);
895 	}
896 
897 	/**
898 	 * Sets the current keyboard focus to be at @path, and selects it.  This is
899 	 * useful when you want to focus the user’s attention on a particular item.
900 	 * If @cell is not %NULL, then focus is given to the cell specified by
901 	 * it. Additionally, if @start_editing is %TRUE, then editing should be
902 	 * started in the specified cell.
903 	 *
904 	 * This function is often followed by `gtk_widget_grab_focus
905 	 * (icon_view)` in order to give keyboard focus to the widget.
906 	 * Please note that editing can only happen when the widget is realized.
907 	 *
908 	 * Params:
909 	 *     path = A #GtkTreePath
910 	 *     cell = One of the cell renderers of @icon_view, or %NULL
911 	 *     startEditing = %TRUE if the specified cell should start being edited.
912 	 *
913 	 * Since: 2.8
914 	 */
915 	public void setCursor(TreePath path, CellRenderer cell, bool startEditing)
916 	{
917 		gtk_icon_view_set_cursor(gtkIconView, (path is null) ? null : path.getTreePathStruct(), (cell is null) ? null : cell.getCellRendererStruct(), startEditing);
918 	}
919 
920 	/**
921 	 * Sets the item that is highlighted for feedback.
922 	 *
923 	 * Params:
924 	 *     path = The path of the item to highlight, or %NULL.
925 	 *     pos = Specifies where to drop, relative to the item
926 	 *
927 	 * Since: 2.8
928 	 */
929 	public void setDragDestItem(TreePath path, GtkIconViewDropPosition pos)
930 	{
931 		gtk_icon_view_set_drag_dest_item(gtkIconView, (path is null) ? null : path.getTreePathStruct(), pos);
932 	}
933 
934 	/**
935 	 * Sets the ::item-orientation property which determines whether the labels
936 	 * are drawn beside the icons instead of below.
937 	 *
938 	 * Params:
939 	 *     orientation = the relative position of texts and icons
940 	 *
941 	 * Since: 2.6
942 	 */
943 	public void setItemOrientation(GtkOrientation orientation)
944 	{
945 		gtk_icon_view_set_item_orientation(gtkIconView, orientation);
946 	}
947 
948 	/**
949 	 * Sets the #GtkIconView:item-padding property which specifies the padding
950 	 * around each of the icon view’s items.
951 	 *
952 	 * Params:
953 	 *     itemPadding = the item padding
954 	 *
955 	 * Since: 2.18
956 	 */
957 	public void setItemPadding(int itemPadding)
958 	{
959 		gtk_icon_view_set_item_padding(gtkIconView, itemPadding);
960 	}
961 
962 	/**
963 	 * Sets the ::item-width property which specifies the width
964 	 * to use for each item. If it is set to -1, the icon view will
965 	 * automatically determine a suitable item size.
966 	 *
967 	 * Params:
968 	 *     itemWidth = the width for each item
969 	 *
970 	 * Since: 2.6
971 	 */
972 	public void setItemWidth(int itemWidth)
973 	{
974 		gtk_icon_view_set_item_width(gtkIconView, itemWidth);
975 	}
976 
977 	/**
978 	 * Sets the ::margin property which specifies the space
979 	 * which is inserted at the top, bottom, left and right
980 	 * of the icon view.
981 	 *
982 	 * Params:
983 	 *     margin = the margin
984 	 *
985 	 * Since: 2.6
986 	 */
987 	public void setMargin(int margin)
988 	{
989 		gtk_icon_view_set_margin(gtkIconView, margin);
990 	}
991 
992 	/**
993 	 * Sets the column with markup information for @icon_view to be
994 	 * @column. The markup column must be of type #G_TYPE_STRING.
995 	 * If the markup column is set to something, it overrides
996 	 * the text column set by gtk_icon_view_set_text_column().
997 	 *
998 	 * Params:
999 	 *     column = A column in the currently used model, or -1 to display no text
1000 	 *
1001 	 * Since: 2.6
1002 	 */
1003 	public void setMarkupColumn(int column)
1004 	{
1005 		gtk_icon_view_set_markup_column(gtkIconView, column);
1006 	}
1007 
1008 	/**
1009 	 * Sets the model for a #GtkIconView.
1010 	 * If the @icon_view already has a model set, it will remove
1011 	 * it before setting the new model.  If @model is %NULL, then
1012 	 * it will unset the old model.
1013 	 *
1014 	 * Params:
1015 	 *     model = The model.
1016 	 *
1017 	 * Since: 2.6
1018 	 */
1019 	public void setModel(TreeModelIF model)
1020 	{
1021 		gtk_icon_view_set_model(gtkIconView, (model is null) ? null : model.getTreeModelStruct());
1022 	}
1023 
1024 	/**
1025 	 * Sets the column with pixbufs for @icon_view to be @column. The pixbuf
1026 	 * column must be of type #GDK_TYPE_PIXBUF
1027 	 *
1028 	 * Params:
1029 	 *     column = A column in the currently used model, or -1 to disable
1030 	 *
1031 	 * Since: 2.6
1032 	 */
1033 	public void setPixbufColumn(int column)
1034 	{
1035 		gtk_icon_view_set_pixbuf_column(gtkIconView, column);
1036 	}
1037 
1038 	/**
1039 	 * This function is a convenience function to allow you to reorder models that
1040 	 * support the #GtkTreeDragSourceIface and the #GtkTreeDragDestIface.  Both
1041 	 * #GtkTreeStore and #GtkListStore support these.  If @reorderable is %TRUE, then
1042 	 * the user can reorder the model by dragging and dropping rows.  The
1043 	 * developer can listen to these changes by connecting to the model's
1044 	 * row_inserted and row_deleted signals. The reordering is implemented by setting up
1045 	 * the icon view as a drag source and destination. Therefore, drag and
1046 	 * drop can not be used in a reorderable view for any other purpose.
1047 	 *
1048 	 * This function does not give you any degree of control over the order -- any
1049 	 * reordering is allowed.  If more control is needed, you should probably
1050 	 * handle drag and drop manually.
1051 	 *
1052 	 * Params:
1053 	 *     reorderable = %TRUE, if the list of items can be reordered.
1054 	 *
1055 	 * Since: 2.8
1056 	 */
1057 	public void setReorderable(bool reorderable)
1058 	{
1059 		gtk_icon_view_set_reorderable(gtkIconView, reorderable);
1060 	}
1061 
1062 	/**
1063 	 * Sets the ::row-spacing property which specifies the space
1064 	 * which is inserted between the rows of the icon view.
1065 	 *
1066 	 * Params:
1067 	 *     rowSpacing = the row spacing
1068 	 *
1069 	 * Since: 2.6
1070 	 */
1071 	public void setRowSpacing(int rowSpacing)
1072 	{
1073 		gtk_icon_view_set_row_spacing(gtkIconView, rowSpacing);
1074 	}
1075 
1076 	/**
1077 	 * Sets the selection mode of the @icon_view.
1078 	 *
1079 	 * Params:
1080 	 *     mode = The selection mode
1081 	 *
1082 	 * Since: 2.6
1083 	 */
1084 	public void setSelectionMode(GtkSelectionMode mode)
1085 	{
1086 		gtk_icon_view_set_selection_mode(gtkIconView, mode);
1087 	}
1088 
1089 	/**
1090 	 * Sets the ::spacing property which specifies the space
1091 	 * which is inserted between the cells (i.e. the icon and
1092 	 * the text) of an item.
1093 	 *
1094 	 * Params:
1095 	 *     spacing = the spacing
1096 	 *
1097 	 * Since: 2.6
1098 	 */
1099 	public void setSpacing(int spacing)
1100 	{
1101 		gtk_icon_view_set_spacing(gtkIconView, spacing);
1102 	}
1103 
1104 	/**
1105 	 * Sets the column with text for @icon_view to be @column. The text
1106 	 * column must be of type #G_TYPE_STRING.
1107 	 *
1108 	 * Params:
1109 	 *     column = A column in the currently used model, or -1 to display no text
1110 	 *
1111 	 * Since: 2.6
1112 	 */
1113 	public void setTextColumn(int column)
1114 	{
1115 		gtk_icon_view_set_text_column(gtkIconView, column);
1116 	}
1117 
1118 	/**
1119 	 * Sets the tip area of @tooltip to the area which @cell occupies in
1120 	 * the item pointed to by @path. See also gtk_tooltip_set_tip_area().
1121 	 *
1122 	 * See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
1123 	 *
1124 	 * Params:
1125 	 *     tooltip = a #GtkTooltip
1126 	 *     path = a #GtkTreePath
1127 	 *     cell = a #GtkCellRenderer or %NULL
1128 	 *
1129 	 * Since: 2.12
1130 	 */
1131 	public void setTooltipCell(Tooltip tooltip, TreePath path, CellRenderer cell)
1132 	{
1133 		gtk_icon_view_set_tooltip_cell(gtkIconView, (tooltip is null) ? null : tooltip.getTooltipStruct(), (path is null) ? null : path.getTreePathStruct(), (cell is null) ? null : cell.getCellRendererStruct());
1134 	}
1135 
1136 	/**
1137 	 * If you only plan to have simple (text-only) tooltips on full items, you
1138 	 * can use this function to have #GtkIconView handle these automatically
1139 	 * for you. @column should be set to the column in @icon_view’s model
1140 	 * containing the tooltip texts, or -1 to disable this feature.
1141 	 *
1142 	 * When enabled, #GtkWidget:has-tooltip will be set to %TRUE and
1143 	 * @icon_view will connect a #GtkWidget::query-tooltip signal handler.
1144 	 *
1145 	 * Note that the signal handler sets the text with gtk_tooltip_set_markup(),
1146 	 * so &, <, etc have to be escaped in the text.
1147 	 *
1148 	 * Params:
1149 	 *     column = an integer, which is a valid column number for @icon_view’s model
1150 	 *
1151 	 * Since: 2.12
1152 	 */
1153 	public void setTooltipColumn(int column)
1154 	{
1155 		gtk_icon_view_set_tooltip_column(gtkIconView, column);
1156 	}
1157 
1158 	/**
1159 	 * Sets the tip area of @tooltip to be the area covered by the item at @path.
1160 	 * See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
1161 	 * See also gtk_tooltip_set_tip_area().
1162 	 *
1163 	 * Params:
1164 	 *     tooltip = a #GtkTooltip
1165 	 *     path = a #GtkTreePath
1166 	 *
1167 	 * Since: 2.12
1168 	 */
1169 	public void setTooltipItem(Tooltip tooltip, TreePath path)
1170 	{
1171 		gtk_icon_view_set_tooltip_item(gtkIconView, (tooltip is null) ? null : tooltip.getTooltipStruct(), (path is null) ? null : path.getTreePathStruct());
1172 	}
1173 
1174 	/**
1175 	 * Unselects all the icons.
1176 	 *
1177 	 * Since: 2.6
1178 	 */
1179 	public void unselectAll()
1180 	{
1181 		gtk_icon_view_unselect_all(gtkIconView);
1182 	}
1183 
1184 	/**
1185 	 * Unselects the row at @path.
1186 	 *
1187 	 * Params:
1188 	 *     path = The #GtkTreePath to be unselected.
1189 	 *
1190 	 * Since: 2.6
1191 	 */
1192 	public void unselectPath(TreePath path)
1193 	{
1194 		gtk_icon_view_unselect_path(gtkIconView, (path is null) ? null : path.getTreePathStruct());
1195 	}
1196 
1197 	/**
1198 	 * Undoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this
1199 	 * method sets #GtkIconView:reorderable to %FALSE.
1200 	 *
1201 	 * Since: 2.8
1202 	 */
1203 	public void unsetModelDragDest()
1204 	{
1205 		gtk_icon_view_unset_model_drag_dest(gtkIconView);
1206 	}
1207 
1208 	/**
1209 	 * Undoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this
1210 	 * method sets #GtkIconView:reorderable to %FALSE.
1211 	 *
1212 	 * Since: 2.8
1213 	 */
1214 	public void unsetModelDragSource()
1215 	{
1216 		gtk_icon_view_unset_model_drag_source(gtkIconView);
1217 	}
1218 
1219 	int[string] connectedSignals;
1220 
1221 	bool delegate(IconView)[] onActivateCursorItemListeners;
1222 	/**
1223 	 * A [keybinding signal][GtkBindingSignal]
1224 	 * which gets emitted when the user activates the currently
1225 	 * focused item.
1226 	 *
1227 	 * Applications should not connect to it, but may emit it with
1228 	 * g_signal_emit_by_name() if they need to control activation
1229 	 * programmatically.
1230 	 *
1231 	 * The default bindings for this signal are Space, Return and Enter.
1232 	 */
1233 	void addOnActivateCursorItem(bool delegate(IconView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
1234 	{
1235 		if ( "activate-cursor-item" !in connectedSignals )
1236 		{
1237 			Signals.connectData(
1238 				this,
1239 				"activate-cursor-item",
1240 				cast(GCallback)&callBackActivateCursorItem,
1241 				cast(void*)this,
1242 				null,
1243 				connectFlags);
1244 			connectedSignals["activate-cursor-item"] = 1;
1245 		}
1246 		onActivateCursorItemListeners ~= dlg;
1247 	}
1248 	extern(C) static int callBackActivateCursorItem(GtkIconView* iconviewStruct, IconView _iconview)
1249 	{
1250 		foreach ( bool delegate(IconView) dlg; _iconview.onActivateCursorItemListeners )
1251 		{
1252 			if ( dlg(_iconview) )
1253 			{
1254 				return 1;
1255 			}
1256 		}
1257 		
1258 		return 0;
1259 	}
1260 
1261 	void delegate(TreePath, IconView)[] onItemActivatedListeners;
1262 	/**
1263 	 * The ::item-activated signal is emitted when the method
1264 	 * gtk_icon_view_item_activated() is called, when the user double
1265 	 * clicks an item with the "activate-on-single-click" property set
1266 	 * to %FALSE, or when the user single clicks an item when the
1267 	 * "activate-on-single-click" property set to %TRUE. It is also
1268 	 * emitted when a non-editable item is selected and one of the keys:
1269 	 * Space, Return or Enter is pressed.
1270 	 *
1271 	 * Params:
1272 	 *     path = the #GtkTreePath for the activated item
1273 	 */
1274 	void addOnItemActivated(void delegate(TreePath, IconView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
1275 	{
1276 		if ( "item-activated" !in connectedSignals )
1277 		{
1278 			Signals.connectData(
1279 				this,
1280 				"item-activated",
1281 				cast(GCallback)&callBackItemActivated,
1282 				cast(void*)this,
1283 				null,
1284 				connectFlags);
1285 			connectedSignals["item-activated"] = 1;
1286 		}
1287 		onItemActivatedListeners ~= dlg;
1288 	}
1289 	extern(C) static void callBackItemActivated(GtkIconView* iconviewStruct, GtkTreePath* path, IconView _iconview)
1290 	{
1291 		foreach ( void delegate(TreePath, IconView) dlg; _iconview.onItemActivatedListeners )
1292 		{
1293 			dlg(ObjectG.getDObject!(TreePath)(path), _iconview);
1294 		}
1295 	}
1296 
1297 	bool delegate(GtkMovementStep, int, IconView)[] onMoveCursorListeners;
1298 	/**
1299 	 * The ::move-cursor signal is a
1300 	 * [keybinding signal][GtkBindingSignal]
1301 	 * which gets emitted when the user initiates a cursor movement.
1302 	 *
1303 	 * Applications should not connect to it, but may emit it with
1304 	 * g_signal_emit_by_name() if they need to control the cursor
1305 	 * programmatically.
1306 	 *
1307 	 * The default bindings for this signal include
1308 	 * - Arrow keys which move by individual steps
1309 	 * - Home/End keys which move to the first/last item
1310 	 * - PageUp/PageDown which move by "pages"
1311 	 * All of these will extend the selection when combined with
1312 	 * the Shift modifier.
1313 	 *
1314 	 * Params:
1315 	 *     step = the granularity of the move, as a #GtkMovementStep
1316 	 *     count = the number of @step units to move
1317 	 */
1318 	void addOnMoveCursor(bool delegate(GtkMovementStep, int, IconView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
1319 	{
1320 		if ( "move-cursor" !in connectedSignals )
1321 		{
1322 			Signals.connectData(
1323 				this,
1324 				"move-cursor",
1325 				cast(GCallback)&callBackMoveCursor,
1326 				cast(void*)this,
1327 				null,
1328 				connectFlags);
1329 			connectedSignals["move-cursor"] = 1;
1330 		}
1331 		onMoveCursorListeners ~= dlg;
1332 	}
1333 	extern(C) static int callBackMoveCursor(GtkIconView* iconviewStruct, GtkMovementStep step, int count, IconView _iconview)
1334 	{
1335 		foreach ( bool delegate(GtkMovementStep, int, IconView) dlg; _iconview.onMoveCursorListeners )
1336 		{
1337 			if ( dlg(step, count, _iconview) )
1338 			{
1339 				return 1;
1340 			}
1341 		}
1342 		
1343 		return 0;
1344 	}
1345 
1346 	void delegate(IconView)[] onSelectAllListeners;
1347 	/**
1348 	 * A [keybinding signal][GtkBindingSignal]
1349 	 * which gets emitted when the user selects all items.
1350 	 *
1351 	 * Applications should not connect to it, but may emit it with
1352 	 * g_signal_emit_by_name() if they need to control selection
1353 	 * programmatically.
1354 	 *
1355 	 * The default binding for this signal is Ctrl-a.
1356 	 */
1357 	void addOnSelectAll(void delegate(IconView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
1358 	{
1359 		if ( "select-all" !in connectedSignals )
1360 		{
1361 			Signals.connectData(
1362 				this,
1363 				"select-all",
1364 				cast(GCallback)&callBackSelectAll,
1365 				cast(void*)this,
1366 				null,
1367 				connectFlags);
1368 			connectedSignals["select-all"] = 1;
1369 		}
1370 		onSelectAllListeners ~= dlg;
1371 	}
1372 	extern(C) static void callBackSelectAll(GtkIconView* iconviewStruct, IconView _iconview)
1373 	{
1374 		foreach ( void delegate(IconView) dlg; _iconview.onSelectAllListeners )
1375 		{
1376 			dlg(_iconview);
1377 		}
1378 	}
1379 
1380 	void delegate(IconView)[] onSelectCursorItemListeners;
1381 	/**
1382 	 * A [keybinding signal][GtkBindingSignal]
1383 	 * which gets emitted when the user selects the item that is currently
1384 	 * focused.
1385 	 *
1386 	 * Applications should not connect to it, but may emit it with
1387 	 * g_signal_emit_by_name() if they need to control selection
1388 	 * programmatically.
1389 	 *
1390 	 * There is no default binding for this signal.
1391 	 */
1392 	void addOnSelectCursorItem(void delegate(IconView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
1393 	{
1394 		if ( "select-cursor-item" !in connectedSignals )
1395 		{
1396 			Signals.connectData(
1397 				this,
1398 				"select-cursor-item",
1399 				cast(GCallback)&callBackSelectCursorItem,
1400 				cast(void*)this,
1401 				null,
1402 				connectFlags);
1403 			connectedSignals["select-cursor-item"] = 1;
1404 		}
1405 		onSelectCursorItemListeners ~= dlg;
1406 	}
1407 	extern(C) static void callBackSelectCursorItem(GtkIconView* iconviewStruct, IconView _iconview)
1408 	{
1409 		foreach ( void delegate(IconView) dlg; _iconview.onSelectCursorItemListeners )
1410 		{
1411 			dlg(_iconview);
1412 		}
1413 	}
1414 
1415 	void delegate(IconView)[] onSelectionChangedListeners;
1416 	/**
1417 	 * The ::selection-changed signal is emitted when the selection
1418 	 * (i.e. the set of selected items) changes.
1419 	 */
1420 	void addOnSelectionChanged(void delegate(IconView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
1421 	{
1422 		if ( "selection-changed" !in connectedSignals )
1423 		{
1424 			Signals.connectData(
1425 				this,
1426 				"selection-changed",
1427 				cast(GCallback)&callBackSelectionChanged,
1428 				cast(void*)this,
1429 				null,
1430 				connectFlags);
1431 			connectedSignals["selection-changed"] = 1;
1432 		}
1433 		onSelectionChangedListeners ~= dlg;
1434 	}
1435 	extern(C) static void callBackSelectionChanged(GtkIconView* iconviewStruct, IconView _iconview)
1436 	{
1437 		foreach ( void delegate(IconView) dlg; _iconview.onSelectionChangedListeners )
1438 		{
1439 			dlg(_iconview);
1440 		}
1441 	}
1442 
1443 	void delegate(IconView)[] onToggleCursorItemListeners;
1444 	/**
1445 	 * A [keybinding signal][GtkBindingSignal]
1446 	 * which gets emitted when the user toggles whether the currently
1447 	 * focused item is selected or not. The exact effect of this
1448 	 * depend on the selection mode.
1449 	 *
1450 	 * Applications should not connect to it, but may emit it with
1451 	 * g_signal_emit_by_name() if they need to control selection
1452 	 * programmatically.
1453 	 *
1454 	 * There is no default binding for this signal is Ctrl-Space.
1455 	 */
1456 	void addOnToggleCursorItem(void delegate(IconView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
1457 	{
1458 		if ( "toggle-cursor-item" !in connectedSignals )
1459 		{
1460 			Signals.connectData(
1461 				this,
1462 				"toggle-cursor-item",
1463 				cast(GCallback)&callBackToggleCursorItem,
1464 				cast(void*)this,
1465 				null,
1466 				connectFlags);
1467 			connectedSignals["toggle-cursor-item"] = 1;
1468 		}
1469 		onToggleCursorItemListeners ~= dlg;
1470 	}
1471 	extern(C) static void callBackToggleCursorItem(GtkIconView* iconviewStruct, IconView _iconview)
1472 	{
1473 		foreach ( void delegate(IconView) dlg; _iconview.onToggleCursorItemListeners )
1474 		{
1475 			dlg(_iconview);
1476 		}
1477 	}
1478 
1479 	void delegate(IconView)[] onUnselectAllListeners;
1480 	/**
1481 	 * A [keybinding signal][GtkBindingSignal]
1482 	 * which gets emitted when the user unselects all items.
1483 	 *
1484 	 * Applications should not connect to it, but may emit it with
1485 	 * g_signal_emit_by_name() if they need to control selection
1486 	 * programmatically.
1487 	 *
1488 	 * The default binding for this signal is Ctrl-Shift-a.
1489 	 */
1490 	void addOnUnselectAll(void delegate(IconView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
1491 	{
1492 		if ( "unselect-all" !in connectedSignals )
1493 		{
1494 			Signals.connectData(
1495 				this,
1496 				"unselect-all",
1497 				cast(GCallback)&callBackUnselectAll,
1498 				cast(void*)this,
1499 				null,
1500 				connectFlags);
1501 			connectedSignals["unselect-all"] = 1;
1502 		}
1503 		onUnselectAllListeners ~= dlg;
1504 	}
1505 	extern(C) static void callBackUnselectAll(GtkIconView* iconviewStruct, IconView _iconview)
1506 	{
1507 		foreach ( void delegate(IconView) dlg; _iconview.onUnselectAllListeners )
1508 		{
1509 			dlg(_iconview);
1510 		}
1511 	}
1512 }