| IGLib 1.6.0 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | Private Member Functions | Private Attributes | List of all members
IG.Lib.HtmlWriter Class Reference

Generates and composes a HTML document. More...

Inheritance diagram for IG.Lib.HtmlWriter:
[legend]
Collaboration diagram for IG.Lib.HtmlWriter:
[legend]

## Public Member Functions
| HtmlWriter (string filePath)
| Creates a new HTML generator and connests it with the specified file. More...
| HtmlWriter (string filePath, string cssPath)
| Creates a new HTML generator and connests it with the specified file. More...
string | GetIndent ()
| Returns indentation string for the current indentation level. More...
int | GetIndentLevel ()
| Returns current indentation level of the document. More...
void | AddDocumentComment (string commentText)
| Adds another commet to the document that will be written in the document head. More...
string[] | GetDocumentComments ()
| Returns an array of comments of the document that will be written in the document head. More...
void | AddSingleKeyWord (string keyword)
| Adds a keyword to the document (keywords are written as meta tag). More...
void | AddKeywords (params string[] keywords)
| Adds the specified keywords to the document (keywords are written as meta tag). More...
string[] | GetKeywords ()
| Returns an array of current keywords on the document. More...
void | CloseWriter ()
| Closes the text writer used for assembling the HTML document. More...
void | BeginDocument ()
| Begins the HTML document. More...
void | EndDocument ()
| Ends the HTML document. After this method is called, writing is not possible any more. More...
void | AppendPlainText (string text)
| Adds plain text to HTML (without any markup, indentation or newlines, unless contained in the text string). More...
void | AddPlainTextLine (string text)
| Adds a line of plain text to HTML (without any markup, unless contained in the text string), indented and with newline fillowed. More...
void | BeginTag (string tagName)
| Adds the specified tag to the document. More...
void | BeginTag (string tagName, params string[] attributeNameValuePairs)
| Adds the specified tag to the document. More...
void | BeginTagWithText (string tagName, string text)
| Adds the specified tag containing the specified text to the document. More...
void | BeginTagWithText (string tagName, string text, params string[] attributeNameValuePairs)
| Adds the specified tag containing the specified text to the document. More...
void | EndTag (string tagName)
| Adds the specified tag containing the specified text to the document. More...
void | BeginSection (params string[] attributeNameValuePairs)
| Begins a new section. More...
void | EndSection ()
| Ends a section. More...
void | AddNewLine ()
| Adds a newline to HTML. More...
void | AppendAttributes (string[] attributeNameValuePairs)
| Writes definition of the specified attriutes of a HTML element to the HTML document. More...
void | AddTag (string tagName, string text, bool withLineBreak)
| Adds the specified tag containing the specified text to the document. More...
void | AddTag (string tagName, string text)
| Adds the specified tag containing the specified text to the document. More...
void | AddTag (string tagName, string text, params string[] attributeNameValuePairs)
| Adds the specified tag containing the specified text to the document. More...
void | AddTag (string tagName, string text, bool withLineBreak, params string[] attributeNameValuePairs)
| Adds the specified tag containing the specified text to the document. More...
void | AddParagraph (string paragraphText, string[] attributeNameValuePairs)
| Adds a new paragraph with the specified text to the HTML document. More...
void | AddParagraph (string paragraphText)
| Adds a new paragraph with the specified text to the HTML document. More...
void | AddHeading1 (string headingText, params string[] attributeNameValuePairs)
| Adds a new level 1 heading with the specified text to the HTML document. More...
void | AddHeading1 (string headingText)
| Adds a new level 1 heading with the specified text to the HTML document. More...
void | AddHeading2 (string headingText, params string[] attributeNameValuePairs)
| Adds a new level 2 heading with the specified text to the HTML document. More...
void | AddHeading2 (string headingText)
| Adds a new level 2 heading with the specified text to the HTML document. More...
void | AddHeading3 (string headingText, params string[] attributeNameValuePairs)
| Adds a new level 3 heading with the specified text to the HTML document. More...
void | AddHeading3 (string headingText)
| Adds a new level 3 heading with the specified text to the HTML document. More...
void | AddHeading4 (string headingText, params string[] attributeNameValuePairs)
| Adds a new level 4 heading with the specified text to the HTML document. More...
void | AddHeading4 (string headingText)
| Adds a new level 4 heading with the specified text to the HTML document. More...
void | AddImage (string imageLink, string altText, string captionText, int width, int height, int originalWidth, int originalHeight, bool constrainRatio)
| Adds a linked image to the HTML document with specified custom size different than the original size. More...
void | AddImage (string imageLink, string altText, string captionText, int width, int height, bool defineSize)
| Adds a linked image to the HTML document. More...
void | Dispose ()
| Implementation of IDisposable interface. More...

