Compartilhar via


MouseAction Class

Definition

Base class for all mouse actions.

public ref class MouseAction abstract : IDisposable
public abstract class MouseAction : IDisposable
type MouseAction = class
    interface IDisposable
Public MustInherit Class MouseAction
Implements IDisposable
Inheritance
MouseAction
Derived
Implements

Remarks

Derive from this class to create your own custom mouse actions, such as a connector mouse tool.

Constructors

MouseAction()

Initializes a new instance of the MouseAction class.

MouseAction(Diagram)

Initializes a new instance of the MouseAction class.

Properties

ActionCanceledState

Gets an object representing the MouseAction-canceled state.

ActionCompletedState

Gets an object representing MouseAction-completed state.

CanBumpScroll

Called when a MouseMove event has been dispatched to this MouseAction.

ClickedState

Gets an object representing the clicked state.

CurrentDiagramArgs

Gets the latest DiagramEventArgs. A null value may be returned.

CurrentMouseActionEvent

Gets the current MouseAction event.

CurrentMouseActionState

Gets the current MouseAction state.

CurrentPoint

Gets/Sets the mouse position for the current event. The position is in world units relative to the diagram's top-left.

Diagram

The Diagram to which this MouseAction belongs.

DragCanceledState

Gets an object representing the state in which the drag operation has been canceled. (The MouseAction itself is not considered canceled at this state.)

DragCompletedState

Gets an object representing the state in which the drag operation has completed. (The MouseAction itself is not considered completed at this state.)

DraggingState

Gets an object representing the dragging state.

DragPendingState

Gets an object representing the drag/click pending state.

HasTooltip

Gets whether this mouse action supports dynamic tooltip.

HoveringState

Gets an object representing the hovering state.

InactiveState

Gets an object representing the inactive MouseAction state.

IsActive

Gets a value indicating whether this MouseAction is currently active.

MouseDownHitShape

Gets the hit shape of the most recent MouseDown event.

MouseDownPoint

Gets the mouse position of the most recent MouseDown event. The position is in world units relative to the diagram's top-left.

PreviousPoint

Gets/Sets the mouse position of the previous event. The position is in world units relative to the diagram's top-left.

ResetToolboxOnDragDrop

Whether to reset toolbox selection after a drag-drop operation triggered by this mouse action. Base implementation always returns true, which means the toolbox selection will be reset after a drag-drop operation triggered by this mouse action.

Methods

Activate(DiagramClientView)

Activates this MouseAction.

CanCancel(DiagramClientView)

Gets a value indicating whether this MouseAction can be canceled.

Cancel(DiagramClientView)

Cancels this MouseAction.

CanComplete(DiagramClientView)

Gets a value indicating whether this MouseAction can be completed.

CaptureMouse(DiagramClientView)

Captures the mouse.

Click(DiagramPointEventArgs)

Called by the DiagramClientView to dispatch a Click event to this MouseAction.

Complete(DiagramClientView)

Completes this MouseAction.

ContextMenuRequested(DiagramMouseEventArgs)

Called by the DiagramClientView to dispatch a ContextMenu event to this MouseAction.

Dispose()
Dispose(Boolean)
DoPaintFeedback(DiagramPaintEventArgs)

Called by the DiagramClientView to paint the feedback for the MouseAction.

DoubleClick(DiagramPointEventArgs)

Called by the DiagramClientView to dispatch a DoubleClick event to this MouseAction.

Finalize()
GetCursor(Cursor, DiagramClientView, PointD)

Gets the cursor to display at the specified mouse position.

GetTooltipText(DiagramItem)

Gets tooltip text for specified diagram item if HasTooltip returned true.

GotFocus(DiagramEventArgs)

Called by the DiagramClientView to dispatch a GotFocus event to this MouseAction.

Invalidate(DiagramClientView)

Called by this MouseAction to invalidate its feedback.

LostFocus(DiagramEventArgs)

Called by the DiagramClientView to dispatch a LostFocus event to this MouseAction.

MouseDown(DiagramMouseEventArgs)

Called by the DiagramClientView to dispatch a MouseDown event to this MouseAction.

