Oh, and I should add that's very much 'work in progress' code:

        * It has not been tested for stability or side effects
        * Has remnant debug/testing code that should later be removed
        * The code has not been optimized
        * There's redundant code (draw_focus()) that should be replaced
          with calls to existing FLTK code
        * Some code is not even finished (some features may be partially 
implemented)
        * New behaviors need to be documented

The patch does add some methods that are definitely needed for anyone
to move development forward, and these are more or less stable (and even 
documented):

        Fl_Tree_Item::next_visible_item();
        Fl_Tree_Item::prev_sibling()
        Fl_Tree_Item::next_sibling()
        Fl_Tree_Item::prev_sibling()
        Fl_Tree_Item::next_displayed()
        Fl_Tree_Item::prev_displayed()
        Fl_Tree_Item::visible()
        Fl_Tree_Item::visible_r()

So if you intend to play with this patch, only do so if you're expecting
to use it to further development.. don't use it just to add keyboard nav,
as it's incomplete as shown.

If you're able to get it closer to a finished state, feel free to check it
in (assuming you have svn access and are confident in its state), or pass
your mods back to me and I can merge it with my own code.

Greg Ercolano wrote:
> Here's a patch against r7680 adding keyboard nav to Fl_Tree:
> http://seriss.com/people/erco/fltk/tmp/Fl_Tree-add-keyboard-nav-to-r7680.patch
> 
> With this, you can use up/down to move the focus box, and spacebar to toggle
> items. Also, shift-up/down will extend selections. And left/right will 
> open/close
> items.
> 
> Note however this patch *breaks* child FLTK widgets of the Fl_Tree.
> For instance, in the tree.cxx demo, the FLTK buttons "ccc button", "d1" and 
> "d2"
> that are in the tree do not work when pressed or navigated to.
> 
> The reason for this is, I was having a hard time figuring out how to merge
> the event handling for the tree's own widgets and FLTK's own child widgets,
> esp. for keyboard nav. If someone can figure that one out, that'd be great,
> as I couldn't quite get my head around how to handle that.
> 
> 
> Greg Ercolano wrote:
>>      I'll see if I can merge it with current, and provide some diffs..
>>
>> Domingo Alvarez Duarte wrote:
>>> Can you make availlable your Fl_Tree with keyboard navigation ?
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to