Overview

This protocol defines the API for the graphicView

Tasks

Properties

activeIndex

The index of the character of the active layer in the string

@property (nonatomic) NSUInteger activeIndex

activeLayer

The active layer

@property (nonatomic, assign) GSLayer *activeLayer

Discussion

If only one layer is selected it retunes it, otherwise it retunes nil.

In the editview, this is the layer that has a gray info box.

activePosition

The position of the activeLayer

@property (nonatomic) NSPoint activePosition

Discussion

This is in scaled view coordinates.

See Also

cachedCount

number of layers in the view.

@property (nonatomic, readonly) NSUInteger cachedCount

Discussion

This might be difference than the number of characters in the string after the features are applied

cachedSelectionRange

the selection range after features are applied

@property (nonatomic, readonly) NSRange cachedSelectionRange

cursor

the currently active cursor

@property (nonatomic, retain) NSCursor *cursor

doKerning

Set if kerning is active

@property (nonatomic, assign) BOOL doKerning

doSpacing

Set if spacing is active

@property (nonatomic, assign) BOOL doSpacing

layoutManager

The layout manager

@property (strong, nonatomic) YLLayoutManager *layoutManager

scale

The scale of the view

@property (nonatomic) CGFloat scale

selectedRange

the selection range as in the original string

@property (nonatomic) NSRange selectedRange

textStorage

the text storage

@property (strong, nonatomic) YLTextStorage *textStorage

zoomTransformer

The zoom transformer that translates glyphs coordinates

@property (strong, nonatomic) NSAffineTransform *zoomTransformer

Instance Methods

cachedGlyphAtIndex:

Returns the cached layer at index

- (GSLayer *)cachedGlyphAtIndex:(NSUInteger)Index

Parameters

Index

The cached index

Return Value

The layer

cachedPositionAtIndex:

Returns the cached position at index

- (NSPoint)cachedPositionAtIndex:(NSUInteger)Index

Parameters

Index

The cached index

Return Value

the position

characterIndexForPoint:

The character at the position in view coordinates

- (NSUInteger)characterIndexForPoint:(NSPoint)thePoint

Parameters

thePoint

the position to check

Return Value

the character thats bounding box is contains the point

getActiveLocation:

Translates the view coordinate from the event into glyph coordinates of the active layer

- (NSPoint)getActiveLocation:(NSEvent *)theEvent

Parameters

theEvent

a mouse down even

Return Value

The coordinates