Muvicado HD
Loading...
Searching...
No Matches
DrawFreehandPadMode Class Reference

Mode that digitizes a freehand path into a Pad while dragging. More...

#include <DrawFreehandPadMode.h>

Inheritance diagram for DrawFreehandPadMode:
Collaboration diagram for DrawFreehandPadMode:

Instance Methods

(id) - init [implementation]
(NSCursor *) - cursor [implementation]
(void) - close [implementation]
(void) - mouseDown: [implementation]
(void) - mouseDragged: [implementation]
(void) - mouseMoved: [implementation]
(void) - mouseUp: [implementation]
(void) - setUp [implementation]
(void) - cleanUp [implementation]
(NSString *) - name [implementation]
Instance Methods inherited from Mode
(id) - initWithPlayArea:forController:
(void) - keyDown:
 No-op default implementation; subclasses override.
(void) - drawRect:
 No-op default implementation; subclasses override.
(void) - setNextMode:

Protected Attributes

float _transparency
NSColor * _lineColor
Protected Attributes inherited from Mode
PlayAreaplayArea
Controllercontroller
ModenextMode

Detailed Description

Mode that digitizes a freehand path into a Pad while dragging.

Concrete implementation of DrawFreehandPadMode behavior.

While active, the user clicks and drags to create a polyline/closed path. The temporary Pad is shown with adjusted transparency and line color.

Definition at line 19 of file DrawFreehandPadMode.h.

Method Documentation

◆ cleanUp

- (void) cleanUp
implementation

No-op cleanup for this mode.

Reimplemented from Mode.

Definition at line 180 of file DrawFreehandPadMode.m.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ close

- (void) close
implementation

Finalizes the freehand path: closes it, restores pad styling, adds the new pad to the play area, and clears temporary state.

Definition at line 40 of file DrawFreehandPadMode.m.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cursor

- (NSCursor *) cursor
implementation

Returns the crosshair cursor used while drawing.

Reimplemented from Mode.

Definition at line 32 of file DrawFreehandPadMode.m.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init

- (id) init
implementation

Initializes the mode and clears any prior temporary path.

Reimplemented from Mode.

Definition at line 23 of file DrawFreehandPadMode.m.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mouseDown:

- (void) mouseDown: (NSEvent *) event
implementation

Begins digitizing a path at the snapped mouse location. Creates a temporary Pad, seeding from a single selection if present.

Reimplemented from Mode.

Definition at line 64 of file DrawFreehandPadMode.m.

Here is the call graph for this function:

◆ mouseDragged:

- (void) mouseDragged: (NSEvent *) event
implementation

Extends the in-progress path to the snapped mouse location and refreshes.

Reimplemented from Mode.

Definition at line 120 of file DrawFreehandPadMode.m.

Here is the call graph for this function:

◆ mouseMoved:

- (void) mouseMoved: (NSEvent *) event
implementation

Displays the current snapped mouse coordinates for feedback.

Reimplemented from Mode.

Definition at line 139 of file DrawFreehandPadMode.m.

Here is the call graph for this function:

◆ mouseUp:

- (void) mouseUp: (NSEvent *) event
implementation

If sufficient points were collected, closes and commits the pad, increments the note for the next pad, and returns to Move mode.

Reimplemented from Mode.

Definition at line 151 of file DrawFreehandPadMode.m.

Here is the call graph for this function:

◆ name

- (NSString *) name
implementation

Returns a human-readable name for this mode.

Reimplemented from Mode.

Definition at line 184 of file DrawFreehandPadMode.m.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUp

- (void) setUp
implementation

Ensures at most one pad is selected before starting, then refreshes.

Reimplemented from Mode.

Definition at line 172 of file DrawFreehandPadMode.m.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _lineColor

- (NSColor*) _lineColor
protected

Original line color of the pad while drawing (restored on close).

Definition at line 23 of file DrawFreehandPadMode.h.

◆ _transparency

- (float) _transparency
protected

Original transparency of the pad while drawing (restored on close).

Definition at line 21 of file DrawFreehandPadMode.h.


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