Home Forums Software Development receive OnGaze when hidden behind another window

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2759
    quoc
    Participant

    Is it possible to add a control to a EyeXFramework.Forms.BehaviorMap that can receive OnGaze when hidden behind another window?

    #2768
    quoc
    Participant

    Let me expand the question. I have System.Windows.Forms.Panel panel1 on a Form, and I add this panel1 to a EyeXFramework.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

    #2778
    Patrik [Tobii]
    Participant

    Hello 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

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.