jane wrote:
> oh, this looks pretty easy, just draw and handle? well,
> makes sense, draw something and then handle events on it.
Your question was, where to start ... ;-)
Of course you would also need member variables to save the values and
the appropriate get and set methods, but that should be obvious.
> do i need damage too? or is that on a lower level?
No, not really. Damage can be used to improve drawing, to minimize areas
that need to be redrawn, but you can also let the default FLTK handling
draw everything when needed. After you change something, calling
redraw() should be enough.
I propose using Fl_Double_Window, because then there won't be any
visible flickering, but you could also use damage() and
{push_|pop_}clip() to reduce flickering, if you want to use a normal
Fl_Window. Otherwise, if your widget becomes big (and I assume that
would be necessary to hit the correct keys with the mouse), then
flickering could become a problem with normal Fl_Windows. But you can
decide this later, you don't need it for starting.
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk