1 /* $Id: PictureController.h,v 1.6 2005/04/14 20:40:05 titer Exp $
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. */
7 #import <Cocoa/Cocoa.h>
12 @class PreviewController;
16 //#define HB_NUM_HBLIB_PICTURES 20 // # of preview pictures libhb should generate
18 @interface PictureController : NSWindowController
20 hb_handle_t * fHandle;
23 HBController *fHBController;
24 PreviewController *fPreviewController; // reference to HBController
26 IBOutlet NSWindow * fPictureWindow;
28 IBOutlet NSTabView * fSizeFilterView;
29 IBOutlet NSTabViewItem * fSizeTabView;
30 IBOutlet NSTabViewItem * fFilterTabView;
34 NSMutableDictionary * fPicturePreviews; // NSImages, one for each preview libhb creates, created lazily
38 IBOutlet NSBox * fPictureSizeBox;
39 IBOutlet NSBox * fPictureCropBox;
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;
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;
67 IBOutlet NSSlider * fParLinkSlider;
68 IBOutlet NSTextField * fParLinkStorageLabel;
69 IBOutlet NSTextField * fParLinkDisplayLabel;
71 IBOutlet NSSlider * fDisplayLinkSlider;
72 IBOutlet NSTextField * fDisplayLinkStorageLabel;
73 IBOutlet NSTextField * fDisplayLinkParLabel;
76 IBOutlet NSTextField * fDisplayWidthField;
77 IBOutlet NSTextField * fDisplayWidthLabel;
79 IBOutlet NSTextField * fParWidthField;
80 IBOutlet NSTextField * fParHeightField;
81 IBOutlet NSTextField * fParWidthLabel;
82 IBOutlet NSTextField * fParHeightLabel;
84 /* for now we setup some values to remember our pars and dars
93 IBOutlet NSButton * fResetParDarButton;
95 IBOutlet NSPopUpButton * fAnamorphicPopUp;
96 IBOutlet NSTextField * fSizeInfoField;
98 IBOutlet NSButton * fPreviewOpenButton;
99 IBOutlet NSButton * fPictureFiltersOpenButton;
104 BOOL allowLooseAnamorphic;
106 int output_width, output_height, output_par_width, output_par_height;
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
115 BOOL keepAspectRatioPreviousState;
120 IBOutlet NSBox * fPictureFilterBox;
122 IBOutlet NSBox * fDetelecineBox;
123 IBOutlet NSPopUpButton * fDetelecinePopUp;
124 IBOutlet NSTextField * fDetelecineField;
126 IBOutlet NSBox * fDecombDeinterlaceBox;
127 IBOutlet NSSlider * fDecombDeinterlaceSlider;
129 IBOutlet NSBox * fDecombBox;
130 IBOutlet NSPopUpButton * fDecombPopUp;
131 IBOutlet NSTextField * fDecombField;
133 IBOutlet NSBox * fDeinterlaceBox;
134 IBOutlet NSPopUpButton * fDeinterlacePopUp;
135 IBOutlet NSTextField * fDeinterlaceField;
137 IBOutlet NSBox * fDenoiseBox;
138 IBOutlet NSPopUpButton * fDenoisePopUp;
139 IBOutlet NSTextField * fDenoiseField;
142 IBOutlet NSBox * fDeblockBox; // also holds the grayscale box
143 IBOutlet NSButton * fDeblockCheck;
144 IBOutlet NSTextField * fDeblockField;
145 IBOutlet NSSlider * fDeblockSlider;
147 IBOutlet NSButton * fGrayscaleCheck;
149 IBOutlet NSTextField * fInfoField;
161 } fPictureFilterSettings;
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;
176 - (IBAction) adjustSizingDisplay: (id) sender;
179 - (IBAction) SettingsChanged: (id) sender;
181 - (NSString*) getPictureSizeInfoString;
182 - (void)reloadStillPreview;
185 - (void) setAutoCrop: (BOOL) setting;
187 - (BOOL) allowLooseAnamorphic;
188 - (void) setAllowLooseAnamorphic: (BOOL) setting;
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;
198 - (void) setInitialPictureFilters;
199 - (IBAction) FilterSettingsChanged: (id) sender;
200 - (IBAction) adjustFilterDisplay: (id) sender;
201 - (IBAction) modeDecombDeinterlaceSliderChanged: (id) sender;
202 - (IBAction) deblockSliderChanged: (id) sender;
205 - (NSString*) detelecineCustomString;
206 - (void) setDetelecine: (int) setting;
207 - (void) setDetelecineCustomString: (NSString*) string;
210 - (void) setUseDecomb: (int) setting;
213 - (NSString*) decombCustomString;
214 - (void) setDecomb: (int) setting;
215 - (void) setDecombCustomString: (NSString*) string;
218 - (NSString*) deinterlaceCustomString;
219 - (void) setDeinterlace: (int) setting;
220 - (void) setDeinterlaceCustomString: (NSString*) string;
223 - (NSString*) denoiseCustomString;
224 - (void) setDenoise: (int) setting;
225 - (void) setDenoiseCustomString: (NSString*) string;
228 - (void) setDeblock: (int) setting;
231 - (void) setGrayscale: (int) setting;