Editor

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

editor

Creates an editor-module.

Lua Syntax:

editor(editorName [, windowName], {flags=1, 
    edit = true|false, 
    select = "object path"|"object id"|object, 
    createOnSelection = true|false, 
    title = "string", 
    params = {"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

editorName

"string" - Name of the editor-module.

windowName

"string" - Name of the new editor. If omitted the window name is generated automatically using the editorName.

Flags

e/edit

If true then edit an existing editor-module.

s/select

Selects an object into the editor-module.

cos/createOnSelection

If true then the creation of the editor will be delayed until an object is selected into the editor-module (either with a command or through an event from a selection context). If the editor is shown and no object is selected again then the editor will be hidden.

t/title

Specifies a title-text for the editor used as a notebook page.

pa/params

Additional parameters, each string should be of the form 'paramname=value'. Which parameters are handled depends on the editor module.

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 editor-module.