//>>built
define("dojox/app/controllers/LayoutBase","dojo/_base/lang dojo/_base/declare dojo/sniff dojo/_base/window dojo/_base/config dojo/dom-attr dojo/topic dojo/dom-style ../utils/constraints ../Controller".split(" "),function(f,h,k,l,m,n,p,g,e,q){return h("dojox.app.controllers.LayoutBase",q,{constructor:function(a,d){this.events={"app-initLayout":this.initLayout,"app-layoutView":this.layoutView,"app-resize":this.onResize};m.mblHideAddressBar?p.subscribe("/dojox/mobile/afterResizeAll",f.hitch(this,this.onResize)):
this.bind(l.global,k("ios")?"orientationchange":"resize",f.hitch(this,this.onResize))},onResize:function(){this._doResize(this.app);for(var a in this.app.selectedChildren)this.app.selectedChildren[a]&&this._doResize(this.app.selectedChildren[a])},initLayout:function(a){n.set(a.view.domNode,"id",a.view.id);a.callback&&a.callback()},_doLayout:function(a){},_doResize:function(a){this.app.log("in LayoutBase _doResize called for view.id\x3d"+a.id+" view\x3d",a);this._doLayout(a)},layoutView:function(a){var d=
a.parent||this.app,b=a.view;if(b){this.app.log("in LayoutBase layoutView called for event.view.id\x3d"+a.view.id);var c=e.getSelectedChild(d,b.constraint);a.removeView?(b.viewShowing=!1,this.hideView(b),b==c&&e.setSelectedChild(d,b.constraint,null)):b!==c?(c&&(c.viewShowing=!1,"none"!=a.transition&&a.currentLastSubChildMatch===c||this.hideView(c)),b.viewShowing=!0,this.showView(b),e.setSelectedChild(d,b.constraint,b)):b.viewShowing=!0}},hideView:function(a){this.app.log("logTransitions:","LayoutBase setting domStyle display none for view.id\x3d["+
a.id+"], visibility\x3d["+a.domNode.style.visibility+"]");g.set(a.domNode,"display","none")},showView:function(a){a.domNode&&(this.app.log("logTransitions:","LayoutBase setting domStyle display to display for view.id\x3d["+a.id+"], visibility\x3d["+a.domNode.style.visibility+"]"),g.set(a.domNode,"display",""))}})});