public void SetButtons(MouseButtons mouseButtons) { MouseButtonsDg btns = MouseButtonsDg.None; if ((mouseButtons & MouseButtons.Left) > 0) { btns |= MouseButtonsDg.Left; } if ((mouseButtons & MouseButtons.Middle) > 0) { btns |= MouseButtonsDg.Middle; } if ((mouseButtons & MouseButtons.Right) > 0) { btns |= MouseButtonsDg.Right; } if ((mouseButtons & MouseButtons.XButton1) > 0) { btns |= MouseButtonsDg.ExtraButton1; } if ((mouseButtons & MouseButtons.XButton2) > 0) { btns |= MouseButtonsDg.ExtraButton2; } this.buttons = btns; }
/// <ToBeCompleted></ToBeCompleted> public LayerMouseEventArgs(Layer layer, LayerItem item, MouseEventType eventType, MouseButtonsDg buttons, int clickCount, int wheelDelta, Point position, KeysDg modifiers) : base(eventType, buttons, clickCount, wheelDelta, position, modifiers) { this.layer = layer; this.item = item; }
/// <ToBeCompleted></ToBeCompleted> public LayerMouseEventArgs(Layer layer, LayerItem item, IEnumerable <Layer> selectedlayers, MouseEventType eventType, MouseButtonsDg buttons, int clickCount, int wheelDelta, Point position, KeysDg modifiers) : base(eventType, buttons, clickCount, wheelDelta, position, modifiers) { this._layer = layer; this._item = item; this._selectedLayers = new List <Layer>(selectedlayers); }
/// <ToBeCompleted></ToBeCompleted> protected internal void SetMouseEvent(MouseEventType eventType, MouseButtonsDg buttons, int clickCount, int wheelDelta, Point position, KeysDg modifiers) { this.eventType = eventType; this.buttons = buttons; this.clicks = clickCount; this.modifiers = modifiers; this.position = position; this.wheelDelta = wheelDelta; }
/// <ToBeCompleted></ToBeCompleted> protected internal void SetMouseEvent(MouseEventType eventType, MouseButtonsDg buttons, int clickCount, int wheelDelta, Point position, KeysDg modifiers) { EventType = eventType; Buttons = buttons; Clicks = clickCount; Modifiers = modifiers; Position = position; WheelDelta = wheelDelta; }
/// <ToBeCompleted></ToBeCompleted> public ShapeMouseEventArgs(IEnumerable<Shape> shapes, Diagram diagram, MouseEventType eventType, MouseButtonsDg buttons, int clicks, int delta, Point location, KeysDg modifiers) : base(eventType, buttons, clicks, delta, location, modifiers) { if (shapes == null) throw new ArgumentNullException("shapes"); this.shapes.AddRange(shapes); this.diagram = diagram; }
/// <summary> /// Initializing a new instance of <see cref="T:Dataweb.NShape.Controllers.MouseEventArgsDg" />. /// </summary> public MouseEventArgsDg(MouseEventType eventType, MouseButtonsDg buttons, int clicks, int delta, Point location, KeysDg modifiers) { this.buttons = buttons; this.clicks = clicks; this.wheelDelta = delta; this.eventType = eventType; this.position = location; this.modifiers = modifiers; }
public LayerListViewMouseEventArgs(Layer layer, LayerItem item, MouseEventType eventType, MouseButtonsDg buttons, int clickCount, int wheelDelta, Point position, KeysDg modifiers) : base(layer, item, eventType, buttons, clickCount, wheelDelta, position, modifiers) { }
/// <summary> /// Initializes an new empty instance of <see cref="T:Dataweb.NShape.Controllers.MouseEventArgsDg" />. /// </summary> protected internal MouseEventArgsDg() { this.buttons = MouseButtonsDg.None; this.clicks = 0; this.wheelDelta = 0; this.eventType = MouseEventType.MouseMove; this.position = Point.Empty; }
public LayerMouseEventArgs(Layer layer, LayerItem item, MouseEventType eventType, MouseButtonsDg buttons, int clickCount, int wheelDelta, Point position, KeysDg modifiers) : this(layer, item, EnumerationHelper.Enumerate(layer), eventType, buttons, clickCount, wheelDelta, position, modifiers) { }
private bool IsDragActionFeasible(MouseState mouseState, MouseButtonsDg button) { int dx = 0, dy = 0; if (mouseState.IsButtonDown(button) && IsToolActionPending) { // Check the minimum drag distance before switching to a drag action dx = Math.Abs(mouseState.X - ActionStartMouseState.X); dy = Math.Abs(mouseState.Y - ActionStartMouseState.Y); } return (dx >= MinimumDragDistance.Width || dy >= MinimumDragDistance.Height); }
/// <ToBeCompleted></ToBeCompleted> public bool IsButtonDown(MouseButtonsDg button) { return (Buttons & button) != 0; }