## Static Public Member Functions
static void | Example (string htmlDocumentPath, string styleSheetPath, string imagePath1, string imagePath2)
| Writes an example HTML document. More...

## Public Attributes
int | IndentSpaces = 2
| Number of spaces used in each level of indentation) More...
string | ImageCaption = "Figure"

## Protected Member Functions
string | GetIndent (int level)
| Returns indentation string for the specified indentation level. More...
virtual void | WriteDocumentTitle ()
| Adds the title meta tag to the document. More...
virtual void | WriteDocumentStyle ()
| Adds the style tag to the document. More...
virtual void | WriteCssPath ()
virtual void | WriteDocumentComments ()
| Writes document comments. More...
virtual void | WriteMetaTagGeneral (params string[] attributeNameValuePairs)
| Wirtes the meta tag with specified pairs of field names and corresponding values. More...
virtual void | WriteMetaContent ()
| Adds a contenbt meta tag. More...
virtual void | WriteMetaTag (string name, string content)
| Adds a meta tag with specified values of the name and content fields. More...
virtual void | WriteMetaAuthor ()
| Writes the author meta tag to the document. More...
virtual void | WriteMetaDescription ()
| Adds the audescription meta tag to the document. More...
virtual void | WriteMetaKeywords ()
| Adds the keywords meta tag to the document. More...
bool | IsAttributesDefined (string[] attributeNameValuePairs)
| Returns true if the specified array of attribute name-value pairs defines any attributes, false otherwise. More...
void | AddImageCaption (string captionText)
| Adds Image caption to the current HTML document. More...
virtual void | Dispose (bool disposing)
| Does the job of freeing resources. More...

## Protected Attributes
bool | _headWritten = false
bool | _tailWritten = false
string | _filePath
int | IndentLevel = 0
| Current level of indentation. More...
string | _cssPath
string | _styleString
string | _documentTitle = "Generated HTML Document"
string | _documentAuthor = "IGLIb (by Igor Gresovnik)"
string | _documentDescription = "This document was programatically generated by IGLib (Investigative Generic Library), http://www2.arnes.si/~ljc3m2/igor/iglib/"
List< string > | _documentComments
List< string > | _keywords
TextWriter | _writer
bool | _lockBeginDocument = false

## Properties
string | ConstAttributeClass`[get]`
| The class attribute. Specifies one or more classnames for an element (refers to a class in a style sheet). More...
string | ConstAttributeId`[get]`
| The id attribute. Specifies a unique id for an element. More...
string | ConstAttributeStyle`[get]`
| The style attribute. Specifies an inline CSS style for an element. More...
string | ConstAttributeTitle`[get]`
| The style attribute. Specifies extra information about an element. More...
string | ConstAttributeTextDirection`[get]`
| The text direction attribute. Specifies text direction for the content in an element. More...
string | ConstAttributeLanguage`[get]`
| The language attribute. Specifies the language of the element's content. More...
string | ConstAttributeLanguageXml`[get]`
| The xml language attribute. Specifies the language of the element's content (for XHTML documents). More...
string | ConstAttributeShortcutKey`[get]`
| The shortcut key attribute. Specifies a shortcut key to activate/focus an element. More...
string | ConstAttributeTabIndex`[get]`
| The tab index attribute. Specifies the tabbing order of an element. More...
string | FilePath`[get, protected set]`
| Path to file containing the generator. More...
string | CssPath`[get, set]`
| Path to the associated CSS file (Cascaded Style Sheets). More...
string | DocumentStyle`[get, set]`
| CSS string with internal style definitions. More...
virtual string | DocumentTitle`[get, set]`
virtual string | DocumentAuthor`[get, set]`
virtual string | DocumentDescription`[get, set]`
TextWriter | Writer`[get]`
| Text writer used for writing on the document. More...

## Private Member Functions
| HtmlWriter ()
| Prevent argument-less constructor. More...
| ~HtmlWriter ()

