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