FLTK logo

Re: FLTK Written With OpenGL?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.opengl  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: FLTK Written With OpenGL? Greg Ercolano Oct 11, 2012  
 
On 10/11/12 11:50, Mike Werner wrote:
>> That should be ok if you make the fltk widget invisible
> 
> The widget is invisible because the OGL graphics is drawn on top of it.
> I don't have to explicitly make it invisible.
> The widget is invisible but still active. Works out well for me.

	Right, I understand.. the opengl window is drawing over the button,
	obscuring what the button draws. It just sounds like the docs are
	trying to warn against this, whether it works in practice or not.

	Perhaps in your case the overlapping button is a sibling and not a child,
	which avoids the warning (the warning seems specific to children).

	If it's a sibling, I usually try to avoid sibling overlap to prevent fltk
	from getting confused at the region of overlap when it comes to calculating
	damage(), avoiding 'flicker', and event delivery of things like ENTER, LEAVE,
	and FOCUS.

	For instance, if the gl window later had handle() code added to it,
	the non-visible button would steal events due to its sense of 'focus'.
	So for instance, hitting keys like 'Spacebar' or 'Enter' would also
	trigger the button, perhaps unexpectedly.

	BTW, when I suggested clear_visible(), I was thinking it would prevent
	the widget from drawing without disabling it.. but that's not the case.
	clear_visible() seems to have the same effect as hide(), making the widget
	inactive too.

	I guess the proper way to make the button invisible but active,
	set box() and down_box() to FL_NO_BOX.. then it won't draw, but still 'works'.
	I know you say you don't need to do this, it works the way you have it,
	but it might avoid drawing artifacts that only shows up on other workstations,
	and guarantees avoiding the doc warning.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.