X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsrc%2FRoo_CenterLayoutRegion.js.html;fp=docs%2Fsrc%2FRoo_CenterLayoutRegion.js.html;h=da497cc3487916be28c2924a0961bbbfa2abfeb1;hb=9ff8ded6bbbd258ecd646184ba26020874e2c085;hp=0000000000000000000000000000000000000000;hpb=2542b67d1a0768025056f2f330bfe50b64d1ad38;p=roojs1 diff --git a/docs/src/Roo_CenterLayoutRegion.js.html b/docs/src/Roo_CenterLayoutRegion.js.html new file mode 100644 index 0000000000..da497cc348 --- /dev/null +++ b/docs/src/Roo_CenterLayoutRegion.js.html @@ -0,0 +1,204 @@ +/home/alan/gitlive/roojs1/Roo/CenterLayoutRegion.js/* + * Based on: + * Ext JS Library 1.1.1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * + * Originally Released Under LGPL - original licence link has changed is not relivant. + * + * Fork - LGPL + * <script type="text/javascript"> + */ +/* + * These classes are private internal classes + */ +Roo.CenterLayoutRegion = function(mgr, config){ + Roo.LayoutRegion.call(this, mgr, config, "center"); + this.visible = true; + this.minWidth = config.minWidth || 20; + this.minHeight = config.minHeight || 20; +}; + +Roo.extend(Roo.CenterLayoutRegion, Roo.LayoutRegion, { + hide : function(){ + // center panel can't be hidden + }, + + show : function(){ + // center panel can't be hidden + }, + + getMinWidth: function(){ + return this.minWidth; + }, + + getMinHeight: function(){ + return this.minHeight; + } +}); + + +Roo.NorthLayoutRegion = function(mgr, config){ + Roo.LayoutRegion.call(this, mgr, config, "north", "n-resize"); + if(this.split){ + this.split.placement = Roo.SplitBar.TOP; + this.split.orientation = Roo.SplitBar.VERTICAL; + this.split.el.addClass("x-layout-split-v"); + } + var size = config.initialSize || config.height; + if(typeof size != "undefined"){ + this.el.setHeight(size); + } +}; +Roo.extend(Roo.NorthLayoutRegion, Roo.SplitLayoutRegion, { + orientation: Roo.SplitBar.VERTICAL, + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + box.height += this.split.el.getHeight(); + } + return box; + }, + + updateBox : function(box){ + if(this.split && !this.collapsed){ + box.height -= this.split.el.getHeight(); + this.split.el.setLeft(box.x); + this.split.el.setTop(box.y+box.height); + this.split.el.setWidth(box.width); + } + if(this.collapsed){ + this.updateBody(box.width, null); + } + Roo.LayoutRegion.prototype.updateBox.call(this, box); + } +}); + +Roo.SouthLayoutRegion = function(mgr, config){ + Roo.SplitLayoutRegion.call(this, mgr, config, "south", "s-resize"); + if(this.split){ + this.split.placement = Roo.SplitBar.BOTTOM; + this.split.orientation = Roo.SplitBar.VERTICAL; + this.split.el.addClass("x-layout-split-v"); + } + var size = config.initialSize || config.height; + if(typeof size != "undefined"){ + this.el.setHeight(size); + } +}; +Roo.extend(Roo.SouthLayoutRegion, Roo.SplitLayoutRegion, { + orientation: Roo.SplitBar.VERTICAL, + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + var sh = this.split.el.getHeight(); + box.height += sh; + box.y -= sh; + } + return box; + }, + + updateBox : function(box){ + if(this.split && !this.collapsed){ + var sh = this.split.el.getHeight(); + box.height -= sh; + box.y += sh; + this.split.el.setLeft(box.x); + this.split.el.setTop(box.y-sh); + this.split.el.setWidth(box.width); + } + if(this.collapsed){ + this.updateBody(box.width, null); + } + Roo.LayoutRegion.prototype.updateBox.call(this, box); + } +}); + +Roo.EastLayoutRegion = function(mgr, config){ + Roo.SplitLayoutRegion.call(this, mgr, config, "east", "e-resize"); + if(this.split){ + this.split.placement = Roo.SplitBar.RIGHT; + this.split.orientation = Roo.SplitBar.HORIZONTAL; + this.split.el.addClass("x-layout-split-h"); + } + var size = config.initialSize || config.width; + if(typeof size != "undefined"){ + this.el.setWidth(size); + } +}; +Roo.extend(Roo.EastLayoutRegion, Roo.SplitLayoutRegion, { + orientation: Roo.SplitBar.HORIZONTAL, + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + var sw = this.split.el.getWidth(); + box.width += sw; + box.x -= sw; + } + return box; + }, + + updateBox : function(box){ + if(this.split && !this.collapsed){ + var sw = this.split.el.getWidth(); + box.width -= sw; + this.split.el.setLeft(box.x); + this.split.el.setTop(box.y); + this.split.el.setHeight(box.height); + box.x += sw; + } + if(this.collapsed){ + this.updateBody(null, box.height); + } + Roo.LayoutRegion.prototype.updateBox.call(this, box); + } +}); + +Roo.WestLayoutRegion = function(mgr, config){ + Roo.SplitLayoutRegion.call(this, mgr, config, "west", "w-resize"); + if(this.split){ + this.split.placement = Roo.SplitBar.LEFT; + this.split.orientation = Roo.SplitBar.HORIZONTAL; + this.split.el.addClass("x-layout-split-h"); + } + var size = config.initialSize || config.width; + if(typeof size != "undefined"){ + this.el.setWidth(size); + } +}; +Roo.extend(Roo.WestLayoutRegion, Roo.SplitLayoutRegion, { + orientation: Roo.SplitBar.HORIZONTAL, + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + box.width += this.split.el.getWidth(); + } + return box; + }, + + updateBox : function(box){ + if(this.split && !this.collapsed){ + var sw = this.split.el.getWidth(); + box.width -= sw; + this.split.el.setLeft(box.x+box.width); + this.split.el.setTop(box.y); + this.split.el.setHeight(box.height); + } + if(this.collapsed){ + this.updateBody(null, box.height); + } + Roo.LayoutRegion.prototype.updateBox.call(this, box); + } +}); + \ No newline at end of file