Layout class (Menu)

Layout(oMenu, oItem)

new Layout(oMenu, oItem)

Holds the layout to display all visible parts for the item and its descendents.
Parameters:
Name Type Description
oMenu Menu Specifies the Menu object to build the layout for
oItem Item Points to an object of Item type that specifies the item to build the layout for
Layout

Methods

forEach(view, offset, callBack, thisArg)

The forEach(view, offset, callBack, thisArg) method enumerates the parts of the current layout that fits the view, while the layout is displayed at giving offset
Parameters:
Name Type Description
view null | Array.<number> Indicates an array of [x,y,width,height] type that specifies the client rectangle the current layout is displayed to. If the view is null/missing/undefined all parts of the layout are being returned
offset object Indicates an object of {x,y} type that specifies the relative-offset to show each part of the layout.
callBack callBack A callback method to be invoked for each part that fits the view. The callback provides three parameters as explained:
oItem {Item}, indicates an object of Item type that indicates the item that displays the part
part {Item.PartEnum}, specifies the part of the item to be displayed
rtPart {number[]}, indicates an array of [x,y,width,height] type that specifies the rectangle to show the item's part (if offset parameter is present, it offsets the rtItem as well )
thisArg any Specifies the value of this keyword during the callback
forEach

forEachItem(view, offset, callBack, thisArg)

The forEachItem(view, offset, callBack, thisArg) method enumerates the items of the current layout that fits the view, while the layout is displayed at giving offset
Parameters:
Name Type Description
view null | Array.<number> Indicates an array of [x,y,width,height] type that specifies the client rectangle the current layout is displayed to. If the view is null/missing/undefined all parts of the layout are being returned
offset object Indicates an object of {x,y} type that specifies the relative-offset to show each part of the layout.
callBack callBack A callback method to be invoked for each item fits the view. The callback provides two parameters as explained:
oItem {Item}, indicates an object of Item type that indicates the item that displays the parts
rgParts {object}, indicates an object of exontrol.M1([Item.PartEnum => [x,y,width,height]]) type contains all parts of item
thisArg any Specifies the value of this keyword during the callback
forEachItem