styles

package
Version: v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: MIT Imports: 6 Imported by: 10

Documentation

Index

Constants

View Source
const (
	HAlignGeneral primitives.HAlignType
	HAlignLeft
	HAlignCenter
	HAlignRight
	HAlignFill
	HAlignJustify
	HAlignCenterContinuous
	HAlignDistributed
)

List of all possible values for HAlignType

View Source
const (
	VAlignTop primitives.VAlignType
	VAlignCenter
	VAlignBottom
	VAlignJustify
	VAlignDistributed
)

List of all possible values for VAlignType

View Source
const (
	BorderStyleNone primitives.BorderStyleType
	BorderStyleThin
	BorderStyleMedium
	BorderStyleDashed
	BorderStyleDotted
	BorderStyleThick
	BorderStyleDouble
	BorderStyleHair
	BorderStyleMediumDashed
	BorderStyleDashDot
	BorderStyleMediumDashDot
	BorderStyleDashDotDot
	BorderStyleMediumDashDotDot
	BorderStyleSlantDashDot
)

List of all possible values for BorderStyleType

View Source
const (
	FontFamilyRoman primitives.FontFamilyType
	FontFamilySwiss
	FontFamilyModern
	FontFamilyScript
	FontFamilyDecorative
)

List of all possible values for FontFamilyType

View Source
const (
	FontSchemeNone  primitives.FontSchemeType = "none"
	FontSchemeMinor primitives.FontSchemeType = "minor"
	FontSchemeMajor primitives.FontSchemeType = "major"
)

List of all possible values for FontSchemeType

View Source
const (
	UnderlineTypeSingle           primitives.UnderlineType = "single"
	UnderlineTypeDouble           primitives.UnderlineType = "double"
	UnderlineTypeSingleAccounting primitives.UnderlineType = "singleAccounting"
	UnderlineTypeDoubleAccounting primitives.UnderlineType = "doubleAccounting"
	UnderlineTypeNone             primitives.UnderlineType = "none"
)

List of all possible values for UnderlineType

View Source
const (
	GradientTypeLinear primitives.GradientType = iota
	GradientTypePath
)

List of all possible values for GradientType

View Source
const (
	NamedStyleNormal namedStyleType = iota

	NamedStyleComma
	NamedStyleCurrency
	NamedStylePercent
	NamedStyleComma0
	NamedStyleCurrency0
	NamedStyleHyperlink
	NamedStyleHyperlinkFollowed
	NamedStyleNote
	NamedStyleWarning

	NamedStyleTitle
	NamedStyleHeading1
	NamedStyleHeading2
	NamedStyleHeading3
	NamedStyleHeading4
	NamedStyleInput
	NamedStyleOutput
	NamedStyleCalculation
	NamedStyleCheckCell
	NamedStyleLinkedCell
	NamedStyleTotal
	NamedStyleGood
	NamedStyleBad
	NamedStyleNeutral
	NamedStyleAccent1
	NamedStyleAccent1_20
	NamedStyleAccent1_40
	NamedStyleAccent1_60
	NamedStyleAccent2
	NamedStyleAccent2_20
	NamedStyleAccent2_40
	NamedStyleAccent2_60
	NamedStyleAccent3
	NamedStyleAccent3_20
	NamedStyleAccent3_40
	NamedStyleAccent3_60
	NamedStyleAccent4
	NamedStyleAccent4_20
	NamedStyleAccent4_40
	NamedStyleAccent4_60
	NamedStyleAccent5
	NamedStyleAccent5_20
	NamedStyleAccent5_40
	NamedStyleAccent5_60
	NamedStyleAccent6
	NamedStyleAccent6_20
	NamedStyleAccent6_40
	NamedStyleAccent6_60
	NamedStyleExplanatory
	//pseudo styles for RowLevel 1 - 7
	NamedStyleRowLevel1 = iota + (100 + _NamedStyleRowLevel)
	NamedStyleRowLevel2
	NamedStyleRowLevel3
	NamedStyleRowLevel4
	NamedStyleRowLevel5
	NamedStyleRowLevel6
	NamedStyleRowLevel7
	//pseudo styles for ColLevel 1 - 7
	NamedStyleColLevel1 = iota + (200 + _NamedStyleColLevel)
	NamedStyleColLevel2
	NamedStyleColLevel3
	NamedStyleColLevel4
	NamedStyleColLevel5
	NamedStyleColLevel6
	NamedStyleColLevel7
)

