mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-21 18:59:32 +00:00
Added more protocols to clarify types for certain editors
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
@class KPKAttribute;
|
||||
@class KPKEntry;
|
||||
@class KPKTimeInfo;
|
||||
@class KPKNode;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -14,12 +18,33 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// Individual editors shoudl adopt different APIs to accomodate their needs
|
||||
/// The preferred way to set model data is to use the representedObject
|
||||
@protocol MPInspectorEditor <NSObject>
|
||||
|
||||
@required
|
||||
@property (nonatomic) BOOL isEditor;
|
||||
|
||||
- (void)commitChanges;
|
||||
@end
|
||||
|
||||
/// NodeInspectorEditors require the represented object to be a KPKNode
|
||||
@protocol KPKNodeInspectorEditor <MPInspectorEditor>
|
||||
@required
|
||||
@property (nonatomic, nullable, readonly, strong) KPKNode *representedNode;
|
||||
@end
|
||||
|
||||
/// EntryInspectorEditors require the represented object to be a KPKEnty
|
||||
@protocol MPEntryInspectorEditor <MPInspectorEditor>
|
||||
@required
|
||||
@property (nonatomic, nullable, readonly, strong) KPKEntry *representedEntry;
|
||||
@end
|
||||
|
||||
/// AttributeInspectorEditors require the represented object to be a KPKAttribute
|
||||
@protocol MPAttributeInspectorEditor <MPInspectorEditor>
|
||||
@required
|
||||
@property (nonatomic, nullable, readonly, strong) KPKAttribute *representedAttribute;
|
||||
@end
|
||||
|
||||
/// TimeInfoInpspectorEditors require the represented object to be a KPKTimeInfo
|
||||
@protocol MPTimeInfoInpspectorEditor <MPInspectorEditor>
|
||||
@required
|
||||
@property (nonatomic, nullable, readonly, strong) KPKTimeInfo *representedTimeInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Reference in New Issue
Block a user