Create Inspector protocol.

This commit is contained in:
Brent Simmons 2018-01-20 21:48:27 -08:00
parent c66266e323
commit 541a88c17a
6 changed files with 71 additions and 6 deletions

View File

@ -8,6 +8,9 @@
/* Begin PBXBuildFile section */
8414AD251FCF5A1E00955102 /* TimelineHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8414AD241FCF5A1E00955102 /* TimelineHeaderView.swift */; };
841ABA4E20145E7300980E11 /* NothingInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841ABA4D20145E7300980E11 /* NothingInspectorViewController.swift */; };
841ABA5E20145E9200980E11 /* FolderInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841ABA5D20145E9200980E11 /* FolderInspectorViewController.swift */; };
841ABA6020145EC100980E11 /* BuiltinSmartFeedInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841ABA5F20145EC100980E11 /* BuiltinSmartFeedInspectorViewController.swift */; };
8426118A1FCB67AA0086A189 /* FeedIconDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842611891FCB67AA0086A189 /* FeedIconDownloader.swift */; };
8426119E1FCB6ED40086A189 /* HTMLMetadataDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8426119D1FCB6ED40086A189 /* HTMLMetadataDownloader.swift */; };
842611A01FCB72600086A189 /* FeaturedImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8426119F1FCB72600086A189 /* FeaturedImageDownloader.swift */; };
@ -460,6 +463,9 @@
/* Begin PBXFileReference section */
8414AD241FCF5A1E00955102 /* TimelineHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineHeaderView.swift; sourceTree = "<group>"; };
841ABA4D20145E7300980E11 /* NothingInspectorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NothingInspectorViewController.swift; sourceTree = "<group>"; };
841ABA5D20145E9200980E11 /* FolderInspectorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderInspectorViewController.swift; sourceTree = "<group>"; };
841ABA5F20145EC100980E11 /* BuiltinSmartFeedInspectorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuiltinSmartFeedInspectorViewController.swift; sourceTree = "<group>"; };
842611891FCB67AA0086A189 /* FeedIconDownloader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedIconDownloader.swift; sourceTree = "<group>"; };
8426119D1FCB6ED40086A189 /* HTMLMetadataDownloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTMLMetadataDownloader.swift; sourceTree = "<group>"; };
8426119F1FCB72600086A189 /* FeaturedImageDownloader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeaturedImageDownloader.swift; sourceTree = "<group>"; };
@ -1082,6 +1088,9 @@
84BBB12B20142A4700F054F5 /* Inspector.storyboard */,
84BBB12C20142A4700F054F5 /* InspectorWindowController.swift */,
8472058020142E8900AD578B /* FeedInspectorViewController.swift */,
841ABA5D20145E9200980E11 /* FolderInspectorViewController.swift */,
841ABA5F20145EC100980E11 /* BuiltinSmartFeedInspectorViewController.swift */,
841ABA4D20145E7300980E11 /* NothingInspectorViewController.swift */,
);
name = Inspector;
path = Evergreen/Inspector;
@ -1569,6 +1578,7 @@
84BBB12E20142A4700F054F5 /* InspectorWindowController.swift in Sources */,
84E46C7D1F75EF7B005ECFB3 /* AppDefaults.swift in Sources */,
D5907D972004B7EB005947E5 /* Account+Scriptability.swift in Sources */,
841ABA4E20145E7300980E11 /* NothingInspectorViewController.swift in Sources */,
842E45CE1ED8C308000A8B52 /* AppNotifications.swift in Sources */,
844B5B5B1FEA00FB00C7C76A /* TimelineKeyboardDelegate.swift in Sources */,
84DAEE321F870B390058304B /* DockBadge.swift in Sources */,
@ -1614,6 +1624,7 @@
849A97531ED9EAC0007D329B /* AddFeedController.swift in Sources */,
849A97831ED9EC63007D329B /* SidebarStatusBarView.swift in Sources */,
84F2D5381FC22FCC00998D64 /* TodayFeedDelegate.swift in Sources */,
841ABA5E20145E9200980E11 /* FolderInspectorViewController.swift in Sources */,
845213231FCA5B11003B6E93 /* ImageDownloader.swift in Sources */,
849A97431ED9EAA9007D329B /* AddFolderWindowController.swift in Sources */,
844B5B671FEA18E300C7C76A /* MainWIndowKeyboardHandler.swift in Sources */,
@ -1624,6 +1635,7 @@
849A978D1ED9EE4D007D329B /* FeedListWindowController.swift in Sources */,
849A97771ED9EC04007D329B /* TimelineCellData.swift in Sources */,
84B99C6B1FAE370B00ECDEDB /* FeedListFeed.swift in Sources */,
841ABA6020145EC100980E11 /* BuiltinSmartFeedInspectorViewController.swift in Sources */,
D5F4EDB5200744A700B9E363 /* ScriptingObject.swift in Sources */,
D5F4EDB920074D7C00B9E363 /* Folder+Scriptability.swift in Sources */,
842611A01FCB72600086A189 /* FeaturedImageDownloader.swift in Sources */,

