
registerType('appdoo', (function () { function SceneObjectsTreeNode() {} var __super = setSupertypeFromDomain(SceneObjectsTreeNode, 'TreeNode', 'Core');

	Object.defineProperty(SceneObjectsTreeNode.prototype, "scene", {
	outlet: true, get:function () { return this._scene; }, set:function (v) {if (!Object.hasOwnProperty(this, "_scene")) Object.defineProperty(this, "_scene", { writable: true, configurable: true }); this._scene = v; }});
	
	
	Object.defineProperty(SceneObjectsTreeNode.prototype, "contents", {
		get: function () { return this.scene.objects; }});
	

SceneObjectsTreeNode.prototype.removeChildNode = function SceneObjectsTreeNode_removeChildNode(node, sender) {
		__super.prototype.removeChildNode.call(this, node, sender);
		this.contents.splice(this.contents.indexOf(node.representedObject), 1);};
	
	
SceneObjectsTreeNode.prototype.moveChildNodeFromIndexToIndex = function SceneObjectsTreeNode_moveChildNodeFromIndexToIndex(oldIndex, newIndex, sender) {
		__super.prototype.moveChildNodeFromIndexToIndex.call(this, oldIndex, newIndex, sender);
		var obj = this.contents[oldIndex];
		this.contents.splice(oldIndex, 1);
		this.contents.splice(newIndex, 0, obj);};
	
	
SceneObjectsTreeNode.prototype.insertChildNodeAtIndex = function SceneObjectsTreeNode_insertChildNodeAtIndex(node, index, sender, silent) {
		__super.prototype.insertChildNodeAtIndex.call(this, node, index, sender, silent);
		if (this.contents.indexOf(node.representedObject) === -1) {
			this.contents.splice(index, 0, node.representedObject);
			_context.editor.refreshInspector();
		}};
	
SceneObjectsTreeNode.prototype.initPropertiesFromData = function SceneObjectsTreeNode_initPropertiesFromData(data) {
try { __super.prototype.initPropertiesFromData.call(this, data); } catch (err) {}
if (data.hasOwnProperty("scene")) this.scene = data.scene;
};

SceneObjectsTreeNode.prototype.decodeData = function SceneObjectsTreeNode_decodeData(data) { var decoded;
try { decoded = __super.prototype.decodeData.call(this, data); } catch (err) { console.warn(err); decoded = clone(data); }
return decoded; };

SceneObjectsTreeNode.prototype.encode = function SceneObjectsTreeNode_encode() { var encoded;
try { encoded = __super.prototype.encode.call(this); } catch (err) { console.warn(err); encoded = this.context.encodeObject(this); }
return encoded; };

SceneObjectsTreeNode.prototype.encodeCloned = function SceneObjectsTreeNode_encodeCloned() { var encoded;
try { encoded = __super.prototype.encodeCloned.call(this); } catch (err) { console.warn(err); encoded = {}; }
return encoded; };

SceneObjectsTreeNode.prototype.expectedTypeForProperty = function SceneObjectsTreeNode_expectedTypeForProperty(key) {
	if (key === "scene") return "";
	if (key === "contents") return "";
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return SceneObjectsTreeNode; }()));
registerType('appdoo', (function () { function GlobalObjectsTreeNode() {} var __super = setSupertypeFromDomain(GlobalObjectsTreeNode, 'TreeNode', 'Core');

	Object.defineProperty(GlobalObjectsTreeNode.prototype, "contents", {
		get: function () { return this.context.projectContext.objects; }});
	
	
GlobalObjectsTreeNode.prototype.removeChildNode = function GlobalObjectsTreeNode_removeChildNode(node, sender) {
		__super.prototype.removeChildNode.call(this, node, sender);
		var o = this.contents;
		o.splice(o.indexOf(node.representedObject), 1);};
	

GlobalObjectsTreeNode.prototype.moveChildNodeFromIndexToIndex = function GlobalObjectsTreeNode_moveChildNodeFromIndexToIndex(oldIndex, newIndex, sender) {
		__super.prototype.moveChildNodeFromIndexToIndex.call(this, oldIndex, newIndex, sender);
		var obj = this.contents[oldIndex];
		this.contents.splice(oldIndex, 1);
		this.contents.splice(newIndex, 0, obj);};
	

GlobalObjectsTreeNode.prototype.insertChildNodeAtIndex = function GlobalObjectsTreeNode_insertChildNodeAtIndex(node, index, sender, silent) {
		__super.prototype.insertChildNodeAtIndex.call(this, node, index, sender, silent);
		if (this.contents.indexOf(node.representedObject) === -1) {
			this.contents.splice(index, 0, node.representedObject);
			_context.editor.refreshInspector();
		}};
	
	
GlobalObjectsTreeNode.prototype.expectedTypeForProperty = function GlobalObjectsTreeNode_expectedTypeForProperty(key) {
	if (key === "contents") return "";
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return GlobalObjectsTreeNode; }()));
registerType('appdoo', (function () { function NavigationObjectsTreeNode() {} var __super = setSupertypeFromDomain(NavigationObjectsTreeNode, 'TreeNode', 'Core');

	Object.defineProperty(NavigationObjectsTreeNode.prototype, "scene", {
	outlet: true, get:function () { return this._scene; }, set:function (v) {if (!Object.hasOwnProperty(this, "_scene")) Object.defineProperty(this, "_scene", { writable: true, configurable: true }); this._scene = v; }});
	
	
NavigationObjectsTreeNode.prototype.removeChildNode = function NavigationObjectsTreeNode_removeChildNode(node, sender) {

		__super.prototype.removeChildNode.call(this, node, sender);

		if (node.representedObject === this.scene.navigationBar) {
			this.scene.e_showsNavigationBar = false;
			this.scene.navigationBar = null;
		}
		else if (node.representedObject === this.scene.viewController.tabBarItem) {
			this.scene.e_showsInTabBar = false;
			this.scene.viewController.tabBarItem = null;
		}
		else if (node.representedObject === _context.projectContext.tabBarController.tabBar) {
			return;
		}
		
		this.scene.checkSpecialNodes();
};
	
	
NavigationObjectsTreeNode.prototype.initPropertiesFromData = function NavigationObjectsTreeNode_initPropertiesFromData(data) {
try { __super.prototype.initPropertiesFromData.call(this, data); } catch (err) {}
if (data.hasOwnProperty("scene")) this.scene = data.scene;
};

NavigationObjectsTreeNode.prototype.decodeData = function NavigationObjectsTreeNode_decodeData(data) { var decoded;
try { decoded = __super.prototype.decodeData.call(this, data); } catch (err) { console.warn(err); decoded = clone(data); }
return decoded; };

NavigationObjectsTreeNode.prototype.encode = function NavigationObjectsTreeNode_encode() { var encoded;
try { encoded = __super.prototype.encode.call(this); } catch (err) { console.warn(err); encoded = this.context.encodeObject(this); }
return encoded; };

NavigationObjectsTreeNode.prototype.encodeCloned = function NavigationObjectsTreeNode_encodeCloned() { var encoded;
try { encoded = __super.prototype.encodeCloned.call(this); } catch (err) { console.warn(err); encoded = {}; }
return encoded; };

NavigationObjectsTreeNode.prototype.expectedTypeForProperty = function NavigationObjectsTreeNode_expectedTypeForProperty(key) {
	if (key === "scene") return "";
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return NavigationObjectsTreeNode; }()));
registerType('appdoo', (function () { function FileReferencesTreeNode() {} var __super = setSupertypeFromDomain(FileReferencesTreeNode, 'TreeNode', 'Core');

	Object.defineProperty(FileReferencesTreeNode.prototype, "contents", {
		get: function () { return this.context.projectContext.fileReferences; }});
	
	
FileReferencesTreeNode.prototype.removeChildNode = function FileReferencesTreeNode_removeChildNode(node, sender) {
		__super.prototype.removeChildNode.call(this, node, sender);
		var o = this.contents;
		o.splice(o.indexOf(node.representedObject), 1);};
	

FileReferencesTreeNode.prototype.moveChildNodeFromIndexToIndex = function FileReferencesTreeNode_moveChildNodeFromIndexToIndex(oldIndex, newIndex, sender) {
		__super.prototype.moveChildNodeFromIndexToIndex.call(this, oldIndex, newIndex, sender);
		var obj = this.contents[oldIndex];
		this.contents.splice(oldIndex, 1);
		this.contents.splice(newIndex, 0, obj);};
	
	
FileReferencesTreeNode.prototype.expectedTypeForProperty = function FileReferencesTreeNode_expectedTypeForProperty(key) {
	if (key === "contents") return "";
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return FileReferencesTreeNode; }()));