-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
45 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// GLLOptionalPartController.m | ||
// GLLara | ||
// | ||
// Created by Torsten Kammer on 18.04.18. | ||
// Copyright © 2018 Torsten Kammer. All rights reserved. | ||
// | ||
|
||
import Cocoa | ||
|
||
/*! | ||
* Item controller for the optional parts of a model (if it has any). This just | ||
* shows one single source list entry, no children; this entry shows a list of | ||
* optional model parts in its detail view. | ||
*/ | ||
@objc class GLLOptionalPartController: NSObject, NSOutlineViewDataSource { | ||
|
||
@objc init(item: GLLItem, parent: AnyObject) { | ||
representedObject = GLLItemOptionalPartMarker(item: item) | ||
parentController = parent | ||
} | ||
|
||
@objc var item: GLLItem { | ||
return representedObject.item | ||
} | ||
@objc weak var parentController: AnyObject? | ||
@objc let representedObject: GLLItemOptionalPartMarker | ||
|
||
@objc func outlineView(_ outlineView: NSOutlineView, objectValueFor tableColumn: NSTableColumn?, byItem item: Any?) -> Any? { | ||
NSLocalizedString("Optional parts", comment: "source view optional parts") | ||
} | ||
|
||
@objc func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool { | ||
return false | ||
} | ||
|
||
@objc func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int { | ||
return 0 | ||
} | ||
} |