Class ActionTool

GoDiagram®
v10.0.11
by Northwoods Software®

The ActionTool is responsible for handling and dispatching mouse events on GraphObjects that have IsActionable set to true. This is how one implements "controls", such as buttons or sliders or knobs, as GraphObjects that can be inside Parts without interfering with the standard tool behaviors.

Inheritance
ActionTool
Namespace: Northwoods.Go.Tools
Assembly: Northwoods.GoDiagram.Avalonia.dll
Syntax
public class ActionTool : Tool
Remarks

This tool allows individual GraphObjects (usually Panels) to handle mouse-down-move-up events without having to define new Tools. It does this by calling ActionDown, ActionMove, ActionUp, and ActionCancel on objects that have IsActionable set to true.

This tool is a standard mouse-down tool, the ActionTool.

This tool does not utilize any Adornments or tool handles. This tool does not modify the model or conduct any transaction, although the actions that this invokes may do so.

It would be very unusual to want to customize this tool.

Constructors

ActionTool()

You do not normally need to create an instance of this tool because one already exists as the ActionTool.

The Name of this tool is "Action".

Declaration
public ActionTool()

Methods

CanStart()

This tool can run when there is a mouse-down on an object with IsActionable true or if the object is within a Panel that "IsActionable".

Declaration
public override bool CanStart()
Returns
Type Description
bool
Overrides
Remarks

This method may be overridden. Please read the Introduction page on Extensions for how to override methods and how to call this base method.

DoCancel()

Call the ActionCancel event if defined on the current object.

Declaration
public override void DoCancel()
Overrides

DoMouseDown()

If there is a GraphObject found with IsActionable set to true, call that object's ActionDown event, if it exists.

Declaration
public override void DoMouseDown()
Overrides

DoMouseMove()

If this tool is active call ActionMove, if it exists, on the active object.

Declaration
public override void DoMouseMove()
Overrides

DoMouseUp()

Calls the ActionUp event if defined, then effectively calls StandardMouseClick(Func<GraphObject, GraphObject>) to perform the normal click behaviors, and then stops this tool.

Declaration
public override void DoMouseUp()
Overrides