## Private Attributes
int | _sectionLevel = 0
int | _imageNum = 0
bool | disposed = false

## Detailed Description

Generates and composes a HTML document.

Each object of this class can be used for generation of only one HTML document.

$A Igor xx Feb12;

## Constructor & Destructor Documentation

IG.Lib.HtmlWriter.HtmlWriter | ( |  | ) |
| inline private

Prevent argument-less constructor.

IG.Lib.HtmlWriter.HtmlWriter | ( | string | filePath | ) |
| inline

Creates a new HTML generator and connests it with the specified file.

Parameters

  inputFilePath | Path to the HTML file that is created.

IG.Lib.HtmlWriter.HtmlWriter | ( | string | filePath,
|  | string | cssPath
| ) |  |
| inline

Creates a new HTML generator and connests it with the specified file.

Parameters

  inputFilePath | Path to the HTML file that is created.
  cssPath | Path (usually relative) to the CSS (Cascading Style Sheets) file.

IG.Lib.HtmlWriter.~HtmlWriter | ( |  | ) |
| inline private

## Member Function Documentation

string IG.Lib.HtmlWriter.GetIndent | ( | int | level | ) |
| inline protected

Returns indentation string for the specified indentation level.

Parameters

  level | Level of indentation for which indentation string is returned.

string IG.Lib.HtmlWriter.GetIndent | ( |  | ) |
| inline

Returns indentation string for the current indentation level.

Level is increased or decreased automatically with respect to what is done with the document.

int IG.Lib.HtmlWriter.GetIndentLevel | ( |  | ) |
| inline

Returns current indentation level of the document.

void IG.Lib.HtmlWriter.AddDocumentComment | ( | string | commentText | ) |
| inline

Adds another commet to the document that will be written in the document head.

Must be called before the document head is written, otherwise the comment will not be written.

Parameters

  commentText | Text of the comment to be added.

string [] IG.Lib.HtmlWriter.GetDocumentComments | ( |  | ) |
| inline

Returns an array of comments of the document that will be written in the document head.

void IG.Lib.HtmlWriter.AddSingleKeyWord | ( | string | keyword | ) |
| inline

Adds a keyword to the document (keywords are written as meta tag).

Must be called before the document head is written, otherwise the keyword will not be written.

Parameters

  keyword | Keyword to be added to the document.

void IG.Lib.HtmlWriter.AddKeywords | ( | params string[] | keywords | ) |
| inline

Adds the specified keywords to the document (keywords are written as meta tag).

Must be called before the document head is written, otherwise the keyword will not be written.

Parameters

  keywords | Keywords to be added.

Referenced by IG.Lib.HtmlWriter.Example().

string [] IG.Lib.HtmlWriter.GetKeywords | ( |  | ) |
| inline

Returns an array of current keywords on the document.

void IG.Lib.HtmlWriter.CloseWriter | ( |  | ) |
| inline

Closes the text writer used for assembling the HTML document.

Referenced by IG.Lib.HtmlWriter.Example().

virtual void IG.Lib.HtmlWriter.WriteDocumentTitle | ( |  | ) |
| inline protected virtual

Adds the title meta tag to the document.

Must be called within the method for writing document head.

virtual void IG.Lib.HtmlWriter.WriteDocumentStyle | ( |  | ) |
| inline protected virtual

Adds the style tag to the document.

Must be called within the method for writing document head.

virtual void IG.Lib.HtmlWriter.WriteCssPath | ( |  | ) |
| inline protected virtual

virtual void IG.Lib.HtmlWriter.WriteDocumentComments | ( |  | ) |
| inline protected virtual

Writes document comments.

Must be called within the method for writing document head.

virtual void IG.Lib.HtmlWriter.WriteMetaTagGeneral | ( | params string[] | attributeNameValuePairs | ) |
| inline protected virtual

Wirtes the meta tag with specified pairs of field names and corresponding values.

Must be called within the method for writing document head.

<

Parameters

  attributeNameValuePairs | Pairs of attribute names and values that will comprise the meta tag.

virtual void IG.Lib.HtmlWriter.WriteMetaContent | ( |  | ) |
| inline protected virtual

Adds a contenbt meta tag.

Must be called within the method for writing document head.

virtual void IG.Lib.HtmlWriter.WriteMetaTag | ( | string | name,
|  | string | content
| ) |  |
| inline protected virtual

Adds a meta tag with specified values of the name and content fields.

Must be called within the method for writing document head.

Parameters

  name | Name of the meta tag.
  content | Content of the meta tag.

virtual void IG.Lib.HtmlWriter.WriteMetaAuthor | ( |  | ) |
| inline protected virtual

Writes the author meta tag to the document.

Must be called within the method for writing document head.

virtual void IG.Lib.HtmlWriter.WriteMetaDescription | ( |  | ) |
| inline protected virtual

Adds the audescription meta tag to the document.

Must be called within the method for writing document head.

virtual void IG.Lib.HtmlWriter.WriteMetaKeywords | ( |  | ) |
| inline protected virtual

Adds the keywords meta tag to the document.

Must be called within the method for writing document head.

void IG.Lib.HtmlWriter.BeginDocument | ( |  | ) |
| inline

Begins the HTML document.

Adds HTML head if necessary.

void IG.Lib.HtmlWriter.EndDocument | ( |  | ) |
| inline

Ends the HTML document. After this method is called, writing is not possible any more.

Referenced by IG.Lib.HtmlWriter.Example().

void IG.Lib.HtmlWriter.AppendPlainText | ( | string | text | ) |
| inline

Adds plain text to HTML (without any markup, indentation or newlines, unless contained in the text string).

Parameters

  text | Text to be added.

void IG.Lib.HtmlWriter.AddPlainTextLine | ( | string | text | ) |
| inline

Adds a line of plain text to HTML (without any markup, unless contained in the text string), indented and with newline fillowed.

Parameters

  text | Text to be added.

Referenced by IG.Lib.HtmlWriter.Example().

void IG.Lib.HtmlWriter.BeginTag | ( | string | tagName | ) |
| inline

Adds the specified tag to the document.

Parameters

  tagName | Tag name.

void IG.Lib.HtmlWriter.BeginTag | ( | string | tagName,
|  | params string[] | attributeNameValuePairs
| ) |  |
| inline

Adds the specified tag to the document.

Parameters

  tagName | Tag name.
  attributeNameValuePairs | Pairs of attribute names and values that will be added to the tag.

void IG.Lib.HtmlWriter.BeginTagWithText | ( | string | tagName,
|  | string | text
| ) |  |
| inline

Adds the specified tag containing the specified text to the document.

Parameters

  tagName | Tag name.
  text | Tag text.

void IG.Lib.HtmlWriter.BeginTagWithText | ( | string | tagName,
|  | string | text,
|  | params string[] | attributeNameValuePairs
| ) |  |
| inline

Adds the specified tag containing the specified text to the document.

Parameters

  tagName | Tag name.
  text | Tag text.
  attributeNameValuePairs | Pairs of attribute names and values that will be added to the tag.

void IG.Lib.HtmlWriter.EndTag | ( | string | tagName | ) |
| inline

Adds the specified tag containing the specified text to the document.

Parameters

  tagName | Tag name.
  text | Tag text.
  withLineBreak | Whether line break is added or not.
  attributeNameValuePairs | Pairs of attribute names and values that will be added to the tag.

void IG.Lib.HtmlWriter.BeginSection | ( | params string[] | attributeNameValuePairs | ) |
| inline

Begins a new section.

Parameters

  attributeNameValuePairs | Eventual attributes (in form of attribute name - value pairs).

Referenced by IG.Lib.HtmlWriter.Example().

void IG.Lib.HtmlWriter.EndSection | ( |  | ) |
| inline

Ends a section.

Referenced by IG.Lib.HtmlWriter.Example().

void IG.Lib.HtmlWriter.AddNewLine | ( |  | ) |
| inline

Adds a newline to HTML.

Referenced by IG.Lib.HtmlWriter.Example().

bool IG.Lib.HtmlWriter.IsAttributesDefined | ( | string[] | attributeNameValuePairs | ) |
| inline protected

Returns true if the specified array of attribute name-value pairs defines any attributes, false otherwise.

Parameters

  attributeNameValuePairs | Pairs of attribute names and values to be added to some tag.

Returns
  true if the specified array of attribute name-value pairs means that any attributes are defined, false otherwise.

void IG.Lib.HtmlWriter.AppendAttributes | ( | string[] | attributeNameValuePairs | ) |
| inline

Writes definition of the specified attriutes of a HTML element to the HTML document.

