Documentation
¶
Index ¶
- type Box
- type DescribeFormat
- type DescribeItem
- type Description
- type Diff
- type Document
- type Font
- type Grid
- type GridPart
- type GridRow
- type Image
- type Instruction
- type Instructions
- type LineBreak
- type LineFeed
- type Margins
- type Meta
- type NoStyles
- type Orientation
- type Page
- type PageBreak
- type PaperFormat
- type Paragraph
- type Registry
- type SetX
- type SetY
- type Styled
- type Table
- type TableCell
- type TableRow
- type Text
- type TextBlock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Box ¶
type Box struct { Styled XMLName xml.Name `xml:"box"` //Text string `xml:",chardata"` Instructions }
type DescribeFormat ¶
type DescribeFormat string
const ( DescribeXML DescribeFormat = "xml" DescribeJSON DescribeFormat = "json" )
type DescribeItem ¶
type DescribeItem struct { Name string Value interface{} StyleDiffs []Diff Items []DescribeItem }
type Description ¶
type Description struct { Items []DescribeItem // contains filtered or unexported fields }
func Describe ¶
func Describe(doc *Document) *Description
func (*Description) Dump ¶
func (d *Description) Dump(format DescribeFormat) string
type Document ¶
type Document struct { XMLName xml.Name `xml:"document"` Meta Meta `xml:"meta"` Page Page `xml:"page"` Style string `xml:"style"` Header Instructions `xml:"header"` Body Instructions `xml:"body"` // contains filtered or unexported fields }
func LoadFromFile ¶
func (*Document) StyleClasses ¶
type Grid ¶
type Grid struct { Styled XMLName xml.Name `xml:"grid"` Rows []*GridRow `xml:"rows>gr"` Parts []*GridPart `xml:"parts>part"` }
func (*Grid) UnmarshalXML ¶
type GridPart ¶
type GridPart struct { Styled XMLName xml.Name `xml:"part"` Area string `xml:"area,attr"` Instructions }
func (*GridPart) UnmarshalXML ¶
type GridRow ¶
func (*GridRow) UnmarshalXML ¶
type Instruction ¶
type Instructions ¶
type Instructions struct { Styled ISS []Instruction }
func (*Instructions) UnmarshalXML ¶
func (is *Instructions) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type Orientation ¶
type Orientation string
const ( OrientationPortrait Orientation = "portrait" OrientationLandscape Orientation = "landscape" )
type Page ¶
type Page struct { XMLName xml.Name `xml:"page"` Orientation Orientation `xml:"orientation"` Format PaperFormat `xml:"format"` Margins Margins `xml:"margins"` }
type PaperFormat ¶
type PaperFormat string
const ( FormatA3 PaperFormat = "a3" FormatA4 PaperFormat = "a4" FormatA5 PaperFormat = "a5" FormatLetter PaperFormat = "letter" FormatLegal PaperFormat = "legal" )
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) DecodeInstruction ¶
func (r *Registry) DecodeInstruction(d *xml.Decoder, start xml.StartElement) (Instruction, error)
func (*Registry) RegisterInstruction ¶
func (r *Registry) RegisterInstruction(prototype Instruction) error
type Styled ¶
func (*Styled) MutatedStyles ¶
type Table ¶
type Table struct { Styled XMLName xml.Name `xml:"table"` RepeatHeader int `xml:"repeatheader,attr"` Rows []*TableRow `xml:"tr"` }
func (*Table) UnmarshalXML ¶
type TableCell ¶
type TableCell struct { Styled XMLName xml.Name `xml:"td"` Instructions ColSpan int `xml:"colspan,attr"` RowSpan int `xml:"rowspan,attr"` }
func (*TableCell) UnmarshalXML ¶
type TableRow ¶
func (*TableRow) UnmarshalXML ¶
Click to show internal directories.
Click to hide internal directories.