2023-11-01 22:11:11 +01:00
|
|
|
// This file Copyright © Transmission authors and contributors.
|
2022-01-20 12:27:56 -06:00
|
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2011-02-20 03:58:50 +00:00
|
|
|
|
2022-06-29 01:15:52 +01:00
|
|
|
#import <AppKit/AppKit.h>
|
2011-02-20 03:58:50 +00:00
|
|
|
|
2022-10-19 20:28:21 +01:00
|
|
|
typedef NSString* FilterType NS_TYPED_EXTENSIBLE_ENUM;
|
2011-02-20 03:58:50 +00:00
|
|
|
|
2022-10-19 20:28:21 +01:00
|
|
|
extern FilterType const FilterTypeNone;
|
|
|
|
extern FilterType const FilterTypeActive;
|
|
|
|
extern FilterType const FilterTypeDownload;
|
|
|
|
extern FilterType const FilterTypeSeed;
|
|
|
|
extern FilterType const FilterTypePause;
|
|
|
|
extern FilterType const FilterTypeError;
|
2011-02-20 03:58:50 +00:00
|
|
|
|
2022-10-19 20:28:21 +01:00
|
|
|
typedef NSString* FilterSearchType NS_TYPED_EXTENSIBLE_ENUM;
|
|
|
|
|
|
|
|
extern FilterSearchType const FilterSearchTypeName;
|
|
|
|
extern FilterSearchType const FilterSearchTypeTracker;
|
|
|
|
|
2023-10-02 01:45:52 +02:00
|
|
|
extern NSInteger const kGroupFilterAllTag;
|
2011-02-20 03:58:50 +00:00
|
|
|
|
|
|
|
@interface FilterBarController : NSViewController
|
2017-01-24 20:53:16 +03:00
|
|
|
|
2022-04-30 06:51:40 +08:00
|
|
|
@property(nonatomic, readonly) NSArray<NSString*>* searchStrings;
|
2011-02-20 03:58:50 +00:00
|
|
|
|
2021-08-15 12:41:48 +03:00
|
|
|
- (instancetype)init;
|
2011-02-20 03:58:50 +00:00
|
|
|
|
2022-11-16 00:50:16 +08:00
|
|
|
- (IBAction)setFilter:(id)sender;
|
2021-08-15 12:41:48 +03:00
|
|
|
- (void)switchFilter:(BOOL)right;
|
2022-11-16 00:50:16 +08:00
|
|
|
- (IBAction)setSearchText:(id)sender;
|
|
|
|
- (IBAction)setSearchType:(id)sender;
|
|
|
|
- (IBAction)setGroupFilter:(id)sender;
|
2021-08-15 12:41:48 +03:00
|
|
|
- (void)reset:(BOOL)updateUI;
|
|
|
|
- (void)focusSearchField;
|
2022-11-28 07:31:26 +03:00
|
|
|
- (BOOL)isFocused;
|
2011-02-20 03:58:50 +00:00
|
|
|
|
2021-08-15 12:41:48 +03:00
|
|
|
- (void)setCountAll:(NSUInteger)all
|
|
|
|
active:(NSUInteger)active
|
|
|
|
downloading:(NSUInteger)downloading
|
|
|
|
seeding:(NSUInteger)seeding
|
2022-03-07 07:01:01 +01:00
|
|
|
paused:(NSUInteger)paused
|
|
|
|
error:(NSUInteger)error;
|
2012-07-25 12:49:11 +00:00
|
|
|
|
2011-02-20 03:58:50 +00:00
|
|
|
@end
|