class documentation

class TocTree: (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method get_toc_for Return a TOC nodetree -- for use on the same page only!
Method get_toctree_ancestors Undocumented
Method get_toctree_for Return the global TOC nodetree.
Method note Note a TOC tree directive in a document and gather information about file relations from it.
Method resolve Resolve a *toctree* node into individual bullet lists with titles as items, returning None (if no containing titles are found) or a new node.
Type Variable ET Undocumented
Instance Variable env Undocumented
Method _toctree_copy Utility: Cut and deep-copy a TOC at a specified depth.
def __init__(self, env): (source)

Undocumented

Parameters
env:BuildEnvironmentUndocumented
def get_toc_for(self, docname, builder): (source)

Return a TOC nodetree -- for use on the same page only!

Parameters
docname:strUndocumented
builder:BuilderUndocumented
Returns
NodeUndocumented
def get_toctree_ancestors(self, docname): (source)

Undocumented

Parameters
docname:strUndocumented
Returns
list[str]Undocumented
def get_toctree_for(self, docname, builder, collapse, **kwargs): (source)

Return the global TOC nodetree.

Parameters
docname:strUndocumented
builder:BuilderUndocumented
collapse:boolUndocumented
**kwargs:AnyUndocumented
Returns
Element|NoneUndocumented
def note(self, docname, toctreenode): (source)

Note a TOC tree directive in a document and gather information about file relations from it.

Parameters
docname:strUndocumented
toctreenode:addnodes.toctreeUndocumented
def resolve(self, docname, builder, toctree, prune=True, maxdepth=0, titles_only=False, collapse=False, includehidden=False): (source)

Resolve a *toctree* node into individual bullet lists with titles as items, returning None (if no containing titles are found) or a new node. If *prune* is True, the tree is pruned to *maxdepth*, or if that is 0, to the value of the *maxdepth* option on the *toctree* node. If *titles_only* is True, only toplevel document titles will be in the resulting tree. If *collapse* is True, all branches not containing docname will be collapsed.

Parameters
docname:strUndocumented
builder:BuilderUndocumented
toctree:addnodes.toctreeUndocumented
prune:boolUndocumented
maxdepth:intUndocumented
titles_only:boolUndocumented
collapse:boolUndocumented
includehidden:boolUndocumented
Returns
Element|NoneUndocumented

Undocumented

Value
TypeVar('ET',
        bound=Element)

Undocumented

def _toctree_copy(self, node, depth, maxdepth, collapse): (source)

Utility: Cut and deep-copy a TOC at a specified depth.

Parameters
node:ETUndocumented
depth:intUndocumented
maxdepth:intUndocumented
collapse:boolUndocumented
Returns
ETUndocumented