> Fabien: one question about implementing this. > > I take it you want the color() to be the default for > newly created items. Correct, this is the way fluid expect the background color to be set for most widgets, color2() being generically for the selection color use. > > But since we have tree->item_labelbgcolor() that's supposed > to affect the newly created item's color, I'm wondering how > color() and item_labelbgcolor() should interact. > > Currently newly created items by default inherit the > tree->item_labelbgcolor(). > > I can change the behavior so that if tree->item_labelbgcolor() > is left unset, color() will be used instead, and changes to > color() will be used, and that's fine. As I envisioned it, the default color would be the color() attribute, then the item_labelbgcolor() would just be synonymous to the color() API. Then color() would be overloaded in your code if necessary to be compatible with behavior of item_labelbgcolor(). > > Up until the point the app then sets tree->item_labelbgcolor(), > which would override using color(), and even that makes sense. > > What I'm not sure about is what should happen if the app > then changes color(); should new items use the color(), > or should they stick to using the item_labelbgcolor()? The answer to the question in the example would be cyan because color() and item_labelbgcolor() would affect internally the same private [color] attribute ...
Does that make sense to you ? Hope that helps, -Fab _______________________________________________ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs