Re: [fltk.development] Comments about the branch1.3-composite

2008-10-07 Thread Bill Spitzak
There is a branch of fltk2 that does exactly this, however there was some serious negative reaction so it was never put in the trunk. We called it the Group/Widget merge. As you suggest, the children count and array pointer were replaced with a single pointer to a structure that is only

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-24 Thread Albrecht Schlosser
MacArthur, Ian (SELEX GALILEO, UK) wrote: I'm not to bothered about Fl_Scroll, but this I do care about... But I don't think that having utf-8 doesn't affect anybody's code. In my german language code there are lots of german Umlauts (äöüÄÖÜ) and the sharp s (ß) that don't display

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-23 Thread Albrecht Schlosser
Michael Sweet wrote: Greg Ercolano wrote: Albrecht Schlosser wrote: because now the children() widget count would _not_ anymore count the 2 scrollbars if I understood his CHANGES.composite and related topics where he talks about now having to adapt existing code with children-2() offset

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-23 Thread Greg Ercolano
Michael Sweet wrote: Greg Ercolano wrote: Is 1.3.x supposed to break existing apps? I'd say the goal is to avoid breaking things unnecessarily, but there might be some side-effects of design changes (UTF-8, this Fl_Scroll stuff) which may require small code changes. That said, I

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-23 Thread Albrecht Schlosser
Greg Ercolano wrote: Greg Ercolano wrote: Can I suggest if API changes are made that affect existing code, to derive a new widget (eg. Fl_Scroll2, Fl_Scroll_Ex..) or some such? -1 from me, because this would mean that all the actively maintained code would have to be changed to get

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Albrecht Schlosser
Fabien Costantini wrote: A composite permits tree walking without having to distinguish groups from leaves, the latter one having no child as the main difference. As I wrote in the other thread, I think that this real composite aspect is a major rewrite of FLTK and is not doable in the FLTK

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Fabien Costantini
Not a major rewrite at all, here is how it could work: 1. Get the children() tree handling api to Fl_Widget instead of Fl_Group. 2. Use an API like is_leaf() that will indicate if is terminal to the external world or a group. Is it hard ? Maybe not. Especially if we don't change

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Albrecht Schlosser
Fabien Costantini wrote: Your need if I understood you is to get a private children feature. IMHO this can simply be achieved by what you do now, i.e: your target parent does not now that you are its child Well, it _does_ already know its private children ! :-) Look at Fl_Scroll. It

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Duncan Gibson
AlbrechtS and Fabien discussion snipped. I don't think this addresses Albrecht's current need to handle events from outside the current group's boundaries, and maybe it's too much of a change, but for future consideration... Rather than using a Composite (in the Design Patterns sense) would it

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Albrecht Schlosser
Duncan Gibson wrote: AlbrechtS and Fabien discussion snipped. I don't think this addresses Albrecht's current need to handle events from outside the current group's boundaries, and maybe it's too much of a change, but for future consideration... Rather than using a Composite (in the

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Duncan Gibson
I wrote: Rather than using a Composite (in the Design Patterns sense) would it not be possible to extend the current children idea so that there are actual children and adopted children. Albrecht replied: Yes, that's what my implementation does and what I tried to describe in the other

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Albrecht Schlosser
Fabien Costantini wrote: But even then, I reviewed recently the Fl_Group code and fortunately for us, the internal attributes to handle children (array_,children_ and size_) are all private ; so it could be quite easy to replace that 3 attributes internally by only one pointer on a

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Fabien Costantini
To remove the Fl_Label structure and replace it with a pointer would save even more space in Fl_Widget. In my app, there can be hundreds of widgets that don't have a label at all. This would be a great win! Concerning that aspect, I totally agree. If we would derive Fl_Label from Fl_Widget,

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Fabien Costantini
it won't create anything at initialization too so that if you don't need labels at all, you keep a null pointer to that structure internally. And it could also never create a widget style too like for the default buttons we use in an app, provided that we can change the defaults but we can ...

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Fabien Costantini
Duncan wrote: Maybe I have misunderstood, but this makes me uncomfortable. You want to allow a user to create a widget that initially has no children, but when the users adds X number of children and exceeds the initial width or height of the widget, or a child resizes when a font is

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Albrecht Schlosser
Duncan Gibson wrote: AlbrechtS wrote: BTW: Fl_Scroll could also be changed to allocate the scrollbars only when needed, and thus could be much smaller, if there are no scrollbars (the default when it is created or all widgets fit into it). The next step would be that every widget can also

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Fabien Costantini
The only problem would be, as Fabien already mentioned, that every feature added to the base class would increase its size. Not every feature, on a per widget basis, only the new attributes, and as Mike once pointed out : even new API may not increase the lib size if it is not used, as most

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Albrecht Schlosser
Fabien Costantini wrote: Duncan wrote: Maybe I have misunderstood, but this makes me uncomfortable. You want to allow a user to create a widget that initially has no children, but when the users adds X number of children and exceeds the initial width or height of the widget, or a child

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-22 Thread Albrecht Schlosser
Fabien Costantini wrote: To remove the Fl_Label structure and replace it with a pointer would save even more space in Fl_Widget. In my app, there can be hundreds of widgets that don't have a label at all. This would be a great win! Concerning that aspect, I totally agree. If we would

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-21 Thread Albrecht Schlosser
Fabien Costantini wrote: IMHO, it would be nice to split these modifications in two branches like branch-1.3-scroll and branch-1.3-composite. As I said, I easily agree with the scroll changes, but the composite widget aspect is just something else. We *do* agree here, but I think that my

Re: [fltk.development] Comments about the branch1.3-composite

2008-09-21 Thread Fabien Costantini
A composite permits tree walking without having to distinguish groups from leaves, the latter one having no child as the main difference. As I wrote in the other thread, I think that this real composite aspect is a major rewrite of FLTK and is not doable in the FLTK 1.3 time frame. It