GH_HtmlWriter

public class GH_HtmlWriter
General purpose HTML writer.

Constructors

GH_HtmlWriter

#
public GH_HtmlWriter()

GH_HtmlWriter

#
public GH_HtmlWriter(params GH_CssStyle[] cssStyles)
cssStyles (params GH_CssStyle[])

Properties

CssStyleSheet

#
public GH_CssStyleSheet CssStyleSheet { get; }
Gets the internal Css style sheet data.

Title

#
public string Title { get; set; }
Gets or sets the HTML document title.

Methods

ComposeHTMLDocument

#
public string ComposeHTMLDocument(params GH_CssStyle[] cssBodyStyles)
Compose a complete html document based on the current Title, CSS style sheet and html body content.
cssBodyStyles (params GH_CssStyle[])CSS styles to apply to the Body tag.
A string representing the full html document.

ComposeHTMLDocument

#
public string ComposeHTMLDocument(params string[] cssBodyStyles)
Compose a complete html document based on the current Title, CSS style sheet and html body content.
cssBodyStyles (params string[])CSS styles to apply to the Body tag.
A string representing the full html document.

ToString

#
public override string ToString()
Object.ToString

WriteBlankSpace

#
public void WriteBlankSpace(int height)
Write a blank space.
height (int)Height (in pixels) of blank space.

WriteComment

#
public void WriteComment(string comment)
Write a new comment to the Html document.
comment (string)

WriteDivEnd

#
public void WriteDivEnd()
Write the end of a Div block.

WriteDivStart

#
public void WriteDivStart()
Write the start of a Div block.

WriteDivStart

#
public void WriteDivStart(params GH_CssStyle[] cssClasses)
Write the start of a Div block.
cssClasses (params GH_CssStyle[])CSS styles to apply to this tag.

WriteDivStart

#
public void WriteDivStart(params string[] cssClasses)
Write the start of a Div block.
cssClasses (params string[])CSS style names to apply to this tag. These styles must be part of the document style sheet before the final Html is composed.

WriteHorizontalGradient

#
public void WriteHorizontalGradient(Color top, Color bottom, int steps, int stepHeight)
Write a collection of horizontal div blocks with a gradient colour.
top (Color)Colour for topmost section.
bottom (Color)Colour for bottommost section.
steps (int)Number of gradient steps.
stepHeight (int)Height (in pixels) for each step.

WriteHorizontalRule

#
public void WriteHorizontalRule()
Write a horizontal rule into the Html document.

WriteHorizontalRule

#
public void WriteHorizontalRule(params GH_CssStyle[] cssClasses)
Write a horizontal rule into the Html document.
cssClasses (params GH_CssStyle[])CSS styles to apply to this tag.

WriteHorizontalRule

#
public void WriteHorizontalRule(params string[] cssClasses)
Write a horizontal rule into the Html document.
cssClasses (params string[])CSS style names to apply to this tag. These styles must be part of the document style sheet before the final Html is composed.

WriteLineBreak

#
public void WriteLineBreak()
Write a line break into the Html document. Ideally you should achieve formatting using div tags, not line breaks.

WriteListEnd

#
public void WriteListEnd()
Write the end of a List section.

WriteListItem

#
public void WriteListItem(string itemContent, params GH_CssStyle[] cssClasses)
itemContent (string)
cssClasses (params GH_CssStyle[])

WriteListItem

#
public void WriteListItem(string itemContent, params string[] cssClasses)
itemContent (string)
cssClasses (params string[])

WriteListItem

#
public void WriteListItem(string itemContent)
Write a complete list item.
itemContent (string)Item content.

WriteListItemEnd

#
public void WriteListItemEnd()
Write the end of a list item element.

WriteListItemStart

#
public void WriteListItemStart()
Write the start of a list item element.

WriteListItemStart

#
public void WriteListItemStart(params GH_CssStyle[] cssClasses)
Write the start of a list item element.
cssClasses (params GH_CssStyle[])CSS styles to apply to this tag.

WriteListItemStart

#
public void WriteListItemStart(params string[] cssClasses)
Write the start of a list item element.
cssClasses (params string[])CSS style names to apply to this tag. These styles must be part of the document style sheet before the final Html is composed.

WriteOrderedListStart

#
public void WriteOrderedListStart(int start, params GH_CssStyle[] cssClasses)
Write the start an unordered list section.
start (int)First number in list.
cssClasses (params GH_CssStyle[])CSS styles to apply to this tag.

WriteOrderedListStart

#
public void WriteOrderedListStart(int start, params string[] cssClasses)
Write the start an unordered list section.
start (int)First number in list.
cssClasses (params string[])CSS style names to apply to this tag. These styles must be part of the document style sheet before the final Html is composed.

WriteOrderedListStart

#
public void WriteOrderedListStart(int start)
Write the start an unordered list section.
start (int)First number in list.

WritePreEnd

#
public void WritePreEnd()
Write the end of a Preformatted text block.

WritePreStart

#
public void WritePreStart()
Write the start of a Preformatted text block.

WritePreStart

#
public void WritePreStart(params GH_CssStyle[] cssClasses)
Write the start of a Preformatted text block.
cssClasses (params GH_CssStyle[])CSS styles to apply to this tag.

WritePreStart

#
public void WritePreStart(params string[] cssClasses)
Write the start of a Preformatted text block.
cssClasses (params string[])CSS style names to apply to this tag. These styles must be part of the document style sheet before the final Html is composed.

WriteSpanEnd

#
public void WriteSpanEnd()
Write the end of a Span section.

WriteSpanStart

#
public void WriteSpanStart()
Write the start of a Span section.

WriteSpanStart

#
public void WriteSpanStart(params GH_CssStyle[] cssClasses)
Write the start of a Span section.
cssClasses (params GH_CssStyle[])CSS styles to apply to this tag.

WriteSpanStart

#
public void WriteSpanStart(params string[] cssClasses)
Write the start of a Span section.
cssClasses (params string[])CSS style names to apply to this tag. These styles must be part of the document style sheet before the final Html is composed.

WriteText

#
public void WriteText(string text, GH_HtmlTextProperties properties)
Write a section of text to the Html document.
text (string)Text to write.
properties (GH_HtmlTextProperties)Standard Html formatting tag.

WriteText

#
public void WriteText(string text, params GH_CssStyle[] cssClasses)
Write a section of text to the Html document.
text (string)Text to write.
cssClasses (params GH_CssStyle[])CSS styles to apply to this tag.

WriteText

#
public void WriteText(string text, params string[] cssClasses)
Write a section of text to the Html document.
text (string)Text to write.
cssClasses (params string[])CSS style names to apply to this tag. These styles must be part of the document style sheet before the final Html is composed.

WriteText

#
public void WriteText(string text)
Write a section of text to the Html document.
text (string)Text to write.

WriteUnorderedListStart

#
public void WriteUnorderedListStart()
Write the start an unordered list section.

WriteUnorderedListStart

#
public void WriteUnorderedListStart(params GH_CssStyle[] cssClasses)
Write the start an unordered list section.
cssClasses (params GH_CssStyle[])CSS styles to apply to this tag.

WriteUnorderedListStart

#
public void WriteUnorderedListStart(params string[] cssClasses)
Write the start an unordered list section.
cssClasses (params string[])CSS style names to apply to this tag. These styles must be part of the document style sheet before the final Html is composed.