elements

package
v0.0.7-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package elements provides internal structures and functions for working with low-level document elements in GoDocx.

These elements, such as runs, paragraphs, tables, etc., are used internally and are not intended for direct use by end-users. End-users will interact with document elements through the higher-level oxml package, which provides a more user-friendly interface for creating and manipulating documents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anchor

type Anchor struct {
	/// Specifies that this object shall be positioned using the positioning information in the
	/// simplePos child element (§20.4.2.13). This positioning, when specified, positions the
	/// object on the page by placing its top left point at the x-y coordinates specified by that
	/// element.
	/// Reference: http://officeopenxml.com/drwPicFloating-position.php
	SimplePosAttr int

	/// Specifies the minimum distance which shall be maintained between the top edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.,
	/// The distance shall be measured in EMUs (English Mektric Units).,
	DistTAttr int
	DistBAttr int
	DistLAttr int
	DistRAttr int

	LayoutInCellAttr   int
	AllowOverlapAttr   int
	RelativeHeightAttr int
	BehindDocAttr      int
	LockedAttr         int

	// Child elements:
	SimplePos *types.PositionType
	PositionH *types.PoistionH
	PositionV *types.PoistionV
	Graphic   *Graphic
	Extent    *Extent
	DocProp   *DocProp
	// contains filtered or unexported fields
}

func NewAnchor

func NewAnchor() *Anchor

func (*Anchor) MarshalXML

func (a *Anchor) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Anchor) UnmarshalXML

func (a *Anchor) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

type Blip

type Blip struct {
	EmbedID string
}

func (*Blip) MarshalXML

func (b *Blip) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Blip) UnmarshalXML

func (b *Blip) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BlipFill

type BlipFill struct {
	Blip    *Blip
	Stretch *Stretch
}

func (*BlipFill) MarshalXML

func (b *BlipFill) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*BlipFill) UnmarshalXML

func (b *BlipFill) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Bold

type Bold struct {
	Val bool
}

Bold represents the bold style of text or element.

func NewBold

func NewBold(value bool) *Bold

NewBold creates a new Bold instance.

func (*Bold) Disable

func (b *Bold) Disable() *Bold

Disable disables the bold style.

func (*Bold) MarshalXML

func (b *Bold) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for the Bold type. It encodes the Bold instance into XML using the "w:b" element with a "w:val" attribute.

func (*Bold) UnmarshalXML

func (b *Bold) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for the Bold type. It decodes the XML representation of Bold, extracting the value from the "w:val" attribute. The inner content of the XML element is skipped.

type BorderType

type BorderType string
const (
	BorderTypeNil                    BorderType = "nil"
	BorderTypeNone                   BorderType = "none"
	BorderTypeSingle                 BorderType = "single"
	BorderTypeThick                  BorderType = "thick"
	BorderTypeDouble                 BorderType = "double"
	BorderTypeDotted                 BorderType = "dotted"
	BorderTypeDashed                 BorderType = "dashed"
	BorderTypeDotDash                BorderType = "dotDash"
	BorderTypeDotDotDash             BorderType = "dotDotDash"
	BorderTypeTriple                 BorderType = "triple"
	BorderTypeThinThickSmallGap      BorderType = "thinThickSmallGap"
	BorderTypeThickThinSmallGap      BorderType = "thickThinSmallGap"
	BorderTypeThinThickThinSmallGap  BorderType = "thinThickThinSmallGap"
	BorderTypeThinThickMediumGap     BorderType = "thinThickMediumGap"
	BorderTypeThickThinMediumGap     BorderType = "thickThinMediumGap"
	BorderTypeThinThickThinMediumGap BorderType = "thinThickThinMediumGap"
	BorderTypeThinThickLargeGap      BorderType = "thinThickLargeGap"
	BorderTypeThickThinLargeGap      BorderType = "thickThinLargeGap"
	BorderTypeThinThickThinLargeGap  BorderType = "thinThickThinLargeGap"
	BorderTypeWave                   BorderType = "wave"
	BorderTypeDoubleWave             BorderType = "doubleWave"
	BorderTypeDashSmallGap           BorderType = "dashSmallGap"
	BorderTypeDashDotStroked         BorderType = "dashDotStroked"
	BorderTypeThreeDEmboss           BorderType = "threeDEmboss"
	BorderTypeThreeDEngrave          BorderType = "threeDEngrave"
	BorderTypeOutset                 BorderType = "outset"
	BorderTypeInset                  BorderType = "inset"
	BorderTypeApples                 BorderType = "apples"
	BorderTypeArchedScallops         BorderType = "archedScallops"
	BorderTypeBabyPacifier           BorderType = "babyPacifier"
	BorderTypeBabyRattle             BorderType = "babyRattle"
)

type Break

type Break struct {
	BreakType types.BreakType
}

func NewBreak

func NewBreak(breakType types.BreakType) *Break

NewBreak creates a new Break element with the given break type.

func (*Break) MarshalXML

func (b *Break) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface.

func (*Break) UnmarshalXML

func (b *Break) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface.

type CNvPicPr

type CNvPicPr struct{}

func (*CNvPicPr) MarshalXML

