2 // NJDeviceViewController.h
5 // Created by Joe Wreschnig on 3/16/13.
10 @
class NJInputPathElement
;
12 @protocol NJDeviceViewControllerDelegate
;
14 @interface NJDeviceViewController
: NSObject
<NSOutlineViewDataSource
,
15 NSOutlineViewDelegate
>
17 @
property (nonatomic
, strong
) IBOutlet NSOutlineView
*inputsTree
;
18 @
property (nonatomic
, strong
) IBOutlet NSView
*noDevicesNotice
;
19 @
property (nonatomic
, strong
) IBOutlet NSView
*hidStoppedNotice
;
21 @
property (nonatomic
, weak
) IBOutlet id
<NJDeviceViewControllerDelegate
> delegate
;
23 @
property (nonatomic
, copy
) NSArray
*devices
;
24 // Assigning directly will trigger a full reload.
26 - (void)addedDevice
:(NJDevice
*)device atIndex
:(NSUInteger
)idx
;
27 - (void)removedDevice
:(NJDevice
*)device atIndex
:(NSUInteger
)idx
;
28 // But using these will animate nicely.
33 - (void)expandAndSelectItem
:(NJInputPathElement
*)item
;
35 - (NJInputPathElement
*)selectedHandler
;
39 @protocol NJDeviceViewControllerDelegate
<NSObject
>
41 - (void)deviceViewController
:(NJDeviceViewController
*)devices
42 didSelectDevice
:(NJInputPathElement
*)device
;
43 - (void)deviceViewController
:(NJDeviceViewController
*)devices
44 didSelectBranch
:(NJInputPathElement
*)handler
;
45 - (void)deviceViewController
:(NJDeviceViewController
*)devices
46 didSelectHandler
:(NJInputPathElement
*)handler
;
47 - (void)deviceViewControllerDidSelectNothing
:(NJDeviceViewController
*)devices
;