abstract class compilerDoc::DocRenderer

sys::Obj
  compilerDoc::DocRenderer

Source

DocRenderer is base class for rendering a Doc. See writeDoc for rendering pipeline.

doc

virtual Doc doc()

Source

Document to be renderered

env

virtual DocEnv env()

Source

Environment with access to model, theme, linking, etc

linkTo

DocLink linkTo(Doc target, Str? dis := null, Str? frag := null)

Source

Create a DocLink from this renderer doc to the target document.

make

new make(DocEnv env, WebOutStream out, Doc doc)

Source

All subclasses must implement ctor with env, out, doc params.

out

virtual WebOutStream out()

Source

HTML output stream

virtual DocLink? resolveFandocLink(Link elem, Bool checked := true)

Source

Hook used to map a fandoc link to a doc link

theme

virtual DocTheme theme()

Source

Theme to use for rendering chrome and navigation. This field is initialized from DocEnv.theme.

writeContent

abstract Void writeContent()

Source

Subclass hook to render document specific content. See writeDoc for rendering pipeline.

writeDoc

virtual Void writeDoc()

Source

Render the doc. This method delegates to:

  1. DocTheme.writeStart
  2. DocTheme.writeBreadcrumb
  3. writeContent
  4. DocTheme.writeEnd
writeFandoc

virtual Void writeFandoc(DocFandoc doc)

Source

Write the given fandoc string as HTML. This method delegates to DocEnv.link and DocEnv.linkUri to resolve links from the current document.

virtual Void writeLink(DocLink link)

Source

Write an <a> element for the given link from this renderer document to another document. See DocEnv.linkUri.

writeLinkTo

virtual Void writeLinkTo(Doc target, Str? dis := null, Str? frag := null)

Source

Convenience for writeLink(linkTo(target, dis, frag))