Home › Forums › Software Development › receive OnGaze when hidden behind another window
- This topic has 2 replies, 2 voices, and was last updated 8 years, 6 months ago by
Patrik [Tobii].
- AuthorPosts
- 26/03/2015 at 21:14 #2759
quoc
ParticipantIs it possible to add a control to a EyeXFramework.Forms.BehaviorMap that can receive OnGaze when hidden behind another window?
27/03/2015 at 22:51 #2768quoc
ParticipantLet me expand the question. I have
System.Windows.Forms.Panel panel1
on a Form, and I add thispanel1
to aEyeXFramework.Forms.BehaviorMap
to get OnGaze events. I’m getting the events; however, only when no other windows is on top of my panel. I would like to get the OnGaze events even when my panel is hidden behind another window. What’s the easiest way to get this behavior?Also, how do I remove a control from a BehaviorMap at runtime?
Sorry, hobbyist programmer here
30/03/2015 at 11:38 #2778Patrik [Tobii]
ParticipantHello Quoc,
Alas, the way EyeX engine work you will not get any OnGaze events if the interactor cannot be seen.
This works similar to other events in WindowsForms (i.e. you won’t recieve an MouseOver event in WinForms if there’s another window obstructing the view of the control).If you want to know when the user is looking at your control even if it’s obstructed, you could always calculate this yourself by doing hit testing using the gaze points from the gaze data stream.
To remove a control from a behavior map at runtime, you can add the following method to
BehaviorMap.cs
:public bool RemoveInteractor(Control control) { var interactor = GetInteractor(control); if (interactor != null) { return _interactors.Remove(interactor); } return false; }
Best regards
Patrik Svensson - AuthorPosts
- You must be logged in to reply to this topic.