SheetXL - v0.3.20
    Preparing search index...

    Interface IThemeCollection

    A collection of themes.

    interface IThemeCollection {
        getDefaultTheme: () => ITheme;
        setDefaultTheme: (theme: ITheme) => ITheme;
        deleteCustomTheme(theme: string | ITheme): ITheme;
        getByName(name: string): ITheme;
        getCount(): number;
        search(options?: SearchOptions): ITheme[];
        setCustomTheme(theme: ITheme): ITheme;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    getDefaultTheme: () => ITheme

    Returns the name of the default Theme.

    Type declaration

    setDefaultTheme: (theme: ITheme) => ITheme

    Set the new default theme.

    Type declaration

    Methods

    • Remove a custom theme.

      Parameters

      Returns ITheme

      true if the Theme was removed.

    • Returns the theme for the given name.

      Parameters

      • name: string

      Returns ITheme

      Will try to return:

      1. The custom theme for the name
      2. The builtin theme for the name.
      3. nul if it doesn't exist.
    • Returns the total items available.

      Returns number

      Useful as a quick escape for search.

    • Returns all themes that match the search criteria.

      Parameters

      • Optionaloptions: SearchOptions

        IThemeCollection.SearchOptions

      Returns ITheme[]

      • If no search criteria is provided, all items will be returned.
      • Generates a new array so this can be mutated without affecting the internal state.
    • Add or update a theme.

      Parameters

      Returns ITheme

      The original theme

      Case insensitive; for duplicate detection purposes.