diff --git a/examples/guides/ui-and-widgets/widgets.ts b/examples/guides/ui-and-widgets/widgets.ts index 56822c3a1..eff2a92bf 100644 --- a/examples/guides/ui-and-widgets/widgets.ts +++ b/examples/guides/ui-and-widgets/widgets.ts @@ -1,4 +1,4 @@ -import { Button, Keyboard, Label, Panel, ProgressBar, Scene, ScrollContainer, Stack, Tooltip } from '@codexo/exojs'; +import { Button, DockContainer, Keyboard, Label, Panel, ProgressBar, Scene, ScrollContainer, Stack, Tooltip } from '@codexo/exojs'; // #region guide:anchoring class HudScene extends Scene { @@ -31,6 +31,28 @@ class MenuScene extends Scene { } // #endregion guide:stack +// #region guide:dock +class DockedHudScene extends Scene { + override init(): void { + const hud = new DockContainer({ width: this.ui.screenWidth, height: this.ui.screenHeight }); + + const topBar = new Stack({ direction: 'row', spacing: 12, padding: 8, align: 'center' }); + topBar.addChild(new Label('Score: 0', { fontSize: 20 }), new ProgressBar({ width: 180, height: 12, value: 1 })); + + const sidebar = new Stack({ direction: 'column', spacing: 8, padding: 8 }); + sidebar.setSize(200, 0); + sidebar.addChild(new Button({ label: 'Map' }), new Button({ label: 'Quests' })); + + hud.dock(topBar, 'top'); + hud.dock(sidebar, 'right'); + hud.dock(new Panel(), 'center'); + + this.ui.addChild(hud); + this.ui.onResize.add((width, height) => hud.setSize(width, height)); + } +} +// #endregion guide:dock + // #region guide:scrolling class InventoryScene extends Scene { override init(): void { @@ -83,4 +105,4 @@ class ShopScene extends Scene { } // #endregion guide:tooltip -export { FormScene, HudScene, InventoryScene, MenuScene, ShopScene }; +export { DockedHudScene, FormScene, HudScene, InventoryScene, MenuScene, ShopScene }; diff --git a/site/src/content/api/button-options.json b/site/src/content/api/button-options.json index deffe0c5b..7bdc5371c 100644 --- a/site/src/content/api/button-options.json +++ b/site/src/content/api/button-options.json @@ -6,11 +6,11 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 10, + "memberCount": 15, "counts": { "constructors": 0, "methods": 0, - "properties": 10, + "properties": 15, "events": 0 }, "sections": [ @@ -26,6 +26,51 @@ "id": "properties", "title": "Properties", "members": [ + { + "name": "border", + "signature": "border?: Partial | number", + "signatureTokens": [ + { + "text": "border", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "NineSliceInsets", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Destination border widths for every textured skin entry; defaults to slices." + }, { "name": "color", "signature": "color?: Color", @@ -101,6 +146,31 @@ "returnType": null, "description": "" }, + { + "name": "fit", + "signature": "fit?: UISpriteFit", + "signatureTokens": [ + { + "text": "fit", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UISpriteFit", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "Paint textured skin entries flat with this fit instead of slicing them." + }, { "name": "fontSize", "signature": "fontSize?: number", @@ -201,6 +271,31 @@ "returnType": null, "description": "" }, + { + "name": "modes", + "signature": "modes?: NineSliceModes", + "signatureTokens": [ + { + "text": "modes", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "NineSliceModes", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + }, { "name": "pressedColor", "signature": "pressedColor?: Color", @@ -226,6 +321,108 @@ "returnType": null, "description": "" }, + { + "name": "skin", + "signature": "skin?: Partial>", + "signatureTokens": [ + { + "text": "skin", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Record", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "ButtonState", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "UIBackgroundInput", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "The background per state, each stated as a colour, a texture, a region or a full descriptor. States left out fall back to the theme's button skin." + }, + { + "name": "slices", + "signature": "slices?: Partial | number", + "signatureTokens": [ + { + "text": "slices", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "NineSliceInsets", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Source-texture slice widths for every textured skin entry; defaults to a third per axis." + }, { "name": "textColor", "signature": "textColor?: Color", diff --git a/site/src/content/api/button.json b/site/src/content/api/button.json index 9d715c6fb..ab3ebe45f 100644 --- a/site/src/content/api/button.json +++ b/site/src/content/api/button.json @@ -6,11 +6,11 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 127, + "memberCount": 130, "counts": { "constructors": 1, - "methods": 60, - "properties": 51, + "methods": 62, + "properties": 52, "events": 15 }, "sections": [ @@ -240,6 +240,64 @@ "returnType": "void", "description": "Repaint without re-laying out - for a change that cannot move anything, such as a colour or a state flip. Applied immediately, not batched." }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, + { + "name": "_onChildResized", + "signature": "_onChildResized(): void", + "signatureTokens": [ + { + "text": "_onChildResized", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "React to a child widget's size change. Layout containers override it to re-flow; the default does nothing, so a widget that does not place its children pays nothing for a descendant resize." + }, { "name": "_onEnabledChanged", "signature": "_onEnabledChanged(effectiveEnabled: boolean): void", @@ -2042,7 +2100,7 @@ }, { "name": "setBackground", - "signature": "setBackground(background: UIBackground | null, state: UIWidgetState): this", + "signature": "setBackground(background: UIBackgroundInput | null, state: UIWidgetState, options: UIBackgroundOptions): this", "signatureTokens": [ { "text": "setBackground", @@ -2061,7 +2119,7 @@ "kind": "punctuation" }, { - "text": "UIBackground", + "text": "UIBackgroundInput", "kind": "type" }, { @@ -2088,6 +2146,22 @@ "text": "UIWidgetState", "kind": "type" }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "options", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIBackgroundOptions", + "kind": "type" + }, { "text": ")", "kind": "punctuation" @@ -2104,17 +2178,22 @@ "params": [ { "name": "background", - "type": "UIBackground | null", + "type": "UIBackgroundInput | null", "optional": false }, { "name": "state", "type": "UIWidgetState", "optional": false + }, + { + "name": "options", + "type": "UIBackgroundOptions", + "optional": false } ], "returnType": "this", - "description": "Replace one state's whole background descriptor; null restores the skin's." + "description": "Set one state's background from a colour, a texture, a region or a full descriptor; null returns that state to its skin. A colour becomes a fill override, so the skin's corner radius and border survive it." }, { "name": "setChildIndex", @@ -3259,6 +3338,35 @@ "returnType": null, "description": "Tab-traversal order among focusable nodes in the same focus scope. Lower values are visited first; equal values keep document (tree) order." }, + { + "name": "backgroundNode", + "signature": "backgroundNode: BackgroundNode | null", + "signatureTokens": [ + { + "text": "backgroundNode", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "BackgroundNode", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "The node painting the background, or null while it paints nothing." + }, { "name": "bottom", "signature": "bottom: number", diff --git a/site/src/content/api/container.json b/site/src/content/api/container.json index 38ee89c89..61e430794 100644 --- a/site/src/content/api/container.json +++ b/site/src/content/api/container.json @@ -6,10 +6,10 @@ "subsystem": "rendering", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 93, + "memberCount": 94, "counts": { "constructors": 1, - "methods": 41, + "methods": 42, "properties": 37, "events": 14 }, @@ -69,6 +69,35 @@ "id": "methods", "title": "Methods", "members": [ + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, { "name": "[iterator]", "signature": "[iterator](): IterableIterator", diff --git a/site/src/content/api/dock-container-options.json b/site/src/content/api/dock-container-options.json new file mode 100644 index 000000000..ae19590f5 --- /dev/null +++ b/site/src/content/api/dock-container-options.json @@ -0,0 +1,98 @@ +{ + "title": "DockContainerOptions", + "description": "", + "symbol": "DockContainerOptions", + "kind": "interface", + "subsystem": "ui", + "importPath": "@codexo/exojs", + "tier": "stable", + "memberCount": 2, + "counts": { + "constructors": 0, + "methods": 0, + "properties": 2, + "events": 0 + }, + "sections": [ + { + "id": "import", + "title": "Import", + "members": [], + "paragraphs": [], + "importLine": "import { DockContainerOptions } from '@codexo/exojs'", + "sourceLink": null + }, + { + "id": "properties", + "title": "Properties", + "members": [ + { + "name": "height", + "signature": "height?: number", + "signatureTokens": [ + { + "text": "height", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "width", + "signature": "width?: number", + "signatureTokens": [ + { + "text": "width", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "source", + "title": "Source", + "members": [], + "paragraphs": [], + "importLine": null, + "sourceLink": { + "label": "src/ui/DockContainer.ts", + "href": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/DockContainer.ts" + } + } + ], + "sourcePath": "src/ui/DockContainer.ts", + "sourceUrl": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/DockContainer.ts" +} diff --git a/site/src/content/api/dock-container.json b/site/src/content/api/dock-container.json new file mode 100644 index 000000000..d67ad1a6c --- /dev/null +++ b/site/src/content/api/dock-container.json @@ -0,0 +1,4686 @@ +{ + "title": "DockContainer", + "description": "Layout container that pins children to the edges of its box and gives the remaining space to the centre. Each edge child is sized across the band it docks to - a `'top'` child spans the width that is still free, a `'left'` child the height - and keeps its own extent along the other axis. Bands are taken in the order the children were docked, so docking `'top'` before `'left'` gives the top band the full width and the left band what is left below it. The container re-flows itself whenever a child is added, removed, reordered or resized, and whenever the container is resized.", + "symbol": "DockContainer", + "kind": "class", + "subsystem": "ui", + "importPath": "@codexo/exojs", + "tier": "stable", + "memberCount": 118, + "counts": { + "constructors": 1, + "methods": 60, + "properties": 43, + "events": 14 + }, + "sections": [ + { + "id": "import", + "title": "Import", + "members": [], + "paragraphs": [ + "Layout container that pins children to the edges of its box and gives the remaining space to the centre.", + "Each edge child is sized across the band it docks to - a `'top'` child spans the width that is still free, a `'left'` child the height - and keeps its own extent along the other axis. Bands are taken in the order the children were docked, so docking `'top'` before `'left'` gives the top band the full width and the left band what is left below it.", + "The container re-flows itself whenever a child is added, removed, reordered or resized, and whenever the container is resized." + ], + "importLine": "import { DockContainer } from '@codexo/exojs'", + "sourceLink": null + }, + { + "id": "constructors", + "title": "Constructors", + "members": [ + { + "name": "new", + "signature": "new(options: DockContainerOptions): DockContainer", + "signatureTokens": [ + { + "text": "new", + "kind": "keyword" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "options", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "DockContainerOptions", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "DockContainer", + "kind": "type" + } + ], + "params": [ + { + "name": "options", + "type": "DockContainerOptions", + "optional": false + } + ], + "returnType": "DockContainer", + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "methods", + "title": "Methods", + "members": [ + { + "name": "_applyAnchor", + "signature": "_applyAnchor(containerWidth: number, containerHeight: number): void", + "signatureTokens": [ + { + "text": "_applyAnchor", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "containerWidth", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "containerHeight", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [ + { + "name": "containerWidth", + "type": "number", + "optional": false + }, + { + "name": "containerHeight", + "type": "number", + "optional": false + } + ], + "returnType": "void", + "description": "" + }, + { + "name": "_cascadeTheme", + "signature": "_cascadeTheme(): void", + "signatureTokens": [ + { + "text": "_cascadeTheme", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Push a theme refresh into every themed descendant." + }, + { + "name": "_invalidateLayout", + "signature": "_invalidateLayout(): void", + "signatureTokens": [ + { + "text": "_invalidateLayout", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Re-lay out and repaint, then re-apply screen anchoring. This is the right invalidation for anything a skin's insets or a font size can move, and for every size change." + }, + { + "name": "_invalidatePaint", + "signature": "_invalidatePaint(): void", + "signatureTokens": [ + { + "text": "_invalidatePaint", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Repaint without re-laying out - for a change that cannot move anything, such as a colour or a state flip. Applied immediately, not batched." + }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, + { + "name": "_onChildResized", + "signature": "_onChildResized(): void", + "signatureTokens": [ + { + "text": "_onChildResized", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "React to a child widget's size change. Layout containers override it to re-flow; the default does nothing, so a widget that does not place its children pays nothing for a descendant resize." + }, + { + "name": "_onEnabledChanged", + "signature": "_onEnabledChanged(_effectiveEnabled: boolean): void", + "signatureTokens": [ + { + "text": "_onEnabledChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "_effectiveEnabled", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [ + { + "name": "_effectiveEnabled", + "type": "boolean", + "optional": false + } + ], + "returnType": "void", + "description": "React to an effectiveEnabled change - fired whenever it flips, whether the widget's own enabled flag changed or an ancestor widget's did. Override in subclasses." + }, + { + "name": "_onThemeChanged", + "signature": "_onThemeChanged(): void", + "signatureTokens": [ + { + "text": "_onThemeChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "React to a resolved-theme change. The default re-lays out and repaints; override to re-read skin values that are cached elsewhere first, then call super._onThemeChanged()." + }, + { + "name": "_relayout", + "signature": "_relayout(): void", + "signatureTokens": [ + { + "text": "_relayout", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Re-place size-dependent content and repaint. Override in subclasses that position children; call super._relayout() to keep the repaint." + }, + { + "name": "_repaint", + "signature": "_repaint(): void", + "signatureTokens": [ + { + "text": "_repaint", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Redraw this widget's own painted surfaces for the current size and skin. Override in subclasses that draw a background." + }, + { + "name": "_resolveInheritedTheme", + "signature": "_resolveInheritedTheme(): UITheme", + "signatureTokens": [ + { + "text": "_resolveInheritedTheme", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UITheme", + "kind": "type" + } + ], + "params": [], + "returnType": "UITheme", + "description": "The nearest themed ancestor's theme, or the built-in default when this node has none." + }, + { + "name": "_setSkinState", + "signature": "_setSkinState(state: UIWidgetState): void", + "signatureTokens": [ + { + "text": "_setSkinState", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "state", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIWidgetState", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [ + { + "name": "state", + "type": "UIWidgetState", + "optional": false + } + ], + "returnType": "void", + "description": "Switch the state skins resolve for, repainting when it actually changes." + }, + { + "name": "_skin", + "signature": "_skin(role: UIThemeRole): UISkin", + "signatureTokens": [ + { + "text": "_skin", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "role", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIThemeRole", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UISkin", + "kind": "type" + } + ], + "params": [ + { + "name": "role", + "type": "UIThemeRole", + "optional": false + } + ], + "returnType": "UISkin", + "description": "The skin role paints with in this widget's current state." + }, + { + "name": "[iterator]", + "signature": "[iterator](): IterableIterator", + "signatureTokens": [ + { + "text": "[iterator]", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "IterableIterator", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": "IterableIterator", + "description": "Iterate the same frozen, cached document-order snapshot children returns - mutating the container after obtaining this iterator does not change what it yields (see children's doc comment for the full snapshot/invalidation contract)." + }, + { + "name": "addChild", + "signature": "addChild(children: RenderNode[]): this", + "signatureTokens": [ + { + "text": "addChild", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "children", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": "[]", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "children", + "type": "RenderNode[]", + "optional": false + } + ], + "returnType": "this", + "description": "Append one or more children to the end of the child list. Each child is detached from its previous parent (if any) before being added." + }, + { + "name": "addChildAt", + "signature": "addChildAt(child: RenderNode, index: number): this", + "signatureTokens": [ + { + "text": "addChildAt", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "child", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "index", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "child", + "type": "RenderNode", + "optional": false + }, + { + "name": "index", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "Insert child at index in the child list. The child is detached from any previous parent first. Throws if index is out of bounds, if child has already been destroy()ed, or if child is an ancestor of this container (would create a cycle). Self-as-child is a no-op. When child already belongs to this container the call is a pure reorder: the node keeps its parent, its stage and its keyboard focus." + }, + { + "name": "addFilter", + "signature": "addFilter(filter: Filter): this", + "signatureTokens": [ + { + "text": "addFilter", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "filter", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Filter", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "filter", + "type": "Filter", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "anchorIn", + "signature": "anchorIn(root: UIRoot, anchor: WidgetAnchor, offsetX: number, offsetY: number): this", + "signatureTokens": [ + { + "text": "anchorIn", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "root", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIRoot", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "anchor", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "WidgetAnchor", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "offsetX", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "offsetY", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "root", + "type": "UIRoot", + "optional": false + }, + { + "name": "anchor", + "type": "WidgetAnchor", + "optional": false + }, + { + "name": "offsetX", + "type": "number", + "optional": false + }, + { + "name": "offsetY", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "Anchor this widget within root's screen box at anchor, offset by (offsetX, offsetY). The position is recomputed whenever the screen resizes. E.g. widget.anchorIn(scene.ui, 'bottom-right', -20, -20) pins it to the bottom-right corner with a 20px margin." + }, + { + "name": "blur", + "signature": "blur(): this", + "signatureTokens": [ + { + "text": "blur", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [], + "returnType": "this", + "description": "Release keyboard focus from this node if it currently holds it." + }, + { + "name": "clearFilters", + "signature": "clearFilters(): this", + "signatureTokens": [ + { + "text": "clearFilters", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [], + "returnType": "this", + "description": "" + }, + { + "name": "collidesWith", + "signature": "collidesWith(target: Collidable): CollisionResponse | null", + "signatureTokens": [ + { + "text": "collidesWith", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "target", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Collidable", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "CollisionResponse", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + } + ], + "params": [ + { + "name": "target", + "type": "Collidable", + "optional": false + } + ], + "returnType": "CollisionResponse | null", + "description": "Compute a full CollisionResponse between this shape and target. Returns null in two cases: - the shapes do not overlap, **or** - the specific shape-pair combination does not support response generation (e.g. Line against any shape, Ellipse against Ellipse or Polygon). Use intersectsWith for a universal boolean overlap check that works across all supported shape pairs." + }, + { + "name": "contains", + "signature": "contains(x: number, y: number): boolean", + "signatureTokens": [ + { + "text": "contains", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "x", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "y", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [ + { + "name": "x", + "type": "number", + "optional": false + }, + { + "name": "y", + "type": "number", + "optional": false + } + ], + "returnType": "boolean", + "description": "Hit-test the world-space point (x, y) against this node. For world-axis-aligned nodes (own and inherited rotation a multiple of 90° and no skew) the AABB equals the oriented box, so the cheap getBounds test is exact. For rotated or skewed nodes the point is mapped back into local space with the inverse of the global transform and tested against the untransformed getLocalBounds - i.e. a true oriented-box test. This is the exact inverse of the forward map that getBounds and the renderer use to place the node's corners, so picking matches the rendered quad instead of over-reporting hits in the empty AABB corners of a rotated node." + }, + { + "name": "destroy", + "signature": "destroy(): void", + "signatureTokens": [ + { + "text": "destroy", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Destroy this container and every node beneath it. Ownership is by containment: detaching a subtree only unlinks it, so the descendants' GPU-backed resources (cached textures, filters, render textures) and signal listeners would outlive the tree that owned them and leak on every scene change." + }, + { + "name": "dock", + "signature": "dock(child: RenderNode, region: DockRegion): this", + "signatureTokens": [ + { + "text": "dock", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "child", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "region", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "DockRegion", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "child", + "type": "RenderNode", + "optional": false + }, + { + "name": "region", + "type": "DockRegion", + "optional": false + } + ], + "returnType": "this", + "description": "Add child (if it is not already here) and dock it in region." + }, + { + "name": "focus", + "signature": "focus(): this", + "signatureTokens": [ + { + "text": "focus", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [], + "returnType": "this", + "description": "Request keyboard focus for this node through its owning focus service." + }, + { + "name": "getBounds", + "signature": "getBounds(out?: Rectangle): Rectangle", + "signatureTokens": [ + { + "text": "getBounds", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "out", + "kind": "param" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Rectangle", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Rectangle", + "kind": "type" + } + ], + "params": [ + { + "name": "out", + "type": "Rectangle", + "optional": true + } + ], + "returnType": "Rectangle", + "description": "Axis-aligned bounding box of this node in its GLOBAL-transform space. That is world space for ordinary nodes, but GROUP-LOCAL space for nodes inside an engaged RetainedContainer transform group (the group matrix is applied on the GPU, not here) - this is deliberate and matches the rendering convention. For a true world-space extent of such a node, lift this rect by the group's getWorldTransform matrix. Pass out to receive a copy you own. Without it the return value is this node's **cached** rectangle, rebuilt in place whenever the transform or the local extent changes - retaining it across frames hands you a value that silently moves. The cache is why the no-arg form does not allocate: this runs per node per frame for culling and hit-testing." + }, + { + "name": "getChildAt", + "signature": "getChildAt(index: number): RenderNode", + "signatureTokens": [ + { + "text": "getChildAt", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "index", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + } + ], + "params": [ + { + "name": "index", + "type": "number", + "optional": false + } + ], + "returnType": "RenderNode", + "description": "" + }, + { + "name": "getChildIndex", + "signature": "getChildIndex(child: RenderNode): number", + "signatureTokens": [ + { + "text": "getChildIndex", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "child", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [ + { + "name": "child", + "type": "RenderNode", + "optional": false + } + ], + "returnType": "number", + "description": "" + }, + { + "name": "getGlobalTransform", + "signature": "getGlobalTransform(): Matrix", + "signatureTokens": [ + { + "text": "getGlobalTransform", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Matrix", + "kind": "type" + } + ], + "params": [], + "returnType": "Matrix", + "description": "" + }, + { + "name": "getLocalBounds", + "signature": "getLocalBounds(): ReadonlyRectangle", + "signatureTokens": [ + { + "text": "getLocalBounds", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "ReadonlyRectangle", + "kind": "type" + } + ], + "params": [], + "returnType": "ReadonlyRectangle", + "description": "This node's untransformed extent in its own local coordinate space. Returns the LIVE internal rectangle, not a copy: it is read on hot paths (updateBounds re-reads it on every transform-dirty recompute, i.e. potentially every frame for a moving node), so copying it here would add a per-frame allocation. It is therefore typed as a ReadonlyRectangle - reads are unchanged, writes are rejected at compile time. Writing to it directly would skip the bounds/content invalidation the engine needs, leaving culling, hit-testing and retained render fragments on a stale extent. A custom Drawable that owns its own size sets it through _setLocalBounds, which writes and invalidates in one step." + }, + { + "name": "getNormals", + "signature": "getNormals(): Vector[]", + "signatureTokens": [ + { + "text": "getNormals", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Vector", + "kind": "type" + }, + { + "text": "[]", + "kind": "punctuation" + } + ], + "params": [], + "returnType": "Vector[]", + "description": "Return the outward-facing edge normals used by the SAT solver. The array should be cached and reused across calls." + }, + { + "name": "getTransform", + "signature": "getTransform(): Matrix", + "signatureTokens": [ + { + "text": "getTransform", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Matrix", + "kind": "type" + } + ], + "params": [], + "returnType": "Matrix", + "description": "" + }, + { + "name": "getWorldTransform", + "signature": "getWorldTransform(): Matrix", + "signatureTokens": [ + { + "text": "getWorldTransform", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Matrix", + "kind": "type" + } + ], + "params": [], + "returnType": "Matrix", + "description": "The node's TRUE world-space transform, composed through every transform-group boundary (RetainedContainer) in the ancestor chain. getGlobalTransform deliberately stops at the nearest engaged boundary (descendants resolve group-RELATIVE transforms; the renderer multiplies the group matrix back in on the GPU), so it is the right space for rendering but the wrong one for spatial queries. Use THIS accessor whenever a real world position/orientation is needed - picking, spatial audio, physics, world-space math against nodes outside the group. Without any engaged boundary ancestor it returns the exact getGlobalTransform matrix (same instance, no extra work). With one, it lazily caches groupLocal × groupWorld and revalidates on read via version/stamp compares - including runtime space flips such as RetainedContainer's deep-barrier sub-branch escape." + }, + { + "name": "intersectsWith", + "signature": "intersectsWith(target: Collidable): boolean", + "signatureTokens": [ + { + "text": "intersectsWith", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "target", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Collidable", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [ + { + "name": "target", + "type": "Collidable", + "optional": false + } + ], + "returnType": "boolean", + "description": "Test whether this shape overlaps target using a fast boolean algorithm (no penetration depth or normal computed). Prefer this over collidesWith when only the yes/no result is needed." + }, + { + "name": "invalidateCache", + "signature": "invalidateCache(): this", + "signatureTokens": [ + { + "text": "invalidateCache", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [], + "returnType": "this", + "description": "" + }, + { + "name": "invalidateContent", + "signature": "invalidateContent(): this", + "signatureTokens": [ + { + "text": "invalidateContent", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [], + "returnType": "this", + "description": "Mark this node's visual content dirty without going through a standard setter - e.g. a custom Drawable subclass backed by externally mutable data (the pattern TileChunkNode in @codexo/exojs-tilemap already uses via its own _chunk.revision compare). Call this after mutating such state so the Track-B retained-plan skip does not serve a stale frame for this node." + }, + { + "name": "inView", + "signature": "inView(view: View): boolean", + "signatureTokens": [ + { + "text": "inView", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "view", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "View", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [ + { + "name": "view", + "type": "View", + "optional": false + } + ], + "returnType": "boolean", + "description": "" + }, + { + "name": "layout", + "signature": "layout(): this", + "signatureTokens": [ + { + "text": "layout", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [], + "returnType": "this", + "description": "Re-place children in their regions." + }, + { + "name": "move", + "signature": "move(x: number, y: number): this", + "signatureTokens": [ + { + "text": "move", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "x", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "y", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "x", + "type": "number", + "optional": false + }, + { + "name": "y", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "project", + "signature": "project(axis: Vector, result: Interval): Interval", + "signatureTokens": [ + { + "text": "project", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "axis", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Vector", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "result", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Interval", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Interval", + "kind": "type" + } + ], + "params": [ + { + "name": "axis", + "type": "Vector", + "optional": false + }, + { + "name": "result", + "type": "Interval", + "optional": false + } + ], + "returnType": "Interval", + "description": "Project this shape onto axis and write the scalar min/max into interval. Used internally by the SAT solver." + }, + { + "name": "regionOf", + "signature": "regionOf(child: RenderNode): DockRegion | null", + "signatureTokens": [ + { + "text": "regionOf", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "child", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "DockRegion", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + } + ], + "params": [ + { + "name": "child", + "type": "RenderNode", + "optional": false + } + ], + "returnType": "DockRegion | null", + "description": "The region child is laid out in, or null when it is not a child of this container. A child added without DockContainer.dock takes the centre." + }, + { + "name": "removeChild", + "signature": "removeChild(child: RenderNode): this", + "signatureTokens": [ + { + "text": "removeChild", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "child", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "child", + "type": "RenderNode", + "optional": false + } + ], + "returnType": "this", + "description": "Remove child from this container. No-op if not present." + }, + { + "name": "removeChildAt", + "signature": "removeChildAt(index: number): this", + "signatureTokens": [ + { + "text": "removeChildAt", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "index", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "index", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "removeChildren", + "signature": "removeChildren(begin: number, end: number): this", + "signatureTokens": [ + { + "text": "removeChildren", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "begin", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "end", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "begin", + "type": "number", + "optional": false + }, + { + "name": "end", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "Remove children in the half-open range [begin, end). Defaults to the entire child list. Throws if the range is invalid." + }, + { + "name": "removeFilter", + "signature": "removeFilter(filter: Filter): this", + "signatureTokens": [ + { + "text": "removeFilter", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "filter", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Filter", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "filter", + "type": "Filter", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "render", + "signature": "render(backend: RenderBackend): this", + "signatureTokens": [ + { + "text": "render", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "backend", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderBackend", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "backend", + "type": "RenderBackend", + "optional": false + } + ], + "returnType": "this", + "description": "Raw rendering entry point. Direct backend access - bypasses the RenderPlan pipeline machinery. Prefer the high-level RenderingContext.render path via the owning RenderingContext wherever possible." + }, + { + "name": "rotate", + "signature": "rotate(degrees: number): this", + "signatureTokens": [ + { + "text": "rotate", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "degrees", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "degrees", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "setChildIndex", + "signature": "setChildIndex(child: RenderNode, index: number): this", + "signatureTokens": [ + { + "text": "setChildIndex", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "child", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "index", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "child", + "type": "RenderNode", + "optional": false + }, + { + "name": "index", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "setOrigin", + "signature": "setOrigin(x: number, y: number): this", + "signatureTokens": [ + { + "text": "setOrigin", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "x", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "y", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "x", + "type": "number", + "optional": false + }, + { + "name": "y", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "setPosition", + "signature": "setPosition(x: number, y: number): this", + "signatureTokens": [ + { + "text": "setPosition", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "x", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "y", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "x", + "type": "number", + "optional": false + }, + { + "name": "y", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "setRotation", + "signature": "setRotation(degrees: number): this", + "signatureTokens": [ + { + "text": "setRotation", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "degrees", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "degrees", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "setScale", + "signature": "setScale(x: number, y: number): this", + "signatureTokens": [ + { + "text": "setScale", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "x", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "y", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "x", + "type": "number", + "optional": false + }, + { + "name": "y", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "setSize", + "signature": "setSize(width: number, height: number): this", + "signatureTokens": [ + { + "text": "setSize", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "width", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "height", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "width", + "type": "number", + "optional": false + }, + { + "name": "height", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "Set the widget's layout size; triggers a redraw and re-anchors if anchored." + }, + { + "name": "setSkew", + "signature": "setSkew(x: number, y: number): this", + "signatureTokens": [ + { + "text": "setSkew", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "x", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "y", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "x", + "type": "number", + "optional": false + }, + { + "name": "y", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "setTheme", + "signature": "setTheme(patch: Partial>>>>>> | null): this", + "signatureTokens": [ + { + "text": "setTheme", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "patch", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Readonly", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Record", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "UIThemeRole", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Readonly", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Record", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "UIWidgetState", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "UISkin", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "patch", + "type": "Partial>>>>>> | null", + "optional": false + } + ], + "returnType": "this", + "description": "Override parts of the inherited theme for this widget and its descendants. null clears the override. Repaints and re-lays out every widget in the subtree that the change reaches - skin insets are layout input, so a theme change is never paint-only." + }, + { + "name": "swapChildren", + "signature": "swapChildren(firstChild: RenderNode, secondChild: RenderNode): this", + "signatureTokens": [ + { + "text": "swapChildren", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "firstChild", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "secondChild", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "firstChild", + "type": "RenderNode", + "optional": false + }, + { + "name": "secondChild", + "type": "RenderNode", + "optional": false + } + ], + "returnType": "this", + "description": "" + }, + { + "name": "updateBounds", + "signature": "updateBounds(): this", + "signatureTokens": [ + { + "text": "updateBounds", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [], + "returnType": "this", + "description": "" + }, + { + "name": "updateParentTransform", + "signature": "updateParentTransform(): this", + "signatureTokens": [ + { + "text": "updateParentTransform", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [], + "returnType": "this", + "description": "" + }, + { + "name": "updateTransform", + "signature": "updateTransform(): this", + "signatureTokens": [ + { + "text": "updateTransform", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [], + "returnType": "this", + "description": "" + }, + { + "name": "setInternalSpriteFactory", + "signature": "setInternalSpriteFactory(factory: () => RenderNodeSpriteLike | null): void", + "signatureTokens": [ + { + "text": "setInternalSpriteFactory", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "factory", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ") => ", + "kind": "punctuation" + }, + { + "text": "RenderNodeSpriteLike", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [ + { + "name": "factory", + "type": "() => RenderNodeSpriteLike | null", + "optional": false + } + ], + "returnType": "void", + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "properties", + "title": "Properties", + "members": [ + { + "name": "collisionType", + "signature": "collisionType: CollisionType", + "signatureTokens": [ + { + "text": "collisionType", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "CollisionType", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "cursor", + "signature": "cursor: null | string", + "signatureTokens": [ + { + "text": "cursor", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "draggable", + "signature": "draggable: boolean", + "signatureTokens": [ + { + "text": "draggable", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "When true and interactive is also true, this node will be automatically repositioned to follow the pointer during a drag gesture. The framework captures the pointer offset at drag-start so the node doesn't snap to the cursor position. Both interactive and draggable must be set for dragging to work - a draggable but non-interactive node will never receive pointerdown and therefore cannot start a drag." + }, + { + "name": "flags", + "signature": "flags: Flags", + "signatureTokens": [ + { + "text": "flags", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Flags", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "SceneNodeTransformFlags", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "focusable", + "signature": "focusable: boolean", + "signatureTokens": [ + { + "text": "focusable", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "When true, this node can receive keyboard focus - via focus, Tab traversal, or app.interaction.focus(node) - and is delivered key events through onKeyDown / onKeyUp while focused, or while any of its descendants holds focus (key events bubble up the parent chain like pointer InteractionEvents do). A Widget additionally has to be enabled: disabling one takes it out of the Tab order and rejects programmatic focus, without touching this flag." + }, + { + "name": "name", + "signature": "name: null | string", + "signatureTokens": [ + { + "text": "name", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Optional human-readable identity for this node. Defaults to null. Purely a label the engine never interprets: useful for debugging, find-by-name lookups, prefab references, and as a stable key when merging serialized state back onto an existing tree. Not required to be unique." + }, + { + "name": "tabIndex", + "signature": "tabIndex: number", + "signatureTokens": [ + { + "text": "tabIndex", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Tab-traversal order among focusable nodes in the same focus scope. Lower values are visited first; equal values keep document (tree) order." + }, + { + "name": "bottom", + "signature": "bottom: number", + "signatureTokens": [ + { + "text": "bottom", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Bottommost edge of the subtree - see left." + }, + { + "name": "cacheAsTexture", + "signature": "cacheAsTexture: boolean", + "signatureTokens": [ + { + "text": "cacheAsTexture", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Bake this node's subtree into a RenderTexture once and replay that texture until the subtree changes, instead of walking and drawing it every frame. Worth it for a subtree that is expensive to draw and rarely changes. The cache is invalidated by anything that moves the node's world bounds - the node's own transform included - so a node that animates re-bakes every frame and is strictly slower than not caching it at all. Setting it to false frees the texture immediately." + }, + { + "name": "cacheResolution", + "signature": "cacheResolution: TargetResolution", + "signatureTokens": [ + { + "text": "cacheResolution", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "TargetResolution", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "Resolution the cacheAsTexture texture is baked at, in device pixels per logical unit. 'inherit' (the default) matches the surface the cache is composited into, so enabling the cache does not soften the picture on a HiDPI display. Pin it to a number to trade sharpness for memory and bake cost - a cache is resolution² texels, so 1 on a DPR-3 phone is a ninth of the VRAM and a ninth of the fill per re-bake. Changing it invalidates the cache." + }, + { + "name": "children", + "signature": "children: readonly RenderNode[]", + "signatureTokens": [ + { + "text": "children", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "readonly", + "kind": "keyword" + }, + { + "text": " ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": "[]", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "Snapshot of the current children in document order. Frozen and cached - repeated reads return the same array reference until the next structural change (addChild/removeChild/setChildIndex/ swapChildren/etc.), which invalidates it. A reference to a previous snapshot is unaffected by later changes - it keeps reflecting the child list as it was at the time of the read. Mutating methods (push, splice, ...) throw in normal (strict-mode) usage; go through addChild/removeChild instead so parent linkage, stage propagation, and bounds invalidation stay consistent." + }, + { + "name": "clip", + "signature": "clip: boolean", + "signatureTokens": [ + { + "text": "clip", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "When true, descendants are geometrically clipped to clipShape. Unlike mask (which is alpha/visibility masking), clip is a hard geometric boundary: - clipShape === null - clip to this node's world-space bounds (getBounds), using the GPU scissor fast path. - clipShape is a Rectangle - clip to that world-space rectangle via scissor. - clipShape is a Geometry - clip to the geometry's silhouette via the stencil buffer (WebGL2). Only fragments inside the shape survive. Clipping wraps the node's final (filtered/masked) output and acts as a render barrier: draw commands are never reordered or batched across the clip boundary." + }, + { + "name": "clipShape", + "signature": "clipShape: Geometry | Rectangle | null", + "signatureTokens": [ + { + "text": "clipShape", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Geometry", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "Rectangle", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Clip region used when clip is true. A Rectangle (or null for the node's bounds) maps to the scissor fast path; a Geometry maps to the stencil path. Has no effect while clip is false." + }, + { + "name": "cullable", + "signature": "cullable: boolean", + "signatureTokens": [ + { + "text": "cullable", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "When false, this node is never culled by the viewport check and is always considered in-view. Defaults to true." + }, + { + "name": "cullArea", + "signature": "cullArea: Rectangle | null", + "signatureTokens": [ + { + "text": "cullArea", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Rectangle", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Custom rectangle used for viewport cull intersection test. When set, replaces the default node bounds in cull checks. Set to null to restore default bounds-based culling." + }, + { + "name": "destroyed", + "signature": "destroyed: boolean", + "signatureTokens": [ + { + "text": "destroyed", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "true once destroy has run on this node. A destroyed node has released its pooled resources (transform/bounds), has been unlinked from its parent, renders nothing, and must not be reused or re-attached. The render plan skips a destroyed node, so even one handed straight to a renderer as a detached root contributes nothing." + }, + { + "name": "effectiveEnabled", + "signature": "effectiveEnabled: boolean", + "signatureTokens": [ + { + "text": "effectiveEnabled", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Whether the widget responds to input right now: its own enabled flag AND every Widget ancestor's - ownEnabled && parent.effectiveEnabled. This is what interaction (e.g. Button activation) and keyboard focus actually gate on. Disabled widgets typically dim and ignore clicks, and are skipped by keyboard focus - they drop out of the Tab order and reject programmatic focus while effectively disabled. Disabling a container widget does not touch its children's OWN enabled flag - only their effective state. Re-enabling the container makes a child whose own flag was never touched effectively enabled again automatically." + }, + { + "name": "enabled", + "signature": "enabled: boolean", + "signatureTokens": [ + { + "text": "enabled", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "The widget's own enabled flag, independent of any ancestor's. Disabling a container widget does not change this on its children - see effectiveEnabled for the value interaction and keyboard focus actually consult, and for what disabling a container does to them." + }, + { + "name": "filters", + "signature": "filters: readonly Filter[]", + "signatureTokens": [ + { + "text": "filters", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "readonly", + "kind": "keyword" + }, + { + "text": " ", + "kind": "punctuation" + }, + { + "text": "Filter", + "kind": "type" + }, + { + "text": "[]", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "height", + "signature": "height: number", + "signatureTokens": [ + { + "text": "height", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Rendered height of the whole subtree - see width." + }, + { + "name": "interactive", + "signature": "interactive: boolean", + "signatureTokens": [ + { + "text": "interactive", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "isAlignedBox", + "signature": "isAlignedBox: boolean", + "signatureTokens": [ + { + "text": "isAlignedBox", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "left", + "signature": "left: number", + "signatureTokens": [ + { + "text": "left", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Leftmost edge of the subtree in the node's global-transform space. These four edges are read straight off the aggregate bounds so they always span exactly width/height and agree with each other. They cannot be reconstructed from position and origin: origin is in local pixels and a container's own local bounds are empty, so the rendered extent comes entirely from the children." + }, + { + "name": "mask", + "signature": "mask: MaskSource", + "signatureTokens": [ + { + "text": "mask", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "MaskSource", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "The mask source that controls visibility of this node's render output. See MaskSource for accepted source types and their semantics. Setting to null removes any active mask. Setting a RenderNode that is this is rejected (a node cannot mask itself). Indirect cycles (a.mask = b; b.mask = a) are rejected as well: the candidate's mask chain is walked and any cycle - whether it closes on this or was already present in the chain - fails the assignment." + }, + { + "name": "origin", + "signature": "origin: ObservableVector", + "signatureTokens": [ + { + "text": "origin", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "ObservableVector", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "parent", + "signature": "parent: Container | null", + "signatureTokens": [ + { + "text": "parent", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Container", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "position", + "signature": "position: ObservableVector", + "signatureTokens": [ + { + "text": "position", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "ObservableVector", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "preserveDrawOrder", + "signature": "preserveDrawOrder: boolean", + "signatureTokens": [ + { + "text": "preserveDrawOrder", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "When true, material-aware overlap reordering is disabled for this node's draw-order scope. Draw commands are submitted in exact document order (after scope-local z-sorting), preserving the painter's guarantee irrespective of material compatibility or AABB safety analysis. Adjacency coalescing of consecutive same-material draws still applies; it does not change visual output order." + }, + { + "name": "right", + "signature": "right: number", + "signatureTokens": [ + { + "text": "right", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Rightmost edge of the subtree - see left." + }, + { + "name": "rotation", + "signature": "rotation: number", + "signatureTokens": [ + { + "text": "rotation", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Rotation angle in degrees. Wraps via trimRotation on assignment." + }, + { + "name": "scale", + "signature": "scale: ObservableVector", + "signatureTokens": [ + { + "text": "scale", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "ObservableVector", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "skewX", + "signature": "skewX: number", + "signatureTokens": [ + { + "text": "skewX", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Horizontal skew angle in degrees. Shears the node along the X axis (positive values lean the top edge right). Combines correctly with rotation and scale." + }, + { + "name": "skewY", + "signature": "skewY: number", + "signatureTokens": [ + { + "text": "skewY", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Vertical skew angle in degrees. Shears the node along the Y axis (positive values lean the left edge downward). Combines correctly with rotation and scale." + }, + { + "name": "theme", + "signature": "theme: UITheme", + "signatureTokens": [ + { + "text": "theme", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UITheme", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "The theme in effect for this node and everything below it." + }, + { + "name": "themeOverrides", + "signature": "themeOverrides: Partial>>>>>> | null", + "signatureTokens": [ + { + "text": "themeOverrides", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Readonly", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Record", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "UIThemeRole", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Readonly", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "Record", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "UIWidgetState", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "UISkin", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "This widget's own theme overrides, or null when it purely inherits." + }, + { + "name": "top", + "signature": "top: number", + "signatureTokens": [ + { + "text": "top", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Topmost edge of the subtree - see left." + }, + { + "name": "uiHeight", + "signature": "uiHeight: number", + "signatureTokens": [ + { + "text": "uiHeight", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Explicit layout height in pixels (not derived from children or scale)." + }, + { + "name": "uiWidth", + "signature": "uiWidth: number", + "signatureTokens": [ + { + "text": "uiWidth", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Explicit layout width in pixels (not derived from children or scale)." + }, + { + "name": "visible", + "signature": "visible: boolean", + "signatureTokens": [ + { + "text": "visible", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "boolean", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "width", + "signature": "width: number", + "signatureTokens": [ + { + "text": "width", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Rendered width of the whole subtree, in the node's global-transform space. Unlike Sprite.width - which scales an unscaled texture frame - a container has no intrinsic local size, so this reads the aggregate bounds directly. Those are already scaled, so multiplying by scale again would count it twice. Writing rescales scale.x to make the subtree render at the requested width." + }, + { + "name": "x", + "signature": "x: number", + "signatureTokens": [ + { + "text": "x", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "y", + "signature": "y: number", + "signatureTokens": [ + { + "text": "y", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "zIndex", + "signature": "zIndex: number", + "signatureTokens": [ + { + "text": "zIndex", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "events", + "title": "Events", + "members": [ + { + "name": "onBlur", + "signature": "onBlur: Signal<[RenderNode]>", + "signatureTokens": [ + { + "text": "onBlur", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "Fired when this node loses keyboard focus." + }, + { + "name": "onContextMenu", + "signature": "onContextMenu: Signal<[InteractionEvent]>", + "signatureTokens": [ + { + "text": "onContextMenu", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "InteractionEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "Fired when a pointer requests a context menu over this node - right-click, or a long-press/touch gesture that has an attributable pointer. Bubbles like the other pointer events, so a scene-wide fallback can listen on an ancestor. Carries no native event - whether the browser's own menu appears is decided by ApplicationOptions.input.allowNativeContextMenu, independently of this. Requires an attributable pointer: a pointerless keyboard-only request (the context-menu key, or Shift+F10, with no pointer ever having touched the surface - see ContextMenuRequest's doc comment) has nothing to hit-test or bubble with, so it never reaches this per-node event. It only ever reaches the engine-wide, scene-graph-independent app.input.onContextMenu." + }, + { + "name": "onDrag", + "signature": "onDrag: Signal<[InteractionEvent]>", + "signatureTokens": [ + { + "text": "onDrag", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "InteractionEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "Fired on every pointer-move while this node is being dragged. Does not bubble." + }, + { + "name": "onDragEnd", + "signature": "onDragEnd: Signal<[InteractionEvent]>", + "signatureTokens": [ + { + "text": "onDragEnd", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "InteractionEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "Fired when the drag gesture ends (pointer-up or cancel). Does not bubble." + }, + { + "name": "onDragStart", + "signature": "onDragStart: Signal<[InteractionEvent]>", + "signatureTokens": [ + { + "text": "onDragStart", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "InteractionEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "Fired once when a drag gesture begins on this node. Does not bubble." + }, + { + "name": "onFocus", + "signature": "onFocus: Signal<[RenderNode]>", + "signatureTokens": [ + { + "text": "onFocus", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "Fired when this node gains keyboard focus." + }, + { + "name": "onKeyDown", + "signature": "onKeyDown: Signal<[KeyEvent]>", + "signatureTokens": [ + { + "text": "onKeyDown", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "KeyEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "Fired for each key pressed while this node - or a descendant of it - holds focus. Bubbles; see KeyEvent." + }, + { + "name": "onKeyUp", + "signature": "onKeyUp: Signal<[KeyEvent]>", + "signatureTokens": [ + { + "text": "onKeyUp", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "KeyEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "Fired for each key released while this node - or a descendant of it - holds focus. Bubbles; see KeyEvent." + }, + { + "name": "onPointerDown", + "signature": "onPointerDown: Signal<[InteractionEvent]>", + "signatureTokens": [ + { + "text": "onPointerDown", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "InteractionEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "onPointerMove", + "signature": "onPointerMove: Signal<[InteractionEvent]>", + "signatureTokens": [ + { + "text": "onPointerMove", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "InteractionEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "onPointerOut", + "signature": "onPointerOut: Signal<[InteractionEvent]>", + "signatureTokens": [ + { + "text": "onPointerOut", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "InteractionEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "onPointerOver", + "signature": "onPointerOver: Signal<[InteractionEvent]>", + "signatureTokens": [ + { + "text": "onPointerOver", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "InteractionEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "onPointerTap", + "signature": "onPointerTap: Signal<[InteractionEvent]>", + "signatureTokens": [ + { + "text": "onPointerTap", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "InteractionEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "onPointerUp", + "signature": "onPointerUp: Signal<[InteractionEvent]>", + "signatureTokens": [ + { + "text": "onPointerUp", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Signal", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "InteractionEvent", + "kind": "type" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ">", + "kind": "punctuation" + } + ], + "params": [], + "returnType": null, + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "source", + "title": "Source", + "members": [], + "paragraphs": [], + "importLine": null, + "sourceLink": { + "label": "src/ui/DockContainer.ts", + "href": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/DockContainer.ts" + } + } + ], + "sourcePath": "src/ui/DockContainer.ts", + "sourceUrl": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/DockContainer.ts" +} diff --git a/site/src/content/api/dock-region.json b/site/src/content/api/dock-region.json new file mode 100644 index 000000000..0aebaa687 --- /dev/null +++ b/site/src/content/api/dock-region.json @@ -0,0 +1,95 @@ +{ + "title": "DockRegion", + "description": "Where a DockContainer places a child.", + "symbol": "DockRegion", + "kind": "type", + "subsystem": "ui", + "importPath": "@codexo/exojs", + "tier": "stable", + "memberCount": 0, + "counts": { + "constructors": 0, + "methods": 0, + "properties": 0, + "events": 0 + }, + "sections": [ + { + "id": "import", + "title": "Import", + "members": [], + "paragraphs": [ + "Where a DockContainer places a child." + ], + "importLine": "import { DockRegion } from '@codexo/exojs'", + "sourceLink": null + }, + { + "id": "definition", + "title": "Definition", + "members": [ + { + "name": "DockRegion", + "signature": "\"bottom\" | \"center\" | \"left\" | \"right\" | \"top\"", + "signatureTokens": [ + { + "text": "\"bottom\"", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "\"center\"", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "\"left\"", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "\"right\"", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "\"top\"", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "source", + "title": "Source", + "members": [], + "paragraphs": [], + "importLine": null, + "sourceLink": { + "label": "src/ui/DockContainer.ts", + "href": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/DockContainer.ts" + } + } + ], + "sourcePath": "src/ui/DockContainer.ts", + "sourceUrl": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/DockContainer.ts" +} diff --git a/site/src/content/api/functions.json b/site/src/content/api/functions.json index a9583ceb4..b50304506 100644 --- a/site/src/content/api/functions.json +++ b/site/src/content/api/functions.json @@ -6,10 +6,10 @@ "subsystem": "core", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 76, + "memberCount": 77, "counts": { "constructors": 0, - "methods": 44, + "methods": 45, "properties": 32, "events": 0 }, @@ -821,6 +821,90 @@ "returnType": "GamepadMapping", "description": "Nintendo Switch Pro Controller over USB or Bluetooth. Index 17 is the Capture button (SWITCH_PRO_BUTTON_CAPTURE == BUTTON_INDEX_COUNT); Home maps to Guide, Minus/Plus to Select/Start. Some browsers only recognise the controller after it has been paired through Steam or a dedicated driver." }, + { + "name": "createUIBackground", + "signature": "createUIBackground(source: Texture | TextureRegion | UIBackground, options: UIBackgroundOptions): UIBackground", + "signatureTokens": [ + { + "text": "createUIBackground", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "source", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Texture", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "TextureRegion", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "UIBackground", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "options", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIBackgroundOptions", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIBackground", + "kind": "type" + } + ], + "params": [ + { + "name": "source", + "type": "Texture | TextureRegion | UIBackground", + "optional": false + }, + { + "name": "options", + "type": "UIBackgroundOptions", + "optional": false + } + ], + "returnType": "UIBackground", + "description": "Normalise a texture, region or descriptor into a background descriptor. A texture becomes a nine-slice whose slices default to a third of the source per axis, so a frame is usable without measuring it first; a real skin states its slices. A source edge under three pixels degenerates to a slice of zero, which stretches that axis rather than failing. Passing fit paints the texture flat instead, and a descriptor is returned unchanged." + }, { "name": "createUITheme", "signature": "createUITheme(patch: UIThemePatch, base: UITheme): UITheme", diff --git a/site/src/content/api/graphics.json b/site/src/content/api/graphics.json index ae3925b91..1be18b6cc 100644 --- a/site/src/content/api/graphics.json +++ b/site/src/content/api/graphics.json @@ -6,10 +6,10 @@ "subsystem": "rendering", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 114, + "memberCount": 115, "counts": { "constructors": 1, - "methods": 56, + "methods": 57, "properties": 43, "events": 14 }, @@ -70,6 +70,35 @@ "id": "methods", "title": "Methods", "members": [ + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, { "name": "[iterator]", "signature": "[iterator](): IterableIterator", diff --git a/site/src/content/api/htmltext.json b/site/src/content/api/htmltext.json index 44305dd4a..bc15f3d8a 100644 --- a/site/src/content/api/htmltext.json +++ b/site/src/content/api/htmltext.json @@ -6,10 +6,10 @@ "subsystem": "rendering", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 100, + "memberCount": 101, "counts": { "constructors": 1, - "methods": 44, + "methods": 45, "properties": 41, "events": 14 }, @@ -109,6 +109,35 @@ "id": "methods", "title": "Methods", "members": [ + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, { "name": "[iterator]", "signature": "[iterator](): IterableIterator", diff --git a/site/src/content/api/image-layer-node.json b/site/src/content/api/image-layer-node.json index d5d4ebcd7..5e582d784 100644 --- a/site/src/content/api/image-layer-node.json +++ b/site/src/content/api/image-layer-node.json @@ -6,10 +6,10 @@ "subsystem": "tilemap", "importPath": "@codexo/exojs-tilemap", "tier": "advanced", - "memberCount": 95, + "memberCount": 96, "counts": { "constructors": 1, - "methods": 41, + "methods": 42, "properties": 39, "events": 14 }, @@ -88,6 +88,35 @@ "id": "methods", "title": "Methods", "members": [ + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, { "name": "[iterator]", "signature": "[iterator](): IterableIterator", diff --git a/site/src/content/api/label.json b/site/src/content/api/label.json index c234b8a1e..0b049da88 100644 --- a/site/src/content/api/label.json +++ b/site/src/content/api/label.json @@ -6,10 +6,10 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 117, + "memberCount": 119, "counts": { "constructors": 1, - "methods": 56, + "methods": 58, "properties": 46, "events": 14 }, @@ -261,6 +261,64 @@ "returnType": "void", "description": "Repaint without re-laying out - for a change that cannot move anything, such as a colour or a state flip. Applied immediately, not batched." }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, + { + "name": "_onChildResized", + "signature": "_onChildResized(): void", + "signatureTokens": [ + { + "text": "_onChildResized", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "React to a child widget's size change. Layout containers override it to re-flow; the default does nothing, so a widget that does not place its children pays nothing for a descendant resize." + }, { "name": "_onEnabledChanged", "signature": "_onEnabledChanged(_effectiveEnabled: boolean): void", diff --git a/site/src/content/api/panel-options.json b/site/src/content/api/panel-options.json index 55d1bf986..e3bba68a4 100644 --- a/site/src/content/api/panel-options.json +++ b/site/src/content/api/panel-options.json @@ -6,11 +6,11 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 7, + "memberCount": 11, "counts": { "constructors": 0, "methods": 0, - "properties": 7, + "properties": 11, "events": 0 }, "sections": [ @@ -28,7 +28,7 @@ "members": [ { "name": "background", - "signature": "background?: UIBackground", + "signature": "background?: UIBackgroundInput", "signatureTokens": [ { "text": "background", @@ -43,13 +43,58 @@ "kind": "punctuation" }, { - "text": "UIBackground", + "text": "UIBackgroundInput", "kind": "type" } ], "params": [], "returnType": null, - "description": "Whole-background override, e.g. a nine-slice skin, replacing the theme's." + "description": "The panel's background, stated as a colour, a texture, a region or a full descriptor. A colour overrides the skin's fill and keeps the rest of it; anything else replaces the skin's background outright." + }, + { + "name": "border", + "signature": "border?: Partial | number", + "signatureTokens": [ + { + "text": "border", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "NineSliceInsets", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Destination border widths for a texture background; defaults to slices." }, { "name": "borderColor", @@ -151,6 +196,31 @@ "returnType": null, "description": "" }, + { + "name": "fit", + "signature": "fit?: UISpriteFit", + "signatureTokens": [ + { + "text": "fit", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UISpriteFit", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "Paint a texture background flat with this fit instead of slicing it." + }, { "name": "height", "signature": "height?: number", @@ -176,6 +246,76 @@ "returnType": null, "description": "" }, + { + "name": "modes", + "signature": "modes?: NineSliceModes", + "signatureTokens": [ + { + "text": "modes", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "NineSliceModes", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "slices", + "signature": "slices?: Partial | number", + "signatureTokens": [ + { + "text": "slices", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "NineSliceInsets", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Source-texture slice widths for a texture background; defaults to a third per axis." + }, { "name": "width", "signature": "width?: number", diff --git a/site/src/content/api/panel.json b/site/src/content/api/panel.json index 5a22b0d8c..226bff644 100644 --- a/site/src/content/api/panel.json +++ b/site/src/content/api/panel.json @@ -6,10 +6,10 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 122, + "memberCount": 124, "counts": { "constructors": 1, - "methods": 57, + "methods": 59, "properties": 50, "events": 14 }, @@ -240,6 +240,64 @@ "returnType": "void", "description": "Repaint without re-laying out - for a change that cannot move anything, such as a colour or a state flip. Applied immediately, not batched." }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, + { + "name": "_onChildResized", + "signature": "_onChildResized(): void", + "signatureTokens": [ + { + "text": "_onChildResized", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "React to a child widget's size change. Layout containers override it to re-flow; the default does nothing, so a widget that does not place its children pays nothing for a descendant resize." + }, { "name": "_onEnabledChanged", "signature": "_onEnabledChanged(_effectiveEnabled: boolean): void", @@ -1940,7 +1998,7 @@ }, { "name": "setBackground", - "signature": "setBackground(background: UIBackground | null): this", + "signature": "setBackground(background: UIBackgroundInput | null, options: UIBackgroundOptions): this", "signatureTokens": [ { "text": "setBackground", @@ -1959,7 +2017,7 @@ "kind": "punctuation" }, { - "text": "UIBackground", + "text": "UIBackgroundInput", "kind": "type" }, { @@ -1970,6 +2028,22 @@ "text": "null", "kind": "keyword" }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "options", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIBackgroundOptions", + "kind": "type" + }, { "text": ")", "kind": "punctuation" @@ -1986,12 +2060,17 @@ "params": [ { "name": "background", - "type": "UIBackground | null", + "type": "UIBackgroundInput | null", + "optional": false + }, + { + "name": "options", + "type": "UIBackgroundOptions", "optional": false } ], "returnType": "this", - "description": "Replace the whole background descriptor, ignoring the skin's. null restores it. Layout-invalidating: a nine-slice and a fill can imply different content boxes." + "description": "Set the panel's background from a colour, a texture, a region or a full descriptor; null returns it to its skin. A colour becomes a fill override on top of the skin, so the skin's corner radius and border survive it. Layout-invalidating: a nine-slice and a fill can imply different content boxes." }, { "name": "setChildIndex", @@ -3083,7 +3162,7 @@ }, { "name": "backgroundNode", - "signature": "backgroundNode: Graphics | NineSliceSprite | null", + "signature": "backgroundNode: BackgroundNode | null", "signatureTokens": [ { "text": "backgroundNode", @@ -3094,15 +3173,7 @@ "kind": "punctuation" }, { - "text": "Graphics", - "kind": "type" - }, - { - "text": " | ", - "kind": "punctuation" - }, - { - "text": "NineSliceSprite", + "text": "BackgroundNode", "kind": "type" }, { diff --git a/site/src/content/api/progress-bar-fill-mode.json b/site/src/content/api/progress-bar-fill-mode.json new file mode 100644 index 000000000..e6c684996 --- /dev/null +++ b/site/src/content/api/progress-bar-fill-mode.json @@ -0,0 +1,71 @@ +{ + "title": "ProgressBarFillMode", + "description": "How the bar follows the value: `'scale'` paints the background at the value's width, `'clip'` paints it at full width and shows the leading fraction of it. Clipping is what keeps textured art undistorted; a fill has nothing to distort, so it is always painted at the value's width.", + "symbol": "ProgressBarFillMode", + "kind": "type", + "subsystem": "ui", + "importPath": "@codexo/exojs", + "tier": "stable", + "memberCount": 0, + "counts": { + "constructors": 0, + "methods": 0, + "properties": 0, + "events": 0 + }, + "sections": [ + { + "id": "import", + "title": "Import", + "members": [], + "paragraphs": [ + "How the bar follows the value: `'scale'` paints the background at the value's width, `'clip'` paints it at full width and shows the leading fraction of it. Clipping is what keeps textured art undistorted; a fill has nothing to distort, so it is always painted at the value's width." + ], + "importLine": "import { ProgressBarFillMode } from '@codexo/exojs'", + "sourceLink": null + }, + { + "id": "definition", + "title": "Definition", + "members": [ + { + "name": "ProgressBarFillMode", + "signature": "\"clip\" | \"scale\"", + "signatureTokens": [ + { + "text": "\"clip\"", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "\"scale\"", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "source", + "title": "Source", + "members": [], + "paragraphs": [], + "importLine": null, + "sourceLink": { + "label": "src/ui/ProgressBar.ts", + "href": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/ProgressBar.ts" + } + } + ], + "sourcePath": "src/ui/ProgressBar.ts", + "sourceUrl": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/ProgressBar.ts" +} diff --git a/site/src/content/api/progress-bar-options.json b/site/src/content/api/progress-bar-options.json index abafe9eae..83fcdf934 100644 --- a/site/src/content/api/progress-bar-options.json +++ b/site/src/content/api/progress-bar-options.json @@ -6,11 +6,11 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 6, + "memberCount": 13, "counts": { "constructors": 0, "methods": 0, - "properties": 6, + "properties": 13, "events": 0 }, "sections": [ @@ -26,6 +26,76 @@ "id": "properties", "title": "Properties", "members": [ + { + "name": "barBackground", + "signature": "barBackground?: UIBackgroundInput", + "signatureTokens": [ + { + "text": "barBackground", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIBackgroundInput", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "The bar's background, stated as a colour, a texture, a region or a descriptor." + }, + { + "name": "border", + "signature": "border?: Partial | number", + "signatureTokens": [ + { + "text": "border", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "NineSliceInsets", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Destination border widths for textured backgrounds; defaults to slices." + }, { "name": "cornerRadius", "signature": "cornerRadius?: number", @@ -76,6 +146,56 @@ "returnType": null, "description": "" }, + { + "name": "fillMode", + "signature": "fillMode?: ProgressBarFillMode", + "signatureTokens": [ + { + "text": "fillMode", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "ProgressBarFillMode", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "How the bar follows the value. Default 'clip'." + }, + { + "name": "fit", + "signature": "fit?: UISpriteFit", + "signatureTokens": [ + { + "text": "fit", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UISpriteFit", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "Paint textured backgrounds flat with this fit instead of slicing them." + }, { "name": "height", "signature": "height?: number", @@ -101,6 +221,101 @@ "returnType": null, "description": "" }, + { + "name": "modes", + "signature": "modes?: NineSliceModes", + "signatureTokens": [ + { + "text": "modes", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "NineSliceModes", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "slices", + "signature": "slices?: Partial | number", + "signatureTokens": [ + { + "text": "slices", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "NineSliceInsets", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Source-texture slice widths for textured backgrounds; defaults to a third per axis." + }, + { + "name": "trackBackground", + "signature": "trackBackground?: UIBackgroundInput", + "signatureTokens": [ + { + "text": "trackBackground", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIBackgroundInput", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "The groove's background, stated as a colour, a texture, a region or a descriptor." + }, { "name": "trackColor", "signature": "trackColor?: Color", diff --git a/site/src/content/api/progress-bar.json b/site/src/content/api/progress-bar.json index cc23ebb5e..bef34ab51 100644 --- a/site/src/content/api/progress-bar.json +++ b/site/src/content/api/progress-bar.json @@ -6,11 +6,11 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 124, + "memberCount": 130, "counts": { "constructors": 1, - "methods": 59, - "properties": 50, + "methods": 61, + "properties": 54, "events": 14 }, "sections": [ @@ -240,6 +240,64 @@ "returnType": "void", "description": "Repaint without re-laying out - for a change that cannot move anything, such as a colour or a state flip. Applied immediately, not batched." }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, + { + "name": "_onChildResized", + "signature": "_onChildResized(): void", + "signatureTokens": [ + { + "text": "_onChildResized", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "React to a child widget's size change. Layout containers override it to re-flow; the default does nothing, so a widget that does not place its children pays nothing for a descendant resize." + }, { "name": "_onEnabledChanged", "signature": "_onEnabledChanged(_effectiveEnabled: boolean): void", @@ -1940,7 +1998,7 @@ }, { "name": "setBarBackground", - "signature": "setBarBackground(background: UIBackground | null): this", + "signature": "setBarBackground(background: UIBackgroundInput | null, options: UIBackgroundOptions): this", "signatureTokens": [ { "text": "setBarBackground", @@ -1959,7 +2017,7 @@ "kind": "punctuation" }, { - "text": "UIBackground", + "text": "UIBackgroundInput", "kind": "type" }, { @@ -1970,6 +2028,22 @@ "text": "null", "kind": "keyword" }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "options", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIBackgroundOptions", + "kind": "type" + }, { "text": ")", "kind": "punctuation" @@ -1986,12 +2060,17 @@ "params": [ { "name": "background", - "type": "UIBackground | null", + "type": "UIBackgroundInput | null", + "optional": false + }, + { + "name": "options", + "type": "UIBackgroundOptions", "optional": false } ], "returnType": "this", - "description": "Replace the bar's whole background descriptor; null restores the skin's." + "description": "Set the bar's background from a colour, a texture, a region or a full descriptor; null returns it to its skin. A colour becomes a fill override, so the skin's corner radius survives it." }, { "name": "setBarFill", @@ -2660,7 +2739,7 @@ }, { "name": "setTrackBackground", - "signature": "setTrackBackground(background: UIBackground | null): this", + "signature": "setTrackBackground(background: UIBackgroundInput | null, options: UIBackgroundOptions): this", "signatureTokens": [ { "text": "setTrackBackground", @@ -2679,7 +2758,7 @@ "kind": "punctuation" }, { - "text": "UIBackground", + "text": "UIBackgroundInput", "kind": "type" }, { @@ -2690,6 +2769,22 @@ "text": "null", "kind": "keyword" }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "options", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UIBackgroundOptions", + "kind": "type" + }, { "text": ")", "kind": "punctuation" @@ -2706,12 +2801,17 @@ "params": [ { "name": "background", - "type": "UIBackground | null", + "type": "UIBackgroundInput | null", + "optional": false + }, + { + "name": "options", + "type": "UIBackgroundOptions", "optional": false } ], "returnType": "this", - "description": "Replace the track's whole background descriptor; null restores the skin's." + "description": "Set the groove's background from a colour, a texture, a region or a full descriptor; null returns it to its skin. A colour becomes a fill override, so the skin's corner radius survives it." }, { "name": "setTrackFill", @@ -3191,6 +3291,56 @@ "returnType": null, "description": "The background painted for the filled portion." }, + { + "name": "barNode", + "signature": "barNode: BackgroundNode | null", + "signatureTokens": [ + { + "text": "barNode", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "BackgroundNode", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "The node painting the bar, or null while it paints nothing." + }, + { + "name": "barVisibleWidth", + "signature": "barVisibleWidth: number", + "signatureTokens": [ + { + "text": "barVisibleWidth", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Width in pixels of the bar that is actually visible: uiWidth * value." + }, { "name": "bottom", "signature": "bottom: number", @@ -3508,6 +3658,27 @@ "returnType": null, "description": "Bar colour, or null when the bar does not paint a fill." }, + { + "name": "fillMode", + "signature": "fillMode: ProgressBarFillMode", + "signatureTokens": [ + { + "text": "fillMode", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "ProgressBarFillMode", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "How the bar follows the value." + }, { "name": "fillOverrides", "signature": "fillOverrides: { bar: UIFillPatch | null; track: UIFillPatch | null }", @@ -4133,6 +4304,35 @@ "returnType": null, "description": "Track colour, or null when the track does not paint a fill." }, + { + "name": "trackNode", + "signature": "trackNode: BackgroundNode | null", + "signatureTokens": [ + { + "text": "trackNode", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "BackgroundNode", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "null", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "The node painting the groove, or null while it paints nothing." + }, { "name": "uiHeight", "signature": "uiHeight: number", diff --git a/site/src/content/api/retained-container.json b/site/src/content/api/retained-container.json index 576df1d99..d513f9906 100644 --- a/site/src/content/api/retained-container.json +++ b/site/src/content/api/retained-container.json @@ -6,10 +6,10 @@ "subsystem": "rendering", "importPath": "@codexo/exojs", "tier": "advanced", - "memberCount": 94, + "memberCount": 95, "counts": { "constructors": 1, - "methods": 42, + "methods": 43, "properties": 37, "events": 14 }, @@ -98,6 +98,35 @@ "returnType": "void", "description": "Own-transform mutations move the whole group: bump the group-matrix version and refresh ancestor bounds flags (the group's world AABB moved), but do NOT content-dirty the fragment - that decoupling is the entire point of the retained tier." }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, { "name": "[iterator]", "signature": "[iterator](): IterableIterator", diff --git a/site/src/content/api/scroll-container.json b/site/src/content/api/scroll-container.json index c23ead804..f572e0a1d 100644 --- a/site/src/content/api/scroll-container.json +++ b/site/src/content/api/scroll-container.json @@ -6,10 +6,10 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 119, + "memberCount": 121, "counts": { "constructors": 1, - "methods": 57, + "methods": 59, "properties": 47, "events": 14 }, @@ -241,6 +241,64 @@ "returnType": "void", "description": "Repaint without re-laying out - for a change that cannot move anything, such as a colour or a state flip. Applied immediately, not batched." }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, + { + "name": "_onChildResized", + "signature": "_onChildResized(): void", + "signatureTokens": [ + { + "text": "_onChildResized", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "React to a child widget's size change. Layout containers override it to re-flow; the default does nothing, so a widget that does not place its children pays nothing for a descendant resize." + }, { "name": "_onEnabledChanged", "signature": "_onEnabledChanged(_effectiveEnabled: boolean): void", diff --git a/site/src/content/api/stack-align.json b/site/src/content/api/stack-align.json new file mode 100644 index 000000000..3ae77c674 --- /dev/null +++ b/site/src/content/api/stack-align.json @@ -0,0 +1,87 @@ +{ + "title": "StackAlign", + "description": "Where a stack places its children on the axis it does not flow along.", + "symbol": "StackAlign", + "kind": "type", + "subsystem": "ui", + "importPath": "@codexo/exojs", + "tier": "stable", + "memberCount": 0, + "counts": { + "constructors": 0, + "methods": 0, + "properties": 0, + "events": 0 + }, + "sections": [ + { + "id": "import", + "title": "Import", + "members": [], + "paragraphs": [ + "Where a stack places its children on the axis it does not flow along." + ], + "importLine": "import { StackAlign } from '@codexo/exojs'", + "sourceLink": null + }, + { + "id": "definition", + "title": "Definition", + "members": [ + { + "name": "StackAlign", + "signature": "\"center\" | \"end\" | \"start\" | \"stretch\"", + "signatureTokens": [ + { + "text": "\"center\"", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "\"end\"", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "\"start\"", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "\"stretch\"", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "source", + "title": "Source", + "members": [], + "paragraphs": [], + "importLine": null, + "sourceLink": { + "label": "src/ui/Stack.ts", + "href": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/Stack.ts" + } + } + ], + "sourcePath": "src/ui/Stack.ts", + "sourceUrl": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/Stack.ts" +} diff --git a/site/src/content/api/stack-options.json b/site/src/content/api/stack-options.json index 6bc53a47a..d82b27d5c 100644 --- a/site/src/content/api/stack-options.json +++ b/site/src/content/api/stack-options.json @@ -6,11 +6,11 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 3, + "memberCount": 4, "counts": { "constructors": 0, "methods": 0, - "properties": 3, + "properties": 4, "events": 0 }, "sections": [ @@ -26,6 +26,31 @@ "id": "properties", "title": "Properties", "members": [ + { + "name": "align", + "signature": "align?: StackAlign", + "signatureTokens": [ + { + "text": "align", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "StackAlign", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "Cross-axis placement of the items. Default 'start'." + }, { "name": "direction", "signature": "direction?: StackDirection", diff --git a/site/src/content/api/stack.json b/site/src/content/api/stack.json index 9b31fabe5..0b8374e71 100644 --- a/site/src/content/api/stack.json +++ b/site/src/content/api/stack.json @@ -1,16 +1,16 @@ { "title": "Stack", - "description": "Linear layout container that flows its children in a row or column with even spacing and optional padding, then sizes itself to fit. Call Stack.layout after mutating children added with `addChild`, or use Stack.addItem to add and re-flow in one step.", + "description": "Linear layout container that flows its children in a row or column with even spacing and optional padding. The stack re-flows itself whenever anything it lays out changes: a child is added, removed or reordered, a child widget resizes, or one of the layout properties below is set. Stack.layout exists for the cases the container cannot observe - a non-widget child whose drawn extent changed. A stack sizes itself to its content until Stack.setSize gives it an explicit box. From then on it keeps that box, and the leftover space along the flow direction is what Stack.setGrow distributes.", "symbol": "Stack", "kind": "class", "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 118, + "memberCount": 123, "counts": { "constructors": 1, - "methods": 57, - "properties": 46, + "methods": 61, + "properties": 47, "events": 14 }, "sections": [ @@ -19,7 +19,9 @@ "title": "Import", "members": [], "paragraphs": [ - "Linear layout container that flows its children in a row or column with even spacing and optional padding, then sizes itself to fit. Call Stack.layout after mutating children added with `addChild`, or use Stack.addItem to add and re-flow in one step." + "Linear layout container that flows its children in a row or column with even spacing and optional padding.", + "The stack re-flows itself whenever anything it lays out changes: a child is added, removed or reordered, a child widget resizes, or one of the layout properties below is set. Stack.layout exists for the cases the container cannot observe - a non-widget child whose drawn extent changed.", + "A stack sizes itself to its content until Stack.setSize gives it an explicit box. From then on it keeps that box, and the leftover space along the flow direction is what Stack.setGrow distributes." ], "importLine": "import { Stack } from '@codexo/exojs'", "sourceLink": null @@ -239,6 +241,64 @@ "returnType": "void", "description": "Repaint without re-laying out - for a change that cannot move anything, such as a colour or a state flip. Applied immediately, not batched." }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, + { + "name": "_onChildResized", + "signature": "_onChildResized(): void", + "signatureTokens": [ + { + "text": "_onChildResized", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "React to a child widget's size change. Layout containers override it to re-flow; the default does nothing, so a widget that does not place its children pays nothing for a descendant resize." + }, { "name": "_onEnabledChanged", "signature": "_onEnabledChanged(_effectiveEnabled: boolean): void", @@ -748,7 +808,7 @@ } ], "returnType": "this", - "description": "Add a child and re-flow the stack." + "description": "Add a child; the stack re-flows on its own." }, { "name": "anchorIn", @@ -1393,6 +1453,53 @@ "returnType": "Matrix", "description": "The node's TRUE world-space transform, composed through every transform-group boundary (RetainedContainer) in the ancestor chain. getGlobalTransform deliberately stops at the nearest engaged boundary (descendants resolve group-RELATIVE transforms; the renderer multiplies the group matrix back in on the GPU), so it is the right space for rendering but the wrong one for spatial queries. Use THIS accessor whenever a real world position/orientation is needed - picking, spatial audio, physics, world-space math against nodes outside the group. Without any engaged boundary ancestor it returns the exact getGlobalTransform matrix (same instance, no extra work). With one, it lazily caches groupLocal × groupWorld and revalidates on read via version/stamp compares - including runtime space flips such as RetainedContainer's deep-barrier sub-branch escape." }, + { + "name": "growOf", + "signature": "growOf(child: RenderNode): number", + "signatureTokens": [ + { + "text": "growOf", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "child", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [ + { + "name": "child", + "type": "RenderNode", + "optional": false + } + ], + "returnType": "number", + "description": "The grow factor child carries, or 0 when it does not grow." + }, { "name": "intersectsWith", "signature": "intersectsWith(target: Collidable): boolean", @@ -1572,7 +1679,7 @@ ], "params": [], "returnType": "this", - "description": "Re-flow children along the stack direction and resize to fit them." + "description": "Re-flow children along the stack direction." }, { "name": "move", @@ -2081,6 +2188,74 @@ "returnType": "this", "description": "" }, + { + "name": "setGrow", + "signature": "setGrow(child: RenderNode, factor: number): this", + "signatureTokens": [ + { + "text": "setGrow", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "child", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "RenderNode", + "kind": "type" + }, + { + "text": ", ", + "kind": "punctuation" + }, + { + "text": "factor", + "kind": "param" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "this", + "kind": "keyword" + } + ], + "params": [ + { + "name": "child", + "type": "RenderNode", + "optional": false + }, + { + "name": "factor", + "type": "number", + "optional": false + } + ], + "returnType": "this", + "description": "Give child a share of the leftover space along the flow direction, proportional to factor against every other growing child. 0 drops the share and restores the size the child had before it grew. Growing needs space to distribute, so it only applies once the stack has an explicit size; a stack that sizes itself to its content has none." + }, { "name": "setOrigin", "signature": "setOrigin(x: number, y: number): this", @@ -2398,7 +2573,7 @@ } ], "returnType": "this", - "description": "Set the widget's layout size; triggers a redraw and re-anchors if anchored." + "description": "Give the stack an explicit box instead of sizing it to its content. This is what makes Stack.setGrow effective, since growing needs leftover space to hand out." }, { "name": "setSkew", @@ -3025,6 +3200,27 @@ "returnType": null, "description": "Tab-traversal order among focusable nodes in the same focus scope. Lower values are visited first; equal values keep document (tree) order." }, + { + "name": "align", + "signature": "align: StackAlign", + "signatureTokens": [ + { + "text": "align", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "StackAlign", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "Cross-axis placement of the items. 'stretch' resizes widget children to the full cross extent; leaving it restores the size they had before." + }, { "name": "bottom", "signature": "bottom: number", diff --git a/site/src/content/api/themed-container.json b/site/src/content/api/themed-container.json index d1cc81cc2..601173102 100644 --- a/site/src/content/api/themed-container.json +++ b/site/src/content/api/themed-container.json @@ -6,10 +6,10 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 96, + "memberCount": 97, "counts": { "constructors": 1, - "methods": 43, + "methods": 44, "properties": 38, "events": 14 }, @@ -95,6 +95,35 @@ "returnType": "void", "description": "Push a theme refresh into every themed descendant." }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, { "name": "_resolveInheritedTheme", "signature": "_resolveInheritedTheme(): UITheme", diff --git a/site/src/content/api/tile-layer-node.json b/site/src/content/api/tile-layer-node.json index 442c53f97..e237f555c 100644 --- a/site/src/content/api/tile-layer-node.json +++ b/site/src/content/api/tile-layer-node.json @@ -6,10 +6,10 @@ "subsystem": "tilemap", "importPath": "@codexo/exojs-tilemap", "tier": "advanced", - "memberCount": 96, + "memberCount": 97, "counts": { "constructors": 1, - "methods": 42, + "methods": 43, "properties": 39, "events": 14 }, @@ -113,6 +113,35 @@ "id": "methods", "title": "Methods", "members": [ + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, { "name": "[iterator]", "signature": "[iterator](): IterableIterator", diff --git a/site/src/content/api/tile-map-band.json b/site/src/content/api/tile-map-band.json index 8612aedca..eaaa5896f 100644 --- a/site/src/content/api/tile-map-band.json +++ b/site/src/content/api/tile-map-band.json @@ -6,10 +6,10 @@ "subsystem": "tilemap", "importPath": "@codexo/exojs-tilemap", "tier": "advanced", - "memberCount": 95, + "memberCount": 96, "counts": { "constructors": 0, - "methods": 42, + "methods": 43, "properties": 39, "events": 14 }, @@ -34,6 +34,35 @@ "id": "methods", "title": "Methods", "members": [ + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, { "name": "[iterator]", "signature": "[iterator](): IterableIterator", diff --git a/site/src/content/api/tile-map-node.json b/site/src/content/api/tile-map-node.json index b915a8c1e..eb21d287a 100644 --- a/site/src/content/api/tile-map-node.json +++ b/site/src/content/api/tile-map-node.json @@ -6,10 +6,10 @@ "subsystem": "tilemap", "importPath": "@codexo/exojs-tilemap", "tier": "advanced", - "memberCount": 98, + "memberCount": 99, "counts": { "constructors": 1, - "methods": 43, + "methods": 44, "properties": 40, "events": 14 }, @@ -112,6 +112,35 @@ "id": "methods", "title": "Methods", "members": [ + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, { "name": "[iterator]", "signature": "[iterator](): IterableIterator", diff --git a/site/src/content/api/uibackground-input.json b/site/src/content/api/uibackground-input.json new file mode 100644 index 000000000..ec8ff09aa --- /dev/null +++ b/site/src/content/api/uibackground-input.json @@ -0,0 +1,87 @@ +{ + "title": "UIBackgroundInput", + "description": "What a background can be stated as. A texture or region becomes a textured descriptor, a colour becomes a fill; a descriptor is taken as it is.", + "symbol": "UIBackgroundInput", + "kind": "type", + "subsystem": "ui", + "importPath": "@codexo/exojs", + "tier": "stable", + "memberCount": 0, + "counts": { + "constructors": 0, + "methods": 0, + "properties": 0, + "events": 0 + }, + "sections": [ + { + "id": "import", + "title": "Import", + "members": [], + "paragraphs": [ + "What a background can be stated as. A texture or region becomes a textured descriptor, a colour becomes a fill; a descriptor is taken as it is." + ], + "importLine": "import { UIBackgroundInput } from '@codexo/exojs'", + "sourceLink": null + }, + { + "id": "definition", + "title": "Definition", + "members": [ + { + "name": "UIBackgroundInput", + "signature": "Color | Texture | TextureRegion | UIBackground", + "signatureTokens": [ + { + "text": "Color", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "Texture", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "TextureRegion", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "UIBackground", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "source", + "title": "Source", + "members": [], + "paragraphs": [], + "importLine": null, + "sourceLink": { + "label": "src/ui/theme.ts", + "href": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/theme.ts" + } + } + ], + "sourcePath": "src/ui/theme.ts", + "sourceUrl": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/theme.ts" +} diff --git a/site/src/content/api/uibackground-options.json b/site/src/content/api/uibackground-options.json new file mode 100644 index 000000000..e0bd286a3 --- /dev/null +++ b/site/src/content/api/uibackground-options.json @@ -0,0 +1,190 @@ +{ + "title": "UIBackgroundOptions", + "description": "How a texture is turned into a background descriptor.", + "symbol": "UIBackgroundOptions", + "kind": "interface", + "subsystem": "ui", + "importPath": "@codexo/exojs", + "tier": "stable", + "memberCount": 4, + "counts": { + "constructors": 0, + "methods": 0, + "properties": 4, + "events": 0 + }, + "sections": [ + { + "id": "import", + "title": "Import", + "members": [], + "paragraphs": [ + "How a texture is turned into a background descriptor." + ], + "importLine": "import { UIBackgroundOptions } from '@codexo/exojs'", + "sourceLink": null + }, + { + "id": "properties", + "title": "Properties", + "members": [ + { + "name": "border", + "signature": "border?: Partial | number", + "signatureTokens": [ + { + "text": "border", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "NineSliceInsets", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Destination border widths; defaults to slices." + }, + { + "name": "fit", + "signature": "fit?: UISpriteFit", + "signatureTokens": [ + { + "text": "fit", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UISpriteFit", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "Paint the texture flat with this fit instead of slicing it." + }, + { + "name": "modes", + "signature": "modes?: NineSliceModes", + "signatureTokens": [ + { + "text": "modes", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "NineSliceModes", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "slices", + "signature": "slices?: Partial | number", + "signatureTokens": [ + { + "text": "slices", + "kind": "name" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Partial", + "kind": "type" + }, + { + "text": "<", + "kind": "punctuation" + }, + { + "text": "NineSliceInsets", + "kind": "type" + }, + { + "text": ">", + "kind": "punctuation" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "Source-texture slice widths in texels; defaults to a third of the source per axis." + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "source", + "title": "Source", + "members": [], + "paragraphs": [], + "importLine": null, + "sourceLink": { + "label": "src/ui/theme.ts", + "href": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/theme.ts" + } + } + ], + "sourcePath": "src/ui/theme.ts", + "sourceUrl": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/theme.ts" +} diff --git a/site/src/content/api/uibackground.json b/site/src/content/api/uibackground.json index 256609483..0927a660b 100644 --- a/site/src/content/api/uibackground.json +++ b/site/src/content/api/uibackground.json @@ -30,7 +30,7 @@ "members": [ { "name": "UIBackground", - "signature": "UIFillBackground | UINineSliceBackground | UINoBackground", + "signature": "UIFillBackground | UINineSliceBackground | UINoBackground | UISpriteBackground", "signatureTokens": [ { "text": "UIFillBackground", @@ -51,6 +51,14 @@ { "text": "UINoBackground", "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "UISpriteBackground", + "kind": "type" } ], "params": [], diff --git a/site/src/content/api/uiroot.json b/site/src/content/api/uiroot.json index d6e9d41ca..d95ee7839 100644 --- a/site/src/content/api/uiroot.json +++ b/site/src/content/api/uiroot.json @@ -6,10 +6,10 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 99, + "memberCount": 100, "counts": { "constructors": 1, - "methods": 43, + "methods": 44, "properties": 40, "events": 15 }, @@ -98,6 +98,35 @@ "returnType": "void", "description": "Push a theme refresh into every themed descendant." }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, { "name": "_resolveInheritedTheme", "signature": "_resolveInheritedTheme(): UITheme", diff --git a/site/src/content/api/uisprite-background.json b/site/src/content/api/uisprite-background.json new file mode 100644 index 000000000..7dcaa64f1 --- /dev/null +++ b/site/src/content/api/uisprite-background.json @@ -0,0 +1,121 @@ +{ + "title": "UISpriteBackground", + "description": "Flat textured background: one image stretched over the widget box or tiled across it. Use a nine-slice instead for art with a frame that must keep its corner proportions.", + "symbol": "UISpriteBackground", + "kind": "interface", + "subsystem": "ui", + "importPath": "@codexo/exojs", + "tier": "stable", + "memberCount": 3, + "counts": { + "constructors": 0, + "methods": 0, + "properties": 3, + "events": 0 + }, + "sections": [ + { + "id": "import", + "title": "Import", + "members": [], + "paragraphs": [ + "Flat textured background: one image stretched over the widget box or tiled across it. Use a nine-slice instead for art with a frame that must keep its corner proportions." + ], + "importLine": "import { UISpriteBackground } from '@codexo/exojs'", + "sourceLink": null + }, + { + "id": "properties", + "title": "Properties", + "members": [ + { + "name": "fit", + "signature": "fit: UISpriteFit", + "signatureTokens": [ + { + "text": "fit", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "UISpriteFit", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "kind", + "signature": "kind: \"sprite\"", + "signatureTokens": [ + { + "text": "kind", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "\"sprite\"", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + }, + { + "name": "texture", + "signature": "texture: Texture | TextureRegion", + "signatureTokens": [ + { + "text": "texture", + "kind": "name" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "Texture", + "kind": "type" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "TextureRegion", + "kind": "type" + } + ], + "params": [], + "returnType": null, + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "source", + "title": "Source", + "members": [], + "paragraphs": [], + "importLine": null, + "sourceLink": { + "label": "src/ui/theme.ts", + "href": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/theme.ts" + } + } + ], + "sourcePath": "src/ui/theme.ts", + "sourceUrl": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/theme.ts" +} diff --git a/site/src/content/api/uisprite-fit.json b/site/src/content/api/uisprite-fit.json new file mode 100644 index 000000000..e1f75bd94 --- /dev/null +++ b/site/src/content/api/uisprite-fit.json @@ -0,0 +1,71 @@ +{ + "title": "UISpriteFit", + "description": "How a sprite background fills the widget box.", + "symbol": "UISpriteFit", + "kind": "type", + "subsystem": "ui", + "importPath": "@codexo/exojs", + "tier": "stable", + "memberCount": 0, + "counts": { + "constructors": 0, + "methods": 0, + "properties": 0, + "events": 0 + }, + "sections": [ + { + "id": "import", + "title": "Import", + "members": [], + "paragraphs": [ + "How a sprite background fills the widget box." + ], + "importLine": "import { UISpriteFit } from '@codexo/exojs'", + "sourceLink": null + }, + { + "id": "definition", + "title": "Definition", + "members": [ + { + "name": "UISpriteFit", + "signature": "\"stretch\" | \"tile\"", + "signatureTokens": [ + { + "text": "\"stretch\"", + "kind": "keyword" + }, + { + "text": " | ", + "kind": "punctuation" + }, + { + "text": "\"tile\"", + "kind": "keyword" + } + ], + "params": [], + "returnType": null, + "description": "" + } + ], + "paragraphs": [], + "importLine": null, + "sourceLink": null + }, + { + "id": "source", + "title": "Source", + "members": [], + "paragraphs": [], + "importLine": null, + "sourceLink": { + "label": "src/ui/theme.ts", + "href": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/theme.ts" + } + } + ], + "sourcePath": "src/ui/theme.ts", + "sourceUrl": "https://github.com/Exoridus/ExoJS/blob/main/src/ui/theme.ts" +} diff --git a/site/src/content/api/widget.json b/site/src/content/api/widget.json index 2cbf283d8..13694b739 100644 --- a/site/src/content/api/widget.json +++ b/site/src/content/api/widget.json @@ -6,10 +6,10 @@ "subsystem": "ui", "importPath": "@codexo/exojs", "tier": "stable", - "memberCount": 113, + "memberCount": 115, "counts": { "constructors": 1, - "methods": 55, + "methods": 57, "properties": 43, "events": 14 }, @@ -223,6 +223,64 @@ "returnType": "void", "description": "Repaint without re-laying out - for a change that cannot move anything, such as a colour or a state flip. Applied immediately, not batched." }, + { + "name": "_onChildListChanged", + "signature": "_onChildListChanged(): void", + "signatureTokens": [ + { + "text": "_onChildListChanged", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "Called after this container's child list changed - an insert, a removal or a reorder - once the list and the caches derived from it are consistent again. Override in containers whose own state is derived from their children, such as a layout container that re-flows them." + }, + { + "name": "_onChildResized", + "signature": "_onChildResized(): void", + "signatureTokens": [ + { + "text": "_onChildResized", + "kind": "name" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ": ", + "kind": "punctuation" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "params": [], + "returnType": "void", + "description": "React to a child widget's size change. Layout containers override it to re-flow; the default does nothing, so a widget that does not place its children pays nothing for a descendant resize." + }, { "name": "_onEnabledChanged", "signature": "_onEnabledChanged(_effectiveEnabled: boolean): void", diff --git a/site/src/content/guide/runtime/ui-and-widgets.mdx b/site/src/content/guide/runtime/ui-and-widgets.mdx index f97728e96..84893686c 100644 --- a/site/src/content/guide/runtime/ui-and-widgets.mdx +++ b/site/src/content/guide/runtime/ui-and-widgets.mdx @@ -63,7 +63,35 @@ dialog.setTheme({ panel: { normal: { background: dark.panel.normal.background } dialog.setFill({ color: new Color(40, 44, 60, 1) }); // this panel only, on top of its skin ``` -A background descriptor is either a fill (the rounded rectangle above), `{ kind: 'none' }`, or a nine-slice: `{ kind: 'nineSlice', texture, slices: 8 }` paints a texture that stretches without distorting its corners. +A background descriptor is either a fill (the rounded rectangle above), `{ kind: 'none' }`, a nine-slice that stretches a texture without distorting its corners, or a sprite that stretches or tiles flat art. + +## Textured skins + +Anywhere a background is taken you can state it the way you have it - a colour, a texture, an atlas region, or a full descriptor. A texture becomes a nine-slice; a colour becomes a fill override on top of the skin, so the skin's corner radius and border survive it: + +```ts +import { Button, Color, Panel, ProgressBar, type Texture } from '@codexo/exojs'; + +declare const frame: Texture; +declare const idle: Texture; +declare const hot: Texture; + +const panel = new Panel({ width: 280, height: 160, background: frame }); +const start = new Button({ label: 'Start', skin: { normal: idle, hover: hot, disabled: new Color(70, 76, 90, 1) } }); +``` + +Without `slices`, a texture is sliced at a third of its source size per axis - a usable starting point, not a substitute for stating the slices a skin was drawn for. Pass them (and, where the corners should be drawn at a different scale, `border`) alongside the background: `panel.setBackground(frame, { slices: 8, border: 16 })`. For flat art that has no frame to preserve, pass `fit` instead: `{ fit: 'stretch' }` or `{ fit: 'tile' }`. + +A [`ProgressBar`](/ExoJS/en/api/progress-bar/) decides how its bar follows the value with `fillMode`. The default `'clip'` paints the bar's art at full width and shows the leading fraction of it, which is what keeps a textured bar undistorted; `'scale'` paints it at the value's width instead. A fill has no art to distort and is always painted at the value's width: + +```ts +import { ProgressBar, type Texture } from '@codexo/exojs'; + +declare const barArt: Texture; + +const health = new ProgressBar({ width: 240, height: 14, value: 0.6, barBackground: barArt, slices: 6 }); +health.fillMode = 'scale'; // squash the art with the value instead of cutting it +``` Per-widget style always goes through a setter — `setFill`, `setBackground`, `setTextStyle` — so a change repaints (and re-lays out where it can move something) immediately. Reading `panel.color` gives the value in effect, including the theme's; `panel.fillOverrides` gives only what this panel overrides. @@ -95,6 +123,34 @@ A `Stack` flows its children in a row or column with even spacing and sizes itse title="examples/guides/ui-and-widgets/widgets.ts" /> +`Stack` re-flows on its own: adding, removing or resizing a child, and setting `direction`, `spacing`, `padding` or `align`, all re-place the items immediately. `align` decides the cross axis - `'start'`, `'center'`, `'end'`, or `'stretch'`, which resizes the items to the stack's cross extent. + +A stack sizes itself to its content until you give it a box with `setSize`. From then on it keeps that box, and `stack.setGrow(child, factor)` hands the leftover space along the flow direction to the growing children, split by factor: + +```ts +import { Button, Stack } from '@codexo/exojs'; + +const sidebar = new Stack({ direction: 'column', spacing: 8, align: 'stretch' }); +const list = new Button({ label: 'Inventory' }); + +sidebar.addChild(list, new Button({ label: 'Close' })); +sidebar.setSize(220, 400); // an explicit box is what leaves space to distribute +sidebar.setGrow(list, 1); // the list takes everything the other items leave +``` + +## Docking to the edges + +A `DockContainer` pins children to `'top'`, `'right'`, `'bottom'` or `'left'` and gives what is left to `'center'`. Each edge child is sized across its band and keeps its own extent along the other axis, so a docked HUD survives a resize with one `setSize` call: + + + +Bands are taken in docking order: docking `'top'` before `'left'` gives the top band the full width and the left band only what is left below it. Reverse the two calls and the left band runs the full height instead. + ## Scrolling content A `ScrollContainer` clips its content to a fixed `width` × `height` and scrolls it with the mouse wheel — useful for inventories, logs, or any list longer than its box. Add children to `scroll.content`, not to the container itself: diff --git a/src/core/serialization/uiSerializers.ts b/src/core/serialization/uiSerializers.ts index 982fc72b3..51fe2263c 100644 --- a/src/core/serialization/uiSerializers.ts +++ b/src/core/serialization/uiSerializers.ts @@ -1,7 +1,10 @@ import type { RenderNode } from '#rendering/RenderNode'; import { Button } from '#ui/Button'; +import type { DockRegion } from '#ui/DockContainer'; +import { DockContainer } from '#ui/DockContainer'; import { Label } from '#ui/Label'; import { Panel } from '#ui/Panel'; +import type { ProgressBarFillMode } from '#ui/ProgressBar'; import { ProgressBar } from '#ui/ProgressBar'; import { ScrollContainer, type ScrollDirection } from '#ui/ScrollContainer'; import { Stack } from '#ui/Stack'; @@ -153,6 +156,8 @@ const buttonSerializer: NodeSerializer