411 REFERENCE · Wikibooks
Celestia/Celx Scripting/CELX Lua Methods/CEL command splitview
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
splitview
splitview { view <viewnumber> type <splittype> position <splitpos> }
Split the view for the specified <viewnumber> horizontal or vertical at the specified position.
view <viewnumber> A number, identifying the view on the screen to be split. Default is 1.Must be a valid identifier, regarding the number of views on the screen, otherwise no split will be performed.
type <splittype> String used to determine in which direction the screen must be split. Default is "V".Must be:
"H" for a horizontal split.
"V" for a vertical split.
position <splitpos> Where to split the view as a percent number between 0 (left/down) and 1 (right/up). Default is 0.5 (in the middle).
CELX equivalent:
Based on the observer:splitview() method.
Get observer instance of the active view instance (within a Multi view) and split it.
obs = celestia:getobserver()
obs:splitview(<splittype>, <splitpos>)
-- OR --
Get observer instances of all views and split the view with identifier <viewnumber>.
observers = celestia:getobservers()
observers[<viewnumber>]:splitview(<splittype>, <splitpos>)
Example:Split the actual (single) view in the middle vertically.
CEL:
splitview { view 1 type "V" position 0.5}
CELX:
obs = celestia:getobserver()
obs:splitview("V", 0.5)
Back to CEL command index