get_item_focus() would certainly help.

If I may suggest, you could also add FL_TREE_REASON_FOCUS_SELECTED and 
FL_TREE_REASON_FOCUS_DESELECTED as fields in the Fl_Tree_Reason enum, if the 
focus changed but the selected item did not.

And maybe a couple of methods to setup which key/click triggers a focus change 
or a select change =)


What do you suggest as a workaround for me while waiting on the next awesome 
release? Is the Fl_Button method the only way?

Many thanks!



> On 05/17/12 09:44, Eugenio Bargiacchi wrote:
> > The problem is even if I were to reimplement handle() and make it trigger
> > a callback, there would be no obvious way for me to get the focused item,
> > since the pointer that holds that is private
>
>       It looks like the Fl_Tree API has a public set_item_focus(),
>       but does not have a get_item_focus().
>
>       Would having that help you?
>
>       If so, I suggest adding one to the Fl_Tree.H file,
>       and if it helps you, follow up and I'll add it to 1.3.x.
>
>       Fl_Tree is fairly young, so it's in active development,
>       and we're finding lots of new things to add to it.
>
>

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to