Example #1
0
        /*! \brief Dispatch events that are specific to a plain Wimp task and are of no
         * use to a Toolbox task.  */
        public override void Dispatch(Wimp.EventArgs e)
        {
            uint window_handle = e.GetWindowHandle();

            if ((int)window_handle <= 0)
            {
                switch (e.Type)
                {
                case Wimp.PollCode.MenuSelection:
                    OnMenuSelection((Wimp.MenuSelectionEventArgs)e);
                    break;

                default:
                    // A Wimp event that is not specific to a window, so let Task.Dispatch
                    // deal with it.
                    base.Dispatch(e);
                    break;
                }
            }
            else
            {
                Wimp.Window window = Wimp.Window.GetInstance(window_handle);
                window.Dispatch(e);
            }
        }
Example #2
0
                /*! \brief Update this object with the current state of the caret.  */
                public override void Update()
                {
                    base.Update();

                    Window = GetInstance(WindowHandle);
                    Icon   = (Window != null) ? Window.GetIcon(IconHandle) : null;
                }
Example #3
0
                //! \brief Update this object with the current state of the pointer.
                public void Update()
                {
                    var block = new NativeWimp.PointerBlock();

                    Wimp.GetPointerInfo(out block);

                    Pos.X        = block.Pos.X;
                    Pos.Y        = block.Pos.Y;
                    Buttons      = (ButtonState)block.Buttons;
                    WindowHandle = block.WindowHandle;
                    IconHandle   = block.IconHandle;

                    Window = GetInstance(WindowHandle);
                    Icon   = Window != null?Window.GetIcon(IconHandle) : null;
                }
Example #4
0
 public PointerEventArgs(IntPtr unmanagedEventData) : base(unmanagedEventData)
 {
     Window = GetInstance(WindowHandle);
 }
Example #5
0
 public CaretEventArgs(IntPtr unmanagedEventData) : base(unmanagedEventData)
 {
     Window = GetInstance(WindowHandle);
     Icon   = (Window != null) ? Window.GetIcon(IconHandle) : null;
 }