Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface describing a widget table of contents generator.

Type parameters

  • W: Widget = Widget

Hierarchy

  • IGenerator

Index

Properties

Optional collapseChanged

collapseChanged: ISignal<IOptionsManager, ICollapseChangedArgs>

Signal to indicate that a collapse event happened to this heading within the ToC.

Optional isEnabled

isEnabled: (widget: W) => boolean

Type declaration

    • (widget: W): boolean
    • Returns a boolean indicating whether we can generate a ToC for a widget.

      Notes

      • By default, we assume ToC generation is enabled if the widget is hosted in tracker.
      • However, a user may want to add additional checks (e.g., only generate a ToC for text files only if they have a given MIME type).

      Parameters

      • widget: W

        widget

      Returns boolean

      boolean indicating whether we can generate a ToC for a widget

Optional itemRenderer

itemRenderer: (item: IHeading, toc: INotebookHeading[]) => Element

Type declaration

Optional options

Options manager.

default

undefined

Optional toolbarGenerator

toolbarGenerator: () => any

Type declaration

    • (): any
    • Returns a toolbar component.

      Notes

      • If not present, no toolbar is generated.

      Returns any

      toolbar component

tracker

tracker: IWidgetTracker<W>

Widget instance tracker.

Optional usesLatex

usesLatex: boolean

Boolean indicating whether a document uses LaTeX typesetting.

default

false

Methods

generate

  • Returns a list of headings.

    Parameters

    Returns IHeading[]

    list of headings

Generated using TypeDoc