GlyphsReporter Protocol Reference
Declared in | GlyphsReporterProtocol.h |
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.
Tasks
– interfaceVersion
required method– title
required method– setController:
required method– drawBackgroundForLayer:
– drawBackgroundForLayer:options:
– drawBackgroundWithOptions:
– needsExtraMainOutlineDrawingForInactiveLayer:
– shouldDrawAccentCloudForLayer:
– needsExtraMainOutlineDrawingForActiveLayer:
– drawForegroundForLayer:
– drawForegroundWithOptions:
– drawForegroundForLayer:options:
– drawBackgroundForInactiveLayer:
– drawBackgroundForInactiveLayer:options:
– drawForegroundForInactiveLayer:options:
– willActivate
– willDeactivate
– keyEquivalent
– modifierMask
– addMenuItemsForEvent:toMenu:
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
Warning: Deprecated in version 2.3, Use @see drawBackgroundForInactiveLayer:options:
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.
drawBackgroundForInactiveLayer:options:
Is called to asked the plugin to draw anything it likes behind the normal outlines in an inactive layer
- (void)drawBackgroundForInactiveLayer:(GSLayer
*)layer options:(NSDictionary *)options
Parameters
- layer
-
The Layer to draw
- options
-
A dictionary with some info about the envorinment (currently “Scale”)
Availability
2.3 (839)
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
Warning: Deprecated in version 2.3, Use @see drawBackgroundForLayer:options:
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:options:
Is called to asked the plugin to draw anything it likes behind the normal outlines
- (void)drawBackgroundForLayer:(GSLayer *)layer
options:(NSDictionary *)options
Parameters
- layer
-
The Layer to draw
- options
-
A dictionary with some info about the envorinment (currently “Scale”)
Availability
2.3 (839)
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.
drawBackgroundWithOptions:
Is called to asked the plugin to draw anything it likes behind the normal outlines
- (void)drawBackgroundWithOptions:(NSDictionary
*)options
Parameters
- options
-
A dictionary with some info about the envorinment (currently “Scale”)
Availability
2.3 (849)
Discussion
implement this method if the automatic scaling gets into your way. You need to check for the current layer and position of the layer yourself.
drawForegroundForInactiveLayer:options:
Is called to asked the plugin to draw anything it likes in front the normal outlines in an inactive layer
- (void)drawForegroundForInactiveLayer:(GSLayer
*)layer options:(NSDictionary *)options
Parameters
- layer
-
The Layer to draw
- options
-
A dictionary with some info about the envorinment (currently “Scale”)
Availability
2.5 (1120)
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
Warning: Deprecated in version 2.3, Use @see drawForegroundForLayer:options:
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:options:
Is called to asked the plugin to draw anything it likes above the normal outlines
- (void)drawForegroundForLayer:(GSLayer *)layer
options:(NSDictionary *)options
Parameters
- layer
-
The Layer to draw
- options
-
A dictionary with some info about the envorinment (currently “Scale”)
Availability
2.3 (839)
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.
drawForegroundWithOptions:
Is called to asked the plugin to draw anything it likes above the normal outlines
- (void)drawForegroundWithOptions:(NSDictionary
*)options
Parameters
- options
-
A dictionary with some info about the envorinment (currently “Scale”)
Availability
2.3 (849)
Discussion
implement this method if the automatic scaling gets into your way. You need to check for the current layer and position of the layer yourself.
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
shouldDrawAccentCloudForLayer:
Implement this and return NO to disable the accent cloud.
- (BOOL)shouldDrawAccentCloudForLayer:(GSLayer
*)layer
Parameters
- layer
-
the layer