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 #include <Cocoa/Cocoa.h>
11 #define HB_NUM_HBLIB_PICTURES 10 // hbilb generates 10 preview pictures
13 @interface PictureController : NSObject
15 hb_handle_t * fHandle;
18 NSMutableDictionary * fPicturePreviews; // NSImages, one for each preview libhb creates, created lazily
21 IBOutlet NSPanel * fPicturePanel;
23 IBOutlet NSImageView * fPictureView;
24 IBOutlet NSBox * fPictureViewArea;
25 IBOutlet NSTextField * fWidthField;
26 IBOutlet NSStepper * fWidthStepper;
27 IBOutlet NSTextField * fHeightField;
28 IBOutlet NSStepper * fHeightStepper;
29 IBOutlet NSButton * fRatioCheck;
30 IBOutlet NSMatrix * fCropMatrix;
31 IBOutlet NSTextField * fCropTopField;
32 IBOutlet NSStepper * fCropTopStepper;
33 IBOutlet NSTextField * fCropBottomField;
34 IBOutlet NSStepper * fCropBottomStepper;
35 IBOutlet NSTextField * fCropLeftField;
36 IBOutlet NSStepper * fCropLeftStepper;
37 IBOutlet NSTextField * fCropRightField;
38 IBOutlet NSStepper * fCropRightStepper;
39 IBOutlet NSPopUpButton * fDeinterlacePopUp;
40 IBOutlet NSButton * fDetelecineCheck;
41 IBOutlet NSButton * fVFRCheck;
42 IBOutlet NSButton * fDeblockCheck;
43 IBOutlet NSPopUpButton * fDenoisePopUp;
44 IBOutlet NSPopUpButton * fAnamorphicPopUp;
45 IBOutlet NSButton * fPrevButton;
46 IBOutlet NSButton * fNextButton;
47 IBOutlet NSTextField * fInfoField;
52 BOOL allowLooseAnamorphic;
53 int output_width, output_height, output_par_width, output_par_height;
55 /* used to track the previous state of the keep aspect
56 ratio checkbox when turning anamorphic on, so it can be
57 returned to the previous state when anamorphic is turned
59 BOOL keepAspectRatioPreviousState;
67 } fPictureFilterSettings;
71 - (id)initWithDelegate:(id)del;
73 - (void) SetHandle: (hb_handle_t *) handle;
74 - (void) SetTitle: (hb_title_t *) title;
75 - (void) setInitialPictureFilters;
76 - (void) displayPreview;
78 - (IBAction) SettingsChanged: (id) sender;
79 - (IBAction) PreviousPicture: (id) sender;
80 - (IBAction) NextPicture: (id) sender;
81 - (IBAction) ClosePanel: (id) sender;
84 - (void) setAutoCrop: (BOOL) setting;
86 - (BOOL) allowLooseAnamorphic;
87 - (void) setAllowLooseAnamorphic: (BOOL) setting;
90 - (void) setDetelecine: (int) setting;
92 - (void) setVFR: (int) setting;
94 - (void) setDeinterlace: (int) setting;
96 - (void) setDenoise: (int) setting;
98 - (void) setDeblock: (int) setting;
100 - (void)showPanelInWindow: (NSWindow *)fWindow forTitle: (hb_title_t *)title;
101 - (BOOL) loadMyNibFile;
103 + (NSImage *) makeImageForPicture: (int)pictureIndex
104 libhb:(hb_handle_t*)handle
105 title:(hb_title_t*)title
106 removeBorders:(BOOL)removeBorders;
107 - (NSImage *) imageForPicture: (int) pictureIndex;
108 - (void) purgeImageCache;
111 @interface NSObject (PictureControllertDelegateMethod)
112 - (void)pictureSettingsDidChange;