-
Notifications
You must be signed in to change notification settings - Fork 1
/
AppController.m
44 lines (33 loc) · 1.02 KB
/
AppController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// AppController.m
// Orbital
//
// Created by technasis on 12/9/09.
// Copyright __Technasis__ 2009 . All rights reserved.
//
#import "AppController.h"
@implementation AppController
- (void) awakeFromNib
{
if(![qcView loadCompositionFromFile:[[NSBundle mainBundle] pathForResource:@"orbital" ofType:@"qtz"]]) {
NSLog(@"Could not load composition");
}
}
- (void)windowWillClose:(NSNotification *)notification
{
[NSApp terminate:self];
}
// An example of programmatically setting the value of input ports
// Notice that the QCPatchParameterView is automatically updated by setting the QCView inputs
- (IBAction) changeColorToBlue:(id)sender
{
// Colors
[qcView setValue:[NSColor blueColor] forInputKey:@"Top_Color"];
[qcView setValue:[NSColor cyanColor] forInputKey:@"Middle_Color"];
[qcView setValue:[NSColor blueColor] forInputKey:@"Bottom_Color"];
// Numbers
[qcView setValue:[NSNumber numberWithDouble:.5] forInputKey:@"Font_Size"];
// Strings
[qcView setValue:@"Hello World" forInputKey:@"String"];
}
@end