The thing that's a bit ugly API-wise is that with these changes,
remove()'s behavior becomes inconsistent with itself:

        remove(item) removes the item from the tree AND deletes it,
        similar to the behavior of Fl_Browser::remove().
        Similarly, any FLTK widget associated with the item is removed
        AND deleted.

        remove(widget) removes the widget from the tree, no delete.
        Similar to Fl_Group::remove(widget)

The fact one delete's and the other does not seems bad.

In my offline copy I've just written docs that say just that,
but it does seem 'inconsistent'.


RFC / API suggestions: should I change this, or just document it
and hope the user reads the docs carefully?

Or maybe I should add an optional flag to remove(item) that tells it
whether to destroy the FLTK widgets or not? (If so, maybe Fl_Group::remove()
should have this as well?)
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to