Re: Moving focus on Enter
- From: Lucas Clemente Vella <lvella gmail com>
- To: "Milosz Derezynski" <internalerror gmail com>, gtkmm-list gnome org
- Subject: Re: Moving focus on Enter
- Date: Wed, 12 Sep 2007 08:32:50 -0300
Em Quarta 12 Setembro 2007, você escreveu:
> (Sorry for reposting Lucas, i forgot to CC gtkmm-list)
>
> http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Container.h
>tml#d24cb5e43953c698a5f6db24d186b263 and:
> http://library.gnome.org/devel/gtk/2.10/GtkContainer.html#id3846070
>
> So it seems there is no functionality to move it to the next widget;
> you'd have to get the focus chain, get the pointer address of the
> current focus widget, find it in the list, get the next widget, and
> focus it using Gtk::Widget::grab_focus(). O(N) operation; too bad
> GtkContainer doesn't keep track of the current focus widget.
>
> (Previous post said O(1) operation, i meant O(N) operation of course)
>
> Addition: You might want to use std::tr1::unordered_map<> or just a
> Glib/C GHashTable to keep track of the focus widgets, would maybe
> speed things up a little although traversing that list should be
> exteremely fast anyway.
>
> Milosz
Thanks, I thought it would be easier than searching that list, but it will do
for my application.
--
Lucas Clemente Vella
lvella gmail com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]