mirror of
https://github.com/ksherlock/ample.git
synced 2024-06-20 19:29:44 +00:00
328ab815fb
commit a91a858d68c845f74db106dd21a800c4d09e6e38 Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Mar 7 22:49:42 2021 -0500 listxml utility. commit e52576797da2609e700a12d1ffd7c78e8f1c2b23 Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Mar 7 22:34:00 2021 -0500 update media to use a structure instead of passing around dictionaries. commit 9277a0f720091c386812ac5f84d96080fe6e14f3 Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Mar 7 20:13:27 2021 -0500 media is working again. commit 7c0ac9a973df85fdcdaa978f80905cb9e8532ea5 Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Mar 7 18:46:38 2021 -0500 use new slot objects [WIP] commit 005e2f14d37e7b83ac4ab3e60e7fb794ac8ed651 Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Mar 7 17:33:59 2021 -0500 new slot code to make sub options easier. commit d7f3d9ef75367fad15081789a33212b7cf928fb3 Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Sun Mar 7 17:33:13 2021 -0500 String Interning...
61 lines
1.1 KiB
Objective-C
61 lines
1.1 KiB
Objective-C
//
|
|
// 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;
|
|
|
|
|
|
-(NSArray *)args;
|
|
-(NSArray *)serialize;
|
|
|
|
-(void)reset;
|
|
-(void)prepareView: (SlotTableCellView *)view;
|
|
-(void)loadDeviceSlots: (NSDictionary *)devices;
|
|
|
|
-(void)selectValue: (NSString *)value;
|
|
-(SlotOption *)selectedItem;
|
|
-(Media)selectedMedia;
|
|
|
|
-(instancetype)initWithName: (NSString *)name title: (NSString *)title data: (NSArray *)data;
|
|
|
|
|
|
@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;
|
|
|
|
@end
|
|
|
|
|
|
//NS_ASSUME_NONNULL_END
|