2007-09-16 01:02:06 +00:00
|
|
|
/******************************************************************************
|
2019-01-11 18:36:19 +00:00
|
|
|
* Copyright (c) 2005-2019 Transmission authors and contributors
|
2007-09-16 01:02:06 +00:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
* DEALINGS IN THE SOFTWARE.
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
2018-09-30 10:37:30 +00:00
|
|
|
|
|
|
|
#include <libtransmission/transmission.h>
|
2007-09-16 01:02:06 +00:00
|
|
|
|
2009-10-11 02:22:38 +00:00
|
|
|
@class Controller;
|
|
|
|
@class Torrent;
|
2008-01-15 03:33:44 +00:00
|
|
|
@class TorrentCell;
|
|
|
|
|
2008-02-19 02:10:20 +00:00
|
|
|
#define GROUP_SEPARATOR_HEIGHT 18.0
|
2008-02-06 23:45:44 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
@interface TorrentTableView : NSOutlineView<NSOutlineViewDelegate, NSAnimationDelegate, NSPopoverDelegate>
|
2007-09-16 01:02:06 +00:00
|
|
|
{
|
2021-08-15 09:41:48 +00:00
|
|
|
IBOutlet Controller* fController;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
TorrentCell* fTorrentCell;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
NSUserDefaults* fDefaults;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
NSMutableIndexSet* fCollapsedGroups;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
IBOutlet NSMenu* fContextRow;
|
|
|
|
IBOutlet NSMenu* fContextNoRow;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
NSInteger fMouseRow;
|
|
|
|
NSInteger fMouseControlRow;
|
|
|
|
NSInteger fMouseRevealRow;
|
|
|
|
NSInteger fMouseActionRow;
|
|
|
|
NSArray* fSelectedValues;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
IBOutlet NSMenu* fActionMenu;
|
|
|
|
IBOutlet NSMenu* fUploadMenu;
|
|
|
|
IBOutlet NSMenu* fDownloadMenu;
|
|
|
|
IBOutlet NSMenu* fRatioMenu;
|
|
|
|
IBOutlet NSMenu* fPriorityMenu;
|
|
|
|
IBOutlet NSMenuItem* fGlobalLimitItem;
|
|
|
|
Torrent* fMenuTorrent;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2008-10-29 01:18:03 +00:00
|
|
|
CGFloat fPiecesBarPercent;
|
2021-08-15 09:41:48 +00:00
|
|
|
NSAnimation* fPiecesBarAnimation;
|
2017-01-24 17:53:16 +00:00
|
|
|
|
2011-07-27 03:38:01 +00:00
|
|
|
BOOL fActionPopoverShown;
|
2007-09-16 01:02:06 +00:00
|
|
|
}
|
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (BOOL)isGroupCollapsed:(NSInteger)value;
|
|
|
|
- (void)removeCollapsedGroup:(NSInteger)value;
|
|
|
|
- (void)removeAllCollapsedGroups;
|
|
|
|
- (void)saveCollapsedGroups;
|
2008-02-07 01:26:12 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)removeTrackingAreas;
|
|
|
|
- (void)setRowHover:(NSInteger)row;
|
|
|
|
- (void)setControlButtonHover:(NSInteger)row;
|
|
|
|
- (void)setRevealButtonHover:(NSInteger)row;
|
|
|
|
- (void)setActionButtonHover:(NSInteger)row;
|
2008-01-15 16:19:16 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)selectValues:(NSArray*)values;
|
|
|
|
@property(nonatomic, readonly) NSArray* selectedValues;
|
|
|
|
@property(nonatomic, readonly) NSArray* selectedTorrents;
|
2008-01-20 18:28:28 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (NSRect)iconRectForRow:(NSInteger)row;
|
2008-05-21 22:09:05 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)paste:(id)sender;
|
2008-05-01 02:20:53 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)toggleControlForTorrent:(Torrent*)torrent;
|
2008-01-14 18:02:08 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)displayTorrentActionPopoverForEvent:(NSEvent*)event;
|
2007-09-16 01:02:06 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)setQuickLimitMode:(id)sender;
|
|
|
|
- (void)setQuickLimit:(id)sender;
|
|
|
|
- (void)setGlobalLimit:(id)sender;
|
2007-09-16 01:02:06 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)setQuickRatioMode:(id)sender;
|
|
|
|
- (void)setQuickRatio:(id)sender;
|
2007-09-16 01:02:06 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)setPriority:(id)sender;
|
2009-04-20 03:36:35 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)togglePiecesBar;
|
|
|
|
@property(nonatomic, readonly) CGFloat piecesBarPercent;
|
2008-01-16 15:56:40 +00:00
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (void)selectAndScrollToRow:(NSInteger)row;
|
2016-03-03 17:57:08 +00:00
|
|
|
|
2007-09-16 01:02:06 +00:00
|
|
|
@end
|