View File

@ -0,0 +1,14 @@
//
// BuiltinSmartFeedInspectorViewController.swift
// Evergreen
//
// Created by Brent Simmons on 1/20/18.
// Copyright © 2018 Ranchero Software. All rights reserved.
//
import AppKit
final class BuiltinSmartFeedInspectorViewController: NSViewController {
}

View File

@ -0,0 +1,14 @@
//
// FolderInspectorViewController.swift
// Evergreen
//
// Created by Brent Simmons on 1/20/18.
// Copyright © 2018 Ranchero Software. All rights reserved.
//
import AppKit
final class FolderInspectorViewController: NSViewController {
}

View File

@ -31,7 +31,7 @@
<!--View Controller-->
<scene sceneID="KfF-qz-jtB">
<objects>
<viewController id="VUU-wH-gjh" sceneMemberID="viewController">
<viewController showSeguePresentationStyle="single" id="VUU-wH-gjh" sceneMemberID="viewController">
<view key="view" id="E15-dH-my9">
<rect key="frame" x="0.0" y="0.0" width="256" height="270"/>
<autoresizingMask key="autoresizingMask"/>
@ -76,7 +76,7 @@
<!--Feed-->
<scene sceneID="vUh-Rc-fPi">
<objects>
<viewController title="Feed" storyboardIdentifier="FeedInspector" id="sfH-oR-GXm" customClass="FeedInspectorViewController" customModule="Evergreen" customModuleProvider="target" sceneMemberID="viewController">
<viewController title="Feed" storyboardIdentifier="Feed" showSeguePresentationStyle="single" id="sfH-oR-GXm" customClass="FeedInspectorViewController" customModule="Evergreen" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="ecA-UY-KEd">
<rect key="frame" x="0.0" y="0.0" width="256" height="268"/>
<autoresizingMask key="autoresizingMask"/>
@ -165,7 +165,7 @@ Field</string>
<!--Folder-->
<scene sceneID="8By-fa-WDQ">
<objects>
<viewController title="Folder" id="ylq-Dz-pnT" sceneMemberID="viewController">
<viewController title="Folder" storyboardIdentifier="Folder" showSeguePresentationStyle="single" id="ylq-Dz-pnT" sceneMemberID="viewController">
<view key="view" id="DIQ-fD-5q6">
<rect key="frame" x="0.0" y="0.0" width="256" height="152"/>
<autoresizingMask key="autoresizingMask"/>
@ -207,10 +207,10 @@ Field</string>
</objects>
<point key="canvasLocation" x="-52" y="471"/>
</scene>
<!--Smart Feed-->
<!--Builtin Smart Feed-->
<scene sceneID="dFq-3d-JKW">
<objects>
<viewController title="Smart Feed" id="ye3-co-8lc" sceneMemberID="viewController">
<viewController title="Builtin Smart Feed" storyboardIdentifier="PseudoFeed" showSeguePresentationStyle="single" id="ye3-co-8lc" customClass="PseudoFeedInspectorViewController" customModule="Evergreen" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="DXo-3M-jJQ">
<rect key="frame" x="0.0" y="0.0" width="256" height="113"/>
<autoresizingMask key="autoresizingMask"/>
@ -249,7 +249,7 @@ Field</string>
<!--Nothing to inspect-->
<scene sceneID="lUc-e1-dN7">
<objects>
<viewController title="Nothing to inspect" showSeguePresentationStyle="single" id="Fdj-2F-Kl1" sceneMemberID="viewController">
<viewController title="Nothing to inspect" storyboardIdentifier="Nothing" showSeguePresentationStyle="single" id="Fdj-2F-Kl1" customClass="NothingInspectorViewController" customModule="Evergreen" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="FDE-PJ-bJl">
<rect key="frame" x="0.0" y="0.0" width="256" height="57"/>
<autoresizingMask key="autoresizingMask"/>

View File

@ -8,6 +8,13 @@
import AppKit
protocol Inspector {
var objects: [Any] { get set }
func isInspectorFor(_ objects: [Any]) -> Bool
}
final class InspectorWindowController: NSWindowController {
public var isOpen: Bool {
@ -16,4 +23,8 @@ final class InspectorWindowController: NSWindowController {
}
}
func inspector(for objects: [Any]) -> Inspector {
}
}

View File

@ -0,0 +1,14 @@
//
// NothingInspectorViewController.swift
// Evergreen
//
// Created by Brent Simmons on 1/20/18.
// Copyright © 2018 Ranchero Software. All rights reserved.
//
import AppKit
final class NothingInspectorViewController: NSViewController {
}