MouseEnter(DiagramPointEventArgs)

Called by the DiagramClientView to dispatch a MouseEnter event to this MouseAction.

MouseHover(DiagramPointEventArgs)

Called by the DiagramClientView to dispatch a MouseHover event to this MouseAction.

MouseLeave(LeaveShapeEventArgs)

Called by the DiagramClientView to dispatch a MouseLeave event to this MouseAction.

MouseMove(DiagramMouseEventArgs)

Called by the DiagramClientView to dispatch a MouseMove event to this MouseAction.

MouseUp(DiagramMouseEventArgs)

Called by the DiagramClientView to dispatch a MouseUp event to this MouseAction.

MouseWheel(DiagramMouseEventArgs)

Called by the DiagramClientView to dispatch a ContextMenuRequested event to this MouseAction.

OnClicked(MouseActionEventArgs)

Called when this MouseAction has received a non-dragging MouseDown + MouseUp combination or when it has received a Complete event.

OnContextMenuRequested(DiagramMouseEventArgs)

Called when a ContextMenuRequested event has been dispatched to this MouseAction.

OnDiagramGotFocus(DiagramEventArgs)

Called when a GotFocus event has been dispatched to this MouseAction.

OnDiagramLostFocus(LostFocusEventArgs)

Called when a LostFocus event has been dispatched to this MouseAction.

OnDiagramScrolled(DiagramEventArgs)

Called when a Scrolled event has been dispatched to this MouseAction.

OnDoubleClick(DiagramPointEventArgs)

Called when a DoubleClick event has been dispatched to this MouseAction.

OnDragCanceled(MouseActionEventArgs)

Called when this MouseAction's drag operation has been canceled.

OnDragCompleted(MouseActionEventArgs)

Called when this MouseAction's drag operation has completed.

OnDraggingBegun(MouseActionEventArgs)

Called when this MouseAction has entered the dragging state.

OnDraggingEnded(MouseActionEventArgs)

Called when this MouseAction has exited the dragging state.

OnDragPendingBegun(MouseActionEventArgs)

Called when this MouseAction has entered the drag/click-pending state.

OnDragPendingEnded(MouseActionEventArgs)

Called when this MouseAction has exited the drag/click-pending state.

OnHoveringBegun(MouseActionEventArgs)

Called when this MouseAction has entered the hovering state.

OnHoveringEnded(MouseActionEventArgs)

Called when this MouseAction has exited the hovering state.

OnMouseActionActivated(DiagramEventArgs)

Called when this MouseAction has been activated.

OnMouseActionCanceled(DiagramEventArgs)

Called when the MouseAction has been canceled and is ready to be deactivated.

OnMouseActionCompleted(DiagramEventArgs)

Called when the MouseAction has completed and is ready to be deactivated.

OnMouseActionDeactivated(DiagramEventArgs)

Called when this MouseAction has been deactivated.

OnMouseDown(DiagramMouseEventArgs)

Called when a MouseDown event has been dispatched to this MouseAction.

OnMouseEnter(DiagramPointEventArgs)

Called when a MouseEnter event has been dispatched to this MouseAction.

OnMouseHover(DiagramPointEventArgs)

Called when a MouseHover event has been dispatched to this MouseAction.

OnMouseLeave(LeaveShapeEventArgs)

Called when a MouseLeave event has been dispatched to this MouseAction.

OnMouseMove(DiagramMouseEventArgs)

Called when a MouseMove event has been dispatched to this MouseAction.

OnMouseUp(DiagramMouseEventArgs)

Called when a MouseUp event has been dispatched to this MouseAction.

OnMouseWheel(DiagramMouseEventArgs)

Called when a MouseWheel event has been dispatched to this MouseAction.

ReleaseMouse(DiagramClientView)

Releases the mouse capture.

Scrolled(DiagramEventArgs)

Called by the DiagramClientView to dispatch a Scrolled event to this MouseAction.

Events

MouseActionActivated

Occurs when the MouseAction is activated.

MouseActionDeactivated

Occurs when the MouseAction is deactivated.

Applies to