1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A tabbed notebook container
7 <!-- ##### SECTION Long_Description ##### -->
9 The #GtkNotebook widget is a #GtkContainer whose children are pages that
10 can be switched between using tab labels along one edge.
13 There are many configuration options for #GtkNotebook. Among other
14 things, you can choose on which edge the tabs appear
15 (see gtk_notebook_set_tab_pos()), whether, if there are too many
16 tabs to fit the noteobook should be made bigger or scrolling
17 arrows added (see gtk_notebook_set_scrollable), and whether there
18 will be a popup menu allowing the users to switch pages.
19 (see gtk_notebook_enable_popup(), gtk_noteobook_disable_popup())
22 <refsect2 id="GtkNotebook-BUILDER-UI">
23 <title>GtkNotebook as GtkBuildable</title>
25 The GtkNoteboopk implementation of the GtkBuildable interface
26 supports placing children into tabs by specifying "tab" as the
27 "type" attribute of a <child> element. Note that the content
28 of the tab must be created before the tab can be filled.
29 A tab child can be specified without specifying a <child>
33 <title>A UI definition fragment with GtkNotebook</title>
34 <programlisting><![CDATA[
35 <object class="GtkNotebook">
37 <object class="GtkLabel" id="notebook-content">
38 <property name="label">Content</property>
42 <object class="GtkLabel" id="notebook-tab">
43 <property name="label">Tab</property>
51 <!-- ##### SECTION See_Also ##### -->
55 <term>#GtkContainer</term>
56 <listitem><para>For functions that apply to every #GtkContainer</para></listitem>
61 <!-- ##### SECTION Stability_Level ##### -->
64 <!-- ##### STRUCT GtkNotebook ##### -->
70 <!-- ##### SIGNAL GtkNotebook::change-current-page ##### -->
75 @notebook: the object which received the signal.
79 <!-- ##### SIGNAL GtkNotebook::create-window ##### -->
84 @notebook: the object which received the signal.
90 <!-- ##### SIGNAL GtkNotebook::focus-tab ##### -->
95 @notebook: the object which received the signal.
99 <!-- ##### SIGNAL GtkNotebook::move-focus-out ##### -->
104 @notebook: the object which received the signal.
107 <!-- ##### SIGNAL GtkNotebook::page-added ##### -->
112 @notebook: the object which received the signal.
116 <!-- ##### SIGNAL GtkNotebook::page-removed ##### -->
121 @notebook: the object which received the signal.
125 <!-- ##### SIGNAL GtkNotebook::page-reordered ##### -->
130 @notebook: the object which received the signal.
134 <!-- ##### SIGNAL GtkNotebook::reorder-tab ##### -->
139 @notebook: the object which received the signal.
144 <!-- ##### SIGNAL GtkNotebook::select-page ##### -->
149 @notebook: the object which received the signal.
153 <!-- ##### SIGNAL GtkNotebook::switch-page ##### -->
155 Emitted when the user or a function changes the current page.
158 @notebook: the object which received the signal.
159 @page: the new current page
160 @page_num: the index of the page
162 <!-- ##### ARG GtkNotebook:enable-popup ##### -->
167 <!-- ##### ARG GtkNotebook:group ##### -->
172 <!-- ##### ARG GtkNotebook:group-id ##### -->
177 <!-- ##### ARG GtkNotebook:homogeneous ##### -->
182 <!-- ##### ARG GtkNotebook:page ##### -->
187 <!-- ##### ARG GtkNotebook:scrollable ##### -->
192 <!-- ##### ARG GtkNotebook:show-border ##### -->
197 <!-- ##### ARG GtkNotebook:show-tabs ##### -->
202 <!-- ##### ARG GtkNotebook:tab-border ##### -->
207 <!-- ##### ARG GtkNotebook:tab-hborder ##### -->
212 <!-- ##### ARG GtkNotebook:tab-pos ##### -->
217 <!-- ##### ARG GtkNotebook:tab-vborder ##### -->
222 <!-- ##### ARG GtkNotebook:detachable ##### -->
227 <!-- ##### ARG GtkNotebook:menu-label ##### -->
232 <!-- ##### ARG GtkNotebook:position ##### -->
237 <!-- ##### ARG GtkNotebook:reorderable ##### -->
242 <!-- ##### ARG GtkNotebook:tab-expand ##### -->
247 <!-- ##### ARG GtkNotebook:tab-fill ##### -->
252 <!-- ##### ARG GtkNotebook:tab-label ##### -->
257 <!-- ##### ARG GtkNotebook:tab-pack ##### -->
262 <!-- ##### ARG GtkNotebook:arrow-spacing ##### -->
267 <!-- ##### ARG GtkNotebook:has-backward-stepper ##### -->
272 <!-- ##### ARG GtkNotebook:has-forward-stepper ##### -->
277 <!-- ##### ARG GtkNotebook:has-secondary-backward-stepper ##### -->
282 <!-- ##### ARG GtkNotebook:has-secondary-forward-stepper ##### -->
287 <!-- ##### ARG GtkNotebook:tab-curvature ##### -->
292 <!-- ##### ARG GtkNotebook:tab-overlap ##### -->
297 <!-- ##### STRUCT GtkNotebookPage ##### -->
299 The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook.
303 <!-- ##### FUNCTION gtk_notebook_new ##### -->
310 <!-- ##### FUNCTION gtk_notebook_append_page ##### -->
320 <!-- ##### FUNCTION gtk_notebook_append_page_menu ##### -->
331 <!-- ##### FUNCTION gtk_notebook_prepend_page ##### -->
341 <!-- ##### FUNCTION gtk_notebook_prepend_page_menu ##### -->
352 <!-- ##### FUNCTION gtk_notebook_insert_page ##### -->
363 <!-- ##### FUNCTION gtk_notebook_insert_page_menu ##### -->
375 <!-- ##### FUNCTION gtk_notebook_remove_page ##### -->
383 <!-- ##### MACRO gtk_notebook_current_page ##### -->
385 Deprecated compatibility macro. Use
386 gtk_notebook_get_current_page() instead.
391 <!-- ##### FUNCTION gtk_notebook_page_num ##### -->
400 <!-- ##### MACRO gtk_notebook_set_page ##### -->
402 Deprecated compatibility macro. Use
403 gtk_notebook_set_current_page() instead.
408 <!-- ##### FUNCTION gtk_notebook_next_page ##### -->
415 <!-- ##### FUNCTION gtk_notebook_prev_page ##### -->
422 <!-- ##### FUNCTION gtk_notebook_reorder_child ##### -->
431 <!-- ##### FUNCTION gtk_notebook_set_tab_pos ##### -->
435 @notebook: the notebook widget
439 <!-- ##### FUNCTION gtk_notebook_set_show_tabs ##### -->
447 <!-- ##### FUNCTION gtk_notebook_set_show_border ##### -->
455 <!-- ##### FUNCTION gtk_notebook_set_scrollable ##### -->
463 <!-- ##### FUNCTION gtk_notebook_set_tab_border ##### -->
471 <!-- ##### FUNCTION gtk_notebook_popup_enable ##### -->
478 <!-- ##### FUNCTION gtk_notebook_popup_disable ##### -->
485 <!-- ##### FUNCTION gtk_notebook_get_current_page ##### -->
489 @notebook: the notebook widget
490 @Returns: the page number
493 <!-- ##### FUNCTION gtk_notebook_get_menu_label ##### -->
502 <!-- ##### FUNCTION gtk_notebook_get_nth_page ##### -->
511 <!-- ##### FUNCTION gtk_notebook_get_n_pages ##### -->
520 <!-- ##### FUNCTION gtk_notebook_get_tab_label ##### -->
529 <!-- ##### FUNCTION gtk_notebook_query_tab_label_packing ##### -->
540 <!-- ##### FUNCTION gtk_notebook_set_homogeneous_tabs ##### -->
548 <!-- ##### FUNCTION gtk_notebook_set_menu_label ##### -->
557 <!-- ##### FUNCTION gtk_notebook_set_menu_label_text ##### -->
566 <!-- ##### FUNCTION gtk_notebook_set_tab_hborder ##### -->
574 <!-- ##### FUNCTION gtk_notebook_set_tab_label ##### -->
583 <!-- ##### FUNCTION gtk_notebook_set_tab_label_packing ##### -->
594 <!-- ##### FUNCTION gtk_notebook_set_tab_label_text ##### -->
603 <!-- ##### FUNCTION gtk_notebook_set_tab_vborder ##### -->
611 <!-- ##### FUNCTION gtk_notebook_set_tab_reorderable ##### -->
621 <!-- ##### FUNCTION gtk_notebook_set_tab_detachable ##### -->
631 <!-- ##### FUNCTION gtk_notebook_get_menu_label_text ##### -->
641 <!-- ##### FUNCTION gtk_notebook_get_scrollable ##### -->
650 <!-- ##### FUNCTION gtk_notebook_get_show_border ##### -->
659 <!-- ##### FUNCTION gtk_notebook_get_show_tabs ##### -->
668 <!-- ##### FUNCTION gtk_notebook_get_tab_label_text ##### -->
678 <!-- ##### FUNCTION gtk_notebook_get_tab_pos ##### -->
687 <!-- ##### FUNCTION gtk_notebook_get_tab_reorderable ##### -->
697 <!-- ##### FUNCTION gtk_notebook_get_tab_detachable ##### -->
707 <!-- ##### FUNCTION gtk_notebook_set_current_page ##### -->
716 <!-- ##### FUNCTION gtk_notebook_set_group_id ##### -->
725 <!-- ##### FUNCTION gtk_notebook_get_group_id ##### -->
734 <!-- ##### FUNCTION gtk_notebook_set_group ##### -->
743 <!-- ##### FUNCTION gtk_notebook_get_group ##### -->
752 <!-- ##### USER_FUNCTION GtkNotebookWindowCreationFunc ##### -->
754 A function used by GtkNotebook when a detachable tab is dropped
755 in the root window, it's used to create a window containing a notebook
756 where the tab will be attached. This function will also be responsible
757 of moving/resizing the window and adding the necessary properties to
758 the notebook (i.e.: group-id).
760 If the function returns %NULL, the drag will be cancelled.
763 @source: The source #GtkNotebook of the drag operation
764 @page: the child #GtkWidget affected
765 @x: the X coordinate where the drop happens
766 @y: the Y coordinate where the drop happens
768 @Returns: The created #GtkNotebook where the tab will be attached, or NULL to cancel the drag
771 <!-- ##### FUNCTION gtk_notebook_set_window_creation_hook ##### -->