GtkNotebook
<!-- ##### SECTION Short_Description ##### -->
-Set of pages with bookmarks.
+A tabbed notebook container
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkNotebook widget is a #GtkContainer whose children are pages that
-can be accessed through bookmarks. The pages are displayed all at the same
-place. <!-- TODO: talk about the menu -->
-</para>
+can be switched between using tab labels along one edge.
+</para>
+<para>
+There are many configuration options for #GtkNotebook. Among other
+things, you can choose on which edge the tabs appear
+(see gtk_notebook_set_tab_pos()), whether, if there are too many
+tabs to fit the notebook should be made bigger or scrolling
+arrows added (see gtk_notebook_set_scrollable), and whether there
+will be a popup menu allowing the users to switch pages.
+(see gtk_notebook_popup_enable(), gtk_notebook_popup_disable())
+</para>
+
+<refsect2 id="GtkNotebook-BUILDER-UI">
+<title>GtkNotebook as GtkBuildable</title>
+<para>
+The GtkNoteboopk implementation of the GtkBuildable interface
+supports placing children into tabs by specifying "tab" as the
+"type" attribute of a <child> element. Note that the content
+of the tab must be created before the tab can be filled.
+A tab child can be specified without specifying a <child>
+type attribute.
+</para>
+<para>
+To add a child widget in the notebooks action area, specify
+"action-start" or "action-end" as the "type" attribute of the <child>
+element.
+</para>
+<example>
+<title>A UI definition fragment with GtkNotebook</title>
+<programlisting><![CDATA[
+<object class="GtkNotebook">
+ <child>
+ <object class="GtkLabel" id="notebook-content">
+ <property name="label">Content</property>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="notebook-tab">
+ <property name="label">Tab</property>
+ </object>
+ </child>
+</object>
+]]></programlisting>
+</example>
+</refsect2>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkContainer</term>
-<listitem><para>For functions that apply to every #GtkContainer
-(like #GtkList).</para></listitem>
+<listitem><para>For functions that apply to every #GtkContainer</para></listitem>
</varlistentry>
</variablelist>
</para>
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### STRUCT GtkNotebook ##### -->
<para>
</para>
-@container: the parent class object
-@cur_page: the currently displayed page
-@children: a GList with the children of the notebook; belonging to
-#GtkNotebookPage
-@first_tab:
-@focus_tab:
-@menu:
-@panel:
-@timer:
-@tab_hborder:
-@tab_vborder:
-@show_tabs:
-@homogeneous:
-@show_border:
-@tab_pos:
-@scrollable:
-@in_child:
-@click_child:
-@button:
-@need_timer:
-@child_has_focus:
-@have_visible_child:
-<!-- ##### MACRO GTK_NOTEBOOK_PAGE ##### -->
+<!-- ##### SIGNAL GtkNotebook::change-current-page ##### -->
<para>
-Extracts the contents of the current element of #GList @_glist_ as a
-#GtkNotebookPage.
+
</para>
-@_glist_:
+@notebook: the object which received the signal.
+@arg1:
+@Returns:
+<!-- ##### SIGNAL GtkNotebook::create-window ##### -->
+<para>
-<!-- ##### STRUCT GtkNotebookPage ##### -->
+</para>
+
+@notebook: the object which received the signal.
+@widget:
+@arg1:
+@arg2:
+@Returns:
+
+<!-- ##### SIGNAL GtkNotebook::focus-tab ##### -->
<para>
-The #GtkNotebookPage structure is used to store the pages of a notebook. It
-is not an object.
+
</para>
-@child: the contents of the page
-@tab_label: the label shown in the bookmark
-@menu_label: the label shown in the popup menu
-@default_menu:
-@default_tab:
-@expand:
-@fill:
-@pack:
-@requisition:
-@allocation:
+@notebook: the object which received the signal.
+@arg1:
+@Returns:
-<!-- ##### FUNCTION gtk_notebook_new ##### -->
+<!-- ##### SIGNAL GtkNotebook::move-focus-out ##### -->
<para>
-Creates a new #GtkNotebook widget
+
</para>
-@Returns: the newly created G=#GtkNotebook
+@notebook: the object which received the signal.
+@arg1:
+<!-- ##### SIGNAL GtkNotebook::page-added ##### -->
+<para>
-<!-- ##### FUNCTION gtk_notebook_append_page ##### -->
+</para>
+
+@notebook: the object which received the signal.
+@widget:
+@arg1:
+
+<!-- ##### SIGNAL GtkNotebook::page-removed ##### -->
<para>
-Appends to @notebook a page whose content is @child, and whose bookmark is
-@tab_label.
+
</para>
-@notebook: the notebook widget
-@child: the content of the new page
-@tab_label: the bookmark for the page
+@notebook: the object which received the signal.
+@widget:
+@arg1:
+<!-- ##### SIGNAL GtkNotebook::page-reordered ##### -->
+<para>
-<!-- ##### FUNCTION gtk_notebook_append_page_menu ##### -->
+</para>
+
+@notebook: the object which received the signal.
+@widget:
+@arg1:
+
+<!-- ##### SIGNAL GtkNotebook::reorder-tab ##### -->
<para>
-Appends to @notebook a page whose content is @child, whose bookmark is
-@tab_label, and whose menu label is @menu_label.
+
</para>
-@notebook: the notebook widget
-@child: the content of the new page
-@tab_label: the bookmark of the page
-@menu_label: the menu label of the page
+@notebook: the object which received the signal.
+@arg1:
+@Param3:
+@Returns:
+<!-- ##### SIGNAL GtkNotebook::select-page ##### -->
+<para>
-<!-- ##### FUNCTION gtk_notebook_prepend_page ##### -->
+</para>
+
+@notebook: the object which received the signal.
+@arg1:
+@Returns:
+
+<!-- ##### SIGNAL GtkNotebook::switch-page ##### -->
<para>
-Prepends to @notebook a page whose content is @child, whose bookmark is
-@tab_label, and whose menu label is @menu_label.
+Emitted when the user or a function changes the current page.
</para>
-@notebook: the notebook widget
-@child: the content of the new page
-@tab_label: the bookmark of the page
+@notebook: the object which received the signal.
+@page: the new current page
+@page_num: the index of the page
+
+<!-- ##### ARG GtkNotebook:enable-popup ##### -->
+<para>
+</para>
-<!-- ##### FUNCTION gtk_notebook_prepend_page_menu ##### -->
+<!-- ##### ARG GtkNotebook:group ##### -->
<para>
-Appends to @notebook a page whose content is @child, whose bookmark is
-@tab_label, and whose menu label is @menu_label.
+
</para>
-@notebook: the notebook widget
-@child: the content of the new page
-@tab_label: the bookmark of the page
-@menu_label: the menu label of the page
+<!-- ##### ARG GtkNotebook:page ##### -->
+<para>
+</para>
-<!-- ##### FUNCTION gtk_notebook_insert_page ##### -->
+<!-- ##### ARG GtkNotebook:scrollable ##### -->
<para>
-Inserts in @notebook a new page whose content is @child, and whose
-bookmark is @tab_label. The page is inserted just
-before the page number @position, starting with 0. If @position is out of
-bounds, it is assumed to be the current number of pages.
+
</para>
-@notebook: the notebook widget
-@child: the content of the new page
-@tab_label: the bookmark of the page
-@position: the position to insert the page
+<!-- ##### ARG GtkNotebook:show-border ##### -->
+<para>
+</para>
-<!-- ##### FUNCTION gtk_notebook_insert_page_menu ##### -->
+<!-- ##### ARG GtkNotebook:show-tabs ##### -->
<para>
-Inserts in @notebook a new page whose content is @child, whose bookmark is
-@tab_label, and whose menu label is @menu_label. The page is inserted just
-before the page number @position, starting with 0. If @position is out of
-bounds, it is assumed to be the current number of pages.
+
</para>
-@notebook: the notebook widget
-@child: the content of the new page
-@tab_label: the bookmark of the page
-@menu_label: the menu label of the page
-@position: the position to insert the page
+<!-- ##### ARG GtkNotebook:tab-pos ##### -->
+<para>
+</para>
-<!-- ##### FUNCTION gtk_notebook_remove_page ##### -->
+<!-- ##### ARG GtkNotebook:detachable ##### -->
<para>
-Removes the page @page_num form @notebook. Pages are numbered starting at
-zero. Negative values stand for the last page; too large values are
-ignored.
+
</para>
-@notebook: the notebook widget
-@page_num: the page number
+<!-- ##### ARG GtkNotebook:menu-label ##### -->
+<para>
+</para>
-<!-- ##### MACRO gtk_notebook_current_page ##### -->
+<!-- ##### ARG GtkNotebook:position ##### -->
<para>
-Compatibility macro; in gtkcompat.h.
+
</para>
+<!-- ##### ARG GtkNotebook:reorderable ##### -->
+<para>
+</para>
-<!-- ##### FUNCTION gtk_notebook_page_num ##### -->
+<!-- ##### ARG GtkNotebook:tab-expand ##### -->
<para>
-Returns the page number of @child in @notebook.
+
</para>
-@notebook: the notebook widget
-@child: the child
-@Returns: the page number, or -1 if @child is not in @notebook
+<!-- ##### ARG GtkNotebook:tab-fill ##### -->
+<para>
+</para>
-<!-- ##### FUNCTION gtk_notebook_set_page ##### -->
+<!-- ##### ARG GtkNotebook:tab-label ##### -->
<para>
-Switches to the page number @page_num. Negative values stand for the last
-page; too large values are ignored.
+
</para>
-@notebook: the notebook widget
-@page_num: the page number
+<!-- ##### ARG GtkNotebook:tab-pack ##### -->
+<para>
+ Deprecated: 2.20: The tab packing functionality of children should not
+ be used anymore and support will be removed in the future.
+</para>
+<!-- ##### ARG GtkNotebook:arrow-spacing ##### -->
+<para>
-<!-- ##### FUNCTION gtk_notebook_next_page ##### -->
+</para>
+
+<!-- ##### ARG GtkNotebook:has-backward-stepper ##### -->
<para>
-Switches to the next page. Nothing happens if the current page is the last
-page.
+
</para>
-@notebook: the notebook widget.
+<!-- ##### ARG GtkNotebook:has-forward-stepper ##### -->
+<para>
+</para>
-<!-- ##### FUNCTION gtk_notebook_prev_page ##### -->
+<!-- ##### ARG GtkNotebook:has-secondary-backward-stepper ##### -->
<para>
-Switches to the previous page. Nothing happens if the current page is the
-first page.
+
</para>
-@notebook: the notebook widget
+<!-- ##### ARG GtkNotebook:has-secondary-forward-stepper ##### -->
+<para>
+</para>
-<!-- ##### FUNCTION gtk_notebook_reorder_child ##### -->
+<!-- ##### ARG GtkNotebook:tab-curvature ##### -->
<para>
-Moves the page @child, so that it appears in position @position. Out of
-bounds @position will be clamped.
+
</para>
-@notebook: the notebook widget
-@child: the child to deplace
-@position: the new position
+<!-- ##### ARG GtkNotebook:tab-overlap ##### -->
+<para>
+</para>
-<!-- ##### FUNCTION gtk_notebook_set_tab_pos ##### -->
+<!-- ##### STRUCT GtkNotebookPage ##### -->
<para>
-Sets the position of the bookmarks.
+The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook.
</para>
-@notebook: the notebook widget
-@pos: the position
+<!-- ##### FUNCTION gtk_notebook_new ##### -->
+<para>
+</para>
-<!-- ##### FUNCTION gtk_notebook_set_show_tabs ##### -->
+@void:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_append_page ##### -->
<para>
-Sets whether to show the bookmarks or not.
</para>
-@notebook: the notebook widget
-@show_tabs: a boolean value
+@notebook:
+@child:
+@tab_label:
+@Returns:
-<!-- ##### FUNCTION gtk_notebook_set_show_border ##### -->
+<!-- ##### FUNCTION gtk_notebook_append_page_menu ##### -->
<para>
-Sets whether to show the border of the notebook or not. Bookmarks are in the
-border.
</para>
-@notebook: the notebook widget
-@show_border: a boolean value
+@notebook:
+@child:
+@tab_label:
+@menu_label:
+@Returns:
-<!-- ##### FUNCTION gtk_notebook_set_scrollable ##### -->
+<!-- ##### FUNCTION gtk_notebook_prepend_page ##### -->
<para>
-Sets whether the bookmarks area may be scrollable or not if there are too
-many bookmarks to fit in the allocated area.
</para>
-@notebook: the notebook widget
-@scrollable: a boolean value
+@notebook:
+@child: the
+@tab_label:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_prepend_page_menu ##### -->
+<para>
+</para>
+
+@notebook:
+@child:
+@tab_label:
+@menu_label:
+@Returns:
-<!-- ##### FUNCTION gtk_notebook_set_tab_border ##### -->
+<!-- ##### FUNCTION gtk_notebook_insert_page ##### -->
<para>
-Sets whether there should be a border around the bookmarks or not.
</para>
-@notebook: the notebook widget
-@border_width: a boolean value
+@notebook:
+@child:
+@tab_label:
+@position:
+@Returns:
-<!-- ##### FUNCTION gtk_notebook_set_tab_hborder ##### -->
+<!-- ##### FUNCTION gtk_notebook_insert_page_menu ##### -->
<para>
-Sets whether the tabs should have a horizontal border.
</para>
-@notebook: the notebook widget
-@tab_hborder: a boolean value
+@notebook:
+@child:
+@tab_label:
+@menu_label:
+@position:
+@Returns:
-<!-- ##### FUNCTION gtk_notebook_set_tab_vborder ##### -->
+<!-- ##### FUNCTION gtk_notebook_remove_page ##### -->
+<para>
+</para>
+
+@notebook:
+@page_num:
+
+
+<!-- ##### FUNCTION gtk_notebook_page_num ##### -->
+<para>
+</para>
+
+@notebook:
+@child:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_next_page ##### -->
+<para>
+</para>
+
+@notebook:
+
+
+<!-- ##### FUNCTION gtk_notebook_prev_page ##### -->
+<para>
+</para>
+
+@notebook:
+
+
+<!-- ##### FUNCTION gtk_notebook_reorder_child ##### -->
+<para>
+</para>
+
+@notebook:
+@child:
+@position:
+
+
+<!-- ##### FUNCTION gtk_notebook_set_tab_pos ##### -->
<para>
-Sets whether the tabs should have a vertical border.
</para>
@notebook: the notebook widget
-@tab_vborder: a boolean value
+@pos: the position
+
+
+<!-- ##### FUNCTION gtk_notebook_set_show_tabs ##### -->
+<para>
+</para>
+
+@notebook:
+@show_tabs:
+
+
+<!-- ##### FUNCTION gtk_notebook_set_show_border ##### -->
+<para>
+</para>
+
+@notebook:
+@show_border:
+
+
+<!-- ##### FUNCTION gtk_notebook_set_scrollable ##### -->
+<para>
+</para>
+
+@notebook:
+@scrollable:
<!-- ##### FUNCTION gtk_notebook_popup_enable ##### -->
<para>
-Enables the popup menu: if the user clicks with the right mouse button on
-the bookmarks, a menu with all the pages will be popped up.
</para>
-@notebook: the notebook widget
+@notebook:
<!-- ##### FUNCTION gtk_notebook_popup_disable ##### -->
<para>
-Disables the popup menu
</para>
-@notebook: the notebook widget
+@notebook:
<!-- ##### FUNCTION gtk_notebook_get_current_page ##### -->
<para>
-Returns the page number of the current page.
</para>
@notebook: the notebook widget
<!-- ##### FUNCTION gtk_notebook_get_menu_label ##### -->
<para>
-Returns the menu label of the page @child. NULL is returned if @child is not
-in @notebook or NULL if it has the default menu label.
</para>
-@notebook: the notebook widget
-@child: the page
-@Returns: the menu label
+@notebook:
+@child:
+@Returns:
<!-- ##### FUNCTION gtk_notebook_get_nth_page ##### -->
<para>
-Returns the content of the page number @page_num, or NULL if @page_num is
-out of bounds.
</para>
-@notebook: the notebook widget
-@page_num: the page number
-@Returns: the content of the page
+@notebook:
+@page_num:
+@Returns:
-<!-- ##### FUNCTION gtk_notebook_get_tab_label ##### -->
+<!-- ##### FUNCTION gtk_notebook_get_n_pages ##### -->
<para>
-Returns the menu tab of the page @child. NULL is returned if @child is not
-in @notebook or NULL if it has the default tab label.
+
</para>
-@notebook: the notebook widget
-@child: the page
-@Returns: the tab label
+@notebook:
+@Returns:
-<!-- ##### FUNCTION gtk_notebook_query_tab_label_packing ##### -->
+<!-- ##### FUNCTION gtk_notebook_get_tab_label ##### -->
<para>
-Looks for the packing attributes of the bookmarks of @child.
</para>
-@notebook: the notebook widget
-@child: the page
-@expand: a pointer to return the expand value (or NULL)
-@fill: a pointer to return the fill value (or NULL)
-@pack_type: a pointer to return the pack_type (or NULL)
+@notebook:
+@child:
+@Returns:
-<!-- ##### FUNCTION gtk_notebook_set_homogeneous_tabs ##### -->
+<!-- ##### FUNCTION gtk_notebook_query_tab_label_packing ##### -->
<para>
-Sets whether the tabs must have all the same size or not.
</para>
-@notebook: the notebook widget
-@homogeneous: a boolean value
+@notebook:
+@child:
+@expand:
+@fill:
+@pack_type:
<!-- ##### FUNCTION gtk_notebook_set_menu_label ##### -->
<para>
-Changes the menu label of @child. Nothing happens if @child is not in
-@notebook.
</para>
-@notebook: the notebook widget
-@child: the page
-@menu_label: the menu label, or NULL for default
+@notebook:
+@child:
+@menu_label:
<!-- ##### FUNCTION gtk_notebook_set_menu_label_text ##### -->
<para>
-Creates a new label and sets it as the menu label of @child.
</para>
-@notebook: the notebook widget
-@child: the page
-@menu_text: the label text
+@notebook:
+@child:
+@menu_text:
<!-- ##### FUNCTION gtk_notebook_set_tab_label ##### -->
<para>
-Changes the bookmark label of @child. Nothing happens if @child is not in
-@notebook.
</para>
-@notebook: the notebook widget
-@child: the page
-@tab_label: the bookmark label, or NULL for default
+@notebook:
+@child:
+@tab_label:
<!-- ##### FUNCTION gtk_notebook_set_tab_label_packing ##### -->
<para>
-Sets the packing parameters for the bookmark of @child. See
-#GtkBoxPackStart for the exact meanings.
</para>
-@notebook: the notebook widget
-@child: the child widget
-@expand: whether to expand the bookmark or not
-@fill: whether the bookmark should fill the allocated area or not
-@pack_type: the position of the bookmark
+@notebook:
+@child:
+@expand:
+@fill:
+@pack_type:
<!-- ##### FUNCTION gtk_notebook_set_tab_label_text ##### -->
<para>
-Creates a new label and sets it as the bookmark label of @child.
</para>
-@notebook: the notebook widget
-@child: the page
-@tab_text: the label text
+@notebook:
+@child:
+@tab_text:
-<!-- ##### SIGNAL GtkNotebook::switch-page ##### -->
+<!-- ##### FUNCTION gtk_notebook_set_tab_reorderable ##### -->
<para>
-Emitted when the user or a function changes the current page.
+
</para>
-@notebook: the object which received the signal.
-@page: the new current page
-@page_num: the index of the page
+@notebook:
+@child:
+@reorderable:
-<!-- ##### ARG GtkNotebook:page ##### -->
+
+<!-- ##### FUNCTION gtk_notebook_set_tab_detachable ##### -->
<para>
-The current page
+
</para>
-<!-- ##### ARG GtkNotebook:tab_pos ##### -->
+@notebook:
+@child:
+@detachable:
+
+
+<!-- ##### FUNCTION gtk_notebook_get_menu_label_text ##### -->
+<para>
+
+</para>
+
+@notebook:
+@child:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_get_scrollable ##### -->
<para>
-The position of the bookmarks
+
</para>
-<!-- ##### ARG GtkNotebook:tab_border ##### -->
+@notebook:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_get_show_border ##### -->
<para>
-Whether the bookmarks have a border or not
+
</para>
-<!-- ##### ARG GtkNotebook:tab_hborder ##### -->
+@notebook:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_get_show_tabs ##### -->
<para>
-Whether the bookmarks have a horizontal border or not
+
</para>
-<!-- ##### ARG GtkNotebook:tab_vborder ##### -->
+@notebook:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_get_tab_label_text ##### -->
<para>
-Whether the bookmarks have a vertical border or not
+
</para>
-<!-- ##### ARG GtkNotebook:show_tabs ##### -->
+@notebook:
+@child:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_get_tab_pos ##### -->
<para>
-Whether to show the bookmarks or not
+
</para>
-<!-- ##### ARG GtkNotebook:show_border ##### -->
+@notebook:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_get_tab_reorderable ##### -->
<para>
-Whether to show the border or not
+
</para>
-<!-- ##### ARG GtkNotebook:scrollable ##### -->
+@notebook:
+@child:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_get_tab_detachable ##### -->
<para>
-Whether the bookmarks should be scrollable or not
+
</para>
-<!-- ##### ARG GtkNotebook:enable_popup ##### -->
+@notebook:
+@child:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_set_current_page ##### -->
<para>
-Whether the popup menu is enabled or not
+
</para>
+@notebook:
+@page_num:
+
+
+<!-- ##### FUNCTION gtk_notebook_set_group ##### -->
+<para>
+
+</para>
+
+@notebook:
+@group:
+
+
+<!-- ##### FUNCTION gtk_notebook_get_group ##### -->
+<para>
+
+</para>
+
+@notebook:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_notebook_set_action_widget ##### -->
+<para>
+
+</para>
+
+@notebook:
+@widget:
+@pack_type:
+
+
+<!-- ##### FUNCTION gtk_notebook_get_action_widget ##### -->
+<para>
+
+</para>
+
+@notebook:
+@pack_type:
+@Returns:
+
+
+<!-- ##### USER_FUNCTION GtkNotebookWindowCreationFunc ##### -->
+<para>
+A function used by GtkNotebook when a detachable tab is dropped
+in the root window, it's used to create a window containing a notebook
+where the tab will be attached. This function will also be responsible
+of moving/resizing the window and adding the necessary properties to
+the notebook (i.e.: group-id).
+
+If the function returns %NULL, the drag will be cancelled.
+</para>
+
+@source: The source #GtkNotebook of the drag operation
+@page: the child #GtkWidget affected
+@x: the X coordinate where the drop happens
+@y: the Y coordinate where the drop happens
+@data: user data
+@Returns: The created #GtkNotebook where the tab will be attached, or NULL to cancel the drag
+
+
+<!-- ##### FUNCTION gtk_notebook_set_window_creation_hook ##### -->
+<para>
+
+</para>
+
+@func:
+@data:
+@destroy:
+
+