dojox/app/controllers/Layout (version 1.10)

dojox/app/controllers/LayoutBase

Usage

var foo = new Layout(app,events);
dojox/app/controllers/Layout
Parameter Type Description
app undefined

dojox/app application instance.

events undefined

{event : handler}

Method Summary

Event Summary

Methods

_doLayout(view)

do view layout.

Parameter Type Description
view Object

view instance needs to do layout.

_doResize(view)

resize view.

Parameter Type Description
view Object

view instance needs to do layout.

addViewToParentDomByConstraint(event)

Insert the view domNode into the parent domNode based upon the constraints. It should layout the children in this order: top, left, center, right, bottom Unless it is rtl then it should layout the children in this order: top, right, center, left, bottom

Parameter Type Description
event Object
{"parent":parent, "view":view, "removeView": boolean}
bind(evented,event,handler)

Bind event on dojo/Evented instance, document, domNode or window. Save event signal in controller instance. If no parameter is provided automatically bind all events registered in controller events property.

Parameter Type Description
evented Object

dojo/Evented instance, document, domNode or window

event String

event

handler Function

event handler

Returns:function

Bind event on dojo/Evented instance, document, domNode or window. Save event signal in controller instance. If no parameter is provided automatically bind all events registered in controller events property.

hideView(view)
Parameter Type Description
view undefined
initLayout(event)

Response to dojox/app "app-initLayout" event.

Parameter Type Description
event Object
{"view": view, "callback": function(){}};

Examples

Example 1

Use emit to trigger "app-initLayout" event, and this function will respond to the event. For example:

this.app.emit("app-initLayout", view);
layoutView(event)

Response to dojox/app "app-layoutView" event.

Parameter Type Description
event Object
{"parent":parent, "view":view, "removeView": boolean}

Examples

Example 1

Use emit to trigger "app-layoutView" event, and this function will response the event. For example:

this.app.emit("app-layoutView", view);
resizeSelectedChildren(w)
Parameter Type Description
w undefined
showView(view)
Parameter Type Description
view undefined
unbind(evented,event)

remove a binded event signal.

Parameter Type Description
evented Object

dojo/Evented instance, document, domNode or window

event String

event

Returns:function

remove a binded event signal.

Events

onResize()

Examples

Example 1

Use emit to trigger "app-layoutView" event, and this function will response the event. For example:

this.app.emit("app-layoutView", view);
Error in the documentation? Can’t find what you are looking for? Let us know!