OSDN Git Service

e1cef2da98b5c94ce41887006bf9c6c3c47f7efd
[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 #include <Cocoa/Cocoa.h>
8
9 #include "hb.h"
10
11 #define HB_NUM_HBLIB_PICTURES      10   // hbilb generates 10 preview pictures
12
13 @interface PictureController : NSWindowController
14 {
15     hb_handle_t              * fHandle;
16     hb_title_t               * fTitle;
17
18     NSMutableDictionary      * fPicturePreviews;        // NSImages, one for each preview libhb creates, created lazily
19     int                        fPicture;
20
21     IBOutlet NSImageView     * fPictureView;
22     IBOutlet NSBox           * fPictureViewArea;
23     IBOutlet NSTextField     * fWidthField;
24     IBOutlet NSStepper       * fWidthStepper;
25     IBOutlet NSTextField     * fHeightField;
26     IBOutlet NSStepper       * fHeightStepper;
27     IBOutlet NSButton        * fRatioCheck;
28     IBOutlet NSMatrix        * fCropMatrix;
29     IBOutlet NSTextField     * fCropTopField;
30     IBOutlet NSStepper       * fCropTopStepper;
31     IBOutlet NSTextField     * fCropBottomField;
32     IBOutlet NSStepper       * fCropBottomStepper;
33     IBOutlet NSTextField     * fCropLeftField;
34     IBOutlet NSStepper       * fCropLeftStepper;
35     IBOutlet NSTextField     * fCropRightField;
36     IBOutlet NSStepper       * fCropRightStepper;
37     IBOutlet NSPopUpButton   * fDeinterlacePopUp;
38         IBOutlet NSButton        * fDetelecineCheck;
39     IBOutlet NSButton        * fVFRCheck;
40     IBOutlet NSButton        * fDeblockCheck;
41         IBOutlet NSPopUpButton   * fDenoisePopUp;
42         IBOutlet NSPopUpButton   * fAnamorphicPopUp;
43     IBOutlet NSButton        * fPrevButton;
44     IBOutlet NSButton        * fNextButton;
45     IBOutlet NSTextField     * fInfoField;
46         
47     int     MaxOutputWidth;
48     int     MaxOutputHeight;
49     BOOL    autoCrop;
50     BOOL    allowLooseAnamorphic;
51     int output_width, output_height, output_par_width, output_par_height;
52     int display_width;
53     /* used to track the previous state of the keep aspect
54     ratio checkbox when turning anamorphic on, so it can be
55     returned to the previous state when anamorphic is turned
56     off */
57     BOOL    keepAspectRatioPreviousState; 
58     
59     struct {
60         int     detelecine;
61         int     vfr;
62         int     deinterlace;
63         int     denoise;
64         int     deblock;
65     } fPictureFilterSettings;
66
67     id delegate;
68 }
69 - (id)initWithDelegate:(id)del;
70
71 - (void) SetHandle: (hb_handle_t *) handle;
72 - (void) SetTitle:  (hb_title_t *)  title;
73 - (void) setInitialPictureFilters;
74 - (void) displayPreview;
75
76 - (IBAction) SettingsChanged: (id) sender;
77 - (IBAction) PreviousPicture: (id) sender;
78 - (IBAction) NextPicture: (id) sender;
79 - (IBAction) ClosePanel: (id) sender;
80
81 - (BOOL) autoCrop;
82 - (void) setAutoCrop: (BOOL) setting;
83
84 - (BOOL) allowLooseAnamorphic;
85 - (void) setAllowLooseAnamorphic: (BOOL) setting;
86
87 - (int) detelecine;
88 - (void) setDetelecine: (int) setting;
89 - (int) vfr;
90 - (void) setVFR: (int) setting;
91 - (int) deinterlace;
92 - (void) setDeinterlace: (int) setting;
93 - (int) denoise;
94 - (void) setDenoise: (int) setting;
95 - (int) deblock;
96 - (void) setDeblock: (int) setting;
97
98 - (void)showPanelInWindow: (NSWindow *)fWindow forTitle: (hb_title_t *)title;
99
100 + (NSImage *) makeImageForPicture: (int)pictureIndex
101                 libhb:(hb_handle_t*)handle
102                 title:(hb_title_t*)title
103                 removeBorders:(BOOL)removeBorders;
104 - (NSImage *) imageForPicture: (int) pictureIndex;
105 - (void) purgeImageCache;
106 @end
107
108 @interface NSObject (PictureControllertDelegateMethod)
109 - (void)pictureSettingsDidChange;
110 @end