Static Method Summary
Static Public Methods | ||
public static |
createElement(name: *, internal: boolean): * |
|
public static |
define() Defines core attributes of the class |
|
public static |
getDPI(): * DEPRECATED |
|
public static |
getIconEnum(): * |
|
public static |
getInternalName(name: *): * |
|
public static |
internalRegister(cls: *) |
|
public static |
prefix(name: *): * |
|
public static |
register(cls: *) |
|
public static |
setDefault(element: *): * |
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public get |
background: * |
|
public set |
|
|
public |
|
|
public get |
ctx: * |
|
public set |
|
|
public |
|
|
public get |
description: * |
|
public set |
|
|
public get |
disabled: * |
|
public set |
|
|
public |
hidden: * |
|
public get |
|
|
public set |
|
|
public get |
modalRunning: * |
|
public |
|
|
public |
packflag: * |
|
public get |
parentWidget: * |
|
public set |
|
|
public |
|
|
public |
shadow: * |
|
public |
|
|
public |
title: * |
|
public get |
|
|
public set |
causes calls to setPathValue to go through toolpath app.datapath_set(path="" newValueJSON="") |
|
public get |
|
|
public set |
|
|
public |
|
Private Members | ||
private |
__background: * |
|
private |
__cbs: *[] |
|
private |
|
|
private |
_active_animations: *[] |
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
_ctx: * |
|
private |
_description: * |
|
private |
|
|
private |
_disdata: * |
|
private |
_flashcolor: * |
|
private |
_flashtimer: * |
|
private |
|
|
private |
_id: * |
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
_modaldata: * |
|
private |
_modalstack: *[] |
|
private |
|
|
private |
|
|
private get |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
_tooltip_ref: * |
|
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
|
|
public |
abortToolTips(delayMs: number): * |
|
public |
addEventListener(type: *, cb: *, options: *): * |
|
public |
animate(_extra_handlers: {}): * returns a new Animator instance |
|
public |
appendChild(child: *): * |
|
public |
|
|
public |
checkInit(): * |
|
public |
|
|
public |
set havePickClipboard to true in define() to enable mouseover pick clipboarding |
|
public |
|
|
public |
|
|
public |
destroy() |
|
public |
doOnce(func: *, timeout: *) |
|
public |
findArea(): * |
|
public |
|
|
public |
|
|
public |
|
|
public |
flushUpdate(force: boolean) |
|
public |
formatNumber(value: *, args: {}): * |
|
public |
genBoxCSS(subkey: *): * |
|
public |
getClassDefault(key: *, checkForMobile: boolean, defaultval: *): * |
|
public |
getDPI(): * try to use this method |
|
public |
getDefault(key: *, checkForMobile: boolean, defaultval: *): * |
|
public |
getDefault_intern(key: *, checkForMobile: boolean, defaultval: *): * |
|
public |
getElementById(id: *): * |
|
public |
getPathDescription(ctx: *, path: *): * |
|
public |
getPathMeta(ctx: *, path: *): * |
|
public |
getPathValue(ctx: *, path: *): * |
|
public |
getScreen(): * |
|
public |
getStyle(): * |
|
public |
|
|
public |
getSubDefault(key: *, subkey: *, backupkey: *, defaultval: *): * get a sub style from a theme style class. |
|
public |
getTotalRect(): * |
|
public |
getWinHeight(): * |
|
public |
getWinWidth(): * |
|
public |
|
|
public |
hasClassDefault(key: *): * |
|
public |
hasDefault(key: *): * |
|
public |
|
|
public |
init() |
|
public |
|
|
public |
loadData(obj: *): * for saving ui state. |
|
public |
loadJSON(obj: *) |
|
public |
noMargins(): * |
|
public |
noMarginsOrPadding(): * |
|
public |
noPadding(): * |
|
public |
|
|
public |
|
|
public |
|
|
public |
on_resize(newsize: *) |
|
public |
onadd() |
|
public |
overrideClass(style: *) |
|
public |
overrideClassDefault(style: *, key: *, val: *) |
|
public |
overrideDefault(key: *, val: *, localOnly: boolean): * |
|
public |
overrideTheme(theme: *): * |
|
public |
parseNumber(value: *, args: {}): * |
|
public |
pickElement(x: *, y: *, args: {}, marginy: number, nodeclass: *, excluded_classes: *): * |
|
public |
popModal() |
|
public |
|
|
public |
|
|
public |
pushReportContext(key: *) |
|
public |
regenTabOrder(): * find owning screen and tell it to update the global tab order |
|
public |
|
|
public |
removeChild(child: *, trigger_on_destroy: boolean) |
|
public |
removeEventListener(type: *, cb: *, options: *): * |
|
public |
replaceChild(newnode: *, node: *): boolean |
|
public |
saveData(): {} for saving ui state. |
|
public |
setBoxCSS(subkey: *) |
|
public |
|
|
public |
setPathValue(ctx: *, path: *, val: *) |
|
public |
setPathValueUndo(ctx: *, path: *, val: *) |
|
public |
setUndo(val: *): * |
|
public |
|
|
public |
toJSON(): * |
|
public |
traverse(type_or_set: *): * |
|
public |
|
|
public |
unhide() |
|
public |
update() |
|
public |
|
|
public |
|
Private Methods | ||
private |
__updateDisable(val: *) |
|
private |
|
|
private |
_doMobileDefault(key: *, val: *): * |
|
private |
|
|
private |
child classes can override this to prevent focus on flash |
|
private |
_forEachChildWidget(cb: *, thisvar: *) Iterates over all child widgets, including ones that might be inside of normal DOM nodes. |
|
private |
|
|
private |
|
Static Public Methods
public static createElement(name: *, internal: boolean): * source
Params:
Name | Type | Attribute | Description |
name | * | ||
internal | boolean |
|
Return:
* |
public static define() source
Defines core attributes of the class
Example:
static define() {return {
tagname : "custom-element-x",
style : "[style class in theme]"
subclassChecksTheme : boolean //set to true to disable base class invokation of checkTheme()
havePickClipboard : boolean //whether element supports mouse hover copy/paste
pasteForAllChildren : boolean //mouse hover paste happens even over child widgets
copyForAllChildren : boolean //mouse hover copy happens even over child widgets
}}
public static getDPI(): * source
DEPRECATED
scaling ratio (e.g. for high-resolution displays)
Return:
* |
public static getInternalName(name: *): * source
Params:
Name | Type | Attribute | Description |
name | * |
Return:
* |
public static internalRegister(cls: *) source
Params:
Name | Type | Attribute | Description |
cls | * |
public static register(cls: *) source
Params:
Name | Type | Attribute | Description |
cls | * |
public static setDefault(element: *): * source
Params:
Name | Type | Attribute | Description |
element | * |
Return:
* |
Public Constructors
public constructor() source
Public Members
public get background: * source
public set background source
public class_default_overrides: {} source
public get ctx: * source
public set ctx source
public default_overrides: {} source
public get description: * source
public set description source
public get disabled: * source
public set disabled source
public hidden: * source
public get internalDisabled: * source
public set internalDisabled source
public get modalRunning: * source
public my_default_overrides: {} source
public packflag: * source
public get parentWidget: * source
public set parentWidget source
public shadow: * source
public title: * source
public set useDataPathUndo source
causes calls to setPathValue to go through toolpath app.datapath_set(path="" newValueJSON="")
every child will inherit
public get useNativeToolTips: * source
public set useNativeToolTips source
Private Members
private __background: * source
private __cbs: *[] source
private _active_animations: *[] source
private _client_disabled_set: * source
private _clipboard_keydown: * source
private _clipboard_keyend: * source
private _clipboard_keystart: * source
private _ctx: * source
private _description: * source
private _description_final: * source
private _disdata: * source
private _flashcolor: * source
private _flashtimer: * source
private _has_own_tooltips: * source
private _id: * source
private _last_clipboard_keyevt: * source
private _last_description: * source
private _last_theme_update_key: * source
private _modaldata: * source
private _modalstack: *[] source
private _override_class: * source
private _parentWidget: * source
private get _reportCtxName: * source
private _screenStyleTag: * source
private _themeOverride: * source
private _tool_tip_abort_delay: * source
private _tooltip_ref: * source
private _tooltip_timer: * source
private _useDataPathUndo: * source
private _useNativeToolTips: * source
Public Methods
public abortAnimations() source
public abortToolTips(delayMs: number): * source
Params:
Name | Type | Attribute | Description |
delayMs | number |
|
Return:
* |
public addEventListener(type: *, cb: *, options: *): * source
Params:
Name | Type | Attribute | Description |
type | * | ||
cb | * | ||
options | * |
Return:
* |
public animate(_extra_handlers: {}): * source
returns a new Animator instance
example:
container.animate().goto("style.width", 500, 100, "ease");
Params:
Name | Type | Attribute | Description |
_extra_handlers | {} |
|
Return:
* |
public clipboardCopy() source
set havePickClipboard to true in define() to enable mouseover pick clipboarding
public clipboardPaste() source
public connectedCallback() source
public destroy() source
public doOnce(func: *, timeout: *) source
Params:
Name | Type | Attribute | Description |
func | * | ||
timeout | * |
|
public flushSetCSS() source
public flushUpdate(force: boolean) source
Params:
Name | Type | Attribute | Description |
force | boolean |
|
public formatNumber(value: *, args: {}): * source
Params:
Name | Type | Attribute | Description |
value | * | ||
args | {} |
|
Return:
* |
public getClassDefault(key: *, checkForMobile: boolean, defaultval: *): * source
Params:
Name | Type | Attribute | Description |
key | * | ||
checkForMobile | boolean |
|
|
defaultval | * |
|
Return:
* |
public getDPI(): * source
try to use this method
scaling ratio (e.g. for high-resolution displays) for zoom ratio use getZoom()
Return:
* |
public getDefault(key: *, checkForMobile: boolean, defaultval: *): * source
Params:
Name | Type | Attribute | Description |
key | * | ||
checkForMobile | boolean |
|
|
defaultval | * |
|
Return:
* |
public getDefault_intern(key: *, checkForMobile: boolean, defaultval: *): * source
Params:
Name | Type | Attribute | Description |
key | * | ||
checkForMobile | boolean |
|
|
defaultval | * |
|
Return:
* |
public getPathDescription(ctx: *, path: *): * source
Params:
Name | Type | Attribute | Description |
ctx | * | ||
path | * |
Return:
* |
public getPathMeta(ctx: *, path: *): * source
Params:
Name | Type | Attribute | Description |
ctx | * | ||
path | * |
Return:
* |
public getPathValue(ctx: *, path: *): * source
Params:
Name | Type | Attribute | Description |
ctx | * | ||
path | * |
Return:
* |
public getSubDefault(key: *, subkey: *, backupkey: *, defaultval: *): * source
get a sub style from a theme style class. note that if key is falsy then it just forwards to this.getDefault directly
Params:
Name | Type | Attribute | Description |
key | * | ||
subkey | * | ||
backupkey | * |
|
|
defaultval | * |
|
Return:
* |
public hide(sethide: boolean) source
Params:
Name | Type | Attribute | Description |
sethide | boolean |
|
public init() source
public loadData(obj: *): * source
for saving ui state. see saveUIData() export
should fail gracefully.
also, it doesn't rebuild the object graph, it patches it; for true serialization use the toJSON/loadJSON or STRUCT interfaces.
Params:
Name | Type | Attribute | Description |
obj | * |
Return:
* |
public loadJSON(obj: *) source
Params:
Name | Type | Attribute | Description |
obj | * |
public on_disabled() source
public on_enabled() source
public on_remove() source
public on_resize(newsize: *) source
Params:
Name | Type | Attribute | Description |
newsize | * |
public onadd() source
public overrideClass(style: *) source
Params:
Name | Type | Attribute | Description |
style | * |
public overrideClassDefault(style: *, key: *, val: *) source
Params:
Name | Type | Attribute | Description |
style | * | ||
key | * | ||
val | * |
public overrideDefault(key: *, val: *, localOnly: boolean): * source
Params:
Name | Type | Attribute | Description |
key | * | ||
val | * | ||
localOnly | boolean |
|
Return:
* |
public parseNumber(value: *, args: {}): * source
Params:
Name | Type | Attribute | Description |
value | * | ||
args | {} |
|
Return:
* |
public pickElement(x: *, y: *, args: {}, marginy: number, nodeclass: *, excluded_classes: *): * source
Params:
Name | Type | Attribute | Description |
x | * | ||
y | * | ||
args | {} |
|
|
marginy | number |
|
|
nodeclass | * |
|
|
excluded_classes | * |
|
Return:
* |
public popModal() source
public popReportContext() source
public pushModal(handlers: *, autoStopPropagation: boolean, pointerId: *, pointerElem: *): * source
Params:
Name | Type | Attribute | Description |
handlers | * |
|
|
autoStopPropagation | boolean |
|
|
pointerId | * |
|
|
pointerElem | * |
|
Return:
* |
public pushReportContext(key: *) source
Params:
Name | Type | Attribute | Description |
key | * |
public regenTabOrder(): * source
find owning screen and tell it to update the global tab order
Return:
* |
public remove(trigger_on_destroy: boolean) source
Params:
Name | Type | Attribute | Description |
trigger_on_destroy | boolean |
|
public removeChild(child: *, trigger_on_destroy: boolean) source
Params:
Name | Type | Attribute | Description |
child | * | ||
trigger_on_destroy | boolean |
|
public removeEventListener(type: *, cb: *, options: *): * source
Params:
Name | Type | Attribute | Description |
type | * | ||
cb | * | ||
options | * |
Return:
* |
public replaceChild(newnode: *, node: *): boolean source
Params:
Name | Type | Attribute | Description |
newnode | * | ||
node | * |
public saveData(): {} source
for saving ui state. see saveUIData() export
should fail gracefully.
Return:
{} |
public setBoxCSS(subkey: *) source
Params:
Name | Type | Attribute | Description |
subkey | * |
public setCSS(setBG: boolean) source
Params:
Name | Type | Attribute | Description |
setBG | boolean |
|
public setPathValue(ctx: *, path: *, val: *) source
Params:
Name | Type | Attribute | Description |
ctx | * | ||
path | * | ||
val | * |
public setPathValueUndo(ctx: *, path: *, val: *) source
Params:
Name | Type | Attribute | Description |
ctx | * | ||
path | * | ||
val | * |
public traverse(type_or_set: *): * source
Params:
Name | Type | Attribute | Description |
type_or_set | * |
Return:
* |
public undoBreakPoint() source
public unhide() source
public update() source
public updateToolTipHandlers() source
public updateToolTips() source
Private Methods
private __updateDisable(val: *) source
Params:
Name | Type | Attribute | Description |
val | * |
private _clipboardHotkeyInit() source
private _doMobileDefault(key: *, val: *): * source
Params:
Name | Type | Attribute | Description |
key | * | ||
val | * |
Return:
* |
private _ensureChildrenCtx() source
private _forEachChildWidget(cb: *, thisvar: *) source
Iterates over all child widgets, including ones that might be inside of normal DOM nodes.
This is done by recursing into the dom tree and stopping at any node that's descended from ui_base.UIBase
Params:
Name | Type | Attribute | Description |
cb | * | ||
thisvar | * |