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

Mode that lets the user move selected pads and sweep a marquee to select pads. More...

#include <MovePadMode.h>

Inheritance diagram for MovePadMode:
Collaboration diagram for MovePadMode:

Instance Methods

(void) - nullSweep [implementation]
(void) - mouseDown: [implementation]
(void) - mouseDragged: [implementation]
(void) - mouseMoved: [implementation]
(void) - keyDown: [implementation]
(void) - mouseUp: [implementation]
(NSCursor *) - cursor [implementation]
(void) - drawRect: [implementation]
(void) - setUp [implementation]
(void) - cleanUp [implementation]
(NSString *) - name [implementation]
Instance Methods inherited from Mode
(id) - initWithPlayArea:forController:
(void) - setNextMode:
(id) - init [implementation]

Protected Attributes

BOOL _hasHitPad
Protected Attributes inherited from Mode
PlayAreaplayArea
Controllercontroller
ModenextMode

Detailed Description

Mode that lets the user move selected pads and sweep a marquee to select pads.

Concrete implementation of MovePadMode behavior.

This mode responds to mouse and key events from the PlayArea to translate pads or update the current selection. It also defines the cursor and manages temporary state.

Definition at line 19 of file MovePadMode.h.

Method Documentation

◆ cleanUp

- (void) cleanUp
implementation

Releases transient references when the mode is deactivated.

Reimplemented from Mode.

Definition at line 287 of file MovePadMode.m.

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

◆ cursor

- (NSCursor *) cursor
implementation

Returns the cursor used while this mode is active.

Returns
The crosshair cursor.

Reimplemented from Mode.

Definition at line 264 of file MovePadMode.m.

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

◆ drawRect:

- (void) drawRect: (NSRect) dirtyRect
implementation

Draws transient feedback, such as the translated copies of selected pads during a drag.

Parameters
dirtyRectThe rectangle that needs redrawing.

Reimplemented from Mode.

Definition at line 272 of file MovePadMode.m.

◆ keyDown:

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

Handles key events while the mode is active. Currently consumes the space bar to exit the mode and refresh.

Parameters
eventThe key down event from AppKit.

Reimplemented from Mode.

Definition at line 207 of file MovePadMode.m.

Here is the call graph for this function:

◆ mouseDown:

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

Handles the mouse down event to begin a move or marquee operation.

Behavior:

  • If a pad is hit: may trigger the pad's action, toggle/extend selection based on modifiers, then prepare for moving selected pads with live feedback.
  • If empty space: clear selection and begin marquee sweep.
Parameters
eventThe mouse down event from AppKit.

Reimplemented from Mode.

Definition at line 84 of file MovePadMode.m.

Here is the call graph for this function:

◆ mouseDragged:

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

Updates the interaction while dragging the mouse.

  • In moving state: translates the feedback copies by the snapped delta and refreshes the view.
  • In sweeping state: updates the marquee rectangle and displays it.
Parameters
eventThe mouse dragged event from AppKit.

Reimplemented from Mode.

Definition at line 161 of file MovePadMode.m.

Here is the call graph for this function:

◆ mouseMoved:

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

Mouse moved handler (unused in this mode).

Parameters
eventThe mouse moved event.

Reimplemented from Mode.

Definition at line 199 of file MovePadMode.m.

◆ mouseUp:

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

Completes the interaction on mouse up.

  • In moving state: commits the transformed geometry from feedback copies back to the originals.
  • In sweeping state: hides marquee and applies intersection selection.
Parameters
eventThe mouse up event from AppKit.

Reimplemented from Mode.

Definition at line 229 of file MovePadMode.m.

Here is the call graph for this function:

◆ name

- (NSString *) name
implementation

Returns a user-facing name for this mode.

Returns
The string "Move Pad".

Reimplemented from Mode.

Definition at line 296 of file MovePadMode.m.

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

◆ nullSweep

- (void) nullSweep
implementation

No-op sweep handler placeholder.

Definition at line 71 of file MovePadMode.m.

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

◆ setUp

- (void) setUp
implementation

Initializes transient state when the mode becomes active.

Reimplemented from Mode.

Definition at line 282 of file MovePadMode.m.

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

Member Data Documentation

◆ _hasHitPad

- (BOOL) _hasHitPad
protected

Definition at line 21 of file MovePadMode.h.


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