Parameters

  attributeNameValuePairs | Pairs of attribute names and values that will be added to the html element.

void IG.Lib.HtmlWriter.AddTag | ( | string | tagName,
|  | string | text,
|  | bool | withLineBreak
| ) |  |
| inline

Adds the specified tag containing the specified text to the document.

Parameters

  tagName | Tag name.
  text | Tag text.
  withLineBreak | Whether line break is added or not.

void IG.Lib.HtmlWriter.AddTag | ( | string | tagName,
|  | string | text
| ) |  |
| inline

Adds the specified tag containing the specified text to the document.

Tag has no attributes. Line break is not added.

Parameters

  tagName | Tag name.
  text | Tag text.

void IG.Lib.HtmlWriter.AddTag | ( | string | tagName,
|  | string | text,
|  | params string[] | attributeNameValuePairs
| ) |  |
| inline

Adds the specified tag containing the specified text to the document.

Line breakis not added.

Parameters

  tagName | Tag name.
  text | Tag text.
  attributeNameValuePairs | Pairs of attribute names and values that will be added to the tag.

void IG.Lib.HtmlWriter.AddTag | ( | string | tagName,
|  | string | text,
|  | bool | withLineBreak,
|  | params string[] | attributeNameValuePairs
| ) |  |
| inline

Adds the specified tag containing the specified text to the document.

Parameters

  tagName | Tag name.
  text | Tag text.
  withLineBreak | Whether line break is added or not.
  attributeNameValuePairs | Pairs of attribute names and values that will be added to the tag.

void IG.Lib.HtmlWriter.AddParagraph | ( | string | paragraphText,
|  | string[] | attributeNameValuePairs
| ) |  |
| inline

Adds a new paragraph with the specified text to the HTML document.

Parameters

  paragraphText | Text of the paragraph.
  attributeNameValuePairs | Pairs of attribute names and values that will be added to the tag.

Referenced by IG.Lib.HtmlWriter.Example().

void IG.Lib.HtmlWriter.AddParagraph | ( | string | paragraphText | ) |
| inline

Adds a new paragraph with the specified text to the HTML document.

The added HTML element has no attributes.

Parameters

  paragraphText | Text of the paragraph.

void IG.Lib.HtmlWriter.AddHeading1 | ( | string | headingText,
|  | params string[] | attributeNameValuePairs
| ) |  |
| inline

Adds a new level 1 heading with the specified text to the HTML document.

Parameters

  headingText | Text of the heading.
  attributeNameValuePairs | Pairs of attribute names and values that will be added to the tag.

Referenced by IG.Lib.HtmlWriter.Example().

void IG.Lib.HtmlWriter.AddHeading1 | ( | string | headingText | ) |
| inline

Adds a new level 1 heading with the specified text to the HTML document.

The added HTML element has no attributes.

Parameters

  headingText | Text of the heading.

void IG.Lib.HtmlWriter.AddHeading2 | ( | string | headingText,
|  | params string[] | attributeNameValuePairs
| ) |  |
| inline

Adds a new level 2 heading with the specified text to the HTML document.

Parameters

  headingText | Text of the heading.
  attributeNameValuePairs | Pairs of attribute names and values that will be added to the tag.

Referenced by IG.Lib.HtmlWriter.Example().

void IG.Lib.HtmlWriter.AddHeading2 | ( | string | headingText | ) |
| inline

Adds a new level 2 heading with the specified text to the HTML document.

The added HTML element has no attributes.

Parameters

  headingText | Text of the heading.

void IG.Lib.HtmlWriter.AddHeading3 | ( | string | headingText,
|  | params string[] | attributeNameValuePairs
| ) |  |
| inline

Adds a new level 3 heading with the specified text to the HTML document.

Parameters

  headingText | Text of the heading.
  attributeNameValuePairs | Pairs of attribute names and values that will be added to the tag.

void IG.Lib.HtmlWriter.AddHeading3 | ( | string | headingText | ) |
| inline

Adds a new level 3 heading with the specified text to the HTML document.

The added HTML element has no attributes.

Parameters

  headingText | Text of the heading.

void IG.Lib.HtmlWriter.AddHeading4 | ( | string | headingText,
|  | params string[] | attributeNameValuePairs
| ) |  |
| inline

Adds a new level 4 heading with the specified text to the HTML document.

Parameters

  headingText | Text of the heading.
  attributeNameValuePairs | Pairs of attribute names and values that will be added to the tag.

