mirror of https://github.com/ksherlock/ample.git
replace machine browser with outline view
This commit is contained in:
parent
b8697d326c
commit
69f56830ca
|
@ -125,7 +125,6 @@
|
|||
B64AF1F7250ED5E400A09B9B /* TableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = B64AF1F5250ED5E400A09B9B /* TableCellView.m */; };
|
||||
B64AF1FA250EF6A500A09B9B /* Transformers.m in Sources */ = {isa = PBXBuildFile; fileRef = B64AF1F9250EF6A500A09B9B /* Transformers.m */; };
|
||||
B64AF1FB250EF6A500A09B9B /* Transformers.m in Sources */ = {isa = PBXBuildFile; fileRef = B64AF1F9250EF6A500A09B9B /* Transformers.m */; };
|
||||
B64E15A924EA1D5300E8AD3D /* MachineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B64E15A824EA1D5300E8AD3D /* MachineViewController.m */; };
|
||||
B65085B925B616AC00354EC9 /* maclc2.plist in Resources */ = {isa = PBXBuildFile; fileRef = B65085B625B616AC00354EC9 /* maclc2.plist */; };
|
||||
B65085BA25B616AC00354EC9 /* maclc2.plist in Resources */ = {isa = PBXBuildFile; fileRef = B65085B625B616AC00354EC9 /* maclc2.plist */; };
|
||||
B65085BB25B616AC00354EC9 /* maclc3.plist in Resources */ = {isa = PBXBuildFile; fileRef = B65085B725B616AC00354EC9 /* maclc3.plist */; };
|
||||
|
@ -202,7 +201,6 @@
|
|||
B6E08076252574690075F4E1 /* vmnet_helper in CopyFiles */ = {isa = PBXBuildFile; fileRef = B6841BD0251EC913006A5C39 /* vmnet_helper */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
B6E4B5B024FDE2670094A35C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B6BA258724E99BEB005FB8FF /* main.m */; };
|
||||
B6E4B5B124FDE2670094A35C /* LaunchWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6D6DE4024FADFAC00661A5F /* LaunchWindowController.m */; };
|
||||
B6E4B5B224FDE2670094A35C /* MachineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B64E15A824EA1D5300E8AD3D /* MachineViewController.m */; };
|
||||
B6E4B5B324FDE2670094A35C /* MediaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B64979C124EF6703008ABD20 /* MediaViewController.m */; };
|
||||
B6E4B5B424FDE2670094A35C /* FlippedView.m in Sources */ = {isa = PBXBuildFile; fileRef = B60A6E1324EE0AE2004B7EEF /* FlippedView.m */; };
|
||||
B6E4B5B524FDE2670094A35C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B6BA257F24E99BE9005FB8FF /* AppDelegate.m */; };
|
||||
|
@ -263,6 +261,10 @@
|
|||
B6E4B5F224FDE2670094A35C /* prav8m.plist in Resources */ = {isa = PBXBuildFile; fileRef = B6109A0024F5F371005CB652 /* prav8m.plist */; };
|
||||
B6E9A18025088B1B005E7525 /* SlotViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E9A17F25088B1B005E7525 /* SlotViewController.m */; };
|
||||
B6E9A18325088B36005E7525 /* SlotView.xib in Resources */ = {isa = PBXBuildFile; fileRef = B6E9A18125088B36005E7525 /* SlotView.xib */; };
|
||||
B6F7B538266FDA5B00624C6B /* MachineView.xib in Resources */ = {isa = PBXBuildFile; fileRef = B6F7B536266FDA5B00624C6B /* MachineView.xib */; };
|
||||
B6F7B539266FDA5B00624C6B /* MachineView.xib in Resources */ = {isa = PBXBuildFile; fileRef = B6F7B536266FDA5B00624C6B /* MachineView.xib */; };
|
||||
B6F7B53C267017A200624C6B /* NewMachineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F7B53B267017A200624C6B /* NewMachineViewController.m */; };
|
||||
B6F7B53D267017A200624C6B /* NewMachineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6F7B53B267017A200624C6B /* NewMachineViewController.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
|
@ -479,6 +481,9 @@
|
|||
B6E9A17E25088B1B005E7525 /* SlotViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SlotViewController.h; sourceTree = "<group>"; };
|
||||
B6E9A17F25088B1B005E7525 /* SlotViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SlotViewController.m; sourceTree = "<group>"; };
|
||||
B6E9A18225088B36005E7525 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/SlotView.xib; sourceTree = "<group>"; };
|
||||
B6F7B537266FDA5B00624C6B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MachineView.xib; sourceTree = "<group>"; };
|
||||
B6F7B53A267017A200624C6B /* NewMachineViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NewMachineViewController.h; sourceTree = "<group>"; };
|
||||
B6F7B53B267017A200624C6B /* NewMachineViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NewMachineViewController.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -696,6 +701,8 @@
|
|||
B66D0FE926113AA8000902F1 /* SoftwareList.h */,
|
||||
B63005312666D6940014C381 /* BookmarkManager.h */,
|
||||
B63005322666D6940014C381 /* BookmarkManager.m */,
|
||||
B6F7B53A267017A200624C6B /* NewMachineViewController.h */,
|
||||
B6F7B53B267017A200624C6B /* NewMachineViewController.m */,
|
||||
B6BA563A251685DA00B0C47D /* Window Controllers */,
|
||||
B6B9EA652506A5550080E70D /* EjectButton.h */,
|
||||
B6B9EA642506A5550080E70D /* EjectButton.m */,
|
||||
|
@ -737,6 +744,7 @@
|
|||
children = (
|
||||
B6665C1A265C639900254939 /* Autocomplete.xib */,
|
||||
B6E9A18125088B36005E7525 /* SlotView.xib */,
|
||||
B6F7B536266FDA5B00624C6B /* MachineView.xib */,
|
||||
B63C1B9325008A2700511A71 /* DownloadWindow.xib */,
|
||||
B66236BF24FDB7A6006CABD7 /* Credits.rtf */,
|
||||
B6D6DE3C24FADF8B00661A5F /* LaunchWindow.xib */,
|
||||
|
@ -934,6 +942,7 @@
|
|||
B6109A2524F5F377005CB652 /* laser2c.plist in Resources */,
|
||||
B6109A3D24F5F377005CB652 /* laser128.plist in Resources */,
|
||||
B6109A2824F5F377005CB652 /* apple2ep.plist in Resources */,
|
||||
B6F7B538266FDA5B00624C6B /* MachineView.xib in Resources */,
|
||||
B6109A1924F5F377005CB652 /* apple2ees.plist in Resources */,
|
||||
B6DE32482605482500418375 /* mac512ke.plist in Resources */,
|
||||
B6109A3924F5F377005CB652 /* prav8c.plist in Resources */,
|
||||
|
@ -1079,6 +1088,7 @@
|
|||
B6E4B5E224FDE2670094A35C /* apple2gsr1.plist in Resources */,
|
||||
B6E4B5E324FDE2670094A35C /* Defaults.plist in Resources */,
|
||||
B6E4B5E424FDE2670094A35C /* models.plist in Resources */,
|
||||
B6F7B539266FDA5B00624C6B /* MachineView.xib in Resources */,
|
||||
B63C1BA9250192E600511A71 /* zijini.plist in Resources */,
|
||||
B6E4B5E524FDE2670094A35C /* craft2p.plist in Resources */,
|
||||
B6E4B5E624FDE2670094A35C /* uniap2pt.plist in Resources */,
|
||||
|
@ -1155,7 +1165,6 @@
|
|||
B6152B5625F4549F00605E6E /* Slot.m in Sources */,
|
||||
B6D6DE4124FADFAC00661A5F /* LaunchWindowController.m in Sources */,
|
||||
B6665C14265A0E3E00254939 /* AutocompleteControl.m in Sources */,
|
||||
B64E15A924EA1D5300E8AD3D /* MachineViewController.m in Sources */,
|
||||
B64979C224EF6703008ABD20 /* MediaViewController.m in Sources */,
|
||||
B60A6E1424EE0AE2004B7EEF /* FlippedView.m in Sources */,
|
||||
B6BA258024E99BE9005FB8FF /* AppDelegate.m in Sources */,
|
||||
|
@ -1164,6 +1173,7 @@
|
|||
B66236A924FD9A34006CABD7 /* PreferencesWindowController.m in Sources */,
|
||||
B63C1F0F25B1447C0016A611 /* CheatSheetWindowController.m in Sources */,
|
||||
B64AF1F2250ECB2E00A09B9B /* DiskImagesWindowController.m in Sources */,
|
||||
B6F7B53C267017A200624C6B /* NewMachineViewController.m in Sources */,
|
||||
B64AF1F6250ED5E400A09B9B /* TableCellView.m in Sources */,
|
||||
B66D0FE72611386C000902F1 /* SoftwareList.m in Sources */,
|
||||
B63C1B9425008A2700511A71 /* DownloadWindowController.m in Sources */,
|
||||
|
@ -1186,7 +1196,6 @@
|
|||
B6152B5B25F5B57E00605E6E /* Media.m in Sources */,
|
||||
B6E4B5B124FDE2670094A35C /* LaunchWindowController.m in Sources */,
|
||||
B6152B5725F4549F00605E6E /* Slot.m in Sources */,
|
||||
B6E4B5B224FDE2670094A35C /* MachineViewController.m in Sources */,
|
||||
B6E4B5B324FDE2670094A35C /* MediaViewController.m in Sources */,
|
||||
B64AF1F7250ED5E400A09B9B /* TableCellView.m in Sources */,
|
||||
B6E4B5B424FDE2670094A35C /* FlippedView.m in Sources */,
|
||||
|
@ -1194,6 +1203,7 @@
|
|||
B615A9A026640A70001FBF99 /* SlotViewController.m in Sources */,
|
||||
B6665C15265A0E3E00254939 /* AutocompleteControl.m in Sources */,
|
||||
B6E4B5B524FDE2670094A35C /* AppDelegate.m in Sources */,
|
||||
B6F7B53D267017A200624C6B /* NewMachineViewController.m in Sources */,
|
||||
B66D0FE82611386C000902F1 /* SoftwareList.m in Sources */,
|
||||
B6E4B5B624FDE2670094A35C /* LogWindowController.m in Sources */,
|
||||
B6E4B5B724FDE2670094A35C /* PreferencesWindowController.m in Sources */,
|
||||
|
@ -1276,6 +1286,14 @@
|
|||
name = SlotView.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
B6F7B536266FDA5B00624C6B /* MachineView.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
B6F7B537266FDA5B00624C6B /* Base */,
|
||||
);
|
||||
name = MachineView.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<outlet property="addBookmarkWindow" destination="yIt-hP-HBq" id="Qhx-WV-cg4"/>
|
||||
<outlet property="bookmarkTextField" destination="fAl-Vn-x1w" id="GNr-j6-BiQ"/>
|
||||
<outlet property="machineView" destination="oVt-eD-aaj" id="Q9V-Kr-6GN"/>
|
||||
<outlet property="machineViewController" destination="RgH-d9-xl8" id="DIa-h0-6y2"/>
|
||||
<outlet property="machineViewController" destination="FSD-3v-Wni" id="tXv-zJ-QO3"/>
|
||||
<outlet property="mediaController" destination="t7c-zy-czN" id="a7d-HC-TWx"/>
|
||||
<outlet property="mediaView" destination="J9O-xI-P5J" id="PmZ-VC-4SN"/>
|
||||
<outlet property="slotController" destination="lyS-mc-3Tf" id="LXo-Ii-fDX"/>
|
||||
|
@ -24,19 +24,15 @@
|
|||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="Ample" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" frameAutosaveName="LaunchWindow" animationBehavior="default" id="Vze-YF-m6e">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
||||
<rect key="contentRect" x="335" y="390" width="718" height="795"/>
|
||||
<rect key="contentRect" x="335" y="390" width="1000" height="640"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
|
||||
<view key="contentView" id="Ssv-Jw-EE0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="718" height="795"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="1000" height="640"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="oVt-eD-aaj">
|
||||
<rect key="frame" x="0.0" y="615" width="718" height="180"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nKp-px-nHg">
|
||||
<rect key="frame" x="588.5" y="58" width="111" height="23"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="869.5" y="76" width="111" height="23"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="roundTextured" title="Launch" bezelStyle="texturedRounded" image="NSAppleMenuImage" imagePosition="left" alignment="center" borderStyle="border" inset="2" id="Ct1-Rb-7uI">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
|
@ -50,8 +46,8 @@ DQ
|
|||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nNO-3T-OAy">
|
||||
<rect key="frame" x="470.5" y="58" width="109" height="23"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="753.5" y="76" width="109" height="23"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="roundTextured" title="Reset Slots" bezelStyle="texturedRounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Uii-5h-2R2">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
|
@ -63,12 +59,12 @@ DQ
|
|||
</connections>
|
||||
</button>
|
||||
<customView id="P9d-sS-qEb" customClass="FlippedView">
|
||||
<rect key="frame" x="20" y="92" width="316" height="363"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<rect key="frame" x="302" y="105" width="316" height="363"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
<tabView initialItem="zUN-Qs-haG" id="l8R-bg-6Zm">
|
||||
<rect key="frame" x="13" y="453" width="692" height="160"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<rect key="frame" x="296" y="466" width="692" height="160"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<tabViewItems>
|
||||
<tabViewItem label="Video" identifier="" id="zUN-Qs-haG">
|
||||
|
@ -439,23 +435,23 @@ DQ
|
|||
</tabViewItems>
|
||||
</tabView>
|
||||
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="J9O-xI-P5J" customClass="FlippedView">
|
||||
<rect key="frame" x="382" y="92" width="316" height="331"/>
|
||||
<rect key="frame" x="664" y="107" width="316" height="331"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" horizontalScrollElasticity="none" id="2ue-XT-byh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="718" height="51"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="1001" height="69"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="eSY-AU-tvi">
|
||||
<rect key="frame" x="0.0" y="0.0" width="718" height="51"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="1001" height="69"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textView focusRingType="none" editable="NO" importsGraphics="NO" richText="NO" verticallyResizable="YES" allowsCharacterPickerTouchBarItem="NO" textCompletion="NO" id="c0R-8x-RL2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="718" height="51"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="1001" height="69"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<size key="minSize" width="718" height="51"/>
|
||||
<size key="maxSize" width="718" height="10000000"/>
|
||||
<size key="minSize" width="1001" height="69"/>
|
||||
<size key="maxSize" width="1001" height="10000000"/>
|
||||
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.commandLine" id="deQ-gK-fgu">
|
||||
|
@ -477,8 +473,8 @@ DQ
|
|||
</scroller>
|
||||
</scrollView>
|
||||
<searchField wantsLayer="YES" verticalHuggingPriority="750" textCompletion="NO" id="pNl-g4-ZLh" customClass="AutocompleteControl">
|
||||
<rect key="frame" x="382" y="431" width="316" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<rect key="frame" x="664" y="446" width="316" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
|
||||
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" placeholderString="Software List" usesSingleLineMode="YES" bezelStyle="round" id="sMi-a3-XEn">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
|
@ -488,13 +484,20 @@ DQ
|
|||
<action selector="softwareChanged:" target="-2" id="879-da-UEc"/>
|
||||
</connections>
|
||||
</searchField>
|
||||
<box verticalHuggingPriority="750" fixedFrame="YES" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="UwI-q9-hEm">
|
||||
<rect key="frame" x="0.0" y="67" width="1001" height="5"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
</box>
|
||||
<customView id="oVt-eD-aaj" customClass="FlippedView">
|
||||
<rect key="frame" x="20" y="77" width="274" height="543"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
</subviews>
|
||||
</view>
|
||||
<point key="canvasLocation" x="769" y="120.5"/>
|
||||
<point key="canvasLocation" x="628" y="34"/>
|
||||
</window>
|
||||
<viewController title="Media View" nibName="MediaView" id="t7c-zy-czN" customClass="MediaViewController"/>
|
||||
<viewController title="Slot View" nibName="SlotView" id="lyS-mc-3Tf" customClass="SlotViewController"/>
|
||||
<customObject id="RgH-d9-xl8" customClass="MachineViewController"/>
|
||||
<window title="Add Bookmark" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="yIt-hP-HBq">
|
||||
<windowStyleMask key="styleMask" titled="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
|
@ -567,6 +570,7 @@ Gw
|
|||
</view>
|
||||
<point key="canvasLocation" x="130" y="70"/>
|
||||
</window>
|
||||
<viewController nibName="MachineView" id="FSD-3v-Wni" customClass="NewMachineViewController"/>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="NSAppleMenuImage" width="11" height="14"/>
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15705" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15705"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NewMachineViewController">
|
||||
<connections>
|
||||
<outlet property="outlineView" destination="9V6-He-b8A" id="XeC-DJ-oXY"/>
|
||||
<outlet property="view" destination="t3T-qF-D0e" id="Svb-w7-hs9"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="26" horizontalPageScroll="10" verticalLineScroll="26" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" id="t3T-qF-D0e">
|
||||
<rect key="frame" x="0.0" y="0.0" width="274" height="543"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<clipView key="contentView" drawsBackground="NO" id="DyG-qq-uBF">
|
||||
<rect key="frame" x="0.0" y="0.0" width="274" height="543"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="sourceList" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" autosaveName="machine-view" rowHeight="24" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="16" autosaveExpandedItems="YES" outlineTableColumn="e67-js-boV" id="9V6-He-b8A">
|
||||
<rect key="frame" x="0.0" y="0.0" width="274" height="543"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.0" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
||||
<tableColumns>
|
||||
<tableColumn width="271" minWidth="16" maxWidth="1000" id="e67-js-boV">
|
||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
|
||||
</tableHeaderCell>
|
||||
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="jZU-xV-PI4">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
<prototypeCellViews>
|
||||
<tableCellView identifier="HeaderCell" id="2iF-4F-HfC">
|
||||
<rect key="frame" x="1" y="1" width="271" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9tU-X8-FZn">
|
||||
<rect key="frame" x="0.0" y="0.0" width="271" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="HEADER CELL" id="EUi-TS-vlq">
|
||||
<font key="font" metaFont="systemBold"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="2iF-4F-HfC" name="value" keyPath="objectValue.description" id="He3-9c-g9A"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<connections>
|
||||
<outlet property="textField" destination="9tU-X8-FZn" id="p2B-eV-6bS"/>
|
||||
</connections>
|
||||
</tableCellView>
|
||||
<tableCellView identifier="DataCell" id="7b4-T1-d29">
|
||||
<rect key="frame" x="1" y="20" width="271" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FkS-zP-pRB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="271" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="g6t-E7-0lM">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="7b4-T1-d29" name="value" keyPath="objectValue.description" id="kp8-ww-1aE"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<connections>
|
||||
<outlet property="textField" destination="FkS-zP-pRB" id="JkE-pr-7px"/>
|
||||
</connections>
|
||||
</tableCellView>
|
||||
</prototypeCellViews>
|
||||
</tableColumn>
|
||||
</tableColumns>
|
||||
<connections>
|
||||
<action selector="clickAction:" target="-2" id="O3p-cV-gwk"/>
|
||||
<outlet property="dataSource" destination="-2" id="nW2-qs-3w6"/>
|
||||
<outlet property="delegate" destination="-2" id="4Wc-Pe-v81"/>
|
||||
</connections>
|
||||
</outlineView>
|
||||
</subviews>
|
||||
<nil key="backgroundColor"/>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="kig-a5-Ay0">
|
||||
<rect key="frame" x="-100" y="-100" width="238" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="lLp-pv-Fbj" customClass="TransparentScroller">
|
||||
<rect key="frame" x="224" y="17" width="15" height="102"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<point key="canvasLocation" x="-91" y="132"/>
|
||||
</scrollView>
|
||||
</objects>
|
||||
</document>
|
|
@ -10,7 +10,7 @@
|
|||
#import "LaunchWindowController.h"
|
||||
#import "MediaViewController.h"
|
||||
#import "SlotViewController.h"
|
||||
#import "MachineViewController.h"
|
||||
#import "NewMachineViewController.h"
|
||||
#import "LogWindowController.h"
|
||||
|
||||
#import "AutocompleteControl.h"
|
||||
|
@ -29,7 +29,7 @@ static NSString *kContextMachine = @"kContextMachine";
|
|||
}
|
||||
@property (strong) IBOutlet MediaViewController *mediaController;
|
||||
@property (strong) IBOutlet SlotViewController *slotController;
|
||||
@property (strong) IBOutlet MachineViewController *machineViewController;
|
||||
@property (strong) IBOutlet NewMachineViewController *machineViewController;
|
||||
|
||||
@property (weak) IBOutlet NSView *machineView;
|
||||
@property (weak) IBOutlet NSView *slotView;
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// NewMachineViewController.h
|
||||
// Ample
|
||||
//
|
||||
// Created by Kelvin Sherlock on 6/8/2021.
|
||||
// Copyright © 2021 Kelvin Sherlock. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "Ample.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NewMachineViewController : NSViewController
|
||||
|
||||
@property (nullable) NSString *machine;
|
||||
|
||||
@end
|
||||
|
||||
@interface NewMachineViewController (Table) <NSOutlineViewDelegate, NSOutlineViewDataSource>
|
||||
|
||||
@end
|
||||
|
||||
@interface NewMachineViewController (Bookmark) <Bookmark>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,217 @@
|
|||
//
|
||||
// NewMachineViewController.m
|
||||
// Ample
|
||||
//
|
||||
// Created by Kelvin Sherlock on 6/8/2021.
|
||||
// Copyright © 2021 Kelvin Sherlock. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NewMachineViewController.h"
|
||||
|
||||
@interface NewMachineViewController () {
|
||||
|
||||
NSArray *_data;
|
||||
}
|
||||
|
||||
@property (weak) IBOutlet NSOutlineView *outlineView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation NewMachineViewController
|
||||
|
||||
-(void)awakeFromNib {
|
||||
|
||||
static unsigned first = 0;
|
||||
|
||||
if (first) return;
|
||||
first++;
|
||||
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSString *path = [bundle pathForResource: @"models" ofType: @"plist"];
|
||||
_data = [NSArray arrayWithContentsOfFile: path];
|
||||
|
||||
}
|
||||
|
||||
-(void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
//[_outlineView reloadData];
|
||||
//[_outlineView setAutosaveExpandedItems: YES];
|
||||
//[_outlineView expandItem: nil expandChildren: YES];
|
||||
}
|
||||
|
||||
#pragma mark - IBActions
|
||||
- (IBAction)clickAction:(id)sender {
|
||||
|
||||
NSInteger row = [_outlineView selectedRow];
|
||||
if (row < 0) return;
|
||||
NSDictionary *d = [_outlineView itemAtRow: row];
|
||||
if (!d) return;
|
||||
NSString *value = [d objectForKey: @"value"];
|
||||
if (!d) return;
|
||||
[self setMachine: value];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation NewMachineViewController (Table)
|
||||
|
||||
#if 0
|
||||
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldExpandItem:(id)item {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldCollapseItem:(id)item {
|
||||
return NO;
|
||||
}
|
||||
#endif
|
||||
|
||||
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldShowOutlineCellForItem:(id)item {
|
||||
// disclosure triangle.
|
||||
if (!item) return YES;
|
||||
NSArray *children = [(NSDictionary *)item objectForKey: @"children"];
|
||||
return [children count] > 0;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item {
|
||||
if (!item) return YES;
|
||||
NSArray *children = [(NSDictionary *)item objectForKey: @"children"];
|
||||
return [children count] > 0;
|
||||
}
|
||||
|
||||
- (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item {
|
||||
|
||||
#if 0
|
||||
NSArray *children = [(NSDictionary *)item objectForKey: @"children"];
|
||||
return [children count] > 0;
|
||||
#else
|
||||
return NO;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
- (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item {
|
||||
|
||||
#if 0
|
||||
NSArray *children = [(NSDictionary *)item objectForKey: @"children"];
|
||||
if ([children count]) {
|
||||
return [outlineView makeViewWithIdentifier: @"HeaderCell" owner: self];
|
||||
}
|
||||
#endif
|
||||
NSTableCellView *v = [outlineView makeViewWithIdentifier: @"DataCell" owner: self];
|
||||
//[v setObjectValue: item];
|
||||
return v;
|
||||
}
|
||||
|
||||
- (NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item {
|
||||
if (!item) return [_data count];
|
||||
NSArray *children = [(NSDictionary *)item objectForKey: @"children"];
|
||||
return [children count];
|
||||
}
|
||||
|
||||
- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item {
|
||||
|
||||
if (item == nil) {
|
||||
return [_data objectAtIndex: index];
|
||||
}
|
||||
NSArray *children = [(NSDictionary *)item objectForKey: @"children"];
|
||||
return [children objectAtIndex: index];
|
||||
}
|
||||
|
||||
- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item {
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item {
|
||||
if (!item) return NO;
|
||||
return [(NSDictionary *)item objectForKey: @"value"] != nil;
|
||||
}
|
||||
|
||||
|
||||
// saving/restoring expanded items
|
||||
- (id)outlineView:(NSOutlineView *)outlineView persistentObjectForItem:(id)item {
|
||||
|
||||
return [item objectForKey: @"description"];
|
||||
}
|
||||
|
||||
- (id)outlineView:(NSOutlineView *)outlineView itemForPersistentObject:(id)object {
|
||||
|
||||
if ([object isKindOfClass: [NSString class]]) {
|
||||
|
||||
for(NSDictionary *d in _data) {
|
||||
if ([(NSString *)object isEqualToString: [d objectForKey: @"description"]])
|
||||
return d;
|
||||
}
|
||||
|
||||
}
|
||||
return nil;
|
||||
//return object;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation NewMachineViewController (Bookmark)
|
||||
|
||||
|
||||
- (void)didLoadBookmark:(NSDictionary *)bookmark {
|
||||
}
|
||||
|
||||
- (BOOL)loadBookmark:(NSDictionary *)bookmark {
|
||||
NSString *machine = [bookmark objectForKey: @"machine"];
|
||||
|
||||
//NSInteger row = [_outlineView selectedRow];
|
||||
if (!machine) {
|
||||
[self setMachine: nil];
|
||||
[_outlineView deselectAll: nil];
|
||||
return NO;
|
||||
}
|
||||
|
||||
for (NSDictionary *parent in _data) {
|
||||
NSArray *children = [parent objectForKey: @"children"];
|
||||
|
||||
for (NSDictionary *child in children) {
|
||||
if ([machine isEqualToString: [child objectForKey: @"value"]]) {
|
||||
|
||||
[_outlineView expandItem: parent];
|
||||
NSInteger row = [_outlineView rowForItem: child];
|
||||
if (row >= 0) {
|
||||
NSIndexSet *set = [NSIndexSet indexSetWithIndex: row];
|
||||
[_outlineView selectRowIndexes: set byExtendingSelection: NO];
|
||||
[_outlineView scrollRowToVisible: row];
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
// could also match parent.
|
||||
if ([machine isEqualToString: [parent objectForKey: @"value"]]) {
|
||||
NSInteger row = [_outlineView rowForItem: parent];
|
||||
if (row >= 0) {
|
||||
NSIndexSet *set = [NSIndexSet indexSetWithIndex: row];
|
||||
[_outlineView selectRowIndexes: set byExtendingSelection: NO];
|
||||
[_outlineView scrollRowToVisible: row];
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)saveBookmark:(NSMutableDictionary *)bookmark {
|
||||
// machine saved in parent.
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)willLoadBookmark:(NSDictionary *)bookmark {
|
||||
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue