Home Reference Source
import {Container} from './scripts/core/ui.js'
public class | source

Container

Extends:

scripts/core/ui_base.js~ui_base.UIBase → Container

Static Method Summary

Static Public Methods
public static

define(): {"tagname": string}

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public set
public get
public

ctx: *

public
public
public
public
public
Private Members
private
private
private

_menu: *

private

Method Summary

Public Methods
public

add(child: *): *

public

appendChild(child: *): *

public
public

button(label: *, cb: *, thisvar: *, id: *, packflag: number): *

public

changePathPrefix(newprefix: *)

recursively change path prefix for all children

public

check(inpath: *, name: *, packflag: number, mass_set_path: *): *

public

checkenum(inpath: *, name: *, packflag: *, enummap: *, defaultval: *, callback: *, iconmap: *, mass_set_path: *): *

public

checkenum_panel(inpath: *, name: *, packflag: number, callback: *, mass_set_path: *, prop: *): *

public

clear(trigger_on_destroy: boolean)

public

col(packflag: number): *

public

colorPicker(inpath: *, packflag_or_args: number, mass_set_path: *, themeOverride: *): *

public

colorbutton(inpath: *, packflag: *, mass_set_path: *): *

public

curve1d(inpath: *, packflag: number, mass_set_path: *): *

public

dynamicMenu(title: *, list: *, packflag: number): *

public

getroot(): *

public

helppicker(): *

makes a button for a help picker tool to view tooltips on mobile devices

public

iconbutton(icon: *, description: *, cb: *, thisvar: *, packflag: number): *

public

iconcheck(inpath: *, icon: *, name: *, mass_set_path: *): *

public

init()

public

insert(i: *, ch: *)

public

label(text: *): *

public

listbox(packflag: number): *

public

listen()

public

listenum(inpath: *, name: *, enumDef: *, defaultval: *, callback: *, iconmap: *, packflag: number): *

public

load()

public

loadData(obj: *)

public

loadJSON(obj: *): *

public
public

menu(title: *, list: *, packflag: number): *

example usage:

public
public

noteframe(packflag: number): *

public

oneAxisMargin(m: *, m2: number): *

tries to set margin along one axis only in smart manner

public

oneAxisPadding(axisPadding: *, otherPadding: number): *

tries to set padding along one axis only in smart manner

public

overrideDefault(key: *, val: *): *

public

panel(name: *, id: *, packflag: number, tooltip: *): *

public

pathlabel(inpath: *, label: string, packflag: number): *

public
public
public

prepend(child: *)

public

prop(inpath: *, packflag: number, mass_set_path: *): *

public

pushDataPrefix(val: *): *

public

pushMassSetPrefix(val: *): *

public
public

removeChild(child: *, trigger_on_destroy: boolean): *

public

reverse(): *

public

row(packflag: number): *

public

save()

public

saveData(): {}

public
public

setCSS()

public

setMargin(m: *): *

public

setPadding(m: *): *

public

setSize(width: *, height: *): *

public

simpleslider(inpath: *, name: *, defaultval: *, min: *, max: *, step: *, is_int: *, do_redraw: *, callback: *, packflag: number): *

public

slider(inpath: *, name: *, defaultval: *, min: *, max: *, step: *, is_int: *, do_redraw: *, callback: *, packflag: number): *

