C# Class Bloom.Book.SizeAndOrientation

NB: html class names are case sensitive! In this code, we want to accept stuff regardless of case, but always generate Capitalized paper size and orientation names
Mostrar archivo Open project: BloomBooks/BloomDesktop Class Usage Examples

Public Properties

Property Type Description
PageSizeName string

Public Methods

Method Description
AddClassesForLayout ( HtmlDom dom, Layout layout ) : void
FromString ( string name ) : SizeAndOrientation
GetDisplayName ( string sizeAndOrientationDescriptor ) : string

THe normal descriptors are things like "a5portrait". This would turn that in "A5 Portrait" (in the current UI lang, eventually)

GetLayoutChoices ( HtmlDom dom, IFileLocator fileLocator ) : IEnumerable
GetSizeAndOrientation ( XmlDocument dom, string defaultIfMissing ) : SizeAndOrientation
SizeAndOrientation ( ) : System
ToString ( ) : string

/// looks for the css which sets the paper size/orientation ///

UpdatePageSizeAndOrientationClasses ( XmlNode node, Layout layout ) : void

Private Methods

Method Description
AddClass ( XmlElement e, string className ) : void
ExtractPageSizeName ( string nameLower, int startOfOrientationName ) : string
RemoveClassesContaining ( XmlElement xmlElement, string substring ) : void

Method Details

AddClassesForLayout() public static method

public static AddClassesForLayout ( HtmlDom dom, Layout layout ) : void
dom HtmlDom
layout Layout
return void

FromString() public static method

public static FromString ( string name ) : SizeAndOrientation
name string
return SizeAndOrientation

GetDisplayName() public static method

THe normal descriptors are things like "a5portrait". This would turn that in "A5 Portrait" (in the current UI lang, eventually)
public static GetDisplayName ( string sizeAndOrientationDescriptor ) : string
sizeAndOrientationDescriptor string
return string

GetLayoutChoices() public static method

public static GetLayoutChoices ( HtmlDom dom, IFileLocator fileLocator ) : IEnumerable
dom HtmlDom
fileLocator IFileLocator
return IEnumerable

GetSizeAndOrientation() public static method

public static GetSizeAndOrientation ( XmlDocument dom, string defaultIfMissing ) : SizeAndOrientation
dom System.Xml.XmlDocument
defaultIfMissing string
return SizeAndOrientation

SizeAndOrientation() public method

public SizeAndOrientation ( ) : System
return System

ToString() public method

/// looks for the css which sets the paper size/orientation ///
public ToString ( ) : string
return string

UpdatePageSizeAndOrientationClasses() public static method

public static UpdatePageSizeAndOrientationClasses ( XmlNode node, Layout layout ) : void
node System.Xml.XmlNode
layout Layout
return void

Property Details

PageSizeName public_oe property

public string PageSizeName
return string