# `GlyphsToolEvent`

*Protocol*

Protocol for the Event handling parts of the tool API.

## Declaration

```swift
@MainActor protocol GlyphsToolEvent : GlyphsToolAuxiliaryDrawing
```

```objc
@protocol GlyphsToolEvent <GlyphsToolAuxiliaryDrawing>
```

```python
GlyphsToolEvent
```

## Overview

All plugins should conform to this protocol. Additionally it could conform the GlyphsToolDraw it it needs to draw.

The tool can implement all methods that are defined by [NSResponder](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSResponder_Class/)

## Topics

### Instance Properties

- [`GlyphsToolEvent.dragStart`](/Core/GlyphsApp/GlyphsToolEvent/dragStart) — The position where the dragging action started.
- [`GlyphsToolEvent.dragging`](/Core/GlyphsApp/GlyphsToolEvent/dragging) — Set to YES while the mouse is down and dragging.
- [`GlyphsToolEvent.interfaceVersion`](/Core/GlyphsApp/GlyphsToolEvent/interfaceVersion) — The interface version.
- [`GlyphsToolEvent.tempTrigger`](/Core/GlyphsApp/GlyphsToolEvent/tempTrigger) — The trigger (key mask) to select the tool temporarily

### Instance Methods

- [`GlyphsToolEvent activeLayers`](/Core/GlyphsApp/GlyphsToolEvent/activeLayers) — returns all layers that are currently active. That is mostly used for the ‘Select All Layers’ tool.
- [`GlyphsToolEvent addMenuItemsForEvent:controller:toMenu:`](/Core/GlyphsApp/GlyphsToolEvent/addMenuItemsForEvent:controller:toMenu:)
- [`GlyphsToolEvent addMenuItemsForEvent:toMenu:`](/Core/GlyphsApp/GlyphsToolEvent/addMenuItemsForEvent:toMenu:) — Callback to allow to add something to the context menu
- [`GlyphsToolEvent canShowInfoForSelection`](/Core/GlyphsApp/GlyphsToolEvent/canShowInfoForSelection) — return true if the current selection state might show a “Info for Selection” dialog.
- [`GlyphsToolEvent copy:`](/Core/GlyphsApp/GlyphsToolEvent/copy:) — Copy’n’Past Support
- [`GlyphsToolEvent defaultContextMenu`](/Core/GlyphsApp/GlyphsToolEvent/defaultContextMenu)
- [`GlyphsToolEvent drawSelection`](/Core/GlyphsApp/GlyphsToolEvent/drawSelection) — Draws the active selection. The default is a colored drag rect.
- [`GlyphsToolEvent eventHandler`](/Core/GlyphsApp/GlyphsToolEvent/eventHandler)
- [`GlyphsToolEvent extraInspectorViewControllers`](/Core/GlyphsApp/GlyphsToolEvent/extraInspectorViewControllers) — returns the view to place on the left of the normal inspector
- [`GlyphsToolEvent inspectorViewControllers`](/Core/GlyphsApp/GlyphsToolEvent/inspectorViewControllers) — returns the view to place in the inspector
- [`GlyphsToolEvent justAddedElement:`](/Core/GlyphsApp/GlyphsToolEvent/justAddedElement:)
- [`GlyphsToolEvent justAddedElementsFromArray:`](/Core/GlyphsApp/GlyphsToolEvent/justAddedElementsFromArray:)
- [`GlyphsToolEvent modifierChanged:`](/Core/GlyphsApp/GlyphsToolEvent/modifierChanged:) — Informs the receiver that the user has pressed or released a modifier key (Shift, Control, and so on).
- [`GlyphsToolEvent mouseDoubleDown:`](/Core/GlyphsApp/GlyphsToolEvent/mouseDoubleDown:)
- [`GlyphsToolEvent panelInspectors:`](/Core/GlyphsApp/GlyphsToolEvent/panelInspectors:)
- [`GlyphsToolEvent paste:`](/Core/GlyphsApp/GlyphsToolEvent/paste:) — Copy’n’Past Support
- [`GlyphsToolEvent previewOrientation`](/Core/GlyphsApp/GlyphsToolEvent/previewOrientation)
- [`GlyphsToolEvent showInfoForSelection`](/Core/GlyphsApp/GlyphsToolEvent/showInfoForSelection) — actually show the info for Selection dialog
- [`GlyphsToolEvent stringForTooltipAtPoint:`](/Core/GlyphsApp/GlyphsToolEvent/stringForTooltipAtPoint:)
- [`GlyphsToolEvent toolbarMenu`](/Core/GlyphsApp/GlyphsToolEvent/toolbarMenu) — Return a NSMenu object that should be displayed if the user presses/holds the mouse on the icon
- [`GlyphsToolEvent willActivate`](/Core/GlyphsApp/GlyphsToolEvent/willActivate) — Is called when the tool is activated.
- [`GlyphsToolEvent willDeactivate`](/Core/GlyphsApp/GlyphsToolEvent/willDeactivate) — Is called when the tool is deactivated.
- [`GlyphsToolEvent willSelectTempTool:`](/Core/GlyphsApp/GlyphsToolEvent/willSelectTempTool:) — A callback to let the tool know that a temp tool will be selected (by pressing a modifier key). You can return NO to prevent that.

## Relationships

### Inherits From

- [`GlyphsToolAuxiliaryDrawing`](/Core/GlyphsApp/GlyphsToolAuxiliaryDrawing)

### Conforming Types

- [`GlyphsPathPlugin`](/Core/GlyphsApp/GlyphsPathPlugin)

