2021-03-08 23:59:02 +00:00
|
|
|
//
|
|
|
|
// Slot.h
|
|
|
|
// Ample
|
|
|
|
//
|
|
|
|
// Created by Kelvin Sherlock on 3/6/2021.
|
|
|
|
// Copyright © 2021 Kelvin Sherlock. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
#import "Media.h"
|
|
|
|
|
|
|
|
//NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class Slot, SlotOption, SlotTableCellView;
|
|
|
|
|
|
|
|
|
|
|
|
@interface Slot : NSObject<NSCopying>
|
|
|
|
|
|
|
|
@property NSInteger defaultIndex;
|
|
|
|
@property NSInteger selectedIndex;
|
|
|
|
@property NSInteger index;
|
|
|
|
|
|
|
|
@property (readonly) NSString *name;
|
|
|
|
@property (readonly) NSString *title;
|
|
|
|
@property (readonly) NSArray *menuItems;
|
|
|
|
|
2021-03-10 23:37:59 +00:00
|
|
|
@property (readonly) SlotOption *selectedItem;
|
2021-03-08 23:59:02 +00:00
|
|
|
|
|
|
|
-(NSArray *)args;
|
2021-06-07 04:34:26 +00:00
|
|
|
-(NSDictionary *)serialize;
|
|
|
|
-(void)reserialize: (NSDictionary *)dict;
|
2021-03-08 23:59:02 +00:00
|
|
|
|
|
|
|
-(void)reset;
|
|
|
|
-(void)prepareView: (SlotTableCellView *)view;
|
|
|
|
|
|
|
|
-(void)selectValue: (NSString *)value;
|
2021-03-10 23:37:59 +00:00
|
|
|
|
2021-03-08 23:59:02 +00:00
|
|
|
-(Media)selectedMedia;
|
|
|
|
|
2021-03-10 03:58:01 +00:00
|
|
|
-(NSArray *)selectedChildren;
|
2021-03-08 23:59:02 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface SlotOption : NSObject<NSCopying>
|
|
|
|
|
|
|
|
@property NSString *value;
|
|
|
|
@property NSString *title;
|
|
|
|
@property BOOL isDefault;
|
|
|
|
@property BOOL disabled;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface SlotTableCellView : NSTableCellView
|
|
|
|
|
|
|
|
@property (weak) IBOutlet NSPopUpButton *menuButton;
|
2021-03-10 23:37:59 +00:00
|
|
|
@property (weak) IBOutlet NSButton *hamburgerButton;
|
2021-03-08 23:59:02 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
//NS_ASSUME_NONNULL_END
|