|
Muvicado HD
|
NSView subclass that hosts pads, modes, and editing commands. More...
#include <PlayArea.h>


Instance Methods | |
| (void) | - setMode: |
| (void) | - setTemporaryPad: |
| (void) | - clearTemporaryPad |
| (IBAction) | - startMIDI: |
| (IBAction) | - stopMIDI: |
| (void) | - setColorPlay: |
| (void) | - setColorMove: |
| (IBAction) | - setColorA: |
| (IBAction) | - setColorB: |
| (IBAction) | - doCut: |
| (IBAction) | - doCopy: |
| (IBAction) | - doPaste: |
| (IBAction) | - doDelete: |
| (IBAction) | - doSelectAll: |
| (void) | - drawGridOfPads |
| (id) | - initWithFrame: [implementation] |
| (void) | - awakeFromNib [implementation] |
| (void) | - dealloc [implementation] |
| (void) | - doAction: [implementation] |
| (void) | - setLineWidth [implementation] |
| (void) | - duplicatePadsWithDX:DY: [implementation] |
| (void) | - movePadsWithDX:DY: [implementation] |
| (void) | - scalePadsWithSX:SY: [implementation] |
| (void) | - rotateByDegrees: [implementation] |
| (void) | - pathOperation: [implementation] |
| (void) | - rotateCommand:forEvent: [implementation] |
| (void) | - scaleCommand:forEvent: [implementation] |
| (void) | - nudgeCommand:forEvent: [implementation] |
| (void) | - keyDown: [implementation] |
| (void) | - doPad: [implementation] |
| (void) | - mouseDown: [implementation] |
| (void) | - mouseDragged: [implementation] |
| (void) | - mouseMoved: [implementation] |
| (void) | - mouseUp: [implementation] |
| (void) | - nullSweep [implementation] |
| (void) | - resetCursorRects [implementation] |
| (bool) | - shouldDrawPad: [implementation] |
| (void) | - drawRect: [implementation] |
| Instance Methods inherited from PadView | |
| (Controller *) | - makeController |
| (Controller *) | - getController |
| (void) | - refresh |
| (void) | - addPad: |
| (void) | - addElement: |
| (NSPoint) | - localPointForEvent: |
| (Pad *) | - testForPadHitWithPoint: |
| (void) | - startPad: |
| (void) | - stopPad: |
| (Pad *) | - findPadForNote: |
| (NSMutableArray *) | - findPadsForNote: |
| (NSMutableArray *) | - selectedPads |
| (NSMutableArray *) | - unselectedPads |
| (void) | - selectAllPadsForCurrentLayer |
| (void) | - setAllPadsToSelected: |
| (void) | - selectAllPads |
| (void) | - deselectAllPads |
| (void) | - deletePad: |
| (void) | - randomColors |
| (void) | - setSeeThru: |
| (void) | - duplicateSelectedPads |
| (NSPoint) | - snapGridWithX:Y: |
| (NSPoint) | - snapGridWithPoint: |
| (int) | - numSelectedPads |
| (Pad *) | - getSingleSelectedPad |
| (NSMutableArray *) | - getElementBag |
| (void) | - setNoteOfSelectedPads: |
| (void) | - setNoteOfSingleSelectedPad: |
| (void) | - setMarquee: |
| (void) | - showMarquee |
| (void) | - hideMarquee |
| (void) | - selectPadsIntersectingWithRect:onLayer: |
| (void) | - doCutElements |
| (void) | - doCopyElements |
| (void) | - doPasteElements |
| (void) | - doDeleteElements |
| (void) | - doSelectAllElements |
| (BOOL) | - acceptsFirstMouse: [implementation] |
| (BOOL) | - mouseDownCanMoveWindow [implementation] |
| (void) | - dummy [implementation] |
| (NSMutableArray *) | - findPadsForSelected: [implementation] |
| (BOOL) | - acceptsFirstResponder [implementation] |
| (BOOL) | - becomeFirstResponder [implementation] |
| (BOOL) | - resignFirstResponder [implementation] |
| (void) | - rightMouseDown: [implementation] |
| (void) | - otherMouseDown: [implementation] |
| (void) | - rightMouseUp: [implementation] |
| (void) | - otherMouseUp: [implementation] |
| (void) | - scrollWheel: [implementation] |
| (void) | - rightMouseDragged: [implementation] |
| (void) | - otherMouseDragged: [implementation] |
| (void) | - mouseEntered: [implementation] |
| (void) | - mouseExited: [implementation] |
| (void) | - keyUp: [implementation] |
| (void) | - tabletPoint: [implementation] |
| (void) | - tabletProximity: [implementation] |
| (void) | - cursorUpdate: [implementation] |
| (void) | - noResponderFor: [implementation] |
| (void) | - doit: [implementation] |
| (BOOL) | - isFlipped [implementation] |
| (void) | - setNoteOfPad:fromPad: [implementation] |
| (IBAction) | - doOpen: |
| (IBAction) | - doSave: |
| (IBAction) | - doSaveAs: |
| (IBAction) | - doImport: |
| (IBAction) | - doExport: |
| (BOOL) | - getPointFromXYPair [implementation] |
| (void) | - parser:didStartElement:namespaceURI:qualifiedName:attributes: [implementation] |
| (void) | - parser:parseErrorOccurred: [implementation] |
| (void) | - parser:didEndElement:namespaceURI:qualifiedName: [implementation] |
| (void) | - alertDidEnd:returnCode:contextInfo: [implementation] |
| (void) | - parseXMLFile: [implementation] |
| (void) | - openXmlPanelDidEnd:returnCode:contextInfo: [implementation] |
| (void) | - openXMLFile [implementation] |
| (void) | - setCurrentFile: [implementation] |
| (void) | - parseMvFile: [implementation] |
| (void) | - openMvPanelDidEnd:returnCode:contextInfo: [implementation] |
| (void) | - openMvFile [implementation] |
| (NSString *) | - panel:userEnteredFilename:confirmed: [implementation] |
| (void) | - saveXMLFile: [implementation] |
| (void) | - saveXmlPanelDidEnd:returnCode:contextInfo: [implementation] |
| (void) | - saveXMLFile [implementation] |
| (BOOL) | - saveMvToFile: [implementation] |
| (void) | - saveMvPanelDidEnd:returnCode:contextInfo: [implementation] |
| (void) | - saveMvFile [implementation] |
Protected Attributes | |
| NSBezierPath * | wallpaperPath |
| NSColor * | cA |
| NSColor * | cB |
| IBOutlet NSColorWell * | colorA |
| IBOutlet NSColorWell * | colorB |
| Mode * | mode |
| Protected Attributes inherited from PadView | |
| NSMutableArray * | elementBag |
| IBOutlet Controller * | controller |
| Pad * | lastPad |
| Pad * | lastPadPlayed |
| Boolean | gridShow |
| int | gridX |
| int | gridY |
| int | padLayer |
| NSMutableArray * | _clipboard |
| BOOL | _marqueeVisible |
| NSRect | _marqueeSelectionBounds |
| int | num_draws |
| BOOL | _hasHitPad |
Additional Inherited Members | |
| Class Methods inherited from PadView | |
| (NSPoint) | + snap90Point:fromAnchor: |
NSView subclass that hosts pads, modes, and editing commands.
Concrete implementation of PlayArea behaviors and event routing.
Adds mode switching, color management, MIDI controls, and utilities for drawing sample content on top of the base PadView behaviors.
Definition at line 25 of file PlayArea.h.
|
implementation |
Enables mouse moved events and brings the window to the front.
Definition at line 218 of file PlayArea.m.


