Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DefaultTheme

Default theme implementation of TypeDoc. If a theme does not provide a custom [[BaseTheme]] implementation, this theme class will be used.

Hierarchy

  • Theme
    • DefaultTheme

Index

Constructors

constructor

  • Create a new DefaultTheme instance.

    Parameters

    • renderer: Renderer

      The renderer this theme is attached to.

    • basePath: string

      The base path of this theme.

    Returns DefaultTheme

Properties

basePath

basePath: string

The base path of this theme.

componentName

componentName: string

The name of this component as set by the @Component decorator.

Private onRendererBegin

onRendererBegin: any

Triggered before the renderer starts rendering a project.

param

An event object describing the current render operation.

resources

resources: Resources

Static MAPPINGS

MAPPINGS: TemplateMapping[]

Mappings of reflections kinds to templates used by this theme.

Static URL_PREFIX

URL_PREFIX: RegExp

Accessors

Private _listenId

  • get _listenId(): any
  • A unique id that identifies this instance.

    Returns any

application

  • Return the application / root component instance.

    Returns Application

owner

  • get owner(): O
  • Return the owner of this component.

    Returns O

Methods

Protected bubble

  • Parameters

    • name: string | Event | EventMap
    • Rest ...args: any[]

    Returns DefaultTheme

getNavigation

  • Create a navigation structure for the given project.

    Parameters

    Returns NavigationItem

    The root navigation item.

getUrls

  • Map the models of the given project to the desired output files.

    Parameters

    Returns UrlMapping[]

    A list of UrlMapping instances defining which models should be rendered to which files.

Protected initialize

  • initialize(): void
  • Initialize this component.

    Returns void

isOutputDirectory

  • isOutputDirectory(path: string): boolean
  • Test whether the given path contains a documentation generated by this theme.

    Parameters

    • path: string

      The path of the directory that should be tested.

    Returns boolean

    TRUE if the given path seems to be a previous output directory, otherwise FALSE.

listenTo

  • Inversion-of-control versions of on. Tell this object to listen to an event in another object... keeping track of what it's listening to for easier unbinding later.

    Parameters

    • obj: EventDispatcher
    • name: string | EventMap
    • Optional callback: EventCallback
    • Optional priority: number

    Returns DefaultTheme

listenToOnce

  • Inversion-of-control versions of once.

    Parameters

    Returns DefaultTheme

  • Parameters

    • obj: EventDispatcher
    • name: string
    • callback: EventCallback
    • Optional priority: number

    Returns DefaultTheme

off

  • Remove one or many callbacks. If context is null, removes all callbacks with that function. If callback is null, removes all callbacks for the event. If name is null, removes all bound callbacks for all events.

    Returns DefaultTheme

  • Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns DefaultTheme

  • Parameters

    • name: string
    • Optional callback: EventCallback
    • Optional context: any

    Returns DefaultTheme

on

  • on(eventMap: EventMap, context?: any): DefaultTheme
  • on(eventMap: EventMap, callback?: EventCallback, context?: any, priority?: number): DefaultTheme
  • on(name: string, callback: EventCallback, context?: any, priority?: number): DefaultTheme
  • Bind an event to a callback function. Passing "all" will bind the callback to all events fired.

    Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns DefaultTheme

  • Parameters

    • eventMap: EventMap
    • Optional callback: EventCallback
    • Optional context: any
    • Optional priority: number

    Returns DefaultTheme

  • Parameters

    • name: string
    • callback: EventCallback
    • Optional context: any
    • Optional priority: number

    Returns DefaultTheme

once

  • once(eventMap: EventMap, context?: any): DefaultTheme
  • once(name: string, callback: EventCallback, context?: any, priority?: any): DefaultTheme
  • Bind an event to only be triggered a single time. After the first time the callback is invoked, its listener will be removed. If multiple events are passed in using the space-separated syntax, the handler will fire once for each event, not once for a combination of all events.

    Parameters

    • eventMap: EventMap
    • Optional context: any

    Returns DefaultTheme

  • Parameters

    • name: string
    • callback: EventCallback
    • Optional context: any
    • Optional priority: any

    Returns DefaultTheme

stopListening

  • Tell this object to stop listening to either specific events ... or to every object it's currently listening to.

    Parameters

    • Optional obj: EventDispatcher
    • Optional name: string | EventMap
    • Optional callback: EventCallback

    Returns DefaultTheme

trigger

  • Trigger one or many events, firing all bound callbacks. Callbacks are passed the same arguments as trigger is, apart from the event name (unless you're listening on "all", which will cause your callback to receive the true name of the event as the first argument).

    Parameters

    • name: string | Event | EventMap
    • Rest ...args: any[]

    Returns DefaultTheme

Static applyAnchorUrl

  • Generate an anchor url for the given reflection and all of its children.

    Parameters

    • reflection: Reflection

      The reflection an anchor url should be created for.

    • container: Reflection

      The nearest reflection having an own document.

    Returns void

Static applyGroupClasses

  • applyGroupClasses(group: ReflectionGroup): void
  • Generate the css classes for the given reflection group and apply them to the [[ReflectionGroup.cssClasses]] property.

    Parameters

    • group: ReflectionGroup

      The reflection group whose cssClasses property should be generated.

    Returns void

Static applyReflectionClasses

  • Generate the css classes for the given reflection and apply them to the DeclarationReflection.cssClasses property.

    Parameters

    Returns void

Static buildUrls

  • Build the url for the the given reflection and all of its children.

    Parameters

    Returns UrlMapping[]

    The altered urls array.

Static getMapping

  • Return the template mapping for the given reflection.

    Parameters

    Returns TemplateMapping

    The found mapping or undefined if no mapping could be found.

Static getUrl

  • Return a url for the given reflection.

    Parameters

    • reflection: Reflection

      The reflection the url should be generated for.

    • Optional relative: Reflection

      The parent reflection the url generation should stop on.

    • Optional separator: string

      The separator used to generate the url.

    Returns string

    The generated url.

Static toStyleClass

  • toStyleClass(str: string): string
  • Transform a space separated string into a string suitable to be used as a css class, e.g. "constructor method" > "Constructor-method".

    Parameters

    • str: string

    Returns string

Generated using TypeDoc