func (c *CNvPicPr) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*CNvPicPr) UnmarshalXML

func (c *CNvPicPr) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type CNvPr

type CNvPr struct {
	ID   string
	Name string
}

func (*CNvPr) MarshalXML

func (c *CNvPr) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*CNvPr) UnmarshalXML

func (c *CNvPr) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type CellMargin

type CellMargin struct {
	Val       uint64
	WidthType WidthType
}

func DefaultCellMargin

func DefaultCellMargin() *CellMargin

func NewCellMargin

func NewCellMargin(val uint64, widthType WidthType) *CellMargin

func (*CellMargin) MarshalXML

func (cm *CellMargin) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*CellMargin) UnmarshalXML

func (cm *CellMargin) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Charset

type Charset struct {
	Value string
}

Charset represents the charset of a text or element.

func NewCharset

func NewCharset(value string) *Charset

NewCharset creates a new Charset instance with the specified charset value.

func (*Charset) MarshalXML

func (c *Charset) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for the Charset type.

It encodes the Charset instance into XML using the "w:charset" element with a "w:val" attribute.

func (*Charset) UnmarshalXML

func (c *Charset) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for the Charset type.

It decodes the XML representation of Charset, extracting the value from the "val" attribute. The inner content of the XML element is skipped.

type Color

type Color struct {
	Value string
}

Color represents the color of a text or element.

func NewColor

func NewColor(value string) *Color

NewColor creates a new Color instance with the specified color value.

func (*Color) MarshalXML

func (c *Color) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for the Color type.

It encodes the Color instance into XML using the "w:color" element with a "w:val" attribute.

func (*Color) UnmarshalXML

func (c *Color) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for the Color type.

It decodes the XML representation of Color, extracting the value from the "val" attribute. The inner content of the XML element is skipped.

type ColorIndex

type ColorIndex string

ColorIndex represents different color indexes.

const (
	ColorIndexAuto        ColorIndex = "default"
	ColorIndexBlack       ColorIndex = "black"
	ColorIndexBlue        ColorIndex = "blue"
	ColorIndexBrightGreen ColorIndex = "green"
	ColorIndexDarkBlue    ColorIndex = "darkBlue"
	ColorIndexDarkRed     ColorIndex = "darkRed"
	ColorIndexDarkYellow  ColorIndex = "darkYellow"
	ColorIndexGray25      ColorIndex = "lightGray"
	ColorIndexGray50      ColorIndex = "darkGray"
	ColorIndexGreen       ColorIndex = "darkGreen"
	ColorIndexPink        ColorIndex = "magenta"
	ColorIndexRed         ColorIndex = "red"
	ColorIndexTeal        ColorIndex = "darkCyan"
	ColorIndexTurquoise   ColorIndex = "cyan"
	ColorIndexVoilet      ColorIndex = "darkMagenta"
	ColorIndexWhite       ColorIndex = "white"
	ColorIndexYellow      ColorIndex = "yellow"
)

type DocProp

type DocProp struct {
	ID   uint64 // cx
	Name string // cy
}

func (*DocProp) MarshalXML

func (d *DocProp) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*DocProp) UnmarshalXML

func (d *DocProp) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

type Drawing

type Drawing struct {
	Inline []*Inline
	Anchor []*Anchor
}

func (*Drawing) MarshalXML

func (dr *Drawing) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Drawing) UnmarshalXML

func (dr *Drawing) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Extent

type Extent struct {
	XMLName string
	Length  uint64 // cx
	Width   uint64 // cy
}

func (*Extent) MarshalXML

func (x *Extent) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Extent) UnmarshalXML

func (x *Extent) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Family

type Family struct {
	Value string
}

Family represents the family of a text or element.

func NewFamily

func NewFamily(value string) *Family

NewFamily creates a new Family instance with the specified family value.

func (*Family) MarshalXML

func (c *Family) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for the Family type.

It encodes the Family instance into XML using the "w:family" element with a "w:val" attribute.

func (*Family) UnmarshalXML

func (c *Family) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for the Family type.

It decodes the XML representation of Family, extracting the value from the "val" attribute. The inner content of the XML element is skipped.

type FillRect

type FillRect struct{}

func (*FillRect) MarshalXML

func (f *FillRect) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*FillRect) UnmarshalXML

func (f *FillRect) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Font

type Font struct {
	Name    string
	Charset Charset
	Family  Family
	Pitch   Pitch
}

func NewFont

func NewFont(name, charset, family string, pitch types.FontPitchType) *Font

func (*Font) MarshalXML

func (f *Font) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Font) UnmarshalXML

func (f *Font) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML unmarshals XML to Font.

type Graphic

type Graphic struct {
	Data *GraphicData
}

func DefaultGraphic

func DefaultGraphic() *Graphic

func (*Graphic) MarshalXML

func (g *Graphic) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Graphic) UnmarshalXML

func (g *Graphic) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

type GraphicData

type GraphicData struct {
	URI string
	Pic *Pic
}

func (*GraphicData) MarshalXML

func (gd *GraphicData) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*GraphicData) UnmarshalXML

func (gd *GraphicData) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

type GraphicFrameLocks

type GraphicFrameLocks struct {
	// contains filtered or unexported fields
}

func (*GraphicFrameLocks) MarshalXML

func (g *GraphicFrameLocks) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*GraphicFrameLocks) UnmarshalXML

func (g *GraphicFrameLocks) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

type Highlight

type Highlight struct {
	Value ColorIndex
}

Highlight represents the highlighting of a text or element.

func NewHighlight

func NewHighlight(value ColorIndex) *Highlight

NewHighlight creates a new Highlight.

func (*Highlight) MarshalXML

func (h *Highlight) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML marshals Highlight to XML.

func (*Highlight) UnmarshalXML

func (h *Highlight) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML unmarshals XML to Highlight.

type Hyperlink struct {
	XMLName xml.Name `xml:"http://schemas.openxmlformats.org/wordprocessingml/2006/main hyperlink,omitempty"`
	ID      string   `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr"`
	// Run     Run
	Children []*ParagraphChild
}

type IndentLevel

type IndentLevel struct {
	Val int
}

IndentLevel represents the indentation level of a numbering in a document.

func NewIndentLevel

func NewIndentLevel(val int) *IndentLevel

NewIndentLevel creates a new IndentLevel instance.

func (*IndentLevel) MarshalXML

func (i *IndentLevel) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for IndentLevel.

func (*IndentLevel) UnmarshalXML

func (i *IndentLevel) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for IndentLevel.

type Inline

type Inline struct {
	/// Specifies the minimum distance which shall be maintained between the top edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.,
	/// The distance shall be measured in EMUs (English Mektric Units).,
	DistTAttr int
	DistBAttr int
	DistLAttr int
	DistRAttr int

	// Child elements:
	Extent  *Extent
	DocProp *DocProp
	Graphic *Graphic
	// contains filtered or unexported fields
}

func NewInline

func NewInline() *Inline

func (*Inline) MarshalXML

func (i *Inline) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Inline) UnmarshalXML

func (i *Inline) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

type Italic

type Italic struct {
	Val bool
}

Italic represents the italic style of text or element.

func NewItalic

func NewItalic(value bool) *Italic

NewItalic creates a new Italic instance.

func (*Italic) Disable

func (i *Italic) Disable() *Italic

Disable disables the italic style.

func (*Italic) MarshalXML

func (i *Italic) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for the Italic type. It encodes the Italic instance into XML using the "w:i" element with a "w:val" attribute.

func (*Italic) UnmarshalXML

func (i *Italic) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for the Italic type. It decodes the XML representation of Italic, extracting the value from the "w:val" attribute. The inner content of the XML element is skipped.

type Justification

type Justification struct {
	Value string
}

Justification represents the justification of a paragraph.

func DefaultJustification

func DefaultJustification() *Justification

DefaultJustification creates the default Justification with the value "centerGroup".

func NewJustification

func NewJustification(val string) *Justification

NewJustification creates a new Justification.

func (*Justification) MarshalXML

func (j *Justification) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Justification) UnmarshalXML

func (j *Justification) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type LayoutType

type LayoutType string
const (
	LayoutTypeFixed   LayoutType = "fixed"
	LayoutTypeAutoFit LayoutType = "autofit"
)

type NonVisualGraphicFrameProp

type NonVisualGraphicFrameProp struct {
	GraphicFrameLocks *GraphicFrameLocks
}

func (*NonVisualGraphicFrameProp) MarshalXML

func (n *NonVisualGraphicFrameProp) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*NonVisualGraphicFrameProp) UnmarshalXML

func (n *NonVisualGraphicFrameProp) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

type NonVisualPicProp

type NonVisualPicProp struct {
	CNvPr    *CNvPr
	CNvPicPr *CNvPicPr
}

func (*NonVisualPicProp) MarshalXML

func (n *NonVisualPicProp) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*NonVisualPicProp) UnmarshalXML

func (n *NonVisualPicProp) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type NumberingId

type NumberingId struct {
	Val int
}

NumberingId represents the ID of a numbering in a document.

func NewNumberingId

func NewNumberingId(val int) *NumberingId

NewNumberingId creates a new NumberingId instance.

func (*NumberingId) MarshalXML

func (n *NumberingId) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for NumberingId.

func (*NumberingId) UnmarshalXML

func (n *NumberingId) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for NumberingId.

type NumberingProperty

type NumberingProperty struct {
	ID    *NumberingId
	Level *IndentLevel
}

NumberingProperty represents the properties of a numbering in a document.

func NewNumberingProperty

func NewNumberingProperty() *NumberingProperty

NewNumberingProperty creates a new NumberingProperty instance.

func (*NumberingProperty) AddNumber

func (n *NumberingProperty) AddNumber(id *NumberingId, level *IndentLevel) *NumberingProperty

AddNumber adds the numbering ID and indent level to the NumberingProperty.

func (*NumberingProperty) MarshalXML

func (n *NumberingProperty) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for NumberingProperty.

func (*NumberingProperty) UnmarshalXML

func (n *NumberingProperty) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for NumberingProperty.

type Offset

type Offset struct {
	X uint64
	Y uint64
}

