usbdmx.com Home of the opto isolated, bus powered, DMX512 interface with both in and out universes. Cheap and simple to build. USBDMX logo

LODimmerCurveView Class Reference

A view to display a Dimmer Curve and allow a user to edit. More...

#import <LODimmerCurveView.h>


Public Member Functions

(void) - setCurve:
 Set the curve that the view is displaying.
(NSColor *) - drawColor
 Get the current drawing colour for the curve.
(void) - setDrawColor:
 Set the colour that curve will be drawn in.
(id) - delegate
 Get the current delegate for the view.
(void) - setDelegate:
 Set a new delegate object.
(BOOL) - isEditable
 Check is a curve is editable by a user.
(void) - setEditable:
 Set if the curve is editable by a user.
(LODimmerCurveCPType) - controlPointForMouse:
 Check which, if any, control point the mouse is over.
(void) - drawHighlightedControlPoint:inContext:
 Draw a control point in highlighted mode.
(void) - drawControlPoint:inContext:
 Draw a control point.

Protected Attributes

LODimmerCurvedimmerCurve
 The dimmer curve being displayed.
LODimmerCurveCPType hover
 The control point the mouse is currently over.
LODimmerCurveCPType selected
 The currebtly selected control point.
NSColor * drawColor
 The colour to draw the curve in.
id delegate
 A delegate object to provide additional control over the drawing and editing.


Detailed Description

A view to display a Dimmer Curve and allow a user to edit.

If the curve is editable it will be displayed with the control points selectable by the mouse, and the user will be able to drag the points into new positions. The lookup table of the curve is updated when editing ends (that is when the user releases the mouse).

You can set a delegate object that may implement a number of hooks into the drawing and editing routines associated with this class.

See also:
LODimmerCurveViewDelegate.h

Member Function Documentation

- (LODimmerCurveCPType) controlPointForMouse: (NSPoint)  point  

Check which, if any, control point the mouse is over.

- (id) delegate  

Get the current delegate for the view.

Returns:
The delegate object
See also:
- setDelegate:

- (NSColor *) drawColor  

Get the current drawing colour for the curve.

Returns:
the drawing colour.
See also:
- setDrawColor:

- (void) drawControlPoint: (NSPoint)  aPoint
inContext: (NSGraphicsContext *)  theContext 

Draw a control point.

- (void) drawHighlightedControlPoint: (NSPoint)  aPoint
inContext: (NSGraphicsContext *)  theContext 

Draw a control point in highlighted mode.

- (BOOL) isEditable  

Check is a curve is editable by a user.

Returns:
YES if the curve is editable
See also:
- setEditable:

- (void) setCurve: (LODimmerCurve *)  newCurve  

Set the curve that the view is displaying.

- (void) setDelegate: (id)  aDelegate  

Set a new delegate object.

Parameters:
aDelegate The object to receive all dlegate messages
See also:
delegate:

- (void) setDrawColor: (NSColor *)  theColor  

Set the colour that curve will be drawn in.

Parameters:
theColor The colour to use
See also:
drawColour:

- (void) setEditable: (BOOL)  isEditable  

Set if the curve is editable by a user.

Parameters:
isEditable Editable status
See also:
- isEditable:


The documentation for this class was generated from the following files: