On Jun 1, 2007, at 10:31 AM, Manoj wrote:

> I'm using fltk-1.1.7 version.
>
> I'm doing something like
> I create a new window (base class Fl_Double_Window).class name is  
> CMyClass. This class contains complete view area.

Please remove the make_current() calls. They are wrong.

I take it that view1 and view2 are derived from Fl_Double_Window?  
That is not useful if they are part of a main window. You should  
derive from Fl_Window, or better from Fl_Box and add the x() and y()  
offset if needed. Fl_Window has *lot* more overhead than Fl_Box.

It seems to me like your are trying to do incremental drawing. In an  
event based system, there is no (easy) incremental drawing. You must  
redraw everything in your widget whenever you "draw()" is called by  
FLTK. Also, never call "draw()" yourself. I recommend that you store  
all coordinates of the segments of you line and redraw the intire  
line when your "draw()" function is called.

There is no reason to derive a custom class for your main window  
unless you are planning on doing some custom drawing in areas not  
covered by other widgets.

But, in order to help you best, I suggest that you write a short  
program, just a page or so, that is complete and compiles as-is. We  
can then take a look at every detail and even test what you wrote,  
and then send you a good solution.

Matthias


> ----
http://robowerk.com/


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

Reply via email to