abstract class compilerDoc::DocRenderer
sys::Obj compilerDoc::DocRenderer
DocRenderer is base class for rendering a Doc. See writeDoc for rendering pipeline.
- doc
-
virtual Doc doc()Document to be renderered
- env
-
virtual DocEnv env()Environment with access to model, theme, linking, etc
- linkTo
-
DocLink linkTo(Doc target, Str? dis := null, Str? frag := null)Create a DocLink from this renderer doc to the target document.
- make
-
new make(DocEnv env, WebOutStream out, Doc doc)All subclasses must implement ctor with env, out, doc params.
- out
-
virtual WebOutStream out()HTML output stream
- resolveFandocLink
-
virtual DocLink? resolveFandocLink(Link elem, Bool checked := true)Hook used to map a fandoc link to a doc link
- theme
-
virtual DocTheme theme()Theme to use for rendering chrome and navigation. This field is initialized from
DocEnv.theme. - writeContent
-
abstract Void writeContent()Subclass hook to render document specific content. See
writeDocfor rendering pipeline. - writeDoc
-
virtual Void writeDoc()Render the
doc. This method delegates to: - writeFandoc
-
virtual Void writeFandoc(DocFandoc doc)Write the given fandoc string as HTML. This method delegates to
DocEnv.linkandDocEnv.linkUrito resolve links from the current document. - writeLink
-
virtual Void writeLink(DocLink link)Write an
<a>element for the given link from this renderer document to another document. SeeDocEnv.linkUri. - writeLinkTo
-
virtual Void writeLinkTo(Doc target, Str? dis := null, Str? frag := null)Convenience for
writeLink(linkTo(target, dis, frag))