-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathOEXTokenField.h
45 lines (32 loc) · 1.41 KB
/
OEXTokenField.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
38
39
40
41
42
43
44
45
//
// OEXTokenField.h
// OEXTokenField
//
// Created by Nicolas BACHSCHMIDT on 16/03/2013.
// Copyright (c) 2013 Octiplex. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@protocol OEXTokenFieldDelegate;
/** `OEXTokenField` is a subclass of `NSTokenField` that allows token customization.
`OEXTokenField` uses an `<OEXTokenFieldCell>` to implement much of the control's functionality.
*/
@interface OEXTokenField : NSTokenField
/** @name Accessing the Delegate */
/** The token field's delegate.
@discussion The delegate must adopt the `<OEXTokenFieldDelegate>` protocol.
*/
@property(nonatomic, assign) id <OEXTokenFieldDelegate> delegate;
@end
#pragma mark -
/** The `OEXTokenFieldDelegate` protocol defines the optional methods implemented by delegates of `<OEXTokenField>` objects.
*/
@protocol OEXTokenFieldDelegate <NSTokenFieldDelegate>
@optional
/** @name Displaying Tokenized Attachment Cells */
/** Allows the delegate to provide an attachment cell to be displayed for the given represented object.
@param tokenField The token field that sent the message.
@param representedObject A represented object of the token field.
@return The attachment cell to be displayed for `representedObject`. If you return `nil` or do not implement this method, then a standard token is displayed.
*/
- (NSTextAttachmentCell *)tokenField:(OEXTokenField *)tokenField attachmentCellForRepresentedObject:(id)representedObject;
@end