func (*Offset) MarshalXML

func (o *Offset) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Offset) UnmarshalXML

func (o *Offset) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Paragraph

type Paragraph struct {
	Property *ParagraphProperty

	Children []*ParagraphChild
	// contains filtered or unexported fields
}

func AddParagraph

func AddParagraph(text string) *Paragraph

func DefaultParagraph

func DefaultParagraph() *Paragraph

func NewParagraph

func NewParagraph() *Paragraph

func (*Paragraph) AddText

func (p *Paragraph) AddText(text string) *Run

Appends a new text to the Paragraph. Example:

paragraph := AddParagraph()
modifiedParagraph := paragraph.AddText("Hello, World!")

Parameters:

  • text: A string representing the text to be added to the Paragraph.

Returns:

  • *Run: The newly created Run instance added to the Paragraph.

func (*Paragraph) MarshalXML

func (para *Paragraph) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*Paragraph) Numbering

func (p *Paragraph) Numbering(id int, level int)

func (*Paragraph) Style

func (p *Paragraph) Style(value string) *Paragraph

func (*Paragraph) UnmarshalXML

func (p *Paragraph) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type ParagraphBorderPosition

type ParagraphBorderPosition int

ParagraphBorderPosition represents the position of a border in a paragraph.

const (
	ParagraphBorderPositionLeft    ParagraphBorderPosition = 1
	ParagraphBorderPositionRight   ParagraphBorderPosition = 2
	ParagraphBorderPositionTop     ParagraphBorderPosition = 3
	ParagraphBorderPositionBottom  ParagraphBorderPosition = 4
	ParagraphBorderPositionBetween ParagraphBorderPosition = 5
	ParagraphBorderPositionBar     ParagraphBorderPosition = 6
)

type ParagraphChild

type ParagraphChild struct {
	Link *Hyperlink // w:hyperlink
	Run  *Run       // i.e w:r
}

func DefaultParagraphChild

func DefaultParagraphChild() *ParagraphChild

func NewParagraphChild

func NewParagraphChild() *ParagraphChild

type ParagraphProperty

type ParagraphProperty struct {
	DivID           *string
	KeepNext        *bool
	KeepLines       *bool
	PageBreakBefore *bool
	WidowControl    *bool
	Style           *ParagraphStyle
	Justification   *Justification

	NumberingProperty *NumberingProperty
}

func DefaultParaProperty

func DefaultParaProperty() *ParagraphProperty

func (*ParagraphProperty) MarshalXML

func (pp *ParagraphProperty) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*ParagraphProperty) UnmarshalXML

func (pp *ParagraphProperty) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type ParagraphStyle

type ParagraphStyle struct {
	Value string
}

ParagraphStyle represents the name of a paragraph style associated with a numbering level in a document. When a paragraph style includes a numbering definition, any numbering level defined by the numPr element (§17.3.1.19) shall be ignored. Instead, this element specifies the numbering level associated with that paragraph style.

func DefaultParagraphStyle

func DefaultParagraphStyle() *ParagraphStyle

DefaultParagraphStyle creates the default ParagraphStyle with the value "Normal".

func NewParagraphStyle

func NewParagraphStyle(val string) *ParagraphStyle

NewParagraphStyle creates a new ParagraphStyle.

func (*ParagraphStyle) MarshalXML

func (p *ParagraphStyle) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ParagraphStyle) UnmarshalXML

func (p *ParagraphStyle) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Pic

type Pic struct {
	NonVisualPicProp *NonVisualPicProp
	BlipFill         *BlipFill
	PicShapeProp     *PicShapeProp
}

func (*Pic) MarshalXML

func (p *Pic) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Pic) UnmarshalXML

func (p *Pic) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PicShapeProp

type PicShapeProp struct {
	TransformGroup *TransformGroup
	PresetGeometry *PresetGeometry
}

func (*PicShapeProp) MarshalXML

func (p *PicShapeProp) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*PicShapeProp) UnmarshalXML

func (p *PicShapeProp) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Pitch

type Pitch struct {
	Value types.FontPitchType
}

Pitch represents the pitch of a text or element.

func NewPitch

func NewPitch(value types.FontPitchType) *Pitch

NewPitch creates a new Pitch instance with the specified pitch value.

func (*Pitch) MarshalXML

func (c *Pitch) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for the Pitch type.

It encodes the Pitch instance into XML using the "w:pitch" element with a "w:val" attribute.

func (*Pitch) UnmarshalXML

func (c *Pitch) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for the Pitch type.

It decodes the XML representation of Pitch, extracting the value from the "val" attribute. The inner content of the XML element is skipped.

type PresetGeometry

type PresetGeometry struct {
	Preset string
}

func (*PresetGeometry) MarshalXML

func (p *PresetGeometry) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*PresetGeometry) UnmarshalXML

func (p *PresetGeometry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type RowHeight

type RowHeight struct {
	Val        *float32
	HeightRule *string
}

type Run

type Run struct {
	RunProperty *RunProperty
	Children    []*RunChild
}

A Run is part of a paragraph that has its own style. It could be

func NewRun

func NewRun() *Run

func (*Run) Bold

func (r *Run) Bold(value bool) *Run

AddBold enables bold formatting for the run.

func (*Run) Color

func (r *Run) Color(colorCode string) *Run

Sets the color of the Run.

Example:

run := NewRun()
modifiedRun := run.Color("FF0000")

Parameters:

  • colorCode: A string representing the color code (e.g., "FF0000" for red).

Returns:

  • *Run: The modified Run instance with the updated color.

func (*Run) Highlight

func (r *Run) Highlight(color ColorIndex) *Run

AddHighlight sets the highlight color for the run.

func (*Run) Italic

func (r *Run) Italic(value bool) *Run

func (*Run) MarshalXML

func (r *Run) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*Run) Shading

func (r *Run) Shading(shdType ShadingType, color, fill string) *Run

func (*Run) Size

func (r *Run) Size(size uint) *Run

Returns:

  • *Run: The modified Run instance with the updated size.

func (*Run) Strike

func (r *Run) Strike(value bool) *Run

func (*Run) Style

func (r *Run) Style(value string) *Run

func (*Run) Underline

func (r *Run) Underline(value UnderlineStyle) *Run

func (*Run) UnmarshalXML

func (r *Run) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type RunChild

type RunChild struct {
	InstrText *string
	Text      *Text
	Drawing   *Drawing
}

type RunProperty

type RunProperty struct {
	Color     *Color
	Style     *RunStyle
	Size      *Sz
	SizeCs    *SzCs
	Shading   *Shading
	Highlight *Highlight
	Bold      *Bold
	Italic    *Italic

	Strike    *Strike
	Underline *Underline
}

RunProperty represents the properties of a run of text within a paragraph.

func NewRunProperty

func NewRunProperty() RunProperty

NewRunProperty creates a new RunProperty with default values.

func (*RunProperty) MarshalXML

func (rp *RunProperty) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML marshals RunProperty to XML.

func (*RunProperty) UnmarshalXML

func (rp *RunProperty) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML unmarshals XML to RunProperty.

type RunStyle

type RunStyle struct {
	Value string
}

RunStyle represents the style of a run within a document.

func DefaultRunStyle

func DefaultRunStyle() *RunStyle

DefaultRunStyle creates the default RunStyle with the value "Normal".

func NewRunStyle

func NewRunStyle(value string) *RunStyle

NewRunStyle creates a new RunStyle.

func (*RunStyle) MarshalXML

func (r *RunStyle) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML marshals RunStyle to XML.

func (*RunStyle) UnmarshalXML

func (r *RunStyle) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML unmarshals XML to RunStyle.

type Shading

type Shading struct {
	ShdType ShadingType
	Color   string
	Fill    string
}

Shading represents the shading properties.

func DefaultShading

func DefaultShading() *Shading

DefaultShading creates a new Shading with default values.

func NewShading

func NewShading() *Shading

NewShading creates a new Shading.

func (*Shading) MarshalXML

func (s *Shading) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Shading) SetColor

func (s *Shading) SetColor(color string) *Shading

Color sets the color for the shading.

func (*Shading) SetFill

func (s *Shading) SetFill(fill string) *Shading

Fill sets the fill for the shading.

func (*Shading) SetShadingType

func (s *Shading) SetShadingType(shdType ShadingType) *Shading

ShadingType sets the shading type for the shading.

func (*Shading) UnmarshalXML

func (s *Shading) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML unmarshals XML to Shading.

type ShadingType

type ShadingType string

ShadingType represents the shading type. ShadingType represents different shading types.

const (
	ShadingTypeNil                   ShadingType = "Nil"
	ShadingTypeClear                 ShadingType = "Clear"
	ShadingTypeSolid                 ShadingType = "Solid"
	ShadingTypeHorzStripe            ShadingType = "HorzStripe"
	ShadingTypeVertStripe            ShadingType = "VertStripe"
	ShadingTypeReverseDiagStripe     ShadingType = "ReverseDiagStripe"
	ShadingTypeDiagStripe            ShadingType = "DiagStripe"
	ShadingTypeHorzCross             ShadingType = "HorzCross"
	ShadingTypeDiagCross             ShadingType = "DiagCross"
	ShadingTypeThinHorzStripe        ShadingType = "ThinHorzStripe"
	ShadingTypeThinVertStripe        ShadingType = "ThinVertStripe"
	ShadingTypeThinReverseDiagStripe ShadingType = "ThinReverseDiagStripe"
	ShadingTypeThinDiagStripe        ShadingType = "ThinDiagStripe"
	ShadingTypeThinHorzCross         ShadingType = "ThinHorzCross"
	ShadingTypeThinDiagCross         ShadingType = "ThinDiagCross"
	ShadingTypePct5                  ShadingType = "Pct5"
	ShadingTypePct10                 ShadingType = "Pct10"
	ShadingTypePct12                 ShadingType = "Pct12"
	ShadingTypePct15                 ShadingType = "Pct15"
	ShadingTypePct20                 ShadingType = "Pct20"
	ShadingTypePct25                 ShadingType = "Pct25"
	ShadingTypePct30                 ShadingType = "Pct30"
	ShadingTypePct35                 ShadingType = "Pct35"
	ShadingTypePct37                 ShadingType = "Pct37"
	ShadingTypePct40                 ShadingType = "Pct40"
	ShadingTypePct45                 ShadingType = "Pct45"
	ShadingTypePct50                 ShadingType = "Pct50"
	ShadingTypePct55                 ShadingType = "Pct55"
	ShadingTypePct60                 ShadingType = "Pct60"
	ShadingTypePct62                 ShadingType = "Pct62"
	ShadingTypePct65                 ShadingType = "Pct65"
	ShadingTypePct70                 ShadingType = "Pct70"
	ShadingTypePct75                 ShadingType = "Pct75"
	ShadingTypePct80                 ShadingType = "Pct80"
	ShadingTypePct85                 ShadingType = "Pct85"
	ShadingTypePct87                 ShadingType = "Pct87"
	ShadingTypePct90                 ShadingType = "Pct90"
	ShadingTypePct95                 ShadingType = "Pct95"
)

