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;
105 int output_width, output_height, output_par_width, output_par_height;
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
114 BOOL keepAspectRatioPreviousState;
119 IBOutlet NSBox * fPictureFilterBox;
121 IBOutlet NSBox * fDetelecineBox;
122 IBOutlet NSPopUpButton * fDetelecinePopUp;
123 IBOutlet NSTextField * fDetelecineField;
125 IBOutlet NSBox * fDecombDeinterlaceBox;
126 IBOutlet NSSlider * fDecombDeinterlaceSlider;
128 IBOutlet NSBox * fDecombBox;
129 IBOutlet NSPopUpButton * fDecombPopUp;
130 IBOutlet NSTextField * fDecombField;
132 IBOutlet NSBox * fDeinterlaceBox;
133 IBOutlet NSPopUpButton * fDeinterlacePopUp;
134 IBOutlet NSTextField * fDeinterlaceField;
136 IBOutlet NSBox * fDenoiseBox;
137 IBOutlet NSPopUpButton * fDenoisePopUp;
138 IBOutlet NSTextField * fDenoiseField;
141 IBOutlet NSBox * fDeblockBox; // also holds the grayscale box
142 IBOutlet NSButton * fDeblockCheck;
143 IBOutlet NSTextField * fDeblockField;
144 IBOutlet NSSlider * fDeblockSlider;
146 IBOutlet NSButton * fGrayscaleCheck;
148 IBOutlet NSTextField * fInfoField;
160 } fPictureFilterSettings;
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;
173 - (void) enablePreviewHudControls;
174 - (void) disablePreviewHudControls;
176 - (IBAction) adjustSizingDisplay: (id) sender;
179 - (IBAction) SettingsChanged: (id) sender;
181 - (NSString*) getPictureSizeInfoString;
182 - (void)reloadStillPreview;
185 - (void) setAutoCrop: (BOOL) setting;
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;
192 - (void) setToWindowedMode;
195 - (void) setInitialPictureFilters;
196 - (IBAction) FilterSettingsChanged: (id) sender;
197 - (IBAction) adjustFilterDisplay: (id) sender;
198 - (IBAction) modeDecombDeinterlaceSliderChanged: (id) sender;
199 - (IBAction) deblockSliderChanged: (id) sender;
202 - (NSString*) detelecineCustomString;
203 - (void) setDetelecine: (int) setting;
204 - (void) setDetelecineCustomString: (NSString*) string;
207 - (void) setUseDecomb: (int) setting;
210 - (NSString*) decombCustomString;
211 - (void) setDecomb: (int) setting;
212 - (void) setDecombCustomString: (NSString*) string;
215 - (NSString*) deinterlaceCustomString;
216 - (void) setDeinterlace: (int) setting;
217 - (void) setDeinterlaceCustomString: (NSString*) string;
220 - (NSString*) denoiseCustomString;
221 - (void) setDenoise: (int) setting;
222 - (void) setDenoiseCustomString: (NSString*) string;
225 - (void) setDeblock: (int) setting;
228 - (void) setGrayscale: (int) setting;