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

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

=head1 Gnome::Gtk3::ComboBox

A widget used to choose from a list of items

![](images/combo-box.png)

=head1 Description

A B<Gnome::Gtk3::ComboBox> is a widget that allows the user to choose from a list of valid choices. The B<Gnome::Gtk3::ComboBox> displays the selected choice. When activated, the B<Gnome::Gtk3::ComboBox> displays a popup which allows the user to make a new choice. The style in which the selected value is displayed, and the style of the popup is determined by the current theme. It may be similar to a Windows-style combo box.

The B<Gnome::Gtk3::ComboBox> uses the model-view pattern; the list of valid choices is specified in the form of a tree model, and the display of the choices can be adapted to the data in the model by using cell renderers, as you would in a tree view. This is possible since B<Gnome::Gtk3::ComboBox> implements the B<Gnome::Gtk3::CellLayout> interface. The tree model holding the valid choices is not restricted to a flat list, it can be a real tree, and the popup will reflect the tree structure.

To allow the user to enter values not in the model, the “has-entry” property allows the B<Gnome::Gtk3::ComboBox> to contain a B<Gnome::Gtk3::Entry>. This entry can be accessed by calling C<get-child()> on the combo box.

For a simple list of textual choices, the model-view API of B<Gnome::Gtk3::ComboBox> can be a bit overwhelming. In this case, B<Gnome::Gtk3::ComboBoxText> offers a simple alternative. Both B<Gnome::Gtk3::ComboBox> and B<Gnome::Gtk3::ComboBoxText> can contain an entry.

=head2 Css Nodes

  combobox
  ├── box.linked
  │   ╰── button.combo
  │       ╰── box
  │           ├── cellview
  │           ╰── arrow
  ╰── window.popup

A normal combobox contains a box with the .linked class, a button
with the .combo class and inside those buttons, there are a cellview and
an arrow.

  combobox
  ├── box.linked
  │   ├── entry.combo
  │   ╰── button.combo
  │       ╰── box
  │           ╰── arrow
  ╰── window.popup

A B<Gnome::Gtk3::ComboBox> with an entry has a single CSS node with name combobox. It contains a bx with the .linked class and that box contains an entry and a button, both with the .combo class added. The button also contains another node with name arrow.


=head2 See Also

B<Gnome::Gtk3::ComboBoxText>, B<Gnome::Gtk3::TreeModel>, B<Gnome::Gtk3::CellRenderer>


=head1 Synopsis
=head2 Declaration

  unit class Gnome::Gtk3::ComboBox;
  also is Gnome::Gtk3::Bin;
  also does Gnome::Gtk3::CellLayout;


=head2 Uml Diagram

![](plantuml/ComboBox-ea.svg)


=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::ComboBox:api<1>;

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

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

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


=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::N::GlibToRakuTypes:api<1>;

use Gnome::Gtk3::Enums:api<1>;
use Gnome::Gtk3::Bin:api<1>;
use Gnome::Gtk3::CellLayout:api<1>;
use Gnome::Gtk3::TreeIter:api<1>;

#-------------------------------------------------------------------------------
# /usr/include/gtk-3.0/gtk/INCLUDE
# https://developer.gnome.org/WWW
unit class Gnome::Gtk3::ComboBox:auth<github:MARTIMM>:api<1>;
also is Gnome::Gtk3::Bin;
also does Gnome::Gtk3::CellLayout;

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

=head3 default, no options

Create a new ComboBox object.

  multi method new ( )


=head3 :native-object

Create a ComboBox object using a native object from elsewhere. See also B<Gnome::N::TopLevelClassSupport>.

  multi method new ( N-GObject :$native-object! )


=head3 :build-id

Create a ComboBox object using a native object returned from a builder. See also B<Gnome::GObject::Object>.

  multi method new ( Str :$build-id! )

=end pod

