
registerType('Core.UI', (function () { function Menu() {} var __super = setSupertypeFromDomain(Menu, 'BasicObject', 'Core');

	Object.defineProperty(Menu.prototype, "x", {
	outlet: true, 
	enumerable: true, get:function () { return this._x; }, set:function (v) {if (!Object.hasOwnProperty(this, "_x")) Object.defineProperty(this, "_x", { writable: true, configurable: true }); this._x = v; }});
	

	Object.defineProperty(Menu.prototype, "y", {
	outlet: true, 
	enumerable: true, get:function () { return this._y; }, set:function (v) {if (!Object.hasOwnProperty(this, "_y")) Object.defineProperty(this, "_y", { writable: true, configurable: true }); this._y = v; }});
	

	Object.defineProperty(Menu.prototype, "fontSize", {
	outlet: true, 
	enumerable: true, get:function () { return this._fontSize; }, set:function (v) {if (!Object.hasOwnProperty(this, "_fontSize")) Object.defineProperty(this, "_fontSize", { writable: true, configurable: true }); this._fontSize = v; }});
	

	Object.defineProperty(Menu.prototype, "items", {
	outlet: true, get:function () { return this._items; }, set:function (v) {if (!Object.hasOwnProperty(this, "_items")) Object.defineProperty(this, "_items", { writable: true, configurable: true }); this._items = v; }});
	

	Object.defineProperty(Menu.prototype, "delegate", {
	outlet: true, get:function () { return this._delegate; }, set:function (v) {if (!Object.hasOwnProperty(this, "_delegate")) Object.defineProperty(this, "_delegate", { writable: true, configurable: true }); this._delegate = v; }});
	
	
Menu.prototype.encode = function Menu_encode() {
		var data = __super.prototype.encode.call(this);
		data.items = [];
		if (Array.isArray(this.items)) this.items.every(function (item) {
			data.items.push(item.encode());return true; }, this);
		
		return data;};
	

Menu.prototype.decodeData = function Menu_decodeData(data) {
		var decoded = __super.prototype.decodeData.call(this, data);
		if (data.items) {
			decoded.items = [];
			if (Array.isArray(data.items)) data.items.every(function (itemData) {
				decoded.items.push(this.context.createFromDataWithoutInitializing(itemData));return true; }, this);
			
		}
		return decoded;};
	

Menu.prototype.initFromArchive = function Menu_initFromArchive(data) {
		__super.prototype.initFromArchive.call(this, data);
		if (data.items) {
			if (Array.isArray(data.items)) data.items.every(function (item) {
				this.context.initObjectFromArchive(item);return true; }, this);
			
		}};
	
	
Menu.prototype.addItem = function Menu_addItem(item) {
		if (!this.items) this.items = [];
		this.items.push(item);};
	
	
Menu.prototype.menuItemByTag = function Menu_menuItemByTag(tag) {
		var menuItem;
		if (Array.isArray(this.items)) this.items.every(function (item) {
			if (item.tag === tag) {
				menuItem = item;
				return false;
			}return true; }, this);
		
		return menuItem;};
	

Menu.prototype.menuItemByTargetMethod = function Menu_menuItemByTargetMethod(methodName) {
		var menuItem;
		if (Array.isArray(this.items)) this.items.every(function (item) {
			if (item.targetMethod === methodName) {
				menuItem = item;
				return false;
			}return true; }, this);
		
		return menuItem;};
	

Menu.prototype.initPropertiesFromData = function Menu_initPropertiesFromData(data) {
try { __super.prototype.initPropertiesFromData.call(this, data); } catch (err) {}
if (data.hasOwnProperty("x")) this.x = data.x;
if (data.hasOwnProperty("y")) this.y = data.y;
if (data.hasOwnProperty("fontSize")) this.fontSize = data.fontSize;
if (data.hasOwnProperty("items")) this.items = data.items;
if (data.hasOwnProperty("delegate")) this.delegate = data.delegate;
};

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

Menu.prototype.expectedTypeForProperty = function Menu_expectedTypeForProperty(key) {
	if (key === "x") return "";
	if (key === "y") return "";
	if (key === "fontSize") return "";
	if (key === "items") return "MenuItem[]";
	if (key === "delegate") return "";
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return Menu; }()));