Window

From VisionaireWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

window

Creates a top-level window, or edits/queries values from an existing window.

If window-name is omitted the default-parent is used or a name is created automatically. After execution the new window is the default-parent and the default-layout is empty. If window already exists its top-level layout becomes the new default-layout.

Lua Syntax:

window( [windowName], {flags=1, 
    title = title, 
    edit = true|false, 
    exists = true|false, 
    query = true|false})

Arguments

windowName

"string" - Name of the new window or window to query/edit.

Flags

t/title

Specifies a text for the window's titlebar.
title - Text for the titlebar.

e/edit

If true then edit an existing window.

ex/exists

If true then check if a window of given name exists. All other flags are ignored.

q/query

If true then query a value from an existing window. Uses the flag next to -query to determin which value to return. All other flags are ignored. Currently only works together with -title flag.

Return Values

True
A window of given name exists (-exists flag specified).
False
With -exists or -query flag means a window of given name doesn't exists.
String
Name of the new/edited window or the title queried with -query and -title flag.
None
Command doesn't return a value or failed silently.