OSDN Git Service

Change minimum vobsub time from 3sec to 2sec, been meaning to do this for a while.
[handbrake-jp/handbrake-jp-git.git] / macosx / PictureController.h
1 /* $Id: PictureController.h,v 1.6 2005/04/14 20:40:05 titer Exp $
2
3    This file is part of the HandBrake source code.
4    Homepage: <http://handbrake.fr/>.
5    It may be used under the terms of the GNU General Public License. */
6
7 #import <Cocoa/Cocoa.h>
8
9 #include "hb.h" 
10
11 @class HBController;
12 @class PreviewController;
13
14
15
16 //#define HB_NUM_HBLIB_PICTURES      20   // # of preview pictures libhb should generate
17
18 @interface PictureController : NSWindowController
19 {
20     hb_handle_t              * fHandle;
21     hb_title_t               * fTitle;
22
23     HBController             *fHBController;
24     PreviewController        *fPreviewController;        // reference to HBController
25     
26     IBOutlet NSWindow        * fPictureWindow;
27     
28     IBOutlet NSTabView       * fSizeFilterView;
29     IBOutlet NSTabViewItem   * fSizeTabView;
30     IBOutlet NSTabViewItem   * fFilterTabView;
31     
32     /* Picture Sizing */
33     
34     NSMutableDictionary      * fPicturePreviews;        // NSImages, one for each preview libhb creates, created lazily
35     int                        fPicture;
36
37
38     IBOutlet NSBox           * fPictureSizeBox;
39     IBOutlet NSBox           * fPictureCropBox;
40     
41     IBOutlet NSTextField     * fWidthLabel;
42     IBOutlet NSTextField     * fWidthField;
43     IBOutlet NSStepper       * fWidthStepper;
44     IBOutlet NSTextField     * fHeightField;
45     IBOutlet NSStepper       * fHeightStepper;
46     IBOutlet NSTextField     * fRatioLabel;
47     IBOutlet NSTextField     * fRatioLabel2; // shown for capuj
48     IBOutlet NSButton        * fRatioCheck;
49     IBOutlet NSMatrix        * fCropMatrix;
50     IBOutlet NSTextField     * fCropTopField;
51     IBOutlet NSStepper       * fCropTopStepper;
52     IBOutlet NSTextField     * fCropBottomField;
53     IBOutlet NSStepper       * fCropBottomStepper;
54     IBOutlet NSTextField     * fCropLeftField;
55     IBOutlet NSStepper       * fCropLeftStepper;
56     IBOutlet NSTextField     * fCropRightField;
57     IBOutlet NSStepper       * fCropRightStepper;
58     
59     IBOutlet NSTextField     * fModulusLabel;
60     IBOutlet NSPopUpButton   * fModulusPopUp;
61     /* linkers for capuj */
62     IBOutlet NSBox           * fStorageLinkBox;
63     IBOutlet NSSlider        * fStorageLinkSlider;
64     IBOutlet NSTextField     * fStorageLinkParLabel;
65     IBOutlet NSTextField     * fStorageLinkDisplayLabel;
66     
67     IBOutlet NSSlider        * fParLinkSlider;
68     IBOutlet NSTextField     * fParLinkStorageLabel;
69     IBOutlet NSTextField     * fParLinkDisplayLabel;
70     
71     IBOutlet NSSlider        * fDisplayLinkSlider;
72     IBOutlet NSTextField     * fDisplayLinkStorageLabel;
73     IBOutlet NSTextField     * fDisplayLinkParLabel;
74     
75     
76     IBOutlet NSTextField     * fDisplayWidthField;
77     IBOutlet NSTextField     * fDisplayWidthLabel;
78     
79     IBOutlet NSTextField     * fParWidthField;
80     IBOutlet NSTextField     * fParHeightField;
81     IBOutlet NSTextField     * fParWidthLabel;
82     IBOutlet NSTextField     * fParHeightLabel;
83
84     /* for now we setup some values to remember our pars and dars
85      * from scan
86     */
87     float titleDarWidth;
88     float titleDarHeight;
89     
90     int titleParWidth;
91     int titleParHeight;
92     float dar;
93     IBOutlet NSButton        * fResetParDarButton;
94     
95         IBOutlet NSPopUpButton   * fAnamorphicPopUp;
96     IBOutlet NSTextField     * fSizeInfoField;
97         
98     IBOutlet NSButton        * fPreviewOpenButton;
99     IBOutlet NSButton        * fPictureFiltersOpenButton;
100         
101     int     MaxOutputWidth;
102     int     MaxOutputHeight;
103     BOOL    autoCrop;
104     BOOL    allowLooseAnamorphic;
105     
106     int output_width, output_height, output_par_width, output_par_height;
107     int display_width;
108     
109     int modulus;
110     
111     /* used to track the previous state of the keep aspect
112     ratio checkbox when turning anamorphic on, so it can be
113     returned to the previous state when anamorphic is turned
114     off */
115     BOOL    keepAspectRatioPreviousState;
116     
117     
118     /* Video Filters */
119     
120     IBOutlet NSBox           * fPictureFilterBox;
121
122     IBOutlet NSBox           * fDetelecineBox;
123     IBOutlet NSPopUpButton   * fDetelecinePopUp;
124     IBOutlet NSTextField     * fDetelecineField;
125     
126     IBOutlet NSBox           * fDecombDeinterlaceBox;
127     IBOutlet NSSlider        * fDecombDeinterlaceSlider;
128     
129     IBOutlet NSBox           * fDecombBox;
130     IBOutlet NSPopUpButton   * fDecombPopUp;
131     IBOutlet NSTextField     * fDecombField;
132     
133     IBOutlet NSBox           * fDeinterlaceBox;
134     IBOutlet NSPopUpButton   * fDeinterlacePopUp;
135     IBOutlet NSTextField     * fDeinterlaceField;
136
137     IBOutlet NSBox           * fDenoiseBox;
138     IBOutlet NSPopUpButton   * fDenoisePopUp;
139     IBOutlet NSTextField     * fDenoiseField;
140         
141     
142     IBOutlet NSBox           * fDeblockBox; // also holds the grayscale box
143     IBOutlet NSButton        * fDeblockCheck;
144     IBOutlet NSTextField     * fDeblockField;
145     IBOutlet NSSlider        * fDeblockSlider;
146     
147     IBOutlet NSButton        * fGrayscaleCheck;
148
149     IBOutlet NSTextField     * fInfoField;
150         
151
152     
153         struct {
154         int     detelecine;
155         int     deinterlace;
156         int     decomb;
157         int     usedecomb;
158         int     denoise;
159         int     deblock;
160         int     grayscale;
161     } fPictureFilterSettings;
162     
163 }
164 - (id)init;
165
166 - (void) SetHandle: (hb_handle_t *) handle;
167 - (void) SetTitle:  (hb_title_t *)  title;
168 - (void)setHBController: (HBController *)controller;
169 - (IBAction) showPictureWindow: (id)sender;
170 - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem;
171 - (IBAction) resizeInspectorForTab: (id)sender;
172 - (IBAction) showPreviewWindow: (id)sender;
173 - (BOOL) previewFullScreenMode;
174 - (IBAction) previewGoWindowed: (id)sender;
175
176 - (IBAction) adjustSizingDisplay: (id) sender;
177
178
179 - (IBAction) SettingsChanged: (id) sender;
180
181 - (NSString*) getPictureSizeInfoString;
182 - (void)reloadStillPreview;
183
184 - (BOOL) autoCrop;
185 - (void) setAutoCrop: (BOOL) setting;
186
187 - (BOOL) allowLooseAnamorphic;
188 - (void) setAllowLooseAnamorphic: (BOOL) setting;
189
190 - (IBAction)showPreviewPanel: (id)sender forTitle: (hb_title_t *)title;
191 - (IBAction) storageLinkChanged: (id) sender;
192 - (IBAction) parLinkChanged: (id) sender;
193 - (IBAction) displayLinkChanged: (id) sender;
194 - (void) setToFullScreenMode;
195 - (void) setToWindowedMode;
196
197 /* Filter Actions */
198 - (void) setInitialPictureFilters;
199 - (IBAction) FilterSettingsChanged: (id) sender;
200 - (IBAction) adjustFilterDisplay: (id) sender;
201 - (IBAction) modeDecombDeinterlaceSliderChanged: (id) sender;
202 - (IBAction) deblockSliderChanged: (id) sender;
203
204 - (int) detelecine;
205 - (NSString*) detelecineCustomString;
206 - (void) setDetelecine: (int) setting;
207 - (void) setDetelecineCustomString: (NSString*) string;
208
209 - (int) useDecomb;
210 - (void) setUseDecomb: (int) setting;
211
212 - (int) decomb;
213 - (NSString*) decombCustomString;
214 - (void) setDecomb: (int) setting;
215 - (void) setDecombCustomString: (NSString*) string;
216
217 - (int) deinterlace;
218 - (NSString*) deinterlaceCustomString;
219 - (void) setDeinterlace: (int) setting;
220 - (void) setDeinterlaceCustomString: (NSString*) string; 
221
222 - (int) denoise;
223 - (NSString*) denoiseCustomString;
224 - (void) setDenoise: (int) setting;
225 - (void) setDenoiseCustomString: (NSString*) string;
226
227 - (int) deblock;
228 - (void) setDeblock: (int) setting;
229
230 - (int) grayscale;
231 - (void) setGrayscale: (int) setting;
232
233
234
235 @end
236