diff options
author | dynaflash <[email protected]> | 2007-09-24 15:22:24 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-09-24 15:22:24 +0000 |
commit | 2f4097f0af04cbefc10b2981dedea457ab1054b5 (patch) | |
tree | c14dce0308fe7e2b4725c193e94b36f12364ad29 /macosx/HBQueueController.h | |
parent | 50d87caf8eb863066f7d6adde38e2d8455d96863 (diff) |
MacGui: Queue update adds auto wrap to detail lines so that detail does not get truncated.
- Also deletes some unused icons from the xcode project as well as from the svn including some from rev 984
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@985 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBQueueController.h')
-rw-r--r-- | macosx/HBQueueController.h | 90 |
1 files changed, 71 insertions, 19 deletions
diff --git a/macosx/HBQueueController.h b/macosx/HBQueueController.h index 1afd58fb1..d223e435f 100644 --- a/macosx/HBQueueController.h +++ b/macosx/HBQueueController.h @@ -6,28 +6,87 @@ #include <Cocoa/Cocoa.h> - #include "hb.h" + @class HBController; -// HB_OUTLINE_QUEUE turns on an outline view for the queue. -#define HB_OUTLINE_QUEUE 1 +#define HB_QUEUE_DRAGGING 0 // <--- NOT COMPLETELY FUNCTIONAL YET #define HB_OUTLINE_METRIC_CONTROLS 0 // for tweaking the outline cell spacings +//------------------------------------------------------------------------------------ + +// HBQueueOutlineView exists solely to get around a bug in variable row height outline +// views in which row heights get messed up during live resizes. See this discussion: +// http://lists.apple.com/archives/cocoa-dev/2005/Oct/msg00871.html +// However, the recommeneded fix (override drawRect:) does not work. Instead, this +// subclass implements viewDidEndLiveResize in order to recalculate all row heights. +@interface HBQueueOutlineView : NSOutlineView +{ +} +@end + +//------------------------------------------------------------------------------------ + +@interface HBJob : NSObject +{ + hb_job_t *hbJob; +} + ++ (HBJob*) jobWithJob: (hb_job_t *) job; +- (id) initWithJob: (hb_job_t *) job; +- (hb_job_t *) job; +- (NSMutableAttributedString *) attributedDescriptionWithHBHandle: (hb_handle_t *)handle + withIcon: (BOOL)withIcon + withTitle: (BOOL)withTitle + withPassName: (BOOL)withPassName + withFormatInfo: (BOOL)withFormatInfo + withDestination: (BOOL)withDestination + withPictureInfo: (BOOL)withPictureInfo + withVideoInfo: (BOOL)withVideoInfo + withx264Info: (BOOL)withx264Info + withAudioInfo: (BOOL)withAudioInfo + withSubtitleInfo: (BOOL)withSubtitleInfo; + +@end + +//------------------------------------------------------------------------------------ + +@interface HBJobGroup : NSObject +{ + NSMutableArray *fJobs; // array of HBJob + NSMutableAttributedString *fDescription; + BOOL fNeedsDescription; + float fLastDescriptionHeight; + float fLastDescriptionWidth; +} + ++ (HBJobGroup *) jobGroup; +- (unsigned int) count; +- (void) addJob: (HBJob *)aJob; +- (HBJob *) jobAtIndex: (unsigned)index; +- (unsigned) indexOfJob: (HBJob *)aJob; +- (NSEnumerator *) jobEnumerator; +- (void) setNeedsDescription: (BOOL)flag; +- (NSMutableAttributedString *) attributedDescriptionWithHBHandle: (hb_handle_t *)handle; +- (float) heightOfDescriptionForWidth:(float)width withHBHandle: (hb_handle_t *)handle; +- (float) lastDescriptionHeight; + +@end + +//------------------------------------------------------------------------------------ @interface HBQueueController : NSObject { hb_handle_t *fHandle; HBController *fHBController; - NSViewAnimation *fAnimation; - BOOL fCurrentJobHidden; // YES when fCurrentJobPane has been shifted out of view (see showCurrentJobPane) - BOOL fShowsJobsAsGroups; - BOOL fShowsDetail; -#if HB_OUTLINE_QUEUE - NSMutableArray *fEncodes; // hblib's job list organized in a hierarchy. Contents are NSArrays of HBJobs. + NSMutableArray *fJobGroups; // hblib's job list organized in a hierarchy of HBJobGroup and HBJob + NSViewAnimation *fAnimation; // for revealing the fCurrentJobPane + BOOL fCurrentJobPaneShown; // NO when fCurrentJobPane has been shifted out of view (see showCurrentJobPane) + hb_job_t *fLastKnownCurrentJob; NSMutableIndexSet *fSavedExpandedItems; unsigned int fSavedSelectedItem; - hb_job_t *fLastKnownCurrentJob; +#if HB_QUEUE_DRAGGING + NSArray *fDraggedNodes; #endif // +---------------fQueueWindow----------------+ @@ -58,11 +117,7 @@ // fQueuePane - always visible; fills entire window when fCurrentJobPane is hidden IBOutlet NSView *fQueuePane; -#if HB_OUTLINE_QUEUE - IBOutlet NSOutlineView *fOutlineView; -#else - IBOutlet NSTableView *fTaskView; -#endif + IBOutlet HBQueueOutlineView *fOutlineView; IBOutlet NSTextField *fQueueCountField; #if HB_OUTLINE_METRIC_CONTROLS IBOutlet NSSlider *fIndentation; // debug @@ -79,10 +134,6 @@ - (IBAction)showQueueWindow: (id)sender; - (IBAction)removeSelectedJob: (id)sender; - (IBAction)cancelCurrentJob: (id)sender; -- (IBAction)showDetail: (id)sender; -- (IBAction)hideDetail: (id)sender; -- (IBAction)showJobsAsGroups: (id)sender; -- (IBAction)showJobsAsPasses: (id)sender; - (IBAction)toggleStartCancel: (id)sender; - (IBAction)togglePauseResume: (id)sender; @@ -92,3 +143,4 @@ #endif @end + |