### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gtk3/IconView.rakumod
### ----------------------------------------------------
### -- Chunk 1 of 2
#TL:1:Gnome::Gtk3::IconView:

use v6;
#-------------------------------------------------------------------------------
=begin pod

=head1 Gnome::Gtk3::IconView

A widget which displays a list of icons in a grid

![](images/icon-view.png)

=head1 Description

B<Gnome::Gtk3::IconView> provides an alternative view on a B<Gnome::Gtk3::TreeModel>. It displays the model as a grid of icons with labels. Like B<Gnome::Gtk3::TreeView>, it allows to select one or multiple items (depending on the selection mode, see C<gtk_icon_view_set_selection_mode()>). In addition to selection with the arrow keys, B<Gnome::Gtk3::IconView> supports rubberband selection, which is controlled by dragging the pointer.

Note that if the tree model is backed by an actual tree store (as opposed to a flat list where the mapping to icons is obvious), B<Gnome::Gtk3::IconView> will only display the first level of the tree and ignore the tree’s branches.


=head2 Css Nodes

  iconview.view
  ╰── [rubberband]

B<Gnome::Gtk3::IconView> has a single CSS node with name iconview and style class .view. For rubberband selection, a subnode with name rubberband is used.


=head1 Synopsis
=head2 Declaration

  unit class Gnome::Gtk3::IconView;
  also is Gnome::Gtk3::Container;
  also does Gnome::Gtk3::CellLayout;
  also does Gnome::Gtk3::Scrollable;


=head2 Uml Diagram

![](plantuml/IconView.svg)


=begin comment
=head2 Inheriting this class

Inheriting is done in a special way in that it needs a call from new() to get the native object created by the class you are inheriting from.

  use Gnome::Gtk3::IconView:api<1>;

  unit class MyGuiClass;
  also is Gnome::Gtk3::IconView;

  submethod new ( |c ) {
    # let the Gnome::Gtk3::IconView class process the options
    self.bless( :GtkIconView, |c);
  }

  submethod BUILD ( ... ) {
    ...
  }

=end comment
=comment head2 Example

=end pod
#-------------------------------------------------------------------------------
use NativeCall;

use Gnome::N::X:api<1>;
use Gnome::N::NativeLib:api<1>;
use Gnome::N::N-GObject:api<1>;

use Gnome::Glib::List:api<1>;

use Gnome::Gtk3::Container:api<1>;
use Gnome::Gtk3::TreeIter:api<1>;
use Gnome::Gtk3::TreePath:api<1>;
use Gnome::Gtk3::CellLayout:api<1>;
use Gnome::Gtk3::Scrollable:api<1>;

use Gnome::Cairo::Types:api<1>;

#-------------------------------------------------------------------------------
unit class Gnome::Gtk3::IconView:auth<github:MARTIMM>:api<1>;
also is Gnome::Gtk3::Container;
also does Gnome::Gtk3::CellLayout;
also does Gnome::Gtk3::Scrollable;

#-------------------------------------------------------------------------------
=begin pod
=head1 Types
=end pod
#-------------------------------------------------------------------------------
=begin pod
=head2 enum GtkIconViewDropPosition

An enum for determining where a dropped item goes.

=item GTK_ICON_VIEW_NO_DROP: no drop possible
=item GTK_ICON_VIEW_DROP_INTO: dropped item replaces the item
=item GTK_ICON_VIEW_DROP_LEFT: droppped item is inserted to the left
=item GTK_ICON_VIEW_DROP_RIGHT: dropped item is inserted to the right
=item GTK_ICON_VIEW_DROP_ABOVE: dropped item is inserted above
=item GTK_ICON_VIEW_DROP_BELOW: dropped item is inserted below

=end pod

#TE:0:GtkIconViewDropPosition:
enum GtkIconViewDropPosition is export (
  'GTK_ICON_VIEW_NO_DROP',
  'GTK_ICON_VIEW_DROP_INTO',
  'GTK_ICON_VIEW_DROP_LEFT',
  'GTK_ICON_VIEW_DROP_RIGHT',
  'GTK_ICON_VIEW_DROP_ABOVE',
  'GTK_ICON_VIEW_DROP_BELOW'
);

#-------------------------------------------------------------------------------
my Bool $signals-added = False;
#-------------------------------------------------------------------------------
=begin pod
=head1 Methods
=head2 new

