/// <summary> /// Class specific initialization. /// </summary> protected override void Initialize() { // Let base class generate targes base.Initialize(); // Create the drag feedback drawing class _dragFeedback = new DragFeedbackOutline(); }
/// <summary> /// Draw the zone indicator to the screen. /// </summary> /// <param name="dragFeedback">Feedback class.</param> /// <param name="mousePos">Screen position of mouse.</param> public override void DrawIndicator(DragFeedback dragFeedback, Point mousePos) { // Remember the current mouse pos _drawPos = mousePos; // Calculate the new drawing rectangle _drawRect = new Rectangle(_drawPos.X, _drawPos.Y, NewSize.Width, NewSize.Height); // Adjust for mouse starting position relative to source control _drawRect.X -= _offset.X; _drawRect.Y -= _offset.Y; DrawFeedback(dragFeedback, _drawRect); }
/// <summary> /// Update the screen indication to reflect new mouse position. /// </summary> /// <param name="dragFeedback">Feedback class.</param> /// <param name="screenPos">New screen position.</param> /// <param name="parent">Parent redocker instance.</param> public override void UpdateForMousePosition(DragFeedback dragFeedback, Point screenPos, Redocker parent) { // Remember the current mouse pos Point newPos = screenPos; // Calculate the new drawing rectangle Rectangle newRect = new Rectangle(newPos.X, newPos.Y, NewSize.Width, NewSize.Height); // Adjust for mouse starting position relative to source control newRect.X -= _offset.X; newRect.Y -= _offset.Y; dragFeedback.DragRectangle(newRect); // Remember new values _drawPos = newPos; _drawRect = newRect; }
/// <summary> /// Draw the zone indicator to the screen. /// </summary> /// <param name="dragFeedback">Feedback class.</param> /// <param name="mousePos">Screen position of mouse.</param> public virtual void DrawIndicator(DragFeedback dragFeedback, Point mousePos) { DrawFeedback(dragFeedback, _newSize); }
/// <summary> /// Update the screen indication to reflect new mouse position. /// </summary> /// <param name="dragFeedback">Feedback class.</param> /// <param name="screenPos">New screen position.</param> /// <param name="parent">Parent redocker instance.</param> public virtual void UpdateForMousePosition(DragFeedback dragFeedback, Point screenPos, Redocker parent) { }
/// <summary> /// Draw a reversible rectangle on the screen. /// </summary> /// <param name="dragFeedback">Feedback class.</param> /// <param name="rect">Screen bounding rectangle.</param> public virtual void DrawFeedback(DragFeedback dragFeedback, Rectangle rect) { dragFeedback.DragRectangle(rect); }
/// <summary> /// Remove the zone indicator from the screen. /// </summary> /// <param name="dragFeedback">Feedback class.</param> /// <param name="mousePos">Screen position of mouse.</param> public override void RemoveIndicator(DragFeedback dragFeedback, Point mousePos) { DrawFeedback(dragFeedback, _drawRect); }
/// <summary> /// Remove the zone indicator from the screen. /// </summary> /// <param name="dragFeedback">Feedback class.</param> /// <param name="mousePos">Screen position of mouse.</param> public override void RemoveIndicator(DragFeedback dragFeedback, Point mousePos) { }
/// <summary> /// Draw a reversible rectangle on the screen. /// </summary> /// <param name="dragFeedback">Feedback class.</param> /// <param name="rect">Screen bounding rectangle.</param> public override void DrawFeedback(DragFeedback dragFeedback, Rectangle rect) { dragFeedback.DragRectangles(new Rectangle[] { rect, _tabRect, _tabRectTL, _tabRectTR }); }