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>
30 #endif /* __cplusplus */
33 #define GTK_TYPE_NOTEBOOK (gtk_notebook_get_type ())
34 #define GTK_NOTEBOOK(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_NOTEBOOK, GtkNotebook))
35 #define GTK_NOTEBOOK_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_NOTEBOOK, GtkNotebookClass))
36 #define GTK_IS_NOTEBOOK(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_NOTEBOOK))
37 #define GTK_IS_NOTEBOOK_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_NOTEBOOK))
40 typedef struct _GtkNotebook GtkNotebook;
41 typedef struct _GtkNotebookClass GtkNotebookClass;
42 typedef struct _GtkNotebookPage GtkNotebookPage;
46 GtkContainer container;
48 GtkNotebookPage *cur_page;
61 guint show_border : 1;
65 guint click_child : 2;
68 guint child_has_focus : 1;
71 struct _GtkNotebookClass
73 GtkContainerClass parent_class;
75 void (* switch_page) (GtkNotebook *notebook,
76 GtkNotebookPage *page,
80 struct _GtkNotebookPage
84 GtkWidget *menu_label;
85 guint default_menu : 1;
86 guint default_tab : 1;
87 GtkRequisition requisition;
88 GtkAllocation allocation;
92 GtkType gtk_notebook_get_type (void);
93 GtkWidget* gtk_notebook_new (void);
94 void gtk_notebook_append_page (GtkNotebook *notebook,
96 GtkWidget *tab_label);
97 void gtk_notebook_append_page_menu (GtkNotebook *notebook,
100 GtkWidget *menu_label);
101 void gtk_notebook_prepend_page (GtkNotebook *notebook,
103 GtkWidget *tab_label);
104 void gtk_notebook_prepend_page_menu (GtkNotebook *notebook,
106 GtkWidget *tab_label,
107 GtkWidget *menu_label);
108 void gtk_notebook_insert_page (GtkNotebook *notebook,
110 GtkWidget *tab_label,
112 void gtk_notebook_insert_page_menu (GtkNotebook *notebook,
114 GtkWidget *tab_label,
115 GtkWidget *menu_label,
117 void gtk_notebook_remove_page (GtkNotebook *notebook,
119 gint gtk_notebook_current_page (GtkNotebook *notebook);
120 void gtk_notebook_set_page (GtkNotebook *notebook,
122 void gtk_notebook_next_page (GtkNotebook *notebook);
123 void gtk_notebook_prev_page (GtkNotebook *notebook);
124 void gtk_notebook_set_tab_pos (GtkNotebook *notebook,
125 GtkPositionType pos);
126 void gtk_notebook_set_show_tabs (GtkNotebook *notebook,
128 void gtk_notebook_set_show_border (GtkNotebook *notebook,
130 void gtk_notebook_set_scrollable (GtkNotebook *notebook,
132 void gtk_notebook_set_tab_border (GtkNotebook *notebook,
134 void gtk_notebook_popup_enable (GtkNotebook *notebook);
135 void gtk_notebook_popup_disable (GtkNotebook *notebook);
139 #endif /* __cplusplus */
142 #endif /* __GTK_NOTEBOOK_H__ */