1 // Copyright (c) 2009 Yanagi Asakura
3 // This software is provided 'as-is', without any express or implied
4 // warranty. In no event will the authors be held liable for any damages
5 // arising from the use of this software.
7 // Permission is granted to anyone to use this software for any purpose,
8 // including commercial applications, and to alter it and redistribute it
9 // freely, subject to the following restrictions:
11 // 1. The origin of this software must not be misrepresented; you must not
12 // claim that you wrote the original software. If you use this software
13 // in a product, an acknowledgment in the product documentation would be
14 // appreciated but is not required.
16 // 2. Altered source versions must be plainly marked as such, and must not be
17 // misrepresented as being the original software.
19 // 3. This notice may not be removed or altered from any source
26 // Created by 柳 on 09/09/12.
27 // Copyright 2009 __MyCompanyName__. All rights reserved.
30 // Elisの一番たいせつなコントローラ。
31 // ElisLayerへのアクセスはここを経由して。(KVO以外)
33 // もう一段モデルを噛ませたほうがよかったなあといまさら。
35 // アウトレットが山のようにあるので、ちゃんと変数型を明記しましよう。
36 // @classを使えばid使う必要ないよね。
38 #import <Cocoa/Cocoa.h>
42 #import "ElisAnimationLayerFactory.h"
43 #import "ElisTimeLineController.h"
44 #import "ElisCustomFilter.h"
45 #import "ElisWriterLegacy.h"
46 #import "ElisUndoManager.h"
47 #import "ElisMovieSizeWindowController.h"
48 #import "ElisPreferenceController.h"
49 #import "ElisMovieSpeedController.h"
51 @class ElisMainView, ElisTimeLineController, ElisPropertyTableController;
53 CGRect ProjectMovieSize;
54 QTTime globalCurrentTime;
59 @interface ElisController : NSObject {
60 NSMutableArray* layers; // 全てのレイヤーはここに束縛
61 IBOutlet ElisMainView* _mainView;
62 ElisAnimationLayerFactory* _animationLayerFactory;
63 IBOutlet ElisTimeLineController* _timeLineController;
64 IBOutlet ElisPropertyTableController* _tableController;
65 IBOutlet NSWindow* _mainWindow;
66 IBOutlet ElisUndoManager* _undoManager;
67 IBOutlet NSTextView* _textLayerField;
68 IBOutlet NSButton* _playstopButton;
72 BOOL playing; // YES = 再生中
73 NSGarbageCollector* collector; // GCの制御用。
76 IBOutlet NSSlider* timeSlider;
77 IBOutlet NSTextField* timeCodeField;
79 #ifdef __SNOW_LEOPARD_GCD__
86 - (IBAction)playStop:(id)sender;
87 - (IBAction)startPlay:(id)sender;
88 - (IBAction)stopPlay:(id)sender;
89 - (IBAction)timeSliderChanged:(id)sender;
90 - (void)moveSliderTo:(QTTime)time;
92 - (void)getSoundTrack:(NSMutableArray*)soundTrack;
93 - (IBAction)deleteSelectLayer:(id)sender;
94 - (IBAction)recordingStateChanged:(id)sender;
95 - (IBAction)removeAllKeyFrame:(id)sender;
96 - (IBAction)removeEffect:(id)sender;
98 - (IBAction)writeToFile:(id)sender;
99 - (IBAction)openProjectSaveDialog:(id)sender;
100 - (IBAction)openProjectLoadDialog:(id)sender;
101 - (IBAction)rewriteProject:(id)sender;
102 - (IBAction)undo:(id)sender;
103 - (IBAction)redo:(id)sender;
104 - (IBAction)changeMovieSize:(id)sender;
105 - (IBAction)preference:(id)sender;
107 - (IBAction)changeToSmallWindiw:(id)sender;
108 - (IBAction)changeMovieSpeed:(id)sender;
109 - (IBAction)gotoNextKeyTime:(id)sender;
110 - (IBAction)gotoPrevKeyTime:(id)sender;
111 - (IBAction)cutLayerAtCurrentTime:(id)sender;