Class ClickSelectingTool

GoDiagram®
v10.0.8
by Northwoods Software®

The ClickSelectingTool selects and deselects Parts when there is a click. It does this by calling StandardMouseSelect(). It is also responsible for handling and dispatching click events on GraphObjects by calling StandardMouseClick(Func<GraphObject, GraphObject>).

Inheritance
ClickSelectingTool
Namespace: Northwoods.Go.Tools
Assembly: Northwoods.GoDiagram.WinForms.dll
Syntax
public class ClickSelectingTool : Tool
Remarks

Note that this tool avoids raising click events on objects that are in temporary layers. This is to prevent parts such as selection adornments from interfering with clicking on selected nodes or links. (Adornments are in the "Adornment" Layer, which IsTemporary.) However this means that if you add a Click event handler on a GraphObject in an Adornment, it will not be called. You can get it to be called by setting IsActionable to true on that object in the adornment.

This tool is a standard mouse-up tool, the ClickSelectingTool.

This tool does not utilize any Adornments or tool handles. This tool does not modify the model or conduct any transaction.

An example customization of this tool is shown in the Tree Map sample, where the StandardMouseSelect() method is overridden to permit the user to cycle through the chain of containing groups, changing the selection on each click to the next containing group.

If you want to programmatically select a Part, you can set IsSelected or call Select(Part). If you want to know which Part is at a particular point, you can call FindPartAt(Point, bool).

Constructors

ClickSelectingTool()

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

The Name of this tool is "ClickSelecting".

Declaration
public ClickSelectingTool()

Methods

CanStart()

This tool can run whenever a click occurs.

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.

DoMouseUp()

Upon a click, this calls StandardMouseSelect() to change the Selection collection, then calls StandardMouseClick(Func<GraphObject, GraphObject>) to perform the normal click behaviors, and then stops this tool.

Declaration
public override void DoMouseUp()
Overrides