OSDN Git Service

MacGui: replace handbrake.m0k.org references with handbrake.fr in the entire macosx...
[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 : NSObject
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 NSPanel         * fPicturePanel;
22
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;
48         
49     int     MaxOutputWidth;
50     int     MaxOutputHeight;
51     BOOL    autoCrop;
52     BOOL    allowLooseAnamorphic;
53     int output_width, output_height, output_par_width, output_par_height;
54     int display_width;
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
58     off */
59     BOOL    keepAspectRatioPreviousState; 
60     
61     struct {
62         int     detelecine;
63         int     vfr;
64         int     deinterlace;
65         int     denoise;
66         int     deblock;
67     } fPictureFilterSettings;
68
69     id delegate;
70 }
71 - (id)initWithDelegate:(id)del;
72
73 - (void) SetHandle: (hb_handle_t *) handle;
74 - (void) SetTitle:  (hb_title_t *)  title;
75 - (void) setInitialPictureFilters;
76 - (void) displayPreview;
77
78 - (IBAction) SettingsChanged: (id) sender;
79 - (IBAction) PreviousPicture: (id) sender;
80 - (IBAction) NextPicture: (id) sender;
81 - (IBAction) ClosePanel: (id) sender;
82
83 - (BOOL) autoCrop;
84 - (void) setAutoCrop: (BOOL) setting;
85
86 - (BOOL) allowLooseAnamorphic;
87 - (void) setAllowLooseAnamorphic: (BOOL) setting;
88
89 - (int) detelecine;
90 - (void) setDetelecine: (int) setting;
91 - (int) vfr;
92 - (void) setVFR: (int) setting;
93 - (int) deinterlace;
94 - (void) setDeinterlace: (int) setting;
95 - (int) denoise;
96 - (void) setDenoise: (int) setting;
97 - (int) deblock;
98 - (void) setDeblock: (int) setting;
99
100 - (void)showPanelInWindow: (NSWindow *)fWindow forTitle: (hb_title_t *)title;
101 - (BOOL) loadMyNibFile;
102
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;
109 @end
110
111 @interface NSObject (PictureControllertDelegateMethod)
112 - (void)pictureSettingsDidChange;
113 @end