type Stretch

type Stretch struct {
	FillRect *FillRect
}

func (*Stretch) MarshalXML

func (s *Stretch) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Stretch) UnmarshalXML

func (s *Stretch) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Strike

type Strike struct {
	Val bool
}

Strike represents the strike style of text or element.

func NewStrike

func NewStrike(value bool) *Strike

NewStrike creates a new Strike instance.

func (*Strike) Disable

func (b *Strike) Disable() *Strike

Disable disables the strike style.

func (*Strike) MarshalXML

func (b *Strike) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for the Strike type. It encodes the Strike instance into XML using the "w:b" element with a "w:val" attribute.

func (*Strike) UnmarshalXML

func (b *Strike) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for the Strike type. It decodes the XML representation of Strike, extracting the value from the "w:val" attribute. The inner content of the XML element is skipped.

type Sz

type Sz struct {
	Value uint
}

Sz represents the font size of a text or element.

func NewSz

func NewSz(value uint) *Sz

NewSz creates a new Sz with the specified font size value.

func (*Sz) MarshalXML

func (s *Sz) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*Sz) UnmarshalXML

func (s *Sz) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type SzCs

type SzCs struct {
	Value uint
}

SzCs represents the font size of a text or element.

func NewSzCs

func NewSzCs(value uint) *SzCs

NewSzCs creates a new SzCs with the specified font size value.

func (*SzCs) MarshalXML

func (s *SzCs) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*SzCs) UnmarshalXML

func (s *SzCs) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Table

type Table struct {
	Rows         []TableChild
	Grid         *TableGrid
	Property     *TableProperty
	HasNumbering bool
}

func DefaultTable

func DefaultTable() *Table

func (*Table) AddRow

func (t *Table) AddRow() *TableRow

func (*Table) Indent

func (t *Table) Indent(indent int)

func (*Table) MarshalXML

func (t *Table) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*Table) Style

func (t *Table) Style(value string)

func (*Table) UnmarshalXML

func (t *Table) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type TableBorderElement

type TableBorderElement struct {
	BorderType BorderType
	Position   TableBorderPosition
	Size       uint64
	Space      uint64
	Color      string
}

func DefaulTableBorderElement

func DefaulTableBorderElement() *TableBorderElement

DefaulTableBorderElement creates a new TableBorderElement instance with default values. It sets the default border type to single, size to 2, space to 0, color to "000000", and position to TableBorderPositionBottom.

func NewTableBorderElement

func NewTableBorderElement(borderType BorderType, size uint64, color string, position TableBorderPosition, space uint64) *TableBorderElement

NewTableBorderElement returns a new table border with the given properties.

func (*TableBorderElement) MarshalXML

func (t *TableBorderElement) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for TableBorderElement.

func (*TableBorderElement) UnmarshalXML

func (t *TableBorderElement) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type TableBorderPosition

type TableBorderPosition string

TableBorderPosition represents the position of a border in a table.

const (
	TableBorderPositionLeft    TableBorderPosition = "w:left"
	TableBorderPositionRight   TableBorderPosition = "w:right"
	TableBorderPositionTop     TableBorderPosition = "w:top"
	TableBorderPositionBottom  TableBorderPosition = "w:bottom"
	TableBorderPositionInsideH TableBorderPosition = "w:insideH"
	TableBorderPositionInsideV TableBorderPosition = "w:insideV"
)

type TableBorders

type TableBorders struct {
	Top     *TableBorderElement
	Bottom  *TableBorderElement
	Left    *TableBorderElement
	Right   *TableBorderElement
	InsideH *TableBorderElement
	InsideV *TableBorderElement
}

func DefaultTableBorders

func DefaultTableBorders() *TableBorders

func (*TableBorders) MarshalXML

func (t *TableBorders) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*TableBorders) UnmarshalXML

func (t *TableBorders) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type TableCell

type TableCell struct {
	Children     []*TableCellContent
	Property     TableCellProperty
	HasNumbering bool
}

func DefaultCell

func DefaultCell() *TableCell

func (*TableCell) AddParagraph

func (c *TableCell) AddParagraph(text string) *Paragraph