=head3 new()

Creates a new B<Gnome::Gtk3::IconView> widget

  multi method new ( )

=end pod

# TM:0:new():inheriting
#TM:1:new():
#TM:0:new(:cell-area):
#TM:0:new(:model):
#TM:4:new(:native-object):Gnome::N::TopLevelClassSupport
#TM:4:new(:build-id):Gnome::GObject::Object

submethod BUILD ( *%options ) {

  # add signal info in the form of w*<signal-name>.
  unless $signals-added {
    $signals-added = self.add-signal-types( $?CLASS.^name,
      :w2<move-cursor>, :w1<item-activated>, :w0<selection-changed select-all unselect-all select-cursor-item toggle-cursor-item activate-cursor-item>,
    );

    # signals from interfaces
    #_add_..._signal_types($?CLASS.^name);
  }

  # prevent creating wrong native-objects
  if self.^name eq 'Gnome::Gtk3::IconView' #`{{ or %options<GtkIconView> }} {

    # check if native object is set by a parent class
    if self.is-valid { }

    # process all options

    # check if common options are handled by some parent
    elsif %options<native-object>:exists or %options<widget>:exists { }
    elsif %options<build-id>:exists { }

    else {
      my $no;
      if ? %options<model> {
        $no = %options<model>;
        $no .= _get-native-object-no-reffing
          if $no.^can('_get-native-object-no-reffing');
        $no = _gtk_icon_view_new_with_model($no);
      }

#      #`{{ use this when the module is not made inheritable
      # check if there are unknown options
      elsif %options.elems {
        die X::Gnome.new(
          :message(
            'Unsupported, undefined, incomplete or wrongly typed options for ' ~
            self.^name ~ ': ' ~ %options.keys.join(', ')
          )
        );
      }
#      }}

      #`{{ when there are no defaults use this
      # check if there are any options
      elsif %options.elems == 0 {
        die X::Gnome.new(:message('No options specified ' ~ self.^name));
      }
      }}

#      #`{{ when there are defaults use this instead
      # create default object
      else {
        $no = _gtk_icon_view_new();
      }
#      }}

      self._set-native-object($no);
    }

    # only after creating the native-object, the gtype is known
    self._set-class-info('GtkIconView');

  }
}

#-------------------------------------------------------------------------------
# no pod. user does not have to know about it.
method _fallback ( $native-sub is copy --> Callable ) {

  my Callable $s;
  try { $s = &::("gtk_icon_view_$native-sub"); };
# check for gtk_, gdk_, g_, pango_, cairo_ !!!
  try { $s = &::("gtk_$native-sub"); } unless ?$s;
  try { $s = &::($native-sub); } if !$s and $native-sub ~~ m/^ 'gtk_' /;

  self._set-class-name-of-sub('GtkIconView');
  $s = callsame unless ?$s;

  $s;
}


#-------------------------------------------------------------------------------
#TM:1:_gtk_icon_view_new:
#`{{
=begin pod
=head2 [gtk_] icon_view_new

Creates a new B<Gnome::Gtk3::IconView> widget

Returns: A newly created B<Gnome::Gtk3::IconView> widget

  method gtk_icon_view_new ( --> N-GObject )


=end pod
}}

sub _gtk_icon_view_new (  --> N-GObject )
  is native(&gtk-lib)
  is symbol('gtk_icon_view_new')
  { * }

#-------------------------------------------------------------------------------
#TM:0:_gtk_icon_view_new_with_area:
#`{{
=begin pod
=head2 [[gtk_] icon_view_] new_with_area

Creates a new B<Gnome::Gtk3::IconView> widget using the specified I<area> to layout cells inside the icons.

Returns: A newly created B<Gnome::Gtk3::IconView> widget

  method gtk_icon_view_new_with_area ( N-GObject $area --> N-GObject )

=item N-GObject $area; the B<Gnome::Gtk3::CellArea> to use to layout cells

=end pod
}}

sub _gtk_icon_view_new_with_area ( N-GObject $area --> N-GObject )
  is native(&gtk-lib)
  is symbol('gtk_icon_view_new_with_area')
  { * }

#-------------------------------------------------------------------------------
#TM:0:_gtk_icon_view_new_with_model:
#`{{
=begin pod
=head2 [[gtk_] icon_view_] new_with_model