| - (void) clearTemporaryPad |
Clears any temporary pad currently being displayed.
Clears any temporary pad.
Definition at line 902 of file PlayArea.m.


|
implementation |
Releases retained resources including wallpaper path and colors.
Reimplemented from PadView.
Definition at line 229 of file PlayArea.m.


|
implementation |
Executes a UI action associated with a pad (mode switches, grid toggle, etc.).
| pad | The pad whose action should be performed. |
Reimplemented from PadView.
Definition at line 241 of file PlayArea.m.


| - (IBAction) doCopy: | (id) | sender |
Copies selected elements.
Definition at line 1068 of file PlayArea.m.

| - (IBAction) doCut: | (id) | sender |
Cuts selected elements.
Definition at line 1064 of file PlayArea.m.

| - (IBAction) doDelete: | (id) | sender |
Deletes selected elements.
Definition at line 1076 of file PlayArea.m.

|
implementation |
Overrides PadView to handle layer switching when interacting with pads.
Reimplemented from PadView.
Definition at line 834 of file PlayArea.m.

| - (IBAction) doPaste: | (id) | sender |
Pastes previously cut/copied elements.
Pastes elements.
Definition at line 1072 of file PlayArea.m.

| - (IBAction) doSelectAll: | (id) | sender |
Selects all elements on the current layer.
Selects all elements.
Definition at line 1080 of file PlayArea.m.

| - (void) drawGridOfPads |
Programmatically generates a grid of pads for testing/demo purposes.
Creates a matrix of pads across multiple layers for testing.
Definition at line 487 of file PlayArea.m.


