### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gtk3/Notebook.rakumod
### ----------------------------------------------------
### -- Chunk 2 of 3
-page ( Int() $page_num ) {

  gtk_notebook_remove_page(
    self._get-native-object-no-reffing, $page_num
  );
}

sub gtk_notebook_remove_page (
  N-GObject $notebook, gint $page_num
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:reorder-child:
=begin pod
=head2 reorder-child

Reorders the page containing I<$child>, so that it appears in position I<$position>. If I<$position> is greater than or equal to the number of children in the list or negative, I<$child> will be moved to the end of the list.

  method reorder-child ( N-GObject $child, Int() $position )

=item N-GObject $child; the child to move
=item Int() $position; the new position, or -1 to move to the end
=end pod

method reorder-child ( $child is copy, Int() $position ) {
  $child .= _get-native-object-no-reffing unless $child ~~ N-GObject;

  gtk_notebook_reorder_child(
    self._get-native-object-no-reffing, $child, $position
  );
}

sub gtk_notebook_reorder_child (
  N-GObject $notebook, N-GObject $child, gint $position
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-action-widget:
=begin pod
=head2 set-action-widget

Sets I<$widget> as one of the action widgets. Depending on the pack type the widget will be placed before or after the tabs. You can use a B<Gnome::Gtk3::Box> if you need to pack more than one widget on the same side.

Note that action widgets are “internal” children of the notebook and thus not included in the list returned from C<gtk-container-foreach()>.

  method set-action-widget ( N-GObject $widget, GtkPackType $pack_type )

=item N-GObject $widget; a B<Gnome::Gtk3::Widget>
=item GtkPackType $pack_type; pack type of the action widget
=end pod

method set-action-widget ( $widget is copy, GtkPackType $pack_type ) {
  $widget .= _get-native-object-no-reffing unless $widget ~~ N-GObject;

  gtk_notebook_set_action_widget(
    self._get-native-object-no-reffing, $widget, $pack_type
  );
}

sub gtk_notebook_set_action_widget (
  N-GObject $notebook, N-GObject $widget, GEnum $pack_type
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-current-page:
=begin pod
=head2 set-current-page

Switches to the page number I<$page-num>.

Note that due to historical reasons, GtkNotebook refuses to switch to a page unless the child widget is visible. Therefore, it is recommended to show child widgets before adding them to a notebook.

  method set-current-page ( Int() $page_num )

=item Int() $page_num; index of the page to switch to, starting from 0. If negative, the last page will be used. If greater than the number of pages in the notebook, nothing will be done.
=end pod

method set-current-page ( Int() $page_num ) {

  gtk_notebook_set_current_page(
    self._get-native-object-no-reffing, $page_num
  );
}

sub gtk_notebook_set_current_page (
  N-GObject $notebook, gint $page_num
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-group-name:
=begin pod
=head2 set-group-name

Sets a group name for I<notebook>.

Notebooks with the same name will be able to exchange tabs via drag and drop. A notebook with a C<undefined> group name will not be able to exchange tabs with any other notebook.

  method set-group-name ( Str $group_name )

=item Str $group_name; the name of the notebook group, or C<undefined> to unset it
=end pod

method set-group-name ( Str $group_name ) {
  gtk_notebook_set_group_name( self._get-native-object-no-reffing, $group_name);
}

sub gtk_notebook_set_group_name (
  N-GObject $notebook, gchar-ptr $group_name
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-menu-label:
=begin pod
=head2 set-menu-label

Changes the menu label for the page containing I<$child>.

  method set-menu-label ( N-GObject $child, N-GObject $menu_label )

=item N-GObject $child; the child widget
=item N-GObject $menu_label; the menu label, or C<undefined> for default
=end pod

method set-menu-label ( $child is copy, $menu_label is copy ) {
  $child .= _get-native-object-no-reffing unless $child ~~ N-GObject;
  $menu_label .= _get-native-object-no-reffing unless $menu_label ~~ N-GObject;

  gtk_notebook_set_menu_label(
    self._get-native-object-no-reffing, $child, $menu_label
  );
}

sub gtk_notebook_set_menu_label (
  N-GObject $notebook, N-GObject $child, N-GObject $menu_label
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-menu-label-text:
=begin pod
=head2 set-menu-label-text

Creates a new label and sets it as the menu label of I<$child>.

  method set-menu-label-text ( N-GObject $child, Str $menu_text )

=item N-GObject $child; the child widget
=item Str $menu_text; the label text
=end pod

method set-menu-label-text ( $child is copy, Str $menu_text ) {
  $child .= _get-native-object-no-reffing unless $child ~~ N-GObject;

  gtk_notebook_set_menu_label_text(
    self._get-native-object-no-reffing, $child, $menu_text
  );
}

sub gtk_notebook_set_menu_label_text (
  N-GObject $notebook, N-GObject $child, gchar-ptr $menu_text
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-scrollable:
=begin pod
=head2 set-scrollable

Sets whether the tab label area will have arrows for scrolling if there are too many tabs to fit in the area.

  method set-scrollable ( Bool $scrollable )

=item Bool $scrollable; C<True> if scroll arrows should be added
=end pod

method set-scrollable ( Bool $scrollable ) {
  gtk_notebook_set_scrollable( self._get-native-object-no-reffing, $scrollable);
}

sub gtk_notebook_set_scrollable (
  N-GObject $notebook, gboolean $scrollable
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-show-border:
=begin pod
=head2 set-show-border

Sets whether a bevel will be drawn around the notebook pages. This only has a visual effect when the tabs are not shown. See C<set-show-tabs()>.

  method set-show-border ( Bool $show_border )

=item Bool $show_border; C<True> if a bevel should be drawn around the notebook
=end pod

method set-show-border ( Bool $show_border ) {

  gtk_notebook_set_show_border(
    self._get-native-object-no-reffing, $show_border
  );
}

sub gtk_notebook_set_show_border (
  N-GObject $notebook, gboolean $show_border
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-show-tabs:
=begin pod
=head2 set-show-tabs

Sets whether to show the tabs for the notebook or not.

  method set-show-tabs ( Bool $show_tabs )

=item Bool $show_tabs; C<True> if the tabs should be shown
=end pod

method set-show-tabs ( Bool $show_tabs ) {

  gtk_notebook_set_show_tabs(
    self._get-native-object-no-reffing, $show_tabs
  );
}

sub gtk_notebook_set_show_tabs (
  N-GObject $notebook, gboolean $show_tabs
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-tab-detachable:
=begin pod
=head2 set-tab-detachable

Sets whether the tab can be detached from I<notebook> to another notebook or widget.

Note that 2 notebooks must share a common group identificator (see C<set-group-name()>) to allow automatic tabs interchange between them.

If you want a widget to interact with a notebook through DnD (i.e.: accept dragged tabs from it) it must be set as a drop destination and accept the target “GTK-NOTEBOOK-TAB”. The notebook will fill the selection with a GtkWidget** pointing to the child widget that corresponds to the dropped tab.

Note that you should use C<detach-tab()> instead of C<Gnome::Gtk3::Container.remove()> if you want to remove the tab from the source notebook as part of accepting a drop. Otherwise, the source notebook will think that the dragged tab was removed from underneath the ongoing drag operation, and will initiate a drag cancel animation.

=begin comment
  static void on-drag-data-received (
    GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user-data
  ) {
    GtkWidget *notebook; GtkWidget **child;

    notebook = gtk-drag-get-source-widget (context); child = (void*) gtk-selection-data-get-data (data);

  // process-widget (*child);

    gtk-notebook-detach-tab (GTK-NOTEBOOK (notebook), *child);
  }
=end comment

If you want a notebook to accept drags from other widgets, you will have to set your own DnD code to do it.

  method set-tab-detachable ( N-GObject $child, Bool $detachable )

=item N-GObject $child; a child B<Gnome::Gtk3::Widget>
=item Bool $detachable; whether the tab is detachable or not
=end pod

method set-tab-detachable ( $child is copy, Bool $detachable ) {
  $child .= _get-native-object-no-reffing unless $child ~~ N-GObject;

  gtk_notebook_set_tab_detachable(
    self._get-native-object-no-reffing, $child, $detachable
  );
}

sub gtk_notebook_set_tab_detachable (
  N-GObject $notebook, N-GObject $child, gboolean $detachable
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-tab-label:
=begin pod
=head2 set-tab-label

Changes the tab label for I<$child>. If C<undefined> is specified for I<$tab-label>, then the page will have the label “page N”.

  method set-tab-label ( N-GObject $child, N-GObject $tab_label )

=item N-GObject $child; the page
=item N-GObject $tab_label; the tab label widget to use, or C<undefined> for default tab label
=end pod

method set-tab-label ( $child is copy, $tab_label is copy ) {
  $child .= _get-native-object-no-reffing unless $child ~~ N-GObject;
  $tab_label .= _get-native-object-no-reffing unless $tab_label ~~ N-GObject;

  gtk_notebook_set_tab_label(
    self._get-native-object-no-reffing, $child, $tab_label
  );
}

sub gtk_notebook_set_tab_label (
  N-GObject $notebook, N-GObject $child, N-GObject $tab_label
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-tab-label-text:
=begin pod
=head2 set-tab-label-text

Creates a new label and sets it as the tab label for the page containing I<$child>.

  method set-tab-label-text ( N-GObject $child, Str $tab_text )

=item N-GObject $child; the page
=item Str $tab_text; the label text
=end pod

method set-tab-label-text ( $child is copy, Str $tab_text ) {
  $child .= _get-native-object-no-reffing unless $child ~~ N-GObject;
  gtk_notebook_set_tab_label_text(
    self._get-native-object-no-reffing, $child, $tab_text
  );
}

sub gtk_notebook_set_tab_label_text (
  N-GObject $notebook, N-GObject $child, gchar-ptr $tab_text
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-tab-pos:
=begin pod
=head2 set-tab-pos

Sets the edge at which the tabs for switching pages in the notebook are drawn.

  method set-tab-pos ( GtkPositionType $pos )

=item GtkPositionType $pos; the edge to draw the tabs at
=end pod

method set-tab-pos ( GtkPositionType $pos ) {
  gtk_notebook_set_tab_pos( self._get-native-object-no-reffing, $pos);
}

sub gtk_notebook_set_tab_pos (
  N-GObject $notebook, GEnum $pos
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:1:set-tab-reorderable:
=begin pod
=head2 set-tab-reorderable

Sets whether the notebook tab can be reordered via drag and drop or not.

  method set-tab-reorderable ( N-GObject $child, Bool $reorderable )

=item N-GObject $child; a child B<Gnome::Gtk3::Widget>
=item Bool $reorderable; whether the tab is reorderable or not
=end pod

method set-tab-reorderable ( $child is copy, Bool $reorderable ) {
  $child .= _get-native-object-no-reffing unless $child ~~ N-GObject;

  gtk_notebook_set_tab_reorderable(
    self._get-native-object-no-reffing, $child, $reorderable
  );
}

sub gtk_notebook_set_tab_reorderable (
  N-GObject $notebook, N-GObject $child, gboolean $reorderable
) is native(&gtk-lib)
  { * }

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

Creates a new B<Gnome::Gtk3::Notebook> widget with no pages.

Returns: the newly created B<Gnome::Gtk3::Notebook>

  method _gtk_notebook_new ( --> N-GObject )

=end pod
}}

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

#-------------------------------------------------------------------------------
=begin pod
=head1 Signals

There are two ways to connect to a signal. The first option you have is to use C<register-signal()> from B<Gnome::GObject::Object>. The second option is to use C<connect-object()> directly from B<Gnome::GObject::Signal>.

=head2 First method

The positional arguments of the signal handler are all obligatory as well as their types. The named attributes C<:$widget> and user data are optional.

  # handler method
  method mouse-event ( GdkEvent $event, :$widget ) { ... }

  # connect a signal on window object
  my Gnome::Gtk3::Window $w .= new( ... );
  $w.register-signal( self, 'mouse-event', 'button-press-event');

=head2 Second method

  my Gnome::Gtk3::Window $w .= new( ... );
  my Callable $handler = sub (
    N-GObject $native, GdkEvent $event, OpaquePointer $data
  ) {
    ...
  }

  $w.connect-object( 'button-press-event', $handler);

Also here, the types of positional arguments in the signal handler are important. This is because both methods C<register-signal()> and C<connect-object()> are using the signatures of the handler routines to setup the native call interface.

=head2 Supported signals


=comment -----------------------------------------------------------------------
=comment #TS:0:create-window:
=head3 create-window

  method handler (
    N-GObject #`{ is widget } $n-gobject #`{ is widget },
    Int $int,
    Int $int,
    Int :$_handle_id,
    Gnome::GObject::Object :_widget($notebook),
    *%user-options
    --> Unknown type GTK_TYPE_NOTEBOOK
  );

=item $notebook;
=item $n-gobject #`{ is widget };
=item $int;
=item $int;
=item $_handle_id; the registered event handler id

=comment -----------------------------------------------------------------------
=comment #TS:0:page-added:
=head3 page-added

  method handler (
    N-GObject #`{ is widget } $n-gobject #`{ is widget },
     $,
    Int :$_handle_id,
    Gnome::GObject::Object :_widget($notebook),
    *%user-options
    --> Int
  );

=item $notebook;
=item $n-gobject #`{ is widget };
=item $;
=item $_handle_id; the registered event handler id

=comment -----------------------------------------------------------------------
=comment #TS:0:page-removed:
=head3 page-removed

  method handler (
    N-GObject #`{ is widget } $n-gobject #`{ is widget },
     $,
    Int :$_handle_id,
    Gnome::GObject::Object :_widget($notebook),
    *%user-options
    --> Int
  );

=item $notebook;
=item $n-gobject #`{ is widget };
=item $;
=item $_handle_id; the registered event handler id

=comment -----------------------------------------------------------------------
=comment #TS:0:page-reordered:
=head3 page-reordered

  method handler (
    N-GObject #`{ is widget } $n-gobject #`{ is widget },
     $,
    Int :$_handle_id,
    Gnome::GObject::Object :_widget($notebook),
    *%user-options
    --> Int
  );

=item $notebook;
=item $n-gobject #`{ is widget };
=item $;
=item $_handle_id; the registered event handler id

=comment -----------------------------------------------------------------------
=comment #TS:0:reorder-tab:
=head3 reorder-tab

  method handler (
    Unknown type GTK_TYPE_DIRECTION_TYPE $unknown type gtk_type_direction_type,
    Int $int,
    Int :$_handle_id,
    Gnome::GObject::Object :_widget($notebook),
    *%user-options
    --> Int
  );

=item $notebook;
=item $unknown type gtk_type_direction_type;
=item $int;
=item $_handle_id; the registered event handler id

=comment -----------------------------------------------------------------------
=comment #TS:0:switch-page:
=head3 switch-page

Emitted when the user or a function changes the current page.

  method handler (
    N-GObject #`{ is widget } $page,
     $page_num,
    Int :$_handle_id,
    Gnome::GObject::Object :_widget($notebook),
    *%user-options
    --> Int
  );

=item $notebook; the object which received the signal.

=item $page; the new current page

=item $page_num; the index of the page

=item $_handle_id; the registered event handler id

=end pod

#-------------------------------------------------------------------------------
=begin pod
=head1 Properties

An example of using a string type property of a B<Gnome::Gtk3::Label> object. This is just showing how to set/read a property, not that it is the best way to do it. This is because a) The class initialization often provides some options to set some of the properties and b) the classes provide many methods to modify just those properties. In the case below one can use B<new(:label('my text label'))> or B<.set-text('my text label')>.

  my Gnome::Gtk3::Label $label .= new;
  my Gnome::GObject::Value $gv .= new(:init(G_TYPE_STRING));
  $label.get-property( 'label', $gv);
  $gv.set-string('my text label');

=head2 Supported properties

=comment -----------------------------------------------------------------------
=comment #TP:1:enable-popup:
=head3 Enable Popup: enable-popup

If TRUE, pressing the right mouse button on the notebook pops up a menu that you can use to go to a page

Default value: False

The B<Gnome::GObject::Value> type of property I<enable-popup> is C<G_TYPE_BOOLEAN>.

=comment -----------------------------------------------------------------------
=comment #TP:1:group-name:
=head3 Group Name: group-name

 Group name for tab drag and drop.

The B<Gnome::GObject::Value> type of property I<group-name> is C<G_TYPE_STRING>.

=comment -----------------------------------------------------------------------
=comment #TP:1:page:
=head3 Page: page

The B<Gnome::GObject::Value> type of property I<page> is C<G_TYPE_INT>.

=comment -----------------------------------------------------------------------
=comment #TP:1:scrollable:
=head3 Scrollable: scrollable

If TRUE, scroll arrows are added if there are too many tabs to fit
Default value: False

The B<Gnome::GObject::Value> type of property I<scrollable> is C<G_TYPE_BOOLEAN>.

=comment -----------------------------------------------------------------------
=comment #TP:1:show-border:
=head3 Show Border: show-border

Whether the border should be shown
Default value: True

The B<Gnome::GObject::Value> type of property I<show-border> is C<G_TYPE_BOOLEAN>.

=comment -----------------------------------------------------------------------
=comment #TP:1:show-tabs:
=head3 Show Tabs: show-tabs

Whether tabs should be shown
Default value: True

The B<Gnome::GObject::Value> type of property I<show-tabs> is C<G_TYPE_BOOLEAN>.

=begin comment
=comment -----------------------------------------------------------------------
=comment #TP:0:tab-pos:
=head3 Tab Position: tab-pos

Which side of the notebook holds the tabs
Default value: False

The B<Gnome::GObject::Value> type of property I<tab-pos> is C<G_TYPE_ENUM>.
=end comment
=end pod









































=finish
#-------------------------------------------------------------------------------
#TM:2:_gtk_notebook_new:new()
# Creates a new Notebook widget with no pages.
sub _gtk_notebook_new ( --> N-GObject )
  is native(&gtk-lib)
  is symbol('gtk_notebook_new')
  { * }

#-------------------------------------------------------------------------------
#TM:4:gtk_notebook_append_page:QAManager package
=begin pod
=head2 [gtk_notebook_] append_page

Appends a page to the I<notebook>.

Returns: the index (starting from 0) of the appended page in the notebook, or -1 if function fails

  method gtk_notebook_append_page (
    N-GObject $child, N-GObject $tab_label
    --> Int
  )

=item N-GObject $child; the B<Gnome::Gtk3::Widget> to use as the contents of the page.
=item N-GObject $tab_label; the B<Gnome::Gtk3::Widget> to be used as the label for the page, or an undefined value to use the default label, “page N”

=end pod

sub gtk_notebook_append_page (
  N-GObject $notebook, N-GObject $child, N-GObject $tab_label
  --> int32
) is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_append_page_menu:
=begin pod
=head2 [gtk_notebook_] append_page_menu

Appends a page to I<notebook>, specifying the widget to use as the
label in the popup menu.

Returns: the index (starting from 0) of the appended
page in the notebook, or -1 if function fails

  method gtk_notebook_append_page_menu ( N-GObject $child, N-GObject $tab_label, N-GObject $menu_label --> Int )

=item N-GObject $child; the B<Gnome::Gtk3::Widget> to use as the contents of the page
=item N-GObject $tab_label; (allow-none): the B<Gnome::Gtk3::Widget> to be used as the label for the page, or C<Any> to use the default label, “page N”
=item N-GObject $menu_label; (allow-none): the widget to use as a label for the page-switch menu, if that is enabled. If C<Any>, and I<tab_label> is a B<Gnome::Gtk3::Label> or C<Any>, then the menu label will be a newly created label with the same text as I<tab_label>; if I<tab_label> is not a B<Gnome::Gtk3::Label>, I<menu_label> must be specified if the page-switch menu is to be used.

=end pod

sub gtk_notebook_append_page_menu ( N-GObject $notebook, N-GObject $child, N-GObject $tab_label, N-GObject $menu_label --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_prepend_page:
=begin pod
=head2 [gtk_notebook_] prepend_page

Prepends a page to I<notebook>.

Returns: the index (starting from 0) of the prepended
page in the notebook, or -1 if function fails

  method gtk_notebook_prepend_page ( N-GObject $child, N-GObject $tab_label --> Int )

=item N-GObject $child; the B<Gnome::Gtk3::Widget> to use as the contents of the page
=item N-GObject $tab_label; (allow-none): the B<Gnome::Gtk3::Widget> to be used as the label for the page, or C<Any> to use the default label, “page N”

=end pod

sub gtk_notebook_prepend_page ( N-GObject $notebook, N-GObject $child, N-GObject $tab_label --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_prepend_page_menu:
=begin pod
=head2 [gtk_notebook_] prepend_page_menu

Prepends a page to I<notebook>, specifying the widget to use as the
label in the popup menu.

Returns: the index (starting from 0) of the prepended
page in the notebook, or -1 if function fails

  method gtk_notebook_prepend_page_menu ( N-GObject $child, N-GObject $tab_label, N-GObject $menu_label --> Int )

=item N-GObject $child; the B<Gnome::Gtk3::Widget> to use as the contents of the page
=item N-GObject $tab_label; (allow-none): the B<Gnome::Gtk3::Widget> to be used as the label for the page, or C<Any> to use the default label, “page N”
=item N-GObject $menu_label; (allow-none): the widget to use as a label for the page-switch menu, if that is enabled. If C<Any>, and I<tab_label> is a B<Gnome::Gtk3::Label> or C<Any>, then the menu label will be a newly created label with the same text as I<tab_label>; if I<tab_label> is not a B<Gnome::Gtk3::Label>, I<menu_label> must be specified if the page-switch menu is to be used.

=end pod

sub gtk_notebook_prepend_page_menu ( N-GObject $notebook, N-GObject $child, N-GObject $tab_label, N-GObject $menu_label --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_insert_page:
=begin pod
=head2 [gtk_notebook_] insert_page

Insert a page into I<notebook> at the given position.

Returns: the index (starting from 0) of the inserted
page in the notebook, or -1 if function fails

  method gtk_notebook_insert_page ( N-GObject $child, N-GObject $tab_label, Int $position --> Int )

=item N-GObject $child; the B<Gnome::Gtk3::Widget> to use as the contents of the page
=item N-GObject $tab_label; (allow-none): the B<Gnome::Gtk3::Widget> to be used as the label for the page, or C<Any> to use the default label, “page N”
=item Int $position; the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages

=end pod

sub gtk_notebook_insert_page ( N-GObject $notebook, N-GObject $child, N-GObject $tab_label, int32 $position --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_insert_page_menu:
=begin pod
=head2 [gtk_notebook_] insert_page_menu

Insert a page into I<notebook> at the given position, specifying
the widget to use as the label in the popup menu.

Returns: the index (starting from 0) of the inserted
page in the notebook

  method gtk_notebook_insert_page_menu ( N-GObject $child, N-GObject $tab_label, N-GObject $menu_label, Int $position --> Int )

=item N-GObject $child; the B<Gnome::Gtk3::Widget> to use as the contents of the page
=item N-GObject $tab_label; (allow-none): the B<Gnome::Gtk3::Widget> to be used as the label for the page, or C<Any> to use the default label, “page N”
=item N-GObject $menu_label; (allow-none): the widget to use as a label for the page-switch menu, if that is enabled. If C<Any>, and I<tab_label> is a B<Gnome::Gtk3::Label> or C<Any>, then the menu label will be a newly created label with the same text as I<tab_label>; if I<tab_label> is not a B<Gnome::Gtk3::Label>, I<menu_label> must be specified if the page-switch menu is to be used.
=item Int $position; the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.

=end pod

sub gtk_notebook_insert_page_menu ( N-GObject $notebook, N-GObject $child, N-GObject $tab_label, N-GObject $menu_label, int32 $position --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_remove_page:
=begin pod
=head2 [gtk_notebook_] remove_page

Removes a page from the notebook given its index
in the notebook.

  method gtk_notebook_remove_page ( Int $page_num )

=item Int $page_num; the index of a notebook page, starting from 0. If -1, the last page will be removed.

=end pod

sub gtk_notebook_remove_page ( N-GObject $notebook, int32 $page_num  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_set_group_name:
=begin pod
=head2 [gtk_notebook_] set_group_name

Sets a group name for I<notebook>.

Notebooks with the same name will be able to exchange tabs
via drag and drop. A notebook with a C<Any> group name will
not be able to exchange tabs with any other notebook.

Since: 2.24

  method gtk_notebook_set_group_name ( Str $group_name )

=item Str $group_name; (allow-none): the name of the notebook group, or C<Any> to unset it

=end pod

sub gtk_notebook_set_group_name ( N-GObject $notebook, Str $group_name  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_get_group_name:
=begin pod
=head2 [gtk_notebook_] get_group_name

Gets the current group name for I<notebook>.

Returns: (nullable) (transfer none): the group name, or C<Any> if none is set

Since: 2.24

  method gtk_notebook_get_group_name ( --> Str )


=end pod

sub gtk_notebook_get_group_name ( N-GObject $notebook --> Str )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_get_current_page:
=begin pod
=head2 [gtk_notebook_] get_current_page

Returns the page number of the current page.

Returns: the index (starting from 0) of the current
page in the notebook. If the notebook has no pages,
then -1 will be returned.

  method gtk_notebook_get_current_page ( --> Int )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_get_nth_page:
=begin pod
=head2 [gtk_notebook_] get_nth_page

Returns the child widget contained in page number I<page_num>.

Returns: (nullable) (transfer none): the child widget, or C<Any> if I<page_num>
is out of bounds

  method gtk_notebook_get_nth_page ( Int $page_num --> N-GObject )

=item Int $page_num; the index of a page in the notebook, or -1 to get the last page

=end pod

sub gtk_notebook_get_nth_page ( N-GObject $notebook, int32 $page_num --> N-GObject )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_get_n_pages:
=begin pod
=head2 [gtk_notebook_] get_n_pages

Gets the number of pages in a notebook.

Returns: the number of pages in the notebook

Since: 2.2

  method gtk_notebook_get_n_pages ( --> Int )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_page_num:
=begin pod
=head2 [gtk_notebook_] page_num

Finds the index of the page which contains the given child
widget.

Returns: the index of the page containing I<child>, or
-1 if I<child> is not in the notebook

  method gtk_notebook_page_num ( N-GObject $child --> Int )

=item N-GObject $child; a B<Gnome::Gtk3::Widget>

=end pod

sub gtk_notebook_page_num ( N-GObject $notebook, N-GObject $child --> int32 )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_set_current_page:
=begin pod
=head2 [gtk_notebook_] set_current_page

Switches to the page number I<page_num>.

Note that due to historical reasons, B<Gnome::Gtk3::Notebook> refuses
to switch to a page unless the child widget is visible.
Therefore, it is recommended to show child widgets before
adding them to a notebook.

  method gtk_notebook_set_current_page ( Int $page_num )

=item Int $page_num; index of the page to switch to, starting from 0. If negative, the last page will be used. If greater than the number of pages in the notebook, nothing will be done.

=end pod

sub gtk_notebook_set_current_page ( N-GObject $notebook, int32 $page_num  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_next_page:
=begin pod
=head2 [gtk_notebook_] next_page

Switches to the next page. Nothing happens if the current page is
the last page.

  method gtk_notebook_next_page ( )


=end pod

sub gtk_notebook_next_page ( N-GObject $notebook  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_prev_page:
=begin pod
=head2 [gtk_notebook_] prev_page

Switches to the previous page. Nothing happens if the current page
is the first page.

  method gtk_notebook_prev_page ( )


=end pod

sub gtk_notebook_prev_page ( N-GObject $notebook  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_set_show_border:
=begin pod
=head2 [gtk_notebook_] set_show_border

Sets whether a bevel will be drawn around the notebook pages.
This only has a visual effect when the tabs are not shown.
See C<gtk_notebook_set_show_tabs()>.

  method gtk_notebook_set_show_border ( Int $show_border )

=item Int $show_border; C<1> if a bevel should be drawn around the notebook

=end pod

sub gtk_notebook_set_show_border ( N-GObject $notebook, int32 $show_border  )
  is native(&gtk-lib)
  { * }

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_get_show_border:
=begin pod
=head2 [gtk_notebook_] get_show_border

Returns whether a bevel will be drawn around the notebook pages.
See C<gtk_notebook_set_show_border()>.

Returns: C<1> if the bevel is drawn

  method gtk_notebook_get_show_border ( --> Int )


=end pod

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

#-------------------------------------------------------------------------------
#TM:0:gtk_notebook_set_show_tabs:
=begin pod
=head2 [gtk_notebook_] set_show_tabs

Sets whether to show the tabs for the notebook or not.

  method gtk_notebook_set_show_tabs ( Int $show_tabs )

=item Int $show_tabs; C<1> if the tabs should be shown

=end pod

sub gtk_notebook_set_show_tabs (