Creates a new B<Gnome::Gtk3::IconView> widget with the model I<model>.

Returns: A newly created B<Gnome::Gtk3::IconView> widget.

  method gtk_icon_view_new_with_model ( N-GObject $model --> N-GObject )

=item N-GObject $model; The model.

=end pod
}}

sub _gtk_icon_view_new_with_model ( N-GObject $model --> N-GObject )
  is native(&gtk-lib)
  is symbol('gtk_icon_view_new_with_model')
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_model:
=begin pod
=head2 [[gtk_] icon_view_] set_model

Sets the model for a B<Gnome::Gtk3::IconView>. If the I<icon_view> already has a model set, it will remove it before setting the new model.  If I<model> is C<Any>, then it will unset the old model.

  method gtk_icon_view_set_model ( N-GObject $model )

=item N-GObject $model; (allow-none): The model.

=end pod

sub gtk_icon_view_set_model ( N-GObject $icon_view, N-GObject $model  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:gtk_icon_view_get_model:
=begin pod
=head2 [[gtk_] icon_view_] get_model

Returns the model the B<Gnome::Gtk3::IconView> is based on.  Returns C<Any> if the model is unset.

Returns: (nullable) (transfer none): A B<Gnome::Gtk3::TreeModel>, or C<Any> if none is currently being used.

  method gtk_icon_view_get_model ( --> N-GObject )


=end pod

sub gtk_icon_view_get_model ( N-GObject $icon_view --> N-GObject )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_text_column:
=begin pod
=head2 [[gtk_] icon_view_] set_text_column

Sets the column with text for I<icon_view> to be I<column>. The text column must be of type B<G_TYPE_STRING>.

  method gtk_icon_view_set_text_column ( Int $column )

=item Int $column; A column in the currently used model, or -1 to display no text

=end pod

sub gtk_icon_view_set_text_column ( N-GObject $icon_view, int32 $column  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_text_column:
=begin pod
=head2 [[gtk_] icon_view_] get_text_column

Returns the column with text for I<icon_view>.

Returns: the text column, or -1 if it’s unset.

  method gtk_icon_view_get_text_column ( --> Int )


=end pod

sub gtk_icon_view_get_text_column ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_markup_column:
=begin pod
=head2 [[gtk_] icon_view_] set_markup_column

Sets the column with markup information for I<icon_view> to be I<column>. The markup column must be of type B<G_TYPE_STRING>. If the markup column is set to something, it overrides the text column set by C<gtk_icon_view_set_text_column()>.

  method gtk_icon_view_set_markup_column ( Int $column )

=item Int $column; A column in the currently used model, or -1 to display no text

=end pod

sub gtk_icon_view_set_markup_column ( N-GObject $icon_view, int32 $column  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_markup_column:
=begin pod
=head2 [[gtk_] icon_view_] get_markup_column

Returns the column with markup text for I<icon_view>.

Returns: the markup column, or -1 if it’s unset.

  method gtk_icon_view_get_markup_column ( --> Int )


=end pod

sub gtk_icon_view_get_markup_column ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_pixbuf_column:
=begin pod
=head2 [[gtk_] icon_view_] set_pixbuf_column

Sets the column with pixbufs for I<icon_view> to be I<column>. The pixbuf column must be of type B<GDK_TYPE_PIXBUF>

  method gtk_icon_view_set_pixbuf_column ( Int $column )

=item Int $column; A column in the currently used model, or -1 to disable

=end pod

sub gtk_icon_view_set_pixbuf_column ( N-GObject $icon_view, int32 $column  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_pixbuf_column:
=begin pod
=head2 [[gtk_] icon_view_] get_pixbuf_column

Returns the column with pixbufs for I<icon_view>.

Returns: the pixbuf column, or -1 if it’s unset.

  method gtk_icon_view_get_pixbuf_column ( --> Int )


=end pod

sub gtk_icon_view_get_pixbuf_column ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_item_orientation:
=begin pod
=head2 [[gtk_] icon_view_] set_item_orientation

Sets the I<item-orientation> property which determines whether the labels  are drawn beside the icons instead of below.

  method gtk_icon_view_set_item_orientation ( GtkOrientation $orientation )

=item GtkOrientation $orientation; the relative position of texts and icons

=end pod

sub gtk_icon_view_set_item_orientation ( N-GObject $icon_view, int32 $orientation  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_item_orientation:
=begin pod
=head2 [[gtk_] icon_view_] get_item_orientation

Returns the value of the I<item-orientation> property which determines  whether the labels are drawn beside the icons instead of below.

Returns: the relative position of texts and icons

  method gtk_icon_view_get_item_orientation ( --> GtkOrientation )


=end pod

sub gtk_icon_view_get_item_orientation ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_columns:
=begin pod
=head2 [[gtk_] icon_view_] set_columns

Sets the I<columns> property which determines in how many columns the icons are arranged. If I<columns> is -1, the number of columns will be chosen automatically  to fill the available area.

  method gtk_icon_view_set_columns ( Int $columns )

=item Int $columns; the number of columns

=end pod

sub gtk_icon_view_set_columns ( N-GObject $icon_view, int32 $columns  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_columns:
=begin pod
=head2 [[gtk_] icon_view_] get_columns

Returns the value of the I<columns> property.

Returns: the number of columns, or -1

  method gtk_icon_view_get_columns ( --> Int )


=end pod

sub gtk_icon_view_get_columns ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_item_width:
=begin pod
=head2 [[gtk_] icon_view_] set_item_width

Sets the I<item-width> property which specifies the width  to use for each item. If it is set to -1, the icon view will  automatically determine a suitable item size.

  method gtk_icon_view_set_item_width ( Int $item_width )

=item Int $item_width; the width for each item

=end pod

sub gtk_icon_view_set_item_width ( N-GObject $icon_view, int32 $item_width  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_item_width:
=begin pod
=head2 [[gtk_] icon_view_] get_item_width

Returns the value of the I<item-width> property.

Returns: the width of a single item, or -1

  method gtk_icon_view_get_item_width ( --> Int )


=end pod

sub gtk_icon_view_get_item_width ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_spacing:
=begin pod
=head2 [[gtk_] icon_view_] set_spacing

Sets the I<spacing> property which specifies the space  which is inserted between the cells (i.e. the icon and  the text) of an item.

  method gtk_icon_view_set_spacing ( Int $spacing )

=item Int $spacing; the spacing

=end pod

sub gtk_icon_view_set_spacing ( N-GObject $icon_view, int32 $spacing  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_spacing:
=begin pod
=head2 [[gtk_] icon_view_] get_spacing

Returns the value of the I<spacing> property.

Returns: the space between cells

  method gtk_icon_view_get_spacing ( --> Int )


=end pod

sub gtk_icon_view_get_spacing ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_row_spacing:
=begin pod
=head2 [[gtk_] icon_view_] set_row_spacing

Sets the I<row-spacing> property which specifies the space  which is inserted between the rows of the icon view.

  method gtk_icon_view_set_row_spacing ( Int $row_spacing )

=item Int $row_spacing; the row spacing

=end pod

sub gtk_icon_view_set_row_spacing ( N-GObject $icon_view, int32 $row_spacing  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_row_spacing:
=begin pod
=head2 [[gtk_] icon_view_] get_row_spacing

Returns the value of the I<row-spacing> property.

Returns: the space between rows

  method gtk_icon_view_get_row_spacing ( --> Int )


=end pod

sub gtk_icon_view_get_row_spacing ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_column_spacing:
=begin pod
=head2 [[gtk_] icon_view_] set_column_spacing

Sets the I<column-spacing> property which specifies the space  which is inserted between the columns of the icon view.

  method gtk_icon_view_set_column_spacing ( Int $column_spacing )

=item Int $column_spacing; the column spacing

=end pod

sub gtk_icon_view_set_column_spacing ( N-GObject $icon_view, int32 $column_spacing  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_column_spacing:
=begin pod
=head2 [[gtk_] icon_view_] get_column_spacing

Returns the value of the I<column-spacing> property.

Returns: the space between columns

  method gtk_icon_view_get_column_spacing ( --> Int )


=end pod

sub gtk_icon_view_get_column_spacing ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_margin:
=begin pod
=head2 [[gtk_] icon_view_] set_margin

Sets the I<margin> property which specifies the space  which is inserted at the top, bottom, left and right  of the icon view.

  method gtk_icon_view_set_margin ( Int $margin )

=item Int $margin; the margin

=end pod

sub gtk_icon_view_set_margin ( N-GObject $icon_view, int32 $margin  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_margin:
=begin pod
=head2 [[gtk_] icon_view_] get_margin

Returns the value of the I<margin> property.

Returns: the space at the borders

  method gtk_icon_view_get_margin ( --> Int )


=end pod

sub gtk_icon_view_get_margin ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_item_padding:
=begin pod
=head2 [[gtk_] icon_view_] set_item_padding

Sets the  I<item-padding> property which specifies the padding around each of the icon view’s items.

  method gtk_icon_view_set_item_padding ( Int $item_padding )

=item Int $item_padding; the item padding

=end pod

sub gtk_icon_view_set_item_padding ( N-GObject $icon_view, int32 $item_padding  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_item_padding:
=begin pod
=head2 [[gtk_] icon_view_] get_item_padding

Returns the value of the I<item-padding> property.

Returns: the padding around items

  method gtk_icon_view_get_item_padding ( --> Int )


=end pod

sub gtk_icon_view_get_item_padding ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_path_at_pos:
=begin pod
=head2 [[gtk_] icon_view_] get_path_at_pos

Finds the path at the point (I<x>, I<y>), relative to bin_window coordinates. See C<gtk_icon_view_get_item_at_pos()>, if you are also interested in the cell at the specified position.  See C<gtk_icon_view_convert_widget_to_bin_window_coords()> for converting widget coordinates to bin_window coordinates.

Returns: (nullable) (transfer full): The B<Gnome::Gtk3::TreePath> corresponding to the icon or C<Any> if no icon exists at that position.

  method gtk_icon_view_get_path_at_pos ( Int $x, Int $y --> N-GtkTreePath )

=item Int $x; The x position to be identified
=item Int $y; The y position to be identified

=end pod

sub gtk_icon_view_get_path_at_pos ( N-GObject $icon_view, int32 $x, int32 $y --> N-GtkTreePath )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_item_at_pos:
=begin pod
=head2 [[gtk_] icon_view_] get_item_at_pos

Finds the path at the point (I<x>, I<y>), relative to bin_window coordinates. In contrast to C<gtk_icon_view_get_path_at_pos()>, this function also  obtains the cell at the specified position. The returned path should be freed with C<gtk_tree_path_free()>. See C<gtk_icon_view_convert_widget_to_bin_window_coords()> for converting widget coordinates to bin_window coordinates.

Returns: C<1> if an item exists at the specified position

  method gtk_icon_view_get_item_at_pos ( Int $x, Int $y, N-GtkTreePath $path, N-GObject $cell --> Int )

=item Int $x; The x position to be identified
=item Int $y; The y position to be identified
=item N-GtkTreePath $path; (out) (allow-none): Return location for the path, or C<Any>
=item N-GObject $cell; (out) (allow-none) (transfer none): Return location for the renderer responsible for the cell at (I<x>, I<y>), or C<Any>

=end pod

sub gtk_icon_view_get_item_at_pos ( N-GObject $icon_view, int32 $x, int32 $y, N-GtkTreePath $path, N-GObject $cell --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_visible_range:
=begin pod
=head2 [[gtk_] icon_view_] get_visible_range

Sets I<start_path> and I<end_path> to be the first and last visible path.  Note that there may be invisible paths in between.  Both paths should be freed with C<gtk_tree_path_free()> after use.

Returns: C<1>, if valid paths were placed in I<start_path> and I<end_path>

  method gtk_icon_view_get_visible_range ( N-GtkTreePath $start_path, N-GtkTreePath $end_path --> Int )

=item N-GtkTreePath $start_path; (out) (allow-none): Return location for start of region, or C<Any>
=item N-GtkTreePath $end_path; (out) (allow-none): Return location for end of region, or C<Any>

=end pod

sub gtk_icon_view_get_visible_range ( N-GObject $icon_view, N-GtkTreePath $start_path, N-GtkTreePath $end_path --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_activate_on_single_click:
=begin pod
=head2 [[gtk_] icon_view_] set_activate_on_single_click

Causes the  I<item-activated> signal to be emitted on a single click instead of a double click.

  method gtk_icon_view_set_activate_on_single_click ( Int $single )

=item Int $single; C<1> to emit item-activated on a single click

=end pod

sub gtk_icon_view_set_activate_on_single_click ( N-GObject $icon_view, int32 $single  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_activate_on_single_click:
=begin pod
=head2 [[gtk_] icon_view_] get_activate_on_single_click

Gets the setting set by C<gtk_icon_view_set_activate_on_single_click()>.

Returns: C<1> if item-activated will be emitted on a single click

  method gtk_icon_view_get_activate_on_single_click ( --> Int )


=end pod

sub gtk_icon_view_get_activate_on_single_click ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_selected_foreach:
=begin pod
=head2 [[gtk_] icon_view_] selected_foreach

Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function.

  method gtk_icon_view_selected_foreach ( GtkIconViewForeachFunc $func, Pointer $data )

=item GtkIconViewForeachFunc $func; (scope call): The function to call for each selected icon.
=item Pointer $data; User data to pass to the function.

=end pod

sub gtk_icon_view_selected_foreach ( N-GObject $icon_view, GtkIconViewForeachFunc $func, Pointer $data  )
  is native(&gtk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_selection_mode:
=begin pod
=head2 [[gtk_] icon_view_] set_selection_mode

Sets the selection mode of the I<icon_view>.

  method gtk_icon_view_set_selection_mode ( GtkSelectionMode $mode )

=item GtkSelectionMode $mode; The selection mode

=end pod

sub gtk_icon_view_set_selection_mode ( N-GObject $icon_view, int32 $mode  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_selection_mode:
=begin pod
=head2 [[gtk_] icon_view_] get_selection_mode

Gets the selection mode of the I<icon_view>.

Returns: the current selection mode

  method gtk_icon_view_get_selection_mode ( --> GtkSelectionMode )


=end pod

sub gtk_icon_view_get_selection_mode ( N-GObject $icon_view --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_select_path:
=begin pod
=head2 [[gtk_] icon_view_] select_path

Selects the row at I<path>.

  method gtk_icon_view_select_path ( N-GtkTreePath $path )

=item N-GtkTreePath $path; The B<Gnome::Gtk3::TreePath> to be selected.

=end pod

sub gtk_icon_view_select_path ( N-GObject $icon_view, N-GtkTreePath $path  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_unselect_path:
=begin pod
=head2 [[gtk_] icon_view_] unselect_path

Unselects the row at I<path>.

  method gtk_icon_view_unselect_path ( N-GtkTreePath $path )

=item N-GtkTreePath $path; The B<Gnome::Gtk3::TreePath> to be unselected.

=end pod

sub gtk_icon_view_unselect_path ( N-GObject $icon_view, N-GtkTreePath $path  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_path_is_selected:
=begin pod
=head2 [[gtk_] icon_view_] path_is_selected

Returns C<1> if the icon pointed to by I<path> is currently selected. If I<path> does not point to a valid location, C<0> is returned.

Returns: C<1> if I<path> is selected.

  method gtk_icon_view_path_is_selected ( N-GtkTreePath $path --> Int )

=item N-GtkTreePath $path; A B<Gnome::Gtk3::TreePath> to check selection on.

=end pod

sub gtk_icon_view_path_is_selected ( N-GObject $icon_view, N-GtkTreePath $path --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_item_row:
=begin pod
=head2 [[gtk_] icon_view_] get_item_row

Gets the row in which the item I<path> is currently displayed. Row numbers start at 0.

Returns: The row in which the item is displayed

  method gtk_icon_view_get_item_row ( N-GtkTreePath $path --> Int )

=item N-GtkTreePath $path; the B<Gnome::Gtk3::TreePath> of the item

=end pod

sub gtk_icon_view_get_item_row ( N-GObject $icon_view, N-GtkTreePath $path --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_item_column:
=begin pod
=head2 [[gtk_] icon_view_] get_item_column

Gets the column in which the item I<path> is currently displayed. Column numbers start at 0.

Returns: The column in which the item is displayed

  method gtk_icon_view_get_item_column ( N-GtkTreePath $path --> Int )

=item N-GtkTreePath $path; the B<Gnome::Gtk3::TreePath> of the item

=end pod

sub gtk_icon_view_get_item_column ( N-GObject $icon_view, N-GtkTreePath $path --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_selected_items:
=begin pod
=head2 [[gtk_] icon_view_] get_selected_items

Creates a list of paths of all selected items. Additionally, if you are planning on modifying the model after calling this function, you may want to convert the returned list into a list of B<Gnome::Gtk3::TreeRowReferences>. To do this, you can use C<gtk_tree_row_reference_new()>.  To free the return value, use: |[<!-- language="C" --> g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free); ]|

Returns: (element-type B<Gnome::Gtk3::TreePath>) (transfer full): A B<GList> containing a B<Gnome::Gtk3::TreePath> for each selected row.

  method gtk_icon_view_get_selected_items ( --> N-GList )


=end pod

sub gtk_icon_view_get_selected_items ( N-GObject $icon_view --> N-GList )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_select_all:
=begin pod
=head2 [[gtk_] icon_view_] select_all

Selects all the icons. I<icon_view> must has its selection mode set to B<GTK_SELECTION_MULTIPLE>.

  method gtk_icon_view_select_all ( )


=end pod

sub gtk_icon_view_select_all ( N-GObject $icon_view  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_unselect_all:
=begin pod
=head2 [[gtk_] icon_view_] unselect_all

Unselects all the icons.

  method gtk_icon_view_unselect_all ( )


=end pod

sub gtk_icon_view_unselect_all ( N-GObject $icon_view  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_item_activated:
=begin pod
=head2 [[gtk_] icon_view_] item_activated

Activates the item determined by I<path>.

  method gtk_icon_view_item_activated ( N-GtkTreePath $path )

=item N-GtkTreePath $path; The B<Gnome::Gtk3::TreePath> to be activated

=end pod

sub gtk_icon_view_item_activated ( N-GObject $icon_view, N-GtkTreePath $path  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_set_cursor:
=begin pod
=head2 [[gtk_] icon_view_] set_cursor

Sets the current keyboard focus to be at I<path>, and selects it.  This is useful when you want to focus the user’s attention on a particular item. If I<cell> is not C<Any>, then focus is given to the cell specified by  it. Additionally, if I<start_editing> is C<1>, then editing should be  started in the specified cell.    This function is often followed by `gtk_widget_grab_focus  (icon_view)` in order to give keyboard focus to the widget.   Please note that editing can only happen when the widget is realized.

  method gtk_icon_view_set_cursor ( N-GtkTreePath $path, N-GObject $cell, Int $start_editing )

=item N-GtkTreePath $path; A B<Gnome::Gtk3::TreePath>
=item N-GObject $cell; (allow-none): One of the cell renderers of I<icon_view>, or C<Any>
=item Int $start_editing; C<1> if the specified cell should start being edited.

=end pod

sub gtk_icon_view_set_cursor ( N-GObject $icon_view, N-GtkTreePath $path, N-GObject $cell, int32 $start_editing  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_get_cursor:
=begin pod
=head2 [[gtk_] icon_view_] get_cursor

Fills in I<path> and I<cell> with the current cursor path and cell.  If the cursor isn’t currently set, then *I<path> will be C<Any>.   If no cell currently has focus, then *I<cell> will be C<Any>.  The returned B<Gnome::Gtk3::TreePath> must be freed with C<gtk_tree_path_free()>.

Returns: C<1> if the cursor is set.

  method gtk_icon_view_get_cursor ( N-GtkTreePath $path, N-GObject $cell --> Int )

=item N-GtkTreePath $path; (out) (allow-none) (transfer full): Return location for the current cursor path, or C<Any>
=item N-GObject $cell; (out) (allow-none) (transfer none): Return location the current focus cell, or C<Any>

=end pod

sub gtk_icon_view_get_cursor ( N-GObject $icon_view, N-GtkTreePath $path, N-GObject $cell --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_icon_view_scroll_to_path:
=begin pod
=head2 [[gtk_] icon_view_] scroll_to_path

Moves the alignments of I<icon_view> to the position specified by I<path>.   I<row_align> determines where the row is placed, and I<col_align> determines  where I<column> is placed.  Both are expected to be between 0.0 and 1.0.  0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means  center.  If I<use_align> is C<0>, then the alignment arguments are ignored, and the tree does the minimum amount of work to scroll the item onto the screen. This means that the item will be scrolled to the edge closest to its current position.  If the item is currently visible on the screen, nothing is done.  This function only works if the model is set, and