# `GSGlyphEditView`

*Class*

The view showing the edit area.

## Declaration

```swift
class GSGlyphEditView
```

```objc
@interface GSGlyphEditView : NSView
```

```python
class GSGlyphEditView(NSView)
```

## Topics

### Instance Properties

- [`GSGlyphEditView.activeIndex`](/Core/GlyphsApp/GSGlyphEditView/activeIndex) — The index of the character of the active layer in the string.
- [`GSGlyphEditView.activeLayer`](/Core/GlyphsApp/GSGlyphEditView/activeLayer) — The active glyphs layer. Returns the selected layer if it is the only one selected, otherwise returns nil. In the edit view, this is the layer that has a gray info box.
- [`GSGlyphEditView.activeLayerRect`](/Core/GlyphsApp/GSGlyphEditView/activeLayerRect)
- [`GSGlyphEditView.activePosition`](/Core/GlyphsApp/GSGlyphEditView/activePosition) — The position of the activeLayer. This is in scaled view coordinates.
- [`GSGlyphEditView.backgroundStrokeColor`](/Core/GlyphsApp/GSGlyphEditView/backgroundStrokeColor)
- [`GSGlyphEditView.backgroundStrokeColorDark`](/Core/GlyphsApp/GSGlyphEditView/backgroundStrokeColorDark)
- [`GSGlyphEditView.cachedLayerCount`](/Core/GlyphsApp/GSGlyphEditView/cachedLayerCount) — Number of layers in the view. This might be different than the number of characters in the string after the features are applied.
- [`GSGlyphEditView.canvasColor`](/Core/GlyphsApp/GSGlyphEditView/canvasColor)
- [`GSGlyphEditView.controller`](/Core/GlyphsApp/GSGlyphEditView/controller)
- [`GSGlyphEditView.currentAttributes`](/Core/GlyphsApp/GSGlyphEditView/currentAttributes)
- [`GSGlyphEditView.currentMousePosition`](/Core/GlyphsApp/GSGlyphEditView/currentMousePosition)
- [`GSGlyphEditView.cursor`](/Core/GlyphsApp/GSGlyphEditView/cursor) — The currently active cursor.
- [`GSGlyphEditView.delegate`](/Core/GlyphsApp/GSGlyphEditView/delegate)
- [`GSGlyphEditView.displayString`](/Core/GlyphsApp/GSGlyphEditView/displayString)
- [`GSGlyphEditView.displayText`](/Core/GlyphsApp/GSGlyphEditView/displayText)
- [`GSGlyphEditView.doKerning`](/Core/GlyphsApp/GSGlyphEditView/doKerning) — Set if kerning is active.
- [`GSGlyphEditView.doSpacing`](/Core/GlyphsApp/GSGlyphEditView/doSpacing) — Set if spacing is active.
- [`GSGlyphEditView.drawOrigin`](/Core/GlyphsApp/GSGlyphEditView/drawOrigin)
- [`GSGlyphEditView.foregroundColor`](/Core/GlyphsApp/GSGlyphEditView/foregroundColor) — Deprecated, use ‘foregroundStrokeColor’ instead.
- [`GSGlyphEditView.foregroundFillColor`](/Core/GlyphsApp/GSGlyphEditView/foregroundFillColor)
- [`GSGlyphEditView.foregroundStrokeColor`](/Core/GlyphsApp/GSGlyphEditView/foregroundStrokeColor)
- [`GSGlyphEditView.glyphFrame`](/Core/GlyphsApp/GSGlyphEditView/glyphFrame)
- [`GSGlyphEditView.interpolationAxisLocation`](/Core/GlyphsApp/GSGlyphEditView/interpolationAxisLocation) — The design space location (axis ID to coordinate) at which Edit View shows a non-editable interpolation preview, or `nil` when it shows the real, editable layer.
- [`GSGlyphEditView.interpolationLayerId`](/Core/GlyphsApp/GSGlyphEditView/interpolationLayerId) — While an interpolation preview is shown, the layer ID of the key layer whose design space location the preview has most recently passed over.
- [`GSGlyphEditView.isDrawing`](/Core/GlyphsApp/GSGlyphEditView/isDrawing)
- [`GSGlyphEditView.drawCheckerboard`](/Core/GlyphsApp/GSGlyphEditView/drawCheckerboard)
- [`GSGlyphEditView.interpolating`](/Core/GlyphsApp/GSGlyphEditView/interpolating) — Whether Edit View currently shows an interpolation preview.
- [`GSGlyphEditView.kerningMode`](/Core/GlyphsApp/GSGlyphEditView/kerningMode)
- [`GSGlyphEditView.layerBackgroundColor`](/Core/GlyphsApp/GSGlyphEditView/layerBackgroundColor)
- [`GSGlyphEditView.layoutManager`](/Core/GlyphsApp/GSGlyphEditView/layoutManager)
- [`GSGlyphEditView.markedRange`](/Core/GlyphsApp/GSGlyphEditView/markedRange)
- [`GSGlyphEditView.markedText`](/Core/GlyphsApp/GSGlyphEditView/markedText)
- [`GSGlyphEditView.maxWidth`](/Core/GlyphsApp/GSGlyphEditView/maxWidth)
- [`GSGlyphEditView.otherLayersStrokeColor`](/Core/GlyphsApp/GSGlyphEditView/otherLayersStrokeColor)
- [`GSGlyphEditView.otherLayersStrokeColorDark`](/Core/GlyphsApp/GSGlyphEditView/otherLayersStrokeColorDark)
- [`GSGlyphEditView.safeVisibleRect`](/Core/GlyphsApp/GSGlyphEditView/safeVisibleRect)
- [`GSGlyphEditView.scale`](/Core/GlyphsApp/GSGlyphEditView/scale) — The scale of the view.
- [`GSGlyphEditView.selectedLayerId`](/Core/GlyphsApp/GSGlyphEditView/selectedLayerId)
- [`GSGlyphEditView.selectedLayerRange`](/Core/GlyphsApp/GSGlyphEditView/selectedLayerRange) — The layer selection range after features have been applied.
- [`GSGlyphEditView.selectedRange`](/Core/GlyphsApp/GSGlyphEditView/selectedRange) — The selection range in characters as in the original string. Just like the `markedRange` property, its location contains the character index from the text beginning.
- [`GSGlyphEditView.selectionAnchorLayerIndex`](/Core/GlyphsApp/GSGlyphEditView/selectionAnchorLayerIndex) — Marks the starting point of the selection.
- [`GSGlyphEditView.shouldDrawDark`](/Core/GlyphsApp/GSGlyphEditView/shouldDrawDark)
- [`GSGlyphEditView.stringValue`](/Core/GlyphsApp/GSGlyphEditView/stringValue)
- [`GSGlyphEditView.textStorage`](/Core/GlyphsApp/GSGlyphEditView/textStorage)
- [`GSGlyphEditView.userVisibleRect`](/Core/GlyphsApp/GSGlyphEditView/userVisibleRect)
- [`GSGlyphEditView.viewportAnimationDrivesDrawOrigin`](/Core/GlyphsApp/GSGlyphEditView/viewportAnimationDrivesDrawOrigin) — While `YES`, `scrollViewDidScroll:` no longer reconstructs `drawOrigin` from the clip view geometry.

