Constructor
The widget to search in
Optionalconfiguration: TableOfContents.IConfigDefault model configuration
ReadonlystateA signal emitted when any model state changes.
ProtectedwidgetThe widget to search in
Signal emitted when the active heading changes.
Signal emitted when a table of content section collapse state changes.
Model configuration
Signal emitted when the headings changes.
Whether the model is active or not.
An active model means it is displayed in the table of contents. This can be used by subclass to limit updating the headings.
Whether the model needs to be kept up to date or not.
This is set to true if the ToC panel is visible and
to false if it is hidden. But some models may require
to be always active; e.g. to add numbering in the document.
ProtectedisTest whether the model is disposed.
List of configuration options supported by the model.
Document title
Document title
ProtectedgetProduce the headings for a document.
The list of new headings or null if nothing needs to be updated.
ProtectedisTest if two headings are equal or not.
First heading
Second heading
Whether the headings are equal.
Set a new active heading.
The new active heading
OptionalemitSignal: booleanWhether to emit the activeHeadingChanged signal or not.
Model configuration setter.
New configuration
Callback on heading collapse.
Optionalcollapsed?: booleanThe new collapsed status (toggle existing status if not provided)
Optionalheading?: IEditorHeadingThe heading to change state (all headings if not provided)
Table of content model for Markdown files.