Overview

GlyphsReporter: The protocol defining the reporter plugin protocol The pPlugin will show in the View menu and can be enabled like other view settings. It has no functionality other then draw something in the active layer.

Instance Methods

addMenuItemsForEvent:toMenu:

add something to the context menu

- (void)addMenuItemsForEvent:(NSEvent *)theEvent toMenu:(NSMenu *)theMenu

Parameters

theEvent

the Event that initiated the context menu. That can be used to determine mouse position.

theMenu

the NSMenu where you can add your menu items.

Discussion

Will be called for active reporter plugins. This allows to have some settings.

drawBackgroundForInactiveLayer:

Is called to asked the plugin to draw anything it likes behind the normal outlines in an inactive layer

- (void)drawBackgroundForInactiveLayer:(GSLayer *)Layer

Parameters

Layer

The Layer to draw

Discussion

The scaling and positioning is taken care of. That means you need to draw unscaled and the scaling will be done automatically. If you need to draw something with a absulute size, you need to counter scale it.

drawBackgroundForLayer:

Is called to asked the plugin to draw anything it likes behind the normal outlines

- (void)drawBackgroundForLayer:(GSLayer *)Layer

Parameters

Layer

The Layer to draw

Discussion

The scaling and positioning is taken care of. That means you need to draw unscaled and the scaling will be done automatically. If you need to draw something with a absulute size, you need to counter scale it.

drawForegroundForLayer:

Is called to asked the plugin to draw anything it likes above the normal outlines

- (void)drawForegroundForLayer:(GSLayer *)Layer

Parameters

Layer

The Layer to draw

Discussion

The scaling and positioning is taken care of. That means you need to draw unscaled and the scaling will be done automatically. If you need to draw something with a absulute size, you need to counter scale it.

keyEquivalent

The keyEquivalent to select the reporter.

- (NSString *)keyEquivalent

See Also

modifierMask

The modifier mask that is combined with the keyEquivalent.

- (int)modifierMask

See Also

needsExtraMainOutlineDrawingForActiveLayer:

Implement this and return YES if you did all drawing yourself and don’t need the regular outline drawn on top of it.

- (BOOL)needsExtraMainOutlineDrawingForActiveLayer:(GSLayer *)Layer

Parameters

Layer

the layer

Return Value

return YES if the normal outline drawing should be supressed.

Discussion

This is for active layers

needsExtraMainOutlineDrawingForInactiveLayer:

Implement this and return YES if you did all drawing yourself and don’t need the regular outline drawn on top of it.

- (BOOL)needsExtraMainOutlineDrawingForInactiveLayer:(GSLayer *)Layer

Parameters

Layer

the layer

Return Value

return YES if the normal outline drawing should be supressed.

Discussion

This is for inactive layers

setController:

This method is called before anything else is done to give the plugin access to the current Edit view

- (void)setController:(NSViewController<GSGlyphEditViewControllerProtocol> *)Controller

Parameters

Controller

The currently active edit view controller

willActivate

Is called when a reporter is activated.

- (void)willActivate

Discussion

Use it to run expensive operations to initialize the plugin

willDeactivate

Is called when a reporter is deactivated.

- (void)willDeactivate

Discussion

Use this to clean up.