Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IThemeManager

An interface for a theme manager.

Hierarchy

  • IThemeManager

Index

Properties

Readonly theme

theme: string | null

Get the name of the current theme.

Readonly themeChanged

themeChanged: ISignal<this, IChangedArgs<string, string | null>>

A signal fired when the application theme changes.

Readonly themes

themes: ReadonlyArray<string>

The names of the registered themes.

Methods

getDisplayName

  • getDisplayName(name: string): string
  • Get display name for theme.

    Parameters

    • name: string

    Returns string

isLight

  • isLight(name: string): boolean
  • Test whether a given theme is light.

    Parameters

    • name: string

    Returns boolean

loadCSS

  • loadCSS(path: string): Promise<void>
  • Load a theme CSS file by path.

    Parameters

    • path: string

      The path of the file to load.

    Returns Promise<void>

register

  • register(theme: ITheme): IDisposable
  • Register a theme with the theme manager.

    Parameters

    • theme: ITheme

      The theme to register.

    Returns IDisposable

    A disposable that can be used to unregister the theme.

setTheme

  • setTheme(name: string): Promise<void>
  • Set the current theme.

    Parameters

    • name: string

    Returns Promise<void>

themeScrollbars

  • themeScrollbars(name: string): boolean
  • Test whether a given theme styles scrollbars, and if the user has scrollbar styling enabled.

    Parameters

    • name: string

    Returns boolean

Generated using TypeDoc