Commit 2bec6c3f authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Add a reorder_tab keynav signal and an insert_page vfunc to GtkNotebook.

2006-02-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtknotebook.h: Add a reorder_tab keynav signal and an
	insert_page vfunc to GtkNotebook.

	* gtk/gtk.symbols:
	* gtk/gtknotebook.c: Support notebook DND. New API includes
	gtk_notebook_set_window_creation_hook,
	gtk_notebook_[gs]et_group_id,
	gtk_notebook_[gs]et_tab_reorderable,
	gtk_notebook_[gs]et_tab_detachable (#73240, Carlos Garnacho)
parent 6560be3b
2006-02-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtknotebook.h: Add a reorder_tab keynav signal and an
insert_page vfunc to GtkNotebook.
* gtk/gtk.symbols:
* gtk/gtknotebook.c: Support notebook DND. New API includes
gtk_notebook_set_window_creation_hook,
gtk_notebook_[gs]et_group_id,
gtk_notebook_[gs]et_tab_reorderable,
gtk_notebook_[gs]et_tab_detachable (#73240, Carlos Garnacho)
2006-02-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextiter.c: Fix macro declaration
......
2006-02-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtknotebook.h: Add a reorder_tab keynav signal and an
insert_page vfunc to GtkNotebook.
* gtk/gtk.symbols:
* gtk/gtknotebook.c: Support notebook DND. New API includes
gtk_notebook_set_window_creation_hook,
gtk_notebook_[gs]et_group_id,
gtk_notebook_[gs]et_tab_reorderable,
gtk_notebook_[gs]et_tab_detachable (#73240, Carlos Garnacho)
2006-02-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextiter.c: Fix macro declaration
......
2006-02-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt:
* gtk/tmpl/gtknotebook.sgml: Additions
2006-02-19 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Additions.
......
......@@ -2390,13 +2390,21 @@ gtk_notebook_set_tab_label
gtk_notebook_set_tab_label_packing
gtk_notebook_set_tab_label_text
gtk_notebook_set_tab_vborder
gtk_notebook_set_tab_reorderable
gtk_notebook_set_tab_detachable
gtk_notebook_get_menu_label_text
gtk_notebook_get_scrollable
gtk_notebook_get_show_border
gtk_notebook_get_show_tabs
gtk_notebook_get_tab_label_text
gtk_notebook_get_tab_pos
gtk_notebook_get_tab_reorderable
gtk_notebook_get_tab_detachable
gtk_notebook_set_current_page
gtk_notebook_set_group_id
gtk_notebook_get_group_id
GtkNotebookWindowCreationFunc
gtk_notebook_set_window_creation_hook
<SUBSECTION Standard>
GTK_NOTEBOOK
GTK_IS_NOTEBOOK
......
......@@ -66,6 +66,15 @@ will be a popup menu allowing the users to switch pages.
@notebook: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkNotebook::reorder-tab ##### -->
<para>
</para>
@notebook: the object which received the signal.
@arg1:
@:
<!-- ##### SIGNAL GtkNotebook::select-page ##### -->
<para>
......@@ -84,22 +93,49 @@ Emitted when the user or a function changes the current page.
@page: the new current page
@page_num: the index of the page
<!-- ##### SIGNAL GtkNotebook::tab-added ##### -->
<para>
</para>
@notebook: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkNotebook::tab-removed ##### -->
<para>
</para>
@notebook: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkNotebook::tab-reordered ##### -->
<para>
</para>
@notebook: the object which received the signal.
@arg1:
@arg2:
<!-- ##### ARG GtkNotebook:enable-popup ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:homogeneous ##### -->
<!-- ##### ARG GtkNotebook:group-id ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:page ##### -->
<!-- ##### ARG GtkNotebook:homogeneous ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:reorderable ##### -->
<!-- ##### ARG GtkNotebook:page ##### -->
<para>
</para>
......@@ -139,6 +175,11 @@ Emitted when the user or a function changes the current page.
</para>
<!-- ##### ARG GtkNotebook:detachable ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:menu-label ##### -->
<para>
......@@ -149,6 +190,11 @@ Emitted when the user or a function changes the current page.
</para>
<!-- ##### ARG GtkNotebook:reorderable ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:tab-expand ##### -->
<para>
......@@ -189,6 +235,16 @@ Emitted when the user or a function changes the current page.
</para>
<!-- ##### ARG GtkNotebook:tab-curvature ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:tab-overlap ##### -->
<para>
</para>
<!-- ##### STRUCT GtkNotebookPage ##### -->
<para>
The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook.
......@@ -503,6 +559,26 @@ gtk_notebook_set_current_page() instead.
@tab_vborder:
<!-- ##### FUNCTION gtk_notebook_set_tab_reorderable ##### -->
<para>
</para>
@notebook:
@child:
@reorderable:
<!-- ##### FUNCTION gtk_notebook_set_tab_detachable ##### -->
<para>
</para>
@notebook:
@child:
@reorderable:
<!-- ##### FUNCTION gtk_notebook_get_menu_label_text ##### -->
<para>
......@@ -559,6 +635,26 @@ gtk_notebook_set_current_page() instead.
@Returns:
<!-- ##### FUNCTION gtk_notebook_get_tab_reorderable ##### -->
<para>
</para>
@notebook:
@child:
@Returns:
<!-- ##### FUNCTION gtk_notebook_get_tab_detachable ##### -->
<para>
</para>
@notebook:
@child:
@Returns:
<!-- ##### FUNCTION gtk_notebook_set_current_page ##### -->
<para>
......@@ -568,3 +664,49 @@ gtk_notebook_set_current_page() instead.
@page_num:
<!-- ##### FUNCTION gtk_notebook_set_group_id ##### -->
<para>
</para>
@notebook:
@group_id:
<!-- ##### FUNCTION gtk_notebook_get_group_id ##### -->
<para>
</para>
@notebook:
@Returns:
<!-- ##### USER_FUNCTION GtkNotebookWindowCreationFunc ##### -->
<para>
A function used by GtkNotebook when a detachable tab is dropped
in the root window, it's used to create a window containing a notebook
where the tab will be attached. This function will also be responsible
of moving/resizing the window and adding the necessary properties to
the notebook (i.e.: group-id).
If the function returns %NULL, the drag will be cancelled.
</para>
@source: The source #GtkNotebook of the drag operation
@page: the child #GtkWidget affected
@x: the X coordinate where the drop happens
@y: the Y coordinate where the drop happens
@data: user data
@Returns: The created #GtkNotebook where the tab will be attached, or NULL to cancel the drag
<!-- ##### FUNCTION gtk_notebook_set_window_creation_hook ##### -->
<para>
</para>
@func:
@data:
......@@ -2321,6 +2321,13 @@ gtk_notebook_set_tab_label
gtk_notebook_set_tab_label_packing
gtk_notebook_set_tab_label_text
gtk_notebook_set_tab_pos
gtk_notebook_set_window_creation_hook
gtk_notebook_get_group_id
gtk_notebook_set_group_id
gtk_notebook_get_tab_reorderable
gtk_notebook_set_tab_reorderable
gtk_notebook_get_tab_detachable
gtk_notebook_set_tab_detachable
#endif
#endif
......
This diff is collapsed.
/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
/* GTK - The GIMP Toolkit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
......@@ -104,14 +105,27 @@ struct _GtkNotebookClass
gint offset);
void (* move_focus_out) (GtkNotebook *notebook,
GtkDirectionType direction);
void (* reorder_tab) (GtkNotebook *notebook,
GtkDirectionType direction,
gboolean move_to_last);
/* More vfuncs */
gint (* insert_page) (GtkNotebook *notebook,
GtkWidget *child,
GtkWidget *tab_label,
GtkWidget *menu_label,
gint position);
/* Padding for future expansion */
void (*_gtk_reserved1) (void);
void (*_gtk_reserved2) (void);
void (*_gtk_reserved3) (void);
void (*_gtk_reserved4) (void);
};
typedef GtkNotebook* (*GtkNotebookWindowCreationFunc) (GtkNotebook *source,
GtkWidget *page,
gint x,
gint y,
gpointer data);
/***********************************************************
* Creation, insertion, deletion *
***********************************************************/
......@@ -144,6 +158,16 @@ gint gtk_notebook_insert_page_menu (GtkNotebook *notebook,
void gtk_notebook_remove_page (GtkNotebook *notebook,
gint page_num);
/***********************************************************
* Tabs drag and drop *
***********************************************************/
void gtk_notebook_set_window_creation_hook (GtkNotebookWindowCreationFunc func,
gpointer data);
void gtk_notebook_set_group_id (GtkNotebook *notebook,
gint group_id);
gint gtk_notebook_get_group_id (GtkNotebook *notebook);
/***********************************************************
* query, set current NoteebookPage *
***********************************************************/
......@@ -232,6 +256,16 @@ void gtk_notebook_set_tab_label_packing (GtkNotebook *notebook,
void gtk_notebook_reorder_child (GtkNotebook *notebook,
GtkWidget *child,
gint position);
gboolean gtk_notebook_get_tab_reorderable (GtkNotebook *notebook,
GtkWidget *child);
void gtk_notebook_set_tab_reorderable (GtkNotebook *notebook,
GtkWidget *child,
gboolean reorderable);
gboolean gtk_notebook_get_tab_detachable (GtkNotebook *notebook,
GtkWidget *child);
void gtk_notebook_set_tab_detachable (GtkNotebook *notebook,
GtkWidget *child,
gboolean reorderable);
#ifndef GTK_DISABLE_DEPRECATED
#define gtk_notebook_current_page gtk_notebook_get_current_page
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment