GoToolSelecting Example


I can't seem to find any sample code using GoToolSelecting. If possible could you post a simple example that shows how to ignore deselects based on the GoObject being deselected.

GoToolSelecting simply does

public override void Start() {
  // maybe we'll find something at the input event point

  // whether or not we found and/or selected anything, call DoClick

  // all done!

GoTool.DoSelect calls Selection.Toggle / .Add / .Select for Ctrl / Shift / no modifier.

So, it may be that creating a custom GoSelection is what you need.

See the Selection section in the User Guide…

Each GoView has a GoSelection that holds the currently selected document objects for that view. The default selection object is an instance of GoSelection, but you can override GoView.CreateSelection to return your own subclass. …