/*! \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); } }
/*! \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; }
//! \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; }
public PointerEventArgs(IntPtr unmanagedEventData) : base(unmanagedEventData) { Window = GetInstance(WindowHandle); }
public CaretEventArgs(IntPtr unmanagedEventData) : base(unmanagedEventData) { Window = GetInstance(WindowHandle); Icon = (Window != null) ? Window.GetIcon(IconHandle) : null; }