// Copyright 2009 University of Otago. All rights reserved.
//
-@class NJMappingsController;
-
#import "NJMappingMenuController.h"
#import "NJMappingsViewController.h"
#import "NJDeviceViewController.h"
-#import "NJOutputController.h"
+#import "NJOutputViewController.h"
#import "NJInputController.h"
@interface EnjoyableApplicationDelegate : NSObject <NSApplicationDelegate,
NSWindowDelegate>
@property (nonatomic, strong) IBOutlet NJInputController *inputController;
-@property (nonatomic, strong) IBOutlet NJOutputController *outputController;
+@property (nonatomic, strong) IBOutlet NJOutputViewController *outputController;
@property (nonatomic, strong) IBOutlet NJMappingsViewController *mvc;
@property (nonatomic, strong) IBOutlet NJDeviceViewController *dvc;
[self.outputController loadInput:dvc.selectedHandler];
}
-- (void)deviceController:(NJInputController *)dc
- didAddDevice:(NJDevice *)device {
- [self.dvc addedDevice:device atIndex:dc.devices.count - 1];
+- (void)inputController:(NJInputController *)ic
+ didAddDevice:(NJDevice *)device {
+ [self.dvc addedDevice:device atIndex:ic.devices.count - 1];
}
-- (void)deviceController:(NJInputController *)dc
- didRemoveDeviceAtIndex:(NSInteger)idx {
+- (void)inputController:(NJInputController *)ic
+ didRemoveDeviceAtIndex:(NSInteger)idx {
[self.dvc removedDeviceAtIndex:idx];
}
-- (void)deviceControllerDidStartHID:(NJInputController *)dc {
+- (void)inputControllerDidStartHID:(NJInputController *)ic {
[self.dvc hidStarted];
}
-- (void)deviceControllerDidStopHID:(NJInputController *)dc {
+- (void)inputControllerDidStopHID:(NJInputController *)ic {
[self.dvc hidStopped];
}
-- (void)deviceController:(NJInputController *)dc didInput:(NJInput *)input {
+- (void)inputController:(NJInputController *)ic didInput:(NJInput *)input {
[self.dvc expandAndSelectItem:input];
[self.outputController loadInput:input];
[self.outputController focusKey];
}
-- (void)deviceController:(NJInputController *)dc didError:(NSError *)error {
+- (void)inputController:(NJInputController *)ic didError:(NSError *)error {
// Since the error shows the window, it can trigger another attempt
// to re-open the HID manager, which will also probably fail and error,
// so don't bother repeating ourselves.
//
-// NJDeviceController.h
-// Enjoy
-//
-// Created by Sam McCall on 4/05/09.
-// Copyright 2009 University of Otago. All rights reserved.
+// NJInputController.h
+// Enjoyable
//
#import "NJHIDManager.h"
@protocol NJInputControllerDelegate
-- (void)deviceController:(NJInputController *)dc didAddDevice:(NJDevice *)device;
-- (void)deviceController:(NJInputController *)dc didRemoveDeviceAtIndex:(NSInteger)idx;
-- (void)deviceController:(NJInputController *)dc didInput:(NJInput *)input;
-- (void)deviceControllerDidStartHID:(NJInputController *)dc;
-- (void)deviceControllerDidStopHID:(NJInputController *)dc;
-- (void)deviceController:(NJInputController *)dc didError:(NSError *)error;
+- (void)inputController:(NJInputController *)ic didAddDevice:(NJDevice *)device;
+- (void)inputController:(NJInputController *)ic didRemoveDeviceAtIndex:(NSInteger)idx;
+- (void)inputController:(NJInputController *)ic didInput:(NJInput *)input;
+- (void)inputControllerDidStartHID:(NJInputController *)ic;
+- (void)inputControllerDidStopHID:(NJInputController *)ic;
+- (void)inputController:(NJInputController *)ic didError:(NSError *)error;
@end
//
-// NJDeviceController.m
-// Enjoy
-//
-// Created by Sam McCall on 4/05/09.
+// NJInputController.m
+// Enjoyable
//
#import "NJInputController.h"
if (!handler)
return;
- [self.delegate deviceController:self didInput:handler];
+ [self.delegate inputController:self didInput:handler];
}
- (void)hidManager:(NJHIDManager *)manager
- (void)hidManager:(NJHIDManager *)manager deviceAdded:(IOHIDDeviceRef)device {
NJDevice *match = [[NJDevice alloc] initWithDevice:device];
[self addDevice:match];
- [self.delegate deviceController:self didAddDevice:match];
+ [self.delegate inputController:self didAddDevice:match];
}
- (NJDevice *)findDeviceByRef:(IOHIDDeviceRef)device {
if (match) {
NSInteger idx = [_devices indexOfObjectIdenticalTo:match];
[_devices removeObjectAtIndex:idx];
- [self.delegate deviceController:self didRemoveDeviceAtIndex:idx];
+ [self.delegate inputController:self didRemoveDeviceAtIndex:idx];
}
}
}
- (void)hidManager:(NJHIDManager *)manager didError:(NSError *)error {
- [self.delegate deviceController:self didError:error];
+ [self.delegate inputController:self didError:error];
self.simulatingEvents = NO;
}
- (void)hidManagerDidStart:(NJHIDManager *)manager {
- [self.delegate deviceControllerDidStartHID:self];
+ [self.delegate inputControllerDidStartHID:self];
}
- (void)hidManagerDidStop:(NJHIDManager *)manager {
[_devices removeAllObjects];
- [self.delegate deviceControllerDidStopHID:self];
+ [self.delegate inputControllerDidStopHID:self];
}
- (void)startHid {
+++ /dev/null
-//
-// NJOutputController.h
-// Enjoy
-//
-// Created by Sam McCall on 5/05/09.
-// Copyright 2009 University of Otago. All rights reserved.
-//
-
-#import "NJKeyInputField.h"
-
-@class NJInputController;
-@class NJOutput;
-@class NJInput;
-
-@interface NJOutputController : NSObject <NJKeyInputFieldDelegate> {
- IBOutlet NJKeyInputField *keyInput;
- IBOutlet NSMatrix *radioButtons;
- IBOutlet NSSegmentedControl *mouseDirSelect;
- IBOutlet NSSlider *mouseSpeedSlider;
- IBOutlet NSSegmentedControl *mouseBtnSelect;
- IBOutlet NSSegmentedControl *scrollDirSelect;
- IBOutlet NSSlider *scrollSpeedSlider;
- IBOutlet NSTextField *title;
- IBOutlet NSPopUpButton *mappingPopup;
- IBOutlet NJInputController *inputController;
- IBOutlet NSButton *smoothCheck;
- IBOutlet NSButton *unknownMapping;
-}
-
-@property (assign) BOOL enabled;
-
-- (void)loadInput:(NJInput *)input;
-- (IBAction)radioChanged:(id)sender;
-- (IBAction)mdirChanged:(id)sender;
-- (IBAction)mbtnChanged:(id)sender;
-- (IBAction)sdirChanged:(id)sender;
-- (IBAction)mouseSpeedChanged:(id)sender;
-- (IBAction)scrollSpeedChanged:(id)sender;
-- (IBAction)scrollTypeChanged:(id)sender;
-
-- (void)focusKey;
-
-@end
+++ /dev/null
-//
-// NJOutputController.m
-// Enjoy
-//
-// Created by Sam McCall on 5/05/09.
-//
-
-#import "NJOutputController.h"
-
-#import "NJMapping.h"
-#import "NJInput.h"
-#import "NJEvents.h"
-#import "NJInputController.h"
-#import "NJKeyInputField.h"
-#import "NJOutputMapping.h"
-#import "NJOutputController.h"
-#import "NJOutputKeyPress.h"
-#import "NJOutputMouseButton.h"
-#import "NJOutputMouseMove.h"
-#import "NJOutputMouseScroll.h"
-
-@implementation NJOutputController {
- NJInput *_input;
-}
-
-- (id)init {
- if ((self = [super init])) {
- [NSNotificationCenter.defaultCenter
- addObserver:self
- selector:@selector(mappingListDidChange:)
- name:NJEventMappingListChanged
- object:nil];
- [NSNotificationCenter.defaultCenter
- addObserver:self
- selector:@selector(mappingDidChange:)
- name:NJEventMappingChanged
- object:nil];
- }
- return self;
-}
-
-- (void)dealloc {
- [NSNotificationCenter.defaultCenter removeObserver:self];
-}
-
-- (void)cleanUpInterface {
- NSInteger row = radioButtons.selectedRow;
-
- if (row != 1) {
- keyInput.keyCode = NJKeyInputFieldEmpty;
- [keyInput resignIfFirstResponder];
- }
-
- if (row != 2) {
- [mappingPopup selectItemAtIndex:-1];
- [mappingPopup resignIfFirstResponder];
- unknownMapping.hidden = YES;
- }
-
- if (row != 3) {
- mouseDirSelect.selectedSegment = -1;
- mouseSpeedSlider.floatValue = mouseSpeedSlider.minValue;
- [mouseDirSelect resignIfFirstResponder];
- } else {
- if (mouseDirSelect.selectedSegment == -1)
- mouseDirSelect.selectedSegment = 0;
- if (!mouseSpeedSlider.floatValue)
- mouseSpeedSlider.floatValue = 10;
- }
-
- if (row != 4) {
- mouseBtnSelect.selectedSegment = -1;
- [mouseBtnSelect resignIfFirstResponder];
- } else if (mouseBtnSelect.selectedSegment == -1)
- mouseBtnSelect.selectedSegment = 0;
-
- if (row != 5) {
- scrollDirSelect.selectedSegment = -1;
- scrollSpeedSlider.floatValue = scrollSpeedSlider.minValue;
- smoothCheck.state = NSOffState;
- [scrollDirSelect resignIfFirstResponder];
- [scrollSpeedSlider resignIfFirstResponder];
- [smoothCheck resignIfFirstResponder];
- } else {
- if (scrollDirSelect.selectedSegment == -1)
- scrollDirSelect.selectedSegment = 0;
- }
-
-}
-
-- (IBAction)radioChanged:(NSView *)sender {
- [sender.window makeFirstResponder:sender];
- if (radioButtons.selectedRow == 1)
- [keyInput.window makeFirstResponder:keyInput];
- [self commit];
-}
-
-- (void)keyInputField:(NJKeyInputField *)keyInput didChangeKey:(CGKeyCode)keyCode {
- [radioButtons selectCellAtRow:1 column:0];
- [radioButtons.window makeFirstResponder:radioButtons];
- [self commit];
-}
-
-- (void)keyInputFieldDidClear:(NJKeyInputField *)keyInput {
- [radioButtons selectCellAtRow:0 column:0];
- [self commit];
-}
-
-- (void)mappingChosen:(id)sender {
- [radioButtons selectCellAtRow:2 column:0];
- [mappingPopup.window makeFirstResponder:mappingPopup];
- unknownMapping.hidden = YES;
- [self commit];
-}
-
-- (void)mdirChanged:(NSView *)sender {
- [radioButtons selectCellAtRow:3 column:0];
- [sender.window makeFirstResponder:sender];
- [self commit];
-}
-
-- (void)mouseSpeedChanged:(NSSlider *)sender {
- [radioButtons selectCellAtRow:3 column:0];
- [sender.window makeFirstResponder:sender];
- [self commit];
-}
-
-- (void)mbtnChanged:(NSView *)sender {
- [radioButtons selectCellAtRow:4 column:0];
- [sender.window makeFirstResponder:sender];
- [self commit];
-}
-
-- (void)sdirChanged:(NSView *)sender {
- [radioButtons selectCellAtRow:5 column:0];
- [sender.window makeFirstResponder:sender];
- [self commit];
-}
-
-- (void)scrollSpeedChanged:(NSSlider *)sender {
- [radioButtons selectCellAtRow:5 column:0];
- [sender.window makeFirstResponder:sender];
- [self commit];
-}
-
-- (IBAction)scrollTypeChanged:(NSButton *)sender {
- [radioButtons selectCellAtRow:5 column:0];
- [sender.window makeFirstResponder:sender];
- if (sender.state == NSOnState) {
- scrollSpeedSlider.floatValue =
- scrollSpeedSlider.minValue + (scrollSpeedSlider.maxValue - scrollSpeedSlider.minValue) / 2;
- scrollSpeedSlider.enabled = YES;
- } else {
- scrollSpeedSlider.floatValue = scrollSpeedSlider.minValue;
- scrollSpeedSlider.enabled = NO;
- }
- [self commit];
-}
-
-- (NJOutput *)currentOutput {
- return inputController.currentMapping[_input];
-}
-
-- (NJOutput *)makeOutput {
- switch (radioButtons.selectedRow) {
- case 0:
- return nil;
- case 1:
- if (keyInput.hasKeyCode) {
- NJOutputKeyPress *k = [[NJOutputKeyPress alloc] init];
- k.keyCode = keyInput.keyCode;
- return k;
- } else {
- return nil;
- }
- break;
- case 2: {
- NJOutputMapping *c = [[NJOutputMapping alloc] init];
- c.mapping = inputController.mappings[mappingPopup.indexOfSelectedItem];
- return c;
- }
- case 3: {
- NJOutputMouseMove *mm = [[NJOutputMouseMove alloc] init];
- mm.axis = mouseDirSelect.selectedSegment;
- mm.speed = mouseSpeedSlider.floatValue;
- return mm;
- }
- case 4: {
- NJOutputMouseButton *mb = [[NJOutputMouseButton alloc] init];
- mb.button = [mouseBtnSelect.cell tagForSegment:mouseBtnSelect.selectedSegment];
- return mb;
- }
- case 5: {
- NJOutputMouseScroll *ms = [[NJOutputMouseScroll alloc] init];
- ms.direction = [scrollDirSelect.cell tagForSegment:scrollDirSelect.selectedSegment];
- ms.speed = scrollSpeedSlider.floatValue;
- ms.smooth = smoothCheck.state == NSOnState;
- return ms;
- }
- default:
- return nil;
- }
-}
-
-- (void)commit {
- [self cleanUpInterface];
- inputController.currentMapping[_input] = [self makeOutput];
- [inputController save];
-}
-
-- (BOOL)enabled {
- return radioButtons.isEnabled;
-}
-
-- (void)setEnabled:(BOOL)enabled {
- radioButtons.enabled = enabled;
- keyInput.enabled = enabled;
- mappingPopup.enabled = enabled;
- mouseDirSelect.enabled = enabled;
- mouseSpeedSlider.enabled = enabled;
- mouseBtnSelect.enabled = enabled;
- scrollDirSelect.enabled = enabled;
- smoothCheck.enabled = enabled;
- scrollSpeedSlider.enabled = enabled && smoothCheck.state;
- if (!enabled)
- unknownMapping.hidden = YES;
-}
-
-- (void)loadOutput:(NJOutput *)output forInput:(NJInput *)input {
- if (!input) {
- self.enabled = NO;
- title.stringValue = @"";
- } else {
- self.enabled = YES;
- NSString *inpFullName = input.name;
- for (NJInputPathElement *cur = input.parent; cur; cur = cur.parent) {
- inpFullName = [[NSString alloc] initWithFormat:@"%@ ▸ %@", cur.name, inpFullName];
- }
- title.stringValue = inpFullName;
- }
-
- if ([output isKindOfClass:NJOutputKeyPress.class]) {
- [radioButtons selectCellAtRow:1 column:0];
- keyInput.keyCode = [(NJOutputKeyPress*)output keyCode];
- } else if ([output isKindOfClass:NJOutputMapping.class]) {
- [radioButtons selectCellAtRow:2 column:0];
- NSMenuItem *item = [mappingPopup itemWithIdenticalRepresentedObject:[(NJOutputMapping *)output mapping]];
- [mappingPopup selectItem:item];
- unknownMapping.hidden = !!item;
- unknownMapping.title = [(NJOutputMapping *)output mappingName];
- }
- else if ([output isKindOfClass:NJOutputMouseMove.class]) {
- [radioButtons selectCellAtRow:3 column:0];
- mouseDirSelect.selectedSegment = [(NJOutputMouseMove *)output axis];
- mouseSpeedSlider.floatValue = [(NJOutputMouseMove *)output speed];
- }
- else if ([output isKindOfClass:NJOutputMouseButton.class]) {
- [radioButtons selectCellAtRow:4 column:0];
- [mouseBtnSelect selectSegmentWithTag:[(NJOutputMouseButton *)output button]];
- }
- else if ([output isKindOfClass:NJOutputMouseScroll.class]) {
- [radioButtons selectCellAtRow:5 column:0];
- int direction = [(NJOutputMouseScroll *)output direction];
- float speed = [(NJOutputMouseScroll *)output speed];
- BOOL smooth = [(NJOutputMouseScroll *)output smooth];
- [scrollDirSelect selectSegmentWithTag:direction];
- scrollSpeedSlider.floatValue = speed;
- smoothCheck.state = smooth ? NSOnState : NSOffState;
- scrollSpeedSlider.enabled = smooth;
- } else {
- [radioButtons selectCellAtRow:self.enabled ? 0 : -1 column:0];
- }
- [self cleanUpInterface];
-}
-
-- (void)loadInput:(NJInput *)input {
- _input = input;
- [self loadOutput:self.currentOutput forInput:input];
-}
-
-- (void)focusKey {
- if (radioButtons.selectedRow <= 1)
- [keyInput.window makeFirstResponder:keyInput];
- else
- [keyInput resignIfFirstResponder];
-}
-
-- (void)mappingListDidChange:(NSNotification *)note {
- NSArray *mappings = note.userInfo[NJMappingListKey];
- NJMapping *current = mappingPopup.selectedItem.representedObject;
- [mappingPopup.menu removeAllItems];
- for (NJMapping *mapping in mappings) {
- NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:mapping.name
- action:@selector(mappingChosen:)
- keyEquivalent:@""];
- item.target = self;
- item.representedObject = mapping;
- [mappingPopup.menu addItem:item];
- }
- [mappingPopup selectItemWithIdenticalRepresentedObject:current];
-}
-
-- (void)mappingDidChange:(NSNotification *)note {
- [self loadInput:_input];
-}
-
-@end
--- /dev/null
+//
+// NJOutputController.h
+// Enjoy
+//
+// Created by Sam McCall on 5/05/09.
+// Copyright 2009 University of Otago. All rights reserved.
+//
+
+#import "NJKeyInputField.h"
+
+@class NJInputController;
+@class NJOutput;
+@class NJInput;
+
+@interface NJOutputViewController : NSObject <NJKeyInputFieldDelegate> {
+ IBOutlet NJKeyInputField *keyInput;
+ IBOutlet NSMatrix *radioButtons;
+ IBOutlet NSSegmentedControl *mouseDirSelect;
+ IBOutlet NSSlider *mouseSpeedSlider;
+ IBOutlet NSSegmentedControl *mouseBtnSelect;
+ IBOutlet NSSegmentedControl *scrollDirSelect;
+ IBOutlet NSSlider *scrollSpeedSlider;
+ IBOutlet NSTextField *title;
+ IBOutlet NSPopUpButton *mappingPopup;
+ IBOutlet NJInputController *inputController;
+ IBOutlet NSButton *smoothCheck;
+ IBOutlet NSButton *unknownMapping;
+}
+
+@property (assign) BOOL enabled;
+
+- (void)loadInput:(NJInput *)input;
+- (IBAction)radioChanged:(id)sender;
+- (IBAction)mdirChanged:(id)sender;
+- (IBAction)mbtnChanged:(id)sender;
+- (IBAction)sdirChanged:(id)sender;
+- (IBAction)mouseSpeedChanged:(id)sender;
+- (IBAction)scrollSpeedChanged:(id)sender;
+- (IBAction)scrollTypeChanged:(id)sender;
+
+- (void)focusKey;
+
+@end
--- /dev/null
+//
+// NJOutputController.m
+// Enjoy
+//
+// Created by Sam McCall on 5/05/09.
+//
+
+#import "NJOutputViewController.h"
+
+#import "NJMapping.h"
+#import "NJInput.h"
+#import "NJEvents.h"
+#import "NJInputController.h"
+#import "NJKeyInputField.h"
+#import "NJOutputMapping.h"
+#import "NJOutputViewController.h"
+#import "NJOutputKeyPress.h"
+#import "NJOutputMouseButton.h"
+#import "NJOutputMouseMove.h"
+#import "NJOutputMouseScroll.h"
+
+@implementation NJOutputViewController {
+ NJInput *_input;
+}
+
+- (id)init {
+ if ((self = [super init])) {
+ [NSNotificationCenter.defaultCenter
+ addObserver:self
+ selector:@selector(mappingListDidChange:)
+ name:NJEventMappingListChanged
+ object:nil];
+ [NSNotificationCenter.defaultCenter
+ addObserver:self
+ selector:@selector(mappingDidChange:)
+ name:NJEventMappingChanged
+ object:nil];
+ }
+ return self;
+}
+
+- (void)dealloc {
+ [NSNotificationCenter.defaultCenter removeObserver:self];
+}
+
+- (void)cleanUpInterface {
+ NSInteger row = radioButtons.selectedRow;
+
+ if (row != 1) {
+ keyInput.keyCode = NJKeyInputFieldEmpty;
+ [keyInput resignIfFirstResponder];
+ }
+
+ if (row != 2) {
+ [mappingPopup selectItemAtIndex:-1];
+ [mappingPopup resignIfFirstResponder];
+ unknownMapping.hidden = YES;
+ }
+
+ if (row != 3) {
+ mouseDirSelect.selectedSegment = -1;
+ mouseSpeedSlider.floatValue = mouseSpeedSlider.minValue;
+ [mouseDirSelect resignIfFirstResponder];
+ } else {
+ if (mouseDirSelect.selectedSegment == -1)
+ mouseDirSelect.selectedSegment = 0;
+ if (!mouseSpeedSlider.floatValue)
+ mouseSpeedSlider.floatValue = 10;
+ }
+
+ if (row != 4) {
+ mouseBtnSelect.selectedSegment = -1;
+ [mouseBtnSelect resignIfFirstResponder];
+ } else if (mouseBtnSelect.selectedSegment == -1)
+ mouseBtnSelect.selectedSegment = 0;
+
+ if (row != 5) {
+ scrollDirSelect.selectedSegment = -1;
+ scrollSpeedSlider.floatValue = scrollSpeedSlider.minValue;
+ smoothCheck.state = NSOffState;
+ [scrollDirSelect resignIfFirstResponder];
+ [scrollSpeedSlider resignIfFirstResponder];
+ [smoothCheck resignIfFirstResponder];
+ } else {
+ if (scrollDirSelect.selectedSegment == -1)
+ scrollDirSelect.selectedSegment = 0;
+ }
+
+}
+
+- (IBAction)radioChanged:(NSView *)sender {
+ [sender.window makeFirstResponder:sender];
+ if (radioButtons.selectedRow == 1)
+ [keyInput.window makeFirstResponder:keyInput];
+ [self commit];
+}
+
+- (void)keyInputField:(NJKeyInputField *)keyInput didChangeKey:(CGKeyCode)keyCode {
+ [radioButtons selectCellAtRow:1 column:0];
+ [radioButtons.window makeFirstResponder:radioButtons];
+ [self commit];
+}
+
+- (void)keyInputFieldDidClear:(NJKeyInputField *)keyInput {
+ [radioButtons selectCellAtRow:0 column:0];
+ [self commit];
+}
+
+- (void)mappingChosen:(id)sender {
+ [radioButtons selectCellAtRow:2 column:0];
+ [mappingPopup.window makeFirstResponder:mappingPopup];
+ unknownMapping.hidden = YES;
+ [self commit];
+}
+
+- (void)mdirChanged:(NSView *)sender {
+ [radioButtons selectCellAtRow:3 column:0];
+ [sender.window makeFirstResponder:sender];
+ [self commit];
+}
+
+- (void)mouseSpeedChanged:(NSSlider *)sender {
+ [radioButtons selectCellAtRow:3 column:0];
+ [sender.window makeFirstResponder:sender];
+ [self commit];
+}
+
+- (void)mbtnChanged:(NSView *)sender {
+ [radioButtons selectCellAtRow:4 column:0];
+ [sender.window makeFirstResponder:sender];
+ [self commit];
+}
+
+- (void)sdirChanged:(NSView *)sender {
+ [radioButtons selectCellAtRow:5 column:0];
+ [sender.window makeFirstResponder:sender];
+ [self commit];
+}
+
+- (void)scrollSpeedChanged:(NSSlider *)sender {
+ [radioButtons selectCellAtRow:5 column:0];
+ [sender.window makeFirstResponder:sender];
+ [self commit];
+}
+
+- (IBAction)scrollTypeChanged:(NSButton *)sender {
+ [radioButtons selectCellAtRow:5 column:0];
+ [sender.window makeFirstResponder:sender];
+ if (sender.state == NSOnState) {
+ scrollSpeedSlider.floatValue =
+ scrollSpeedSlider.minValue + (scrollSpeedSlider.maxValue - scrollSpeedSlider.minValue) / 2;
+ scrollSpeedSlider.enabled = YES;
+ } else {
+ scrollSpeedSlider.floatValue = scrollSpeedSlider.minValue;
+ scrollSpeedSlider.enabled = NO;
+ }
+ [self commit];
+}
+
+- (NJOutput *)currentOutput {
+ return inputController.currentMapping[_input];
+}
+
+- (NJOutput *)makeOutput {
+ switch (radioButtons.selectedRow) {
+ case 0:
+ return nil;
+ case 1:
+ if (keyInput.hasKeyCode) {
+ NJOutputKeyPress *k = [[NJOutputKeyPress alloc] init];
+ k.keyCode = keyInput.keyCode;
+ return k;
+ } else {
+ return nil;
+ }
+ break;
+ case 2: {
+ NJOutputMapping *c = [[NJOutputMapping alloc] init];
+ c.mapping = inputController.mappings[mappingPopup.indexOfSelectedItem];
+ return c;
+ }
+ case 3: {
+ NJOutputMouseMove *mm = [[NJOutputMouseMove alloc] init];
+ mm.axis = mouseDirSelect.selectedSegment;
+ mm.speed = mouseSpeedSlider.floatValue;
+ return mm;
+ }
+ case 4: {
+ NJOutputMouseButton *mb = [[NJOutputMouseButton alloc] init];
+ mb.button = [mouseBtnSelect.cell tagForSegment:mouseBtnSelect.selectedSegment];
+ return mb;
+ }
+ case 5: {
+ NJOutputMouseScroll *ms = [[NJOutputMouseScroll alloc] init];
+ ms.direction = [scrollDirSelect.cell tagForSegment:scrollDirSelect.selectedSegment];
+ ms.speed = scrollSpeedSlider.floatValue;
+ ms.smooth = smoothCheck.state == NSOnState;
+ return ms;
+ }
+ default:
+ return nil;
+ }
+}
+
+- (void)commit {
+ [self cleanUpInterface];
+ inputController.currentMapping[_input] = [self makeOutput];
+ [inputController save];
+}
+
+- (BOOL)enabled {
+ return radioButtons.isEnabled;
+}
+
+- (void)setEnabled:(BOOL)enabled {
+ radioButtons.enabled = enabled;
+ keyInput.enabled = enabled;
+ mappingPopup.enabled = enabled;
+ mouseDirSelect.enabled = enabled;
+ mouseSpeedSlider.enabled = enabled;
+ mouseBtnSelect.enabled = enabled;
+ scrollDirSelect.enabled = enabled;
+ smoothCheck.enabled = enabled;
+ scrollSpeedSlider.enabled = enabled && smoothCheck.state;
+ if (!enabled)
+ unknownMapping.hidden = YES;
+}
+
+- (void)loadOutput:(NJOutput *)output forInput:(NJInput *)input {
+ if (!input) {
+ self.enabled = NO;
+ title.stringValue = @"";
+ } else {
+ self.enabled = YES;
+ NSString *inpFullName = input.name;
+ for (NJInputPathElement *cur = input.parent; cur; cur = cur.parent) {
+ inpFullName = [[NSString alloc] initWithFormat:@"%@ ▸ %@", cur.name, inpFullName];
+ }
+ title.stringValue = inpFullName;
+ }
+
+ if ([output isKindOfClass:NJOutputKeyPress.class]) {
+ [radioButtons selectCellAtRow:1 column:0];
+ keyInput.keyCode = [(NJOutputKeyPress*)output keyCode];
+ } else if ([output isKindOfClass:NJOutputMapping.class]) {
+ [radioButtons selectCellAtRow:2 column:0];
+ NSMenuItem *item = [mappingPopup itemWithIdenticalRepresentedObject:[(NJOutputMapping *)output mapping]];
+ [mappingPopup selectItem:item];
+ unknownMapping.hidden = !!item;
+ unknownMapping.title = [(NJOutputMapping *)output mappingName];
+ }
+ else if ([output isKindOfClass:NJOutputMouseMove.class]) {
+ [radioButtons selectCellAtRow:3 column:0];
+ mouseDirSelect.selectedSegment = [(NJOutputMouseMove *)output axis];
+ mouseSpeedSlider.floatValue = [(NJOutputMouseMove *)output speed];
+ }
+ else if ([output isKindOfClass:NJOutputMouseButton.class]) {
+ [radioButtons selectCellAtRow:4 column:0];
+ [mouseBtnSelect selectSegmentWithTag:[(NJOutputMouseButton *)output button]];
+ }
+ else if ([output isKindOfClass:NJOutputMouseScroll.class]) {
+ [radioButtons selectCellAtRow:5 column:0];
+ int direction = [(NJOutputMouseScroll *)output direction];
+ float speed = [(NJOutputMouseScroll *)output speed];
+ BOOL smooth = [(NJOutputMouseScroll *)output smooth];
+ [scrollDirSelect selectSegmentWithTag:direction];
+ scrollSpeedSlider.floatValue = speed;
+ smoothCheck.state = smooth ? NSOnState : NSOffState;
+ scrollSpeedSlider.enabled = smooth;
+ } else {
+ [radioButtons selectCellAtRow:self.enabled ? 0 : -1 column:0];
+ }
+ [self cleanUpInterface];
+}
+
+- (void)loadInput:(NJInput *)input {
+ _input = input;
+ [self loadOutput:self.currentOutput forInput:input];
+}
+
+- (void)focusKey {
+ if (radioButtons.selectedRow <= 1)
+ [keyInput.window makeFirstResponder:keyInput];
+ else
+ [keyInput resignIfFirstResponder];
+}
+
+- (void)mappingListDidChange:(NSNotification *)note {
+ NSArray *mappings = note.userInfo[NJMappingListKey];
+ NJMapping *current = mappingPopup.selectedItem.representedObject;
+ [mappingPopup.menu removeAllItems];
+ for (NJMapping *mapping in mappings) {
+ NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:mapping.name
+ action:@selector(mappingChosen:)
+ keyEquivalent:@""];
+ item.target = self;
+ item.representedObject = mapping;
+ [mappingPopup.menu addItem:item];
+ }
+ [mappingPopup selectItemWithIdenticalRepresentedObject:current];
+}
+
+- (void)mappingDidChange:(NSNotification *)note {
+ [self loadInput:_input];
+}
+
+@end
EEF17D6316E8E2EF00D7DC4D /* NJKeyInputField.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF17D4916E8E2EF00D7DC4D /* NJKeyInputField.m */; };
EEF17D6416E8E2EF00D7DC4D /* NJMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF17D4B16E8E2EF00D7DC4D /* NJMapping.m */; };
EEF17D6616E8E2EF00D7DC4D /* NJOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF17D4F16E8E2EF00D7DC4D /* NJOutput.m */; };
- EEF17D6716E8E2EF00D7DC4D /* NJOutputController.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF17D5116E8E2EF00D7DC4D /* NJOutputController.m */; };
+ EEF17D6716E8E2EF00D7DC4D /* NJOutputViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF17D5116E8E2EF00D7DC4D /* NJOutputViewController.m */; };
EEF17D6816E8E2EF00D7DC4D /* NJOutputKeyPress.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF17D5316E8E2EF00D7DC4D /* NJOutputKeyPress.m */; };
EEF17D6916E8E2EF00D7DC4D /* NJOutputMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF17D5516E8E2EF00D7DC4D /* NJOutputMapping.m */; };
EEF17D6A16E8E2EF00D7DC4D /* NJOutputMouseButton.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF17D5716E8E2EF00D7DC4D /* NJOutputMouseButton.m */; };
EEF17D4B16E8E2EF00D7DC4D /* NJMapping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NJMapping.m; path = Classes/NJMapping.m; sourceTree = "<group>"; };
EEF17D4E16E8E2EF00D7DC4D /* NJOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NJOutput.h; path = Classes/NJOutput.h; sourceTree = "<group>"; };
EEF17D4F16E8E2EF00D7DC4D /* NJOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NJOutput.m; path = Classes/NJOutput.m; sourceTree = "<group>"; };
- EEF17D5016E8E2EF00D7DC4D /* NJOutputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NJOutputController.h; path = Classes/NJOutputController.h; sourceTree = "<group>"; };
- EEF17D5116E8E2EF00D7DC4D /* NJOutputController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NJOutputController.m; path = Classes/NJOutputController.m; sourceTree = "<group>"; };
+ EEF17D5016E8E2EF00D7DC4D /* NJOutputViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NJOutputViewController.h; path = Classes/NJOutputViewController.h; sourceTree = "<group>"; };
+ EEF17D5116E8E2EF00D7DC4D /* NJOutputViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NJOutputViewController.m; path = Classes/NJOutputViewController.m; sourceTree = "<group>"; };
EEF17D5216E8E2EF00D7DC4D /* NJOutputKeyPress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NJOutputKeyPress.h; path = Classes/NJOutputKeyPress.h; sourceTree = "<group>"; };
EEF17D5316E8E2EF00D7DC4D /* NJOutputKeyPress.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NJOutputKeyPress.m; path = Classes/NJOutputKeyPress.m; sourceTree = "<group>"; };
EEF17D5416E8E2EF00D7DC4D /* NJOutputMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NJOutputMapping.h; path = Classes/NJOutputMapping.h; sourceTree = "<group>"; };
children = (
EEF17D3916E8E2EF00D7DC4D /* EnjoyableApplicationDelegate.h */,
EEF17D3A16E8E2EF00D7DC4D /* EnjoyableApplicationDelegate.m */,
- EEF17D3D16E8E2EF00D7DC4D /* NJInputController.h */,
- EEF17D3E16E8E2EF00D7DC4D /* NJInputController.m */,
- EEF17D5016E8E2EF00D7DC4D /* NJOutputController.h */,
- EEF17D5116E8E2EF00D7DC4D /* NJOutputController.m */,
- EEF17D4816E8E2EF00D7DC4D /* NJKeyInputField.h */,
- EEF17D4916E8E2EF00D7DC4D /* NJKeyInputField.m */,
- EEF17D4A16E8E2EF00D7DC4D /* NJMapping.h */,
- EEF17D4B16E8E2EF00D7DC4D /* NJMapping.m */,
- EEF17D4716E8E2EF00D7DC4D /* NJInputPathElement.h */,
- EEE703DD16F0B3F6002FDD69 /* NJInputPathElement.m */,
- EEF17D3B16E8E2EF00D7DC4D /* NJDevice.h */,
- EEF17D3C16E8E2EF00D7DC4D /* NJDevice.m */,
- EEF17D3F16E8E2EF00D7DC4D /* NJInput.h */,
- EEF17D4016E8E2EF00D7DC4D /* NJInput.m */,
- EEF17D4116E8E2EF00D7DC4D /* NJInputAnalog.h */,
- EEF17D4216E8E2EF00D7DC4D /* NJInputAnalog.m */,
- EEF17D4316E8E2EF00D7DC4D /* NJInputButton.h */,
- EEF17D4416E8E2EF00D7DC4D /* NJInputButton.m */,
- EEF17D4516E8E2EF00D7DC4D /* NJInputHat.h */,
- EEF17D4616E8E2EF00D7DC4D /* NJInputHat.m */,
- EEF17D4E16E8E2EF00D7DC4D /* NJOutput.h */,
- EEF17D4F16E8E2EF00D7DC4D /* NJOutput.m */,
- EEF17D5216E8E2EF00D7DC4D /* NJOutputKeyPress.h */,
- EEF17D5316E8E2EF00D7DC4D /* NJOutputKeyPress.m */,
- EEF17D5416E8E2EF00D7DC4D /* NJOutputMapping.h */,
- EEF17D5516E8E2EF00D7DC4D /* NJOutputMapping.m */,
- EEF17D5616E8E2EF00D7DC4D /* NJOutputMouseButton.h */,
- EEF17D5716E8E2EF00D7DC4D /* NJOutputMouseButton.m */,
- EEF17D5816E8E2EF00D7DC4D /* NJOutputMouseMove.h */,
- EEF17D5916E8E2EF00D7DC4D /* NJOutputMouseMove.m */,
- EEF17D5A16E8E2EF00D7DC4D /* NJOutputMouseScroll.h */,
- EEF17D5B16E8E2EF00D7DC4D /* NJOutputMouseScroll.m */,
- EED4CE6C16ED692400C65AA8 /* NJMappingMenuController.h */,
- EED4CE6D16ED692400C65AA8 /* NJMappingMenuController.m */,
- EEE703DA16F089FE002FDD69 /* NJHIDManager.h */,
- EEE703DB16F089FE002FDD69 /* NJHIDManager.m */,
- EE52145D16F404D500E3C574 /* NJDeviceViewController.h */,
- EE52145E16F404D500E3C574 /* NJDeviceViewController.m */,
- EE83ACEA16F545EA00083E94 /* NJMappingsViewController.h */,
- EE83ACEB16F545EA00083E94 /* NJMappingsViewController.m */,
+ EEDB86A216FA4C42000E91C3 /* Input */,
+ EEDB86A316FA4C5C000E91C3 /* Output */,
+ EEDB86A516FA4CE4000E91C3 /* Views */,
+ EEDB86A416FA4CD1000E91C3 /* View Controllers */,
);
name = Classes;
sourceTree = "<group>";
name = Categories;
sourceTree = "<group>";
};
+ EEDB86A216FA4C42000E91C3 /* Input */ = {
+ isa = PBXGroup;
+ children = (
+ EEE703DA16F089FE002FDD69 /* NJHIDManager.h */,
+ EEE703DB16F089FE002FDD69 /* NJHIDManager.m */,
+ EEF17D3D16E8E2EF00D7DC4D /* NJInputController.h */,
+ EEF17D3E16E8E2EF00D7DC4D /* NJInputController.m */,
+ EEF17D4716E8E2EF00D7DC4D /* NJInputPathElement.h */,
+ EEE703DD16F0B3F6002FDD69 /* NJInputPathElement.m */,
+ EEF17D4A16E8E2EF00D7DC4D /* NJMapping.h */,
+ EEF17D4B16E8E2EF00D7DC4D /* NJMapping.m */,
+ EEF17D3B16E8E2EF00D7DC4D /* NJDevice.h */,
+ EEF17D3C16E8E2EF00D7DC4D /* NJDevice.m */,
+ EEF17D3F16E8E2EF00D7DC4D /* NJInput.h */,
+ EEF17D4016E8E2EF00D7DC4D /* NJInput.m */,
+ EEF17D4116E8E2EF00D7DC4D /* NJInputAnalog.h */,
+ EEF17D4216E8E2EF00D7DC4D /* NJInputAnalog.m */,
+ EEF17D4316E8E2EF00D7DC4D /* NJInputButton.h */,
+ EEF17D4416E8E2EF00D7DC4D /* NJInputButton.m */,
+ EEF17D4516E8E2EF00D7DC4D /* NJInputHat.h */,
+ EEF17D4616E8E2EF00D7DC4D /* NJInputHat.m */,
+ );
+ name = Input;
+ sourceTree = "<group>";
+ };
+ EEDB86A316FA4C5C000E91C3 /* Output */ = {
+ isa = PBXGroup;
+ children = (
+ EEF17D4E16E8E2EF00D7DC4D /* NJOutput.h */,
+ EEF17D4F16E8E2EF00D7DC4D /* NJOutput.m */,
+ EEF17D5216E8E2EF00D7DC4D /* NJOutputKeyPress.h */,
+ EEF17D5316E8E2EF00D7DC4D /* NJOutputKeyPress.m */,
+ EEF17D5416E8E2EF00D7DC4D /* NJOutputMapping.h */,
+ EEF17D5516E8E2EF00D7DC4D /* NJOutputMapping.m */,
+ EEF17D5616E8E2EF00D7DC4D /* NJOutputMouseButton.h */,
+ EEF17D5716E8E2EF00D7DC4D /* NJOutputMouseButton.m */,
+ EEF17D5816E8E2EF00D7DC4D /* NJOutputMouseMove.h */,
+ EEF17D5916E8E2EF00D7DC4D /* NJOutputMouseMove.m */,
+ EEF17D5A16E8E2EF00D7DC4D /* NJOutputMouseScroll.h */,
+ EEF17D5B16E8E2EF00D7DC4D /* NJOutputMouseScroll.m */,
+ );
+ name = Output;
+ sourceTree = "<group>";
+ };
+ EEDB86A416FA4CD1000E91C3 /* View Controllers */ = {
+ isa = PBXGroup;
+ children = (
+ EEF17D5016E8E2EF00D7DC4D /* NJOutputViewController.h */,
+ EEF17D5116E8E2EF00D7DC4D /* NJOutputViewController.m */,
+ EED4CE6C16ED692400C65AA8 /* NJMappingMenuController.h */,
+ EED4CE6D16ED692400C65AA8 /* NJMappingMenuController.m */,
+ EE52145D16F404D500E3C574 /* NJDeviceViewController.h */,
+ EE52145E16F404D500E3C574 /* NJDeviceViewController.m */,
+ EE83ACEA16F545EA00083E94 /* NJMappingsViewController.h */,
+ EE83ACEB16F545EA00083E94 /* NJMappingsViewController.m */,
+ );
+ name = "View Controllers";
+ sourceTree = "<group>";
+ };
+ EEDB86A516FA4CE4000E91C3 /* Views */ = {
+ isa = PBXGroup;
+ children = (
+ EEF17D4816E8E2EF00D7DC4D /* NJKeyInputField.h */,
+ EEF17D4916E8E2EF00D7DC4D /* NJKeyInputField.m */,
+ );
+ name = Views;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
EEF17D6316E8E2EF00D7DC4D /* NJKeyInputField.m in Sources */,
EEF17D6416E8E2EF00D7DC4D /* NJMapping.m in Sources */,
EEF17D6616E8E2EF00D7DC4D /* NJOutput.m in Sources */,
- EEF17D6716E8E2EF00D7DC4D /* NJOutputController.m in Sources */,
+ EEF17D6716E8E2EF00D7DC4D /* NJOutputViewController.m in Sources */,
EEF17D6816E8E2EF00D7DC4D /* NJOutputKeyPress.m in Sources */,
EEF17D6916E8E2EF00D7DC4D /* NJOutputMapping.m in Sources */,
EEF17D6A16E8E2EF00D7DC4D /* NJOutputMouseButton.m in Sources */,
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>559</string>
+ <string>565</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>NSHumanReadableCopyright</key>
<string key="NSToolbarItemPaletteLabel">Enabled</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSButton" key="NSToolbarItemView" id="385218002">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{7, 14}, {36, 25}}</string>
- <reference key="NSSuperview"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="422366518">
<string key="NSToolbarItemPaletteLabel">Mapping Selector</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSButton" key="NSToolbarItemView" id="227597319">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{0, 14}, {140, 25}}</string>
- <reference key="NSSuperview"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="850080795">
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMinSize">{664, 323}</string>
<object class="NSView" key="NSWindowView" id="177223957">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSCustomView" id="734312853">
<int key="NSvFlags">-2147483374</int>
<string key="NSFrame">{{20, 20}, {194, 283}}</string>
<reference key="NSSuperview" ref="734312853"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="471332453"/>
<string key="NSReuseIdentifierKey">_NS:22</string>
<bool key="NSEnabled">YES</bool>
<int key="NSvFlags">274</int>
<string key="NSFrame">{{20, 20}, {194, 283}}</string>
<reference key="NSSuperview" ref="734312853"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="918286878"/>
<string key="NSReuseIdentifierKey">_NS:22</string>
<bool key="NSEnabled">YES</bool>
<array class="NSMutableArray" key="NSSubviews"/>
<string key="NSFrameSize">{232, 321}</string>
<reference key="NSSuperview" ref="698362889"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="892486973"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</array>
<string key="NSFrame">{{1, 1}, {232, 321}}</string>
<reference key="NSSuperview" ref="364857164"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="365506042"/>
<reference key="NSDocView" ref="365506042"/>
<reference key="NSBGColor" ref="834857663"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{1, 1}, {8, 298}}</string>
<reference key="NSSuperview" ref="364857164"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="12898323"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<reference key="NSTarget" ref="364857164"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {473, 15}}</string>
<reference key="NSSuperview" ref="364857164"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="698362889"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSsFlags">1</int>
</array>
<string key="NSFrameSize">{234, 323}</string>
<reference key="NSSuperview" ref="734312853"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="698362889"/>
<int key="NSsFlags">150034</int>
<reference key="NSVScroller" ref="1036252745"/>
</array>
<string key="NSFrameSize">{234, 323}</string>
<reference key="NSSuperview" ref="177223957"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="364857164"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSClassName">NSView</string>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{197, 157}, {193, 21}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="875916470"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<int key="NSvFlags">265</int>
<string key="NSFrame">{{189, 117}, {224, 20}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="385416822"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{343, 31}, {70, 18}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="868379451">
<int key="NSvFlags">265</int>
<string key="NSFrame">{{189, 33}, {150, 20}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="792189805"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<int key="NSvFlags">265</int>
<string key="NSFrame">{{191, 24}, {146, 16}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="20704797"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<int key="NSvFlags">265</int>
<string key="NSFrame">{{189, 70}, {224, 24}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="921829691"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<int key="NSvFlags">265</int>
<string key="NSFrame">{{191, 108}, {220, 16}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="125828224"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<int key="NSvFlags">265</int>
<string key="NSFrame">{{191, 196}, {220, 23}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="194275224"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSClassName">NJKeyInputField</string>
<int key="NSvFlags">265</int>
<string key="NSFrame">{{188, 153}, {226, 26}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="529992855"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="74311158">
<int key="NSvFlags">268</int>
<string key="NSFrame">{{24, 20}, {163, 250}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="57697638"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSNumRows">6</int>
<int key="NSvFlags">266</int>
<string key="NSFrame">{{9, 286}, {412, 17}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="497528019"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="853503577">
<int key="NSvFlags">10</int>
<string key="NSFrame">{{12, 276}, {406, 5}}</string>
<reference key="NSSuperview" ref="471332453"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="120408205"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
</array>
<string key="NSFrame">{{233, 0}, {431, 323}}</string>
<reference key="NSSuperview" ref="177223957"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1016088174"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSClassName">NSView</string>
</object>
</array>
<string key="NSFrameSize">{664, 323}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="734312853"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSClassName">NJInputController</string>
</object>
<object class="NSCustomObject" id="801536542">
- <string key="NSClassName">NJOutputController</string>
+ <string key="NSClassName">NJOutputViewController</string>
</object>
<object class="NSCustomObject" id="647344717">
<string key="NSClassName">NJDeviceViewController</string>
<bool key="NSAnimates">YES</bool>
</object>
<object class="NSCustomView" id="671181514">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSScrollView" id="443618264">
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{198, 198}</string>
<reference key="NSSuperview" ref="947403733"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="553414014"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</array>
<string key="NSFrame">{{1, 1}, {198, 198}}</string>
<reference key="NSSuperview" ref="443618264"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="762432499"/>
<reference key="NSDocView" ref="762432499"/>
<reference key="NSBGColor" ref="834857663"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{306, 1}, {15, 403}}</string>
<reference key="NSSuperview" ref="443618264"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="861276216"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<reference key="NSTarget" ref="443618264"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {366, 16}}</string>
<reference key="NSSuperview" ref="443618264"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="947403733"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSsFlags">1</int>
</array>
<string key="NSFrame">{{0, 20}, {200, 200}}</string>
<reference key="NSSuperview" ref="671181514"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="947403733"/>
<int key="NSsFlags">150034</int>
<reference key="NSVScroller" ref="968378655"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{66, -1}, {68, 23}}</string>
<reference key="NSSuperview" ref="671181514"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1023366520"/>
<string key="NSReuseIdentifierKey">_NS:22</string>
<bool key="NSEnabled">YES</bool>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{0, -1}, {34, 23}}</string>
<reference key="NSSuperview" ref="671181514"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="456935010"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="867532725">
<int key="NSvFlags">292</int>
<string key="NSFrame">{{166, -1}, {34, 23}}</string>
<reference key="NSSuperview" ref="671181514"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="828611353">
<int key="NSCellFlags">67108864</int>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{133, -1}, {34, 23}}</string>
<reference key="NSSuperview" ref="671181514"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1043784903"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="57592747">
<int key="NSvFlags">292</int>
<string key="NSFrame">{{33, -1}, {34, 23}}</string>
<reference key="NSSuperview" ref="671181514"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="149148392"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1008023024">
</object>
</array>
<string key="NSFrameSize">{200, 220}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="443618264"/>
<string key="NSClassName">NSView</string>
</object>