@wcardinal/wcardinal-ui 0.408.0 → 0.410.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/wcardinal/ui/d-base-snippet-container.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-base.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/e-shape-buffer.d.ts +3 -9
- package/dist/types/wcardinal/ui/shape/e-shape-container.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-points-formatter-curve-bezier-quadratic.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/e-shape-points-formatters.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/e-shape-points-style.d.ts +7 -1
- package/dist/types/wcardinal/ui/shape/index.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/build-bar.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/build-circle.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/build-color.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/build-image-sdf.d.ts +0 -1
- package/dist/types/wcardinal/ui/shape/variant/build-line-of-any.d.ts +17 -1
- package/dist/types/wcardinal/ui/shape/variant/build-line.d.ts +2 -3
- package/dist/types/wcardinal/ui/shape/variant/build-null.d.ts +0 -1
- package/dist/types/wcardinal/ui/shape/variant/build-rectangle-rounded.d.ts +2 -3
- package/dist/types/wcardinal/ui/shape/variant/build-rectangle.d.ts +4 -5
- package/dist/types/wcardinal/ui/shape/variant/build-semicircle.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/build-text.d.ts +0 -1
- package/dist/types/wcardinal/ui/shape/variant/build-triangle-rounded.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/build-triangle.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-bar.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-base.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-any.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-rectangles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-line.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-marker-base.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-marker-rectangle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-pivoted.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-rounded.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-rectangle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder-text.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/builder-triangle-rounded.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/builder.d.ts +9 -18
- package/dist/types/wcardinal/ui/shape/variant/index.d.ts +0 -1
- package/dist/types/wcardinal/ui/shape/variant/to-dash.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/to-normal-packed.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/to-normal.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/to-packed.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/variant/to-vector-length.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/to-vector.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/e-theme-dark-en-us-shape-points-formatter.d.ts +2 -1
- package/dist/types/wcardinal/ui/theme/dark/e-theme-dark-ja-jp-shape-points-formatter.d.ts +2 -1
- package/dist/types/wcardinal/ui/theme/dark/e-theme-dark-shape-points-formatter.d.ts +2 -1
- package/dist/types/wcardinal/ui/theme/white/e-theme-white-en-us-shape-points-formatter.d.ts +2 -1
- package/dist/types/wcardinal/ui/theme/white/e-theme-white-ja-jp-shape-points-formatter.d.ts +2 -1
- package/dist/types/wcardinal/ui/theme/white/e-theme-white-shape-points-formatter.d.ts +2 -1
- package/dist/wcardinal/ui/d-base-snippet-container.js +11 -3
- package/dist/wcardinal/ui/d-base-snippet-container.js.map +1 -1
- package/dist/wcardinal/ui/d-base.js +4 -0
- package/dist/wcardinal/ui/d-base.js.map +1 -1
- package/dist/wcardinal/ui/d-scroll-bar.js +1 -0
- package/dist/wcardinal/ui/d-scroll-bar.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-buffer.js +10 -30
- package/dist/wcardinal/ui/shape/e-shape-buffer.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-container.js +1 -1
- package/dist/wcardinal/ui/shape/e-shape-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-points-formatter-curve-bezier-quadratic.js +165 -0
- package/dist/wcardinal/ui/shape/e-shape-points-formatter-curve-bezier-quadratic.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-points-formatters.js +7 -2
- package/dist/wcardinal/ui/shape/e-shape-points-formatters.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-points-style.js +12 -4
- package/dist/wcardinal/ui/shape/e-shape-points-style.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-renderer.js +4 -5
- package/dist/wcardinal/ui/shape/e-shape-renderer.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +1 -0
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-bar.js +37 -63
- package/dist/wcardinal/ui/shape/variant/build-bar.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-circle.js +63 -40
- package/dist/wcardinal/ui/shape/variant/build-circle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-color.js +8 -11
- package/dist/wcardinal/ui/shape/variant/build-color.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-image-sdf.js +30 -37
- package/dist/wcardinal/ui/shape/variant/build-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-line-of-any.js +244 -25
- package/dist/wcardinal/ui/shape/variant/build-line-of-any.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-line.js +149 -129
- package/dist/wcardinal/ui/shape/variant/build-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-null.js +0 -7
- package/dist/wcardinal/ui/shape/variant/build-null.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-rectangle-rounded.js +917 -849
- package/dist/wcardinal/ui/shape/variant/build-rectangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-rectangle.js +279 -353
- package/dist/wcardinal/ui/shape/variant/build-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-semicircle.js +45 -31
- package/dist/wcardinal/ui/shape/variant/build-semicircle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-text.js +6 -13
- package/dist/wcardinal/ui/shape/variant/build-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-triangle-rounded.js +255 -128
- package/dist/wcardinal/ui/shape/variant/build-triangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/build-triangle.js +55 -35
- package/dist/wcardinal/ui/shape/variant/build-triangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-bar.js +8 -11
- package/dist/wcardinal/ui/shape/variant/builder-bar.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-base.js +18 -22
- package/dist/wcardinal/ui/shape/variant/builder-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-circle.js +4 -7
- package/dist/wcardinal/ui/shape/variant/builder-circle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-image-sdf.js +3 -6
- package/dist/wcardinal/ui/shape/variant/builder-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-any.js +13 -17
- package/dist/wcardinal/ui/shape/variant/builder-line-of-any.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-circles.js +5 -12
- package/dist/wcardinal/ui/shape/variant/builder-line-of-circles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.js +10 -26
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js +9 -25
- package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.js +9 -25
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangles.js +5 -12
- package/dist/wcardinal/ui/shape/variant/builder-line-of-triangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-line.js +13 -27
- package/dist/wcardinal/ui/shape/variant/builder-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-base.js +27 -19
- package/dist/wcardinal/ui/shape/variant/builder-marker-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-circle.js +4 -7
- package/dist/wcardinal/ui/shape/variant/builder-marker-circle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js +7 -13
- package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-marker-triangle.js +4 -7
- package/dist/wcardinal/ui/shape/variant/builder-marker-triangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js +7 -13
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-rounded.js +6 -12
- package/dist/wcardinal/ui/shape/variant/builder-rectangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-rectangle.js +7 -13
- package/dist/wcardinal/ui/shape/variant/builder-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-semicircle.js +4 -7
- package/dist/wcardinal/ui/shape/variant/builder-semicircle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-text.js +19 -28
- package/dist/wcardinal/ui/shape/variant/builder-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js +7 -12
- package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder-triangle.js +4 -7
- package/dist/wcardinal/ui/shape/variant/builder-triangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/builder.js +18 -14
- package/dist/wcardinal/ui/shape/variant/builder.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/index.js +0 -1
- package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/to-dash.js +8 -9
- package/dist/wcardinal/ui/shape/variant/to-dash.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/to-normal-packed.js +7 -0
- package/dist/wcardinal/ui/shape/variant/to-normal-packed.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-normal.js +15 -0
- package/dist/wcardinal/ui/shape/variant/to-normal.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-packed.js +7 -0
- package/dist/wcardinal/ui/shape/variant/to-packed.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-vector-length.js +4 -0
- package/dist/wcardinal/ui/shape/variant/to-vector-length.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-vector.js +6 -0
- package/dist/wcardinal/ui/shape/variant/to-vector.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/e-theme-dark-en-us-shape-points-formatter.js +5 -2
- package/dist/wcardinal/ui/theme/dark/e-theme-dark-en-us-shape-points-formatter.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/e-theme-dark-ja-jp-shape-points-formatter.js +5 -2
- package/dist/wcardinal/ui/theme/dark/e-theme-dark-ja-jp-shape-points-formatter.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape-points-formatter.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/e-theme-white-en-us-shape-points-formatter.js +5 -2
- package/dist/wcardinal/ui/theme/white/e-theme-white-en-us-shape-points-formatter.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/e-theme-white-ja-jp-shape-points-formatter.js +5 -2
- package/dist/wcardinal/ui/theme/white/e-theme-white-ja-jp-shape-points-formatter.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/e-theme-white-shape-points-formatter.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +6 -3
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +6 -3
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +6 -3
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +6 -3
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +6 -3
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +6 -3
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +2526 -2114
- package/dist/wcardinal-ui.js +2502 -2102
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/wcardinal/ui/shape/variant/copy-clipping.d.ts +0 -1
- package/dist/wcardinal/ui/shape/variant/copy-clipping.js +0 -20
- package/dist/wcardinal/ui/shape/variant/copy-clipping.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EACN,SAAS,EAIT,KAAK,EAKL,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAOjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAIxD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAA6B,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,YAAY,EA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DisplayObject,\n\tInteractionEvent,\n\tInteractionManager,\n\tPoint,\n\tRectangle,\n\tRenderer,\n\tTexture,\n\tTransform\n} from \"pixi.js\";\nimport { DApplications } from \"./d-applications\";\nimport { DBackgroundStateAware } from \"./d-background\";\nimport { DBaseBackground } from \"./d-base-background\";\nimport { DBaseBorder } from \"./d-base-border\";\nimport { DBaseCorner } from \"./d-base-corner\";\nimport { DBaseInteractive } from \"./d-base-interactive\";\nimport { DBaseOutline } from \"./d-base-outline\";\nimport { DBasePadding } from \"./d-base-padding\";\nimport { DBasePoint } from \"./d-base-point\";\nimport { DBaseReflowableImpl } from \"./d-base-reflowable-impl\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\nimport { DBaseStateSetImplObservable } from \"./d-base-state-set-impl-observable\";\nimport { DBorderStateAware } from \"./d-border\";\nimport { DBorderMask } from \"./d-border-mask\";\nimport { DCoordinatePosition, DCoordinateSize } from \"./d-coordinate\";\nimport { DCorner } from \"./d-corner\";\nimport { DCornerMask } from \"./d-corner-mask\";\nimport { DThemeFont } from \"./d-font\";\nimport { DLayoutClearType } from \"./d-layout-clear-type\";\nimport { DOutline } from \"./d-outline\";\nimport { DPadding } from \"./d-padding\";\nimport { DScalarFunctions } from \"./d-scalar-functions\";\nimport { DScalarSet } from \"./d-scalar-set\";\nimport { DShadow } from \"./d-shadow\";\nimport { DStateAwareOrValueMightBe } from \"./d-state-aware\";\nimport { DThemes } from \"./theme/d-themes\";\nimport { isFunction } from \"./util/is-function\";\nimport { isNumber } from \"./util/is-number\";\nimport { isString } from \"./util/is-string\";\nimport { UtilKeyboardEvent, UtilKeyboardEventShortcut } from \"./util/util-keyboard-event\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DBaseAutoSet } from \"./d-base-auto-set\";\nimport { toEnum } from \"./util/to-enum\";\nimport { DOnOptions } from \"./d-on-options\";\nimport { DBaseSnippetContainer } from \"./d-base-snippet-container\";\nimport { DBaseReflowableContainer } from \"./d-base-reflowable-container\";\nimport { isArray } from \"./util/is-array\";\n\n/**\n * {@link DBase} padding options.\n */\nexport interface DBasePaddingOptions {\n\t/** A top padding */\n\ttop?: number;\n\n\t/** A right padding */\n\tright?: number;\n\n\t/** A bottom padding */\n\tbottom?: number;\n\n\t/** A left padding */\n\tleft?: number;\n}\n\n/**\n * {@link DBase} corner options.\n */\nexport interface DBaseCornerOptions {\n\t/** A radius */\n\tradius?: number;\n\n\t/** Masked corners get unrounded. */\n\tmask?: keyof typeof DCornerMask | DCornerMask;\n}\n\n/**\n * {@link DBase} events.\n */\nexport interface DBaseEvents<EMITTER> {\n\t/**\n\t * Triggered when an initialization is finished.\n\t *\n\t * @param emitter an emitter\n\t */\n\tinit(emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when added to a container.\n\t *\n\t * @param container a container added to\n\t */\n\tadded(container: Container): void;\n\n\t/**\n\t * Triggered when removed from a container.\n\t *\n\t * @param container a container removed from\n\t */\n\tremoved(container: Container): void;\n\n\t/**\n\t * Triggered when moved.\n\t *\n\t * @param newX a new x\n\t * @param newY a new y\n\t * @param oldX an old x\n\t * @param oldY an old y\n\t * @param emitter an emitter\n\t */\n\tmove(newX: number, newY: number, oldX: number, oldY: number, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when resized.\n\t *\n\t * @param newWidth a new width\n\t * @param newHeight a new height\n\t * @param oldWidth an old width\n\t * @param oldHeight an old height\n\t * @param emitter an emitter\n\t */\n\tresize(\n\t\tnewWidth: number,\n\t\tnewHeight: number,\n\t\toldWidth: number,\n\t\toldHeight: number,\n\t\temitter: EMITTER\n\t): void;\n\n\t/**\n\t * Triggered when scaled.\n\t *\n\t * @param newX a new x\n\t * @param newY a new y\n\t * @param oldX an old x\n\t * @param oldY an old y\n\t * @param emitter an emitter\n\t */\n\tscale(newX: number, newY: number, oldX: number, oldY: number, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when skewed.\n\t *\n\t * @param newX a new x\n\t * @param newY a new y\n\t * @param oldX an old x\n\t * @param oldY an old y\n\t * @param emitter an emitter\n\t */\n\tskew(newX: number, newY: number, oldX: number, oldY: number, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a state is changed.\n\t *\n\t * @param newState a new state\n\t * @param oldState an old state\n\t * @param emitter an emitter\n\t */\n\tstatechange(newState: DBaseStateSet, oldState: DBaseStateSet, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a wheel moves.\n\t *\n\t * @param e a wheel event\n\t * @param deltas wheel move amounts\n\t * @param global a point wheel moved\n\t * @param emitter an emitter\n\t */\n\twheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a key gets down.\n\t *\n\t * @param e a keyboard event\n\t * @param emitter an emitter\n\t */\n\tkeydown(e: KeyboardEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a key gets up.\n\t *\n\t * @param e a keyboard event\n\t * @param emitter an emitter\n\t */\n\tkeyup(e: KeyboardEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a pointer gets on an emitter.\n\t *\n\t * @param e an interaction event.\n\t * @param emitter an emitter\n\t */\n\tover(e: InteractionEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a pointer gets out of an emitter.\n\t *\n\t * @param e an interaction event\n\t * @param emitter an emitter\n\t */\n\tout(e: InteractionEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a pointer gets down on an emitter.\n\t *\n\t * @param e an interaction event.\n\t * @param emitter an emitter\n\t */\n\tdown(e: InteractionEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a pointer gets up on an emitter.\n\t *\n\t * @param e an interaction event\n\t * @param emitter an emitter\n\t */\n\tup(e: InteractionEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when an emitter is clicked.\n\t *\n\t * @param e an interaction event\n\t * @param emitter an emitter\n\t */\n\tclick(e: InteractionEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when an emitter is double clicked.\n\t *\n\t * @param e an event\n\t * @param interactionManager an interaction manager\n\t * @param emitter an emitter\n\t */\n\tdblclick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager,\n\t\temitter: EMITTER\n\t): void;\n\n\t/**\n\t * Triggered when a shortcut is pressed.\n\t *\n\t * @param e an event\n\t * @param emitter an emitter\n\t */\n\tshortcut(e: KeyboardEvent, emitter: EMITTER): void;\n}\n\n/**\n * {@link DBase} \"on\" options.\n */\nexport interface DBaseOnOptions<EMITTER> extends Partial<DBaseEvents<EMITTER>>, DOnOptions {}\n\n/**\n * {@link DBase} background options.\n */\nexport interface DBaseBackgroundOptions {\n\t/**\n\t * A color code or a function returning a color code.\n\t * If a computed value is undefined, falls back to the theme color.\n\t * If a computed value is null, a background is not rendered.\n\t */\n\tcolor?: DStateAwareOrValueMightBe<number | null>;\n\n\t/**\n\t * An alpha or a function returning an alpha.\n\t * If a computed value is undefined, falls back to an background alpha of a theme.\n\t */\n\talpha?: DStateAwareOrValueMightBe<number>;\n}\n\n/**\n * {@link DBase} border options.\n */\nexport interface DBaseBorderOptions {\n\t/**\n\t * A color code or a function returning a color code.\n\t * If a computed value is undefined, falls back to the theme color.\n\t * If a computed value is null, a background is not rendered.\n\t */\n\tcolor?: DStateAwareOrValueMightBe<number | null>;\n\n\t/**\n\t * An alpha or a function returning an alpha.\n\t * If a computed value is undefined, falls back to a border alpha of a theme.\n\t */\n\talpha?: DStateAwareOrValueMightBe<number>;\n\n\t/**\n\t * A width or a function returning a width.\n\t * If a computed value is undefined, falls back to a border width of a theme.\n\t */\n\twidth?: DStateAwareOrValueMightBe<number>;\n\n\t/**\n\t * An align or a function returning an align.\n\t * If a computed value is undefined, falls back to a border align of a theme.\n\t * If an align is 0, a border is rendered completely inside of a {@link DBase}.\n\t * If an align is 1, a border is rendered completely outside of a {@link DBase}.\n\t */\n\talign?: DStateAwareOrValueMightBe<number>;\n\n\t/** Masked borders get removed. */\n\tmask?: DStateAwareOrValueMightBe<DBorderMask> | keyof typeof DBorderMask;\n}\n\n/**\n * {@link DBase} outline optons.\n */\nexport interface DBaseOutlineOptions {\n\t/**\n\t * A color code or a function returning a color code.\n\t * If a computed value is undefined, falls back to the theme color.\n\t * If a computed value is null, a background is not rendered.\n\t */\n\tcolor?: DStateAwareOrValueMightBe<number | null>;\n\n\t/**\n\t * An alpha or a function returning an alpha.\n\t * If a computed value is undefined, falls back to an outline alpha of a theme.\n\t */\n\talpha?: DStateAwareOrValueMightBe<number>;\n\n\t/**\n\t * A width or a function returning a width.\n\t * If a computed value is undefined, falls back to an outline width of a theme.\n\t */\n\twidth?: DStateAwareOrValueMightBe<number>;\n\n\t/**\n\t * An offset or a function returning an offset.\n\t * If a computed value is undefined, falls back to an outline align of a theme.\n\t * A outline moves to outside when an offset gets larger.\n\t */\n\toffset?: DStateAwareOrValueMightBe<number>;\n\n\t/**\n\t * An align or a function returning an align.\n\t * If a computed value is undefined, falls back to an outline align of a theme.\n\t * If an align is 0, an outline is rendered completely inside.\n\t * If an align is 1, an outline is rendered completely outside.\n\t */\n\talign?: DStateAwareOrValueMightBe<number>;\n\n\t/** Masked outlines get removed. */\n\tmask?: DStateAwareOrValueMightBe<DBorderMask> | keyof typeof DBorderMask;\n}\n\nexport type DBaseShadow = \"NONE\" | \"WEAK\" | \"DEFAULT\" | DShadow;\n\n/**\n * {@link DBase} state blinker options.\n */\nexport interface DBaseStateBlinkerOptions {\n\tstate: string;\n\tinterval: number;\n}\n\n/**\n * {@link DBase} state ticker options.\n */\nexport interface DBaseStateTickerOptions {\n\tstate: string;\n\tinterval: number;\n}\n\n/**\n * {@link DBase} state options.\n */\nexport interface DBaseStateOptions {\n\tvalues?: string | string[];\n\tblinkers?: DBaseStateBlinkerOptions[];\n\ttickers?: DBaseStateTickerOptions[];\n}\n\n/**\n * {@link DBase} options.\n */\nexport interface DBaseOptions<THEME extends DThemeBase = DThemeBase, EMITTER = any> {\n\t/**\n\t * A parent.\n\t *\n\t * In the case of UI classes which pop up (e.g., {@link DDialog} and {@link DMenu}),\n\t * if multiple application instances are there, better to set\n\t * this to an `application.stage` so that they pick a right application.\n\t * By default, they assume the last created application is\n\t * the one they belong to at the time when they are created.\n\t */\n\tparent?: Container;\n\n\t/** Children. */\n\tchildren?: Array<DisplayObject | null>;\n\n\t/** A name. */\n\tname?: string;\n\n\t/**\n\t * One of the followings:\n\t * * A X position\n\t * * A position keyword\n\t * * A position expression (Parsed by {@link DScalarExpression})\n\t * * A function returning a X position ({@link DScalarFunction})\n\t * * An object returning a X position ({@link DScalar})\n\t */\n\tx?: DCoordinatePosition;\n\n\t/**\n\t * One of the followings:\n\t * * A Y position\n\t * * A position keyword\n\t * * A position expresion (Parsed by {@link DScalarExpression})\n\t * * A function returning a Y position ({@link DScalarFunction})\n\t * * An object returning a Y position ({@link DScalar})\n\t */\n\ty?: DCoordinatePosition;\n\n\t/**\n\t * One of the followings:\n\t * * A width\n\t * * A size keyword\n\t * * A size expression (Parsed by {@link DScalarExpression})\n\t * * A function returning a width ({@link DScalarFunction})\n\t * * An object returning a width ({@link DScalar})\n\t */\n\twidth?: DCoordinateSize;\n\n\t/**\n\t * One of the followings:\n\t * * A height\n\t * * A size keyword\n\t * * A size expression (Parsed by {@link DScalarExpression})\n\t * * A function returning a hight ({@link DScalarFunction})\n\t * * An object returning a hight ({@link DScalar})\n\t */\n\theight?: DCoordinateSize;\n\n\t/**\n\t * A visibility.\n\t * Set to true to make {@link DBase} visible.\n\t * Set to false to make {@link DBase} invisible.\n\t * The default value is true.\n\t */\n\tvisible?: boolean;\n\n\t/**\n\t * A renderability.\n\t * Unlike {@link visible}, non-renderable element occupies a space.\n\t * Set to true to make {@link DBase} renderable.\n\t * Set to false to make {@link DBase} not renderable.\n\t * The default value is true.\n\t */\n\trenderable?: boolean;\n\n\t/** A default state. */\n\tstate?: string | string[] | DBaseStateOptions;\n\n\t/** An interactivity option. */\n\tinteractive?: keyof typeof DBaseInteractive | DBaseInteractive;\n\n\t/** A padding options. */\n\tpadding?: number | DBasePaddingOptions;\n\n\t/** A corner options. */\n\tcorner?: number | DBaseCornerOptions;\n\n\t/** A theme or a theme name. */\n\ttheme?: THEME | string;\n\n\t/**\n\t * Mappings of event names and event handlers.\n\t */\n\ton?: DBaseOnOptions<EMITTER>;\n\n\t/**\n\t * A weight used by {@link DLayoutVertical} and {@link DLayoutHorizontal}.\n\t */\n\tweight?: number;\n\n\t/** A tooltip text. */\n\ttitle?: string;\n\n\t/** A shortcut option. */\n\tshortcut?: string | UtilKeyboardEventShortcut;\n\n\t/** A shortcut options. */\n\tshortcuts?: Array<string | UtilKeyboardEventShortcut>;\n\n\t/** A background options. */\n\tbackground?: DBaseBackgroundOptions;\n\n\t/** A border options. */\n\tborder?: DBaseBorderOptions;\n\n\t/** An outline options. */\n\toutline?: DBaseOutlineOptions;\n\n\t/** A shadow. */\n\tshadow?: DBaseShadow | null;\n\n\t/** A clear type used by {@link DLayoutVertical} and {@link DLayoutHorizontal}. */\n\tclear?: keyof typeof DLayoutClearType | DLayoutClearType;\n\n\t/** A cursor shape. */\n\tcursor?: DStateAwareOrValueMightBe<string>;\n}\n\n/**\n * {@link DBase} theme.\n */\nexport interface DThemeBase extends DThemeFont {\n\t/**\n\t * Returns a X coordinate.\n\t */\n\tgetX(): DCoordinatePosition;\n\n\t/**\n\t * Returns a Y coordinate.\n\t */\n\tgetY(): DCoordinatePosition;\n\n\t/**\n\t * Returns a height.\n\t */\n\tgetHeight(): DCoordinateSize;\n\n\t/**\n\t * Returns a width.\n\t */\n\tgetWidth(): DCoordinateSize;\n\n\t/**\n\t * Returns a background color.\n\t * If the color is null, backgrounds are not be rendered.\n\t *\n\t * @param state a state\n\t */\n\tgetBackgroundColor(state: DBaseStateSet): number | null;\n\n\t/**\n\t * Returns a background alpha.\n\t *\n\t * @param state a state\n\t */\n\tgetBackgroundAlpha(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns a background texture.\n\t */\n\tgetBackgroundTexture(): Texture;\n\n\t/**\n\t * Returns a border color.\n\t * If the color is null, borders are not be rendered.\n\t *\n\t * @param state a state\n\t */\n\tgetBorderColor(state: DBaseStateSet): number | null;\n\n\t/**\n\t * Returns a border alpha.\n\t *\n\t * @param state a state\n\t */\n\tgetBorderAlpha(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns a border width.\n\t *\n\t * @param state a state\n\t */\n\tgetBorderWidth(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns a border align.\n\t *\n\t * @param state a state\n\t */\n\tgetBorderAlign(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns a border mask.\n\t *\n\t * @param state a mask\n\t */\n\tgetBorderMask(state: DBaseStateSet): DBorderMask;\n\n\t/**\n\t * Returns a border texture.\n\t */\n\tgetBorderTexture(): Texture;\n\n\t/**\n\t * Returns a left padding.\n\t */\n\tgetPaddingLeft(): number;\n\n\t/**\n\t * Returns a right padding.\n\t */\n\tgetPaddingRight(): number;\n\n\t/**\n\t * Returns a top padding.\n\t */\n\tgetPaddingTop(): number;\n\n\t/**\n\t * Returns a bottom padding.\n\t */\n\tgetPaddingBottom(): number;\n\n\t/**\n\t * Returns a corner radius.\n\t */\n\tgetCornerRadius(): number;\n\n\t/**\n\t * Returns a corner mask.\n\t */\n\tgetCornerMask(): DCornerMask;\n\n\t/**\n\t * Returns an outline color.\n\t * If the color is null, outlines are not be rendered.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineColor(state: DBaseStateSet): number | null;\n\n\t/**\n\t * Returns an outline alpha.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineAlpha(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns an outline width.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineWidth(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns an outline offset.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineOffset(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns an outline align.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineAlign(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns an outline mask.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineMask(state: DBaseStateSet): DBorderMask;\n\n\t/**\n\t * Returns a shadow.\n\t * If a shadow is null, no shadow is rendered.\n\t */\n\tgetShadow(): DShadow | null;\n\n\t/**\n\t * Returns an interactivity.\n\t */\n\tgetInteractive(): DBaseInteractive;\n\n\t/**\n\t * Returns true if focusable.\n\t */\n\tnewState(state: DBaseStateSet): void;\n\n\t/**\n\t * Returns a tooltip text.\n\t */\n\tgetTitle(): string;\n\n\t/**\n\t * Returns a clear type.\n\t * A clear type is for layout classes including {@link DLayoutVertical}.\n\t */\n\tgetClearType(): DLayoutClearType;\n\n\t/**\n\t * Returns a weight.\n\t * Weights are for layout classes including {@link DLayoutVertical}.\n\t * If a weight is less than or equals to zero, layout classes are supposed not to change a width / height.\n\t */\n\tgetWeight(): number;\n\n\t/**\n\t * Creates a new shadow.\n\t */\n\tnewShadow(): DShadow | null;\n\n\t/**\n\t * Creates a new weak shadow.\n\t */\n\tnewShadowWeak(): DShadow | null;\n\n\t/**\n\t * Returns a cursor.\n\t */\n\tgetCursor(state: DBaseStateSet): string;\n}\n\nconst toTheme = <THEME extends DThemeBase>(options?: DBaseOptions<THEME>): THEME | undefined => {\n\tconst theme = options?.theme;\n\tif (theme) {\n\t\tif (isString(theme)) {\n\t\t\treturn DThemes.getInstance().get(theme);\n\t\t}\n\t\treturn theme;\n\t}\n};\n\nexport interface DRefitable {\n\treadonly width: number;\n\treadonly height: number;\n}\n\nconst toShortcuts = <THEME extends DThemeBase>(\n\toptions?: DBaseOptions<THEME>\n): UtilKeyboardEventShortcut[] | undefined => {\n\tif (options) {\n\t\tconst shortcut = options.shortcut;\n\t\tconst shortcuts = options.shortcuts;\n\t\tif (shortcuts != null || shortcut != null) {\n\t\t\tconst result: UtilKeyboardEventShortcut[] = [];\n\t\t\tif (shortcut != null) {\n\t\t\t\tresult.push(UtilKeyboardEvent.toShortcut(shortcut));\n\t\t\t}\n\t\t\tif (shortcuts != null) {\n\t\t\t\tfor (let i = 0, imax = shortcuts.length; i < imax; ++i) {\n\t\t\t\t\tresult.push(UtilKeyboardEvent.toShortcut(shortcuts[i]));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\treturn undefined;\n};\n\n/**\n * A base class for UI classes.\n * See {@link DBaseEvents} for event details.\n */\nexport class DBase<\n\tTHEME extends DThemeBase = DThemeBase,\n\tOPTIONS extends DBaseOptions<THEME> = DBaseOptions<THEME>\n> extends Container {\n\tprotected static WORK_CONTAINS_POINT: Point = new Point();\n\n\tprivate _state: DBaseStateSet;\n\tprivate _theme: THEME;\n\tprotected _options: OPTIONS | undefined;\n\tprivate _width: number;\n\tprivate _height: number;\n\tprotected _padding: DPadding;\n\tprotected _corner: DCorner;\n\tprivate _scalarSet: DScalarSet;\n\tprotected _auto: DBaseAutoSet;\n\tprivate _isDirty: boolean;\n\tprivate _hasDirty: boolean;\n\tprivate _isHierarchyDirty: boolean;\n\tprivate _shadow: DShadow | null;\n\tprivate _onShadowUpdateBound: () => void;\n\tprivate _weight: number;\n\tprivate _position: DBasePoint;\n\tprivate _scale: DBasePoint;\n\tprivate _skew: DBasePoint;\n\tprotected _title: string;\n\tprotected _background: DBackgroundStateAware;\n\tprotected _border: DBorderStateAware;\n\tprotected _outline: DOutline;\n\tprotected _clearType: DLayoutClearType;\n\tprotected _shortcuts?: UtilKeyboardEventShortcut[];\n\tprotected _snippet: DBaseSnippetContainer;\n\tprotected _reflowable: DBaseReflowableContainer;\n\tprotected _lastDownPoint?: Point;\n\tprotected _cursor?: DStateAwareOrValueMightBe<string>;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper();\n\n\t\t// Transform\n\t\tconst transform: Transform = this.transform;\n\t\tthis._position = new DBasePoint(transform.position, (newX, newY, oldX, oldY): void => {\n\t\t\tthis.onMove(newX, newY, oldX, oldY);\n\t\t});\n\t\tthis._scale = new DBasePoint(transform.scale, (newX, newY, oldX, oldY): void => {\n\t\t\tthis.onScale(newX, newY, oldX, oldY);\n\t\t});\n\t\tthis._skew = new DBasePoint(transform.skew, (newX, newY, oldX, oldY): void => {\n\t\t\tthis.onSkew(newX, newY, oldX, oldY);\n\t\t});\n\n\t\t//\n\t\tthis._options = options;\n\t\tconst scalarSet: DScalarSet = (this._scalarSet = {});\n\t\tthis._auto = new DBaseAutoSet();\n\t\tthis._isDirty = true;\n\t\tthis._hasDirty = false;\n\t\tthis._isHierarchyDirty = false;\n\t\tthis._shadow = null;\n\t\tthis.name = options?.name ?? \"\";\n\t\tconst theme = toTheme(options) || this.getThemeDefault();\n\t\tthis._theme = theme;\n\t\tthis._snippet = new DBaseSnippetContainer(this);\n\t\tthis._reflowable = new DBaseReflowableContainer();\n\t\tthis._clearType = toEnum(options?.clear ?? theme.getClearType(), DLayoutClearType);\n\t\tthis._padding = this.newPadding(theme, options, (): void => {\n\t\t\tthis.toDirty();\n\t\t\tthis.toParentResized();\n\t\t\tthis.toHierarchyDirty();\n\t\t\tDApplications.update(this);\n\t\t});\n\t\tconst toDirtyAndUpdate = (): void => {\n\t\t\tthis.toDirty();\n\t\t\tDApplications.update(this);\n\t\t};\n\t\tthis._background = new DBaseBackground(theme, options, toDirtyAndUpdate);\n\t\tthis._border = new DBaseBorder(theme, options, toDirtyAndUpdate);\n\t\tthis._outline = new DBaseOutline(theme, options, toDirtyAndUpdate);\n\t\tthis._corner = new DBaseCorner(theme, options, toDirtyAndUpdate);\n\n\t\t// X\n\t\tconst position = transform.position;\n\t\tconst x = options?.x ?? theme.getX();\n\t\tif (isNumber(x)) {\n\t\t\tposition.x = x;\n\t\t} else {\n\t\t\tposition.x = 0;\n\t\t\tscalarSet.x = DScalarFunctions.position(x);\n\t\t}\n\n\t\t// Y\n\t\tconst y = options?.y ?? theme.getY();\n\t\tif (isNumber(y)) {\n\t\t\tposition.y = y;\n\t\t} else {\n\t\t\tposition.y = 0;\n\t\t\tscalarSet.y = DScalarFunctions.position(y);\n\t\t}\n\n\t\t// Width\n\t\tconst width = options?.width ?? theme.getWidth();\n\t\tif (!this._auto.width.from(width)) {\n\t\t\tif (isNumber(width)) {\n\t\t\t\tthis._width = width;\n\t\t\t} else {\n\t\t\t\tthis._width = 100;\n\t\t\t\tscalarSet.width = DScalarFunctions.size(width);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._width = 100;\n\t\t}\n\n\t\t// Height\n\t\tconst height = options?.height ?? theme.getHeight();\n\t\tif (!this._auto.height.from(height)) {\n\t\t\tif (isNumber(height)) {\n\t\t\t\tthis._height = height;\n\t\t\t} else {\n\t\t\t\tthis._height = 100;\n\t\t\t\tscalarSet.height = DScalarFunctions.size(height);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._height = 100;\n\t\t}\n\n\t\t// Visibility\n\t\tif (options != null) {\n\t\t\tconst visible = options.visible;\n\t\t\tif (visible != null) {\n\t\t\t\tthis.visible = visible;\n\t\t\t}\n\t\t}\n\n\t\t// Renderability\n\t\tif (options != null) {\n\t\t\tconst renderable = options.renderable;\n\t\t\tif (renderable != null) {\n\t\t\t\tthis.renderable = renderable;\n\t\t\t}\n\t\t}\n\n\t\t// State\n\t\tthis._state = new DBaseStateSetImplObservable((newState, oldState): void => {\n\t\t\tthis.onStateChange(newState, oldState);\n\t\t});\n\n\t\t// Interactive\n\t\tconst interactive = toEnum(\n\t\t\toptions?.interactive ?? theme.getInteractive(),\n\t\t\tDBaseInteractive\n\t\t);\n\t\tthis.interactive = !!(interactive & DBaseInteractive.SELF);\n\t\tthis.interactiveChildren = !!(interactive & DBaseInteractive.CHILDREN);\n\n\t\t// Events\n\t\tif (options != null) {\n\t\t\tconst on = options.on;\n\t\t\tif (on != null) {\n\t\t\t\tfor (const name in on) {\n\t\t\t\t\tconst handler = on[name];\n\t\t\t\t\tif (handler) {\n\t\t\t\t\t\tthis.on(name, handler);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Title\n\t\tthis._title = options?.title ?? theme.getTitle();\n\n\t\t// Weight\n\t\tthis._weight = options?.weight ?? theme.getWeight();\n\n\t\t// Reflowable\n\t\tthis.initReflowable();\n\n\t\t// Shadow\n\t\tthis._onShadowUpdateBound = (): void => {\n\t\t\tDApplications.update(this);\n\t\t};\n\t\tlet shadow: DBaseShadow | null | undefined;\n\t\tif (options != null) {\n\t\t\tshadow = options.shadow;\n\t\t}\n\t\tif (shadow === undefined) {\n\t\t\tshadow = theme.getShadow();\n\t\t}\n\t\tif (shadow) {\n\t\t\tif (isString(shadow)) {\n\t\t\t\tswitch (shadow) {\n\t\t\t\t\tcase \"WEAK\":\n\t\t\t\t\t\tthis.shadow = theme.newShadowWeak();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"DEFAULT\":\n\t\t\t\t\t\tthis.shadow = theme.newShadow();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.shadow = shadow;\n\t\t\t}\n\t\t}\n\n\t\t// Event handlers\n\t\tthis.on(UtilPointerEvent.over, (e: InteractionEvent): void => {\n\t\t\tthis.onOver(e);\n\t\t});\n\n\t\tthis.on(UtilPointerEvent.out, (e: InteractionEvent): void => {\n\t\t\tthis.onOut(e);\n\t\t});\n\n\t\tthis.on(UtilPointerEvent.down, (e: InteractionEvent): void => {\n\t\t\tthis.onDown(e);\n\t\t});\n\n\t\tthis.on(UtilPointerEvent.up, (e: InteractionEvent): void => {\n\t\t\tthis.onUp(e);\n\t\t});\n\n\t\t// Children change detection\n\t\tthis.on(\"added\", (): void => {\n\t\t\tthis.toParentResized();\n\t\t\tif (this.isDirty() || this.hasDirty()) {\n\t\t\t\tthis.toParentHasDirty();\n\t\t\t}\n\t\t\tif (this._isHierarchyDirty) {\n\t\t\t\tthis.toParentHierarchyDirty();\n\t\t\t}\n\t\t\tconst newParent = this.parent;\n\t\t\tif (newParent instanceof DBase) {\n\t\t\t\tthis.state.parent = newParent.state;\n\t\t\t}\n\t\t\tDApplications.update(this);\n\t\t});\n\n\t\tthis.on(\"removed\", (): void => {\n\t\t\tthis.blur(true);\n\t\t\tthis.state.parent = null;\n\t\t\tDApplications.update(this);\n\t\t});\n\n\t\t// Shortcut\n\t\tconst shortcuts = toShortcuts(options);\n\t\tthis._shortcuts = shortcuts;\n\t\tif (shortcuts != null) {\n\t\t\tconst onShortcutBound = (e: KeyboardEvent): void => {\n\t\t\t\tthis.onShortcut(e);\n\t\t\t};\n\t\t\tfor (let i = 0, imax = shortcuts.length; i < imax; ++i) {\n\t\t\t\tUtilKeyboardEvent.on(this, shortcuts[i], onShortcutBound);\n\t\t\t}\n\t\t}\n\n\t\t// Other initialization\n\t\tthis.init(options);\n\n\t\t// State Override\n\t\ttheme.newState(this._state);\n\t\tif (options != null) {\n\t\t\tconst state = options.state;\n\t\t\tif (state != null) {\n\t\t\t\tconst s = this._state;\n\t\t\t\tif (isString(state)) {\n\t\t\t\t\ts.add(state);\n\t\t\t\t} else if (isArray(state)) {\n\t\t\t\t\ts.addAll(state);\n\t\t\t\t} else {\n\t\t\t\t\t// Values\n\t\t\t\t\tconst values = state.values;\n\t\t\t\t\tif (values != null) {\n\t\t\t\t\t\tif (isString(values)) {\n\t\t\t\t\t\t\ts.add(values);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts.addAll(values);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Blinker\n\t\t\t\t\tconst blinkers = state.blinkers;\n\t\t\t\t\tif (blinkers != null) {\n\t\t\t\t\t\tconst b = s.blinker;\n\t\t\t\t\t\tfor (let i = 0, imax = blinkers.length; i < imax; ++i) {\n\t\t\t\t\t\t\tconst blinker = blinkers[i];\n\t\t\t\t\t\t\tb.add(blinker.state, blinker.interval);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Ticker\n\t\t\t\t\tconst tickers = state.tickers;\n\t\t\t\t\tif (tickers != null) {\n\t\t\t\t\t\tconst t = s.ticker;\n\t\t\t\t\t\tfor (let i = 0, imax = tickers.length; i < imax; ++i) {\n\t\t\t\t\t\t\tconst ticker = tickers[i];\n\t\t\t\t\t\t\tt.add(ticker.state, ticker.interval);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Parent\n\t\tif (options != null) {\n\t\t\tconst parent = options.parent;\n\t\t\tif (parent != null) {\n\t\t\t\tparent.addChild(this);\n\t\t\t}\n\t\t}\n\n\t\t// Children\n\t\tif (options != null) {\n\t\t\tconst children = options.children;\n\t\t\tif (children != null) {\n\t\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\t\tconst child = children[i];\n\t\t\t\t\tif (child != null) {\n\t\t\t\t\t\tthis.addChild(child);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Cursor\n\t\tlet cursor: DStateAwareOrValueMightBe<string> | undefined;\n\t\tif (options != null) {\n\t\t\tcursor = options.cursor;\n\t\t\tthis._cursor = cursor;\n\t\t}\n\t\tthis.cursor = this.toCursor(cursor, this._state);\n\n\t\t// Done\n\t\tthis.emit(\"init\", this);\n\t}\n\n\tprotected newPadding(theme: THEME, options?: OPTIONS, callback?: () => void): DBasePadding {\n\t\treturn new DBasePadding(theme, options, callback);\n\t}\n\n\tprotected toCursor(\n\t\tcursor: DStateAwareOrValueMightBe<string> | undefined,\n\t\tstate: DBaseStateSet\n\t): string {\n\t\tif (cursor) {\n\t\t\tif (isFunction(cursor)) {\n\t\t\t\tconst result = cursor(state);\n\t\t\t\tif (result !== undefined) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} else if (cursor !== undefined) {\n\t\t\t\treturn cursor;\n\t\t\t}\n\t\t}\n\t\treturn this.theme.getCursor(state);\n\t}\n\n\tget snippet(): DBaseSnippetContainer {\n\t\treturn this._snippet;\n\t}\n\n\tget reflowable(): DBaseReflowableContainer {\n\t\treturn this._reflowable;\n\t}\n\n\tprotected initReflowable(): void {\n\t\tnew DBaseReflowableImpl(this);\n\t}\n\n\tprotected onChildrenChange(): void {\n\t\tthis.toHierarchyDirty();\n\t\tsuper.onChildrenChange();\n\t}\n\n\tprotected onShortcut(e: KeyboardEvent): void {\n\t\tthis.emit(\"shortcut\", e, this);\n\t}\n\n\tprotected init(options?: OPTIONS): void {\n\t\t// OTHER INITIALIZATIONS BEFORE `parent.addChild( this )`\n\t}\n\n\tget weight(): number {\n\t\treturn this._weight;\n\t}\n\n\tprotected onMove(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof DBase) {\n\t\t\t\tchild.onParentMove(newX, newY, oldX, oldY);\n\t\t\t}\n\t\t}\n\t\tDApplications.update(this);\n\t\tthis.emit(\"move\", newX, newY, oldX, oldY, this);\n\t}\n\n\tresize(width?: number, height?: number): boolean {\n\t\tconst oldWidth = this._width;\n\t\tconst oldHeight = this._height;\n\t\tconst newWidth = width != null ? width : oldWidth;\n\t\tconst newHeight = height != null ? height : oldHeight;\n\t\tconst isWidthChanged = oldWidth !== newWidth;\n\t\tconst isHeightChanged = oldHeight !== newHeight;\n\t\tif (isWidthChanged) {\n\t\t\tthis._width = newWidth;\n\t\t}\n\t\tif (isHeightChanged) {\n\t\t\tthis._height = newHeight;\n\t\t}\n\t\tconst isChanged = isWidthChanged || isHeightChanged;\n\t\tif (isChanged) {\n\t\t\tthis.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t\t}\n\t\tif (isWidthChanged) {\n\t\t\tconst scalarSet = this._scalarSet;\n\t\t\tif (scalarSet.x != null) {\n\t\t\t\tconst position = this._position;\n\t\t\t\tconst parent = this.getParentOfSize();\n\t\t\t\tif (parent) {\n\t\t\t\t\tthis._position.x = scalarSet.x(\n\t\t\t\t\t\tparent.width,\n\t\t\t\t\t\tnewWidth,\n\t\t\t\t\t\tparent.padding.getLeft(),\n\t\t\t\t\t\tposition.x\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isHeightChanged) {\n\t\t\tconst scalarSet = this._scalarSet;\n\t\t\tif (scalarSet.y != null) {\n\t\t\t\tconst position = this._position;\n\t\t\t\tconst parent = this.getParentOfSize();\n\t\t\t\tif (parent) {\n\t\t\t\t\tthis._position.y = scalarSet.y(\n\t\t\t\t\t\tparent.height,\n\t\t\t\t\t\tnewHeight,\n\t\t\t\t\t\tparent.padding.getTop(),\n\t\t\t\t\t\tposition.y\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isChanged;\n\t}\n\n\tgetClearType(): DLayoutClearType {\n\t\treturn this._clearType;\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tthis.toDirty();\n\t\tthis.toHierarchyDirty();\n\n\t\tconst padding = this._padding;\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof DBase) {\n\t\t\t\tchild.onParentResize(newWidth, newHeight, padding);\n\t\t\t}\n\t\t}\n\n\t\tDApplications.update(this);\n\t\tthis.emit(\"resize\", newWidth, newHeight, oldWidth, oldHeight, this);\n\t}\n\n\tprotected onScale(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\tDApplications.update(this);\n\t\tthis.emit(\"scale\", newX, newY, oldX, oldY, this);\n\t}\n\n\tprotected onSkew(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\tDApplications.update(this);\n\t\tthis.emit(\"skew\", newX, newY, oldX, oldY, this);\n\t}\n\n\tget type(): string {\n\t\treturn this.getType();\n\t}\n\n\t// @ts-ignore\n\tget x(): number {\n\t\treturn this._position.x;\n\t}\n\n\tset x(x: DCoordinatePosition) {\n\t\tthis.setX(x);\n\t}\n\n\tgetX(): DCoordinatePosition {\n\t\tconst scalarSet = this._scalarSet;\n\t\tif (scalarSet.x != null) {\n\t\t\treturn scalarSet.x;\n\t\t} else {\n\t\t\treturn this._position.x;\n\t\t}\n\t}\n\n\tsetX(x: DCoordinatePosition): void {\n\t\tconst scalarSet = this._scalarSet;\n\t\tif (isNumber(x)) {\n\t\t\tconst position = this._position;\n\t\t\tif (position.x !== x) {\n\t\t\t\tscalarSet.x = undefined;\n\t\t\t\tposition.x = x;\n\t\t\t} else {\n\t\t\t\tif (scalarSet.x !== undefined) {\n\t\t\t\t\tscalarSet.x = undefined;\n\t\t\t\t\tthis.toParentResized();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst scalar = DScalarFunctions.position(x);\n\t\t\tif (scalarSet.x !== scalar) {\n\t\t\t\tscalarSet.x = scalar;\n\t\t\t\tthis.toParentResized();\n\t\t\t}\n\t\t}\n\t}\n\n\t// @ts-ignore\n\tget y(): number {\n\t\treturn this._position.y;\n\t}\n\n\tset y(y: DCoordinatePosition) {\n\t\tthis.setY(y);\n\t}\n\n\tgetY(): DCoordinatePosition {\n\t\tconst scalarSet = this._scalarSet;\n\t\tif (scalarSet.y != null) {\n\t\t\treturn scalarSet.y;\n\t\t} else {\n\t\t\treturn this._position.y;\n\t\t}\n\t}\n\n\tsetY(y: DCoordinatePosition): void {\n\t\tconst scalarSet = this._scalarSet;\n\t\tif (isNumber(y)) {\n\t\t\tconst position = this._position;\n\t\t\tif (position.y !== y) {\n\t\t\t\tscalarSet.y = undefined;\n\t\t\t\tposition.y = y;\n\t\t\t} else {\n\t\t\t\tif (scalarSet.y !== undefined) {\n\t\t\t\t\tscalarSet.y = undefined;\n\t\t\t\t\tthis.toParentResized();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst scalar = DScalarFunctions.position(y);\n\t\t\tif (scalarSet.y !== scalar) {\n\t\t\t\tscalarSet.y = scalar;\n\t\t\t\tthis.toParentResized();\n\t\t\t}\n\t\t}\n\t}\n\n\t// @ts-ignore\n\tget width(): number {\n\t\treturn this._width;\n\t}\n\n\tset width(width: DCoordinateSize) {\n\t\tthis.setWidth(width);\n\t}\n\n\tgetWidth(): DCoordinateSize {\n\t\treturn this._auto.width.toCoordinate(this._scalarSet.width || this._width);\n\t}\n\n\tsetWidth(width: DCoordinateSize): void {\n\t\tconst auto = this._auto.width;\n\t\tconst isOn = auto.isOn;\n\t\tconst isAuto = auto.from(width);\n\t\tif (auto.isOn !== isOn) {\n\t\t\tthis.toHierarchyDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t\tif (!isAuto) {\n\t\t\tconst scalarSet = this._scalarSet;\n\t\t\tif (isNumber(width)) {\n\t\t\t\tconst oldWidth = this._width;\n\t\t\t\tif (oldWidth !== width) {\n\t\t\t\t\tscalarSet.width = undefined;\n\t\t\t\t\tthis._width = width;\n\t\t\t\t\tconst height = this._height;\n\t\t\t\t\tthis.onResize(width, height, oldWidth, height);\n\n\t\t\t\t\tif (scalarSet.x != null) {\n\t\t\t\t\t\tconst position = this._position;\n\t\t\t\t\t\tconst parent = this.getParentOfSize();\n\t\t\t\t\t\tif (parent) {\n\t\t\t\t\t\t\tposition.x = scalarSet.x(\n\t\t\t\t\t\t\t\tparent.width,\n\t\t\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\t\tparent.padding.getLeft(),\n\t\t\t\t\t\t\t\tposition.x\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (scalarSet.width !== undefined) {\n\t\t\t\t\t\tscalarSet.width = undefined;\n\t\t\t\t\t\tthis.toParentResized();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst scalar = DScalarFunctions.size(width);\n\t\t\t\tif (scalarSet.width !== scalar) {\n\t\t\t\t\tscalarSet.width = scalar;\n\t\t\t\t\tthis.toParentResized();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// @ts-ignore\n\tget height(): number {\n\t\treturn this._height;\n\t}\n\n\tset height(height: DCoordinateSize) {\n\t\tthis.setHeight(height);\n\t}\n\n\tgetHeight(): DCoordinateSize {\n\t\treturn this._auto.height.toCoordinate(this._scalarSet.height || this._height);\n\t}\n\n\tsetHeight(height: DCoordinateSize): void {\n\t\tconst auto = this._auto.height;\n\t\tconst isOn = auto.isOn;\n\t\tconst isAuto = auto.from(height);\n\t\tif (auto.isOn !== isOn) {\n\t\t\tthis.toHierarchyDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t\tif (!isAuto) {\n\t\t\tconst scalarSet = this._scalarSet;\n\t\t\tif (isNumber(height)) {\n\t\t\t\tconst oldHeight = this._height;\n\t\t\t\tif (oldHeight !== height) {\n\t\t\t\t\tscalarSet.height = undefined;\n\t\t\t\t\tthis._height = height;\n\t\t\t\t\tconst width = this._width;\n\t\t\t\t\tthis.onResize(width, height, width, oldHeight);\n\n\t\t\t\t\tif (scalarSet.y != null) {\n\t\t\t\t\t\tconst position = this._position;\n\t\t\t\t\t\tconst parent = this.getParentOfSize();\n\t\t\t\t\t\tif (parent) {\n\t\t\t\t\t\t\tposition.y = scalarSet.y(\n\t\t\t\t\t\t\t\tparent.height,\n\t\t\t\t\t\t\t\theight,\n\t\t\t\t\t\t\t\tparent.padding.getTop(),\n\t\t\t\t\t\t\t\tposition.y\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (scalarSet.height !== undefined) {\n\t\t\t\t\t\tscalarSet.height = undefined;\n\t\t\t\t\t\tthis.toParentResized();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst scalar = DScalarFunctions.size(height);\n\t\t\t\tif (scalarSet.height !== scalar) {\n\t\t\t\t\tscalarSet.height = scalar;\n\t\t\t\t\tthis.toParentResized();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// @ts-ignore\n\tget position(): DBasePoint {\n\t\treturn this._position;\n\t}\n\n\t// @ts-ignore\n\tget scale(): DBasePoint {\n\t\treturn this._scale;\n\t}\n\n\t// @ts-ignore\n\tget skew(): DBasePoint {\n\t\treturn this._skew;\n\t}\n\n\tget padding(): DPadding {\n\t\treturn this._padding;\n\t}\n\n\tget corner(): DCorner {\n\t\treturn this._corner;\n\t}\n\n\tget background(): DBackgroundStateAware {\n\t\treturn this._background;\n\t}\n\n\tget border(): DBorderStateAware {\n\t\treturn this._border;\n\t}\n\n\tget outline(): DOutline {\n\t\treturn this._outline;\n\t}\n\n\tget unsafe(): Transform {\n\t\treturn this.transform;\n\t}\n\n\tget title(): string {\n\t\treturn this._title;\n\t}\n\n\tset title(title: string) {\n\t\tif (this._title !== title) {\n\t\t\tthis._title = title;\n\t\t\tif (this.state.isHovered) {\n\t\t\t\tthis.applyTitle();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected applyTitle(): void {\n\t\tconst layer = DApplications.getLayer(this);\n\t\tif (layer) {\n\t\t\tlayer.view.title = this._title;\n\t\t}\n\t}\n\n\tshow(): this {\n\t\tif (!this.visible) {\n\t\t\tthis.visible = true;\n\t\t\tthis.toParentHierarchyDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\tisShown(): boolean {\n\t\treturn this.visible;\n\t}\n\n\thide(): this {\n\t\tif (this.visible) {\n\t\t\tthis.visible = false;\n\t\t\tthis.toParentHierarchyDirty();\n\t\t\tthis.blur(true);\n\t\t\tDApplications.update(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\tisHidden(): boolean {\n\t\treturn !this.visible;\n\t}\n\n\ttoDirty(): boolean {\n\t\tif (!this._isDirty) {\n\t\t\tthis._isDirty = true;\n\t\t\tthis.toParentHasDirty();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\ttoHasDirty(): boolean {\n\t\tif (!this._hasDirty) {\n\t\t\tthis._hasDirty = true;\n\t\t\tthis.toParentHasDirty();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\ttoParentHasDirty(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.toHasDirty();\n\t\t}\n\t}\n\n\ttoHierarchyDirty(): boolean {\n\t\tif (!this._isHierarchyDirty) {\n\t\t\tthis._isHierarchyDirty = true;\n\t\t\tthis.onHierarchyDirty();\n\t\t\tthis.toParentHierarchyDirty();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\ttoParentHierarchyDirty(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.toHierarchyDirty();\n\t\t}\n\t}\n\n\tisHierarchyDirty(): boolean {\n\t\treturn this._isHierarchyDirty;\n\t}\n\n\tprotected onHierarchyDirty(): void {\n\t\t// DO NOTHING\n\t}\n\n\tisDirty(): boolean {\n\t\treturn this._isDirty;\n\t}\n\n\thasDirty(): boolean {\n\t\treturn this._hasDirty;\n\t}\n\n\tprotected setFocused(isFocused: boolean): this {\n\t\tif (this.state.isFocused !== isFocused) {\n\t\t\tconst layer = DApplications.getLayer(this);\n\t\t\tif (layer) {\n\t\t\t\tlayer.getFocusController().set(this, isFocused);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tfocus(): this {\n\t\treturn this.setFocused(true);\n\t}\n\n\tblur(recursively?: boolean): this {\n\t\tif (recursively) {\n\t\t\tconst layer = DApplications.getLayer(this);\n\t\t\tif (layer) {\n\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\tconst focused = focusController.get();\n\t\t\t\tif (focused instanceof DBase) {\n\t\t\t\t\tlet current: Container = focused;\n\t\t\t\t\twhile (current) {\n\t\t\t\t\t\tif (current === this) {\n\t\t\t\t\t\t\tfocused.setFocused(false);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.setFocused(false);\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tthis.toDirty();\n\t\tDApplications.update(this);\n\t\tthis.emit(\"statechange\", newState, oldState, this);\n\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof DBase) {\n\t\t\t\tchild.state.onParentChange(newState, oldState);\n\t\t\t}\n\t\t}\n\n\t\tif (newState.isFocused) {\n\t\t\tif (!oldState.isFocused) {\n\t\t\t\tthis.onFocus();\n\t\t\t}\n\t\t\tif (newState.inDisabled && !oldState.inDisabled) {\n\t\t\t\tsetTimeout((): void => {\n\t\t\t\t\tthis.blur();\n\t\t\t\t}, 0);\n\t\t\t}\n\t\t} else if (oldState.isFocused) {\n\t\t\tthis.onBlur();\n\t\t}\n\n\t\tthis.cursor = this.toCursor(this._cursor, newState);\n\t}\n\n\tprotected onChildFocus(focused: DBase): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.onChildFocus(focused);\n\t\t}\n\t}\n\n\tprotected onFocus(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.onChildFocus(this);\n\t\t}\n\t}\n\n\tprotected onChildBlur(blured: DBase): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.onChildBlur(blured);\n\t\t}\n\t}\n\n\tprotected onBlur(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.onChildBlur(this);\n\t\t}\n\t}\n\n\tget state(): DBaseStateSet {\n\t\treturn this._state;\n\t}\n\n\tget options(): OPTIONS | undefined {\n\t\treturn this._options;\n\t}\n\n\tget theme(): THEME {\n\t\treturn this._theme;\n\t}\n\n\tset theme(theme: THEME) {\n\t\tconst result = this._theme;\n\t\tif (result !== theme) {\n\t\t\tthis._theme = theme;\n\t\t\tthis._padding.setTheme(theme);\n\t\t\tthis._background.setTheme(theme);\n\t\t\tthis._border.setTheme(theme);\n\t\t\tthis._outline.setTheme(theme);\n\t\t\tthis._corner.setTheme(theme);\n\t\t\tthis.toDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\treflow(): void {\n\t\tconst isDirty = this._isDirty;\n\t\tif (isDirty) {\n\t\t\tthis.onReflow();\n\t\t\tthis._isDirty = false;\n\t\t}\n\n\t\tconst hasDirty = this._hasDirty;\n\t\tconst isHierarchyDirty = this._isHierarchyDirty;\n\t\tif (hasDirty || isHierarchyDirty) {\n\t\t\tthis._hasDirty = false;\n\t\t\tthis._isHierarchyDirty = false;\n\n\t\t\tconst children = this.children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child instanceof DBase) {\n\t\t\t\t\tchild.reflow();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isDirty || hasDirty || isHierarchyDirty) {\n\t\t\tthis.onRefit();\n\t\t}\n\t}\n\n\tprotected onRefit(): void {\n\t\tconst auto = this._auto;\n\t\tconst isWidthAuto = auto.width.isOn;\n\t\tconst isHeightAuto = auto.height.isOn;\n\t\tif (isWidthAuto && isHeightAuto) {\n\t\t\tlet width = 0;\n\t\t\tlet height = 0;\n\t\t\tconst children = this.children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child.visible) {\n\t\t\t\t\tconst rw = this.hasRefitableWidth(child);\n\t\t\t\t\tconst rh = this.hasRefitableHeight(child);\n\t\t\t\t\tif (rw || rh) {\n\t\t\t\t\t\tif (child instanceof DBase) {\n\t\t\t\t\t\t\tif (rw) {\n\t\t\t\t\t\t\t\twidth = Math.max(width, child.x + child.width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (rh) {\n\t\t\t\t\t\t\t\theight = Math.max(height, child.y + child.height);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (child instanceof Container) {\n\t\t\t\t\t\t\tconst bound = child.getLocalBounds(undefined, true);\n\t\t\t\t\t\t\tif (rw) {\n\t\t\t\t\t\t\t\twidth = Math.max(width, child.x + bound.x + bound.width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (rh) {\n\t\t\t\t\t\t\t\theight = Math.max(height, child.y + bound.y + bound.height);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst bound = child.getLocalBounds();\n\t\t\t\t\t\t\tif (rw) {\n\t\t\t\t\t\t\t\twidth = Math.max(width, child.x + bound.x + bound.width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (rh) {\n\t\t\t\t\t\t\t\theight = Math.max(height, child.y + bound.y + bound.height);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst padding = this.padding;\n\t\t\tthis.resize(width + padding.getRight(), height + padding.getBottom());\n\t\t} else if (isWidthAuto) {\n\t\t\tlet width = 0;\n\t\t\tconst children = this.children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child.visible && this.hasRefitableWidth(child)) {\n\t\t\t\t\tif (child instanceof DBase) {\n\t\t\t\t\t\twidth = Math.max(width, child.x + child.width);\n\t\t\t\t\t} else if (child instanceof Container) {\n\t\t\t\t\t\tconst bound = child.getLocalBounds(undefined, true);\n\t\t\t\t\t\twidth = Math.max(width, child.x + bound.x + bound.width);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst bound = child.getLocalBounds();\n\t\t\t\t\t\twidth = Math.max(width, child.x + bound.x + bound.width);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.resize(width + this.padding.getRight(), undefined);\n\t\t} else if (isHeightAuto) {\n\t\t\tlet height = 0;\n\t\t\tconst children = this.children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child.visible && this.hasRefitableHeight(child)) {\n\t\t\t\t\tif (child instanceof DBase) {\n\t\t\t\t\t\theight = Math.max(height, child.y + child.height);\n\t\t\t\t\t} else if (child instanceof Container) {\n\t\t\t\t\t\tconst bound = child.getLocalBounds(undefined, true);\n\t\t\t\t\t\theight = Math.max(height, child.y + bound.y + bound.height);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst bound = child.getLocalBounds();\n\t\t\t\t\t\theight = Math.max(height, child.y + bound.y + bound.height);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.resize(undefined, height + this.padding.getBottom());\n\t\t}\n\t}\n\n\tprotected isRefitable(target: any): target is DRefitable {\n\t\treturn target instanceof DBase;\n\t}\n\n\t/**\n\t * Returns true if the given target has a height that doesn't depend on its parent height.\n\t *\n\t * @param target a target\n\t * @returns true if the given target has a height that doesn't depend on its parent height.\n\t */\n\tprotected hasRefitableHeight(target: any): target is DRefitable {\n\t\treturn (\n\t\t\tthis.isRefitable(target) && !(target instanceof DBase && isFunction(target.getHeight()))\n\t\t);\n\t}\n\n\t/**\n\t * Returns true if the given target has a width that doesn't depend on its parent width.\n\t *\n\t * @param target a target\n\t * @returns true if the given target has a width that doesn't depend on its parent width.\n\t */\n\tprotected hasRefitableWidth(target: any): target is DRefitable {\n\t\treturn (\n\t\t\tthis.isRefitable(target) && !(target instanceof DBase && isFunction(target.getWidth()))\n\t\t);\n\t}\n\n\tprotected onReflow(): void {\n\t\tthis._reflowable.onReflow(this, this._width, this._height);\n\t}\n\n\tget shadow(): DShadow | null {\n\t\treturn this._shadow;\n\t}\n\n\tset shadow(shadow: DShadow | null) {\n\t\tconst previous = this._shadow;\n\t\tif (previous !== shadow) {\n\t\t\tconst reflowable = this._reflowable;\n\t\t\tconst snippet = this._snippet;\n\t\t\tconst onShadowUpdateBound = this._onShadowUpdateBound;\n\t\t\tif (previous != null) {\n\t\t\t\tprevious.off(\"update\", onShadowUpdateBound);\n\t\t\t\treflowable.remove(previous);\n\t\t\t\tsnippet.remove(previous, true);\n\t\t\t}\n\n\t\t\tthis._shadow = shadow;\n\t\t\tif (shadow != null) {\n\t\t\t\tshadow.on(\"update\", onShadowUpdateBound);\n\t\t\t\treflowable.add(shadow);\n\t\t\t\tsnippet.addAt(shadow, true, 0);\n\t\t\t}\n\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\tprotected toParentResized(): void {\n\t\tconst parent = this.getParentOfSize();\n\t\tif (parent) {\n\t\t\tthis.onParentResize(parent.width, parent.height, parent.padding);\n\t\t}\n\t}\n\n\tprotected getParentOfSize(): { width: number; height: number; padding: DPadding } | null {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\treturn parent;\n\t\t} else {\n\t\t\treturn DApplications.getLayer(this);\n\t\t}\n\t}\n\n\t/**\n\t * Called when a parent resized.\n\t *\n\t * @param parentWidth a parent's local width\n\t * @param parentHeight a parent's local height\n\t */\n\tonParentResize(parentWidth: number, parentHeight: number, parentPadding: DPadding): void {\n\t\tconst scalarSet = this._scalarSet;\n\t\tconst position = this.transform.position;\n\t\tconst x = position.x;\n\t\tconst y = position.y;\n\t\tconst width = this._width;\n\t\tconst height = this._height;\n\n\t\t// Width & height\n\t\tconst paddingWidth = parentPadding.getLeft() + parentPadding.getRight();\n\t\tconst paddingHeight = parentPadding.getTop() + parentPadding.getBottom();\n\t\tconst newWidth =\n\t\t\tscalarSet.width != null\n\t\t\t\t? scalarSet.width(parentWidth, width, paddingWidth, width)\n\t\t\t\t: width;\n\t\tconst newHeight =\n\t\t\tscalarSet.height != null\n\t\t\t\t? scalarSet.height(parentHeight, height, paddingHeight, height)\n\t\t\t\t: height;\n\t\tthis.resize(newWidth, newHeight);\n\n\t\t// X & Y\n\t\tconst newX =\n\t\t\tscalarSet.x != null\n\t\t\t\t? scalarSet.x(parentWidth, this._width, parentPadding.getLeft(), x)\n\t\t\t\t: x;\n\t\tconst newY =\n\t\t\tscalarSet.y != null\n\t\t\t\t? scalarSet.y(parentHeight, this._height, parentPadding.getTop(), y)\n\t\t\t\t: y;\n\t\tthis.position.set(newX, newY);\n\t}\n\n\t/**\n\t * Called when a parent moved.\n\t *\n\t * @param newX a new parent's local x position\n\t * @param newY a new parent's local y position\n\t * @param oldX an old parent's local x position\n\t * @param oldY an old parent's local y position\n\t */\n\tprotected onParentMove(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\t// DO NOTHING\n\t}\n\n\t// Wheel\n\tprotected onWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tthis.emit(\"wheel\", e, deltas, global, this);\n\t\treturn false;\n\t}\n\n\t// Keydown\n\tprotected onKeyDown(e: KeyboardEvent): boolean {\n\t\tthis.emit(\"keydown\", e, this);\n\t\treturn false;\n\t}\n\n\tprotected onKeyUp(e: KeyboardEvent): boolean {\n\t\tthis.emit(\"keyup\", e, this);\n\t\treturn false;\n\t}\n\n\t// Down\n\tprotected isEventTarget(e: InteractionEvent): boolean {\n\t\tconst target = e.target;\n\t\tif (target === this) {\n\t\t\treturn true;\n\t\t} else if (target != null && !(target instanceof DBase && target.interactive)) {\n\t\t\tlet parent = target.parent;\n\t\t\twhile (parent != null && !(parent instanceof DBase && parent.interactive)) {\n\t\t\t\tparent = parent.parent;\n\t\t\t}\n\t\t\treturn parent === this;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected onDown(e: InteractionEvent): void {\n\t\tif (this.isEventTarget(e)) {\n\t\t\tthis.onDownThis(e);\n\t\t}\n\t\tthis.emit(\"down\", e, this);\n\t}\n\n\tprotected onDownThis(e: InteractionEvent): void {\n\t\tconst oe = e.data.originalEvent;\n\t\tif (\"touches\" in oe) {\n\t\t\tconst lastDownPoint = this._lastDownPoint || new Point();\n\t\t\tthis._lastDownPoint = lastDownPoint;\n\t\t\tlastDownPoint.copyFrom(e.data.global);\n\t\t} else {\n\t\t\tthis.focusOnClosest();\n\t\t}\n\t}\n\n\tprotected onUp(e: InteractionEvent): void {\n\t\tif (this.isEventTarget(e)) {\n\t\t\tthis.onUpThis(e);\n\t\t}\n\t\tthis.emit(\"up\", e, this);\n\t}\n\n\tprotected onUpThis(e: InteractionEvent): void {\n\t\tconst oe = e.data.originalEvent;\n\t\tif (\"touches\" in oe) {\n\t\t\tconst lastDownPoint = this._lastDownPoint;\n\t\t\tif (lastDownPoint) {\n\t\t\t\tconst global = e.data.global;\n\t\t\t\tconst dx = Math.abs(global.x - lastDownPoint.x);\n\t\t\t\tconst dy = Math.abs(global.y - lastDownPoint.y);\n\t\t\t\tconst threshold = UtilPointerEvent.CLICK_DISTANCE_THRESHOLD;\n\t\t\t\tif (dx < threshold && dy < threshold) {\n\t\t\t\t\tthis.focusOnClosest();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected focusOnClosest(): void {\n\t\tconst layer = DApplications.getLayer(this);\n\t\tif (layer) {\n\t\t\tconst focusController = layer.getFocusController();\n\t\t\tfocusController.focus(focusController.findParent(this));\n\t\t}\n\t}\n\n\t// Over\n\tprotected onOver(e: InteractionEvent): void {\n\t\t// Update the hover state\n\t\tthis.state.isHovered = true;\n\n\t\t// Update the title\n\t\tif (e.target === this) {\n\t\t\tthis.applyTitle();\n\t\t}\n\n\t\t// Event\n\t\tthis.emit(\"over\", e, this);\n\t}\n\n\t// Out\n\tprotected onOut(e: InteractionEvent): void {\n\t\t// Update the hover state\n\t\tthis.state.isHovered = false;\n\n\t\t// Event\n\t\tthis.emit(\"out\", e, this);\n\t}\n\n\t// Double click\n\tprotected onDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\tthis.emit(\"dblclick\", e, interactionManager, this);\n\t\treturn false;\n\t}\n\n\t//\n\trender(renderer: Renderer): void {\n\t\tif (this.visible && 0 < this.worldAlpha && this.renderable) {\n\t\t\tconst snippet = this._snippet;\n\t\t\tsnippet.render(renderer, true);\n\t\t\tsuper.render(renderer);\n\t\t\tsnippet.render(renderer, false);\n\t\t}\n\t}\n\n\t//\n\tprotected getThemeDefault(): THEME {\n\t\treturn DThemes.getInstance().get(this.getType());\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DBase\";\n\t}\n\n\t//\n\tprotected _calculateBounds(): void {\n\t\tthis._bounds.addFrame(this.transform, 0, 0, this._width, this._height);\n\t\tsuper._calculateBounds();\n\t}\n\n\tcontainsPoint(point: Point): boolean {\n\t\treturn (\n\t\t\tthis.containsGlobalPoint(point) ||\n\t\t\tthis.containsLocalPoint(\n\t\t\t\tthis.worldTransform.applyInverse(point, DBase.WORK_CONTAINS_POINT)\n\t\t\t)\n\t\t);\n\t}\n\n\tprotected containsGlobalPoint(point: Point): boolean {\n\t\treturn false;\n\t}\n\n\tprotected containsLocalPoint(point: Point): boolean {\n\t\tconst x = point.x;\n\t\tconst y = point.y;\n\t\tconst w = this._width;\n\t\tconst h = this._height;\n\t\treturn 0 <= x && x <= w && 0 <= y && y <= h;\n\t}\n\n\t/**\n\t * Returns a clipping rect.\n\t *\n\t * @param result a clipping rect\n\t */\n\tgetClippingRect(target: unknown, result: Rectangle): void {\n\t\tresult.x = 0;\n\t\tresult.y = 0;\n\t\tresult.width = this._width;\n\t\tresult.height = this._height;\n\t}\n\n\tdestroy(): void {\n\t\t// Layout\n\t\tconst scalarSet = this._scalarSet;\n\t\tscalarSet.x = null;\n\t\tscalarSet.y = null;\n\t\tscalarSet.width = null;\n\t\tscalarSet.height = null;\n\n\t\t// Shadow\n\t\tconst shadow = this._shadow;\n\t\tif (shadow) {\n\t\t\tthis._shadow = null;\n\t\t\tshadow.destroy();\n\t\t}\n\n\t\t// Children\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tchildren[i].destroy();\n\t\t}\n\t\tchildren.length = 0;\n\n\t\t//\n\t\tsuper.destroy();\n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: Apache-2.0\n */\n\nimport {\n\tContainer,\n\tDisplayObject,\n\tInteractionEvent,\n\tInteractionManager,\n\tPoint,\n\tRectangle,\n\tRenderer,\n\tTexture,\n\tTransform\n} from \"pixi.js\";\nimport { DApplications } from \"./d-applications\";\nimport { DBackgroundStateAware } from \"./d-background\";\nimport { DBaseBackground } from \"./d-base-background\";\nimport { DBaseBorder } from \"./d-base-border\";\nimport { DBaseCorner } from \"./d-base-corner\";\nimport { DBaseInteractive } from \"./d-base-interactive\";\nimport { DBaseOutline } from \"./d-base-outline\";\nimport { DBasePadding } from \"./d-base-padding\";\nimport { DBasePoint } from \"./d-base-point\";\nimport { DBaseReflowableImpl } from \"./d-base-reflowable-impl\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\nimport { DBaseStateSetImplObservable } from \"./d-base-state-set-impl-observable\";\nimport { DBorderStateAware } from \"./d-border\";\nimport { DBorderMask } from \"./d-border-mask\";\nimport { DCoordinatePosition, DCoordinateSize } from \"./d-coordinate\";\nimport { DCorner } from \"./d-corner\";\nimport { DCornerMask } from \"./d-corner-mask\";\nimport { DThemeFont } from \"./d-font\";\nimport { DLayoutClearType } from \"./d-layout-clear-type\";\nimport { DOutline } from \"./d-outline\";\nimport { DPadding } from \"./d-padding\";\nimport { DScalarFunctions } from \"./d-scalar-functions\";\nimport { DScalarSet } from \"./d-scalar-set\";\nimport { DShadow } from \"./d-shadow\";\nimport { DStateAwareOrValueMightBe } from \"./d-state-aware\";\nimport { DThemes } from \"./theme/d-themes\";\nimport { isFunction } from \"./util/is-function\";\nimport { isNumber } from \"./util/is-number\";\nimport { isString } from \"./util/is-string\";\nimport { UtilKeyboardEvent, UtilKeyboardEventShortcut } from \"./util/util-keyboard-event\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DBaseAutoSet } from \"./d-base-auto-set\";\nimport { toEnum } from \"./util/to-enum\";\nimport { DOnOptions } from \"./d-on-options\";\nimport { DBaseSnippetContainer } from \"./d-base-snippet-container\";\nimport { DBaseReflowableContainer } from \"./d-base-reflowable-container\";\nimport { isArray } from \"./util/is-array\";\n\n/**\n * {@link DBase} padding options.\n */\nexport interface DBasePaddingOptions {\n\t/** A top padding */\n\ttop?: number;\n\n\t/** A right padding */\n\tright?: number;\n\n\t/** A bottom padding */\n\tbottom?: number;\n\n\t/** A left padding */\n\tleft?: number;\n}\n\n/**\n * {@link DBase} corner options.\n */\nexport interface DBaseCornerOptions {\n\t/** A radius */\n\tradius?: number;\n\n\t/** Masked corners get unrounded. */\n\tmask?: keyof typeof DCornerMask | DCornerMask;\n}\n\n/**\n * {@link DBase} events.\n */\nexport interface DBaseEvents<EMITTER> {\n\t/**\n\t * Triggered when an initialization is finished.\n\t *\n\t * @param emitter an emitter\n\t */\n\tinit(emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when added to a container.\n\t *\n\t * @param container a container added to\n\t */\n\tadded(container: Container): void;\n\n\t/**\n\t * Triggered when removed from a container.\n\t *\n\t * @param container a container removed from\n\t */\n\tremoved(container: Container): void;\n\n\t/**\n\t * Triggered when moved.\n\t *\n\t * @param newX a new x\n\t * @param newY a new y\n\t * @param oldX an old x\n\t * @param oldY an old y\n\t * @param emitter an emitter\n\t */\n\tmove(newX: number, newY: number, oldX: number, oldY: number, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when resized.\n\t *\n\t * @param newWidth a new width\n\t * @param newHeight a new height\n\t * @param oldWidth an old width\n\t * @param oldHeight an old height\n\t * @param emitter an emitter\n\t */\n\tresize(\n\t\tnewWidth: number,\n\t\tnewHeight: number,\n\t\toldWidth: number,\n\t\toldHeight: number,\n\t\temitter: EMITTER\n\t): void;\n\n\t/**\n\t * Triggered when scaled.\n\t *\n\t * @param newX a new x\n\t * @param newY a new y\n\t * @param oldX an old x\n\t * @param oldY an old y\n\t * @param emitter an emitter\n\t */\n\tscale(newX: number, newY: number, oldX: number, oldY: number, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when skewed.\n\t *\n\t * @param newX a new x\n\t * @param newY a new y\n\t * @param oldX an old x\n\t * @param oldY an old y\n\t * @param emitter an emitter\n\t */\n\tskew(newX: number, newY: number, oldX: number, oldY: number, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a state is changed.\n\t *\n\t * @param newState a new state\n\t * @param oldState an old state\n\t * @param emitter an emitter\n\t */\n\tstatechange(newState: DBaseStateSet, oldState: DBaseStateSet, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a wheel moves.\n\t *\n\t * @param e a wheel event\n\t * @param deltas wheel move amounts\n\t * @param global a point wheel moved\n\t * @param emitter an emitter\n\t */\n\twheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a key gets down.\n\t *\n\t * @param e a keyboard event\n\t * @param emitter an emitter\n\t */\n\tkeydown(e: KeyboardEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a key gets up.\n\t *\n\t * @param e a keyboard event\n\t * @param emitter an emitter\n\t */\n\tkeyup(e: KeyboardEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a pointer gets on an emitter.\n\t *\n\t * @param e an interaction event.\n\t * @param emitter an emitter\n\t */\n\tover(e: InteractionEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a pointer gets out of an emitter.\n\t *\n\t * @param e an interaction event\n\t * @param emitter an emitter\n\t */\n\tout(e: InteractionEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a pointer gets down on an emitter.\n\t *\n\t * @param e an interaction event.\n\t * @param emitter an emitter\n\t */\n\tdown(e: InteractionEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a pointer gets up on an emitter.\n\t *\n\t * @param e an interaction event\n\t * @param emitter an emitter\n\t */\n\tup(e: InteractionEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when an emitter is clicked.\n\t *\n\t * @param e an interaction event\n\t * @param emitter an emitter\n\t */\n\tclick(e: InteractionEvent, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when an emitter is double clicked.\n\t *\n\t * @param e an event\n\t * @param interactionManager an interaction manager\n\t * @param emitter an emitter\n\t */\n\tdblclick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager,\n\t\temitter: EMITTER\n\t): void;\n\n\t/**\n\t * Triggered when a shortcut is pressed.\n\t *\n\t * @param e an event\n\t * @param emitter an emitter\n\t */\n\tshortcut(e: KeyboardEvent, emitter: EMITTER): void;\n}\n\n/**\n * {@link DBase} \"on\" options.\n */\nexport interface DBaseOnOptions<EMITTER> extends Partial<DBaseEvents<EMITTER>>, DOnOptions {}\n\n/**\n * {@link DBase} background options.\n */\nexport interface DBaseBackgroundOptions {\n\t/**\n\t * A color code or a function returning a color code.\n\t * If a computed value is undefined, falls back to the theme color.\n\t * If a computed value is null, a background is not rendered.\n\t */\n\tcolor?: DStateAwareOrValueMightBe<number | null>;\n\n\t/**\n\t * An alpha or a function returning an alpha.\n\t * If a computed value is undefined, falls back to an background alpha of a theme.\n\t */\n\talpha?: DStateAwareOrValueMightBe<number>;\n}\n\n/**\n * {@link DBase} border options.\n */\nexport interface DBaseBorderOptions {\n\t/**\n\t * A color code or a function returning a color code.\n\t * If a computed value is undefined, falls back to the theme color.\n\t * If a computed value is null, a background is not rendered.\n\t */\n\tcolor?: DStateAwareOrValueMightBe<number | null>;\n\n\t/**\n\t * An alpha or a function returning an alpha.\n\t * If a computed value is undefined, falls back to a border alpha of a theme.\n\t */\n\talpha?: DStateAwareOrValueMightBe<number>;\n\n\t/**\n\t * A width or a function returning a width.\n\t * If a computed value is undefined, falls back to a border width of a theme.\n\t */\n\twidth?: DStateAwareOrValueMightBe<number>;\n\n\t/**\n\t * An align or a function returning an align.\n\t * If a computed value is undefined, falls back to a border align of a theme.\n\t * If an align is 0, a border is rendered completely inside of a {@link DBase}.\n\t * If an align is 1, a border is rendered completely outside of a {@link DBase}.\n\t */\n\talign?: DStateAwareOrValueMightBe<number>;\n\n\t/** Masked borders get removed. */\n\tmask?: DStateAwareOrValueMightBe<DBorderMask> | keyof typeof DBorderMask;\n}\n\n/**\n * {@link DBase} outline optons.\n */\nexport interface DBaseOutlineOptions {\n\t/**\n\t * A color code or a function returning a color code.\n\t * If a computed value is undefined, falls back to the theme color.\n\t * If a computed value is null, a background is not rendered.\n\t */\n\tcolor?: DStateAwareOrValueMightBe<number | null>;\n\n\t/**\n\t * An alpha or a function returning an alpha.\n\t * If a computed value is undefined, falls back to an outline alpha of a theme.\n\t */\n\talpha?: DStateAwareOrValueMightBe<number>;\n\n\t/**\n\t * A width or a function returning a width.\n\t * If a computed value is undefined, falls back to an outline width of a theme.\n\t */\n\twidth?: DStateAwareOrValueMightBe<number>;\n\n\t/**\n\t * An offset or a function returning an offset.\n\t * If a computed value is undefined, falls back to an outline align of a theme.\n\t * A outline moves to outside when an offset gets larger.\n\t */\n\toffset?: DStateAwareOrValueMightBe<number>;\n\n\t/**\n\t * An align or a function returning an align.\n\t * If a computed value is undefined, falls back to an outline align of a theme.\n\t * If an align is 0, an outline is rendered completely inside.\n\t * If an align is 1, an outline is rendered completely outside.\n\t */\n\talign?: DStateAwareOrValueMightBe<number>;\n\n\t/** Masked outlines get removed. */\n\tmask?: DStateAwareOrValueMightBe<DBorderMask> | keyof typeof DBorderMask;\n}\n\nexport type DBaseShadow = \"NONE\" | \"WEAK\" | \"DEFAULT\" | DShadow;\n\n/**\n * {@link DBase} state blinker options.\n */\nexport interface DBaseStateBlinkerOptions {\n\tstate: string;\n\tinterval: number;\n}\n\n/**\n * {@link DBase} state ticker options.\n */\nexport interface DBaseStateTickerOptions {\n\tstate: string;\n\tinterval: number;\n}\n\n/**\n * {@link DBase} state options.\n */\nexport interface DBaseStateOptions {\n\tvalues?: string | string[];\n\tblinkers?: DBaseStateBlinkerOptions[];\n\ttickers?: DBaseStateTickerOptions[];\n}\n\n/**\n * {@link DBase} options.\n */\nexport interface DBaseOptions<THEME extends DThemeBase = DThemeBase, EMITTER = any> {\n\t/**\n\t * A parent.\n\t *\n\t * In the case of UI classes which pop up (e.g., {@link DDialog} and {@link DMenu}),\n\t * if multiple application instances are there, better to set\n\t * this to an `application.stage` so that they pick a right application.\n\t * By default, they assume the last created application is\n\t * the one they belong to at the time when they are created.\n\t */\n\tparent?: Container;\n\n\t/** Children. */\n\tchildren?: Array<DisplayObject | null>;\n\n\t/** A name. */\n\tname?: string;\n\n\t/**\n\t * One of the followings:\n\t * * A X position\n\t * * A position keyword\n\t * * A position expression (Parsed by {@link DScalarExpression})\n\t * * A function returning a X position ({@link DScalarFunction})\n\t * * An object returning a X position ({@link DScalar})\n\t */\n\tx?: DCoordinatePosition;\n\n\t/**\n\t * One of the followings:\n\t * * A Y position\n\t * * A position keyword\n\t * * A position expresion (Parsed by {@link DScalarExpression})\n\t * * A function returning a Y position ({@link DScalarFunction})\n\t * * An object returning a Y position ({@link DScalar})\n\t */\n\ty?: DCoordinatePosition;\n\n\t/**\n\t * One of the followings:\n\t * * A width\n\t * * A size keyword\n\t * * A size expression (Parsed by {@link DScalarExpression})\n\t * * A function returning a width ({@link DScalarFunction})\n\t * * An object returning a width ({@link DScalar})\n\t */\n\twidth?: DCoordinateSize;\n\n\t/**\n\t * One of the followings:\n\t * * A height\n\t * * A size keyword\n\t * * A size expression (Parsed by {@link DScalarExpression})\n\t * * A function returning a hight ({@link DScalarFunction})\n\t * * An object returning a hight ({@link DScalar})\n\t */\n\theight?: DCoordinateSize;\n\n\t/**\n\t * A visibility.\n\t * Set to true to make {@link DBase} visible.\n\t * Set to false to make {@link DBase} invisible.\n\t * The default value is true.\n\t */\n\tvisible?: boolean;\n\n\t/**\n\t * A renderability.\n\t * Unlike {@link visible}, non-renderable element occupies a space.\n\t * Set to true to make {@link DBase} renderable.\n\t * Set to false to make {@link DBase} not renderable.\n\t * The default value is true.\n\t */\n\trenderable?: boolean;\n\n\t/** A default state. */\n\tstate?: string | string[] | DBaseStateOptions;\n\n\t/** An interactivity option. */\n\tinteractive?: keyof typeof DBaseInteractive | DBaseInteractive;\n\n\t/** A padding options. */\n\tpadding?: number | DBasePaddingOptions;\n\n\t/** A corner options. */\n\tcorner?: number | DBaseCornerOptions;\n\n\t/** A theme or a theme name. */\n\ttheme?: THEME | string;\n\n\t/**\n\t * Mappings of event names and event handlers.\n\t */\n\ton?: DBaseOnOptions<EMITTER>;\n\n\t/**\n\t * A weight used by {@link DLayoutVertical} and {@link DLayoutHorizontal}.\n\t */\n\tweight?: number;\n\n\t/** A tooltip text. */\n\ttitle?: string;\n\n\t/** A shortcut option. */\n\tshortcut?: string | UtilKeyboardEventShortcut;\n\n\t/** A shortcut options. */\n\tshortcuts?: Array<string | UtilKeyboardEventShortcut>;\n\n\t/** A background options. */\n\tbackground?: DBaseBackgroundOptions;\n\n\t/** A border options. */\n\tborder?: DBaseBorderOptions;\n\n\t/** An outline options. */\n\toutline?: DBaseOutlineOptions;\n\n\t/** A shadow. */\n\tshadow?: DBaseShadow | null;\n\n\t/** A clear type used by {@link DLayoutVertical} and {@link DLayoutHorizontal}. */\n\tclear?: keyof typeof DLayoutClearType | DLayoutClearType;\n\n\t/** A cursor shape. */\n\tcursor?: DStateAwareOrValueMightBe<string>;\n}\n\n/**\n * {@link DBase} theme.\n */\nexport interface DThemeBase extends DThemeFont {\n\t/**\n\t * Returns a X coordinate.\n\t */\n\tgetX(): DCoordinatePosition;\n\n\t/**\n\t * Returns a Y coordinate.\n\t */\n\tgetY(): DCoordinatePosition;\n\n\t/**\n\t * Returns a height.\n\t */\n\tgetHeight(): DCoordinateSize;\n\n\t/**\n\t * Returns a width.\n\t */\n\tgetWidth(): DCoordinateSize;\n\n\t/**\n\t * Returns a background color.\n\t * If the color is null, backgrounds are not be rendered.\n\t *\n\t * @param state a state\n\t */\n\tgetBackgroundColor(state: DBaseStateSet): number | null;\n\n\t/**\n\t * Returns a background alpha.\n\t *\n\t * @param state a state\n\t */\n\tgetBackgroundAlpha(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns a background texture.\n\t */\n\tgetBackgroundTexture(): Texture;\n\n\t/**\n\t * Returns a border color.\n\t * If the color is null, borders are not be rendered.\n\t *\n\t * @param state a state\n\t */\n\tgetBorderColor(state: DBaseStateSet): number | null;\n\n\t/**\n\t * Returns a border alpha.\n\t *\n\t * @param state a state\n\t */\n\tgetBorderAlpha(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns a border width.\n\t *\n\t * @param state a state\n\t */\n\tgetBorderWidth(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns a border align.\n\t *\n\t * @param state a state\n\t */\n\tgetBorderAlign(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns a border mask.\n\t *\n\t * @param state a mask\n\t */\n\tgetBorderMask(state: DBaseStateSet): DBorderMask;\n\n\t/**\n\t * Returns a border texture.\n\t */\n\tgetBorderTexture(): Texture;\n\n\t/**\n\t * Returns a left padding.\n\t */\n\tgetPaddingLeft(): number;\n\n\t/**\n\t * Returns a right padding.\n\t */\n\tgetPaddingRight(): number;\n\n\t/**\n\t * Returns a top padding.\n\t */\n\tgetPaddingTop(): number;\n\n\t/**\n\t * Returns a bottom padding.\n\t */\n\tgetPaddingBottom(): number;\n\n\t/**\n\t * Returns a corner radius.\n\t */\n\tgetCornerRadius(): number;\n\n\t/**\n\t * Returns a corner mask.\n\t */\n\tgetCornerMask(): DCornerMask;\n\n\t/**\n\t * Returns an outline color.\n\t * If the color is null, outlines are not be rendered.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineColor(state: DBaseStateSet): number | null;\n\n\t/**\n\t * Returns an outline alpha.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineAlpha(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns an outline width.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineWidth(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns an outline offset.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineOffset(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns an outline align.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineAlign(state: DBaseStateSet): number;\n\n\t/**\n\t * Returns an outline mask.\n\t *\n\t * @param state a state\n\t */\n\tgetOutlineMask(state: DBaseStateSet): DBorderMask;\n\n\t/**\n\t * Returns a shadow.\n\t * If a shadow is null, no shadow is rendered.\n\t */\n\tgetShadow(): DShadow | null;\n\n\t/**\n\t * Returns an interactivity.\n\t */\n\tgetInteractive(): DBaseInteractive;\n\n\t/**\n\t * Returns true if focusable.\n\t */\n\tnewState(state: DBaseStateSet): void;\n\n\t/**\n\t * Returns a tooltip text.\n\t */\n\tgetTitle(): string;\n\n\t/**\n\t * Returns a clear type.\n\t * A clear type is for layout classes including {@link DLayoutVertical}.\n\t */\n\tgetClearType(): DLayoutClearType;\n\n\t/**\n\t * Returns a weight.\n\t * Weights are for layout classes including {@link DLayoutVertical}.\n\t * If a weight is less than or equals to zero, layout classes are supposed not to change a width / height.\n\t */\n\tgetWeight(): number;\n\n\t/**\n\t * Creates a new shadow.\n\t */\n\tnewShadow(): DShadow | null;\n\n\t/**\n\t * Creates a new weak shadow.\n\t */\n\tnewShadowWeak(): DShadow | null;\n\n\t/**\n\t * Returns a cursor.\n\t */\n\tgetCursor(state: DBaseStateSet): string;\n}\n\nconst toTheme = <THEME extends DThemeBase>(options?: DBaseOptions<THEME>): THEME | undefined => {\n\tconst theme = options?.theme;\n\tif (theme) {\n\t\tif (isString(theme)) {\n\t\t\treturn DThemes.getInstance().get(theme);\n\t\t}\n\t\treturn theme;\n\t}\n};\n\nexport interface DRefitable {\n\treadonly width: number;\n\treadonly height: number;\n}\n\nconst toShortcuts = <THEME extends DThemeBase>(\n\toptions?: DBaseOptions<THEME>\n): UtilKeyboardEventShortcut[] | undefined => {\n\tif (options) {\n\t\tconst shortcut = options.shortcut;\n\t\tconst shortcuts = options.shortcuts;\n\t\tif (shortcuts != null || shortcut != null) {\n\t\t\tconst result: UtilKeyboardEventShortcut[] = [];\n\t\t\tif (shortcut != null) {\n\t\t\t\tresult.push(UtilKeyboardEvent.toShortcut(shortcut));\n\t\t\t}\n\t\t\tif (shortcuts != null) {\n\t\t\t\tfor (let i = 0, imax = shortcuts.length; i < imax; ++i) {\n\t\t\t\t\tresult.push(UtilKeyboardEvent.toShortcut(shortcuts[i]));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\treturn undefined;\n};\n\n/**\n * A base class for UI classes.\n * See {@link DBaseEvents} for event details.\n */\nexport class DBase<\n\tTHEME extends DThemeBase = DThemeBase,\n\tOPTIONS extends DBaseOptions<THEME> = DBaseOptions<THEME>\n> extends Container {\n\tprotected static WORK_CONTAINS_POINT: Point = new Point();\n\n\tprivate _state: DBaseStateSet;\n\tprivate _theme: THEME;\n\tprotected _options: OPTIONS | undefined;\n\tprivate _width: number;\n\tprivate _height: number;\n\tprotected _padding: DPadding;\n\tprotected _corner: DCorner;\n\tprivate _scalarSet: DScalarSet;\n\tprotected _auto: DBaseAutoSet;\n\tprivate _isDirty: boolean;\n\tprivate _hasDirty: boolean;\n\tprivate _isHierarchyDirty: boolean;\n\tprivate _shadow: DShadow | null;\n\tprivate _onShadowUpdateBound: () => void;\n\tprivate _weight: number;\n\tprivate _position: DBasePoint;\n\tprivate _scale: DBasePoint;\n\tprivate _skew: DBasePoint;\n\tprotected _title: string;\n\tprotected _background: DBackgroundStateAware;\n\tprotected _border: DBorderStateAware;\n\tprotected _outline: DOutline;\n\tprotected _clearType: DLayoutClearType;\n\tprotected _shortcuts?: UtilKeyboardEventShortcut[];\n\tprotected _snippet: DBaseSnippetContainer;\n\tprotected _reflowable: DBaseReflowableContainer;\n\tprotected _lastDownPoint?: Point;\n\tprotected _cursor?: DStateAwareOrValueMightBe<string>;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper();\n\n\t\t// Transform\n\t\tconst transform: Transform = this.transform;\n\t\tthis._position = new DBasePoint(transform.position, (newX, newY, oldX, oldY): void => {\n\t\t\tthis.onMove(newX, newY, oldX, oldY);\n\t\t});\n\t\tthis._scale = new DBasePoint(transform.scale, (newX, newY, oldX, oldY): void => {\n\t\t\tthis.onScale(newX, newY, oldX, oldY);\n\t\t});\n\t\tthis._skew = new DBasePoint(transform.skew, (newX, newY, oldX, oldY): void => {\n\t\t\tthis.onSkew(newX, newY, oldX, oldY);\n\t\t});\n\n\t\t//\n\t\tthis._options = options;\n\t\tconst scalarSet: DScalarSet = (this._scalarSet = {});\n\t\tthis._auto = new DBaseAutoSet();\n\t\tthis._isDirty = true;\n\t\tthis._hasDirty = false;\n\t\tthis._isHierarchyDirty = false;\n\t\tthis._shadow = null;\n\t\tthis.name = options?.name ?? \"\";\n\t\tconst theme = toTheme(options) || this.getThemeDefault();\n\t\tthis._theme = theme;\n\t\tthis._snippet = new DBaseSnippetContainer(this);\n\t\tthis._reflowable = new DBaseReflowableContainer();\n\t\tthis._clearType = toEnum(options?.clear ?? theme.getClearType(), DLayoutClearType);\n\t\tthis._padding = this.newPadding(theme, options, (): void => {\n\t\t\tthis.toDirty();\n\t\t\tthis.toParentResized();\n\t\t\tthis.toHierarchyDirty();\n\t\t\tDApplications.update(this);\n\t\t});\n\t\tconst toDirtyAndUpdate = (): void => {\n\t\t\tthis.toDirty();\n\t\t\tDApplications.update(this);\n\t\t};\n\t\tthis._background = new DBaseBackground(theme, options, toDirtyAndUpdate);\n\t\tthis._border = new DBaseBorder(theme, options, toDirtyAndUpdate);\n\t\tthis._outline = new DBaseOutline(theme, options, toDirtyAndUpdate);\n\t\tthis._corner = new DBaseCorner(theme, options, toDirtyAndUpdate);\n\n\t\t// X\n\t\tconst position = transform.position;\n\t\tconst x = options?.x ?? theme.getX();\n\t\tif (isNumber(x)) {\n\t\t\tposition.x = x;\n\t\t} else {\n\t\t\tposition.x = 0;\n\t\t\tscalarSet.x = DScalarFunctions.position(x);\n\t\t}\n\n\t\t// Y\n\t\tconst y = options?.y ?? theme.getY();\n\t\tif (isNumber(y)) {\n\t\t\tposition.y = y;\n\t\t} else {\n\t\t\tposition.y = 0;\n\t\t\tscalarSet.y = DScalarFunctions.position(y);\n\t\t}\n\n\t\t// Width\n\t\tconst width = options?.width ?? theme.getWidth();\n\t\tif (!this._auto.width.from(width)) {\n\t\t\tif (isNumber(width)) {\n\t\t\t\tthis._width = width;\n\t\t\t} else {\n\t\t\t\tthis._width = 100;\n\t\t\t\tscalarSet.width = DScalarFunctions.size(width);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._width = 100;\n\t\t}\n\n\t\t// Height\n\t\tconst height = options?.height ?? theme.getHeight();\n\t\tif (!this._auto.height.from(height)) {\n\t\t\tif (isNumber(height)) {\n\t\t\t\tthis._height = height;\n\t\t\t} else {\n\t\t\t\tthis._height = 100;\n\t\t\t\tscalarSet.height = DScalarFunctions.size(height);\n\t\t\t}\n\t\t} else {\n\t\t\tthis._height = 100;\n\t\t}\n\n\t\t// Visibility\n\t\tif (options != null) {\n\t\t\tconst visible = options.visible;\n\t\t\tif (visible != null) {\n\t\t\t\tthis.visible = visible;\n\t\t\t}\n\t\t}\n\n\t\t// Renderability\n\t\tif (options != null) {\n\t\t\tconst renderable = options.renderable;\n\t\t\tif (renderable != null) {\n\t\t\t\tthis.renderable = renderable;\n\t\t\t}\n\t\t}\n\n\t\t// State\n\t\tthis._state = new DBaseStateSetImplObservable((newState, oldState): void => {\n\t\t\tthis.onStateChange(newState, oldState);\n\t\t});\n\n\t\t// Interactive\n\t\tconst interactive = toEnum(\n\t\t\toptions?.interactive ?? theme.getInteractive(),\n\t\t\tDBaseInteractive\n\t\t);\n\t\tthis.interactive = !!(interactive & DBaseInteractive.SELF);\n\t\tthis.interactiveChildren = !!(interactive & DBaseInteractive.CHILDREN);\n\n\t\t// Events\n\t\tif (options != null) {\n\t\t\tconst on = options.on;\n\t\t\tif (on != null) {\n\t\t\t\tfor (const name in on) {\n\t\t\t\t\tconst handler = on[name];\n\t\t\t\t\tif (handler) {\n\t\t\t\t\t\tthis.on(name, handler);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Title\n\t\tthis._title = options?.title ?? theme.getTitle();\n\n\t\t// Weight\n\t\tthis._weight = options?.weight ?? theme.getWeight();\n\n\t\t// Reflowable\n\t\tthis.initReflowable();\n\n\t\t// Shadow\n\t\tthis._onShadowUpdateBound = (): void => {\n\t\t\tDApplications.update(this);\n\t\t};\n\t\tlet shadow: DBaseShadow | null | undefined;\n\t\tif (options != null) {\n\t\t\tshadow = options.shadow;\n\t\t}\n\t\tif (shadow === undefined) {\n\t\t\tshadow = theme.getShadow();\n\t\t}\n\t\tif (shadow) {\n\t\t\tif (isString(shadow)) {\n\t\t\t\tswitch (shadow) {\n\t\t\t\t\tcase \"WEAK\":\n\t\t\t\t\t\tthis.shadow = theme.newShadowWeak();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"DEFAULT\":\n\t\t\t\t\t\tthis.shadow = theme.newShadow();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.shadow = shadow;\n\t\t\t}\n\t\t}\n\n\t\t// Event handlers\n\t\tthis.on(UtilPointerEvent.over, (e: InteractionEvent): void => {\n\t\t\tthis.onOver(e);\n\t\t});\n\n\t\tthis.on(UtilPointerEvent.out, (e: InteractionEvent): void => {\n\t\t\tthis.onOut(e);\n\t\t});\n\n\t\tthis.on(UtilPointerEvent.down, (e: InteractionEvent): void => {\n\t\t\tthis.onDown(e);\n\t\t});\n\n\t\tthis.on(UtilPointerEvent.up, (e: InteractionEvent): void => {\n\t\t\tthis.onUp(e);\n\t\t});\n\n\t\t// Children change detection\n\t\tthis.on(\"added\", (): void => {\n\t\t\tthis.toParentResized();\n\t\t\tif (this.isDirty() || this.hasDirty()) {\n\t\t\t\tthis.toParentHasDirty();\n\t\t\t}\n\t\t\tif (this._isHierarchyDirty) {\n\t\t\t\tthis.toParentHierarchyDirty();\n\t\t\t}\n\t\t\tconst newParent = this.parent;\n\t\t\tif (newParent instanceof DBase) {\n\t\t\t\tthis.state.parent = newParent.state;\n\t\t\t}\n\t\t\tDApplications.update(this);\n\t\t});\n\n\t\tthis.on(\"removed\", (): void => {\n\t\t\tthis.blur(true);\n\t\t\tthis.state.parent = null;\n\t\t\tDApplications.update(this);\n\t\t});\n\n\t\t// Shortcut\n\t\tconst shortcuts = toShortcuts(options);\n\t\tthis._shortcuts = shortcuts;\n\t\tif (shortcuts != null) {\n\t\t\tconst onShortcutBound = (e: KeyboardEvent): void => {\n\t\t\t\tthis.onShortcut(e);\n\t\t\t};\n\t\t\tfor (let i = 0, imax = shortcuts.length; i < imax; ++i) {\n\t\t\t\tUtilKeyboardEvent.on(this, shortcuts[i], onShortcutBound);\n\t\t\t}\n\t\t}\n\n\t\t// Other initialization\n\t\tthis.init(options);\n\n\t\t// State Override\n\t\ttheme.newState(this._state);\n\t\tif (options != null) {\n\t\t\tconst state = options.state;\n\t\t\tif (state != null) {\n\t\t\t\tconst s = this._state;\n\t\t\t\tif (isString(state)) {\n\t\t\t\t\ts.add(state);\n\t\t\t\t} else if (isArray(state)) {\n\t\t\t\t\ts.addAll(state);\n\t\t\t\t} else {\n\t\t\t\t\t// Values\n\t\t\t\t\tconst values = state.values;\n\t\t\t\t\tif (values != null) {\n\t\t\t\t\t\tif (isString(values)) {\n\t\t\t\t\t\t\ts.add(values);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts.addAll(values);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Blinker\n\t\t\t\t\tconst blinkers = state.blinkers;\n\t\t\t\t\tif (blinkers != null) {\n\t\t\t\t\t\tconst b = s.blinker;\n\t\t\t\t\t\tfor (let i = 0, imax = blinkers.length; i < imax; ++i) {\n\t\t\t\t\t\t\tconst blinker = blinkers[i];\n\t\t\t\t\t\t\tb.add(blinker.state, blinker.interval);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Ticker\n\t\t\t\t\tconst tickers = state.tickers;\n\t\t\t\t\tif (tickers != null) {\n\t\t\t\t\t\tconst t = s.ticker;\n\t\t\t\t\t\tfor (let i = 0, imax = tickers.length; i < imax; ++i) {\n\t\t\t\t\t\t\tconst ticker = tickers[i];\n\t\t\t\t\t\t\tt.add(ticker.state, ticker.interval);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Parent\n\t\tif (options != null) {\n\t\t\tconst parent = options.parent;\n\t\t\tif (parent != null) {\n\t\t\t\tparent.addChild(this);\n\t\t\t}\n\t\t}\n\n\t\t// Children\n\t\tif (options != null) {\n\t\t\tconst children = options.children;\n\t\t\tif (children != null) {\n\t\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\t\tconst child = children[i];\n\t\t\t\t\tif (child != null) {\n\t\t\t\t\t\tthis.addChild(child);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Cursor\n\t\tlet cursor: DStateAwareOrValueMightBe<string> | undefined;\n\t\tif (options != null) {\n\t\t\tcursor = options.cursor;\n\t\t\tthis._cursor = cursor;\n\t\t}\n\t\tthis.cursor = this.toCursor(cursor, this._state);\n\n\t\t// Done\n\t\tthis.emit(\"init\", this);\n\t}\n\n\tprotected newPadding(theme: THEME, options?: OPTIONS, callback?: () => void): DBasePadding {\n\t\treturn new DBasePadding(theme, options, callback);\n\t}\n\n\tprotected toCursor(\n\t\tcursor: DStateAwareOrValueMightBe<string> | undefined,\n\t\tstate: DBaseStateSet\n\t): string {\n\t\tif (cursor) {\n\t\t\tif (isFunction(cursor)) {\n\t\t\t\tconst result = cursor(state);\n\t\t\t\tif (result !== undefined) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t} else if (cursor !== undefined) {\n\t\t\t\treturn cursor;\n\t\t\t}\n\t\t}\n\t\treturn this.theme.getCursor(state);\n\t}\n\n\tget snippet(): DBaseSnippetContainer {\n\t\treturn this._snippet;\n\t}\n\n\tget reflowable(): DBaseReflowableContainer {\n\t\treturn this._reflowable;\n\t}\n\n\tprotected initReflowable(): void {\n\t\tnew DBaseReflowableImpl(this);\n\t}\n\n\tprotected onChildrenChange(): void {\n\t\tthis.toHierarchyDirty();\n\t\tsuper.onChildrenChange();\n\t}\n\n\tprotected onShortcut(e: KeyboardEvent): void {\n\t\tthis.emit(\"shortcut\", e, this);\n\t}\n\n\tprotected init(options?: OPTIONS): void {\n\t\t// OTHER INITIALIZATIONS BEFORE `parent.addChild( this )`\n\t}\n\n\tget weight(): number {\n\t\treturn this._weight;\n\t}\n\n\tprotected onMove(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof DBase) {\n\t\t\t\tchild.onParentMove(newX, newY, oldX, oldY);\n\t\t\t}\n\t\t}\n\t\tDApplications.update(this);\n\t\tthis.emit(\"move\", newX, newY, oldX, oldY, this);\n\t}\n\n\tresize(width?: number, height?: number): boolean {\n\t\tconst oldWidth = this._width;\n\t\tconst oldHeight = this._height;\n\t\tconst newWidth = width != null ? width : oldWidth;\n\t\tconst newHeight = height != null ? height : oldHeight;\n\t\tconst isWidthChanged = oldWidth !== newWidth;\n\t\tconst isHeightChanged = oldHeight !== newHeight;\n\t\tif (isWidthChanged) {\n\t\t\tthis._width = newWidth;\n\t\t}\n\t\tif (isHeightChanged) {\n\t\t\tthis._height = newHeight;\n\t\t}\n\t\tconst isChanged = isWidthChanged || isHeightChanged;\n\t\tif (isChanged) {\n\t\t\tthis.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t\t}\n\t\tif (isWidthChanged) {\n\t\t\tconst scalarSet = this._scalarSet;\n\t\t\tif (scalarSet.x != null) {\n\t\t\t\tconst position = this._position;\n\t\t\t\tconst parent = this.getParentOfSize();\n\t\t\t\tif (parent) {\n\t\t\t\t\tthis._position.x = scalarSet.x(\n\t\t\t\t\t\tparent.width,\n\t\t\t\t\t\tnewWidth,\n\t\t\t\t\t\tparent.padding.getLeft(),\n\t\t\t\t\t\tposition.x\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isHeightChanged) {\n\t\t\tconst scalarSet = this._scalarSet;\n\t\t\tif (scalarSet.y != null) {\n\t\t\t\tconst position = this._position;\n\t\t\t\tconst parent = this.getParentOfSize();\n\t\t\t\tif (parent) {\n\t\t\t\t\tthis._position.y = scalarSet.y(\n\t\t\t\t\t\tparent.height,\n\t\t\t\t\t\tnewHeight,\n\t\t\t\t\t\tparent.padding.getTop(),\n\t\t\t\t\t\tposition.y\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isChanged;\n\t}\n\n\tgetClearType(): DLayoutClearType {\n\t\treturn this._clearType;\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tthis.toDirty();\n\t\tthis.toHierarchyDirty();\n\n\t\tconst padding = this._padding;\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof DBase) {\n\t\t\t\tchild.onParentResize(newWidth, newHeight, padding);\n\t\t\t}\n\t\t}\n\n\t\tDApplications.update(this);\n\t\tthis.emit(\"resize\", newWidth, newHeight, oldWidth, oldHeight, this);\n\t}\n\n\tprotected onScale(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\tDApplications.update(this);\n\t\tthis.emit(\"scale\", newX, newY, oldX, oldY, this);\n\t}\n\n\tprotected onSkew(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\tDApplications.update(this);\n\t\tthis.emit(\"skew\", newX, newY, oldX, oldY, this);\n\t}\n\n\tget type(): string {\n\t\treturn this.getType();\n\t}\n\n\t// @ts-ignore\n\tget x(): number {\n\t\treturn this._position.x;\n\t}\n\n\tset x(x: DCoordinatePosition) {\n\t\tthis.setX(x);\n\t}\n\n\tgetX(): DCoordinatePosition {\n\t\tconst scalarSet = this._scalarSet;\n\t\tif (scalarSet.x != null) {\n\t\t\treturn scalarSet.x;\n\t\t} else {\n\t\t\treturn this._position.x;\n\t\t}\n\t}\n\n\tsetX(x: DCoordinatePosition): void {\n\t\tconst scalarSet = this._scalarSet;\n\t\tif (isNumber(x)) {\n\t\t\tconst position = this._position;\n\t\t\tif (position.x !== x) {\n\t\t\t\tscalarSet.x = undefined;\n\t\t\t\tposition.x = x;\n\t\t\t} else {\n\t\t\t\tif (scalarSet.x !== undefined) {\n\t\t\t\t\tscalarSet.x = undefined;\n\t\t\t\t\tthis.toParentResized();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst scalar = DScalarFunctions.position(x);\n\t\t\tif (scalarSet.x !== scalar) {\n\t\t\t\tscalarSet.x = scalar;\n\t\t\t\tthis.toParentResized();\n\t\t\t}\n\t\t}\n\t}\n\n\t// @ts-ignore\n\tget y(): number {\n\t\treturn this._position.y;\n\t}\n\n\tset y(y: DCoordinatePosition) {\n\t\tthis.setY(y);\n\t}\n\n\tgetY(): DCoordinatePosition {\n\t\tconst scalarSet = this._scalarSet;\n\t\tif (scalarSet.y != null) {\n\t\t\treturn scalarSet.y;\n\t\t} else {\n\t\t\treturn this._position.y;\n\t\t}\n\t}\n\n\tsetY(y: DCoordinatePosition): void {\n\t\tconst scalarSet = this._scalarSet;\n\t\tif (isNumber(y)) {\n\t\t\tconst position = this._position;\n\t\t\tif (position.y !== y) {\n\t\t\t\tscalarSet.y = undefined;\n\t\t\t\tposition.y = y;\n\t\t\t} else {\n\t\t\t\tif (scalarSet.y !== undefined) {\n\t\t\t\t\tscalarSet.y = undefined;\n\t\t\t\t\tthis.toParentResized();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst scalar = DScalarFunctions.position(y);\n\t\t\tif (scalarSet.y !== scalar) {\n\t\t\t\tscalarSet.y = scalar;\n\t\t\t\tthis.toParentResized();\n\t\t\t}\n\t\t}\n\t}\n\n\t// @ts-ignore\n\tget width(): number {\n\t\treturn this._width;\n\t}\n\n\tset width(width: DCoordinateSize) {\n\t\tthis.setWidth(width);\n\t}\n\n\tgetWidth(): DCoordinateSize {\n\t\treturn this._auto.width.toCoordinate(this._scalarSet.width || this._width);\n\t}\n\n\tsetWidth(width: DCoordinateSize): void {\n\t\tconst auto = this._auto.width;\n\t\tconst isOn = auto.isOn;\n\t\tconst isAuto = auto.from(width);\n\t\tif (auto.isOn !== isOn) {\n\t\t\tthis.toHierarchyDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t\tif (!isAuto) {\n\t\t\tconst scalarSet = this._scalarSet;\n\t\t\tif (isNumber(width)) {\n\t\t\t\tconst oldWidth = this._width;\n\t\t\t\tif (oldWidth !== width) {\n\t\t\t\t\tscalarSet.width = undefined;\n\t\t\t\t\tthis._width = width;\n\t\t\t\t\tconst height = this._height;\n\t\t\t\t\tthis.onResize(width, height, oldWidth, height);\n\n\t\t\t\t\tif (scalarSet.x != null) {\n\t\t\t\t\t\tconst position = this._position;\n\t\t\t\t\t\tconst parent = this.getParentOfSize();\n\t\t\t\t\t\tif (parent) {\n\t\t\t\t\t\t\tposition.x = scalarSet.x(\n\t\t\t\t\t\t\t\tparent.width,\n\t\t\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\t\tparent.padding.getLeft(),\n\t\t\t\t\t\t\t\tposition.x\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (scalarSet.width !== undefined) {\n\t\t\t\t\t\tscalarSet.width = undefined;\n\t\t\t\t\t\tthis.toParentResized();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst scalar = DScalarFunctions.size(width);\n\t\t\t\tif (scalarSet.width !== scalar) {\n\t\t\t\t\tscalarSet.width = scalar;\n\t\t\t\t\tthis.toParentResized();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// @ts-ignore\n\tget height(): number {\n\t\treturn this._height;\n\t}\n\n\tset height(height: DCoordinateSize) {\n\t\tthis.setHeight(height);\n\t}\n\n\tgetHeight(): DCoordinateSize {\n\t\treturn this._auto.height.toCoordinate(this._scalarSet.height || this._height);\n\t}\n\n\tsetHeight(height: DCoordinateSize): void {\n\t\tconst auto = this._auto.height;\n\t\tconst isOn = auto.isOn;\n\t\tconst isAuto = auto.from(height);\n\t\tif (auto.isOn !== isOn) {\n\t\t\tthis.toHierarchyDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t\tif (!isAuto) {\n\t\t\tconst scalarSet = this._scalarSet;\n\t\t\tif (isNumber(height)) {\n\t\t\t\tconst oldHeight = this._height;\n\t\t\t\tif (oldHeight !== height) {\n\t\t\t\t\tscalarSet.height = undefined;\n\t\t\t\t\tthis._height = height;\n\t\t\t\t\tconst width = this._width;\n\t\t\t\t\tthis.onResize(width, height, width, oldHeight);\n\n\t\t\t\t\tif (scalarSet.y != null) {\n\t\t\t\t\t\tconst position = this._position;\n\t\t\t\t\t\tconst parent = this.getParentOfSize();\n\t\t\t\t\t\tif (parent) {\n\t\t\t\t\t\t\tposition.y = scalarSet.y(\n\t\t\t\t\t\t\t\tparent.height,\n\t\t\t\t\t\t\t\theight,\n\t\t\t\t\t\t\t\tparent.padding.getTop(),\n\t\t\t\t\t\t\t\tposition.y\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (scalarSet.height !== undefined) {\n\t\t\t\t\t\tscalarSet.height = undefined;\n\t\t\t\t\t\tthis.toParentResized();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst scalar = DScalarFunctions.size(height);\n\t\t\t\tif (scalarSet.height !== scalar) {\n\t\t\t\t\tscalarSet.height = scalar;\n\t\t\t\t\tthis.toParentResized();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// @ts-ignore\n\tget position(): DBasePoint {\n\t\treturn this._position;\n\t}\n\n\t// @ts-ignore\n\tget scale(): DBasePoint {\n\t\treturn this._scale;\n\t}\n\n\t// @ts-ignore\n\tget skew(): DBasePoint {\n\t\treturn this._skew;\n\t}\n\n\tget padding(): DPadding {\n\t\treturn this._padding;\n\t}\n\n\tget corner(): DCorner {\n\t\treturn this._corner;\n\t}\n\n\tget background(): DBackgroundStateAware {\n\t\treturn this._background;\n\t}\n\n\tget border(): DBorderStateAware {\n\t\treturn this._border;\n\t}\n\n\tget outline(): DOutline {\n\t\treturn this._outline;\n\t}\n\n\tget unsafe(): Transform {\n\t\treturn this.transform;\n\t}\n\n\tget title(): string {\n\t\treturn this._title;\n\t}\n\n\tset title(title: string) {\n\t\tif (this._title !== title) {\n\t\t\tthis._title = title;\n\t\t\tif (this.state.isHovered) {\n\t\t\t\tthis.applyTitle();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected applyTitle(): void {\n\t\tconst layer = DApplications.getLayer(this);\n\t\tif (layer) {\n\t\t\tlayer.view.title = this._title;\n\t\t}\n\t}\n\n\tshow(): this {\n\t\tif (!this.visible) {\n\t\t\tthis.visible = true;\n\t\t\tthis.toParentHierarchyDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\tisShown(): boolean {\n\t\treturn this.visible;\n\t}\n\n\thide(): this {\n\t\tif (this.visible) {\n\t\t\tthis.visible = false;\n\t\t\tthis.toParentHierarchyDirty();\n\t\t\tthis.blur(true);\n\t\t\tDApplications.update(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\tisHidden(): boolean {\n\t\treturn !this.visible;\n\t}\n\n\ttoDirty(): boolean {\n\t\tif (!this._isDirty) {\n\t\t\tthis._isDirty = true;\n\t\t\tthis.toParentHasDirty();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\ttoHasDirty(): boolean {\n\t\tif (!this._hasDirty) {\n\t\t\tthis._hasDirty = true;\n\t\t\tthis.toParentHasDirty();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\ttoParentHasDirty(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.toHasDirty();\n\t\t}\n\t}\n\n\ttoHierarchyDirty(): boolean {\n\t\tif (!this._isHierarchyDirty) {\n\t\t\tthis._isHierarchyDirty = true;\n\t\t\tthis.onHierarchyDirty();\n\t\t\tthis.toParentHierarchyDirty();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\ttoParentHierarchyDirty(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.toHierarchyDirty();\n\t\t}\n\t}\n\n\tisHierarchyDirty(): boolean {\n\t\treturn this._isHierarchyDirty;\n\t}\n\n\tprotected onHierarchyDirty(): void {\n\t\t// DO NOTHING\n\t}\n\n\tisDirty(): boolean {\n\t\treturn this._isDirty;\n\t}\n\n\thasDirty(): boolean {\n\t\treturn this._hasDirty;\n\t}\n\n\tprotected setFocused(isFocused: boolean): this {\n\t\tif (this.state.isFocused !== isFocused) {\n\t\t\tconst layer = DApplications.getLayer(this);\n\t\t\tif (layer) {\n\t\t\t\tlayer.getFocusController().set(this, isFocused);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tfocus(): this {\n\t\treturn this.setFocused(true);\n\t}\n\n\tblur(recursively?: boolean): this {\n\t\tif (recursively) {\n\t\t\tconst layer = DApplications.getLayer(this);\n\t\t\tif (layer) {\n\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\tconst focused = focusController.get();\n\t\t\t\tif (focused instanceof DBase) {\n\t\t\t\t\tlet current: Container = focused;\n\t\t\t\t\twhile (current) {\n\t\t\t\t\t\tif (current === this) {\n\t\t\t\t\t\t\tfocused.setFocused(false);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.setFocused(false);\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tthis.toDirty();\n\t\tDApplications.update(this);\n\t\tthis.emit(\"statechange\", newState, oldState, this);\n\n\t\tconst children = this.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof DBase) {\n\t\t\t\tchild.state.onParentChange(newState, oldState);\n\t\t\t}\n\t\t}\n\n\t\tif (newState.isFocused) {\n\t\t\tif (!oldState.isFocused) {\n\t\t\t\tthis.onFocus();\n\t\t\t}\n\t\t\tif (newState.inDisabled && !oldState.inDisabled) {\n\t\t\t\tsetTimeout((): void => {\n\t\t\t\t\tthis.blur();\n\t\t\t\t}, 0);\n\t\t\t}\n\t\t} else if (oldState.isFocused) {\n\t\t\tthis.onBlur();\n\t\t}\n\n\t\tthis.cursor = this.toCursor(this._cursor, newState);\n\t}\n\n\tprotected onChildFocus(focused: DBase): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.onChildFocus(focused);\n\t\t}\n\t}\n\n\tprotected onFocus(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.onChildFocus(this);\n\t\t}\n\t}\n\n\tprotected onChildBlur(blured: DBase): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.onChildBlur(blured);\n\t\t}\n\t}\n\n\tprotected onBlur(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\tparent.onChildBlur(this);\n\t\t}\n\t}\n\n\tget state(): DBaseStateSet {\n\t\treturn this._state;\n\t}\n\n\tget options(): OPTIONS | undefined {\n\t\treturn this._options;\n\t}\n\n\tget theme(): THEME {\n\t\treturn this._theme;\n\t}\n\n\tset theme(theme: THEME) {\n\t\tconst result = this._theme;\n\t\tif (result !== theme) {\n\t\t\tthis._theme = theme;\n\t\t\tthis._padding.setTheme(theme);\n\t\t\tthis._background.setTheme(theme);\n\t\t\tthis._border.setTheme(theme);\n\t\t\tthis._outline.setTheme(theme);\n\t\t\tthis._corner.setTheme(theme);\n\t\t\tthis.toDirty();\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\treflow(): void {\n\t\tconst isDirty = this._isDirty;\n\t\tif (isDirty) {\n\t\t\tthis.onReflow();\n\t\t\tthis._isDirty = false;\n\t\t}\n\n\t\tconst hasDirty = this._hasDirty;\n\t\tconst isHierarchyDirty = this._isHierarchyDirty;\n\t\tif (hasDirty || isHierarchyDirty) {\n\t\t\tthis._hasDirty = false;\n\t\t\tthis._isHierarchyDirty = false;\n\n\t\t\tconst children = this.children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child instanceof DBase) {\n\t\t\t\t\tchild.reflow();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isDirty || hasDirty || isHierarchyDirty) {\n\t\t\tthis.onRefit();\n\t\t}\n\t}\n\n\tprotected onRefit(): void {\n\t\tconst auto = this._auto;\n\t\tconst isWidthAuto = auto.width.isOn;\n\t\tconst isHeightAuto = auto.height.isOn;\n\t\tif (isWidthAuto && isHeightAuto) {\n\t\t\tlet width = 0;\n\t\t\tlet height = 0;\n\t\t\tconst children = this.children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child.visible) {\n\t\t\t\t\tconst rw = this.hasRefitableWidth(child);\n\t\t\t\t\tconst rh = this.hasRefitableHeight(child);\n\t\t\t\t\tif (rw || rh) {\n\t\t\t\t\t\tif (child instanceof DBase) {\n\t\t\t\t\t\t\tif (rw) {\n\t\t\t\t\t\t\t\twidth = Math.max(width, child.x + child.width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (rh) {\n\t\t\t\t\t\t\t\theight = Math.max(height, child.y + child.height);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (child instanceof Container) {\n\t\t\t\t\t\t\tconst bound = child.getLocalBounds(undefined, true);\n\t\t\t\t\t\t\tif (rw) {\n\t\t\t\t\t\t\t\twidth = Math.max(width, child.x + bound.x + bound.width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (rh) {\n\t\t\t\t\t\t\t\theight = Math.max(height, child.y + bound.y + bound.height);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst bound = child.getLocalBounds();\n\t\t\t\t\t\t\tif (rw) {\n\t\t\t\t\t\t\t\twidth = Math.max(width, child.x + bound.x + bound.width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (rh) {\n\t\t\t\t\t\t\t\theight = Math.max(height, child.y + bound.y + bound.height);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst padding = this.padding;\n\t\t\tthis.resize(width + padding.getRight(), height + padding.getBottom());\n\t\t} else if (isWidthAuto) {\n\t\t\tlet width = 0;\n\t\t\tconst children = this.children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child.visible && this.hasRefitableWidth(child)) {\n\t\t\t\t\tif (child instanceof DBase) {\n\t\t\t\t\t\twidth = Math.max(width, child.x + child.width);\n\t\t\t\t\t} else if (child instanceof Container) {\n\t\t\t\t\t\tconst bound = child.getLocalBounds(undefined, true);\n\t\t\t\t\t\twidth = Math.max(width, child.x + bound.x + bound.width);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst bound = child.getLocalBounds();\n\t\t\t\t\t\twidth = Math.max(width, child.x + bound.x + bound.width);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.resize(width + this.padding.getRight(), undefined);\n\t\t} else if (isHeightAuto) {\n\t\t\tlet height = 0;\n\t\t\tconst children = this.children;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child.visible && this.hasRefitableHeight(child)) {\n\t\t\t\t\tif (child instanceof DBase) {\n\t\t\t\t\t\theight = Math.max(height, child.y + child.height);\n\t\t\t\t\t} else if (child instanceof Container) {\n\t\t\t\t\t\tconst bound = child.getLocalBounds(undefined, true);\n\t\t\t\t\t\theight = Math.max(height, child.y + bound.y + bound.height);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst bound = child.getLocalBounds();\n\t\t\t\t\t\theight = Math.max(height, child.y + bound.y + bound.height);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.resize(undefined, height + this.padding.getBottom());\n\t\t}\n\t}\n\n\tprotected isRefitable(target: any): target is DRefitable {\n\t\treturn target instanceof DBase;\n\t}\n\n\t/**\n\t * Returns true if the given target has a height that doesn't depend on its parent height.\n\t *\n\t * @param target a target\n\t * @returns true if the given target has a height that doesn't depend on its parent height.\n\t */\n\tprotected hasRefitableHeight(target: any): target is DRefitable {\n\t\treturn (\n\t\t\tthis.isRefitable(target) && !(target instanceof DBase && isFunction(target.getHeight()))\n\t\t);\n\t}\n\n\t/**\n\t * Returns true if the given target has a width that doesn't depend on its parent width.\n\t *\n\t * @param target a target\n\t * @returns true if the given target has a width that doesn't depend on its parent width.\n\t */\n\tprotected hasRefitableWidth(target: any): target is DRefitable {\n\t\treturn (\n\t\t\tthis.isRefitable(target) && !(target instanceof DBase && isFunction(target.getWidth()))\n\t\t);\n\t}\n\n\tprotected onReflow(): void {\n\t\tthis._reflowable.onReflow(this, this._width, this._height);\n\t}\n\n\tget shadow(): DShadow | null {\n\t\treturn this._shadow;\n\t}\n\n\tset shadow(shadow: DShadow | null) {\n\t\tconst previous = this._shadow;\n\t\tif (previous !== shadow) {\n\t\t\tconst reflowable = this._reflowable;\n\t\t\tconst snippet = this._snippet;\n\t\t\tconst onShadowUpdateBound = this._onShadowUpdateBound;\n\t\t\tif (previous != null) {\n\t\t\t\tprevious.off(\"update\", onShadowUpdateBound);\n\t\t\t\treflowable.remove(previous);\n\t\t\t\tsnippet.remove(previous, true);\n\t\t\t}\n\n\t\t\tthis._shadow = shadow;\n\t\t\tif (shadow != null) {\n\t\t\t\tshadow.on(\"update\", onShadowUpdateBound);\n\t\t\t\treflowable.add(shadow);\n\t\t\t\tsnippet.addAt(shadow, true, 0);\n\t\t\t}\n\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\tprotected toParentResized(): void {\n\t\tconst parent = this.getParentOfSize();\n\t\tif (parent) {\n\t\t\tthis.onParentResize(parent.width, parent.height, parent.padding);\n\t\t}\n\t}\n\n\tprotected getParentOfSize(): { width: number; height: number; padding: DPadding } | null {\n\t\tconst parent = this.parent;\n\t\tif (parent instanceof DBase) {\n\t\t\treturn parent;\n\t\t} else {\n\t\t\treturn DApplications.getLayer(this);\n\t\t}\n\t}\n\n\t/**\n\t * Called when a parent resized.\n\t *\n\t * @param parentWidth a parent's local width\n\t * @param parentHeight a parent's local height\n\t */\n\tonParentResize(parentWidth: number, parentHeight: number, parentPadding: DPadding): void {\n\t\tconst scalarSet = this._scalarSet;\n\t\tconst position = this.transform.position;\n\t\tconst x = position.x;\n\t\tconst y = position.y;\n\t\tconst width = this._width;\n\t\tconst height = this._height;\n\n\t\t// Width & height\n\t\tconst paddingWidth = parentPadding.getLeft() + parentPadding.getRight();\n\t\tconst paddingHeight = parentPadding.getTop() + parentPadding.getBottom();\n\t\tconst newWidth =\n\t\t\tscalarSet.width != null\n\t\t\t\t? scalarSet.width(parentWidth, width, paddingWidth, width)\n\t\t\t\t: width;\n\t\tconst newHeight =\n\t\t\tscalarSet.height != null\n\t\t\t\t? scalarSet.height(parentHeight, height, paddingHeight, height)\n\t\t\t\t: height;\n\t\tthis.resize(newWidth, newHeight);\n\n\t\t// X & Y\n\t\tconst newX =\n\t\t\tscalarSet.x != null\n\t\t\t\t? scalarSet.x(parentWidth, this._width, parentPadding.getLeft(), x)\n\t\t\t\t: x;\n\t\tconst newY =\n\t\t\tscalarSet.y != null\n\t\t\t\t? scalarSet.y(parentHeight, this._height, parentPadding.getTop(), y)\n\t\t\t\t: y;\n\t\tthis.position.set(newX, newY);\n\t}\n\n\t/**\n\t * Called when a parent moved.\n\t *\n\t * @param newX a new parent's local x position\n\t * @param newY a new parent's local y position\n\t * @param oldX an old parent's local x position\n\t * @param oldY an old parent's local y position\n\t */\n\tprotected onParentMove(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\t// DO NOTHING\n\t}\n\n\t// Wheel\n\tprotected onWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tthis.emit(\"wheel\", e, deltas, global, this);\n\t\treturn false;\n\t}\n\n\t// Keydown\n\tprotected onKeyDown(e: KeyboardEvent): boolean {\n\t\tthis.emit(\"keydown\", e, this);\n\t\treturn false;\n\t}\n\n\tprotected onKeyUp(e: KeyboardEvent): boolean {\n\t\tthis.emit(\"keyup\", e, this);\n\t\treturn false;\n\t}\n\n\t// Down\n\tprotected isEventTarget(e: InteractionEvent): boolean {\n\t\tconst target = e.target;\n\t\tif (target === this) {\n\t\t\treturn true;\n\t\t} else if (target != null && !(target instanceof DBase && target.interactive)) {\n\t\t\tlet parent = target.parent;\n\t\t\twhile (parent != null && !(parent instanceof DBase && parent.interactive)) {\n\t\t\t\tparent = parent.parent;\n\t\t\t}\n\t\t\treturn parent === this;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected onDown(e: InteractionEvent): void {\n\t\tif (this.isEventTarget(e)) {\n\t\t\tthis.onDownThis(e);\n\t\t}\n\t\tthis.emit(\"down\", e, this);\n\t}\n\n\tprotected onDownThis(e: InteractionEvent): void {\n\t\tconst oe = e.data.originalEvent;\n\t\tif (\"touches\" in oe) {\n\t\t\tconst lastDownPoint = this._lastDownPoint || new Point();\n\t\t\tthis._lastDownPoint = lastDownPoint;\n\t\t\tlastDownPoint.copyFrom(e.data.global);\n\t\t} else {\n\t\t\tthis.focusOnClosest();\n\t\t}\n\t}\n\n\tprotected onUp(e: InteractionEvent): void {\n\t\tif (this.isEventTarget(e)) {\n\t\t\tthis.onUpThis(e);\n\t\t}\n\t\tthis.emit(\"up\", e, this);\n\t}\n\n\tprotected onUpThis(e: InteractionEvent): void {\n\t\tconst oe = e.data.originalEvent;\n\t\tif (\"touches\" in oe) {\n\t\t\tconst lastDownPoint = this._lastDownPoint;\n\t\t\tif (lastDownPoint) {\n\t\t\t\tconst global = e.data.global;\n\t\t\t\tconst dx = Math.abs(global.x - lastDownPoint.x);\n\t\t\t\tconst dy = Math.abs(global.y - lastDownPoint.y);\n\t\t\t\tconst threshold = UtilPointerEvent.CLICK_DISTANCE_THRESHOLD;\n\t\t\t\tif (dx < threshold && dy < threshold) {\n\t\t\t\t\tthis.focusOnClosest();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected focusOnClosest(): void {\n\t\tconst layer = DApplications.getLayer(this);\n\t\tif (layer) {\n\t\t\tconst focusController = layer.getFocusController();\n\t\t\tfocusController.focus(focusController.findParent(this));\n\t\t}\n\t}\n\n\t// Over\n\tprotected onOver(e: InteractionEvent): void {\n\t\t// Update the hover state\n\t\tthis.state.isHovered = true;\n\n\t\t// Update the title\n\t\tif (e.target === this) {\n\t\t\tthis.applyTitle();\n\t\t}\n\n\t\t// Event\n\t\tthis.emit(\"over\", e, this);\n\t}\n\n\t// Out\n\tprotected onOut(e: InteractionEvent): void {\n\t\t// Update the hover state\n\t\tthis.state.isHovered = false;\n\n\t\t// Event\n\t\tthis.emit(\"out\", e, this);\n\t}\n\n\t// Double click\n\tprotected onDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\tthis.emit(\"dblclick\", e, interactionManager, this);\n\t\treturn false;\n\t}\n\n\t//\n\toverride render(renderer: Renderer): void {\n\t\tif (this.visible && 0 < this.worldAlpha && this.renderable) {\n\t\t\tconst snippet = this._snippet;\n\t\t\tsnippet.render(renderer, true);\n\t\t\tsuper.render(renderer);\n\t\t\tsnippet.render(renderer, false);\n\t\t}\n\t}\n\n\toverride updateTransform(): void {\n\t\tsuper.updateTransform();\n\t\tthis._snippet.updateTransform();\n\t}\n\n\t//\n\tprotected getThemeDefault(): THEME {\n\t\treturn DThemes.getInstance().get(this.getType());\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DBase\";\n\t}\n\n\t//\n\tprotected _calculateBounds(): void {\n\t\tthis._bounds.addFrame(this.transform, 0, 0, this._width, this._height);\n\t\tsuper._calculateBounds();\n\t}\n\n\tcontainsPoint(point: Point): boolean {\n\t\treturn (\n\t\t\tthis.containsGlobalPoint(point) ||\n\t\t\tthis.containsLocalPoint(\n\t\t\t\tthis.worldTransform.applyInverse(point, DBase.WORK_CONTAINS_POINT)\n\t\t\t)\n\t\t);\n\t}\n\n\tprotected containsGlobalPoint(point: Point): boolean {\n\t\treturn false;\n\t}\n\n\tprotected containsLocalPoint(point: Point): boolean {\n\t\tconst x = point.x;\n\t\tconst y = point.y;\n\t\tconst w = this._width;\n\t\tconst h = this._height;\n\t\treturn 0 <= x && x <= w && 0 <= y && y <= h;\n\t}\n\n\t/**\n\t * Returns a clipping rect.\n\t *\n\t * @param result a clipping rect\n\t */\n\tgetClippingRect(target: unknown, result: Rectangle): void {\n\t\tresult.x = 0;\n\t\tresult.y = 0;\n\t\tresult.width = this._width;\n\t\tresult.height = this._height;\n\t}\n\n\tdestroy(): void {\n\t\t// Layout\n\t\tconst scalarSet = this._scalarSet;\n\t\tscalarSet.x = null;\n\t\tscalarSet.y = null;\n\t\tscalarSet.width = null;\n\t\tscalarSet.height = null;\n\n\t\t// Shadow\n\t\tconst shadow = this._shadow;\n\t\tif (shadow) {\n\t\t\tthis._shadow = null;\n\t\t\tshadow.destroy();\n\t\t}\n\n\t\t// Children\n\t\tconst children = this.children;\n\t\tfor (let i = children.length - 1; 0 <= i; --i) {\n\t\t\tchildren[i].destroy();\n\t\t}\n\t\tchildren.length = 0;\n\n\t\t//\n\t\tsuper.destroy();\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-scroll-bar.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-scroll-bar.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,KAAK,EAA4B,MAAM,UAAU,CAAC;AAkB3D;IAGU,8BAAqB;IAW9B,oBAAY,OAAiB;;QAA7B,YACC,kBAAM,OAAO,CAAC,SAmBd;QAjBA,KAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,KAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QACd,KAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,KAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;QACrB,KAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,KAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,KAAI,CAAC,aAAa,GAAG,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,KAAK,mCAAI,KAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;QAC7E,KAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,KAAI,CAAC,sBAAsB,GAAG;YAC7B,KAAI,CAAC,gBAAgB,EAAE,CAAC;QACzB,CAAC,CAAC;QACF,IAAM,KAAK,GAAG,KAAI,CAAC,QAAQ,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC,CAAC;QAC5C,KAAK,CAAC,EAAE,CAAC,aAAa,EAAE,UAAC,QAAuB,EAAE,QAAuB;YACxE,KAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;Q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,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SAC3B;IACF,CAAC;IAES,uCAAkB,GAA5B,UAA6B,QAAuB,EAAE,QAAuB;QAC5E,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;YACxE,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS,EAAE;gBACrE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;aAC7B;SACD;IACF,CAAC;IAES,kCAAa,GAAvB,UAAwB,QAAuB,EAAE,QAAuB;QACvE,iBAAM,aAAa,YAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAExC,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;YACxE,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS,EAAE;gBACrE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;aAC7B;SACD;IACF,CAAC;IAIS,4BAAO,GAAjB;QACC,OAAO,YAAY,CAAC;IACrB,CAAC;IACF,iBAAC;AAAD,CAAC,AA7KD,CAGU,KAAK,GA0Kd","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Renderer } from \"pixi.js\";\nimport { DApplications } from \"./d-applications\";\nimport { DBase, DBaseOptions, DThemeBase } from \"./d-base\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\nimport { DScrollBarThumb, DScrollBarThumbOptions } from \"./d-scroll-bar-thumb\";\n\nexport interface DScrollBarFadeOutOpiotns {\n\tdelay?: number;\n}\n\nexport interface DScrollBarOptions<THEME extends DThemeScrollBar = DThemeScrollBar>\n\textends DBaseOptions<THEME> {\n\tthumb?: DScrollBarThumbOptions;\n\tfadeOut?: DScrollBarFadeOutOpiotns;\n}\n\nexport interface DThemeScrollBar extends DThemeBase {\n\tgetFadeOutDelay(): number;\n}\n\nexport abstract class DScrollBar<\n\tTHEME extends DThemeScrollBar = DThemeScrollBar,\n\tOPTIONS extends DScrollBarOptions<THEME> = DScrollBarOptions<THEME>\n> extends DBase<THEME, OPTIONS> {\n\tprotected _start: number;\n\tprotected _end: number;\n\tprotected _thumb: DScrollBarThumb;\n\tprotected _touchedAt: number;\n\tprotected _isTouched: boolean;\n\tprotected _fadeOutTimeoutId: number | null;\n\tprotected _fadeOutDelay: number;\n\tprotected _onFadeOutTimeoutBound: () => void;\n\tprotected _isSilent: boolean;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._start = 0;\n\t\tthis._end = 1;\n\t\tthis.visible = false;\n\t\tthis._touchedAt = -1;\n\t\tthis._isTouched = false;\n\t\tthis._fadeOutTimeoutId = null;\n\t\tthis._fadeOutDelay = options?.fadeOut?.delay ?? this.theme.getFadeOutDelay();\n\t\tthis._isSilent = true;\n\t\tthis._onFadeOutTimeoutBound = (): void => {\n\t\t\tthis.onFadeOutTimeout();\n\t\t};\n\t\tconst thumb = this.newThumb(options?.thumb);\n\t\tthumb.on(\"statechange\", (newState: DBaseStateSet, oldState: DBaseStateSet): void => {\n\t\t\tthis.onThumbStateChange(newState, oldState);\n\t\t});\n\t\tthis._thumb = thumb;\n\t\tthis.addChild(thumb);\n\t}\n\n\tget thumb(): DScrollBarThumb {\n\t\treturn this._thumb;\n\t}\n\n\tget start(): number {\n\t\treturn this._start;\n\t}\n\n\tget end(): number {\n\t\treturn this._end;\n\t}\n\n\tset(start: number, end: number, size: number, silently?: boolean): void {\n\t\tif (size < 1) {\n\t\t\tstart = 0;\n\t\t\tend = 1;\n\t\t} else {\n\t\t\tstart = Math.max(0, Math.min(1, start / size));\n\t\t\tend = Math.max(start, Math.min(1, end / size));\n\t\t}\n\t\tif (this._start !== start || this._end !== end) {\n\t\t\tthis._start = start;\n\t\t\tthis._end = end;\n\t\t\tthis.onChange(silently);\n\t\t}\n\t}\n\n\tprotected onChange(silently?: boolean): void {\n\t\tthis.updateThumb(this.width, this.height);\n\n\t\tif (silently) {\n\t\t\tthis._isSilent = true;\n\t\t}\n\t\tif (!this._isTouched) {\n\t\t\tthis._isTouched = true;\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\ttouch(silently?: boolean): void {\n\t\tthis.onChange(silently);\n\t}\n\n\tisRegionVisible(): boolean {\n\t\treturn 0 < this._start || this._end < 1;\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tif (this._isTouched) {\n\t\t\tthis._isTouched = false;\n\t\t\tif (!this._isSilent && this.isRegionVisible()) {\n\t\t\t\tconst fadeOutDelay = this._fadeOutDelay;\n\t\t\t\tif (0 <= fadeOutDelay) {\n\t\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t\t\tif (this._fadeOutTimeoutId == null) {\n\t\t\t\t\t\tthis._fadeOutTimeoutId = window.setTimeout(\n\t\t\t\t\t\t\tthis._onFadeOutTimeoutBound,\n\t\t\t\t\t\t\tfadeOutDelay\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!this.visible) {\n\t\t\t\t\tthis.visible = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this._fadeOutDelay < 0 && this.visible) {\n\t\t\t\t\tthis.visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this._isSilent) {\n\t\t\tthis._isSilent = false;\n\t\t}\n\t\tsuper.render(renderer);\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t\tthis.updateThumb(newWidth, newHeight);\n\t}\n\n\tprotected abstract updateThumb(width: number, height: number): void;\n\n\tprotected onFadeOutTimeout(): void {\n\t\tthis._fadeOutTimeoutId = null;\n\n\t\tconst fadeOutDelay = this._fadeOutDelay;\n\t\tconst onTouchTimeoutBound = this._onFadeOutTimeoutBound;\n\n\t\tconst state = this.state;\n\t\tif (state.isGesturing || state.onHovered || state.isHovered || state.isPressed) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutDelay);\n\t\t\treturn;\n\t\t}\n\n\t\tconst thumbState = this._thumb.state;\n\t\tif (thumbState.isGesturing || thumbState.isHovered || thumbState.isPressed) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutDelay);\n\t\t\treturn;\n\t\t}\n\n\t\tconst now = Date.now();\n\t\tconst remainingTime = fadeOutDelay - (now - this._touchedAt);\n\t\tif (0 < remainingTime) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, remainingTime);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.visible) {\n\t\t\tthis.visible = false;\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\tprotected onThumbStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tif (!newState.isGesturing && !newState.isHovered && !newState.isPressed) {\n\t\t\tif (oldState.isGesturing || oldState.isHovered || oldState.isPressed) {\n\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tsuper.onStateChange(newState, oldState);\n\n\t\tif (!newState.isGesturing && !newState.isHovered && !newState.isPressed) {\n\t\t\tif (oldState.isGesturing || oldState.isHovered || oldState.isPressed) {\n\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected abstract newThumb(options?: DScrollBarThumbOptions): DScrollBarThumb;\n\n\tprotected getType(): string {\n\t\treturn \"DScrollBar\";\n\t}\n}\n"]}
|
|
1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AkB,GAA5B,UAA6B,QAAuB,EAAE,QAAuB;QAC5E,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;YACxE,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS,EAAE;gBACrE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;aAC7B;SACD;IACF,CAAC;IAES,kCAAa,GAAvB,UAAwB,QAAuB,EAAE,QAAuB;QACvE,iBAAM,aAAa,YAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAExC,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;YACxE,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS,EAAE;gBACrE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;aAC7B;SACD;IACF,CAAC;IAIS,4BAAO,GAAjB;QACC,OAAO,YAAY,CAAC;IACrB,CAAC;IACF,iBAAC;AAAD,CAAC,AA9KD,CAGU,KAAK,GA2Kd","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Renderer } from \"pixi.js\";\nimport { DApplications } from \"./d-applications\";\nimport { DBase, DBaseOptions, DThemeBase } from \"./d-base\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\nimport { DScrollBarThumb, DScrollBarThumbOptions } from \"./d-scroll-bar-thumb\";\n\nexport interface DScrollBarFadeOutOpiotns {\n\tdelay?: number;\n}\n\nexport interface DScrollBarOptions<THEME extends DThemeScrollBar = DThemeScrollBar>\n\textends DBaseOptions<THEME> {\n\tthumb?: DScrollBarThumbOptions;\n\tfadeOut?: DScrollBarFadeOutOpiotns;\n}\n\nexport interface DThemeScrollBar extends DThemeBase {\n\tgetFadeOutDelay(): number;\n}\n\nexport abstract class DScrollBar<\n\tTHEME extends DThemeScrollBar = DThemeScrollBar,\n\tOPTIONS extends DScrollBarOptions<THEME> = DScrollBarOptions<THEME>\n> extends DBase<THEME, OPTIONS> {\n\tprotected _start: number;\n\tprotected _end: number;\n\tprotected _thumb: DScrollBarThumb;\n\tprotected _touchedAt: number;\n\tprotected _isTouched: boolean;\n\tprotected _fadeOutTimeoutId: number | null;\n\tprotected _fadeOutDelay: number;\n\tprotected _onFadeOutTimeoutBound: () => void;\n\tprotected _isSilent: boolean;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._start = 0;\n\t\tthis._end = 1;\n\t\tthis.visible = false;\n\t\tthis._touchedAt = -1;\n\t\tthis._isTouched = false;\n\t\tthis._fadeOutTimeoutId = null;\n\t\tthis._fadeOutDelay = options?.fadeOut?.delay ?? this.theme.getFadeOutDelay();\n\t\tthis._isSilent = true;\n\t\tthis._onFadeOutTimeoutBound = (): void => {\n\t\t\tthis.onFadeOutTimeout();\n\t\t};\n\t\tconst thumb = this.newThumb(options?.thumb);\n\t\tthumb.on(\"statechange\", (newState: DBaseStateSet, oldState: DBaseStateSet): void => {\n\t\t\tthis.onThumbStateChange(newState, oldState);\n\t\t});\n\t\tthis._thumb = thumb;\n\t\tthis.addChild(thumb);\n\t}\n\n\tget thumb(): DScrollBarThumb {\n\t\treturn this._thumb;\n\t}\n\n\tget start(): number {\n\t\treturn this._start;\n\t}\n\n\tget end(): number {\n\t\treturn this._end;\n\t}\n\n\tset(start: number, end: number, size: number, silently?: boolean): void {\n\t\tif (size < 1) {\n\t\t\tstart = 0;\n\t\t\tend = 1;\n\t\t} else {\n\t\t\tstart = Math.max(0, Math.min(1, start / size));\n\t\t\tend = Math.max(start, Math.min(1, end / size));\n\t\t}\n\t\tif (this._start !== start || this._end !== end) {\n\t\t\tthis._start = start;\n\t\t\tthis._end = end;\n\t\t\tthis.onChange(silently);\n\t\t}\n\t}\n\n\tprotected onChange(silently?: boolean): void {\n\t\tthis.updateThumb(this.width, this.height);\n\n\t\tif (silently) {\n\t\t\tthis._isSilent = true;\n\t\t}\n\t\tif (!this._isTouched) {\n\t\t\tthis._isTouched = true;\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\ttouch(silently?: boolean): void {\n\t\tthis.onChange(silently);\n\t}\n\n\tisRegionVisible(): boolean {\n\t\treturn 0 < this._start || this._end < 1;\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tif (this._isTouched) {\n\t\t\tthis._isTouched = false;\n\t\t\tif (!this._isSilent && this.isRegionVisible()) {\n\t\t\t\tconst fadeOutDelay = this._fadeOutDelay;\n\t\t\t\tif (0 <= fadeOutDelay) {\n\t\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t\t\tif (this._fadeOutTimeoutId == null) {\n\t\t\t\t\t\tthis._fadeOutTimeoutId = window.setTimeout(\n\t\t\t\t\t\t\tthis._onFadeOutTimeoutBound,\n\t\t\t\t\t\t\tfadeOutDelay\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!this.visible) {\n\t\t\t\t\tthis.visible = true;\n\t\t\t\t\tthis.updateTransform();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this._fadeOutDelay < 0 && this.visible) {\n\t\t\t\t\tthis.visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this._isSilent) {\n\t\t\tthis._isSilent = false;\n\t\t}\n\t\tsuper.render(renderer);\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t\tthis.updateThumb(newWidth, newHeight);\n\t}\n\n\tprotected abstract updateThumb(width: number, height: number): void;\n\n\tprotected onFadeOutTimeout(): void {\n\t\tthis._fadeOutTimeoutId = null;\n\n\t\tconst fadeOutDelay = this._fadeOutDelay;\n\t\tconst onTouchTimeoutBound = this._onFadeOutTimeoutBound;\n\n\t\tconst state = this.state;\n\t\tif (state.isGesturing || state.onHovered || state.isHovered || state.isPressed) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutDelay);\n\t\t\treturn;\n\t\t}\n\n\t\tconst thumbState = this._thumb.state;\n\t\tif (thumbState.isGesturing || thumbState.isHovered || thumbState.isPressed) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutDelay);\n\t\t\treturn;\n\t\t}\n\n\t\tconst now = Date.now();\n\t\tconst remainingTime = fadeOutDelay - (now - this._touchedAt);\n\t\tif (0 < remainingTime) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, remainingTime);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.visible) {\n\t\t\tthis.visible = false;\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\tprotected onThumbStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tif (!newState.isGesturing && !newState.isHovered && !newState.isPressed) {\n\t\t\tif (oldState.isGesturing || oldState.isHovered || oldState.isPressed) {\n\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tsuper.onStateChange(newState, oldState);\n\n\t\tif (!newState.isGesturing && !newState.isHovered && !newState.isPressed) {\n\t\t\tif (oldState.isGesturing || oldState.isHovered || oldState.isPressed) {\n\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected abstract newThumb(options?: DScrollBarThumbOptions): DScrollBarThumb;\n\n\tprotected getType(): string {\n\t\treturn \"DScrollBar\";\n\t}\n}\n"]}
|
|
@@ -14,14 +14,10 @@ var EShapeBuffer = /** @class */ (function () {
|
|
|
14
14
|
this._vertexCapacity = nvertices;
|
|
15
15
|
this._vertexCount = 0;
|
|
16
16
|
this._vertexBuffer = null;
|
|
17
|
-
this.clippings = new Float32Array(nvertices * 3);
|
|
18
|
-
this._clippingBuffer = null;
|
|
19
17
|
this.steps = new Float32Array(nvertices * 6);
|
|
20
18
|
this._stepBuffer = null;
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.colorStrokes = new Float32Array(nvertices * 4);
|
|
24
|
-
this._colorStrokeBuffer = null;
|
|
19
|
+
this.colors = new Float32Array(nvertices * 3);
|
|
20
|
+
this._colorBuffer = null;
|
|
25
21
|
this.uvs = new Float32Array(nvertices * 2);
|
|
26
22
|
this._uvBuffer = null;
|
|
27
23
|
var isIndicesShort = nvertices <= 65535;
|
|
@@ -40,28 +36,16 @@ var EShapeBuffer = /** @class */ (function () {
|
|
|
40
36
|
vertexBuffer.update();
|
|
41
37
|
}
|
|
42
38
|
};
|
|
43
|
-
EShapeBuffer.prototype.updateClippings = function () {
|
|
44
|
-
var clippingBuffer = this._clippingBuffer;
|
|
45
|
-
if (clippingBuffer) {
|
|
46
|
-
clippingBuffer.update();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
39
|
EShapeBuffer.prototype.updateSteps = function () {
|
|
50
40
|
var stepBuffer = this._stepBuffer;
|
|
51
41
|
if (stepBuffer) {
|
|
52
42
|
stepBuffer.update();
|
|
53
43
|
}
|
|
54
44
|
};
|
|
55
|
-
EShapeBuffer.prototype.
|
|
56
|
-
var
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
EShapeBuffer.prototype.updateColorStrokes = function () {
|
|
62
|
-
var colorStrokeBuffer = this._colorStrokeBuffer;
|
|
63
|
-
if (colorStrokeBuffer) {
|
|
64
|
-
colorStrokeBuffer.update();
|
|
45
|
+
EShapeBuffer.prototype.updateColors = function () {
|
|
46
|
+
var colorBuffer = this._colorBuffer;
|
|
47
|
+
if (colorBuffer) {
|
|
48
|
+
colorBuffer.update();
|
|
65
49
|
}
|
|
66
50
|
};
|
|
67
51
|
EShapeBuffer.prototype.updateUvs = function () {
|
|
@@ -80,20 +64,16 @@ var EShapeBuffer = /** @class */ (function () {
|
|
|
80
64
|
var result = this._geometry;
|
|
81
65
|
if (result == null) {
|
|
82
66
|
this._vertexBuffer = new Buffer(this.vertices, false, false);
|
|
83
|
-
this._clippingBuffer = new Buffer(this.clippings, false, false);
|
|
84
67
|
this._stepBuffer = new Buffer(this.steps, false, false);
|
|
85
|
-
this.
|
|
86
|
-
this._colorStrokeBuffer = new Buffer(this.colorStrokes, false, false);
|
|
68
|
+
this._colorBuffer = new Buffer(this.colors, false, false);
|
|
87
69
|
this._uvBuffer = new Buffer(this.uvs, false, false);
|
|
88
70
|
this._indexBuffer = new Buffer(this.indices, false, true);
|
|
89
71
|
this._geometry = result = new Geometry()
|
|
90
72
|
.addIndex(this._indexBuffer)
|
|
91
73
|
.addAttribute("aPosition", this._vertexBuffer, 2)
|
|
92
|
-
.addAttribute("
|
|
93
|
-
.addAttribute("
|
|
94
|
-
.addAttribute("
|
|
95
|
-
.addAttribute("aColorFill", this._colorFillBuffer, 4)
|
|
96
|
-
.addAttribute("aColorStroke", this._colorStrokeBuffer, 4)
|
|
74
|
+
.addAttribute("aStepA", this._stepBuffer, 2)
|
|
75
|
+
.addAttribute("aStepB", this._stepBuffer, 4)
|
|
76
|
+
.addAttribute("aColor", this._colorBuffer, 3)
|
|
97
77
|
.addAttribute("aUv", this._uvBuffer, 2);
|
|
98
78
|
}
|
|
99
79
|
return result;
|