gtk2/docs/reference/gtk/tmpl/gtknotebook.sgml

466 lines
11 KiB
Plaintext
Raw Normal View History

1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Title ##### -->
GtkNotebook
<!-- ##### SECTION Short_Description ##### -->
Set of pages with bookmarks.
1999-08-16 18:51:52 +00:00
<!-- ##### 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 -->
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkContainer</term>
<listitem><para>For functions that apply to every #GtkContainer
(like #GtkList).</para></listitem>
</varlistentry>
</variablelist>
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### STRUCT GtkNotebook ##### -->
<para>
</para>
<!-- ##### MACRO GTK_NOTEBOOK_PAGE ##### -->
<para>
Extracts the contents of the current element of #GList @_glist_ as a
#GtkNotebookPage.
1999-08-16 18:51:52 +00:00
</para>
@_glist_:
<!-- ##### STRUCT GtkNotebookPage ##### -->
<para>
The #GtkNotebookPage structure is used to store the pages of a notebook. It
is not an object.
1999-08-16 18:51:52 +00:00
</para>
@child: the contents of the page
@tab_label: the label shown in the bookmark
@menu_label: the label shown in the popup menu
1999-08-16 18:51:52 +00:00
@default_menu:
@default_tab:
@expand:
@fill:
@pack:
@requisition:
@allocation:
<!-- ##### FUNCTION gtk_notebook_new ##### -->
<para>
Creates a new #GtkNotebook widget
1999-08-16 18:51:52 +00:00
</para>
@Returns: the newly created G=#GtkNotebook
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_append_page ##### -->
<para>
Appends to @notebook a page whose content is @child, and whose bookmark is
@tab_label.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@child: the content of the new page
@tab_label: the bookmark for the page
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_append_page_menu ##### -->
<para>
Appends to @notebook a page whose content is @child, whose bookmark is
@tab_label, and whose menu label is @menu_label.
1999-08-16 18:51:52 +00:00
</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
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_prepend_page ##### -->
<para>
Prepends to @notebook a page whose content is @child, whose bookmark is
@tab_label, and whose menu label is @menu_label.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@child: the content of the new page
@tab_label: the bookmark of the page
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_prepend_page_menu ##### -->
<para>
Appends to @notebook a page whose content is @child, whose bookmark is
@tab_label, and whose menu label is @menu_label.
1999-08-16 18:51:52 +00:00
</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
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_insert_page ##### -->
<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.
1999-08-16 18:51:52 +00:00
</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
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_insert_page_menu ##### -->
<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.
1999-08-16 18:51:52 +00:00
</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
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_remove_page ##### -->
<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.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@page_num: the page number
1999-08-16 18:51:52 +00:00
<!-- ##### MACRO gtk_notebook_current_page ##### -->
<para>
Compatibility macro; in gtkcompat.h.
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### FUNCTION gtk_notebook_page_num ##### -->
<para>
Returns the page number of @child in @notebook.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@child: the child
@Returns: the page number, or -1 if @child is not in @notebook
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_page ##### -->
<para>
Switches to the page number @page_num. Negative values stand for the last
page; too large values are ignored.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@page_num: the page number
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_next_page ##### -->
<para>
Switches to the next page. Nothing happens if the current page is the last
page.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget.
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_prev_page ##### -->
<para>
Switches to the previous page. Nothing happens if the current page is the
first page.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_reorder_child ##### -->
<para>
Moves the page @child, so that it appears in position @position. Out of
bounds @position will be clamped.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@child: the child to deplace
@position: the new position
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_tab_pos ##### -->
<para>
Sets the position of the bookmarks.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@pos: the position
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_show_tabs ##### -->
<para>
Sets whether to show the bookmarks or not.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@show_tabs: a boolean value
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_show_border ##### -->
<para>
Sets whether to show the border of the notebook or not. Bookmarks are in the
border.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@show_border: a boolean value
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_scrollable ##### -->
<para>
Sets whether the bookmarks area may be scrollable or not if there are too
many bookmarks to fit in the allocated area.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@scrollable: a boolean value
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_tab_border ##### -->
<para>
Sets whether there should be a border around the bookmarks or not.
</para>
@notebook: the notebook widget
@border_width: a boolean value
1999-08-16 18:51:52 +00:00
<!-- ##### 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.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_popup_disable ##### -->
<para>
Disables the popup menu
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_get_current_page ##### -->
<para>
Returns the page number of the current page.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@Returns: the page number
1999-08-16 18:51:52 +00:00
<!-- ##### 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.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@child: the page
@Returns: the menu label
1999-08-16 18:51:52 +00:00
<!-- ##### 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.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@page_num: the page number
@Returns: the content of the page
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_get_tab_label ##### -->
<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.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@child: the page
@Returns: the tab label
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_query_tab_label_packing ##### -->
<para>
Looks for the packing attributes of the bookmarks of @child.
1999-08-16 18:51:52 +00:00
</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)
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_homogeneous_tabs ##### -->
<para>
Sets whether the tabs must have all the same size or not.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@homogeneous: a boolean value
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_menu_label ##### -->
<para>
Changes the menu label of @child. Nothing happens if @child is not in
@notebook.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@child: the page
@menu_label: the menu label, or NULL for default
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_menu_label_text ##### -->
<para>
Creates a new label and sets it as the menu label of @child.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@child: the page
@menu_text: the label text
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_tab_hborder ##### -->
<para>
Sets whether the tabs should have a horizontal border.
</para>
@notebook: the notebook widget
@tab_hborder: a boolean value
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_tab_label ##### -->
<para>
Changes the bookmark label of @child. Nothing happens if @child is not in
@notebook.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@child: the page
@tab_label: the bookmark label, or NULL for default
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_tab_label_packing ##### -->
<para>
Sets the packing parameters for the bookmark of @child. See
#GtkBoxPackStart for the exact meanings.
1999-08-16 18:51:52 +00:00
</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
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_tab_label_text ##### -->
<para>
Creates a new label and sets it as the bookmark label of @child.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the notebook widget
@child: the page
@tab_text: the label text
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_notebook_set_tab_vborder ##### -->
<para>
Sets whether the tabs should have a vertical border.
</para>
@notebook: the notebook widget
@tab_vborder: a boolean value
1999-08-16 18:51:52 +00:00
<!-- ##### SIGNAL GtkNotebook::switch-page ##### -->
<para>
Emitted when the user or a function changes the current page.
1999-08-16 18:51:52 +00:00
</para>
@notebook: the object which received the signal.
@page: the new current page
@page_num: the index of the page
1999-08-16 18:51:52 +00:00
<!-- ##### ARG GtkNotebook:page ##### -->
<para>
The current page
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### ARG GtkNotebook:tab_pos ##### -->
<para>
The position of the bookmarks
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### ARG GtkNotebook:tab_border ##### -->
<para>
Whether the bookmarks have a border or not
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### ARG GtkNotebook:tab_hborder ##### -->
<para>
Whether the bookmarks have a horizontal border or not
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### ARG GtkNotebook:tab_vborder ##### -->
<para>
Whether the bookmarks have a vertical border or not
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### ARG GtkNotebook:show_tabs ##### -->
<para>
Whether to show the bookmarks or not
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### ARG GtkNotebook:show_border ##### -->
<para>
Whether to show the border or not
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### ARG GtkNotebook:scrollable ##### -->
<para>
Whether the bookmarks should be scrollable or not
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### ARG GtkNotebook:enable_popup ##### -->
<para>
Whether the popup menu is enabled or not
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### ARG GtkNotebook:homogeneous ##### -->
<para>
</para>