summaryrefslogtreecommitdiffstats
path: root/macosx/PictureController.h
diff options
context:
space:
mode:
authordynaflash <[email protected]>2009-01-12 00:07:38 +0000
committerdynaflash <[email protected]>2009-01-12 00:07:38 +0000
commit7e73b3884143ae1fb8c8cd9a384c1ef959fa0a86 (patch)
tree3921b193dd1dbf5aafbe206d525ad4d40bf702fb /macosx/PictureController.h
parentf2bd5d8c9da510bfc2969d0cf23a68196d61faa5 (diff)
MacGui: Separate Picture Settings and Preview Window Initial Implementation
- Picture Settings is now a hud style inspector panel: -- Allows more room to be displayed along with Main Window. -- Has button (though ugly ... for now) to open the preview window. - Separate Preview Window: -- Preview Window can now show the entire preview content via a hud style overlay controller (ala iTunes, DvdPlayer controls) activated by mouse movement. -- Has button to allow opening the Picture Settings inspector. -- Full Screen Mode (ala iTunes, DvdPlayer) which should help for max preview size for HD sources. - Note: all hud style controls in this implementation are created only using core animation filters, I decided against a third party hud control framework, though one can certainly be implemented at any time. - Known Issues: -- WARNING: Quitting HB while in full screen mode will crash the macgui. -- The hud overlay controls in the Preview Window will align kind of wonky when the resolution is scaled way below the source. -- Ideally, after moving the mouse within the preview area then stopping, after a certain amount of time the hud overlay control box should disappear. -- Hud style controls still need alot of development to fit within the HIG. -- Need a keboard shortcut for the Preview Window. -- As usual with initial implementations there are likely many more Bugs/Issues. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2076 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/PictureController.h')
-rw-r--r--macosx/PictureController.h54
1 files changed, 19 insertions, 35 deletions
diff --git a/macosx/PictureController.h b/macosx/PictureController.h
index 91f88b9ed..b8af4be59 100644
--- a/macosx/PictureController.h
+++ b/macosx/PictureController.h
@@ -6,26 +6,26 @@
#import <Cocoa/Cocoa.h>
-#include "hb.h"
-/* Needed for Quicktime movie previews */
-#import <QTKit/QTKit.h>
+#include "hb.h"
@class HBController;
+@class PreviewController;
-#define HB_NUM_HBLIB_PICTURES 20 // # of preview pictures libhb should generate
+
+//#define HB_NUM_HBLIB_PICTURES 20 // # of preview pictures libhb should generate
@interface PictureController : NSWindowController
{
hb_handle_t * fHandle;
hb_title_t * fTitle;
- HBController *fHBController; // reference to HBController
+ HBController *fHBController;
+ PreviewController *fPreviewController; // reference to HBController
IBOutlet NSWindow * fPictureWindow;
NSMutableDictionary * fPicturePreviews; // NSImages, one for each preview libhb creates, created lazily
int fPicture;
- IBOutlet NSImageView * fPictureView;
- IBOutlet NSBox * fPictureViewArea;
+
IBOutlet NSBox * fPictureSizeBox;
IBOutlet NSBox * fPictureCropBox;
IBOutlet NSBox * fPictureFilterBox;
@@ -54,12 +54,16 @@
IBOutlet NSSlider * fPictureSlider;
IBOutlet NSTextField * fInfoField;
+ IBOutlet NSButton * fPreviewOpenButton;
+
int MaxOutputWidth;
int MaxOutputHeight;
BOOL autoCrop;
BOOL allowLooseAnamorphic;
+
int output_width, output_height, output_par_width, output_par_height;
int display_width;
+
/* used to track the previous state of the keep aspect
ratio checkbox when turning anamorphic on, so it can be
returned to the previous state when anamorphic is turned
@@ -74,19 +78,7 @@
int deblock;
} fPictureFilterSettings;
- id delegate;
-
- /* Movie Previews */
- IBOutlet NSButton * fCreatePreviewMovieButton;
- IBOutlet NSButton * fShowPreviewMovieButton;
- NSString * fPreviewMoviePath;
- IBOutlet NSProgressIndicator * fMovieCreationProgressIndicator;
- hb_handle_t * fPreviewLibhb; // private libhb for creating previews
- NSTimer * fLibhbTimer; // timer for retrieving state from libhb
- IBOutlet NSTextField * fPreviewMovieStatusField;
- BOOL play_movie; // flag used to determine whether or not to automatically play the movie when done.
- IBOutlet QTMovieView * fMovieView;
- IBOutlet NSPopUpButton * fPreviewMovieLengthPopUp; // popup of choices for length of preview in seconds
+
}
- (id)init;
@@ -94,21 +86,14 @@
- (void) SetTitle: (hb_title_t *) title;
- (void)setHBController: (HBController *)controller;
- (IBAction) showPictureWindow: (id)sender;
+- (IBAction) showPreviewWindow: (id)sender;
- (void) setInitialPictureFilters;
-- (void) displayPreview;
+
- (IBAction) SettingsChanged: (id) sender;
-- (IBAction) pictureSliderChanged: (id) sender;
-/* Movie Previews */
-- (void) startReceivingLibhbNotifications;
-- (void) stopReceivingLibhbNotifications;
-- (IBAction) createMoviePreview: (id) sender;
-- (void) libhbStateChanged: (hb_state_t &) state;
-- (IBAction) showMoviePreview: (NSString *) path;
-- (IBAction) previewDurationPopUpChanged: (id) sender;
- (BOOL) autoCrop;
- (void) setAutoCrop: (BOOL) setting;
@@ -129,11 +114,10 @@
- (IBAction)showPreviewPanel: (id)sender forTitle: (hb_title_t *)title;
-+ (NSImage *) makeImageForPicture: (int)pictureIndex
- libhb:(hb_handle_t*)handle
- title:(hb_title_t*)title
- removeBorders:(BOOL)removeBorders;
-- (NSImage *) imageForPicture: (int) pictureIndex;
-- (void) purgeImageCache;
+
+- (void) setToFullScreenMode;
+- (void) setToWindowedMode;
+
+
@end