List of all possible types for NamedStyle

View Source
const (
	PatternTypeNone primitives.PatternType
	PatternTypeSolid
	PatternTypeMediumGray
	PatternTypeDarkGray
	PatternTypeLightGray
	PatternTypeDarkHorizontal
	PatternTypeDarkVertical
	PatternTypeDarkDown
	PatternTypeDarkUp
	PatternTypeDarkGrid
	PatternTypeDarkTrellis
	PatternTypeLightHorizontal
	PatternTypeLightVertical
	PatternTypeLightDown
	PatternTypeLightUp
	PatternTypeLightGrid
	PatternTypeLightTrellis
	PatternTypeGray125
	PatternTypeGray0625
)

List of all possible values for PatternType

View Source
const DefaultDirectStyle = DirectStyleID(0)

DefaultDirectStyle is ID for any default direct style than depends on context: E.g. for cell it will be equal to NamedStyle 'Normal', for hyperlink - NamedStyle 'Hyperlink'

Variables

View Source
var Alignment alignmentOption

Alignment is a 'namespace' for all possible settings for alignment

View Source
var Border borderOption

Border is a 'namespace' for all possible settings for border

View Source
var Fill fillOption

Fill is a 'namespace' for all possible settings for fill

View Source
var Font fontOption

Font is a 'namespace' for all possible settings for font

View Source
var Protection protectionOption

Protection is a 'namespace' for all possible settings for protection

Functions

func NamedStyle

func NamedStyle(name interface{}) func(*Info)

NamedStyle is option to update Info with provided settings for NamedStyleInfo

func NumberFormat

func NumberFormat(format string) func(*Info)

NumberFormat is option to update Info with provided custom format of number, but respecting built-in number formats

func NumberFormatID

func NumberFormatID(id int) func(*Info)

NumberFormatID is option to update Info with provided id of already existing or built-in number format

Types

type DiffStyleID

type DiffStyleID = ml.DiffStyleID

DiffStyleID is alias of original ml.DiffStyleID type to: 1) make it public 2) forbid usage of integers directly 3) getting valid ID for Info via style-sheet 4) put everything related to stylesheet to same package

type DirectStyleID

type DirectStyleID = ml.DirectStyleID

DirectStyleID is alias of original ml.DirectStyleID type to: 1) make it public 2) forbid usage of integers directly 3) getting valid ID for Info via style-sheet 4) put everything related to stylesheet to same package

type FontCharsetType

type FontCharsetType = primitives.FontCharsetType

FontCharsetType is alias of original primitives.FontCharsetType type because more can be used by system and to: 1) make it public 2) forbid usage of integers directly

const (
	FontCharsetANSI        FontCharsetType = 0
	FontCharsetDEFAULT     FontCharsetType = 1
	FontCharsetSYMBOL      FontCharsetType = 2
	FontCharsetMAC         FontCharsetType = 77
	FontCharsetSHIFTJIS    FontCharsetType = 128
	FontCharsetHANGUL      FontCharsetType = 129
	FontCharsetJOHAB       FontCharsetType = 130
	FontCharsetGB2312      FontCharsetType = 134
	FontCharsetCHINESEBIG5 FontCharsetType = 136
	FontCharsetGREEK       FontCharsetType = 161
	FontCharsetTURKISH     FontCharsetType = 162
	FontCharsetVIETNAMESE  FontCharsetType = 163
	FontCharsetHEBREW      FontCharsetType = 177
	FontCharsetARABIC      FontCharsetType = 178
	FontCharsetBALTIC      FontCharsetType = 186
	FontCharsetRUSSIAN     FontCharsetType = 204
	FontCharsetTHAI        FontCharsetType = 222
	FontCharsetEASTEUROPE  FontCharsetType = 238
	FontCharsetOEM         FontCharsetType = 255
)

List of all possible values for FontCharsetType

type Info

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

Info is objects that holds combined information about cell styling

func New

func New(options ...Option) *Info

New creates and returns Info object with requested options

func (*Info) Set

func (s *Info) Set(options ...Option)

Set sets new options for style

type NamedStyleID

type NamedStyleID = ml.NamedStyleID

NamedStyleID is alias of original ml.NamedStyleID type to: 1) make it public 2) forbid usage of integers directly 3) getting valid ID for Info via style-sheet 4) put everything related to stylesheet to same package

type Option

type Option func(o *Info)

Option is helper type to set options for styles formatting

Jump to

Keyboard shortcuts

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