|
implementation |
Draws background color, pads, temporary pad, and mode overlays.
Reimplemented from PadView.
Definition at line 1002 of file PlayArea.m.

|
implementation |
Duplicates selected pads by a translation and selects the new copies.
Definition at line 316 of file PlayArea.m.


|
implementation |
Initializes the play area with default content and configuration.
| frame | The initial frame rectangle. |
Reimplemented from PadView.
Definition at line 32 of file PlayArea.m.

|
implementation |
Handles keyboard shortcuts for selection, colors, transformations, and modes.
Definition at line 534 of file PlayArea.m.

|
implementation |
Forwards mouse down to current mode or super.
Reimplemented from PadView.
Definition at line 843 of file PlayArea.m.

|
implementation |
Forwards mouse dragged to current mode or super.
Reimplemented from PadView.
Definition at line 853 of file PlayArea.m.

|
implementation |
Forwards mouse moved to current mode or super.
Reimplemented from PadView.
Definition at line 863 of file PlayArea.m.

|
implementation |
Forwards mouse up to current mode or super.
Reimplemented from PadView.
Definition at line 873 of file PlayArea.m.

|
implementation |
Translates all selected pads by the specified deltas.
Definition at line 333 of file PlayArea.m.


|
implementation |
Nudges selected pads by grid-sized deltas using arrow keys.
Definition at line 465 of file PlayArea.m.


|
implementation |
Called when a click/drag cycle hits no pads: toggles between Move and Rest modes.
Reimplemented from PadView.
Definition at line 885 of file PlayArea.m.


|
implementation |
Performs a boolean path operation (union, xor, etc.) on two selected pads.
Definition at line 395 of file PlayArea.m.


|
implementation |
Updates the cursor rects to match the current mode's cursor.
Definition at line 913 of file PlayArea.m.


|
implementation |
Rotates selected pads around their combined center by degrees.
Definition at line 372 of file PlayArea.m.


|
implementation |
Interprets arrow keys with modifiers as rotate commands.
Definition at line 423 of file PlayArea.m.


|
implementation |
Interprets arrow keys with Control/Shift as scale commands.
Definition at line 443 of file PlayArea.m.


|
implementation |
Scales selected pads around their combined center.
Definition at line 346 of file PlayArea.m.


| - (IBAction) setColorA: | (id) | sender |
IBAction to update play color from a color well.
Definition at line 975 of file PlayArea.m.

| - (IBAction) setColorB: | (id) | sender |
IBAction to update move color from a color well.
Definition at line 983 of file PlayArea.m.

| - (void) setColorMove: | (NSColor *) | color |
Sets the color used when an interaction mode is active.
Sets the secondary background color used when a mode is active.
Definition at line 963 of file PlayArea.m.

| - (void) setColorPlay: | (NSColor *) | color |
Sets the color used when the area is in play (no mode) state.
Sets the primary background color used when no mode is active.
Definition at line 952 of file PlayArea.m.

|
implementation |
Sets line width of selected pads to 0.0 and refreshes.
Definition at line 305 of file PlayArea.m.


| - (void) setMode: | (Mode *) | aMode |
Sets the active interaction mode for the play area.
Switches the active mode, calling cleanUp/setUp appropriately and updating the cursor.
| aMode | The new mode or nil to clear. |
Definition at line 925 of file PlayArea.m.


| - (void) setTemporaryPad: | (Pad *) | pad |
Sets a temporary pad used for interactive creation feedback.
Sets a temporary pad displayed during interactive creation.
Definition at line 898 of file PlayArea.m.

|
implementation |
Determines if a pad should be drawn by this view instance. Subclasses can override to filter by layer or other criteria.
| pad | The pad in question. |
Reimplemented from PadView.
Definition at line 990 of file PlayArea.m.
| - (IBAction) startMIDI: | (id) | sender |
Starts MIDI services and device connections.
Starts MIDI devices and connections.
Definition at line 1088 of file PlayArea.m.

| - (IBAction) stopMIDI: | (id) | sender |
Stops MIDI services and releases device connections.
Stops MIDI devices and connections.
Definition at line 1100 of file PlayArea.m.

|
protected |
Primary color used when no mode is active ("play" color).
Definition at line 29 of file PlayArea.h.
|
protected |
Secondary color used when a mode is active ("move" color).
Definition at line 31 of file PlayArea.h.
|
protected |
Color well bound to the play color.
Definition at line 33 of file PlayArea.h.
|
protected |
Color well bound to the move color.
Definition at line 35 of file PlayArea.h.
|
protected |
Currently active interaction mode for the play area.
Definition at line 37 of file PlayArea.h.
|
protected |
Decorative background path used as wallpaper.
Definition at line 27 of file PlayArea.h.