SetParent

From VisionaireWiki
Revision as of 12: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

setParent

Sets a window as the new default-parent.

After command execution the given window is the new default-parent. The window's layout is the new default-layout (may be empty).

Lua Syntax:

setParent( [windowName], {flags=1, 
    layout = layoutName, 
    query = true|false, 
    upLevel = true|false, 
    topLevel = true|false})

Arguments

windowName

"string" - The name of the window, not needed if flags query, upLevel or topLevel are used.

Flags

ly/layout

Layout from inside the new default-window which becomes new default-layout. If omitted the window's top-level layout is used. If window contains no layouts the default-layout will be empty after command execution.
layoutName - Name of the new default-layout

q/query

If true then query the current default-parent

u/upLevel

If true then set the parent window of current default-parent as new default-parent.

top/topLevel

If true then set the top-level window above current default-parent as new default-parent.

Return Values

String
If -query flag was used, the path to current default-parent or empty string.
true
New default-parent was successfully set.
false
Command failed because specified window does not exist.