From VisionaireWiki
Jump to navigation Jump to search


Create an object-list.

Lua Syntax:

objectList(windowName, {flags=1, 
    owner = owner, 
    filter = filter, 
    sortBy = "id"|"order"|"nothing", 
    header = "string", 
    liststyle = "list"|"report"|"large"|"small", 
    select = "first"|"last"|"none", 
    selectAction = action, 
    deselectAction = action, 
    edit = true|false, 
    addSortTool = true|false, 
    disableFlags = ["A"]["R"]["D"]["C"]["M"], 
    addCallback = "string", 
    delCallback = "string", 
    genNameCallback = "string", 
    addFilter = {"string1","string2",...}, 
    addFilterLabels = {"string1","string2",...}, 
    position = {x=int,y=int}, 
    size = {x=int,y=int}, 
    border = "[lrtb] width", 
    align = "left"|"right"|"center"|"top"|"bottom", 
    expand = "shaped", 
    proportion = int})



"string" - Name of the new list-control.



Sets an owner which is used for the objects displayed in the list.
owner - Owner object for the filter path.


Sets a filter which is used to enumerate all objects shown in the list.
filter - Filter-string designating which objects to list (starting from table of owner object).An empty filter disables the list control.


Defines how the list is sorted. Default ist "order".
"id"|"order"|"nothing" -


Header which will be displayed in label above the list. If flag is not set then the label will not be shown.


Display style of the list-entries. Default is "large" for large icons.
"list"|"report"|"large"|"small" - Display style of list-entries: List-view with wrapping columns ("list"), multicolumn report-view ("report"), large icons ("large"), small icons ("small").


Selects an item of the list.
"first"|"last"|"none" - The "none" value makes sense because it activates a selection event (with an invalid item).


Specifies a script to execute when a list-entry is selected.
action - Lua source code.


Specifies a script to execute when no more list entries are selected.
action - Lua source code.


If true then edit an existing object-list.


If true a tool button for sorting the scene objects will be added to the toolbar. This flag is only allowed if the owner of the list is a scene. Default is false


Each character of this string specifies a toolbutton or toolbutton group which will be disabled.
["A"]["R"]["D"]["C"]["M"] - A... Add/Delete, R... Rename, D... Duplicate, C... Copy/Paste, M... Move Up/Down


Specifies name of callback function that is called when an object is added to the list. Currently only"action" and "item" are supported.


Specifies Name of editor module which contains callback function that is called when an object is deleted to the list. Currently only"language" is supported.


Specifies Name of editor module which contains callback function that is called when an object name needs to be generated. Currently only"action" is supported.


If specified a context menu is shown before an object is added to the list. This context menu contains the object types specified in these filters. The filters should only contain a table name and any number of conditions. The conditions will then be set for the chosen object type. If this parameter list is used the parameter addFilterLabels should contain the same number of elements which are used for the labels of the context menu entries.


The parameter addFilter should also be used and this value should contain the same number of elements. Each element specifies a label which will be shown in a context menu before an object is added to the list control.


Specifies the position of the window.


Specifies the size of the window.


This flag specifies to which side(s) of the control a border will be applied to.
"[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.


Specifies the alignment of the item within the space allotted to it by the layout.
"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.


Specifies whether the item will be expanded to fill the space assigned to the item.
"shaped" - With this argument the item will be expanded as much as possible while also maintaining its aspect ratio


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.

Return Values

Name of the new object-list control.