2007-09-16 01:02:06 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* $Id$
|
|
|
|
*
|
2011-01-01 20:42:14 +00:00
|
|
|
* Copyright (c) 2005-2011 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>
|
|
|
|
#import <transmission.h>
|
|
|
|
|
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
|
|
|
|
2009-10-11 23:16:46 +00:00
|
|
|
@interface TorrentTableView : NSOutlineView
|
2007-09-16 01:02:06 +00:00
|
|
|
{
|
|
|
|
IBOutlet Controller * fController;
|
|
|
|
|
2008-01-24 01:05:00 +00:00
|
|
|
TorrentCell * fTorrentCell;
|
|
|
|
|
2007-09-16 01:02:06 +00:00
|
|
|
NSUserDefaults * fDefaults;
|
|
|
|
|
2008-02-07 16:23:22 +00:00
|
|
|
NSMutableIndexSet * fCollapsedGroups;
|
|
|
|
|
2007-09-16 01:02:06 +00:00
|
|
|
IBOutlet NSMenu * fContextRow, * fContextNoRow;
|
|
|
|
|
2010-03-20 03:27:17 +00:00
|
|
|
NSInteger fMouseRow, fMouseControlRow, fMouseRevealRow, fMouseActionRow, fActionPushedRow;
|
2008-01-23 02:51:58 +00:00
|
|
|
NSArray * fSelectedValues;
|
2008-01-15 03:33:44 +00:00
|
|
|
|
2009-04-20 03:36:35 +00:00
|
|
|
IBOutlet NSMenu * fActionMenu, * fUploadMenu, * fDownloadMenu, * fRatioMenu, * fPriorityMenu;
|
2009-03-05 22:48:01 +00:00
|
|
|
IBOutlet NSMenuItem * fGlobalLimitItem;
|
2007-09-16 01:02:06 +00:00
|
|
|
Torrent * fMenuTorrent;
|
2008-01-16 15:56:40 +00:00
|
|
|
|
2008-10-29 01:18:03 +00:00
|
|
|
CGFloat fPiecesBarPercent;
|
2008-06-10 05:09:30 +00:00
|
|
|
NSAnimation * fPiecesBarAnimation;
|
2011-07-27 03:38:01 +00:00
|
|
|
|
|
|
|
BOOL fActionPopoverShown;
|
2007-09-16 01:02:06 +00:00
|
|
|
}
|
|
|
|
|
2008-10-29 01:18:03 +00:00
|
|
|
- (BOOL) isGroupCollapsed: (NSInteger) value;
|
|
|
|
- (void) removeCollapsedGroup: (NSInteger) value;
|
2008-02-07 02:15:24 +00:00
|
|
|
- (void) removeAllCollapsedGroups;
|
2008-06-11 03:29:06 +00:00
|
|
|
- (void) saveCollapsedGroups;
|
2008-02-07 01:26:12 +00:00
|
|
|
|
2010-03-20 03:27:17 +00:00
|
|
|
- (void) removeTrackingAreas;
|
|
|
|
- (void) setRowHover: (NSInteger) row;
|
2008-10-29 01:18:03 +00:00
|
|
|
- (void) setControlButtonHover: (NSInteger) row;
|
|
|
|
- (void) setRevealButtonHover: (NSInteger) row;
|
|
|
|
- (void) setActionButtonHover: (NSInteger) row;
|
2008-01-15 16:19:16 +00:00
|
|
|
|
2008-01-23 02:51:58 +00:00
|
|
|
- (void) selectValues: (NSArray *) values;
|
|
|
|
- (NSArray *) selectedValues;
|
2008-01-22 23:48:14 +00:00
|
|
|
- (NSArray *) selectedTorrents;
|
2008-01-20 18:28:28 +00:00
|
|
|
|
2008-10-29 01:18:03 +00:00
|
|
|
- (NSRect) iconRectForRow: (NSInteger) row;
|
2008-05-21 22:09:05 +00:00
|
|
|
|
2008-05-01 02:20:53 +00:00
|
|
|
- (void) paste: (id) sender;
|
|
|
|
|
2008-01-14 18:02:08 +00:00
|
|
|
- (void) toggleControlForTorrent: (Torrent *) torrent;
|
|
|
|
|
2011-07-21 02:35:03 +00:00
|
|
|
- (void) displayTorrentActionPopoverForEvent: (NSEvent *) event;
|
2007-09-16 01:02:06 +00:00
|
|
|
|
|
|
|
- (void) setQuickLimitMode: (id) sender;
|
|
|
|
- (void) setQuickLimit: (id) sender;
|
2009-03-05 22:48:01 +00:00
|
|
|
- (void) setGlobalLimit: (id) sender;
|
2007-09-16 01:02:06 +00:00
|
|
|
|
|
|
|
- (void) setQuickRatioMode: (id) sender;
|
|
|
|
- (void) setQuickRatio: (id) sender;
|
|
|
|
|
2009-04-20 03:36:35 +00:00
|
|
|
- (void) setPriority: (id) sender;
|
|
|
|
|
2008-01-16 19:30:12 +00:00
|
|
|
- (void) togglePiecesBar;
|
2008-10-29 01:18:03 +00:00
|
|
|
- (CGFloat) piecesBarPercent;
|
2008-01-16 15:56:40 +00:00
|
|
|
|
2007-09-16 01:02:06 +00:00
|
|
|
@end
|