DrawKit
Vector and illustration framework for Mac OS X
Instance Methods | Class Methods | Protected Attributes | List of all members
DKToolRegistry Class Reference

DKToolRegistry takes over the tool collection functionality formerly part of DKDrawingTool itself. More...

Inheritance diagram for DKToolRegistry:
Inheritance graph
[legend]

Instance Methods

(NSArray *) - allKeysForTool:
 
(DKDrawingTool *) - drawingToolWithKeyboardEquivalent:
 Find the tool having a key equivalent matching the key event. More...
 
(DKDrawingTool *) - drawingToolWithName:
 Return a named tool from the registry. More...
 
(void) - registerDrawingTool:withName:
 Add a tool to the registry. More...
 
(void) - registerStandardTools
 
(NSArray *) - toolNames
 
(NSArray *) - tools
 
- Instance Methods inherited from NSObject
(NSString *) - address
 
(DKStyleRegistry *) - applicationWillReturnStyleRegistry
 
(BOOL- canBeUsedWithSelectionTool
 
(id- categoryManager:shouldReplaceObject:withObject:
 
(Class- classForCoder
 
(NSColor *) - colorValue
 
(NSColor *) - colourValue
 
(id- copy
 
(void) - dealloc
 
(id- deepCopy
 
(NSDictionary *) - dimensionValuesForArrowStroke:
 
(CGFloat- drawing:convertDistanceToExternalCoordinates:
 
(NSPoint) - drawing:convertLocationToExternalCoordinates:
 
(void) - drawing:didDrawRect:inView:
 
(void) - drawing:willDrawRect:inView:
 
(NSString *) - drawing:willReturnAbbreviationForUnit:
 
(NSString *) - drawing:willReturnFormattedCoordinateForDistance:
 
(CGFloat- drawingWillReturnUnitToPointsConversonFactor:
 
(void) - finalize
 
(NSString *) - hexString
 
(void) - hotspot:didEndTrackingWithEvent:inView:
 
(void) - hotspot:isTrackingWithEvent:inView:
 
(void) - hotspot:willBeginTrackingWithEvent:inView:
 
(NSData *) - imageData
 
(NSImage *) - imageResourceNamed:
 
(id- init
 
(id- initWithExpression:
 
(id- instantiateObjectWithShortName:parameters:
 
(BOOL- isLiteralValue
 
(void) - layoutManager:willPlaceGlyphAtIndex:atLocation:pathAngle:yOffset:
 
(void) - menuItem:wasAddedForObject:inCategory:
 
(BOOL- moveObjectTo:position:slope:userInfo:
 
(id- mutableCopy
 
(void) - oneShotComplete
 
(void) - oneShotHasReached:
 
(void) - oneShotWillBegin
 
(void) - path:elementIndex:type:points:subPathIndex:subPathClosed:contextInfo:
 
(id- placeLinkFromPoint:toPoint:onPath:linkNumber:userInfo:
 
(id- placeObjectAtPoint:onPath:position:slope:userInfo:
 
(NSPoint) - point
 
(NSPoint) - pointForTextLayout
 
(DKStyle *) - registry:shouldReplaceStyle:withStyle:
 
(NSBezierPath *) - renderer:willRenderPath:
 
(void) - routeFinder:progressHasReached:
 
(void) - setValue:forNumericParameter:
 
(NSString *) - stringValue
 
(CGFloat- taperFactorAtDistance:onPath:ofLength:
 
(void) - toolDidPerformUndoableAction:
 
(void) - toolWillPerformUndoableAction:
 
(NSURL *) - url
 
- Instance Methods inherited from <NSObject>
(NSString *) - description
 
(NSUInteger- hash
 
(BOOL- isEqual:
 
- Instance Methods inherited from <NSKeyValueBindingCreation>
(void) - bind:toObject:withKeyPath:options:
 
(NSArray *) - exposedBindings
 
(NSDictionary *) - infoForBinding:
 
(NSArray *) - optionDescriptionsForBinding:
 
(void) - unbind:
 
(Class- valueClassForBinding:
 

Class Methods

(DKToolRegistry *) + sharedToolRegistry
 Return the shared tool registry. More...
 
- Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 
- Class Methods inherited from <NSKeyValueBindingCreation>
(void) + exposeBinding:
 

Protected Attributes

NSMutableDictionary * mToolsReg
 

Detailed Description

DKToolRegistry takes over the tool collection functionality formerly part of DKDrawingTool itself.

DKToolRegistry takes over the tool collection functionality formerly part of DKDrawingTool itself. The old methods in DKDrawingTool now map to this class for backward compatibility but are deprecated.

Method Documentation

- (NSArray*) allKeysForTool: (DKDrawingTool *)  tool
- (DKDrawingTool*) drawingToolWithKeyboardEquivalent: (NSEvent *)  keyEvent

Find the tool having a key equivalent matching the key event.

Parameters
keyEventthe key event to match
Returns
the tool if found, or nil
- (DKDrawingTool*) drawingToolWithName: (NSString *)  name

Return a named tool from the registry.

Parameters
namethe name of the tool of interest
Returns
the tool if found, or nil if not
- (void) registerDrawingTool: (DKDrawingTool *)  tool
withName: (NSString *)  name 

Add a tool to the registry.

Parameters
toolthe tool to register
namethe name of the tool of interest
- (void) registerStandardTools
+ (DKToolRegistry*) sharedToolRegistry

Return the shared tool registry.

Creates the registry if needed and installs the standard tools. For other tool collections you can instantiate a DKToolRegistry and add tools to it.

Returns
a shared DKToolRegistry object
- (NSArray*) toolNames
- (NSArray*) tools

Member Data Documentation

- (NSMutableDictionary*) mToolsReg
protected