OSDN Git Service

open
[eliscolors/main.git] / ElisController.h
1 //  Copyright (c) 2009 Yanagi Asakura
2 //
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.
6 //
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:
10 //
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.
15 //
16 //  2. Altered source versions must be plainly marked as such, and must not be
17 //  misrepresented as being the original software.
18 //
19 //  3. This notice may not be removed or altered from any source
20 //  distribution.
21
22 //
23 //  ElisController.h
24 //  Elis Colors
25 //
26 //  Created by 柳 on 09/09/12.
27 //  Copyright 2009 __MyCompanyName__. All rights reserved.
28 //
29
30 // Elisの一番たいせつなコントローラ。
31 // ElisLayerへのアクセスはここを経由して。(KVO以外)
32
33 // もう一段モデルを噛ませたほうがよかったなあといまさら。
34
35 // アウトレットが山のようにあるので、ちゃんと変数型を明記しましよう。
36 // @classを使えばid使う必要ないよね。
37
38 #import <Cocoa/Cocoa.h>
39 #import "ElisBase.h"
40 #import "ElisMedia.h"
41 #import "ElisLayer.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"
50
51 @class ElisMainView, ElisTimeLineController, ElisPropertyTableController;
52
53 CGRect ProjectMovieSize;
54 QTTime globalCurrentTime;
55 BOOL recording;
56 int timeLineXShift;
57 BOOL usingStampMode;
58
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;
69     
70     float hipTime;
71     QTTime _currentTime;
72     BOOL playing; // YES = 再生中
73     NSGarbageCollector* collector; // GCの制御用。
74     NSString* savePath;
75     
76     IBOutlet NSSlider* timeSlider;
77     IBOutlet NSTextField* timeCodeField;
78     
79 #ifdef __SNOW_LEOPARD_GCD__
80     dispatch_queue_t diq;
81 #endif
82 }
83
84 - (float)getHipTime;
85
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;
91 - (void)refresh;
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;
97
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;
106
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;
112
113 @end