https://wiki.visionaire2d.net/index.php?title=Toolbox&feed=atom&action=historyToolbox - Revision history2024-03-29T11:39:59ZRevision history for this page on the wikiMediaWiki 1.39.6https://wiki.visionaire2d.net/index.php?title=Toolbox&diff=2052&oldid=prevAlex: Bot (Edward's framework)2009-08-16T10:57:18Z<p>Bot (Edward's framework)</p>
<p><b>New page</b></p><div>==toolbox==<br />
Creates a toolbox-control.<br />
<br />
The toolbox can host one or more tools for modification of sprites, rectangles etc. It can't have child-controls, so the current default-parent remains unaltered.<br />
<br />
Lua Syntax:<br />
<pre>toolbox( [windowName, object], {flags=1, <br />
edit = true|false, <br />
image = int, <br />
zoom = -1|0|1, <br />
clear = true|false, <br />
transparentBackground = true|false, <br />
backgroundSize = {x=int,y=int}, <br />
position = {x=int,y=int}, <br />
size = {x=int,y=int}, <br />
border = "[lrtb] width", <br />
align = "left"|"right"|"center"|"top"|"bottom", <br />
expand = "shaped", <br />
proportion = int})</pre><br />
===Arguments===<br />
====windowName====<br />
:'''"string"''' - Name of the new toolbox.<br />
====object====<br />
:'''"object path"|"object id"|object''' - Specifies an object to work on.<br />
===Flags===<br />
====e/edit====<br />
<br />
:If true then edit an existing toolbox.<br />
====i/image====<br />
<br />
:Specifies the data-field holding the background-image which will be used for the toolbox.<br />
====zo/zoom====<br />
<br />
:Sets the zoom level for the toolbox.<br />
:'''-1|0|1''' - -1... zoom out, 0... set zoom level to 100%, +1... zoom in<br />
====clr/clear====<br />
<br />
:If specified and set to true then all tools of the toolbox will be removed.<br />
====tbg/transparentBackground====<br />
<br />
:If specified and set to true then a special checked pattern is shown where the background is transparent.<br />
====bgs/backgroundSize====<br />
<br />
:Specifies the size of the background used for this tool box. Setting this size makes only sense if the tool box is not linked to an image.<br />
====pos/position====<br />
<br />
:Specifies the position of the window.<br />
====sz/size====<br />
<br />
:Specifies the size of the window.<br />
====b/border====<br />
<br />
:This flag specifies to which side(s) of the control a border will be applied to.<br />
:'''"[lrtb] width"''' - First group is a string combining characters standing for 'left', 'right', 'top' and 'bottom' side.After a space the width of the border in pixel is specified.<br />
====al/align====<br />
<br />
:Specifies the alignment of the item within the space allotted to it by the layout.<br />
:'''"left"|"right"|"center"|"top"|"bottom"''' - Alignment of control. Top- and bottom-align only makes sense in a row-layout, left- and right-align in a column layout.<br />
====exp/expand====<br />
<br />
:Specifies whether the item will be expanded to fill the space assigned to the item.<br />
:'''"shaped"''' - With this argument the item will be expanded as much as possible while also maintaining its aspect ratio<br />
====p/proportion====<br />
<br />
:Used in row- and column-layout to indicate if a child of a layout can change its size in the main orientation of the layout - where 0 stands for not changeable and a value of more than zero is interpreted relative to the value of other children of the same layout.<br />
===Return Values===<br />
;String<br />
:Name of the new toolbox.<br />
;None<br />
:Command failed because default-parent was empty.</div>Alex