func (*TableCell) MarshalXML

func (tc *TableCell) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*TableCell) UnmarshalXML

func (tc *TableCell) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type TableCellBorderPosition

type TableCellBorderPosition int

TableCellBorderPosition represents the position of a border in a table cell.

const (
	TableCellBorderPositionLeft    TableCellBorderPosition = 1
	TableCellBorderPositionRight   TableCellBorderPosition = 2
	TableCellBorderPositionTop     TableCellBorderPosition = 3
	TableCellBorderPositionBottom  TableCellBorderPosition = 4
	TableCellBorderPositionInsideH TableCellBorderPosition = 5
	TableCellBorderPositionInsideV TableCellBorderPosition = 6
	TableCellBorderPositionTl2br   TableCellBorderPosition = 7
	TableCellBorderPositionTr2bl   TableCellBorderPosition = 8
)

type TableCellContent

type TableCellContent struct {
	Paragraph *Paragraph
	Table     *Table
}

type TableCellMargins

type TableCellMargins struct {
	Top    *CellMargin
	Left   *CellMargin
	Bottom *CellMargin
	Right  *CellMargin
}

func DefaultTableCellMargins

func DefaultTableCellMargins() TableCellMargins

func (TableCellMargins) Margin

func (tcm TableCellMargins) Margin(top, right, bottom, left uint64) TableCellMargins

func (TableCellMargins) MarginBottom

func (tcm TableCellMargins) MarginBottom(v uint64, t WidthType) TableCellMargins

func (TableCellMargins) MarginLeft

func (tcm TableCellMargins) MarginLeft(v uint64, t WidthType) TableCellMargins

func (TableCellMargins) MarginRight

func (tcm TableCellMargins) MarginRight(v uint64, t WidthType) TableCellMargins

func (TableCellMargins) MarginTop

func (tcm TableCellMargins) MarginTop(v uint64, t WidthType) TableCellMargins

func (*TableCellMargins) MarshalXML

func (tcm *TableCellMargins) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*TableCellMargins) UnmarshalXML

func (tcm *TableCellMargins) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type TableCellProperty

type TableCellProperty struct {
	Shading *Shading
}

func (*TableCellProperty) MarshalXML

func (t *TableCellProperty) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*TableCellProperty) UnmarshalXML

func (t *TableCellProperty) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type TableChild

type TableChild struct {
	TableRow *TableRow
}

type TableGrid

type TableGrid struct {
	Grid []uint64
}

TableGrid represents the grid columns of a table.

func DefaultTableGrid

func DefaultTableGrid() *TableGrid

func NewTableGrid

func NewTableGrid(grid []uint64) *TableGrid

NewTableGrid creates a new TableGrid instance.

func (*TableGrid) MarshalXML

func (t *TableGrid) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for TableGrid.

func (*TableGrid) UnmarshalXML

func (t *TableGrid) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for TableGrid.

type TableIndent

type TableIndent struct {
	Width     int
	WidthType WidthType
}

TableWidth represents the width of a table in a document.

func NewTableIndent

func NewTableIndent(width int, widthType WidthType) *TableIndent

func (*TableIndent) MarshalXML

func (t *TableIndent) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*TableIndent) UnmarshalXML

func (t *TableIndent) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type TableLayout

type TableLayout struct {
	LayoutType LayoutType
}

TableLayout represents the layout of a table in a document.

func DefaultTableLayout

func DefaultTableLayout() *TableLayout

func NewTableLayout

func NewTableLayout(t LayoutType) *TableLayout

NewTableLayout creates a new TableLayout instance.

func (*TableLayout) MarshalXML

func (t *TableLayout) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for TableLayout.

func (*TableLayout) UnmarshalXML

func (t *TableLayout) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for TableLayout.

type TableProperty

type TableProperty struct {
	Width         *TableWidth
	Justification *Justification
	Layout        *TableLayout
	Style         *TableStyle
	Indent        *TableIndent
	Margins       *TableCellMargins
	Borders       *TableBorders
}

func DefaultTableProperty

func DefaultTableProperty() *TableProperty

func (*TableProperty) MarshalXML

func (t *TableProperty) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*TableProperty) UnmarshalXML

func (t *TableProperty) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type TableRow

type TableRow struct {
	Cells        []*TableCell
	Property     *TableRowProperty
	HasNumbering bool
}

func DefaultTableRow

func DefaultTableRow() *TableRow

func (*TableRow) AddCell

func (r *TableRow) AddCell() *TableCell

func (*TableRow) MarshalXML

func (tr *TableRow) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*TableRow) UnmarshalXML

func (tr *TableRow) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type TableRowProperty

type TableRowProperty struct {
	GridAfter   *uint32
	WidthAfter  *float32
	GridBefore  *uint32
	WidthBefore *float32
	RowHeight   *RowHeight
}

TableRowProperty represents the properties of a table row.

func DefaultTableRowProperty

func DefaultTableRowProperty() *TableRowProperty

NewTableRowProperty creates a new TableRowProperty instance.

type TableStyle

type TableStyle struct {
	Val string
}

TableStyle represents the style of a table in a document. This is applicable when creating a new document. When using this style in a new document, you need to ensure that the specified style ID exists in your document's style base or is manually created through the library.

Some examples of predefined style IDs that can be used for table styles:

  • "LightShading"
  • "LightShading-Accent1"
  • "LightShading-Accent2"
  • "LightShading-Accent3"
  • "LightShading-Accent4"
  • "LightShading-Accent5"
  • "LightShading-Accent6"
  • "LightList"
  • "LightList-Accent1"..."LightList-Accent6"
  • "LightGrid"
  • "LightGrid-Accent1"..."LightGrid-Accent6"
  • "MediumShading"
  • "MediumShading-Accent1"..."MediumShading-Accent6"
  • "MediumShading2"
  • "MediumShading2-Accent1"..."MediumShading2-Accent6"
  • "MediumList1"
  • "MediumList1-Accent1"..."MediumList1-Accent6"
  • "MediumList2"
  • "MediumList2-Accent1"..."MediumList2-Accent6"
  • "TableGrid"
  • "MediumGrid1"
  • "MediumGrid1-Accent1"..."MediumGrid1-Accent6"
  • "MediumGrid2"
  • "MediumGrid2-Accent1"..."MediumGrid2-Accent6"
  • "MediumGrid3"
  • "MediumGrid3-Accent1"..."MediumGrid3-Accent6"
  • "DarkList"
  • "DarkList-Accent1"..."DarkList-Accent6"
  • "ColorfulShading"
  • "ColorfulShading-Accent1"..."ColorfulShading-Accent6"
  • "ColorfulList"
  • "ColorfulList-Accent1"..."ColorfulList-Accent6"
  • "ColorfulGrid"
  • "ColorfulGrid-Accent1"..."ColorfulGrid-Accent6"

func NewTableStyle

func NewTableStyle(val string) *TableStyle

NewTableStyle creates a new TableStyle instance.

func (*TableStyle) MarshalXML

func (t *TableStyle) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for TableStyle.

func (*TableStyle) UnmarshalXML

func (t *TableStyle) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for TableStyle.

type TableWidth

type TableWidth struct {
	Width     uint64
	WidthType WidthType
}

TableWidth represents the width of a table in a document.

func (*TableWidth) MarshalXML

func (t *TableWidth) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*TableWidth) UnmarshalXML

func (t *TableWidth) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type Text

type Text struct {
	// contains filtered or unexported fields
}

func NewText

func NewText() *Text

func TextFromString

func TextFromString(text string) *Text

func (*Text) MarshalXML

func (t *Text) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)

func (*Text) UnmarshalXML

func (t *Text) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error)

type TransformGroup

type TransformGroup struct {
	Extent *Extent
	Offset *Offset
}

func (*TransformGroup) MarshalXML

func (t *TransformGroup) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*TransformGroup) UnmarshalXML

func (t *TransformGroup) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Underline

type Underline struct {
	Val UnderlineStyle
}

Underline represents the underline style of text or element.

func NewUnderline

func NewUnderline(val UnderlineStyle) *Underline

NewUnderline creates a new Underline instance.

func (*Underline) MarshalXML

func (u *Underline) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for the Underline type. It encodes the Underline instance into XML using the "w:u" element with a "w:val" attribute.

func (*Underline) UnmarshalXML

func (u *Underline) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements the xml.Unmarshaler interface for the Underline type. It decodes the XML representation of Underline, extracting the value from the "w:val" attribute. The inner content of the XML element is skipped.

type UnderlineStyle

type UnderlineStyle string

UnderlineStyle represents different styles for underline.

const (
	UnderlineNone            UnderlineStyle = "none"
	UnderlineSingle          UnderlineStyle = "single"
	UnderlineWords           UnderlineStyle = "words"
	UnderlineDouble          UnderlineStyle = "double"
	UnderlineDotted          UnderlineStyle = "dotted"
	UnderlineThick           UnderlineStyle = "thick"
	UnderlineDash            UnderlineStyle = "dash"
	UnderlineDotDash         UnderlineStyle = "dotDash"
	UnderlineDotDotDash      UnderlineStyle = "dotDotDash"
	UnderlineWavy            UnderlineStyle = "wavy"
	UnderlineDottedHeavy     UnderlineStyle = "dottedHeavy"
	UnderlineDashHeavy       UnderlineStyle = "dashHeavy"
	UnderlineDotDashHeavy    UnderlineStyle = "dotDashHeavy"
	UnderlineDotDotDashHeavy UnderlineStyle = "dotDotDashHeavy"
	UnderlineWavyHeavy       UnderlineStyle = "wavyHeavy"
	UnderlineDashLong        UnderlineStyle = "dashLong"
	UnderlineWavyDouble      UnderlineStyle = "wavyDouble"
	UnderlineDashLongHeavy   UnderlineStyle = "dashLongHeavy"
)

type WidthType

type WidthType string
const (
	WidthTypeDxa         WidthType = "dxa"
	WidthTypeAuto        WidthType = "Auto"
	WidthTypePct         WidthType = "pct"
	WidthTypeNil         WidthType = "nil"
	WidthTypeUnsupported WidthType = "unsupported"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL