Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SettingValue

Describes a setting's value. Such a value can be of a variety of different types.

Hierarchy

Index

Constructors

constructor

Properties

ptr

ptr: number

Methods

dispose

  • dispose(): void
  • Disposes the object, allowing it to clean up all of its memory. You need to call this for every object that you don't use anymore and hasn't already been disposed.

    Returns void

with

  • with<T>(closure: function): T
  • Allows for scoped usage of the object. The object is guaranteed to get disposed once this function returns. You are free to dispose the object early yourself anywhere within the scope. The scope's return value gets carried to the outside of this function.

    Type parameters

    • T

    Parameters

    Returns T

Static fromAccuracy

  • Creates a new setting value from an accuracy name. If it doesn't match a known accuracy, null is returned.

    Parameters

    • value: string

    Returns SettingValue | null

Static fromAlignment

  • Creates a new setting value from the alignment name provided. If it doesn't match a known alignment, null is returned.

    Parameters

    • value: string

    Returns SettingValue | null

Static fromBool

  • Creates a new setting value from a boolean value.

    Parameters

    • value: boolean

    Returns SettingValue

Static fromColor

  • fromColor(r: number, g: number, b: number, a: number): SettingValue
  • Creates a new setting value from the color provided as RGBA.

    Parameters

    • r: number
    • g: number
    • b: number
    • a: number

    Returns SettingValue

Static fromDigitsFormat

  • Creates a new setting value from a digits format name. If it doesn't match a known digits format, null is returned.

    Parameters

    • value: string

    Returns SettingValue | null

Static fromFloat

  • Creates a new setting value from a floating point number.

    Parameters

    • value: number

    Returns SettingValue

Static fromHorizontalGradient

  • fromHorizontalGradient(r1: number, g1: number, b1: number, a1: number, r2: number, g2: number, b2: number, a2: number): SettingValue
  • Creates a new setting value from the horizontal gradient provided as two RGBA colors.

    Parameters

    • r1: number
    • g1: number
    • b1: number
    • a1: number
    • r2: number
    • g2: number
    • b2: number
    • a2: number

    Returns SettingValue

Static fromInt

  • Creates a new setting value from a signed integer.

    Parameters

    • value: number

    Returns SettingValue

Static fromOptionalColor

  • fromOptionalColor(r: number, g: number, b: number, a: number): SettingValue
  • Creates a new setting value from the color provided as RGBA with the type optional color.

    Parameters

    • r: number
    • g: number
    • b: number
    • a: number

    Returns SettingValue

Static fromOptionalEmptyColor

  • Creates a new empty setting value with the type optional color.

    Returns SettingValue

Static fromOptionalEmptyString

  • Creates a new empty setting value that has the type optional string.

    Returns SettingValue

Static fromOptionalEmptyTimingMethod

  • Creates a new empty setting value with the type optional timing method.

    Returns SettingValue

Static fromOptionalString

  • Creates a new setting value from a string that has the type optional string.

    Parameters

    • value: string

    Returns SettingValue

Static fromOptionalTimingMethod

  • fromOptionalTimingMethod(value: string): SettingValue | null
  • Creates a new setting value from a timing method name with the type optional timing method. If it doesn't match a known timing method, null is returned.

    Parameters

    • value: string

    Returns SettingValue | null

Static fromString

  • Creates a new setting value from a string.

    Parameters

    • value: string

    Returns SettingValue

Static fromTransparentGradient

  • Creates a new setting value that is a transparent gradient.

    Returns SettingValue

Static fromUint

  • Creates a new setting value from an unsigned integer.

    Parameters

    • value: number

    Returns SettingValue

Static fromVerticalGradient

  • fromVerticalGradient(r1: number, g1: number, b1: number, a1: number, r2: number, g2: number, b2: number, a2: number): SettingValue
  • Creates a new setting value from the vertical gradient provided as two RGBA colors.

    Parameters

    • r1: number
    • g1: number
    • b1: number
    • a1: number
    • r2: number
    • g2: number
    • b2: number
    • a2: number

    Returns SettingValue

Generated using TypeDoc