diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-12-11 17:47:24 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-12-11 17:47:24 +0000 |
commit | 0cdc00ec0b5364bcbe9b0567be64bd9efdda3074 (patch) | |
tree | 7c15c586d752ed8976d6e22492d00082fc62477a /gtk/gtknotebook.h | |
parent | 5a188a9f13cd4fd4b4ae243796c92cb771313f64 (diff) | |
download | gtk+-0cdc00ec0b5364bcbe9b0567be64bd9efdda3074.tar.gz |
Add a function to determine if a window is the focus widget within its
Wed Oct 25 14:17:43 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.[ch] (gtk_widget_is_focus): Add a function
to determine if a window is the focus widget within
its toplevel.
* gtk/gtkcontainer.[ch]: Fix the return type of ::focus
to be boolean.
* gtk/gtkcontainer.c (gtk_container_real_focus): Move handling
of the case where the container CAN_FOCUS to here instead
of having it in each individual move-the-focus place.
* gtk/gtkcontainer.c: Rewrite handling of left-right and up-down
focusing to be geometric in a much more obvious sense. Arrowing
around is still non-intuitive because it isn't perfect and
because entries, etc, grab the arrow keys, but it at least
usually will do what you expect now.
* gtk/gtknotebook.[ch]: Many cleanups. Moved docs inline in this
file.
* gtk/gtknotebook.c: Change tabs to be a single item in
the focus chain. Make movement of focus on tabs with arrow
keys wrap around.
* gtk/gtknotebook.c (gtk_notebook_find_child): Add
CHECK_FIND_CHILD macro to give informative error messages
instead of silent returns.
* gtk/gtknotebook.c (gtk_notebook_init): Set the RECEIVES_DEFAULT
flag since we handle GdkReturn on the tabs.
* gtk/gtknotebook.c (gtk_notebook_expose_tabs): Invalidate
windows rather than sending expose events directly.
* gtk/gtknotebook.[ch] docs/Changes-2.0.txt: Move structure
definition for GtkNotebookPage into .c file, since it is private.
* gtk/testgtk.c (create_notebook): Add option for
testing borderless notebook.
* gtk/testgtk.c (page_switch): Removed egregious poking
around in GTK+ internals.
* docs/widget-system.txt: Remove references to GTK_REDRAW_PENDING.
* gtk/gtkclist.[ch]: Remove key press handler, handle focusing
properly through gtk_clist_focus. Make the title headers a
single item in the tab-focus chain, and make left-right wrap
around.
* gtk/gtkwindow.c (gtk_window_focus): Add a custom
focus method so that wrapping around works properly.
* gtk/gtktreeview.c: Remove calls to gtk_container_set_focus_child() -
that is handled for the widget now.
Diffstat (limited to 'gtk/gtknotebook.h')
-rw-r--r-- | gtk/gtknotebook.h | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/gtk/gtknotebook.h b/gtk/gtknotebook.h index ffa575c508..8e110b6784 100644 --- a/gtk/gtknotebook.h +++ b/gtk/gtknotebook.h @@ -45,9 +45,6 @@ extern "C" { #define GTK_NOTEBOOK_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_NOTEBOOK, GtkNotebookClass)) -#define GTK_NOTEBOOK_PAGE(_glist_) ((GtkNotebookPage *)((GList *)(_glist_))->data) - - typedef struct _GtkNotebook GtkNotebook; typedef struct _GtkNotebookClass GtkNotebookClass; typedef struct _GtkNotebookPage GtkNotebookPage; @@ -58,7 +55,7 @@ struct _GtkNotebook GtkNotebookPage *cur_page; GList *children; - GList *first_tab; + GList *first_tab; /* The first tab visible (for scrolling notebooks) */ GList *focus_tab; GtkWidget *menu; @@ -91,22 +88,6 @@ struct _GtkNotebookClass guint page_num); }; -struct _GtkNotebookPage -{ - GtkWidget *child; - GtkWidget *tab_label; - GtkWidget *menu_label; - - guint default_menu : 1; - guint default_tab : 1; - guint expand : 1; - guint fill : 1; - guint pack : 1; - - GtkRequisition requisition; - GtkAllocation allocation; -}; - /*********************************************************** * Creation, insertion, deletion * ***********************************************************/ @@ -143,15 +124,15 @@ void gtk_notebook_remove_page (GtkNotebook *notebook, * query, set current NoteebookPage * ***********************************************************/ -gint gtk_notebook_get_current_page (GtkNotebook *notebook); -GtkWidget* gtk_notebook_get_nth_page (GtkNotebook *notebook, - gint page_num); -gint gtk_notebook_page_num (GtkNotebook *notebook, - GtkWidget *child); -void gtk_notebook_set_page (GtkNotebook *notebook, - gint page_num); -void gtk_notebook_next_page (GtkNotebook *notebook); -void gtk_notebook_prev_page (GtkNotebook *notebook); +gint gtk_notebook_get_current_page (GtkNotebook *notebook); +GtkWidget* gtk_notebook_get_nth_page (GtkNotebook *notebook, + gint page_num); +gint gtk_notebook_page_num (GtkNotebook *notebook, + GtkWidget *child); +void gtk_notebook_set_page (GtkNotebook *notebook, + gint page_num); +void gtk_notebook_next_page (GtkNotebook *notebook); +void gtk_notebook_prev_page (GtkNotebook *notebook); /*********************************************************** * set Notebook, NotebookTab style * |