#TM:1:new():inheriting
#TM:1:new():
#TM:4:new(:native-object):Gnome::N::TopLevelClassSupport
#TM:4:new(:build-id):Gnome::GObject::Object
submethod BUILD ( *%options ) {

  $signals-added = self.add-signal-types( $?CLASS.^name,
    :w0<changed popup popdown>, :w1<move-active format-entry-text>,
  ) unless $signals-added;

  # prevent creating wrong native-objects
  if self.^name eq 'Gnome::Gtk3::ComboBox' or %options<GtkComboBox> {

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

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

    # process all other options
    else {
      my $no;
      if ? %options<___x___> {
        #$no = %options<___x___>;
        #$no .= _get-native-object-no-reffing unless $no ~~ N-GObject;
        #$no = _gtk_combo_box_new___x___($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_combo_box_new();
      }
      #}}

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

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

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

  my Str $new-patt = $native-sub.subst( '_', '-', :g);

  my Callable $s;
  try { $s = &::("gtk_combo_box_$native-sub"); };
  if ?$s {
    Gnome::N::deprecate(
      "gtk_combo_box_$native-sub", $new-patt, '0.47.4', '0.50.0'
    );
  }

  else {
    try { $s = &::("gtk_$native-sub"); } unless ?$s;
    if ?$s {
      Gnome::N::deprecate(
        "gtk_$native-sub", $new-patt.subst('combo-box-'),
        '0.47.4', '0.50.0'
      );
    }

    else {
      try { $s = &::($native-sub); } if !$s and $native-sub ~~ m/^ 'gtk_' /;
      if ?$s {
        Gnome::N::deprecate(
          "$native-sub", $new-patt.subst('gtk-combo-box-'),
          '0.47.4', '0.50.0'
        );
      }
    }
  }

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

  $s;
}

#-------------------------------------------------------------------------------
#TM:0:get-active:
=begin pod
=head2 get-active

Returns the index of the currently active item, or -1 if there’s no active item. If the model is a non-flat treemodel, and the active item is not an immediate child of the root of the tree, this function returns `gtk_tree_path_get_indices (path)[0]`, where `path` is the B<Gnome::Gtk3::TreePath> of the active item.

Returns: An integer which is the index of the currently active item, or -1 if there’s no active item.

  method get-active ( --> Int )

=end pod

method get-active ( --> Int ) {
  gtk_combo_box_get_active( self._f('GtkComboBox'))
}

sub gtk_combo_box_get_active (
  N-GObject $combo_box --> gint
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-active-id:
=begin pod
=head2 get-active-id

Returns the ID of the active row of I<combo_box>. This value is taken from the active row and the column specified by the I<id-column> property of I<combo_box> (see C<set_id_column()>).

The returned value is an interned string which means that you can compare the pointer by value to other interned strings and that you must not free it.

If the I<id-column> property of I<combo_box> is not set, or if no row is active, or if the active row has a C<undefined> ID value, then C<undefined> is returned.

Returns: the ID of the active row, or C<undefined>

  method get-active-id ( --> Str )

=end pod

method get-active-id ( --> Str ) {
  gtk_combo_box_get_active_id( self._f('GtkComboBox'))
}

sub gtk_combo_box_get_active_id (
  N-GObject $combo_box --> gchar-ptr
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-active-iter:
=begin pod
=head2 get-active-iter

Sets I<iter> to point to the currently active item, if any item is active. Otherwise, I<iter> is left unchanged.

Returns: C<True> if I<iter> was set, C<False> otherwise

  method get-active-iter ( N-GtkTreeIter $iter --> Bool )

=item $iter; A B<Gnome::Gtk3::TreeIter>
=end pod

method get-active-iter ( N-GtkTreeIter $iter --> Bool ) {
  gtk_combo_box_get_active_iter( self._f('GtkComboBox'), $iter).Bool
}

sub gtk_combo_box_get_active_iter (
  N-GObject $combo_box, N-GtkTreeIter $iter --> gboolean
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-button-sensitivity:
=begin pod
=head2 get-button-sensitivity

Returns whether the combo box sets the dropdown button sensitive or not when there are no items in the model.

Returns: C<GTK_SENSITIVITY_ON> if the dropdown button is sensitive when the model is empty, C<GTK_SENSITIVITY_OFF> if the button is always insensitive or C<GTK_SENSITIVITY_AUTO> if it is only sensitive as long as the model has one item to be selected.

  method get-button-sensitivity ( --> GtkSensitivityType )

=end pod

method get-button-sensitivity ( --> GtkSensitivityType ) {
  gtk_combo_box_get_button_sensitivity( self._f('GtkComboBox'))
}

sub gtk_combo_box_get_button_sensitivity (
  N-GObject $combo_box --> GEnum
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-column-span-column:
=begin pod
=head2 get-column-span-column

Returns the column with column span information for I<combo_box>.

Returns: the column span column.

  method get-column-span-column ( --> Int )

=end pod

method get-column-span-column ( --> Int ) {
  gtk_combo_box_get_column_span_column( self._f('GtkComboBox'))
}

sub gtk_combo_box_get_column_span_column (
  N-GObject $combo_box --> gint
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-entry-text-column:
=begin pod
=head2 get-entry-text-column

Returns the column which I<combo_box> is using to get the strings from to display in the internal entry.

Returns: A column in the data source model of I<combo_box>.

  method get-entry-text-column ( --> Int )

=end pod

method get-entry-text-column ( --> Int ) {
  gtk_combo_box_get_entry_text_column( self._f('GtkComboBox'))
}

sub gtk_combo_box_get_entry_text_column (
  N-GObject $combo_box --> gint
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-has-entry:
=begin pod
=head2 get-has-entry

Returns whether the combo box has an entry.

Returns: whether there is an entry in I<combo_box>.

  method get-has-entry ( --> Bool )

=end pod

method get-has-entry ( --> Bool ) {
  gtk_combo_box_get_has_entry( self._f('GtkComboBox')).Bool
}

sub gtk_combo_box_get_has_entry (
  N-GObject $combo_box --> gboolean
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-id-column:
=begin pod
=head2 get-id-column

Returns the column which I<combo_box> is using to get string IDs for values from.

Returns: A column in the data source model of I<combo_box>.

  method get-id-column ( --> Int )

=end pod

method get-id-column ( --> Int ) {
  gtk_combo_box_get_id_column( self._f('GtkComboBox'))
}

sub gtk_combo_box_get_id_column (
  N-GObject $combo_box --> gint
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-model:
=begin pod
=head2 get-model

Returns the B<Gnome::Gtk3::TreeModel> which is acting as data source for I<combo_box>.

Returns: A B<Gnome::Gtk3::TreeModel> which was passed during construction.

  method get-model ( --> N-GObject )

=end pod

method get-model ( --> N-GObject ) {
  gtk_combo_box_get_model( self._f('GtkComboBox'))
}

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

#`{{
#-------------------------------------------------------------------------------
#TM:0:get-popup-accessible:
=begin pod
=head2 get-popup-accessible

Gets the accessible object corresponding to the combo box’s popup.

This function is mostly intended for use by accessibility technologies; applications should have little use for it.

Returns: the accessible object corresponding to the combo box’s popup.

  method get-popup-accessible ( --> AtkObject )

=end pod

method get-popup-accessible ( --> AtkObject ) {
  gtk_combo_box_get_popup_accessible( self._f('GtkComboBox'))
}

sub gtk_combo_box_get_popup_accessible (
  N-GObject $combo_box --> AtkObject
) is native(&gtk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:get-popup-fixed-width:
=begin pod
=head2 get-popup-fixed-width

Gets whether the popup uses a fixed width matching the allocated width of the combo box.

Returns: C<True> if the popup uses a fixed width

  method get-popup-fixed-width ( --> Bool )

=end pod

method get-popup-fixed-width ( --> Bool ) {
  gtk_combo_box_get_popup_fixed_width( self._f('GtkComboBox')).Bool
}

sub gtk_combo_box_get_popup_fixed_width (
  N-GObject $combo_box --> gboolean
) is native(&gtk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:get-row-separator-func:
=begin pod
=head2 get-row-separator-func

Returns the current row separator function.

Returns: the current row separator function.

  method get-row-separator-func ( --> GtkTreeViewRowSeparatorFunc )

=end pod

method get-row-separator-func ( --> GtkTreeViewRowSeparatorFunc ) {
  gtk_combo_box_get_row_separator_func( self._f('GtkComboBox'))
}

sub gtk_combo_box_get_row_separator_func (
  N-GObject $combo_box --> GtkTreeViewRowSeparatorFunc
) is native(&gtk-lib)
  { * }
}}

#-------------------------------------------------------------------------------
#TM:0:get-row-span-column:
=begin pod
=head2 get-row-span-column

Returns the column with row span information for I<combo_box>.

Returns: the row span column.

  method get-row-span-column ( --> Int )

=end pod

method get-row-span-column ( --> Int ) {
  gtk_combo_box_get_row_span_column( self._f('GtkComboBox'))
}

sub gtk_combo_box_get_row_span_column (
  N-GObject $combo_box --> gint
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-wrap-width:
=begin pod
=head2 get-wrap-width

Returns the wrap width which is used to determine the number of columns for the popup menu. If the wrap width is larger than 1, the combo box is in table mode.

Returns: the wrap width.

  method get-wrap-width ( --> Int )

=end pod

method get-wrap-width ( --> Int ) {
  gtk_combo_box_get_wrap_width( self._f('GtkComboBox'))
}

sub gtk_combo_box_get_wrap_width (
  N-GObject $combo_box --> gint
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:popdown:
=begin pod
=head2 popdown

Hides the menu or dropdown list of I<combo_box>.

This function is mostly intended for use by accessibility technologies; applications should have little use for it.

  method popdown ( )

=end pod

method popdown ( ) {
  gtk_combo_box_popdown( self._f('GtkComboBox'));
}

sub gtk_combo_box_popdown (
  N-GObject $combo_box
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:popup:
=begin pod
=head2 popup

Pops up the menu or dropdown list of I<combo_box>.

This function is mostly intended for use by accessibility technologies; applications should have little use for it.

Before calling this, I<combo_box> must be mapped, or nothing will happen.

  method popup ( )

=end pod

method popup ( ) {
  gtk_combo_box_popup( self._f('GtkComboBox'));
}

sub gtk_combo_box_popup (
  N-GObject $combo_box
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:popup-for-device:
=begin pod
=head2 popup-for-device

Pops up the menu or dropdown list of I<combo_box>, the popup window will be grabbed so only I<device> and its associated pointer/keyboard are the only B<Gnome::Gdk3::Devices> able to send events to it.

  method popup-for-device ( N-GObject() $device )

=item $device; a B<Gnome::Gdk3::Device>
=end pod

method popup-for-device ( N-GObject() $device ) {
  gtk_combo_box_popup_for_device( self._f('GtkComboBox'), $device);
}

sub gtk_combo_box_popup_for_device (
  N-GObject $combo_box, N-GObject $device
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-active:
=begin pod
=head2 set-active

Sets the active item of I<combo_box> to be the item at I<index>.

  method set-active ( Int() $index )

=item $index; An index in the model passed during construction, or -1 to have no active item
=end pod

method set-active ( Int() $index ) {
  gtk_combo_box_set_active( self._f('GtkComboBox'), $index);
}

sub gtk_combo_box_set_active (
  N-GObject $combo_box, gint $index
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-active-id:
=begin pod
=head2 set-active-id

Changes the active row of I<combo_box> to the one that has an ID equal to I<active_id>, or unsets the active row if I<active_id> is C<undefined>. Rows having a C<undefined> ID string cannot be made active by this function.

If the I<id-column> property of I<combo_box> is unset or if no row has the given ID then the function does nothing and returns C<False>.

Returns: C<True> if a row with a matching ID was found. If a C<undefined> I<active_id> was given to unset the active row, the function always returns C<True>.

  method set-active-id ( Str $active_id --> Bool )

=item $active_id; the ID of the row to select, or C<undefined>
=end pod

method set-active-id ( Str $active_id --> Bool ) {
  gtk_combo_box_set_active_id( self._f('GtkComboBox'), $active_id).Bool
}

sub gtk_combo_box_set_active_id (
  N-GObject $combo_box, gchar-ptr $active_id --> gboolean
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-active-iter:
=begin pod
=head2 set-active-iter

Sets the current active item to be the one referenced by I<iter>, or unsets the active item if I<iter> is C<undefined>.

  method set-active-iter ( N-GtkTreeIter $iter )

=item $iter; The B<Gnome::Gtk3::TreeIter>, or C<undefined>
=end pod

method set-active-iter ( N-GtkTreeIter $iter ) {
  gtk_combo_box_set_active_iter( self._f('GtkComboBox'), $iter);
}

sub gtk_combo_box_set_active_iter (
  N-GObject $combo_box, N-GtkTreeIter $iter
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-button-sensitivity:
=begin pod
=head2 set-button-sensitivity

Sets whether the dropdown button of the combo box should be always sensitive (C<GTK_SENSITIVITY_ON>), never sensitive (C<GTK_SENSITIVITY_OFF>) or only if there is at least one item to display (C<GTK_SENSITIVITY_AUTO>).

  method set-button-sensitivity ( GtkSensitivityType $sensitivity )

=item $sensitivity; specify the sensitivity of the dropdown button
=end pod

method set-button-sensitivity ( GtkSensitivityType $sensitivity ) {
  gtk_combo_box_set_button_sensitivity( self._f('GtkComboBox'), $sensitivity);
}

sub gtk_combo_box_set_button_sensitivity (
  N-GObject $combo_box, GEnum $sensitivity
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-column-span-column:
=begin pod
=head2 set-column-span-column

Sets the column with column span information for I<combo_box> to be I<column_span>. The column span column contains integers which indicate how many columns an item should span.

  method set-column-span-column ( Int() $column_span )

=item $column_span; A column in the model passed during construction
=end pod

method set-column-span-column ( Int() $column_span ) {
  gtk_combo_box_set_column_span_column( self._f('GtkComboBox'), $column_span);
}

sub gtk_combo_box_set_column_span_column (
  N-GObject $combo_box, gint $column_span
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-entry-text-column:
=begin pod
=head2 set-entry-text-column

Sets the model column which I<combo_box> should use to get strings from to be I<text_column>. The column I<text_column> in the model of I<combo_box> must be of type C<G_TYPE_STRING>.

This is only relevant if I<combo_box> has been created with I<has-entry> as C<True>.

  method set-entry-text-column ( Int() $text_column )

=item $text_column; A column in I<model> to get the strings from for the internal entry
=end pod

method set-entry-text-column ( Int() $text_column ) {
  gtk_combo_box_set_entry_text_column( self._f('GtkComboBox'), $text_column);
}

sub gtk_combo_box_set_entry_text_column (
  N-GObject $combo_box, gint $text_column
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-id-column:
=begin pod
=head2 set-id-column

Sets the model column which I<combo_box> should use to get string IDs for values from. The column I<id_column> in the model of I<combo_box> must be of type C<G_TYPE_STRING>.

  method set-id-column ( Int() $id_column )

=item $id_column; A column in I<model> to get string IDs for values from
=end pod

method set-id-column ( Int() $id_column ) {
  gtk_combo_box_set_id_column( self._f('GtkComboBox'), $id_column);
}

sub gtk_combo_box_set_id_column (
  N-GObject $combo_box, gint $id_column
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-model:
=begin pod
=head2 set-model

Sets the model used by I<combo_box> to be I<model>. Will unset a previously set model (if applicable). If model is C<undefined>, then it will unset the model.

Note that this function does not clear the cell renderers, you have to call C<gtk_cell_layout_clear()> yourself if you need to set up different cell renderers for the new model.

  method set-model ( N-GObject() $model )

=item $model; A B<Gnome::Gtk3::TreeModel>
=end pod

method set-model ( N-GObject() $model ) {
  gtk_combo_box_set_model( self._f('GtkComboBox'), $model);
}

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

#-------------------------------------------------------------------------------
#TM:0:set-popup-fixed-width:
=begin pod
=head2 set-popup-fixed-width

Specifies whether the popup’s width should be a fixed width matching the allocated width of the combo box.

  method set-popup-fixed-width ( Bool $fixed )

=item $fixed; whether to use a fixed popup width
=end pod

method set-popup-fixed-width ( Bool $fixed ) {
  gtk_combo_box_set_popup_fixed_width( self._f('GtkComboBox'), $fixed);
}

sub gtk_combo_box_set_popup_fixed_width (
  N-GObject $combo_box, gboolean $fixed
) is native(&gtk-lib)
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:set-row-separator-func:
=begin pod
=head2 set-row-separator-func

Sets the row separator function, which is used to determine whether a row should be drawn as a separator. If the row separator function is C<undefined>, no separators are drawn. This is the default value.

  method set-row-separator-func ( GtkTreeViewRowSeparatorFunc $func, Pointer $data, GDestroyNotify $destroy )

=item $func; a B<Gnome::Gtk3::TreeViewRowSeparatorFunc>
=item $data; user data to pass to I<func>, or C<undefined>
=item $destroy; destroy notifier for I<data>, or C<undefined>
=end pod

method set-row-separator-func ( GtkTreeViewRowSeparatorFunc $func, Pointer $data, GDestroyNotify $destroy ) {
  gtk_combo_box_set_row_separator_func( self._f('GtkComboBox'), $func, $data, $destroy);
}

sub gtk_combo_box_set_row_separator_func (
  N-GObject $combo_box, GtkTreeViewRowSeparatorFunc $func, gpointer $data, GDestroyNotify $destroy
) is native(&gtk-lib)
  { * }
}}
#-------------------------------------------------------------------------------
#TM:0:set-row-span-column:
=begin pod
=head2 set-row-span-column

Sets the column with row span information for I<combo_box> to be I<row_span>. The row span column contains integers which indicate how many rows an item should span.

  method set-row-span-column ( Int() $row_span )

=item $row_span; A column in the model passed during construction.
=end pod

method set-row-span-column ( Int() $row_span ) {
  gtk_combo_box_set_row_span_column( self._f('GtkComboBox'), $row_span);
}

sub gtk_combo_box_set_row_span_column (
  N-GObject $combo_box, gint $row_span
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:set-wrap-width:
=begin pod
=head2 set-wrap-width

Sets the wrap width of I<combo_box> to be I<width>. The wrap width is basically the preferred number of columns when you want the popup to be layed out in a table.

  method set-wrap-width ( Int() $width )

=item $width; Preferred number of columns
=end pod

method set-wrap-width ( Int() $width ) {
  gtk_combo_box_set_wrap_width( self._f('GtkComboBox'), $width);
}

sub gtk_combo_box_set_wrap_width (
  N-GObject $combo_box, gint $width
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:_gtk_combo_box_new:
#`{{
=begin pod
=head2 _gtk_combo_box_new

Creates a new empty B<Gnome::Gtk3::ComboBox>.

Returns: A new B<Gnome::Gtk3::ComboBox>.

  method _gtk_combo_box_new ( --> N-GObject )

=end pod
}}

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

#-------------------------------------------------------------------------------
#TM:1:_gtk_combo_box_new_with_area:
#`{{
=begin pod
=head2 _gtk_combo_box_new_with_area

Creates a new empty B<Gnome::Gtk3::ComboBox> using I<area> to layout cells.

Returns: A new B<Gnome::Gtk3::ComboBox>.

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

=item $area; the B<Gnome::Gtk3::CellArea> to use to layout cell renderers
=end pod
}}

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

#-------------------------------------------------------------------------------
#TM:1:_gtk_combo_box_new_with_area_and_entry:
#`{{
=begin pod
=head2 _gtk_combo_box_new_with_area_and_entry

Creates a new empty B<Gnome::Gtk3::ComboBox> with an entry.

The new combo box will use I<area> to layout cells.

Returns: A new B<Gnome::Gtk3::ComboBox>.

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

=item $area; the B<Gnome::Gtk3::CellArea> to use to layout cell renderers
=end pod
}}

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

#-------------------------------------------------------------------------------
#TM:1:_gtk_combo_box_new_with_entry:
#`{{
=begin pod
=head2 _gtk_combo_box_new_with_entry

Creates a new empty B<Gnome::Gtk3::ComboBox> with an entry.

Returns: A new B<Gnome::Gtk3::ComboBox>.

  method _gtk_combo_box_new_with_entry ( --> N-GObject )

=end pod
}}

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

#-------------------------------------------------------------------------------
#TM:1:_gtk_combo_box_new_with_model:
#`{{
=begin pod
=head2 _gtk_combo_box_new_with_model

Creates a new B<Gnome::Gtk3::ComboBox> with the model initialized to I<model>.

Returns: A new B<Gnome::Gtk3::ComboBox>.

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

=item $model; A B<Gnome::Gtk3::TreeModel>.
=end pod
}}

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

#-------------------------------------------------------------------------------
#TM:1:_gtk_combo_box_new_with_model_and_entry:
#`{{
=begin pod
=head2 _gtk_combo_box_new_with_model_and_entry

Creates a new empty B<Gnome::Gtk3::ComboBox> with an entry and with the model initialized to I<model>.

Returns: A new B<Gnome::Gtk3::ComboBox>

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

=item $model; A B<Gnome::Gtk3::TreeModel>
=end pod
}}

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






#`{{
#-------------------------------------------------------------------------------
#TM:1:get-active:
=begin pod
=head2 get-active

Returns the index of the currently active item, or -1 if there’s no active item. If the model is a non-flat treemodel, and the active item is not an immediate child of the root of the tree, this function returns `gtk_tree_path_get_indices (path)[0]`, where `path` is the B<Gnome::Gtk3::TreePath> of the active item.

Returns: An integer which is the index of the currently active item, or -1 if there’s no active item.

  method get-active ( --> Int )

=end pod

method get-active ( --> Int ) {
  gtk_combo_box_get_active(self._f('GtkComboBox'))
}

sub gtk_combo_box_get_active (
  N-GObject $combo_box --> gint
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:2:get-active-id:
=begin pod
=head2 get-active-id

Returns the ID of the active row of I<combo_box>. This value is taken from the active row and the column specified by the I<id-column> property of I<combo_box> (see C<set_id_column()>).

The returned value is an interned string which means that you can compare the pointer by value to other interned strings and that you must not free it.

If the I<id-column> property of I<combo_box> is not set, or if no row is active, or if the active row has a C<undefined> ID value, then C<undefined> is returned.

Returns: the ID of the active row, or C<undefined>

  method get-active-id ( --> Str )

=end pod

method get-active-id ( --> Str ) {
  gtk_combo_box_get_active_id(
    self._f('GtkComboBox'),
  )
}

sub gtk_combo_box_get_active_id (
  N-GObject $combo_box --> gchar-ptr
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-active-iter:
=begin pod
=head2 get-active-iter

Sets I<iter> to point to the currently active item, if any item is active. Otherwise, I<iter> is left unchanged.

Returns: C<True> if I<iter> was set, C<False> otherwise

  method get-active-iter ( N-GtkTreeIter $iter --> Bool )

=item $iter; A B<Gnome::Gtk3::TreeIter>
=end pod

method get-active-iter ( N-GtkTreeIter $iter --> Bool ) {

  gtk_combo_box_get_active_iter(
    self._f('GtkComboBox'), $iter
  ).Bool
}

sub gtk_combo_box_get_active_iter (
  N-GObject $combo_box, N-GtkTreeIter $iter --> gboolean
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-button-sensitivity:
=begin pod
=head2 get-button-sensitivity

Returns whether the combo box sets the dropdown button sensitive or not when there are no items in the model.

Returns: C<GTK_SENSITIVITY_ON> if the dropdown button is sensitive when the model is empty, C<GTK_SENSITIVITY_OFF> if the button is always insensitive or C<GTK_SENSITIVITY_AUTO> if it is only sensitive as long as the model has one item to be selected.

  method get-button-sensitivity ( --> GtkSensitivityType )

=end pod

method get-button-sensitivity ( --> GtkSensitivityType ) {

  gtk_combo_box_get_button_sensitivity(
    self._f('GtkComboBox'),
  )
}

sub gtk_combo_box_get_button_sensitivity (
  N-GObject $combo_box --> GEnum
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:get-column-span