Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LayoutStateRef

The state object describes the information to visualize for an entire layout. Use this with care, as invalid usage will result in a panic.

Specifically, you should avoid doing the following:

  • Using out of bounds indices.
  • Using the wrong getter function on the wrong type of component.

Hierarchy

Index

Constructors

constructor

  • This constructor is an implementation detail. Do not use this.

    Parameters

    • ptr: number

    Returns LayoutStateRef

Properties

ptr

ptr: number

Methods

asJson

  • asJson(): any
  • Encodes the layout state as JSON. You can use this to visualize all of the components of a layout.

    Returns any

componentAsBlankSpace

  • Gets the Blank Space component state at the specified index.

    Parameters

    • index: number

    Returns BlankSpaceComponentStateRef

componentAsDetailedTimer

  • Gets the Detailed Timer component state at the specified index.

    Parameters

    • index: number

    Returns DetailedTimerComponentStateRef

componentAsGraph

  • Gets the Graph component state at the specified index.

    Parameters

    • index: number

    Returns GraphComponentStateRef

componentAsKeyValue

  • Gets the Key Value component state at the specified index.

    Parameters

    • index: number

    Returns KeyValueComponentStateRef

componentAsSeparator

  • Gets the Separator component state at the specified index.

    Parameters

    • index: number

    Returns SeparatorComponentStateRef

componentAsSplits

  • Gets the Splits component state at the specified index.

    Parameters

    • index: number

    Returns SplitsComponentStateRef

componentAsText

  • Gets the Text component state at the specified index.

    Parameters

    • index: number

    Returns TextComponentStateRef

componentAsTimer

  • Gets the Timer component state at the specified index.

    Parameters

    • index: number

    Returns TimerComponentStateRef

componentAsTitle

  • Gets the Title component state at the specified index.

    Parameters

    • index: number

    Returns TitleComponentStateRef

componentType

  • componentType(index: number): string
  • Returns a string describing the type of the Component at the specified index.

    Parameters

    • index: number

    Returns string

len

  • len(): number
  • Gets the number of Components in the Layout State.

    Returns number

Generated using TypeDoc