[osg-users] Double-click concern.

Vincent Gadoury vgadoury at humancad.com
Wed Nov 11 14:36:29 PST 2009


Hi all,

Is there a convention about input events sequences in OSG? I first 
thought that click and drag sequence would always be:  push - [drag]* - 
release. This should work fine for most cases.

The problems come with the double-click event. Although the name of the 
event refers to a "click" which usually means a push-release pair, the 
EventQueue::mouseDoubleButtonPress method is used to adapt the event. 
This method imply that the event is actually a button press. As an 
example, this is corroborated by Qt which documents its MouseButtonPress 
as "Mouse press event" and its MouseButtonDblClick as "Mouse press again 
event".

I have done two tests, one with the osgManipulator example and one with 
a viewer adapted on Qt, both on Windows Vista. All tests show that the 
actual double-click sequence is: push - release - doubleclick - [drag]* 
- release.

The problem I see is that the double-click (actually the second-push) 
breaks the assumption that a drag follows a push  This can be seen in 
most OSG objects that implicitly make this assumption, as about nothing 
in OSG currently treat the 'doubleclick' event. From example, if you 
double-click+drag on a Dragger, it ignores the 'drag' events, since they 
were preceded by a 'release' event that sets the dragger as inactive.

I was wondering if this is an intended behaviour?

regards,

Vincent Gadoury


More information about the osg-users mailing list