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 notebook 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_popup_enable(), gtk_notebook_popup_disable())
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 To add a child widget in the notebooks action area, specify
34 "action-start" or "action-end" as the "type" attribute of the <child>
38 <title>A UI definition fragment with GtkNotebook</title>
39 <programlisting><![CDATA[
40 <object class="GtkNotebook">
42 <object class="GtkLabel" id="notebook-content">
43 <property name="label">Content</property>
47 <object class="GtkLabel" id="notebook-tab">
48 <property name="label">Tab</property>
56 <!-- ##### SECTION See_Also ##### -->
60 <term>#GtkContainer</term>
61 <listitem><para>For functions that apply to every #GtkContainer</para></listitem>
66 <!-- ##### SECTION Stability_Level ##### -->
69 <!-- ##### SECTION Image ##### -->
72 <!-- ##### STRUCT GtkNotebook ##### -->
78 <!-- ##### SIGNAL GtkNotebook::change-current-page ##### -->
83 @notebook: the object which received the signal.
87 <!-- ##### SIGNAL GtkNotebook::create-window ##### -->
92 @notebook: the object which received the signal.
98 <!-- ##### SIGNAL GtkNotebook::focus-tab ##### -->
103 @notebook: the object which received the signal.
107 <!-- ##### SIGNAL GtkNotebook::move-focus-out ##### -->
112 @notebook: the object which received the signal.
115 <!-- ##### SIGNAL GtkNotebook::page-added ##### -->
120 @notebook: the object which received the signal.
124 <!-- ##### SIGNAL GtkNotebook::page-removed ##### -->
129 @notebook: the object which received the signal.
133 <!-- ##### SIGNAL GtkNotebook::page-reordered ##### -->
138 @notebook: the object which received the signal.
142 <!-- ##### SIGNAL GtkNotebook::reorder-tab ##### -->
147 @notebook: the object which received the signal.
152 <!-- ##### SIGNAL GtkNotebook::select-page ##### -->
157 @notebook: the object which received the signal.
161 <!-- ##### SIGNAL GtkNotebook::switch-page ##### -->
163 Emitted when the user or a function changes the current page.
166 @notebook: the object which received the signal.
167 @page: the new current page
168 @page_num: the index of the page
170 <!-- ##### ARG GtkNotebook:enable-popup ##### -->
175 <!-- ##### ARG GtkNotebook:group ##### -->
180 <!-- ##### ARG GtkNotebook:page ##### -->
185 <!-- ##### ARG GtkNotebook:scrollable ##### -->
190 <!-- ##### ARG GtkNotebook:show-border ##### -->
195 <!-- ##### ARG GtkNotebook:show-tabs ##### -->
200 <!-- ##### ARG GtkNotebook:tab-pos ##### -->
205 <!-- ##### ARG GtkNotebook:detachable ##### -->
210 <!-- ##### ARG GtkNotebook:menu-label ##### -->
215 <!-- ##### ARG GtkNotebook:position ##### -->
220 <!-- ##### ARG GtkNotebook:reorderable ##### -->
225 <!-- ##### ARG GtkNotebook:tab-expand ##### -->
230 <!-- ##### ARG GtkNotebook:tab-fill ##### -->
235 <!-- ##### ARG GtkNotebook:tab-label ##### -->
240 <!-- ##### ARG GtkNotebook:tab-pack ##### -->
242 Deprecated: 2.20: The tab packing functionality of children should not
243 be used anymore and support will be removed in the future.
246 <!-- ##### ARG GtkNotebook:arrow-spacing ##### -->
251 <!-- ##### ARG GtkNotebook:has-backward-stepper ##### -->
256 <!-- ##### ARG GtkNotebook:has-forward-stepper ##### -->
261 <!-- ##### ARG GtkNotebook:has-secondary-backward-stepper ##### -->
266 <!-- ##### ARG GtkNotebook:has-secondary-forward-stepper ##### -->
271 <!-- ##### ARG GtkNotebook:tab-curvature ##### -->
276 <!-- ##### ARG GtkNotebook:tab-overlap ##### -->
281 <!-- ##### STRUCT GtkNotebookPage ##### -->
283 The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook.
287 <!-- ##### FUNCTION gtk_notebook_new ##### -->
295 <!-- ##### FUNCTION gtk_notebook_append_page ##### -->
305 <!-- ##### FUNCTION gtk_notebook_append_page_menu ##### -->
316 <!-- ##### FUNCTION gtk_notebook_prepend_page ##### -->
326 <!-- ##### FUNCTION gtk_notebook_prepend_page_menu ##### -->
337 <!-- ##### FUNCTION gtk_notebook_insert_page ##### -->
348 <!-- ##### FUNCTION gtk_notebook_insert_page_menu ##### -->
360 <!-- ##### FUNCTION gtk_notebook_remove_page ##### -->
368 <!-- ##### FUNCTION gtk_notebook_page_num ##### -->
377 <!-- ##### FUNCTION gtk_notebook_next_page ##### -->
384 <!-- ##### FUNCTION gtk_notebook_prev_page ##### -->
391 <!-- ##### FUNCTION gtk_notebook_reorder_child ##### -->
400 <!-- ##### FUNCTION gtk_notebook_set_tab_pos ##### -->
404 @notebook: the notebook widget
408 <!-- ##### FUNCTION gtk_notebook_set_show_tabs ##### -->
416 <!-- ##### FUNCTION gtk_notebook_set_show_border ##### -->
424 <!-- ##### FUNCTION gtk_notebook_set_scrollable ##### -->
432 <!-- ##### FUNCTION gtk_notebook_popup_enable ##### -->
439 <!-- ##### FUNCTION gtk_notebook_popup_disable ##### -->
446 <!-- ##### FUNCTION gtk_notebook_get_current_page ##### -->
450 @notebook: the notebook widget
451 @Returns: the page number
454 <!-- ##### FUNCTION gtk_notebook_get_menu_label ##### -->
463 <!-- ##### FUNCTION gtk_notebook_get_nth_page ##### -->
472 <!-- ##### FUNCTION gtk_notebook_get_n_pages ##### -->
481 <!-- ##### FUNCTION gtk_notebook_get_tab_label ##### -->
490 <!-- ##### FUNCTION gtk_notebook_query_tab_label_packing ##### -->
501 <!-- ##### FUNCTION gtk_notebook_set_menu_label ##### -->
510 <!-- ##### FUNCTION gtk_notebook_set_menu_label_text ##### -->
519 <!-- ##### FUNCTION gtk_notebook_set_tab_label ##### -->
528 <!-- ##### FUNCTION gtk_notebook_set_tab_label_packing ##### -->
539 <!-- ##### FUNCTION gtk_notebook_set_tab_label_text ##### -->
548 <!-- ##### FUNCTION gtk_notebook_set_tab_reorderable ##### -->
558 <!-- ##### FUNCTION gtk_notebook_set_tab_detachable ##### -->
568 <!-- ##### FUNCTION gtk_notebook_get_menu_label_text ##### -->
578 <!-- ##### FUNCTION gtk_notebook_get_scrollable ##### -->
587 <!-- ##### FUNCTION gtk_notebook_get_show_border ##### -->
596 <!-- ##### FUNCTION gtk_notebook_get_show_tabs ##### -->
605 <!-- ##### FUNCTION gtk_notebook_get_tab_label_text ##### -->
615 <!-- ##### FUNCTION gtk_notebook_get_tab_pos ##### -->
624 <!-- ##### FUNCTION gtk_notebook_get_tab_reorderable ##### -->
634 <!-- ##### FUNCTION gtk_notebook_get_tab_detachable ##### -->
644 <!-- ##### FUNCTION gtk_notebook_set_current_page ##### -->
653 <!-- ##### FUNCTION gtk_notebook_set_group ##### -->
662 <!-- ##### FUNCTION gtk_notebook_get_group ##### -->
671 <!-- ##### FUNCTION gtk_notebook_set_action_widget ##### -->
681 <!-- ##### FUNCTION gtk_notebook_get_action_widget ##### -->
691 <!-- ##### USER_FUNCTION GtkNotebookWindowCreationFunc ##### -->
693 A function used by GtkNotebook when a detachable tab is dropped
694 in the root window, it's used to create a window containing a notebook
695 where the tab will be attached. This function will also be responsible
696 of moving/resizing the window and adding the necessary properties to
697 the notebook (i.e.: group-id).
699 If the function returns %NULL, the drag will be cancelled.
702 @source: The source #GtkNotebook of the drag operation
703 @page: the child #GtkWidget affected
704 @x: the X coordinate where the drop happens
705 @y: the Y coordinate where the drop happens
707 @Returns: The created #GtkNotebook where the tab will be attached, or NULL to cancel the drag
710 <!-- ##### FUNCTION gtk_notebook_set_window_creation_hook ##### -->