>
> I'd like to ask you back, though: what is bothering you about the
> current interface?

FWIW, I'd prefer to say "add" whenever I want something added.
I think the drawbacks of the begin/end interface are a loss
of transparency and the introduction of a common error (forgetting
to call end), without sufficient offsetting benefit.

One's first exposure to fltk is something like this..

  Fl_Window* win = new Fl_Window(...)
  new Fl_Box( ... , "Hello");
  win->end();

To me, it looks like black magic.  This is would be clearer, imo:

   Fl_Window* win = new Fl_Window(...)
   win->add(new Fl_Box( ... , "Hello"));
   // no mysterious end() required

Building composites without holding pointers is no big deal

   MyComposite::MyComposite(int x, int y, int w, int h, char const* l)
      : Fl_Group(x, y, w, h, l)
   {
      add(new Fl_Input(...));
      add(new Fl_Button(...));
   }




_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to