![]() |
|
|
|
dynapi.gui.GroupManager - Quick Reference |
Requires: DynLayer, Inherit: EventObject |
|
GroupManager() - Used to group layers or widgets
[none]
add(dlyr[,unlockX,unlockY]) - Adds a layer, widget or an existing group to the selected group. Indicate if the X or Y axis are locked for this layer, defaults to locked.
example:
var gm = new GroupManager(); var lyr = dynapi.document.addChild(new DynLayer(null,100,100,100,100,'red')) gm.add(lyr);
changeLocationBy(byX,byY) - Moves the group by X or Y pixels on the screen.
remove(dlyr) - Removes a layer, widget or an existing group to the selected group.
sendMessage(msg,a1,a2,a3,a4,a5,a6,a7) - Sends a message to all objects within the group.
example:
gm.sendMessage('setBgColor','#FFCC00'); gm.sendMessage('setHTML','Hello!');
setBoundary(t,r,b,l) - Sets the a boundary for grouped objects.
t - Top r - right (width) b - Bottom (height) l - left
example:
gm.setBoundary(0,600,200,0);
Note: Calling setBoundary(null) will remove the boundary settings from the group
unlockX(boolean[,layer]) - unlock the X axis for all layers or the optional specified layer.
unlockY(boolean[,layer]) - unlock the Y axis for all layers or the optional specified layer.
unlockXY(boolean[,layer]) - unlock the X & Y axies for all layers or the optionally specified layer.
getUnlockX([layer]) - Return the unlock state for the X axis for either the specified layer or all layers. If the state is consistent across all layers, a simple true or false is returned. If there is a mixture, an array of the states is returned.
getUnlockY([layer]) - Return the unlock state for the Y axis for either the specified layer or all layers. If the state is consistent across all layers, a simple true or false is returned. If there is a mixture, an array of the states is returned.
setUnlockXState(values) - Given the results of getUnlockX, apply the returned state to all of the children.
setUnlockYState(values) - Given the results of getUnlockY, apply the returned state to all of the children.
setLocation(x,y) - Sets the location of the group.
_setSize(dlyr)
_resetSize()
GroupManager._NewSetLocation(x,y)