void IG.Lib.HtmlWriter.AddHeading4 | ( | string | headingText | ) |
| inline

Adds a new level 4 heading with the specified text to the HTML document.

The added HTML element has no attributes.

Parameters

  headingText | Text of the heading.

void IG.Lib.HtmlWriter.AddImage | ( | string | imageLink,
|  | string | altText,
|  | string | captionText,
|  | int | width,
|  | int | height,
|  | int | originalWidth,
|  | int | originalHeight,
|  | bool | constrainRatio
| ) |  |
| inline

Adds a linked image to the HTML document with specified custom size different than the original size.

It is possible to constraint height/width ratio to the original one, in this case the original width and height must be specified.

Parameters

  imageLink | Link to the image. Must not be null or empty string.
  altText | Alternative text to be displayed when image is not shown.
  captionText | Text below the image.
  width | Width of the image in pixels. Takes effect when <param name="definsSize"=true.
  height | Width of the image in pixels. Takes effect when <param name="definsSize"=true.
  defineSize | Whether size (in pixels) of the displayed image is defined or not.
  originalWidth | Original image width. Must be specified only if the ratio is constrained (i.e. if constrainRatio = true)
  originalHeight | Original image height. Must be specified only if the ratio is constrained (i.e. if constrainRatio = true)
  constrainRatio | If true then ratio between width and height is kept the same as in the original. In this case, original width and height must be specified, too.

When ratio between image width and height is not constrained to the original ratio of the image (constrainRatio = false) both width and height must be greater than 0 and they represent image dimensions in rendered HTML.

When ratio between image width and height is constrained to the original ratio of the image (constrainRatio = true), either the specified width or height may be less or equal to 0. In this case the remaining dimension is calculatd from the specified one in such a way that original ratio between width and height is preserved.

When ratio between image width and height is constrained to the original ratio of the image (constrainRatio = true) and both image width and height are specified,

Referenced by IG.Lib.HtmlWriter.Example().

void IG.Lib.HtmlWriter.AddImage | ( | string | imageLink,
|  | string | altText,
|  | string | captionText,
|  | int | width,
|  | int | height,
|  | bool | defineSize
| ) |  |
| inline

Adds a linked image to the HTML document.

Parameters

  imageLink | Link to the image. Must not be null or empty string.
  altText | Alternative text to be displayed when image is not shown.
  captionText | Text below the image.
  width | Width of the image in pixels. Takes effect when <param name="definsSize"=true.
  height | Width of the image in pixels. Takes effect when <param name="definsSize"=true.
  defineSize | Whether size (in pixels) of the displayed image is defined or not.

void IG.Lib.HtmlWriter.AddImageCaption | ( | string | captionText | ) |
| inline protected

Adds Image caption to the current HTML document.

Parameters

  captionText | Caption text.

void IG.Lib.HtmlWriter.Dispose | ( |  | ) |
| inline

Implementation of IDisposable interface.

virtual void IG.Lib.HtmlWriter.Dispose | ( | bool | disposing | ) |
| inline protected virtual

Does the job of freeing resources.

This method can be eventually overridden in derived classes (if they use other resources that must be freed - in addition to such resources of the current class). In the case of overriding this method, you should usually call the base.Dispose(disposing ). in the overriding method.

Parameters

  disposing | Tells whether the method has been called form Dispose() method.

static void IG.Lib.HtmlWriter.Example | ( | string | htmlDocumentPath,
|  | string | styleSheetPath,
|  | string | imagePath1,
|  | string | imagePath2
| ) |  |
| inline static

Writes an example HTML document.

Parameters

  htmlDocumentPath | Path to the created HTML document.
  styleSheetPath | Path to StyleSheet (CSS file).
  imagePath1 | Path to the first image included (can be null).
  imagePath2 | Path to the second image included (can be null).

References IG.Lib.HtmlWriter.AddHeading1(), IG.Lib.HtmlWriter.AddHeading2(), IG.Lib.HtmlWriter.AddImage(), IG.Lib.HtmlWriter.AddKeywords(), IG.Lib.HtmlWriter.AddNewLine(), IG.Lib.HtmlWriter.AddParagraph(), IG.Lib.HtmlWriter.AddPlainTextLine(), IG.Lib.HtmlWriter.BeginSection(), IG.Lib.HtmlWriter.CloseWriter(), IG.Lib.HtmlWriter.ConstAttributeClass, IG.Lib.HtmlWriter.ConstAttributeId, IG.Lib.HtmlWriter.DocumentStyle, IG.Lib.HtmlWriter.DocumentTitle, IG.Lib.HtmlWriter.EndDocument(), IG.Lib.HtmlWriter.EndSection(), and IG.Lib.UtilSystem.OpenFileInDefaultBrowser().

