123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
"use strict";
modulum('RawLayoutInformation', ['EventListener'],
function(context, cls) {
cls.RawLayoutInformation = context.oo.Class(cls.EventListener, function($super) {
return {
__name: "RawLayoutInformation",
_autoScale: null,
_width: null,
_height: null,
_gridWidth: null,
_gridHeight: null,
_posX: null,
_posY: null,
_minWidth: null,
_minHeight: null,
_stepX: null,
_stepY: null,
_columnCount: null,
_stretch: null,
_stretchMin: null,
_stretchMax: null,
_wantFixedPageSize: null,
_gridChildrenInParent: null,
_childOfGridChildrenInParent: null,
_sizePolicy: null,
constructor: function() {
$super.constructor.call(this);
this.reset();
},
destroy: function() {
$super.destroy.call(this);
},
reset: function() {
this._stretch = undefined;
},
getSizePolicy: function() {
return this._sizePolicy;
},
setSizePolicy: function(sizePolicy) {
if (this._sizePolicy !== sizePolicy) {
this._sizePolicy = sizePolicy;
this.invalidateInfos();
}
},
getAutoScale: function() {
return this._autoScale;
},
setAutoScale: function(autoScale) {
if (this._autoScale !== autoScale) {
this._autoScale = autoScale;
this.invalidateInfos();
}
},
getWidth: function() {
return this._width;
},
setWidth: function(width) {
if (this._width !== width) {
this._width = width;
this.invalidateInfos();
}
},
getHeight: function() {
return this._height;
},
setHeight: function(height) {
if (this._height !== height) {
this._height = height;
this.invalidateInfos();
}
},
getGridWidth: function() {
return this._gridWidth;
},
setGridWidth: function(gridWidth) {
if (this._gridWidth !== gridWidth) {
this._gridWidth = gridWidth;
this.invalidateInfos();
}
},
getGridHeight: function() {
return this._gridHeight;
},
setGridHeight: function(gridHeight) {
if (this._gridHeight !== gridHeight) {
this._gridHeight = gridHeight;
this.invalidateInfos();
}
},
getPosX: function() {
return this._posX;
},
setPosX: function(posX) {
if (this._posX !== posX) {
this._posX = posX;
this.invalidateInfos();
}
},
getPosY: function() {
return this._posY;
},
setPosY: function(posY) {
if (this._posY !== posY) {
this._posY = posY;
this.invalidateInfos();
}
},
getMinWidth: function() {
return this._minWidth;
},
setMinWidth: function(minWidth) {
if (this._minWidth !== minWidth) {
this._minWidth = minWidth;
this.invalidateInfos();
}
},
getMinHeight: function() {
return this._minHeight;
},
setMinHeight: function(minHeight) {
if (this._minHeight !== minHeight) {
this._minHeight = minHeight;
this.invalidateInfos();
}
},
getStepX: function() {
return this._stepX;
},
setStepX: function(stepX) {
if (this._stepX !== stepX) {
this._stepX = stepX;
this.invalidateInfos();
}
},
getStepY: function() {
return this._stepY;
},
setStepY: function(stepY) {
if (this._stepY !== stepY) {
this._stepY = stepY;
this.invalidateInfos();
}
},
getColumnCount: function() {
return this._columnCount;
},
setColumnCount: function(columnCount) {
if (this._columnCount !== columnCount) {
this._columnCount = columnCount;
this.invalidateInfos();
}
},
getStretch: function() {
return this._stretch;
},
setStretch: function(stretch) {
if (this._stretch !== stretch) {
this._stretch = stretch;
this.invalidateInfos();
}
},
getStretchMin: function() {
return this._stretchMin;
},
setStretchMin: function(stretchMin) {
if (this._stretchMin !== stretchMin) {
this._stretchMin = stretchMin;
this.invalidateInfos();
}
},
getStretchMax: function() {
return this._stretchMax;
},
setStretchMax: function(stretchMax) {
if (this._stretchMax !== stretchMax) {
this._stretchMax = stretchMax;
this.invalidateInfos();
}
},
getWantFixedPageSize: function() {
return this._wantFixedPageSize;
},
setWantFixedPageSize: function(wantFixedPageSize) {
if (this._wantFixedPageSize !== wantFixedPageSize) {
this._wantFixedPageSize = wantFixedPageSize;
this.invalidateInfos();
}
},
getGridChildrenInParent: function() {
return this._gridChildrenInParent;
},
setGridChildrenInParent: function(gridChildrenInParent) {
if (this._gridChildrenInParent !== gridChildrenInParent) {
this._gridChildrenInParent = gridChildrenInParent;
this.invalidateInfos();
}
},
getChildOfGridChildrenInParent: function() {
return this._childOfGridChildrenInParent;
},
setChildOfGridChildrenInParent: function(childOfGridChildrenInParent) {
if (this._childOfGridChildrenInParent !== childOfGridChildrenInParent) {
this._childOfGridChildrenInParent = childOfGridChildrenInParent;
this.invalidateInfos();
}
},
onRawLayoutInformationChanged: function(hook, once) {
return this.when(context.constants.widgetEvents.layoutInformationChanged, hook, Boolean(once));
},
invalidateInfos: function() {
this.emit(context.constants.widgetEvents.layoutInformationChanged);
}
};
});
});