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

simple class used to provide the drawing of knobs for object selection. More...

Inheritance diagram for DKKnob:
Inheritance graph
[legend]

Instance Methods

(NSSize) - actualHandleSize
 
(NSColor *) - controlBarColour
 
(CGFloat- controlBarWidth
 
(NSColor *) - controlKnobColour
 
(NSRect- controlKnobRectAtPoint:
 
(NSRect- controlKnobRectAtPoint:ofType:
 
(NSSize) - controlKnobSize
 
(NSColor *) - controlOffPathPointColour
 
(NSColor *) - controlOnPathPointColour
 
(void) - drawControlBarFromPoint:toPoint:
 
(void) - drawControlBarWithKnobsFromPoint:ofType:toPoint:ofType:
 
(void) - drawControlBarWithKnobsFromPoint:toPoint:
 
(DKKnobDrawingFlags) - drawingFlagsForKnobType:
 
(void) - drawKnobAtPoint:ofType:angle:highlightColour:
 
(void) - drawKnobAtPoint:ofType:angle:userInfo:
 
(void) - drawKnobAtPoint:ofType:userInfo:
 
(void) - drawKnobPath:ofType:userInfo:
 
(void) - drawPartcode:atPoint:fontSize:
 
(void) - drawRotationBarWithKnobsFromCentre:toPoint:
 
(NSColor *) - fillColourForKnobType:
 
(DKHandle *) - handleForType:
 
(DKHandle *) - handleForType:colour:
 
(BOOL- hitTestPoint:inKnobAtPoint:ofType:userInfo:
 
(NSBezierPath *) - knobPathAtPoint:ofType:angle:userInfo:
 
(id< DKKnobOwner >) - owner
 
(NSColor *) - rotationKnobColour
 
(CGFloat- scalingRatio
 
(void) - setControlBarColour:
 
(void) - setControlBarWidth:
 
(void) - setControlKnobColour:
 
(void) - setControlKnobSize:
 
(void) - setControlKnobSizeForViewScale:
 
(void) - setControlOffPathPointColour:
 
(void) - setControlOnPathPointColour:
 
(void) - setOwner:
 
(void) - setRotationKnobColour:
 
(void) - setScalingRatio:
 
(NSColor *) - strokeColourForKnobType:
 
(CGFloat- strokeWidthForKnobType:
 
- 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:
 
- Instance Methods inherited from <NSCoding>
(void) - encodeWithCoder:
 
(id- initWithCoder:
 
- Instance Methods inherited from <NSCopying>
(id- copyWithZone:
 

Class Methods

(NSColor *) + controlKnobColour
 
(NSRect+ controlKnobRectAtPoint:
 
(NSColor *) + controlOffPathPointColour
 
(NSColor *) + controlOnPathPointColour
 
(NSColor *) + rotationKnobColour
 
(void) + setControlKnobColour:
 
(void) + setControlOffPathPointColour:
 
(void) + setControlOnPathPointColour:
 
(void) + setRotationKnobColour:
 
(id+ standardKnobs
 
- Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 
- Class Methods inherited from <NSKeyValueBindingCreation>
(void) + exposeBinding:
 

Detailed Description

simple class used to provide the drawing of knobs for object selection.

simple class used to provide the drawing of knobs for object selection. You can override this and replace it (attached to any layer) to customise the appearance of the selection knobs for all drawn objects in that layer.

The main method a drawable will call is drawKnobAtPoint:ofType:userInfo:

The type (DKKnobType) is a functional description of the knob only - this class maps that functional description to a consistent appearance taking into account the basic type and a couple of generic state flags. Clients should generally avoid trying to do drawing themselves of knobs, but if they do, should use the lower level methods here to get consistent results.

Subclasses may want to customise many aspects of a knob's appearance, and can override any suitable factored methods according to their needs. Customisations might include the shape of a knob, its colours, whether stroked or filled or both, etc.

Method Documentation

- (NSSize) actualHandleSize
- (NSColor*) controlBarColour

Provided by category DKKnob(Deprecated).

- (CGFloat) controlBarWidth

Provided by category DKKnob(Deprecated).

+ (NSColor*) controlKnobColour

Provided by category DKKnob(Deprecated).

- (NSColor*) controlKnobColour

Provided by category DKKnob(Deprecated).

+ (NSRect) controlKnobRectAtPoint: (NSPoint)  kp

Provided by category DKKnob(Deprecated).

- (NSRect) controlKnobRectAtPoint: (NSPoint)  kp

Provided by category DKKnob(Deprecated).

- (NSRect) controlKnobRectAtPoint: (NSPoint)  kp
ofType: (DKKnobType)  knobType 

Provided by category DKKnob(Deprecated).

- (NSSize) controlKnobSize

Provided by category DKKnob(Deprecated).

+ (NSColor*) controlOffPathPointColour

Provided by category DKKnob(Deprecated).

- (NSColor*) controlOffPathPointColour

Provided by category DKKnob(Deprecated).

+ (NSColor*) controlOnPathPointColour

Provided by category DKKnob(Deprecated).

- (NSColor*) controlOnPathPointColour

Provided by category DKKnob(Deprecated).

- (void) drawControlBarFromPoint: (NSPoint)  a
toPoint: (NSPoint)  b 
- (void) drawControlBarWithKnobsFromPoint: (NSPoint)  a
ofType: (DKKnobType)  typeA
toPoint: (NSPoint)  b
ofType: (DKKnobType)  typeB 
- (void) drawControlBarWithKnobsFromPoint: (NSPoint)  a
toPoint: (NSPoint)  b 
- (DKKnobDrawingFlags) drawingFlagsForKnobType: (DKKnobType)  knobType

Provided by category DKKnob(Deprecated).

- (void) drawKnobAtPoint: (NSPoint)  p
ofType: (DKKnobType)  knobType
angle: (CGFloat radians
highlightColour: (NSColor *)  aColour 
- (void) drawKnobAtPoint: (NSPoint)  p
ofType: (DKKnobType)  knobType
angle: (CGFloat radians
userInfo: (id userInfo 
- (void) drawKnobAtPoint: (NSPoint)  p
ofType: (DKKnobType)  knobType
userInfo: (id userInfo 
- (void) drawKnobPath: (NSBezierPath *)  path
ofType: (DKKnobType)  knobType
userInfo: (id userInfo 

Provided by category DKKnob(Deprecated).

- (void) drawPartcode: (NSInteger code
atPoint: (NSPoint)  p
fontSize: (CGFloat fontSize 
- (void) drawRotationBarWithKnobsFromCentre: (NSPoint)  centre
toPoint: (NSPoint)  p 
- (NSColor*) fillColourForKnobType: (DKKnobType)  knobType

Provided by category DKKnob(Deprecated).

- (DKHandle*) handleForType: (DKKnobType)  knobType
- (DKHandle*) handleForType: (DKKnobType)  knobType
colour: (NSColor *)  colour 
- (BOOL) hitTestPoint: (NSPoint)  p
inKnobAtPoint: (NSPoint)  kp
ofType: (DKKnobType)  knobType
userInfo: (id userInfo 
- (NSBezierPath*) knobPathAtPoint: (NSPoint)  p
ofType: (DKKnobType)  knobType
angle: (CGFloat radians
userInfo: (id userInfo 

Provided by category DKKnob(Deprecated).

- (id<DKKnobOwner>) owner
- (NSColor*) rotationKnobColour

Provided by category DKKnob(Deprecated).

+ (NSColor*) rotationKnobColour

Provided by category DKKnob(Deprecated).

- (CGFloat) scalingRatio
- (void) setControlBarColour: (NSColor *)  clr

Provided by category DKKnob(Deprecated).

- (void) setControlBarWidth: (CGFloat width

Provided by category DKKnob(Deprecated).

- (void) setControlKnobColour: (NSColor *)  clr

Provided by category DKKnob(Deprecated).

+ (void) setControlKnobColour: (NSColor *)  clr

Provided by category DKKnob(Deprecated).

- (void) setControlKnobSize: (NSSize)  cks

Provided by category DKKnob(Deprecated).

- (void) setControlKnobSizeForViewScale: (CGFloat scale
- (void) setControlOffPathPointColour: (NSColor *)  clr

Provided by category DKKnob(Deprecated).

+ (void) setControlOffPathPointColour: (NSColor *)  clr

Provided by category DKKnob(Deprecated).

- (void) setControlOnPathPointColour: (NSColor *)  clr

Provided by category DKKnob(Deprecated).

+ (void) setControlOnPathPointColour: (NSColor *)  clr

Provided by category DKKnob(Deprecated).

- (void) setOwner: (id< DKKnobOwner >)  owner
- (void) setRotationKnobColour: (NSColor *)  clr

Provided by category DKKnob(Deprecated).

+ (void) setRotationKnobColour: (NSColor *)  clr

Provided by category DKKnob(Deprecated).

- (void) setScalingRatio: (CGFloat scaleRatio
+ (id) standardKnobs
- (NSColor*) strokeColourForKnobType: (DKKnobType)  knobType

Provided by category DKKnob(Deprecated).

- (CGFloat) strokeWidthForKnobType: (DKKnobType)  knobType

Provided by category DKKnob(Deprecated).