1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
19 #ifndef __GTK_NOTEBOOK_H__
20 #define __GTK_NOTEBOOK_H__
24 #include <gtk/gtkcontainer.h>
29 #endif /* __cplusplus */
32 #define GTK_NOTEBOOK(obj) GTK_CHECK_CAST (obj, gtk_notebook_get_type (), GtkNotebook)
33 #define GTK_NOTEBOOK_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_notebook_get_type (), GtkNotebookClass)
34 #define GTK_IS_NOTEBOOK(obj) GTK_CHECK_TYPE (obj, gtk_notebook_get_type ())
37 typedef struct _GtkNotebook GtkNotebook;
38 typedef struct _GtkNotebookClass GtkNotebookClass;
39 typedef struct _GtkNotebookPage GtkNotebookPage;
43 GtkContainer container;
45 GtkNotebookPage *cur_page;
58 guint show_border : 1;
62 guint click_child : 2;
65 guint child_has_focus : 1;
68 struct _GtkNotebookClass
70 GtkContainerClass parent_class;
72 void (* switch_page) (GtkNotebook *notebook,
73 GtkNotebookPage *page,
77 struct _GtkNotebookPage
81 GtkWidget *menu_label;
82 guint default_menu : 1;
83 guint default_tab : 1;
84 GtkRequisition requisition;
85 GtkAllocation allocation;
89 guint gtk_notebook_get_type (void);
90 GtkWidget* gtk_notebook_new (void);
91 void gtk_notebook_append_page (GtkNotebook *notebook,
93 GtkWidget *tab_label);
94 void gtk_notebook_append_page_menu (GtkNotebook *notebook,
97 GtkWidget *menu_label);
98 void gtk_notebook_prepend_page (GtkNotebook *notebook,
100 GtkWidget *tab_label);
101 void gtk_notebook_prepend_page_menu (GtkNotebook *notebook,
103 GtkWidget *tab_label,
104 GtkWidget *menu_label);
105 void gtk_notebook_insert_page (GtkNotebook *notebook,
107 GtkWidget *tab_label,
109 void gtk_notebook_insert_page_menu (GtkNotebook *notebook,
111 GtkWidget *tab_label,
112 GtkWidget *menu_label,
114 void gtk_notebook_remove_page (GtkNotebook *notebook,
116 gint gtk_notebook_current_page (GtkNotebook *notebook);
117 void gtk_notebook_set_page (GtkNotebook *notebook,
119 void gtk_notebook_next_page (GtkNotebook *notebook);
120 void gtk_notebook_prev_page (GtkNotebook *notebook);
121 void gtk_notebook_set_tab_pos (GtkNotebook *notebook,
122 GtkPositionType pos);
123 void gtk_notebook_set_show_tabs (GtkNotebook *notebook,
125 void gtk_notebook_set_show_border (GtkNotebook *notebook,
127 void gtk_notebook_set_scrollable (GtkNotebook *notebook,
129 void gtk_notebook_set_tab_border (GtkNotebook *notebook,
131 void gtk_notebook_popup_enable (GtkNotebook *notebook);
132 void gtk_notebook_popup_disable (GtkNotebook *notebook);
136 #endif /* __cplusplus */
139 #endif /* __GTK_NOTEBOOK_H__ */