Re: How "Tab" brings widgets into focus
- From: varun_shrivastava <shrivastavavarun yahoo co in>
- To: gtk-devel-list gnome org
- Subject: Re: How "Tab" brings widgets into focus
- Date: Wed, 18 Jul 2007 06:02:42 -0700 (PDT)
hi,
so is it like when i press tab key, "move_focus" signal is emitted, and as
its a signal of GtkWindow class. it has a default handler
gtk_window_move_focus: which internally calls gtk_widget_child_focus(),
which actually emits "focus" signal of GtkWidget. This signal also has a
default handler "gtk_widget_real_focus()"
which calls gtk_widget_grab_focus.
But when i looked through the gtkcontainer.c code i found that GtkWidget
"focus" signal handler has been overridden to gtk_container_focus and also
has its own "set_focus_child" signal handler as
gtk_container_real_set_focus_child. Or gtk_container signal
"set_focus_child" is being emitted.
so which of the GtkWidget "focus" signal handler is being called the default
one or the overridden one in GtkContainer class.
David Nečas (Yeti)-2 wrote:
>
> On Tue, Jul 17, 2007 at 10:25:42PM -0700, varun_shrivastava wrote:
>>
>> i tried to find out how pressing Tab key brings widgets into focus, but
>> couldn;t find out.
>
> Start at the end of gtk_window_class_init() where
> add_arrow_bindings() and add_tab_bindings() are called and
> follow from there...
>
> I went through the add_arrow_bindings and add_tab_bindings i under stood
> the flow but not thoroughly,
> GtkBindingSet *binding contains GtkBindingEntry *entry which contains
> GtkBindingSignal *signal and in while loop it stores signal information in
> entry structure.
>
> but i didn't find this bindings structure being used after its initialized
> in gtk_window_class_init().
>
>
>
>
> it should lead you to places such as
> gtk_container_focus().
>
> Yeti
>
> --
> http://gwyddion.net/
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
>
--
View this message in context: http://www.nabble.com/How-%22Tab%22-brings-widgets-into-focus-tf4101158.html#a11668199
Sent from the Gtk+ - Dev - General mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]