Hi all,

Well I'm back again with more graphical weirdness. I'm playing with using an 
Fl_Box with an image as a backdrop and then overlaying Fl_Button types on top 
and using the FL_NO_BOX for the buttons. This looks great on my output, but 
when interacting with the buttons I am noticing strange drawing behavior. 
Basically sometimes I will see buttons getting drawn in a solid color(gray) and 
not redrawing the portion of the image behind. Also this redraw seems to effect 
other widgets in the window, for example an Fl_Output widget. This drawing 
effect only occurs once I start interacting through touchscreen with the button 
widgets.

On the other hand, if I change the box type to any other "bordered" frame then 
drawing occurs without a hitch. Except that I seem to get callback events 
firing and the down button state doesn't seem to occur. Actually it would be 
more accurate to say the down button state doesn't always occur, if I hold my 
finger on the button I get 5-6 callback events and then the down box state 
happens.

I'm curious if any else has seen this problem before?

I saw one other reference to something similar on the forums but it wasn't 
exactly the same. Also, I can get the buttons to "stick" in a state where they 
are drawn with the solid color. All this behavior is definitely not what I 
want, and I have found work arounds, but I'm still curious to understand fltk 
in greater detail.

This drawing effect seems to occur on my desktop pc as well as our embedded 
target. Here are my software specifics:

embedded target:
nano-X 0.91 (using framebuffer driver)
nxlib 0.45
fltk 1.1.7

desktop target:
X11
fltk 1.1.7

and here is a snippet of code that produces the errors for me:

Fl_Single_Window* make_genericscreen_window( Fl_PNG_Image *pBackgroundImg ) {
  Fl_Single_Window* w;
  { Fl_Single_Window* o = new Fl_Single_Window(320, 240);
    w = o;
    o->color(FL_FOREGROUND_COLOR);
    { Fl_Box* o = new Fl_Box(0, 0, 320, 240);
      o->image( pBackgroundImg );
    }
    { Fl_Button* o = new Fl_Button(0, 190, 78, 49);
      o->box(FL_NO_BOX);
      o->clear_visible_focus();
      o->callback( (Fl_Callback *)gs_backbutton_callback );
    }
    o->clear_border();
    o->end();
  }
  return w;
}

I have tried changing the box type and color of both the Fl_Single_Window and 
Fl_Box objects to no avail. Also I have tried using an Fl_Double_Window object 
but this produces worse results.

thanks,
Mike McCune
Navigation Solutions
248 282 5407
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to