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

asJson

  • asJson(): any
  • Encodes this Setting Value's state as JSON.

    Returns any

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

  • 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

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

Static fromAlternatingGradient

  • fromAlternatingGradient(r1: number, g1: number, b1: number, a1: number, r2: number, g2: number, b2: number, a2: number): SettingValue
  • Creates a new setting value from the alternating 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 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 fromColumnStartWith

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

    Parameters

    • value: string

    Returns SettingValue

Static fromColumnUpdateTrigger

  • Creates a new setting value from the column update trigger. If it doesn't match a known column update trigger, null is returned.

    Parameters

    • value: string

    Returns SettingValue

Static fromColumnUpdateWith

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

    Parameters

    • value: string

    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

Static fromEmptyFont

  • Creates a new empty setting value with the type font.

    Returns SettingValue

Static fromFont

  • fromFont(family: string, style: string, weight: string, stretch: string): SettingValue
  • Creates a new setting value with the type font.

    Parameters

    • family: string
    • style: string
    • weight: string
    • stretch: string

    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 fromLayoutDirection

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

    Parameters

    • value: string

    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

  • 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

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