To help usability, and user ability to use the double-click functionnality to add new node in diagram.
I’d like to change the mouse cursor with ghost of new possible node to add (if it is possible, or just add a “+” like for the drop) when myDiagram.ClickCreatingTool.PrototypeData is setting.
Have you an idea ?
Thanks
Aurore
[code] // show cursor when mouse is in background, assuming ClickCreatingTool would operate there
// myDiagram.DefaultTool = new SpecialToolManager();
public class SpecialToolManager : ToolManager {
public override void DoMouseMove() {
if (CanClickCreateInBackground()) {
this.Diagram.Cursor = Cursors.Cross;
} else {
this.Diagram.Cursor = null;
}
base.DoMouseMove();
}
private bool CanClickCreateInBackground() {
ClickCreatingTool tool = this.Diagram.ClickCreatingTool;
if (tool == null) return false;
if (tool.PrototypeData == null) return false;
// only operates in the background, not on some Part
Part part = FindPartAt(this.Diagram.LastMousePointInModel, false);
if (part != null) return false;
return true;
}
}[/code]