usage: .slider(inpath, { name : bleh, defaultval : number, etc...

public

strip(themeClass: string, margin1: *, margin2: number, horiz: *): *

public

table(packflag: number): *

public

tabs(position: string, packflag: number): *

public

textarea(datapath: *, value: string, packflag: number, mass_set_path: *): *

public

textbox(inpath: *, text: *, cb: *, packflag: number): *

public

toJSON(): *

public

tool(path_or_cls: *, packflag_or_args: {}, createCb: *, label: *): *

public

toolPanel(path_or_cls: *, args: {}): *

public

treeview(): *

public

twocol(parentDepth: number, packflag: number): *

public

update()

public

useIcons(enabled_or_sheet: boolean): *

Returns previous icon flags

public

vecpopup(inpath: *, packflag: number, mass_set_path: *): *

public

viewer(datapath: *, value: string, packflag: number, mass_set_path: *): *

html5 viewer

public

wrap(mode:: *): Container

Private Methods
private

_add(child: *, prepend: boolean): *

private

_container_inherit(elem: *, packflag: number)

private

_getMassPath(ctx: *, inpath: *, mass_set_path: *): *

private

_joinPrefix(path: *, prefix: *): *

private
private

_prepend(child: *): *

Static Public Methods

public static define(): {"tagname": string} source

Return:

{"tagname": string}

Public Constructors

public constructor() source

Public Members

public set background source

public get children: * source

public ctx: * source

public dataPrefix: string source

public inherit_packflag: number source

public massSetPrefix: string source

public packflag: * source

public reversed: boolean source

Private Members

private __background: * source

private _mass_prefixstack: *[] source

private _menu: * source

private _prefixstack: *[] source

Public Methods

public add(child: *): * source

Params:

NameTypeAttributeDescription
child *

Return:

*

public appendChild(child: *): * source

Params:

NameTypeAttributeDescription
child *

Return:

*

public asDialogFooter(): * source

Return:

*

public button(label: *, cb: *, thisvar: *, id: *, packflag: number): * source

Params:

NameTypeAttributeDescription
label *
cb *
thisvar *
id *
packflag number
  • optional
  • default: 0

Return:

*

public changePathPrefix(newprefix: *) source

recursively change path prefix for all children

Params:

NameTypeAttributeDescription
newprefix *

public check(inpath: *, name: *, packflag: number, mass_set_path: *): * source

Params:

NameTypeAttributeDescription
inpath *
name *
packflag number
  • optional
  • default: 0
mass_set_path *
  • optional
  • default: undefined

Return:

*

public checkenum(inpath: *, name: *, packflag: *, enummap: *, defaultval: *, callback: *, iconmap: *, mass_set_path: *): * source

Params:

NameTypeAttributeDescription
inpath *
name *
packflag *
enummap *
defaultval *
callback *
iconmap *
mass_set_path *

Return:

*

public checkenum_panel(inpath: *, name: *, packflag: number, callback: *, mass_set_path: *, prop: *): * source

Params:

NameTypeAttributeDescription
inpath *
name *
packflag number
  • optional
  • default: 0
callback *
  • optional
  • default: undefined
mass_set_path *
  • optional
  • default: undefined
prop *
  • optional
  • default: undefined

Return:

*

public clear(trigger_on_destroy: boolean) source

Params:

NameTypeAttributeDescription
trigger_on_destroy boolean
  • optional
  • default: true

public col(packflag: number): * source

Params:

NameTypeAttributeDescription
packflag number
  • optional
  • default: 0

Return:

*

public colorPicker(inpath: *, packflag_or_args: number, mass_set_path: *, themeOverride: *): * source

Params:

NameTypeAttributeDescription
inpath *
packflag_or_args number
  • optional
  • default: 0
mass_set_path *
  • optional
  • default: undefined
themeOverride *
  • optional
  • default: undefined

Return:

*

public colorbutton(inpath: *, packflag: *, mass_set_path: *): * source

Params:

NameTypeAttributeDescription
inpath *
packflag *
mass_set_path *
  • optional
  • default: undefined

Return:

*

public curve1d(inpath: *, packflag: number, mass_set_path: *): * source

Params:

NameTypeAttributeDescription
inpath *
packflag number
  • optional
  • default: 0
mass_set_path *
  • optional
  • default: undefined

Return:

*

public dynamicMenu(title: *, list: *, packflag: number): * source

Params:

NameTypeAttributeDescription
title *
list *
packflag number
  • optional
  • default: 0

Return:

*

public getroot(): * source

Return:

*

public helppicker(): * source

makes a button for a help picker tool to view tooltips on mobile devices

Return:

*

public iconbutton(icon: *, description: *, cb: *, thisvar: *, packflag: number): * source

Params:

NameTypeAttributeDescription
icon *
description *
cb *
thisvar *
packflag number
  • optional
  • default: 0

Return:

*

public iconcheck(inpath: *, icon: *, name: *, mass_set_path: *): * source

Params:

NameTypeAttributeDescription
inpath *
icon *
name *
mass_set_path *

Return:

*

public init() source

public insert(i: *, ch: *) source

Params:

NameTypeAttributeDescription
i *
ch *

public label(text: *): * source

Params:

NameTypeAttributeDescription
text *

Return:

*

public listbox(packflag: number): * source

Params:

NameTypeAttributeDescription
packflag number
  • optional
  • default: 0

Return:

*

public listen() source

public listenum(inpath: *, name: *, enumDef: *, defaultval: *, callback: *, iconmap: *, packflag: number): * source

Params:

NameTypeAttributeDescription
inpath *
name *
enumDef *
defaultval *
callback *
iconmap *
packflag number
  • optional
  • default: 0

Return:

*

public load() source

public loadData(obj: *) source

Params:

NameTypeAttributeDescription
obj *

public loadJSON(obj: *): * source

Params:

NameTypeAttributeDescription
obj *

Return:

*

public loadVisibility(): * source

Return:

*

public menu(title: *, list: *, packflag: number): * source

example usage:

.menu([ "some_tool_path.tool()|CustomLabel", ui_widgets.Menu.SEP, "some_tool_path.another_tool()", ["Name", () => {console.log("do something")}] ])

Params:

NameTypeAttributeDescription
title *
list *
packflag number
  • optional
  • default: 0

Return:

*

public noMarginsOrPadding(): * source

Return:

*

public noteframe(packflag: number): * source

Params:

NameTypeAttributeDescription
packflag number
  • optional
  • default: 0

Return:

*

public oneAxisMargin(m: *, m2: number): * source

tries to set margin along one axis only in smart manner

Params:

NameTypeAttributeDescription
m *
  • optional
m2 number
  • optional
  • default: 0

Return:

*

public oneAxisPadding(axisPadding: *, otherPadding: number): * source

tries to set padding along one axis only in smart manner

Params:

NameTypeAttributeDescription
axisPadding *
  • optional
otherPadding number
  • optional
  • default: 0

Return:

*

public overrideDefault(key: *, val: *): * source

Params:

NameTypeAttributeDescription
key *
val *

Return:

*

public panel(name: *, id: *, packflag: number, tooltip: *): * source

Params:

NameTypeAttributeDescription
name *
id *
packflag number
  • optional
  • default: 0
tooltip *
  • optional
  • default: undefined

Return:

*

public pathlabel(inpath: *, label: string, packflag: number): * source

Params:

NameTypeAttributeDescription
inpath *
label string
  • optional
  • default:
packflag number
  • optional
  • default: 0

Return:

*

public popDataPrefix(): * source

Return:

*

public popMassSetPrefix(): * source

Return:

*

public prepend(child: *) source

Params:

NameTypeAttributeDescription
child *

public prop(inpath: *, packflag: number, mass_set_path: *): * source

Params:

NameTypeAttributeDescription
inpath *
packflag number
  • optional
  • default: 0
mass_set_path *
  • optional
  • default: undefined

Return:

*

public pushDataPrefix(val: *): * source

Params:

NameTypeAttributeDescription
val *

Return:

*

public pushMassSetPrefix(val: *): * source

Params:

NameTypeAttributeDescription
val *

Return:

*

public redrawCurves() source

public removeChild(child: *, trigger_on_destroy: boolean): * source

Params:

NameTypeAttributeDescription
child *
trigger_on_destroy boolean
  • optional
  • default: true

Return:

*

public reverse(): * source

Return:

*

public row(packflag: number): * source

Params:

NameTypeAttributeDescription
packflag number
  • optional
  • default: 0

Return:

*

public save() source

public saveData(): {} source

Return:

{}

public saveVisibility(): * source

Return:

*

public setCSS() source

public setMargin(m: *): * source

Params:

NameTypeAttributeDescription
m *

Return:

*

public setPadding(m: *): * source

Params:

NameTypeAttributeDescription
m *

Return:

*

public setSize(width: *, height: *): * source

Params:

NameTypeAttributeDescription
width *
height *

Return:

*

public simpleslider(inpath: *, name: *, defaultval: *, min: *, max: *, step: *, is_int: *, do_redraw: *, callback: *, packflag: number): * source

Params:

NameTypeAttributeDescription
inpath *
name *
defaultval *
min *
max *
step *
is_int *
do_redraw *
callback *
packflag number
  • optional
  • default: 0

Return:

*

public slider(inpath: *, name: *, defaultval: *, min: *, max: *, step: *, is_int: *, do_redraw: *, callback: *, packflag: number): * source

usage: .slider(inpath, { name : bleh, defaultval : number, etc... });

Params:

NameTypeAttributeDescription
inpath *
name *
defaultval *
min *
max *
step *
is_int *
do_redraw *
callback *
packflag number
  • optional
  • default: 0

Return:

*

public strip(themeClass: string, margin1: *, margin2: number, horiz: *): * source

Params:

NameTypeAttributeDescription
themeClass string
  • optional
  • default: strip
margin1 *
  • optional
margin2 number
  • optional
  • default: 1
horiz *
  • optional
  • default: undefined

Return:

*

public table(packflag: number): * source

Params:

NameTypeAttributeDescription
packflag number
  • optional
  • default: 0

Return:

*

public tabs(position: string, packflag: number): * source

Params:

NameTypeAttributeDescription
position string
  • optional
  • default: top
packflag number
  • optional
  • default: 0

Return:

*

public textarea(datapath: *, value: string, packflag: number, mass_set_path: *): * source

Params:

NameTypeAttributeDescription
datapath *
  • optional
  • default: undefined
value string
  • optional
  • default:
packflag number
  • optional
  • default: 0
mass_set_path *
  • optional
  • default: undefined

Return:

*

public textbox(inpath: *, text: *, cb: *, packflag: number): * source

Params:

NameTypeAttributeDescription
inpath *
text *
cb *
  • optional
  • default: undefined
packflag number
  • optional
  • default: 0

Return:

*

public toJSON(): * source

Return:

*

public tool(path_or_cls: *, packflag_or_args: {}, createCb: *, label: *): * source

Params:

NameTypeAttributeDescription
path_or_cls *
packflag_or_args {}
  • optional
  • default: {}
createCb *
  • optional
  • default: undefined
label *
  • optional
  • default: undefined

Return:

*

public toolPanel(path_or_cls: *, args: {}): * source

Params:

NameTypeAttributeDescription
path_or_cls *
args {}
  • optional
  • default: {}

Return:

*

public treeview(): * source

Return:

*

public twocol(parentDepth: number, packflag: number): * source

Params:

NameTypeAttributeDescription
parentDepth number
  • optional
  • default: 1
packflag number
  • optional
  • default: 0

Return:

*

public update() source

public useIcons(enabled_or_sheet: boolean): * source

Returns previous icon flags

Params:

NameTypeAttributeDescription
enabled_or_sheet boolean
  • optional
  • default: true

Return:

*

public vecpopup(inpath: *, packflag: number, mass_set_path: *): * source

Params:

NameTypeAttributeDescription
inpath *
packflag number
  • optional
  • default: 0
mass_set_path *
  • optional
  • default: undefined

Return:

*

public viewer(datapath: *, value: string, packflag: number, mass_set_path: *): * source

html5 viewer

Params:

NameTypeAttributeDescription
datapath *
  • optional
  • default: undefined
value string
  • optional
  • default:
packflag number
  • optional
  • default: 0
mass_set_path *
  • optional
  • default: undefined

Return:

*

public wrap(mode:: *): Container source

Params:

NameTypeAttributeDescription
mode: *

flexbox wrap mode, can be wrap, nowrap, or wrap-reverse

Return:

Container

Private Methods

private _add(child: *, prepend: boolean): * source

Params:

NameTypeAttributeDescription
child *
prepend boolean
  • optional
  • default: false

Return:

*

private _container_inherit(elem: *, packflag: number) source

Params:

NameTypeAttributeDescription
elem *
packflag number
  • optional
  • default: 0

private _getMassPath(ctx: *, inpath: *, mass_set_path: *): * source

Params:

NameTypeAttributeDescription
ctx *
inpath *
mass_set_path *

Return:

*

private _joinPrefix(path: *, prefix: *): * source

Params:

NameTypeAttributeDescription
path *
prefix *
  • optional

Return:

*

private _ondestroy() source

private _prepend(child: *): * source

Params:

NameTypeAttributeDescription
child *

Return:

*