OSDN Git Service

WinGui:
[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
173 - (void) enablePreviewHudControls;
174 - (void) disablePreviewHudControls;
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 - (IBAction)showPreviewPanel: (id)sender forTitle: (hb_title_t *)title;
188 - (IBAction) storageLinkChanged: (id) sender;
189 - (IBAction) parLinkChanged: (id) sender;
190 - (IBAction) displayLinkChanged: (id) sender;
191
192 - (void) setToWindowedMode;
193
194 /* Filter Actions */
195 - (void) setInitialPictureFilters;
196 - (IBAction) FilterSettingsChanged: (id) sender;
197 - (IBAction) adjustFilterDisplay: (id) sender;
198 - (IBAction) modeDecombDeinterlaceSliderChanged: (id) sender;
199 - (IBAction) deblockSliderChanged: (id) sender;
200
201 - (int) detelecine;
202 - (NSString*) detelecineCustomString;
203 - (void) setDetelecine: (int) setting;
204 - (void) setDetelecineCustomString: (NSString*) string;
205
206 - (int) useDecomb;
207 - (void) setUseDecomb: (int) setting;
208
209 - (int) decomb;
210 - (NSString*) decombCustomString;
211 - (void) setDecomb: (int) setting;
212 - (void) setDecombCustomString: (NSString*) string;
213
214 - (int) deinterlace;
215 - (NSString*) deinterlaceCustomString;
216 - (void) setDeinterlace: (int) setting;
217 - (void) setDeinterlaceCustomString: (NSString*) string; 
218
219 - (int) denoise;
220 - (NSString*) denoiseCustomString;
221 - (void) setDenoise: (int) setting;
222 - (void) setDenoiseCustomString: (NSString*) string;
223
224 - (int) deblock;
225 - (void) setDeblock: (int) setting;
226
227 - (int) grayscale;
228 - (void) setGrayscale: (int) setting;
229
230
231
232 @end
233