Ardour  9.0-pre0-380-gbbdb6b0e63
gtknotebook.h
Go to the documentation of this file.
1 /* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
2 /* GTK - The GIMP Toolkit
3  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 
21 /*
22  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
23  * file for a list of people on the GTK+ Team. See the ChangeLog
24  * files for a list of changes. These files are distributed with
25  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
26  */
27 
28 #ifndef __GTK_NOTEBOOK_H__
29 #define __GTK_NOTEBOOK_H__
30 
31 
32 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
33 #error "Only <gtk/gtk.h> can be included directly."
34 #endif
35 
36 #include <gtk/gtkcontainer.h>
37 
38 
39 G_BEGIN_DECLS
40 
41 #define GTK_TYPE_NOTEBOOK (gtk_notebook_get_type ())
42 #define GTK_NOTEBOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_NOTEBOOK, GtkNotebook))
43 #define GTK_NOTEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_NOTEBOOK, GtkNotebookClass))
44 #define GTK_IS_NOTEBOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_NOTEBOOK))
45 #define GTK_IS_NOTEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_NOTEBOOK))
46 #define GTK_NOTEBOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_NOTEBOOK, GtkNotebookClass))
47 
48 
49 typedef enum
50 {
54 
55 typedef struct _GtkNotebook GtkNotebook;
56 typedef struct _GtkNotebookClass GtkNotebookClass;
57 #if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
58 typedef struct _GtkNotebookPage GtkNotebookPage;
59 #endif
60 
62 {
64 
65 #if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
66  GtkNotebookPage *GSEAL (cur_page);
67 #else
68  gpointer GSEAL (cur_page);
69 #endif
70  GList *GSEAL (children);
71  GList *GSEAL (first_tab); /* The first tab visible (for scrolling notebooks) */
72  GList *GSEAL (focus_tab);
73 
74  GtkWidget *GSEAL (menu);
75  GdkWindow *GSEAL (event_window);
76 
77  guint32 GSEAL (timer);
78 
79  guint16 GSEAL (tab_hborder);
80  guint16 GSEAL (tab_vborder);
81 
82  guint GSEAL (show_tabs) : 1;
83  guint GSEAL (homogeneous) : 1;
84  guint GSEAL (show_border) : 1;
85  guint GSEAL (tab_pos) : 2;
86  guint GSEAL (scrollable) : 1;
87  guint GSEAL (in_child) : 3;
88  guint GSEAL (click_child) : 3;
89  guint GSEAL (button) : 2;
90  guint GSEAL (need_timer) : 1;
91  guint GSEAL (child_has_focus) : 1;
92  guint GSEAL (have_visible_child) : 1;
93  guint GSEAL (focus_out) : 1; /* Flag used by ::move-focus-out implementation */
94 
95  guint GSEAL (has_before_previous) : 1;
96  guint GSEAL (has_before_next) : 1;
97  guint GSEAL (has_after_previous) : 1;
98  guint GSEAL (has_after_next) : 1;
99 };
100 
102 {
104 
105  void (* switch_page) (GtkNotebook *notebook,
106 #if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
107  GtkNotebookPage *page,
108 #else
109  gpointer page,
110 #endif
111  guint page_num);
112 
113  /* Action signals for keybindings */
114  gboolean (* select_page) (GtkNotebook *notebook,
115  gboolean move_focus);
116  gboolean (* focus_tab) (GtkNotebook *notebook,
117  GtkNotebookTab type);
118  gboolean (* change_current_page) (GtkNotebook *notebook,
119  gint offset);
120  void (* move_focus_out) (GtkNotebook *notebook,
121  GtkDirectionType direction);
122  gboolean (* reorder_tab) (GtkNotebook *notebook,
123  GtkDirectionType direction,
124  gboolean move_to_last);
125 
126  /* More vfuncs */
127  gint (* insert_page) (GtkNotebook *notebook,
128  GtkWidget *child,
129  GtkWidget *tab_label,
130  GtkWidget *menu_label,
131  gint position);
132 
133  GtkNotebook * (* create_window) (GtkNotebook *notebook,
134  GtkWidget *page,
135  gint x,
136  gint y);
137 
138  void (*_gtk_reserved1) (void);
139 };
140 
141 typedef GtkNotebook* (*GtkNotebookWindowCreationFunc) (GtkNotebook *source,
142  GtkWidget *page,
143  gint x,
144  gint y,
145  gpointer data);
146 
147 /***********************************************************
148  * Creation, insertion, deletion *
149  ***********************************************************/
150 
151 GType gtk_notebook_get_type (void) G_GNUC_CONST;
154  GtkWidget *child,
155  GtkWidget *tab_label);
157  GtkWidget *child,
158  GtkWidget *tab_label,
159  GtkWidget *menu_label);
161  GtkWidget *child,
162  GtkWidget *tab_label);
164  GtkWidget *child,
165  GtkWidget *tab_label,
166  GtkWidget *menu_label);
168  GtkWidget *child,
169  GtkWidget *tab_label,
170  gint position);
172  GtkWidget *child,
173  GtkWidget *tab_label,
174  GtkWidget *menu_label,
175  gint position);
177  gint page_num);
178 
179 /***********************************************************
180  * Tabs drag and drop *
181  ***********************************************************/
182 
183 #ifndef GTK_DISABLE_DEPRECATED
185  gpointer data,
186  GDestroyNotify destroy);
188  gint group_id);
190 
192  gpointer group);
193 gpointer gtk_notebook_get_group (GtkNotebook *notebook);
194 #endif /* GTK_DISABLE_DEPRECATED */
195 
197  const gchar *group_name);
198 const gchar *gtk_notebook_get_group_name (GtkNotebook *notebook);
199 
200 
201 /***********************************************************
202  * query, set current NotebookPage *
203  ***********************************************************/
204 
207  gint page_num);
210  GtkWidget *child);
212  gint page_num);
215 
216 /***********************************************************
217  * set Notebook, NotebookTab style *
218  ***********************************************************/
219 
221  gboolean show_border);
224  gboolean show_tabs);
227  GtkPositionType pos);
229 
230 #ifndef GTK_DISABLE_DEPRECATED
232  gboolean homogeneous);
234  guint border_width);
236  guint tab_hborder);
238  guint tab_vborder);
239 #endif /* GTK_DISABLE_DEPRECATED */
240 
242  gboolean scrollable);
246 
247 /***********************************************************
248  * enable/disable PopupMenu *
249  ***********************************************************/
250 
253 
254 /***********************************************************
255  * query/set NotebookPage Properties *
256  ***********************************************************/
257 
259  GtkWidget *child);
261  GtkWidget *child,
262  GtkWidget *tab_label);
264  GtkWidget *child,
265  const gchar *tab_text);
267  GtkWidget *child);
269  GtkWidget *child);
271  GtkWidget *child,
272  GtkWidget *menu_label);
274  GtkWidget *child,
275  const gchar *menu_text);
277  GtkWidget *child);
278 #ifndef GTK_DISABLE_DEPRECATED
280  GtkWidget *child,
281  gboolean *expand,
282  gboolean *fill,
283  GtkPackType *pack_type);
285  GtkWidget *child,
286  gboolean expand,
287  gboolean fill,
288  GtkPackType pack_type);
289 #endif
291  GtkWidget *child,
292  gint position);
294  GtkWidget *child);
296  GtkWidget *child,
297  gboolean reorderable);
299  GtkWidget *child);
301  GtkWidget *child,
302  gboolean detachable);
303 
305  GtkPackType pack_type);
307  GtkWidget *widget,
308  GtkPackType pack_type);
309 
310 #ifndef GTK_DISABLE_DEPRECATED
311 #define gtk_notebook_current_page gtk_notebook_get_current_page
312 #define gtk_notebook_set_page gtk_notebook_set_current_page
313 #endif /* GTK_DISABLE_DEPRECATED */
314 
315 G_END_DECLS
316 
317 #endif /* __GTK_NOTEBOOK_H__ */
GtkPositionType
Definition: gtkenums.h:313
GtkDirectionType
Definition: gtkenums.h:123
GtkPackType
Definition: gtkenums.h:279
void gtk_notebook_popup_enable(GtkNotebook *notebook)
GType gtk_notebook_get_type(void) G_GNUC_CONST
gint gtk_notebook_append_page_menu(GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label)
void gtk_notebook_set_tab_label_text(GtkNotebook *notebook, GtkWidget *child, const gchar *tab_text)
void gtk_notebook_set_tab_reorderable(GtkNotebook *notebook, GtkWidget *child, gboolean reorderable)
guint16 gtk_notebook_get_tab_hborder(GtkNotebook *notebook)
const gchar * gtk_notebook_get_tab_label_text(GtkNotebook *notebook, GtkWidget *child)
gint gtk_notebook_get_group_id(GtkNotebook *notebook)
void gtk_notebook_query_tab_label_packing(GtkNotebook *notebook, GtkWidget *child, gboolean *expand, gboolean *fill, GtkPackType *pack_type)
gboolean gtk_notebook_get_show_tabs(GtkNotebook *notebook)
struct _GtkNotebookPage GtkNotebookPage
Definition: gtknotebook.h:58
void gtk_notebook_set_tab_detachable(GtkNotebook *notebook, GtkWidget *child, gboolean detachable)
void gtk_notebook_reorder_child(GtkNotebook *notebook, GtkWidget *child, gint position)
gint gtk_notebook_append_page(GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label)
GtkNotebookTab
Definition: gtknotebook.h:50
@ GTK_NOTEBOOK_TAB_FIRST
Definition: gtknotebook.h:51
@ GTK_NOTEBOOK_TAB_LAST
Definition: gtknotebook.h:52
void gtk_notebook_set_group(GtkNotebook *notebook, gpointer group)
gint gtk_notebook_page_num(GtkNotebook *notebook, GtkWidget *child)
void gtk_notebook_prev_page(GtkNotebook *notebook)
void gtk_notebook_set_menu_label_text(GtkNotebook *notebook, GtkWidget *child, const gchar *menu_text)
void gtk_notebook_set_scrollable(GtkNotebook *notebook, gboolean scrollable)
guint16 gtk_notebook_get_tab_vborder(GtkNotebook *notebook)
GtkWidget * gtk_notebook_get_menu_label(GtkNotebook *notebook, GtkWidget *child)
gint gtk_notebook_insert_page_menu(GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label, gint position)
void gtk_notebook_set_menu_label(GtkNotebook *notebook, GtkWidget *child, GtkWidget *menu_label)
void gtk_notebook_next_page(GtkNotebook *notebook)
gint gtk_notebook_get_n_pages(GtkNotebook *notebook)
gint gtk_notebook_insert_page(GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, gint position)
void gtk_notebook_set_window_creation_hook(GtkNotebookWindowCreationFunc func, gpointer data, GDestroyNotify destroy)
gboolean gtk_notebook_get_tab_reorderable(GtkNotebook *notebook, GtkWidget *child)
gpointer gtk_notebook_get_group(GtkNotebook *notebook)
gint gtk_notebook_prepend_page_menu(GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label)
void gtk_notebook_set_tab_vborder(GtkNotebook *notebook, guint tab_vborder)
void gtk_notebook_set_tab_hborder(GtkNotebook *notebook, guint tab_hborder)
const gchar * gtk_notebook_get_menu_label_text(GtkNotebook *notebook, GtkWidget *child)
void gtk_notebook_set_current_page(GtkNotebook *notebook, gint page_num)
gint gtk_notebook_prepend_page(GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label)
void gtk_notebook_set_group_name(GtkNotebook *notebook, const gchar *group_name)
GtkWidget * gtk_notebook_get_nth_page(GtkNotebook *notebook, gint page_num)
gboolean gtk_notebook_get_show_border(GtkNotebook *notebook)
void gtk_notebook_set_tab_label(GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label)
void gtk_notebook_set_action_widget(GtkNotebook *notebook, GtkWidget *widget, GtkPackType pack_type)
void gtk_notebook_popup_disable(GtkNotebook *notebook)
void gtk_notebook_set_group_id(GtkNotebook *notebook, gint group_id)
GtkWidget * gtk_notebook_get_action_widget(GtkNotebook *notebook, GtkPackType pack_type)
void gtk_notebook_set_tab_pos(GtkNotebook *notebook, GtkPositionType pos)
void gtk_notebook_set_show_border(GtkNotebook *notebook, gboolean show_border)
GtkPositionType gtk_notebook_get_tab_pos(GtkNotebook *notebook)
void gtk_notebook_set_show_tabs(GtkNotebook *notebook, gboolean show_tabs)
GtkWidget * gtk_notebook_new(void)
void gtk_notebook_remove_page(GtkNotebook *notebook, gint page_num)
void gtk_notebook_set_tab_label_packing(GtkNotebook *notebook, GtkWidget *child, gboolean expand, gboolean fill, GtkPackType pack_type)
GtkNotebook *(* GtkNotebookWindowCreationFunc)(GtkNotebook *source, GtkWidget *page, gint x, gint y, gpointer data)
Definition: gtknotebook.h:141
GtkWidget * gtk_notebook_get_tab_label(GtkNotebook *notebook, GtkWidget *child)
const gchar * gtk_notebook_get_group_name(GtkNotebook *notebook)
gboolean gtk_notebook_get_scrollable(GtkNotebook *notebook)
void gtk_notebook_set_tab_border(GtkNotebook *notebook, guint border_width)
gboolean gtk_notebook_get_tab_detachable(GtkNotebook *notebook, GtkWidget *child)
void gtk_notebook_set_homogeneous_tabs(GtkNotebook *notebook, gboolean homogeneous)
gint gtk_notebook_get_current_page(GtkNotebook *notebook)
gboolean(* select_page)(GtkNotebook *notebook, gboolean move_focus)
Definition: gtknotebook.h:114
gboolean(* focus_tab)(GtkNotebook *notebook, GtkNotebookTab type)
Definition: gtknotebook.h:116
void(* switch_page)(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num)
Definition: gtknotebook.h:105
void(* move_focus_out)(GtkNotebook *notebook, GtkDirectionType direction)
Definition: gtknotebook.h:120
gboolean(* reorder_tab)(GtkNotebook *notebook, GtkDirectionType direction, gboolean move_to_last)
Definition: gtknotebook.h:122
void(* _gtk_reserved1)(void)
Definition: gtknotebook.h:138
gint(* insert_page)(GtkNotebook *notebook, GtkWidget *child, GtkWidget *tab_label, GtkWidget *menu_label, gint position)
Definition: gtknotebook.h:127
GtkContainerClass parent_class
Definition: gtknotebook.h:103
gboolean(* change_current_page)(GtkNotebook *notebook, gint offset)
Definition: gtknotebook.h:118
GtkNotebookPage * GSEAL(cur_page)
guint32 GSEAL(timer)
GList * GSEAL(focus_tab)
GList * GSEAL(first_tab)
GtkContainer container
Definition: gtknotebook.h:63
guint16 GSEAL(tab_vborder)
GList * GSEAL(children)
guint16 GSEAL(tab_hborder)
GtkWidget * GSEAL(menu)
GdkWindow * GSEAL(event_window)