OSDN Git Service

4a1dd6172ee0e5eb09043fda48e330bc50208508
[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     
105     int output_width, output_height, output_par_width, output_par_height;
106     int display_width;
107     
108     int modulus;
109     
110     /* used to track the previous state of the keep aspect
111     ratio checkbox when turning anamorphic on, so it can be
112     returned to the previous state when anamorphic is turned
113     off */
114     BOOL    keepAspectRatioPreviousState;
115     
116     
117     /* Video Filters */
118     
119     IBOutlet NSBox           * fPictureFilterBox;
120
121     IBOutlet NSBox           * fDetelecineBox;
122     IBOutlet NSPopUpButton   * fDetelecinePopUp;
123     IBOutlet NSTextField     * fDetelecineField;
124     
125     IBOutlet NSBox           * fDecombDeinterlaceBox;
126     IBOutlet NSSlider        * fDecombDeinterlaceSlider;
127     
128     IBOutlet NSBox           * fDecombBox;
129     IBOutlet NSPopUpButton   * fDecombPopUp;
130     IBOutlet NSTextField     * fDecombField;
131     
132     IBOutlet NSBox           * fDeinterlaceBox;
133     IBOutlet NSPopUpButton   * fDeinterlacePopUp;
134     IBOutlet NSTextField     * fDeinterlaceField;
135
136     IBOutlet NSBox           * fDenoiseBox;
137     IBOutlet NSPopUpButton   * fDenoisePopUp;
138     IBOutlet NSTextField     * fDenoiseField;
139         
140     
141     IBOutlet NSBox           * fDeblockBox; // also holds the grayscale box
142     IBOutlet NSButton        * fDeblockCheck;
143     IBOutlet NSTextField     * fDeblockField;
144     IBOutlet NSSlider        * fDeblockSlider;
145     
146     IBOutlet NSButton        * fGrayscaleCheck;
147
148     IBOutlet NSTextField     * fInfoField;
149         
150
151     
152         struct {
153         int     detelecine;
154         int     deinterlace;
155         int     decomb;
156         int     usedecomb;
157         int     denoise;
158         int     deblock;
159         int     grayscale;
160     } fPictureFilterSettings;
161     
162 }
163 - (id)init;
164
165 - (void) SetHandle: (hb_handle_t *) handle;
166 - (void) SetTitle:  (hb_title_t *)  title;
167 - (void)setHBController: (HBController *)controller;
168 - (IBAction) showPictureWindow: (id)sender;
169 - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem;
170 - (IBAction) resizeInspectorForTab: (id)sender;
171 - (IBAction) showPreviewWindow: (id)sender;
172 - (BOOL) previewFullScreenMode;
173 - (IBAction) previewGoWindowed: (id)sender;
174
175 - (IBAction) adjustSizingDisplay: (id) sender;
176
177
178 - (IBAction) SettingsChanged: (id) sender;
179
180 - (NSString*) getPictureSizeInfoString;
181 - (void)reloadStillPreview;
182
183 - (BOOL) autoCrop;
184 - (void) setAutoCrop: (BOOL) setting;
185
186 - (IBAction)showPreviewPanel: (id)sender forTitle: (hb_title_t *)title;
187 - (IBAction) storageLinkChanged: (id) sender;
188 - (IBAction) parLinkChanged: (id) sender;
189 - (IBAction) displayLinkChanged: (id) sender;
190 - (void) setToFullScreenMode;
191 - (void) setToWindowedMode;
192
193 /* Filter Actions */
194 - (void) setInitialPictureFilters;
195 - (IBAction) FilterSettingsChanged: (id) sender;
196 - (IBAction) adjustFilterDisplay: (id) sender;
197 - (IBAction) modeDecombDeinterlaceSliderChanged: (id) sender;
198 - (IBAction) deblockSliderChanged: (id) sender;
199
200 - (int) detelecine;
201 - (NSString*) detelecineCustomString;
202 - (void) setDetelecine: (int) setting;
203 - (void) setDetelecineCustomString: (NSString*) string;
204
205 - (int) useDecomb;
206 - (void) setUseDecomb: (int) setting;
207
208 - (int) decomb;
209 - (NSString*) decombCustomString;
210 - (void) setDecomb: (int) setting;
211 - (void) setDecombCustomString: (NSString*) string;
212
213 - (int) deinterlace;
214 - (NSString*) deinterlaceCustomString;
215 - (void) setDeinterlace: (int) setting;
216 - (void) setDeinterlaceCustomString: (NSString*) string; 
217
218 - (int) denoise;
219 - (NSString*) denoiseCustomString;
220 - (void) setDenoise: (int) setting;
221 - (void) setDenoiseCustomString: (NSString*) string;
222
223 - (int) deblock;
224 - (void) setDeblock: (int) setting;
225
226 - (int) grayscale;
227 - (void) setGrayscale: (int) setting;
228
229
230
231 @end
232