summaryrefslogtreecommitdiffstats
path: root/macosx/HBQueueController.h
blob: 474392507a3f0c98b703768913f188fb50aede81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* HBQueueController

   This file is part of the HandBrake source code.
   Homepage: <http://handbrake.m0k.org/>.
   It may be used under the terms of the GNU General Public License. */


#include <Cocoa/Cocoa.h>

#include "hb.h"
@class HBController;

// HB_OUTLINE_QUEUE turns on an outline view for the queue.
#define HB_OUTLINE_QUEUE 0


@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;
    IBOutlet NSOutlineView       *fOutlineView;
#endif
    
    //  +---------------fQueueWindow----------------+
    //  |+-------------fCurrentJobPane-------------+|
    //  ||                                         ||
    //  ||                                         ||
    //  ||                                         ||
    //  |+-----------------------------------------+|
    //  |+---------------fQueuePane----------------+|
    //  ||                                         ||
    //  ||                                         ||
    //  ||                                         ||
    //  ||                                         ||
    //  ||                                         ||
    //  ||                                         ||
    //  ||                                         ||
    //  |+-----------------------------------------+|
    //  +-------------------------------------------+
    
    IBOutlet NSWindow            *fQueueWindow;

    // fCurrentJobPane - visible only when processing a job
    IBOutlet NSView              *fCurrentJobPane;
    IBOutlet NSImageView         *fJobIconView;
    IBOutlet NSTextField         *fJobDescTextField;
    IBOutlet NSProgressIndicator *fProgressBar;
    IBOutlet NSTextField         *fProgressTextField;
    
    // fQueuePane - always visible; fills entire window when fCurrentJobPane is hidden
    IBOutlet NSView              *fQueuePane;
    IBOutlet NSTableView         *fTaskView;
    IBOutlet NSTextField         *fQueueCountField;
    
}

- (void)setHandle: (hb_handle_t *)handle;
- (void)setHBController: (HBController *)controller;
- (void)updateQueueUI;
- (void)updateCurrentJobUI;

- (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)toggleStartPause: (id)sender;

@end