## Member Data Documentation

bool IG.Lib.HtmlWriter._headWritten = false
| protected

bool IG.Lib.HtmlWriter._tailWritten = false
| protected

string IG.Lib.HtmlWriter._filePath
| protected

int IG.Lib.HtmlWriter.IndentSpaces = 2

Number of spaces used in each level of indentation)

int IG.Lib.HtmlWriter.IndentLevel = 0
| protected

Current level of indentation.

string IG.Lib.HtmlWriter._cssPath
| protected

string IG.Lib.HtmlWriter._styleString
| protected

string IG.Lib.HtmlWriter._documentTitle = "Generated HTML Document"
| protected

string IG.Lib.HtmlWriter._documentAuthor = "IGLIb (by Igor Gresovnik)"
| protected

string IG.Lib.HtmlWriter._documentDescription = "This document was programatically generated by IGLib (Investigative Generic Library), http://www2.arnes.si/~ljc3m2/igor/iglib/"
| protected

List<string> IG.Lib.HtmlWriter._documentComments
| protected

List<string> IG.Lib.HtmlWriter._keywords
| protected

TextWriter IG.Lib.HtmlWriter._writer
| protected

bool IG.Lib.HtmlWriter._lockBeginDocument = false
| protected

int IG.Lib.HtmlWriter._sectionLevel = 0
| private

int IG.Lib.HtmlWriter._imageNum = 0
| private

string IG.Lib.HtmlWriter.ImageCaption = "Figure"

bool IG.Lib.HtmlWriter.disposed = false
| private

## Property Documentation

string IG.Lib.HtmlWriter.ConstAttributeClass
| get

The class attribute. Specifies one or more classnames for an element (refers to a class in a style sheet).

Referenced by IG.Lib.HtmlWriter.Example().

string IG.Lib.HtmlWriter.ConstAttributeId
| get

The id attribute. Specifies a unique id for an element.

Referenced by IG.Lib.HtmlWriter.Example().

string IG.Lib.HtmlWriter.ConstAttributeStyle
| get

The style attribute. Specifies an inline CSS style for an element.

string IG.Lib.HtmlWriter.ConstAttributeTitle
| get

The style attribute. Specifies extra information about an element.

string IG.Lib.HtmlWriter.ConstAttributeTextDirection
| get

The text direction attribute. Specifies text direction for the content in an element.

string IG.Lib.HtmlWriter.ConstAttributeLanguage
| get

The language attribute. Specifies the language of the element's content.

string IG.Lib.HtmlWriter.ConstAttributeLanguageXml
| get

The xml language attribute. Specifies the language of the element's content (for XHTML documents).

string IG.Lib.HtmlWriter.ConstAttributeShortcutKey
| get

The shortcut key attribute. Specifies a shortcut key to activate/focus an element.

string IG.Lib.HtmlWriter.ConstAttributeTabIndex
| get

The tab index attribute. Specifies the tabbing order of an element.

string IG.Lib.HtmlWriter.FilePath
| get protected set

Path to file containing the generator.

string IG.Lib.HtmlWriter.CssPath
| get set

Path to the associated CSS file (Cascaded Style Sheets).

Must be set before the document head is written, otherwise it will have no effect.

string IG.Lib.HtmlWriter.DocumentStyle
| get set

CSS string with internal style definitions.

Referenced by IG.Lib.HtmlWriter.Example().

virtual string IG.Lib.HtmlWriter.DocumentTitle
| get set

Referenced by IG.Lib.HtmlWriter.Example().

virtual string IG.Lib.HtmlWriter.DocumentAuthor
| get set

virtual string IG.Lib.HtmlWriter.DocumentDescription
| get set

TextWriter IG.Lib.HtmlWriter.Writer
| get

Text writer used for writing on the document.

Lazy evaluation, automatically opened when first needed.

The documentation for this class was generated from the following file:

- igbase/data/presentation/HtmlWriter.cs