C# Class Bloom.Book.XMatterHelper

Handles chores related to Front and Back Matter packs. These allow users to have a set which fits there country/organizational situation, and have it applied to all books they create, whether original or from shells created in other country/organization contexts.
Afficher le fichier Open project: BloomBooks/BloomDesktop Class Usage Examples

Méthodes publiques

Méthode Description
GetStyleSheetFileName ( ) : string
InjectXMatter ( string>.Dictionary writingSystemCodes, Layout layout ) : void
IsBackMatterPage ( XmlElement pageDiv ) : bool
IsFrontMatterPage ( XmlElement pageDiv ) : bool
RemoveExistingXMatter ( HtmlDom dom ) : void

remove any x-matter in the book

XMatterHelper ( HtmlDom bookDom, string nameOfXMatterPack, IFileLocator fileLocator ) : System

Constructs by finding the file and folder of the xmatter pack, given the its key name e.g. "Factory", "SILIndonesia". The name of the file should be (key)-XMatter.htm. The name and the location of the folder is not our problem... we leave it to the supplied fileLocator to find it.

Private Methods

Méthode Description
InjectFlyleafIfNeeded ( Layout layout ) : void

Some book layouts rely on the first page facing the second page. A Wall Calendar is one example. Here we check if the first content page has this requirement and, if so, we insert a blank "flyleaf" page.

Method Details

GetStyleSheetFileName() public méthode

public GetStyleSheetFileName ( ) : string
Résultat string

InjectXMatter() public méthode

public InjectXMatter ( string>.Dictionary writingSystemCodes, Layout layout ) : void
writingSystemCodes string>.Dictionary
layout Layout
Résultat void

IsBackMatterPage() public static méthode

public static IsBackMatterPage ( XmlElement pageDiv ) : bool
pageDiv System.Xml.XmlElement
Résultat bool

IsFrontMatterPage() public static méthode

public static IsFrontMatterPage ( XmlElement pageDiv ) : bool
pageDiv System.Xml.XmlElement
Résultat bool

RemoveExistingXMatter() public static méthode

remove any x-matter in the book
public static RemoveExistingXMatter ( HtmlDom dom ) : void
dom HtmlDom
Résultat void

XMatterHelper() public méthode

Constructs by finding the file and folder of the xmatter pack, given the its key name e.g. "Factory", "SILIndonesia". The name of the file should be (key)-XMatter.htm. The name and the location of the folder is not our problem... we leave it to the supplied fileLocator to find it.
public XMatterHelper ( HtmlDom bookDom, string nameOfXMatterPack, IFileLocator fileLocator ) : System
bookDom HtmlDom
nameOfXMatterPack string e.g. "Factory", "SILIndonesia"
fileLocator IFileLocator The locator needs to be able tell us the path to an xmater html file, given its name
Résultat System