On 2008-10-12, Albrecht Schlosser <[EMAIL PROTECTED]> wrote:
> 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

man, this is great. thank you.
it is kinda like opengl programming.  :) it took me a 
little time to get things right and the way i wanted them 
to be but i am quite happy with  it now. fltk is great! ")

i am not 100% sure when to return 1 and when to return 0 in 
my handle function. eg, should i return 1 for an 
FL_MOUSEWHEEL event, even if i dont use that event for any 
control? because i wonder if i don't, where is the event 
going to?
jane
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to