### Instance Methods

- [`GSGlyphEditView addBackgroundImageFromPasteboard:`](/Core/GlyphsApp/GSGlyphEditView/addBackgroundImageFromPasteboard:) — Attempts to add a background image from the pasteboard to the active glyph layer. If the pasteboard contains file paths instead, attempts to import outlines from the referenced files.
- [`GSGlyphEditView bezierPathToViewSpace:atPoint:`](/Core/GlyphsApp/GSGlyphEditView/bezierPathToViewSpace:atPoint:)
- [`GSGlyphEditView bezierPathToViewSpace:atPoint:doOffset:`](/Core/GlyphsApp/GSGlyphEditView/bezierPathToViewSpace:atPoint:doOffset:)
- [`GSGlyphEditView cachedLayerAtIndex:`](/Core/GlyphsApp/GSGlyphEditView/cachedLayerAtIndex:) — Returns the cached layer at the given index.
- [`GSGlyphEditView cachedPositionAtIndex:`](/Core/GlyphsApp/GSGlyphEditView/cachedPositionAtIndex:) — Returns the cached position at a layer index.
- [`GSGlyphEditView charAtIndex:`](/Core/GlyphsApp/GSGlyphEditView/charAtIndex:)
- [`GSGlyphEditView checkAllGlyphs`](/Core/GlyphsApp/GSGlyphEditView/checkAllGlyphs)
- [`GSGlyphEditView checkVerticalWritingDirection:`](/Core/GlyphsApp/GSGlyphEditView/checkVerticalWritingDirection:)
- [`GSGlyphEditView convertLayerRectToFrameRect:`](/Core/GlyphsApp/GSGlyphEditView/convertLayerRectToFrameRect:)
- [`GSGlyphEditView convertLayerRectToViewRect:`](/Core/GlyphsApp/GSGlyphEditView/convertLayerRectToViewRect:)
- [`GSGlyphEditView defaultMenu`](/Core/GlyphsApp/GSGlyphEditView/defaultMenu)
- [`GSGlyphEditView displayAttributedData:`](/Core/GlyphsApp/GSGlyphEditView/displayAttributedData:)
- [`GSGlyphEditView displayString:`](/Core/GlyphsApp/GSGlyphEditView/displayString:)
- [`GSGlyphEditView drawBackgroundImageOfLayer:atPoint:asActive:`](/Core/GlyphsApp/GSGlyphEditView/drawBackgroundImageOfLayer:atPoint:asActive:) — Draws the background image of the given glyph layer into the receiver’s background CA layer. The CA layer is created if necessary.
- [`GSGlyphEditView drawLayer:atPoint:asActive:attributes:`](/Core/GlyphsApp/GSGlyphEditView/drawLayer:atPoint:asActive:attributes:)
- [`GSGlyphEditView drawLayer:atPoint:attributes:filled:`](/Core/GlyphsApp/GSGlyphEditView/drawLayer:atPoint:attributes:filled:)
- [`GSGlyphEditView getActiveLocation:`](/Core/GlyphsApp/GSGlyphEditView/getActiveLocation:) — Translates the view coordinate from the event into glyph coordinates of the active layer.
- [`GSGlyphEditView getLocation:`](/Core/GlyphsApp/GSGlyphEditView/getLocation:)
- [`GSGlyphEditView hideBackgroundImageCALayer`](/Core/GlyphsApp/GSGlyphEditView/hideBackgroundImageCALayer)
- [`GSGlyphEditView insertCharacter:atLocation:transitioningFromOrigin:`](/Core/GlyphsApp/GSGlyphEditView/insertCharacter:atLocation:transitioningFromOrigin:)
- [`GSGlyphEditView insertLayersWithGlyphs:`](/Core/GlyphsApp/GSGlyphEditView/insertLayersWithGlyphs:)
- [`GSGlyphEditView layerIndexForPoint:`](/Core/GlyphsApp/GSGlyphEditView/layerIndexForPoint:) — Converts the given graphical position to a layer index.
- [`GSGlyphEditView layerIndexForGlyphSelectionAtPoint:`](/Core/GlyphsApp/GSGlyphEditView/layerIndexForGlyphSelectionAtPoint:) — Converts the given graphical position to a layer index, preferring a layer whose drawn outline contains the point.
- [`GSGlyphEditView redraw:`](/Core/GlyphsApp/GSGlyphEditView/redraw:)
- [`GSGlyphEditView reflow`](/Core/GlyphsApp/GSGlyphEditView/reflow)
- [`GSGlyphEditView replaceActiveLayersWithGlyphs:`](/Core/GlyphsApp/GSGlyphEditView/replaceActiveLayersWithGlyphs:)
- [`GSGlyphEditView replaceCharactersInRange:withString:`](/Core/GlyphsApp/GSGlyphEditView/replaceCharactersInRange:withString:)
- [`GSGlyphEditView replaceOccurrencesOfString:withString:`](/Core/GlyphsApp/GSGlyphEditView/replaceOccurrencesOfString:withString:)
- [`GSGlyphEditView resetInterpolation`](/Core/GlyphsApp/GSGlyphEditView/resetInterpolation) — Returns to the real, editable layer by clearing `interpolationAxisLocation`.
- [`GSGlyphEditView setMarkedText:selectedRange:`](/Core/GlyphsApp/GSGlyphEditView/setMarkedText:selectedRange:)
- [`GSGlyphEditView setViewportAnimationDrawOrigin:`](/Core/GlyphsApp/GSGlyphEditView/setViewportAnimationDrawOrigin:) — Sets `drawOrigin` directly (with re-display and info box repositioning), bypassing the clip view geometry reconstruction done by `updateBoundsFromFrameView`.
- [`GSGlyphEditView showInterpolationAtAxisLocation:`](/Core/GlyphsApp/GSGlyphEditView/showInterpolationAtAxisLocation:) — Shows a non-editable interpolation preview at `axisLocation` (axis ID to coordinate).
- [`GSGlyphEditView switchToLayerWithId:associatedMasterId:inRange:`](/Core/GlyphsApp/GSGlyphEditView/switchToLayerWithId:associatedMasterId:inRange:) — Switches to the layer with the given layer id for the given range of characters as in the original string.
- [`GSGlyphEditView unmarkText`](/Core/GlyphsApp/GSGlyphEditView/unmarkText)
- [`GSGlyphEditView updateBoundsFromFrameView`](/Core/GlyphsApp/GSGlyphEditView/updateBoundsFromFrameView)
- [`GSGlyphEditView zoomToRect:padding:`](/Core/GlyphsApp/GSGlyphEditView/zoomToRect:padding:) — Zooms to fit the given rect and scrolls it into the center of the frame.
- [`GSGlyphEditView zoomFitInWindow:`](/Core/GlyphsApp/GSGlyphEditView/zoomFitInWindow:)
- [`GSGlyphEditView zoomTransformForPosition:doOffset:`](/Core/GlyphsApp/GSGlyphEditView/zoomTransformForPosition:doOffset:)

### Type Methods

- [`GSGlyphEditView displayString:fromChar:glyph:lastHasSlash:ASCIIonly:`](/Core/GlyphsApp/GSGlyphEditView/displayString:fromChar:glyph:lastHasSlash:ASCIIonly:)

## Relationships

### Inherits From

- `NSView`

### Conforms To

- `NSMenuItemValidation`
- `NSTextInputClient`

