forked from gnachman/iTerm2
/
ProfileTableRow.h
38 lines (32 loc) · 1007 Bytes
/
ProfileTableRow.h
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
//
// ProfileTablekRow.h
// iTerm
//
// Created by George Nachman on 1/9/12.
//
#import <Foundation/Foundation.h>
#import "ProfileModel.h"
// This wraps a single bookmark and adds a KeyValueCoding. To keep things simple
// it will hold only the bookmark's GUID, since bookmark dictionaries themselves
// are evanescent.
//
// It implements a KeyValueCoding so that sort descriptors will work.
@interface ProfileTableRow : NSObject
{
NSString* guid;
ProfileModel* underlyingModel;
}
- (id)initWithBookmark:(Profile*)bookmark underlyingModel:(ProfileModel*)underlyingModel;
- (void)dealloc;
- (Profile*)bookmark;
@end
@interface ProfileTableRow (KeyValueCoding)
// We need ascending order to sort default before not-default so we can't use
// anything senible like BOOL or "Yes"/"No" because they'd sort wrong.
typedef enum { IsDefault = 1, IsNotDefault = 2 } BookmarkRowIsDefault;
- (NSNumber*)default;
- (NSString*)name;
- (NSString*)shortcut;
- (NSString*)command;
- (NSString*)guid;
@end