ObjectList

From VisionaireWiki
Revision as of 11:57, 16 August 2009 by Alex (talk | contribs) (Bot (Edward's framework))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

objectList

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})

Arguments

windowName

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

Flags

own/owner

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

fil/filter

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.

srt/sortBy

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

hdr/header

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

ls/liststyle

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").

s/select

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

sa/selectAction

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

dsa/deselectAction

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

e/edit

If true then edit an existing object-list.

ast/addSortTool

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

df/disableFlags

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

acb/addCallback

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

dcb/delCallback

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.

gcb/genNameCallback

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.

adf/addFilter

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.

afl/addFilterLabels

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.

pos/position

Specifies the position of the window.

sz/size

Specifies the size of the window.

b/border

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.

al/align

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.

exp/expand

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

p/proportion

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

String
Name of the new object-list control.