Splitter

From VisionaireWiki
Jump to: navigation, search

splitter

Creates a splitter-window.

After execution the splitter-window is the new default-parent, the default-layout is empty (does not apply when edit-flag is used).

Lua Syntax:

splitter( [windowName], {flags=1, 
    horizontal = true|false, 
    edit = true|false, 
    position = int, 
    split = true|false, 
    unsplit = true|false, 
    window1 = "string", 
    window2 = "string", 
    filter = "string", 
    style = ["SP_3D"|"SP_3DSASH"|"SP_3DBORDER"|"SP_NOBORDER"|"SP_NO_XP_THEME"|"SP_LIVE_UPDATE"]})

Arguments

windowName

"string" - Name of the new splitter-window.

Flags

h/horizontal

If true then a horizontal splitter is created (default is vertical).

e/edit

Must be set to true if an existing splitter is edited, e.g. the sash position or filter string is updated.

pos/position

Specifies the sash-position of the splitter.

spl/split

If true then the splitter window can be split horizontally or vertically. The parameters window1 and window2 define the windows which will be shown in the 2 panes. Using this flag makes only sense if the splitter window was unsplit before.

usp/unsplit

If true then the right or bottom pane of the splitter will be removed.

w1/window1

Window which will be shown on left/top pane in splitter window. The window is only used if the split flag is specified.

w2/window2

Window which will be shown on right/bottom pane in splitter window. The window is only used if the split flag is specified.

fil/filter

Sets the filter-string of the splitter and reads the sash position from the configuration file for this splitter (with this new filter). If it is found then the new position is set.

st/style

Specifies the window style of the splitter window.Multiple style attributes can be combined (when it makes sense) with a pipe '|' symbol.
["SP_3D"|"SP_3DSASH"|"SP_3DBORDER"|"SP_NOBORDER"|"SP_NO_XP_THEME"|"SP_LIVE_UPDATE"] - SP_3D Draws a 3D effect border and sash (default).
SP_3DSASH Draws a 3D effect sash.
SP_3DBORDER Draws a standard border.
SP_NOBORDER No border.
SP_NO_XP_THEME Under Windows XP, switches off the attempt to draw the splitter using Windows XP theming, so the borders and sash will take on the pre-XP look.
SP_LIVE_UPDATE Don't draw XOR line but resize the child windows immediately.

Return Values

String
Name of new splitter-window.
true
Sash position successfully set.
false
Failed to set sash, no valid splitter found/given.