models

package
v0.0.0-...-e22e075 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: MIT Imports: 25 Imported by: 6

Documentation

Overview

Default generated models package docs (at least one file is necessary in a models package)

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

Index

Constants

View Source
const IdentifiersDecls = `
	{{Identifier}} := (&models.{{GeneratedStructName}}{}).Stage(stage)`
View Source
const MetaFieldStructInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = ` + `{{GeneratedFieldNameValue}}`
View Source
const NumberInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
View Source
const PointerFieldInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
View Source
const ProbeFormSuffix = ":form of the probe"
View Source
const ProbeSplitSuffix = ":probe of the probe"
View Source
const ProbeTableSuffix = ":table of the probe"
View Source
const ProbeTreeSidebarSuffix = ":sidebar of the probe"
View Source
const SliceOfPointersFieldInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = append({{Identifier}}.{{GeneratedFieldName}}, {{GeneratedFieldNameValue}})`
View Source
const StringEnumInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
View Source
const StringInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = ` + "`" + `{{GeneratedFieldNameValue}}` + "`"
View Source
const TimeInitStatement = `` /* 129-byte string literal not displayed */

Variables

View Source
var Colors = []ColorType{}/* 147 elements not displayed */

Functions

func AfterCreateFromFront

func AfterCreateFromFront[Type Gongstruct](stage *Stage, instance *Type)

AfterCreateFromFront is called after a create from front

func AfterDeleteFromFront

func AfterDeleteFromFront[Type Gongstruct](stage *Stage, staged, front *Type)

AfterDeleteFromFront is called after a delete from front

func AfterReadFromFront

func AfterReadFromFront[Type Gongstruct](stage *Stage, instance *Type)

AfterReadFromFront is called after a Read from front

func AfterUpdateFromFront

func AfterUpdateFromFront[Type Gongstruct](stage *Stage, old, new *Type)

AfterUpdateFromFront is called after a update from front

func ApplyDiff

func ApplyDiff(b, c string) (string, error)

ApplyDiff applies a git-style unified diff c to string b to reconstruct string a

func CompareGongstructByName

func CompareGongstructByName[T PointerToGongstruct](a, b T) int

func ComputeDiff

func ComputeDiff(a, b string) string

ComputeDiff generates a git-style unified diff from string a to string b

func CopyBranch

func CopyBranch[Type Gongstruct](from *Type) (to *Type)

CopyBranch stages instance and apply CopyBranch on all gongstruct instances that are referenced by pointers or slices of pointers of the instance

the algorithm stops along the course of graph if a vertex is already staged

func DoNotKnowWhatThisFunctionIsFor

func DoNotKnowWhatThisFunctionIsFor(stage *Stage)

DoNotKnowWhatThisFunctionIsFor every staged shape to a behavior models

func GetAssociationName

func GetAssociationName[Type Gongstruct]() *Type

GetAssociationName is a generic function that returns an instance of Type where each association is filled with an instance whose name is the name of the association

This function can be handy for generating navigation function that are refactorable

func GetFields

func GetFields[Type Gongstruct]() (res []string)

GetFields return the array of the fields

func GetFieldsFromPointer

func GetFieldsFromPointer[Type PointerToGongstruct]() (res []string)

GetFieldsFromPointer return the array of the fields

func GetGongstrucsSorted

func GetGongstrucsSorted[T PointerToGongstruct](stage *Stage) (sortedSlice []T)

func GetGongstructInstancesMap

func GetGongstructInstancesMap[Type Gongstruct](stage *Stage) *map[string]*Type

GetGongstructInstancesMap returns the map of staged GongstructType instances it is usefull because it allows refactoring of gong struct identifier

func GetGongstructInstancesSet

func GetGongstructInstancesSet[Type Gongstruct](stage *Stage) *map[*Type]any

GetGongstructInstancesSet returns the set staged GongstructType instances it is usefull because it allows refactoring of gongstruct identifier

func GetGongstructInstancesSetFromPointerType

func GetGongstructInstancesSetFromPointerType[Type PointerToGongstruct](stage *Stage) *map[Type]any

GetGongstructInstancesSetFromPointerType returns the set staged GongstructType instances it is usefull because it allows refactoring of gongstruct identifier

func GetGongstructName

func GetGongstructName[Type Gongstruct]() (res string)

GetGongstructName returns the name of the Gongstruct this can be usefull if one want program robust to refactoring

func GetNamedStructInstances

func GetNamedStructInstances[T PointerToGongstruct](set map[T]any, order map[T]uint) (res []string)

func GetOrder

func GetOrder[Type Gongstruct](stage *Stage, instance *Type) uint

func GetOrderPointerGongstruct

func GetOrderPointerGongstruct[Type PointerToGongstruct](stage *Stage, instance Type) uint

func GetPointerReverseMap

func GetPointerReverseMap[Start, End Gongstruct](fieldname string, stage *Stage) map[*End][]*Start

GetPointerReverseMap allows backtrack navigation of any Start.Fieldname associations (0..1) that is a pointer from one staged Gongstruct (type Start) instances to another (type End)

The function provides a map with keys as instances of End and values to arrays of *Start the map is construed by iterating over all Start instances and populationg keys with End instances and values with slice of Start instances

func GetPointerToGongstructName

func GetPointerToGongstructName[Type PointerToGongstruct]() (res string)

GetPointerToGongstructName returns the name of the Gongstruct this can be usefull if one want program robust to refactoring

func GetReverseFieldOwner

func GetReverseFieldOwner[T Gongstruct](
	stage *Stage,
	instance *T,
	reverseField *ReverseField) (res any)

func GetReverseFieldOwnerName

func GetReverseFieldOwnerName(
	stage *Stage,
	instance any,
	reverseField *ReverseField) (res string)

func GetSliceOfPointersReverseMap

func GetSliceOfPointersReverseMap[Start, End Gongstruct](fieldname string, stage *Stage) map[*End][]*Start

GetSliceOfPointersReverseMap allows backtrack navigation of any Start.Fieldname associations (0..N) between one staged Gongstruct instances and many others

The function provides a map with keys as instances of End and values to *Start instances the map is construed by iterating over all Start instances and populating keys with End instances and values with the Start instances

func GetStructInstancesByOrder

func GetStructInstancesByOrder[T PointerToGongstruct](set map[T]any, order map[T]uint) (res []T)

func GetStructInstancesByOrderAuto

func GetStructInstancesByOrderAuto[T PointerToGongstruct](stage *Stage) (res []T)

func GongGetMap

func GongGetMap[Type GongstructMapString](stage *Stage) *Type

GongGetMap returns the map of staged GongstructType instances it is usefull because it allows refactoring of gong struct identifier

func GongGetSet

func GongGetSet[Type GongstructSet](stage *Stage) *Type

GongGetSet returns the set staged GongstructType instances it is usefull because it allows refactoring of gong struct identifier

func IntToLetters

func IntToLetters(number int32) (letters string)

func IsStaged

func IsStaged[Type Gongstruct](stage *Stage, instance *Type) (ok bool)

func ParseAstEmbeddedFile

func ParseAstEmbeddedFile(stage *Stage, directory embed.FS, pathToFile string) error

ParseAstEmbeddedFile parses the Go source code from an embedded file specified by pathToFile within the provided embed.FS directory and stages instances declared in the file using the provided Stage.

Parameters:

stage:      The staging area to populate.
directory:  The embedded filesystem containing the file.
pathToFile: The path to the Go source file within the embedded filesystem.

Returns:

An error if reading or parsing the file fails, or if ParseAstFileFromAst fails.

func ParseAstFile

func ParseAstFile(stage *Stage, pathToFile string) error

ParseAstFile Parse pathToFile and stages all instances declared in the file

func ParseAstFileFromAst

func ParseAstFileFromAst(stage *Stage, inFile *ast.File, fset *token.FileSet) error

ParseAstFile Parse pathToFile and stages all instances declared in the file

func ReplaceOldDeclarationsInFile

func ReplaceOldDeclarationsInFile(pathToFile string) error

ReplaceOldDeclarationsInFile replaces specific text in a file at the given path.

func Serialize

func Serialize[Type Gongstruct](stage *Stage, tab Tabulator)

func SerializeExcelize

func SerializeExcelize[Type Gongstruct](stage *Stage, f *excelize.File)

func SerializeExcelizePointerToGongstruct

func SerializeExcelizePointerToGongstruct[Type PointerToGongstruct](stage *Stage, f *excelize.File)

func SerializeStage

func SerializeStage(stage *Stage, filename string)

func SetCallbackAfterCreateFromFront

func SetCallbackAfterCreateFromFront[Type Gongstruct](stage *Stage, callback OnAfterCreateInterface[Type])

func SetCallbackAfterDeleteFromFront

func SetCallbackAfterDeleteFromFront[Type Gongstruct](stage *Stage, callback OnAfterDeleteInterface[Type])

func SetCallbackAfterReadFromFront

func SetCallbackAfterReadFromFront[Type Gongstruct](stage *Stage, callback OnAfterReadInterface[Type])

func SetCallbackAfterUpdateFromFront

func SetCallbackAfterUpdateFromFront[Type Gongstruct](stage *Stage, callback OnAfterUpdateInterface[Type])

SetCallbackAfterUpdateFromFront is a function to set up callback that is robust to refactoring

func SetOrchestratorOnAfterUpdate

func SetOrchestratorOnAfterUpdate[Type Gongstruct](stage *Stage)

func SortGongstructSetByName

func SortGongstructSetByName[T PointerToGongstruct](set map[T]any) (sortedSlice []T)

func StageBranch

func StageBranch[Type Gongstruct](stage *Stage, instance *Type)

StageBranch stages instance and apply StageBranch on all gongstruct instances that are referenced by pointers or slices of pointers of the instance

the algorithm stops along the course of graph if a vertex is already staged

func UnmarshallGongstructStaging

func UnmarshallGongstructStaging(stage *Stage, cmap *ast.CommentMap, assignStmt *ast.AssignStmt, astCoordinate_ string) (
	instance any,
	identifier string,
	gongstructName string,
	fieldName string)

UnmarshallGoStaging unmarshall a go assign statement

func UnstageBranch

func UnstageBranch[Type Gongstruct](stage *Stage, instance *Type)

UnstageBranch stages instance and apply UnstageBranch on all gongstruct instances that are referenced by pointers or slices of pointers of the insance

the algorithm stops along the course of graph if a vertex is already staged

Types

type AllModelsStructCreateInterface

type AllModelsStructCreateInterface interface {
	CreateORMAnimate(Animate *Animate)
	CreateORMCircle(Circle *Circle)
	CreateORMEllipse(Ellipse *Ellipse)
	CreateORMLayer(Layer *Layer)
	CreateORMLine(Line *Line)
	CreateORMLink(Link *Link)
	CreateORMLinkAnchoredText(LinkAnchoredText *LinkAnchoredText)
	CreateORMPath(Path *Path)
	CreateORMPoint(Point *Point)
	CreateORMPolygone(Polygone *Polygone)
	CreateORMPolyline(Polyline *Polyline)
	CreateORMRect(Rect *Rect)
	CreateORMRectAnchoredPath(RectAnchoredPath *RectAnchoredPath)
	CreateORMRectAnchoredRect(RectAnchoredRect *RectAnchoredRect)
	CreateORMRectAnchoredText(RectAnchoredText *RectAnchoredText)
	CreateORMRectLinkLink(RectLinkLink *RectLinkLink)
	CreateORMSVG(SVG *SVG)
	CreateORMSvgText(SvgText *SvgText)
	CreateORMText(Text *Text)
}

swagger:ignore

type AllModelsStructDeleteInterface

type AllModelsStructDeleteInterface interface {
	DeleteORMAnimate(Animate *Animate)
	DeleteORMCircle(Circle *Circle)
	DeleteORMEllipse(Ellipse *Ellipse)
	DeleteORMLayer(Layer *Layer)
	DeleteORMLine(Line *Line)
	DeleteORMLink(Link *Link)
	DeleteORMLinkAnchoredText(LinkAnchoredText *LinkAnchoredText)
	DeleteORMPath(Path *Path)
	DeleteORMPoint(Point *Point)
	DeleteORMPolygone(Polygone *Polygone)
	DeleteORMPolyline(Polyline *Polyline)
	DeleteORMRect(Rect *Rect)
	DeleteORMRectAnchoredPath(RectAnchoredPath *RectAnchoredPath)
	DeleteORMRectAnchoredRect(RectAnchoredRect *RectAnchoredRect)
	DeleteORMRectAnchoredText(RectAnchoredText *RectAnchoredText)
	DeleteORMRectLinkLink(RectLinkLink *RectLinkLink)
	DeleteORMSVG(SVG *SVG)
	DeleteORMSvgText(SvgText *SvgText)
	DeleteORMText(Text *Text)
}

type AnchorType

type AnchorType string
const (
	ANCHOR_TOP    AnchorType = "ANCHOR_TOP"
	ANCHOR_BOTTOM AnchorType = "ANCHOR_BOTTOM"
	ANCHOR_LEFT   AnchorType = "ANCHOR_LEFT"
	ANCHOR_RIGHT  AnchorType = "ANCHOR_RIGHT"
	ANCHOR_CENTER AnchorType = "ANCHOR_CENTER"
)

values for EnumType

func (AnchorType) CodeValues

func (anchortype AnchorType) CodeValues() (res []string)

func (AnchorType) Codes

func (anchortype AnchorType) Codes() (res []string)

func (*AnchorType) FromCodeString

func (anchortype *AnchorType) FromCodeString(input string) (err error)

func (*AnchorType) FromString

func (anchortype *AnchorType) FromString(input string) (err error)

func (*AnchorType) ToCodeString

func (anchortype *AnchorType) ToCodeString() (res string)

func (AnchorType) ToString

func (anchortype AnchorType) ToString() (res string)

insertion point of enum utility functions Utility function for AnchorType if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type Animate

type Animate struct {
	Name string

	AttributeName string
	Values        string

	From string
	To   string

	Dur         string
	RepeatCount string
}

func CopyBranchAnimate

func CopyBranchAnimate(mapOrigCopy map[any]any, animateFrom *Animate) (animateTo *Animate)

insertion point for stage branch per struct

func (*Animate) Checkout

func (animate *Animate) Checkout(stage *Stage) *Animate

Checkout animate to the back repo (if it is already staged)

func (*Animate) Commit

func (animate *Animate) Commit(stage *Stage) *Animate

commit animate to the back repo (if it is already staged)

func (*Animate) CommitVoid

func (animate *Animate) CommitVoid(stage *Stage)

func (*Animate) CopyBasicFields

func (from *Animate) CopyBasicFields(to *Animate)

func (*Animate) GetName

func (animate *Animate) GetName() (res string)

for satisfaction of GongStruct interface

func (*Animate) Stage

func (animate *Animate) Stage(stage *Stage) *Animate

insertion point for cumulative sub template with model space calls Stage puts animate to the model stage

func (*Animate) Unstage

func (animate *Animate) Unstage(stage *Stage) *Animate

Unstage removes animate off the model stage

func (*Animate) UnstageVoid

func (animate *Animate) UnstageVoid(stage *Stage)

UnstageVoid removes animate off the model stage

type Animate_WOP

type Animate_WOP struct {
	Name string

	AttributeName string

	Values string

	From string

	To string

	Dur string

	RepeatCount string
}

insertion point

type BackRepoInterface

type BackRepoInterface interface {
	Commit(stage *Stage)
	Checkout(stage *Stage)
	Backup(stage *Stage, dirPath string)
	Restore(stage *Stage, dirPath string)
	BackupXL(stage *Stage, dirPath string)
	RestoreXL(stage *Stage, dirPath string)
	// insertion point for Commit and Checkout signatures
	CommitAnimate(animate *Animate)
	CheckoutAnimate(animate *Animate)
	CommitCircle(circle *Circle)
	CheckoutCircle(circle *Circle)
	CommitEllipse(ellipse *Ellipse)
	CheckoutEllipse(ellipse *Ellipse)
	CommitLayer(layer *Layer)
	CheckoutLayer(layer *Layer)
	CommitLine(line *Line)
	CheckoutLine(line *Line)
	CommitLink(link *Link)
	CheckoutLink(link *Link)
	CommitLinkAnchoredText(linkanchoredtext *LinkAnchoredText)
	CheckoutLinkAnchoredText(linkanchoredtext *LinkAnchoredText)
	CommitPath(path *Path)
	CheckoutPath(path *Path)
	CommitPoint(point *Point)
	CheckoutPoint(point *Point)
	CommitPolygone(polygone *Polygone)
	CheckoutPolygone(polygone *Polygone)
	CommitPolyline(polyline *Polyline)
	CheckoutPolyline(polyline *Polyline)
	CommitRect(rect *Rect)
	CheckoutRect(rect *Rect)
	CommitRectAnchoredPath(rectanchoredpath *RectAnchoredPath)
	CheckoutRectAnchoredPath(rectanchoredpath *RectAnchoredPath)
	CommitRectAnchoredRect(rectanchoredrect *RectAnchoredRect)
	CheckoutRectAnchoredRect(rectanchoredrect *RectAnchoredRect)
	CommitRectAnchoredText(rectanchoredtext *RectAnchoredText)
	CheckoutRectAnchoredText(rectanchoredtext *RectAnchoredText)
	CommitRectLinkLink(rectlinklink *RectLinkLink)
	CheckoutRectLinkLink(rectlinklink *RectLinkLink)
	CommitSVG(svg *SVG)
	CheckoutSVG(svg *SVG)
	CommitSvgText(svgtext *SvgText)
	CheckoutSvgText(svgtext *SvgText)
	CommitText(text *Text)
	CheckoutText(text *Text)
	GetLastCommitFromBackNb() uint
	GetLastPushFromFrontNb() uint
}

type Circle

type Circle struct {
	Name           string
	CX, CY, Radius float64

	Presentation

	Animations []*Animate
}

func CopyBranchCircle

func CopyBranchCircle(mapOrigCopy map[any]any, circleFrom *Circle) (circleTo *Circle)

func (*Circle) Checkout

func (circle *Circle) Checkout(stage *Stage) *Circle

Checkout circle to the back repo (if it is already staged)

func (*Circle) Commit

func (circle *Circle) Commit(stage *Stage) *Circle

commit circle to the back repo (if it is already staged)

func (*Circle) CommitVoid

func (circle *Circle) CommitVoid(stage *Stage)

func (*Circle) CopyBasicFields

func (from *Circle) CopyBasicFields(to *Circle)

func (*Circle) GetName

func (circle *Circle) GetName() (res string)

for satisfaction of GongStruct interface

func (*Circle) Stage

func (circle *Circle) Stage(stage *Stage) *Circle

Stage puts circle to the model stage

func (*Circle) Unstage

func (circle *Circle) Unstage(stage *Stage) *Circle

Unstage removes circle off the model stage

func (*Circle) UnstageVoid

func (circle *Circle) UnstageVoid(stage *Stage)

UnstageVoid removes circle off the model stage

type Circle_WOP

type Circle_WOP struct {
	Name string

	CX float64

	CY float64

	Radius float64

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type ColorType

type ColorType string
const (
	Aliceblue            ColorType = "aliceblue"
	Antiquewhite         ColorType = "antiquewhite"
	Aqua                 ColorType = "aqua"
	Aquamarine           ColorType = "aquamarine "
	Azure                ColorType = "azure"
	Beige                ColorType = "beige"
	Bisque               ColorType = "bisque "
	Black                ColorType = "black"
	Blanchedalmond       ColorType = "blanchedalmond "
	Blue                 ColorType = "blue"
	Blueviolet           ColorType = "blueviolet "
	Brown                ColorType = "brown"
	Burlywood            ColorType = "burlywood"
	Cadetblue            ColorType = "cadetblue"
	Chartreuse           ColorType = "chartreuse "
	Chocolate            ColorType = "chocolate"
	Coral                ColorType = "coral"
	Cornflowerblue       ColorType = "cornflowerblue "
	Cornsilk             ColorType = "cornsilk"
	Crimson              ColorType = "crimson"
	Cyan                 ColorType = "cyan"
	Darkblue             ColorType = "darkblue"
	Darkcyan             ColorType = "darkcyan"
	Darkgoldenrod        ColorType = "darkgoldenrod"
	Darkgray             ColorType = "darkgray"
	Darkgreen            ColorType = "darkgreen"
	Darkgrey             ColorType = "darkgrey"
	Darkkhaki            ColorType = "darkkhaki"
	Darkmagenta          ColorType = "darkmagenta"
	Darkolivegreen       ColorType = "darkolivegreen "
	Darkorange           ColorType = "darkorange "
	Darkorchid           ColorType = "darkorchid "
	Darkred              ColorType = "darkred"
	Darksalmon           ColorType = "darksalmon "
	Darkseagreen         ColorType = "darkseagreen"
	Darkslateblue        ColorType = "darkslateblue"
	Darkslategray        ColorType = "darkslategray"
	Darkslategrey        ColorType = "darkslategrey"
	Darkturquoise        ColorType = "darkturquoise"
	Darkviolet           ColorType = "darkviolet "
	Deeppink             ColorType = "deeppink"
	Deepskyblue          ColorType = "deepskyblue"
	Dimgray              ColorType = "dimgray"
	Dimgrey              ColorType = "dimgrey"
	Dodgerblue           ColorType = "dodgerblue "
	Firebrick            ColorType = "firebrick"
	Floralwhite          ColorType = "floralwhite"
	Forestgreen          ColorType = "forestgreen"
	Fuchsia              ColorType = "fuchsia"
	Gainsboro            ColorType = "gainsboro"
	Ghostwhite           ColorType = "ghostwhite "
	Gold                 ColorType = "gold"
	Goldenrod            ColorType = "goldenrod"
	Gray                 ColorType = "gray"
	Green                ColorType = "green"
	Greenyellow          ColorType = "greenyellow"
	Grey                 ColorType = "grey"
	Honeydew             ColorType = "honeydew"
	Hotpink              ColorType = "hotpink"
	Indianred            ColorType = "indianred"
	Indigo               ColorType = "indigo "
	Ivory                ColorType = "ivory"
	Khaki                ColorType = "khaki"
	Lavender             ColorType = "lavender"
	Lavenderblush        ColorType = "lavenderblush"
	Lawngreen            ColorType = "lawngreen"
	Lemonchiffon         ColorType = "lemonchiffon"
	Lightblue            ColorType = "lightblue"
	Lightcoral           ColorType = "lightcoral "
	Lightcyan            ColorType = "lightcyan"
	Lightgoldenrodyellow ColorType = "lightgoldenrodyellow"
	Lightgray            ColorType = "lightgray"
	Lightgreen           ColorType = "lightgreen "
	Lightgrey            ColorType = "lightgrey"
	Lightpink            ColorType = "lightpink"
	Lightsalmon          ColorType = "lightsalmon"
	Lightseagreen        ColorType = "lightseagreen"
	Lightskyblue         ColorType = "lightskyblue"
	Lightslategray       ColorType = "lightslategray "
	Lightslategrey       ColorType = "lightslategrey "
	Lightsteelblue       ColorType = "lightsteelblue "
	Lightyellow          ColorType = "lightyellow"
	Lime                 ColorType = "lime"
	Limegreen            ColorType = "limegreen"
	Linen                ColorType = "linen"
	Magenta              ColorType = "magenta"
	Maroon               ColorType = "maroon "
	Mediumaquamarine     ColorType = "mediumaquamarine"
	Mediumblue           ColorType = "mediumblue "
	Mediumorchid         ColorType = "mediumorchid"
	Mediumpurple         ColorType = "mediumpurple"
	Mediumseagreen       ColorType = "mediumseagreen "
	Mediumslateblue      ColorType = "mediumslateblue"
	Mediumspringgreen    ColorType = "mediumspringgreen"
	Mediumturquoise      ColorType = "mediumturquoise"
	Mediumvioletred      ColorType = "mediumvioletred"
	Midnightblue         ColorType = "midnightblue"
	Mintcream            ColorType = "mintcream"
	Mistyrose            ColorType = "mistyrose"
	Moccasin             ColorType = "moccasin"
	Navajowhite          ColorType = "navajowhite"
	Navy                 ColorType = "navy"
	Oldlace              ColorType = "oldlace"
	Olive                ColorType = "olive"
	Olivedrab            ColorType = "olivedrab"
	Orange               ColorType = "orange "
	Orangered            ColorType = "orangered"
	Orchid               ColorType = "orchid "
	Palegoldenrod        ColorType = "palegoldenrod"
	Palegreen            ColorType = "palegreen"
	Paleturquoise        ColorType = "paleturquoise"
	Palevioletred        ColorType = "palevioletred"
	Papayawhip           ColorType = "papayawhip "
	Peachpuff            ColorType = "peachpuff"
	Peru                 ColorType = "peru"
	Pink                 ColorType = "pink"
	Plum                 ColorType = "plum"
	Powderblue           ColorType = "powderblue "
	Purple               ColorType = "purple "
	Red                  ColorType = "red"
	Rosybrown            ColorType = "rosybrown"
	Royalblue            ColorType = "royalblue"
	Saddlebrown          ColorType = "saddlebrown"
	Salmon               ColorType = "salmon "
	Sandybrown           ColorType = "sandybrown "
	Seagreen             ColorType = "seagreen"
	Seashell             ColorType = "seashell"
	Sienna               ColorType = "sienna "
	Silver               ColorType = "silver "
	Skyblue              ColorType = "skyblue"
	Slateblue            ColorType = "slateblue"
	Slategray            ColorType = "slategray"
	Slategrey            ColorType = "slategrey"
	Snow                 ColorType = "snow"
	Springgreen          ColorType = "springgreen"
	Steelblue            ColorType = "steelblue"
	Tan                  ColorType = "tan"
	Teal                 ColorType = "teal"
	Thistle              ColorType = "thistle"
	Tomato               ColorType = "tomato "
	Turquoise            ColorType = "turquoise"
	Violet               ColorType = "violet "
	Wheat                ColorType = "wheat"
	White                ColorType = "white"
	Whitesmoke           ColorType = "whitesmoke "
	Yellow               ColorType = "yellow "
	Yellowgreen          ColorType = "yellowgreen"
)

values for EnumType

func (ColorType) CodeValues

func (colortype ColorType) CodeValues() (res []string)

func (ColorType) Codes

func (colortype ColorType) Codes() (res []string)

func (*ColorType) FromCodeString

func (colortype *ColorType) FromCodeString(input string) (err error)

func (*ColorType) FromString

func (colortype *ColorType) FromString(input string) (err error)

func (*ColorType) ToCodeString

func (colortype *ColorType) ToCodeString() (res string)

func (ColorType) ToString

func (colortype ColorType) ToString() (res string)

Utility function for ColorType if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type DiffHunk

type DiffHunk struct {
	OldStart int
	OldLines int
	NewStart int
	NewLines int
	Lines    []string
}

DiffHunk represents a single hunk in a unified diff

type DiffOp

type DiffOp struct {
	Type string // "context", "delete", "add"
	Text string
}

DiffLine represents a line in a diff with its operation

type DrawingState

type DrawingState string
const (
	NOT_DRAWING_LINK DrawingState = "NOT_DRAWING_LINK"
	DRAWING_LINK     DrawingState = "DRAWING_LINK"
)

values for EnumType

func (DrawingState) CodeValues

func (drawingstate DrawingState) CodeValues() (res []string)

func (DrawingState) Codes

func (drawingstate DrawingState) Codes() (res []string)

func (*DrawingState) FromCodeString

func (drawingstate *DrawingState) FromCodeString(input string) (err error)

func (*DrawingState) FromString

func (drawingstate *DrawingState) FromString(input string) (err error)

func (*DrawingState) ToCodeString

func (drawingstate *DrawingState) ToCodeString() (res string)

func (DrawingState) ToString

func (drawingstate DrawingState) ToString() (res string)

Utility function for DrawingState if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type Ellipse

type Ellipse struct {
	Name           string
	CX, CY, RX, RY float64

	Presentation

	Animates []*Animate
}

func CopyBranchEllipse

func CopyBranchEllipse(mapOrigCopy map[any]any, ellipseFrom *Ellipse) (ellipseTo *Ellipse)

func (*Ellipse) Checkout

func (ellipse *Ellipse) Checkout(stage *Stage) *Ellipse

Checkout ellipse to the back repo (if it is already staged)

func (*Ellipse) Commit

func (ellipse *Ellipse) Commit(stage *Stage) *Ellipse

commit ellipse to the back repo (if it is already staged)

func (*Ellipse) CommitVoid

func (ellipse *Ellipse) CommitVoid(stage *Stage)

func (*Ellipse) CopyBasicFields

func (from *Ellipse) CopyBasicFields(to *Ellipse)

func (*Ellipse) GetName

func (ellipse *Ellipse) GetName() (res string)

for satisfaction of GongStruct interface

func (*Ellipse) Stage

func (ellipse *Ellipse) Stage(stage *Stage) *Ellipse

Stage puts ellipse to the model stage

func (*Ellipse) Unstage

func (ellipse *Ellipse) Unstage(stage *Stage) *Ellipse

Unstage removes ellipse off the model stage

func (*Ellipse) UnstageVoid

func (ellipse *Ellipse) UnstageVoid(stage *Stage)

UnstageVoid removes ellipse off the model stage

type Ellipse_WOP

type Ellipse_WOP struct {
	Name string

	CX float64

	CY float64

	RX float64

	RY float64

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type ExcelizeTabulator

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

func (*ExcelizeTabulator) AddCell

func (tab *ExcelizeTabulator) AddCell(sheetName string, rowId, columnIndex int, value string)

func (*ExcelizeTabulator) AddRow

func (tab *ExcelizeTabulator) AddRow(sheetName string) (rowId int)

func (*ExcelizeTabulator) AddSheet

func (tab *ExcelizeTabulator) AddSheet(sheetName string)

func (*ExcelizeTabulator) SetExcelizeFile

func (tab *ExcelizeTabulator) SetExcelizeFile(f *excelize.File)

type GONG__ExpressionType

type GONG__ExpressionType string

swagger:ignore

const (
	GONG__STRUCT_INSTANCE      GONG__ExpressionType = "STRUCT_INSTANCE"
	GONG__FIELD_OR_CONST_VALUE GONG__ExpressionType = "FIELD_OR_CONST_VALUE"
	GONG__FIELD_VALUE          GONG__ExpressionType = "FIELD_VALUE"
	GONG__ENUM_CAST_INT        GONG__ExpressionType = "ENUM_CAST_INT"
	GONG__ENUM_CAST_STRING     GONG__ExpressionType = "ENUM_CAST_STRING"
	GONG__IDENTIFIER_CONST     GONG__ExpressionType = "IDENTIFIER_CONST"
)

type GONG__Identifier

type GONG__Identifier struct {
	Ident string
	Type  GONG__ExpressionType
}

type GongFieldValue

type GongFieldValue struct {
	GongFieldValueType
	// contains filtered or unexported fields
}

func GetFieldStringValue

func GetFieldStringValue(instance any, fieldName string) (res GongFieldValue)

func GetFieldStringValueFromPointer

func GetFieldStringValueFromPointer(instance any, fieldName string) (res GongFieldValue)

func (*GongFieldValue) GetValueBool

func (gongValueField *GongFieldValue) GetValueBool() bool

func (*GongFieldValue) GetValueFloat

func (gongValueField *GongFieldValue) GetValueFloat() float64

func (*GongFieldValue) GetValueInt

func (gongValueField *GongFieldValue) GetValueInt() int

func (*GongFieldValue) GetValueString

func (gongValueField *GongFieldValue) GetValueString() string

type GongFieldValueType

type GongFieldValueType string
const (
	GongFieldValueTypeInt    GongFieldValueType = "GongFieldValueTypeInt"
	GongFieldValueTypeFloat  GongFieldValueType = "GongFieldValueTypeFloat"
	GongFieldValueTypeBool   GongFieldValueType = "GongFieldValueTypeBool"
	GongFieldValueTypeOthers GongFieldValueType = "GongFieldValueTypeOthers"
)

type GongStructInterface

type GongStructInterface interface {
	GetName() (res string)
}

GongStructInterface is the interface met by GongStructs It allows runtime reflexion of instances (without the hassle of the "reflect" package)

type Gongstruct

type Gongstruct interface {
}

Gongstruct is the type parameter for generated generic function that allows - access to staged instances - navigation between staged instances by going backward association links between gongstruct - full refactoring of Gongstruct identifiers / fields

type GongstructEnumIntField

type GongstructEnumIntField interface {
	int
	Codes() []string
	CodeValues() []int
}

type GongstructEnumStringField

type GongstructEnumStringField interface {
	Codes() []string
	CodeValues() []string
	ToString() string
}

type GongstructMapString

type GongstructMapString interface {
	map[any]any
}

type GongstructSet

type GongstructSet interface {
	map[any]any
}

type GongtructBasicField

type GongtructBasicField interface {
	int | float64 | bool | string | time.Time | time.Duration
}

type GraphicElementInterface

type GraphicElementInterface interface {
	Output(output *string)
}

type Layer

type Layer struct {
	Name string

	Rects         []*Rect
	Texts         []*Text
	Circles       []*Circle
	Lines         []*Line
	Ellipses      []*Ellipse
	Polylines     []*Polyline
	Polygones     []*Polygone
	Paths         []*Path
	Links         []*Link
	RectLinkLinks []*RectLinkLink
}

func CopyBranchLayer

func CopyBranchLayer(mapOrigCopy map[any]any, layerFrom *Layer) (layerTo *Layer)

func (*Layer) Checkout

func (layer *Layer) Checkout(stage *Stage) *Layer

Checkout layer to the back repo (if it is already staged)

func (*Layer) Commit

func (layer *Layer) Commit(stage *Stage) *Layer

commit layer to the back repo (if it is already staged)

func (*Layer) CommitVoid

func (layer *Layer) CommitVoid(stage *Stage)

func (*Layer) CopyBasicFields

func (from *Layer) CopyBasicFields(to *Layer)

func (*Layer) GetName

func (layer *Layer) GetName() (res string)

for satisfaction of GongStruct interface

func (*Layer) Stage

func (layer *Layer) Stage(stage *Stage) *Layer

Stage puts layer to the model stage

func (*Layer) Unstage

func (layer *Layer) Unstage(stage *Stage) *Layer

Unstage removes layer off the model stage

func (*Layer) UnstageVoid

func (layer *Layer) UnstageVoid(stage *Stage)

UnstageVoid removes layer off the model stage

type Layer_WOP

type Layer_WOP struct {
	Name string
}

type Line

type Line struct {
	Name           string
	X1, Y1, X2, Y2 float64
	Presentation

	Animates []*Animate

	// when an end user interacts with the line,
	// it updates those fields
	MouseClickX, MouseClickY float64
}

func CopyBranchLine

func CopyBranchLine(mapOrigCopy map[any]any, lineFrom *Line) (lineTo *Line)

func (*Line) Checkout

func (line *Line) Checkout(stage *Stage) *Line

Checkout line to the back repo (if it is already staged)

func (*Line) Commit

func (line *Line) Commit(stage *Stage) *Line

commit line to the back repo (if it is already staged)

func (*Line) CommitVoid

func (line *Line) CommitVoid(stage *Stage)

func (*Line) CopyBasicFields

func (from *Line) CopyBasicFields(to *Line)

func (*Line) GetName

func (line *Line) GetName() (res string)

for satisfaction of GongStruct interface

func (*Line) OnAfterUpdate

func (line *Line) OnAfterUpdate(stage *Stage, _, frontLine *Line)

func (*Line) Stage

func (line *Line) Stage(stage *Stage) *Line

Stage puts line to the model stage

func (*Line) Unstage

func (line *Line) Unstage(stage *Stage) *Line

Unstage removes line off the model stage

func (*Line) UnstageVoid

func (line *Line) UnstageVoid(stage *Stage)

UnstageVoid removes line off the model stage

type LineOrchestrator

type LineOrchestrator struct {
}

insertion point LineOrchestrator

func (*LineOrchestrator) OnAfterUpdate

func (orchestrator *LineOrchestrator) OnAfterUpdate(
	gongsvgStage *Stage,
	stagedLine, backRepoLine *Line)

type Line_WOP

type Line_WOP struct {
	Name string

	X1 float64

	Y1 float64

	X2 float64

	Y2 float64

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string

	MouseClickX float64

	MouseClickY float64
}
type Link struct {
	Name string

	Type LinkType

	// IsBezierCurve, if true will draw the link as a bezier curve instead of segments
	IsBezierCurve bool

	Start           *Rect
	StartAnchorType AnchorType

	End           *Rect
	EndAnchorType AnchorType

	// if link type is floating orthogonal ratio, from 0 to 1,
	// where the anchor starts on the edge (horizontal / vertical)
	StartOrientation OrientationType
	StartRatio       float64
	EndOrientation   OrientationType
	EndRatio         float64

	// in case StartOrientation is the same as EndOrientation,
	// there is a perpendicular line that reach the corner at
	// CornerOffsetRatio
	CornerOffsetRatio float64

	// corner radius
	CornerRadius float64

	// End Arrows
	HasEndArrow  bool
	EndArrowSize float64

	// Start Arrows
	HasStartArrow  bool
	StartArrowSize float64

	// to be displayed at the start
	TextAtArrowStart []*LinkAnchoredText

	// to be displayed at the end
	TextAtArrowEnd []*LinkAnchoredText

	// for non floating orthogonal anchors
	ControlPoints []*Point

	Presentation

	Impl LinkImplInterface
}
func CopyBranchLink(mapOrigCopy map[any]any, linkFrom *Link) (linkTo *Link)

func (*Link) Checkout

func (link *Link) Checkout(stage *Stage) *Link

Checkout link to the back repo (if it is already staged)

func (*Link) Commit

func (link *Link) Commit(stage *Stage) *Link

commit link to the back repo (if it is already staged)

func (*Link) CommitVoid

func (link *Link) CommitVoid(stage *Stage)

func (*Link) CopyBasicFields

func (from *Link) CopyBasicFields(to *Link)

func (*Link) GetName

func (link *Link) GetName() (res string)

for satisfaction of GongStruct interface

func (*Link) OnAfterUpdate

func (link *Link) OnAfterUpdate(stage *Stage, _, frontLink *Link)

func (*Link) Stage

func (link *Link) Stage(stage *Stage) *Link

Stage puts link to the model stage

func (*Link) Unstage

func (link *Link) Unstage(stage *Stage) *Link

Unstage removes link off the model stage

func (*Link) UnstageVoid

func (link *Link) UnstageVoid(stage *Stage)

UnstageVoid removes link off the model stage

func (*Link) WriteSVGArcPath

func (link *Link) WriteSVGArcPath(sb *strings.Builder, segment, nextSegment *Segment)

func (*Link) WriteSVGEndArrow

func (link *Link) WriteSVGEndArrow(sb *strings.Builder, segment *Segment)

type LinkAnchorType

type LinkAnchorType string

LinkAnchorType specifies the way a text should be attached to a link end.

the link end meets a rect either horizontally or vertically

const (
	// If horizontally, the text will be on top of the link end
	// If verticaly, the text will be on the left
	LINK_LEFT_OR_TOP LinkAnchorType = "LINK_LEFT_OR_TOP"
	// bottom / right
	LINK_RIGHT_OR_BOTTOM LinkAnchorType = "LINK_RIGHT_OR_BOTTOM"
)

func (LinkAnchorType) CodeValues

func (linkanchortype LinkAnchorType) CodeValues() (res []string)

func (LinkAnchorType) Codes

func (linkanchortype LinkAnchorType) Codes() (res []string)

func (*LinkAnchorType) FromCodeString

func (linkanchortype *LinkAnchorType) FromCodeString(input string) (err error)

func (*LinkAnchorType) FromString

func (linkanchortype *LinkAnchorType) FromString(input string) (err error)

func (*LinkAnchorType) ToCodeString

func (linkanchortype *LinkAnchorType) ToCodeString() (res string)

func (LinkAnchorType) ToString

func (linkanchortype LinkAnchorType) ToString() (res string)

Utility function for LinkAnchorType if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type LinkAnchoredText

type LinkAnchoredText struct {
	Name string

	//gong:text width:300 height:300
	Content string

	// AutomaticLayout is true will have the front compute the
	// X_Offset / Y_Offset of the anchored text
	AutomaticLayout bool
	LinkAnchorType  LinkAnchorType

	// values if AutomaticLayout is false
	X_Offset float64
	Y_Offset float64

	TextAttributes

	Presentation
	Animates []*Animate

	Impl LinkAnchoredTextImplInterface
}

func CopyBranchLinkAnchoredText

func CopyBranchLinkAnchoredText(mapOrigCopy map[any]any, linkanchoredtextFrom *LinkAnchoredText) (linkanchoredtextTo *LinkAnchoredText)

func (*LinkAnchoredText) Checkout

func (linkanchoredtext *LinkAnchoredText) Checkout(stage *Stage) *LinkAnchoredText

Checkout linkanchoredtext to the back repo (if it is already staged)

func (*LinkAnchoredText) Commit

func (linkanchoredtext *LinkAnchoredText) Commit(stage *Stage) *LinkAnchoredText

commit linkanchoredtext to the back repo (if it is already staged)

func (*LinkAnchoredText) CommitVoid

func (linkanchoredtext *LinkAnchoredText) CommitVoid(stage *Stage)

func (*LinkAnchoredText) CopyBasicFields

func (from *LinkAnchoredText) CopyBasicFields(to *LinkAnchoredText)

func (*LinkAnchoredText) GetName

func (linkanchoredtext *LinkAnchoredText) GetName() (res string)

for satisfaction of GongStruct interface

func (*LinkAnchoredText) OnAfterUpdate

func (linkAnchoredText *LinkAnchoredText) OnAfterUpdate(stage *Stage, _, frontLinkAnchoredText *LinkAnchoredText)

func (*LinkAnchoredText) Stage

func (linkanchoredtext *LinkAnchoredText) Stage(stage *Stage) *LinkAnchoredText

Stage puts linkanchoredtext to the model stage

func (*LinkAnchoredText) Unstage

func (linkanchoredtext *LinkAnchoredText) Unstage(stage *Stage) *LinkAnchoredText

Unstage removes linkanchoredtext off the model stage

func (*LinkAnchoredText) UnstageVoid

func (linkanchoredtext *LinkAnchoredText) UnstageVoid(stage *Stage)

UnstageVoid removes linkanchoredtext off the model stage

func (*LinkAnchoredText) WriteSVG

func (linkAnchoredText *LinkAnchoredText) WriteSVG(sb *strings.Builder, link *Link, segment *Segment)

type LinkAnchoredTextImplInterface

type LinkAnchoredTextImplInterface interface {

	// AnchoredTextUpdated function is called each time a AnchoredText is modified
	AnchoredTextUpdated(updatedAnchoredText *LinkAnchoredText)
}

type LinkAnchoredTextOrchestrator

type LinkAnchoredTextOrchestrator struct {
}

LinkAnchoredTextOrchestrator

func (*LinkAnchoredTextOrchestrator) OnAfterUpdate

func (orchestrator *LinkAnchoredTextOrchestrator) OnAfterUpdate(
	gongsvgStage *Stage,
	stagedLinkAnchoredText, backRepoLinkAnchoredText *LinkAnchoredText)

type LinkAnchoredText_WOP

type LinkAnchoredText_WOP struct {
	Name string

	Content string

	AutomaticLayout bool

	LinkAnchorType LinkAnchorType

	X_Offset float64

	Y_Offset float64

	FontWeight string

	FontSize string

	FontStyle string

	LetterSpacing string

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type LinkImplInterface

type LinkImplInterface interface {

	// LinkUpdated function is called each time a Link is modified
	LinkUpdated(updatedLink *Link)
}

type LinkOrchestrator

type LinkOrchestrator struct {
}

LinkOrchestrator

func (*LinkOrchestrator) OnAfterUpdate

func (orchestrator *LinkOrchestrator) OnAfterUpdate(
	gongsvgStage *Stage,
	stagedLink, backRepoLink *Link)

type LinkType

type LinkType string
const (
	LINK_TYPE_LINE_WITH_CONTROL_POINTS LinkType = "LINK_TYPE_LINE_WITH_CONTROL_POINTS"

	//  These connectors allow you to anchor the link at any point along the edge of the
	// shape, giving you more flexibility in connecting shapes while still maintaining
	// the orthogonal (vertical/horizontal) orientation of the connection lines.
	LINK_TYPE_FLOATING_ORTHOGONAL LinkType = "LINK_TYPE_FLOATING_ORTHOGONAL"
)

values for EnumType

func (LinkType) CodeValues

func (linktype LinkType) CodeValues() (res []string)

func (LinkType) Codes

func (linktype LinkType) Codes() (res []string)

func (*LinkType) FromCodeString

func (linktype *LinkType) FromCodeString(input string) (err error)

func (*LinkType) FromString

func (linktype *LinkType) FromString(input string) (err error)

func (*LinkType) ToCodeString

func (linktype *LinkType) ToCodeString() (res string)

func (LinkType) ToString

func (linktype LinkType) ToString() (res string)

Utility function for LinkType if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type Link_WOP struct {
	Name string

	Type LinkType

	IsBezierCurve bool

	StartAnchorType AnchorType

	EndAnchorType AnchorType

	StartOrientation OrientationType

	StartRatio float64

	EndOrientation OrientationType

	EndRatio float64

	CornerOffsetRatio float64

	CornerRadius float64

	HasEndArrow bool

	EndArrowSize float64

	HasStartArrow bool

	StartArrowSize float64

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type NamedStruct

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

func (*NamedStruct) GetName

func (namedStruct *NamedStruct) GetName() string

type OnAfterCreateInterface

type OnAfterCreateInterface[Type Gongstruct] interface {
	OnAfterCreate(stage *Stage,
		instance *Type)
}

OnAfterCreateInterface callback when an instance is updated from the front

type OnAfterDeleteInterface

type OnAfterDeleteInterface[Type Gongstruct] interface {
	OnAfterDelete(stage *Stage,
		staged, front *Type)
}

OnAfterDeleteInterface callback when an instance is updated from the front

type OnAfterReadInterface

type OnAfterReadInterface[Type Gongstruct] interface {
	OnAfterRead(stage *Stage,
		instance *Type)
}

OnAfterReadInterface callback when an instance is updated from the front

type OnAfterUpdateInterface

type OnAfterUpdateInterface[Type Gongstruct] interface {
	OnAfterUpdate(stage *Stage, old, new *Type)
}

OnAfterUpdateInterface callback when an instance is updated from the front

type OnInitCommitInterface

type OnInitCommitInterface interface {
	BeforeCommit(stage *Stage)
}

type OrientationType

type OrientationType string
const (
	ORIENTATION_HORIZONTAL OrientationType = "ORIENTATION_HORIZONTAL"
	ORIENTATION_VERTICAL   OrientationType = "ORIENTATION_VERTICAL"
)

values for EnumType

func (OrientationType) CodeValues

func (orientationtype OrientationType) CodeValues() (res []string)

func (OrientationType) Codes

func (orientationtype OrientationType) Codes() (res []string)

func (*OrientationType) FromCodeString

func (orientationtype *OrientationType) FromCodeString(input string) (err error)

func (*OrientationType) FromString

func (orientationtype *OrientationType) FromString(input string) (err error)

func (*OrientationType) ToCodeString

func (orientationtype *OrientationType) ToCodeString() (res string)

func (OrientationType) ToString

func (orientationtype OrientationType) ToString() (res string)

Utility function for OrientationType if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type Path

type Path struct {
	Name string

	// Definition
	//
	//
	// d="M 10,30
	// A 20,20 0,0,1 50,30
	// A 20,20 0,0,1 90,30
	// Q 90,60 50,90
	// Q 10,60 10,30 z" />
	//
	// MoveTo: M, m
	// LineTo: L, l, H, h, V, v
	// Cubic Bézier Curve: C, c, S, s
	// Quadratic Bézier Curve: Q, q, T, t
	// Elliptical Arc Curve: A, a
	// ClosePath: Z, z
	// gong:text gong:width 600
	Definition string
	Presentation
	Animates []*Animate
}

func CopyBranchPath

func CopyBranchPath(mapOrigCopy map[any]any, pathFrom *Path) (pathTo *Path)

func (*Path) Checkout

func (path *Path) Checkout(stage *Stage) *Path

Checkout path to the back repo (if it is already staged)

func (*Path) Commit

func (path *Path) Commit(stage *Stage) *Path

commit path to the back repo (if it is already staged)

func (*Path) CommitVoid

func (path *Path) CommitVoid(stage *Stage)

func (*Path) CopyBasicFields

func (from *Path) CopyBasicFields(to *Path)

func (*Path) GetName

func (path *Path) GetName() (res string)

for satisfaction of GongStruct interface

func (*Path) Stage

func (path *Path) Stage(stage *Stage) *Path

Stage puts path to the model stage

func (*Path) Unstage

func (path *Path) Unstage(stage *Stage) *Path

Unstage removes path off the model stage

func (*Path) UnstageVoid

func (path *Path) UnstageVoid(stage *Stage)

UnstageVoid removes path off the model stage

type PathContext

type PathContext struct {
	Path    *RectAnchoredPath
	AnchorX float64
	AnchorY float64
}

type Path_WOP

type Path_WOP struct {
	Name string

	Definition string

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type Point

type Point struct {
	Name string
	X, Y float64
}

func CopyBranchPoint

func CopyBranchPoint(mapOrigCopy map[any]any, pointFrom *Point) (pointTo *Point)

func (*Point) Checkout

func (point *Point) Checkout(stage *Stage) *Point

Checkout point to the back repo (if it is already staged)

func (*Point) Commit

func (point *Point) Commit(stage *Stage) *Point

commit point to the back repo (if it is already staged)

func (*Point) CommitVoid

func (point *Point) CommitVoid(stage *Stage)

func (*Point) CopyBasicFields

func (from *Point) CopyBasicFields(to *Point)

func (*Point) GetName

func (point *Point) GetName() (res string)

for satisfaction of GongStruct interface

func (*Point) Stage

func (point *Point) Stage(stage *Stage) *Point

Stage puts point to the model stage

func (*Point) Unstage

func (point *Point) Unstage(stage *Stage) *Point

Unstage removes point off the model stage

func (*Point) UnstageVoid

func (point *Point) UnstageVoid(stage *Stage)

UnstageVoid removes point off the model stage

type Point_WOP

type Point_WOP struct {
	Name string

	X float64

	Y float64
}

type PointerToGongstruct

type PointerToGongstruct interface {
	GetName() string
	CommitVoid(*Stage)
	UnstageVoid(stage *Stage)
	comparable
}

Gongstruct is the type parameter for generated generic function that allows - access to staged instances - navigation between staged instances by going backward association links between gongstruct - full refactoring of Gongstruct identifiers / fields

type PointerToGongstructEnumIntField

type PointerToGongstructEnumIntField interface {
	FromCodeString(input string) (err error)
}

type PointerToGongstructEnumStringField

type PointerToGongstructEnumStringField interface {
	FromCodeString(input string) (err error)
}

type Polygone

type Polygone struct {
	Name   string
	Points string
	Presentation
	Animates []*Animate
}

func CopyBranchPolygone

func CopyBranchPolygone(mapOrigCopy map[any]any, polygoneFrom *Polygone) (polygoneTo *Polygone)

func (*Polygone) Checkout

func (polygone *Polygone) Checkout(stage *Stage) *Polygone

Checkout polygone to the back repo (if it is already staged)

func (*Polygone) Commit

func (polygone *Polygone) Commit(stage *Stage) *Polygone

commit polygone to the back repo (if it is already staged)

func (*Polygone) CommitVoid

func (polygone *Polygone) CommitVoid(stage *Stage)

func (*Polygone) CopyBasicFields

func (from *Polygone) CopyBasicFields(to *Polygone)

func (*Polygone) GetName

func (polygone *Polygone) GetName() (res string)

for satisfaction of GongStruct interface

func (*Polygone) Stage

func (polygone *Polygone) Stage(stage *Stage) *Polygone

Stage puts polygone to the model stage

func (*Polygone) Unstage

func (polygone *Polygone) Unstage(stage *Stage) *Polygone

Unstage removes polygone off the model stage

func (*Polygone) UnstageVoid

func (polygone *Polygone) UnstageVoid(stage *Stage)

UnstageVoid removes polygone off the model stage

type Polygone_WOP

type Polygone_WOP struct {
	Name string

	Points string

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type Polyline

type Polyline struct {
	Name   string
	Points string
	Presentation
	Animates []*Animate
}

func CopyBranchPolyline

func CopyBranchPolyline(mapOrigCopy map[any]any, polylineFrom *Polyline) (polylineTo *Polyline)

func (*Polyline) Checkout

func (polyline *Polyline) Checkout(stage *Stage) *Polyline

Checkout polyline to the back repo (if it is already staged)

func (*Polyline) Commit

func (polyline *Polyline) Commit(stage *Stage) *Polyline

commit polyline to the back repo (if it is already staged)

func (*Polyline) CommitVoid

func (polyline *Polyline) CommitVoid(stage *Stage)

func (*Polyline) CopyBasicFields

func (from *Polyline) CopyBasicFields(to *Polyline)

func (*Polyline) GetName

func (polyline *Polyline) GetName() (res string)

for satisfaction of GongStruct interface

func (*Polyline) Stage

func (polyline *Polyline) Stage(stage *Stage) *Polyline

Stage puts polyline to the model stage

func (*Polyline) Unstage

func (polyline *Polyline) Unstage(stage *Stage) *Polyline

Unstage removes polyline off the model stage

func (*Polyline) UnstageVoid

func (polyline *Polyline) UnstageVoid(stage *Stage)

UnstageVoid removes polyline off the model stage

type Polyline_WOP

type Polyline_WOP struct {
	Name string

	Points string

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type PositionOnArrowType

type PositionOnArrowType string
const (
	POSITION_ON_ARROW_START PositionOnArrowType = "POSITION_ON_ARROW_START"
	POSITION_ON_ARROW_END   PositionOnArrowType = "POSITION_ON_ARROW_END"
)

values for EnumType

func (PositionOnArrowType) CodeValues

func (positiononarrowtype PositionOnArrowType) CodeValues() (res []string)

func (PositionOnArrowType) Codes

func (positiononarrowtype PositionOnArrowType) Codes() (res []string)

func (*PositionOnArrowType) FromCodeString

func (positiononarrowtype *PositionOnArrowType) FromCodeString(input string) (err error)

func (*PositionOnArrowType) FromString

func (positiononarrowtype *PositionOnArrowType) FromString(input string) (err error)

func (*PositionOnArrowType) ToCodeString

func (positiononarrowtype *PositionOnArrowType) ToCodeString() (res string)

func (PositionOnArrowType) ToString

func (positiononarrowtype PositionOnArrowType) ToString() (res string)

Utility function for PositionOnArrowType if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type Presentation

type Presentation struct {
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeOpacity               float64
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string

	// Transform is a string componding SVG transform
	//
	// for instance : rotate(-10 50 100)
	// translate(-36 45.5)
	// skewX(40)
	// scale(1 0.5)
	// gong:text gong:width 600 gong:height 400
	Transform string
}

func (*Presentation) WriteSVG

func (p *Presentation) WriteSVG(sb *strings.Builder)

type Rect

type Rect struct {
	Name string

	X, Y, Width, Height, RX float64
	Presentation

	Animations []*Animate

	IsSelectable bool // alllow selected
	IsSelected   bool

	CanHaveLeftHandle bool
	HasLeftHandle     bool

	CanHaveRightHandle bool
	HasRightHandle     bool

	CanHaveTopHandle bool
	HasTopHandle     bool

	IsScalingProportionally bool

	CanHaveBottomHandle bool
	HasBottomHandle     bool

	CanMoveHorizontaly bool
	CanMoveVerticaly   bool

	RectAnchoredTexts []*RectAnchoredText
	RectAnchoredRects []*RectAnchoredRect
	RectAnchoredPaths []*RectAnchoredPath

	ChangeColorWhenHovered bool
	ColorWhenHovered       string
	OriginalColor          string
	FillOpacityWhenHovered float64
	OriginalFillOpacity    float64

	HasToolTip  bool
	ToolTipText string

	Impl RectImplInterface
}

func CopyBranchRect

func CopyBranchRect(mapOrigCopy map[any]any, rectFrom *Rect) (rectTo *Rect)

func (*Rect) Checkout

func (rect *Rect) Checkout(stage *Stage) *Rect

Checkout rect to the back repo (if it is already staged)

func (*Rect) Commit

func (rect *Rect) Commit(stage *Stage) *Rect

commit rect to the back repo (if it is already staged)

func (*Rect) CommitVoid

func (rect *Rect) CommitVoid(stage *Stage)

func (*Rect) CopyBasicFields

func (from *Rect) CopyBasicFields(to *Rect)

func (*Rect) GetName

func (rect *Rect) GetName() (res string)

for satisfaction of GongStruct interface

func (*Rect) OnAfterUpdate

func (rect *Rect) OnAfterUpdate(stage *Stage, _, frontRect *Rect)

OnAfterUpdate, notice that rect == stagedRect

func (*Rect) Stage

func (rect *Rect) Stage(stage *Stage) *Rect

Stage puts rect to the model stage

func (*Rect) Unstage

func (rect *Rect) Unstage(stage *Stage) *Rect

Unstage removes rect off the model stage

func (*Rect) UnstageVoid

func (rect *Rect) UnstageVoid(stage *Stage)

UnstageVoid removes rect off the model stage

func (*Rect) WriteSVG

func (rect *Rect) WriteSVG(sb *strings.Builder) (maxX, maxY float64)

type RectAnchorType

type RectAnchorType string
const (
	RECT_TOP                RectAnchorType = "RECT_TOP"
	RECT_TOP_LEFT           RectAnchorType = "RECT_TOP_LEFT"
	RECT_TOP_RIGHT          RectAnchorType = "RECT_TOP_RIGHT"
	RECT_BOTTOM             RectAnchorType = "RECT_BOTTOM"
	RECT_BOTTOM_LEFT        RectAnchorType = "RECT_BOTTOM_LEFT"
	RECT_BOTTOM_LEFT_LEFT   RectAnchorType = "RECT_BOTTOM_LEFT_LEFT"
	RECT_BOTTOM_BOTTOM_LEFT RectAnchorType = "RECT_BOTTOM_BOTTOM_LEFT"
	RECT_BOTTOM_RIGHT       RectAnchorType = "RECT_BOTTOM_RIGHT"

	// the path is inside the shape, but on the right
	RECT_BOTTOM_INSIDE_RIGHT RectAnchorType = "RECT_BOTTOM_INSIDE_RIGHT"

	RECT_LEFT   RectAnchorType = "RECT_LEFT"
	RECT_RIGHT  RectAnchorType = "RECT_RIGHT"
	RECT_CENTER RectAnchorType = "RECT_CENTER"
)

values for EnumType

func (RectAnchorType) CodeValues

func (rectanchortype RectAnchorType) CodeValues() (res []string)

func (RectAnchorType) Codes

func (rectanchortype RectAnchorType) Codes() (res []string)

func (*RectAnchorType) FromCodeString

func (rectanchortype *RectAnchorType) FromCodeString(input string) (err error)

func (*RectAnchorType) FromString

func (rectanchortype *RectAnchorType) FromString(input string) (err error)

func (*RectAnchorType) ToCodeString

func (rectanchortype *RectAnchorType) ToCodeString() (res string)

func (RectAnchorType) ToString

func (rectanchortype RectAnchorType) ToString() (res string)

Utility function for RectAnchorType if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type RectAnchoredPath

type RectAnchoredPath struct {
	Name string

	Definition string

	X_Offset float64
	Y_Offset float64

	// gong:width 400
	RectAnchorType RectAnchorType

	// if true, rect has the same Dimension that the rect it is anchored to
	// rect must scale proportionnaly
	ScalePropotionnally bool

	// AppliedScaling is the scale that is applied is ScalePropotionnally is set
	// The value is initialized to 1 then scales with the scaling action
	// of the end user
	AppliedScaling float64

	Presentation
}

func CopyBranchRectAnchoredPath

func CopyBranchRectAnchoredPath(mapOrigCopy map[any]any, rectanchoredpathFrom *RectAnchoredPath) (rectanchoredpathTo *RectAnchoredPath)

func (*RectAnchoredPath) Checkout

func (rectanchoredpath *RectAnchoredPath) Checkout(stage *Stage) *RectAnchoredPath

Checkout rectanchoredpath to the back repo (if it is already staged)

func (*RectAnchoredPath) Commit

func (rectanchoredpath *RectAnchoredPath) Commit(stage *Stage) *RectAnchoredPath

commit rectanchoredpath to the back repo (if it is already staged)

func (*RectAnchoredPath) CommitVoid

func (rectanchoredpath *RectAnchoredPath) CommitVoid(stage *Stage)

func (*RectAnchoredPath) CopyBasicFields

func (from *RectAnchoredPath) CopyBasicFields(to *RectAnchoredPath)

func (*RectAnchoredPath) GetName

func (rectanchoredpath *RectAnchoredPath) GetName() (res string)

for satisfaction of GongStruct interface

func (*RectAnchoredPath) Stage

func (rectanchoredpath *RectAnchoredPath) Stage(stage *Stage) *RectAnchoredPath

Stage puts rectanchoredpath to the model stage

func (*RectAnchoredPath) Unstage

func (rectanchoredpath *RectAnchoredPath) Unstage(stage *Stage) *RectAnchoredPath

Unstage removes rectanchoredpath off the model stage

func (*RectAnchoredPath) UnstageVoid

func (rectanchoredpath *RectAnchoredPath) UnstageVoid(stage *Stage)

UnstageVoid removes rectanchoredpath off the model stage

func (*RectAnchoredPath) WriteSVG

func (rectAnchoredPath *RectAnchoredPath) WriteSVG(sb *strings.Builder, x, y float64) (maxX, maxY float64)

type RectAnchoredPath_WOP

type RectAnchoredPath_WOP struct {
	Name string

	Definition string

	X_Offset float64

	Y_Offset float64

	RectAnchorType RectAnchorType

	ScalePropotionnally bool

	AppliedScaling float64

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type RectAnchoredRect

type RectAnchoredRect struct {
	Name string

	X, Y, Width, Height, RX float64

	X_Offset float64
	Y_Offset float64

	RectAnchorType RectAnchorType

	// if true, rect has the same Dimension that the rect it is anchored to
	WidthFollowRect  bool
	HeightFollowRect bool

	HasToolTip  bool
	ToolTipText string

	Presentation
}

func CopyBranchRectAnchoredRect

func CopyBranchRectAnchoredRect(mapOrigCopy map[any]any, rectanchoredrectFrom *RectAnchoredRect) (rectanchoredrectTo *RectAnchoredRect)

func (*RectAnchoredRect) Checkout

func (rectanchoredrect *RectAnchoredRect) Checkout(stage *Stage) *RectAnchoredRect

Checkout rectanchoredrect to the back repo (if it is already staged)

func (*RectAnchoredRect) Commit

func (rectanchoredrect *RectAnchoredRect) Commit(stage *Stage) *RectAnchoredRect

commit rectanchoredrect to the back repo (if it is already staged)

func (*RectAnchoredRect) CommitVoid

func (rectanchoredrect *RectAnchoredRect) CommitVoid(stage *Stage)

func (*RectAnchoredRect) CopyBasicFields

func (from *RectAnchoredRect) CopyBasicFields(to *RectAnchoredRect)

func (*RectAnchoredRect) GetName

func (rectanchoredrect *RectAnchoredRect) GetName() (res string)

for satisfaction of GongStruct interface

func (*RectAnchoredRect) Stage

func (rectanchoredrect *RectAnchoredRect) Stage(stage *Stage) *RectAnchoredRect

Stage puts rectanchoredrect to the model stage

func (*RectAnchoredRect) Unstage

func (rectanchoredrect *RectAnchoredRect) Unstage(stage *Stage) *RectAnchoredRect

Unstage removes rectanchoredrect off the model stage

func (*RectAnchoredRect) UnstageVoid

func (rectanchoredrect *RectAnchoredRect) UnstageVoid(stage *Stage)

UnstageVoid removes rectanchoredrect off the model stage

func (*RectAnchoredRect) WriteSVG

func (rectAnchoredRect *RectAnchoredRect) WriteSVG(sb *strings.Builder, x, y float64) (maxX, maxY float64)

type RectAnchoredRect_WOP

type RectAnchoredRect_WOP struct {
	Name string

	X float64

	Y float64

	Width float64

	Height float64

	RX float64

	X_Offset float64

	Y_Offset float64

	RectAnchorType RectAnchorType

	WidthFollowRect bool

	HeightFollowRect bool

	HasToolTip bool

	ToolTipText string

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type RectAnchoredText

type RectAnchoredText struct {
	Name string

	//gong:text width:300 height:300
	Content string

	TextAttributes

	X_Offset float64
	Y_Offset float64

	RectAnchorType RectAnchorType
	TextAnchorType TextAnchorType

	WritingMode WritingMode

	Presentation
	Animates []*Animate
}

func CopyBranchRectAnchoredText

func CopyBranchRectAnchoredText(mapOrigCopy map[any]any, rectanchoredtextFrom *RectAnchoredText) (rectanchoredtextTo *RectAnchoredText)

func (*RectAnchoredText) Checkout

func (rectanchoredtext *RectAnchoredText) Checkout(stage *Stage) *RectAnchoredText

Checkout rectanchoredtext to the back repo (if it is already staged)

func (*RectAnchoredText) Commit

func (rectanchoredtext *RectAnchoredText) Commit(stage *Stage) *RectAnchoredText

commit rectanchoredtext to the back repo (if it is already staged)

func (*RectAnchoredText) CommitVoid

func (rectanchoredtext *RectAnchoredText) CommitVoid(stage *Stage)

func (*RectAnchoredText) CopyBasicFields

func (from *RectAnchoredText) CopyBasicFields(to *RectAnchoredText)

func (*RectAnchoredText) GetName

func (rectanchoredtext *RectAnchoredText) GetName() (res string)

for satisfaction of GongStruct interface

func (*RectAnchoredText) Stage

func (rectanchoredtext *RectAnchoredText) Stage(stage *Stage) *RectAnchoredText

Stage puts rectanchoredtext to the model stage

func (*RectAnchoredText) Unstage

func (rectanchoredtext *RectAnchoredText) Unstage(stage *Stage) *RectAnchoredText

Unstage removes rectanchoredtext off the model stage

func (*RectAnchoredText) UnstageVoid

func (rectanchoredtext *RectAnchoredText) UnstageVoid(stage *Stage)

UnstageVoid removes rectanchoredtext off the model stage

func (*RectAnchoredText) WriteSVG

func (rectAnchoredText *RectAnchoredText) WriteSVG(sb *strings.Builder, x, y float64)

type RectAnchoredText_WOP

type RectAnchoredText_WOP struct {
	Name string

	Content string

	FontWeight string

	FontSize string

	FontStyle string

	LetterSpacing string

	X_Offset float64

	Y_Offset float64

	RectAnchorType RectAnchorType

	TextAnchorType TextAnchorType

	WritingMode WritingMode

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type RectContext

type RectContext struct {
	Rect    *RectAnchoredRect
	AnchorX float64
	AnchorY float64
	Width   float64
}

type RectImplInterface

type RectImplInterface interface {

	// RectUpdated function is called each time a Rect is modified
	RectUpdated(updatedRect *Rect)
}
type RectLinkLink struct {
	Name  string
	Start *Rect
	End   *Link

	// TargetAnchorPosition defines the anchor point on the target link between
	// the start and and the end rectangle
	// 0 zero means the anchor is on the anchor at the start rectangle and 1 means the anchor is on the anchor on the end rectangle
	TargetAnchorPosition float64

	Presentation
}

RectLinkLink define a link between a rectangle and a target link

func CopyBranchRectLinkLink(mapOrigCopy map[any]any, rectlinklinkFrom *RectLinkLink) (rectlinklinkTo *RectLinkLink)

func (*RectLinkLink) Checkout

func (rectlinklink *RectLinkLink) Checkout(stage *Stage) *RectLinkLink

Checkout rectlinklink to the back repo (if it is already staged)

func (*RectLinkLink) Commit

func (rectlinklink *RectLinkLink) Commit(stage *Stage) *RectLinkLink

commit rectlinklink to the back repo (if it is already staged)

func (*RectLinkLink) CommitVoid

func (rectlinklink *RectLinkLink) CommitVoid(stage *Stage)

func (*RectLinkLink) CopyBasicFields

func (from *RectLinkLink) CopyBasicFields(to *RectLinkLink)

func (*RectLinkLink) GetName

func (rectlinklink *RectLinkLink) GetName() (res string)

for satisfaction of GongStruct interface

func (*RectLinkLink) Stage

func (rectlinklink *RectLinkLink) Stage(stage *Stage) *RectLinkLink

Stage puts rectlinklink to the model stage

func (*RectLinkLink) Unstage

func (rectlinklink *RectLinkLink) Unstage(stage *Stage) *RectLinkLink

Unstage removes rectlinklink off the model stage

func (*RectLinkLink) UnstageVoid

func (rectlinklink *RectLinkLink) UnstageVoid(stage *Stage)

UnstageVoid removes rectlinklink off the model stage

type RectLinkLink_WOP struct {
	Name string

	TargetAnchorPosition float64

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string
}

type RectOrchestrator

type RectOrchestrator struct {
}

RectOrchestrator

func (*RectOrchestrator) OnAfterUpdate

func (orchestrator *RectOrchestrator) OnAfterUpdate(
	gongsvgStage *Stage,
	stagedRect, backRepoRect *Rect)

type Rect_WOP

type Rect_WOP struct {
	Name string

	X float64

	Y float64

	Width float64

	Height float64

	RX float64

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string

	IsSelectable bool

	IsSelected bool

	CanHaveLeftHandle bool

	HasLeftHandle bool

	CanHaveRightHandle bool

	HasRightHandle bool

	CanHaveTopHandle bool

	HasTopHandle bool

	IsScalingProportionally bool

	CanHaveBottomHandle bool

	HasBottomHandle bool

	CanMoveHorizontaly bool

	CanMoveVerticaly bool

	ChangeColorWhenHovered bool

	ColorWhenHovered string

	OriginalColor string

	FillOpacityWhenHovered float64

	OriginalFillOpacity float64

	HasToolTip bool

	ToolTipText string
}

type ReverseField

type ReverseField struct {
	GongstructName string
	Fieldname      string
}

func GetReverseFields

func GetReverseFields[Type Gongstruct]() (res []ReverseField)

type SVG

type SVG struct {
	Name   string
	Layers []*Layer

	// Drawing indicates wether it draws the line
	DrawingState DrawingState

	// When the mouse is up on the end rect, the SVG backend will create the link
	// between both rects
	StartRect *Rect
	EndRect   *Rect

	IsEditable bool

	// IsSVGFrontEndFileGenerated means the SVG file is grabbed from the rendering engine
	// and is download with a <name of the svg>.svg
	IsSVGFrontEndFileGenerated bool

	// IsSVGBackEndFileGenerated means the SVG file is grabbed from the rendering engine
	// and is download with a <name of the svg>.svg
	IsSVGBackEndFileGenerated          bool
	DefaultDirectoryForGeneratedImages string

	Impl SVGImplInterface

	// IsControlBannerHidden control the appearance of the control banner on top of the svg
	// it can be usefull if one does not need to control the zoom, shift x and shift y, ...
	IsControlBannerHidden bool
}

func CopyBranchSVG

func CopyBranchSVG(mapOrigCopy map[any]any, svgFrom *SVG) (svgTo *SVG)

func GrabGeneratedSVGFile

func GrabGeneratedSVGFile(stage *Stage, imageFilePath string, timeout time.Duration) (*SVG, error)

GrabGeneratedSVGFile waits for the SVG text content to be updated via the proxy, receives the text through a channel, writes it to a file, and handles timeouts/errors. It returns the svg instance processed and an error if any step failed.

func (*SVG) Checkout

func (svg *SVG) Checkout(stage *Stage) *SVG

Checkout svg to the back repo (if it is already staged)

func (*SVG) Commit

func (svg *SVG) Commit(stage *Stage) *SVG

commit svg to the back repo (if it is already staged)

func (*SVG) CommitVoid

func (svg *SVG) CommitVoid(stage *Stage)

func (*SVG) CopyBasicFields

func (from *SVG) CopyBasicFields(to *SVG)

func (*SVG) GenerateFile

func (svg *SVG) GenerateFile(pathToFile string) (err error, maxX, maxY float64)

GenerateFile generates an SVG file that represents the content of the SVG object.

func (*SVG) GetName

func (svg *SVG) GetName() (res string)

for satisfaction of GongStruct interface

func (*SVG) OnAfterUpdate

func (svg *SVG) OnAfterUpdate(stage *Stage, _, frontSVG *SVG)

OnAfterUpdate, notice that rect == stagedRect

func (*SVG) Stage

func (svg *SVG) Stage(stage *Stage) *SVG

Stage puts svg to the model stage

func (*SVG) Unstage

func (svg *SVG) Unstage(stage *Stage) *SVG

Unstage removes svg off the model stage

func (*SVG) UnstageVoid

func (svg *SVG) UnstageVoid(stage *Stage)

UnstageVoid removes svg off the model stage

type SVGImplInterface

type SVGImplInterface interface {

	// SVGUpdated function is called each time a SVG is modified
	SVGUpdated(updatedSVG *SVG)
}

type SVGOrchestrator

type SVGOrchestrator struct {
}

SVGOrchestrator

func (*SVGOrchestrator) OnAfterUpdate

func (orchestrator *SVGOrchestrator) OnAfterUpdate(
	gongsvgStage *Stage,
	stagedSVG, backRepoSVG *SVG)

type SVG_WOP

type SVG_WOP struct {
	Name string

	DrawingState DrawingState

	IsEditable bool

	IsSVGFrontEndFileGenerated bool

	IsSVGBackEndFileGenerated bool

	DefaultDirectoryForGeneratedImages string

	IsControlBannerHidden bool
}

type Segment

type Segment struct {
	StartPoint              Point
	EndPoint                Point
	StartPointWithoutRadius Point
	EndPointWithoutRadius   Point
	Orientation             OrientationType
	Number                  int
	Type                    SegmentType
}

func (*Segment) WriteSVG

func (segment *Segment) WriteSVG(sb *strings.Builder, link *Link) (maxX, maxY float64)

type SegmentType

type SegmentType string
const (
	StartSegment  SegmentType = "Start Segment"
	MiddleSegment SegmentType = "Middle Segment"
	EndSegment    SegmentType = "End Segment"
)

func (SegmentType) CodeValues

func (segmenttype SegmentType) CodeValues() (res []string)

func (SegmentType) Codes

func (segmenttype SegmentType) Codes() (res []string)

func (*SegmentType) FromCodeString

func (segmenttype *SegmentType) FromCodeString(input string) (err error)

func (*SegmentType) FromString

func (segmenttype *SegmentType) FromString(input string) (err error)

func (*SegmentType) ToCodeString

func (segmenttype *SegmentType) ToCodeString() (res string)

func (SegmentType) ToString

func (segmenttype SegmentType) ToString() (res string)

Utility function for SegmentType if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type SideType

type SideType string
const (
	SIDE_TOP    SideType = "SIDE_TOP"
	SIDE_BOTTOM SideType = "SIDE_BOTTOM"
	SIDE_LEFT   SideType = "SIDE_LEFT"
	SIDE_RIGHT  SideType = "SIDE_RIGHT"
)

values for EnumType

func (SideType) CodeValues

func (sidetype SideType) CodeValues() (res []string)

func (SideType) Codes

func (sidetype SideType) Codes() (res []string)

func (*SideType) FromCodeString

func (sidetype *SideType) FromCodeString(input string) (err error)

func (*SideType) FromString

func (sidetype *SideType) FromString(input string) (err error)

func (*SideType) ToCodeString

func (sidetype *SideType) ToCodeString() (res string)

func (SideType) ToString

func (sidetype SideType) ToString() (res string)

Utility function for SideType if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type StackName

type StackName string

StackName -

const (
	StackNameDefault StackName = "gongsvg" // this is the value generated in the main
)

values for TableName

func (StackName) CodeValues

func (stackname StackName) CodeValues() (res []string)

func (StackName) Codes

func (stackname StackName) Codes() (res []string)

func (*StackName) FromCodeString

func (stackname *StackName) FromCodeString(input string) (err error)

func (*StackName) FromString

func (stackname *StackName) FromString(input string) (err error)

func (*StackName) ToCodeString

func (stackname *StackName) ToCodeString() (res string)

func (StackName) ToString

func (stackname StackName) ToString() (res string)

Utility function for StackName if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type Stage

type Stage struct {

	// insertion point for definition of arrays registering instances
	Animates           map[*Animate]any
	Animates_mapString map[string]*Animate

	// insertion point for slice of pointers maps
	OnAfterAnimateCreateCallback OnAfterCreateInterface[Animate]
	OnAfterAnimateUpdateCallback OnAfterUpdateInterface[Animate]
	OnAfterAnimateDeleteCallback OnAfterDeleteInterface[Animate]
	OnAfterAnimateReadCallback   OnAfterReadInterface[Animate]

	Circles           map[*Circle]any
	Circles_mapString map[string]*Circle

	// insertion point for slice of pointers maps
	Circle_Animations_reverseMap map[*Animate]*Circle

	OnAfterCircleCreateCallback OnAfterCreateInterface[Circle]
	OnAfterCircleUpdateCallback OnAfterUpdateInterface[Circle]
	OnAfterCircleDeleteCallback OnAfterDeleteInterface[Circle]
	OnAfterCircleReadCallback   OnAfterReadInterface[Circle]

	Ellipses           map[*Ellipse]any
	Ellipses_mapString map[string]*Ellipse

	// insertion point for slice of pointers maps
	Ellipse_Animates_reverseMap map[*Animate]*Ellipse

	OnAfterEllipseCreateCallback OnAfterCreateInterface[Ellipse]
	OnAfterEllipseUpdateCallback OnAfterUpdateInterface[Ellipse]
	OnAfterEllipseDeleteCallback OnAfterDeleteInterface[Ellipse]
	OnAfterEllipseReadCallback   OnAfterReadInterface[Ellipse]

	Layers           map[*Layer]any
	Layers_mapString map[string]*Layer

	// insertion point for slice of pointers maps
	Layer_Rects_reverseMap map[*Rect]*Layer

	Layer_Texts_reverseMap map[*Text]*Layer

	Layer_Circles_reverseMap map[*Circle]*Layer

	Layer_Lines_reverseMap map[*Line]*Layer

	Layer_Ellipses_reverseMap map[*Ellipse]*Layer

	Layer_Polylines_reverseMap map[*Polyline]*Layer

	Layer_Polygones_reverseMap map[*Polygone]*Layer

	Layer_Paths_reverseMap map[*Path]*Layer

	Layer_Links_reverseMap map[*Link]*Layer

	Layer_RectLinkLinks_reverseMap map[*RectLinkLink]*Layer

	OnAfterLayerCreateCallback OnAfterCreateInterface[Layer]
	OnAfterLayerUpdateCallback OnAfterUpdateInterface[Layer]
	OnAfterLayerDeleteCallback OnAfterDeleteInterface[Layer]
	OnAfterLayerReadCallback   OnAfterReadInterface[Layer]

	Lines           map[*Line]any
	Lines_mapString map[string]*Line

	// insertion point for slice of pointers maps
	Line_Animates_reverseMap map[*Animate]*Line

	OnAfterLineCreateCallback OnAfterCreateInterface[Line]
	OnAfterLineUpdateCallback OnAfterUpdateInterface[Line]
	OnAfterLineDeleteCallback OnAfterDeleteInterface[Line]
	OnAfterLineReadCallback   OnAfterReadInterface[Line]

	Links           map[*Link]any
	Links_mapString map[string]*Link

	// insertion point for slice of pointers maps
	Link_TextAtArrowStart_reverseMap map[*LinkAnchoredText]*Link

	Link_TextAtArrowEnd_reverseMap map[*LinkAnchoredText]*Link

	Link_ControlPoints_reverseMap map[*Point]*Link

	OnAfterLinkCreateCallback OnAfterCreateInterface[Link]
	OnAfterLinkUpdateCallback OnAfterUpdateInterface[Link]
	OnAfterLinkDeleteCallback OnAfterDeleteInterface[Link]
	OnAfterLinkReadCallback   OnAfterReadInterface[Link]

	LinkAnchoredTexts           map[*LinkAnchoredText]any
	LinkAnchoredTexts_mapString map[string]*LinkAnchoredText

	// insertion point for slice of pointers maps
	LinkAnchoredText_Animates_reverseMap map[*Animate]*LinkAnchoredText

	OnAfterLinkAnchoredTextCreateCallback OnAfterCreateInterface[LinkAnchoredText]
	OnAfterLinkAnchoredTextUpdateCallback OnAfterUpdateInterface[LinkAnchoredText]
	OnAfterLinkAnchoredTextDeleteCallback OnAfterDeleteInterface[LinkAnchoredText]
	OnAfterLinkAnchoredTextReadCallback   OnAfterReadInterface[LinkAnchoredText]

	Paths           map[*Path]any
	Paths_mapString map[string]*Path

	// insertion point for slice of pointers maps
	Path_Animates_reverseMap map[*Animate]*Path

	OnAfterPathCreateCallback OnAfterCreateInterface[Path]
	OnAfterPathUpdateCallback OnAfterUpdateInterface[Path]
	OnAfterPathDeleteCallback OnAfterDeleteInterface[Path]
	OnAfterPathReadCallback   OnAfterReadInterface[Path]

	Points           map[*Point]any
	Points_mapString map[string]*Point

	// insertion point for slice of pointers maps
	OnAfterPointCreateCallback OnAfterCreateInterface[Point]
	OnAfterPointUpdateCallback OnAfterUpdateInterface[Point]
	OnAfterPointDeleteCallback OnAfterDeleteInterface[Point]
	OnAfterPointReadCallback   OnAfterReadInterface[Point]

	Polygones           map[*Polygone]any
	Polygones_mapString map[string]*Polygone

	// insertion point for slice of pointers maps
	Polygone_Animates_reverseMap map[*Animate]*Polygone

	OnAfterPolygoneCreateCallback OnAfterCreateInterface[Polygone]
	OnAfterPolygoneUpdateCallback OnAfterUpdateInterface[Polygone]
	OnAfterPolygoneDeleteCallback OnAfterDeleteInterface[Polygone]
	OnAfterPolygoneReadCallback   OnAfterReadInterface[Polygone]

	Polylines           map[*Polyline]any
	Polylines_mapString map[string]*Polyline

	// insertion point for slice of pointers maps
	Polyline_Animates_reverseMap map[*Animate]*Polyline

	OnAfterPolylineCreateCallback OnAfterCreateInterface[Polyline]
	OnAfterPolylineUpdateCallback OnAfterUpdateInterface[Polyline]
	OnAfterPolylineDeleteCallback OnAfterDeleteInterface[Polyline]
	OnAfterPolylineReadCallback   OnAfterReadInterface[Polyline]

	Rects           map[*Rect]any
	Rects_mapString map[string]*Rect

	// insertion point for slice of pointers maps
	Rect_Animations_reverseMap map[*Animate]*Rect

	Rect_RectAnchoredTexts_reverseMap map[*RectAnchoredText]*Rect

	Rect_RectAnchoredRects_reverseMap map[*RectAnchoredRect]*Rect

	Rect_RectAnchoredPaths_reverseMap map[*RectAnchoredPath]*Rect

	OnAfterRectCreateCallback OnAfterCreateInterface[Rect]
	OnAfterRectUpdateCallback OnAfterUpdateInterface[Rect]
	OnAfterRectDeleteCallback OnAfterDeleteInterface[Rect]
	OnAfterRectReadCallback   OnAfterReadInterface[Rect]

	RectAnchoredPaths           map[*RectAnchoredPath]any
	RectAnchoredPaths_mapString map[string]*RectAnchoredPath

	// insertion point for slice of pointers maps
	OnAfterRectAnchoredPathCreateCallback OnAfterCreateInterface[RectAnchoredPath]
	OnAfterRectAnchoredPathUpdateCallback OnAfterUpdateInterface[RectAnchoredPath]
	OnAfterRectAnchoredPathDeleteCallback OnAfterDeleteInterface[RectAnchoredPath]
	OnAfterRectAnchoredPathReadCallback   OnAfterReadInterface[RectAnchoredPath]

	RectAnchoredRects           map[*RectAnchoredRect]any
	RectAnchoredRects_mapString map[string]*RectAnchoredRect

	// insertion point for slice of pointers maps
	OnAfterRectAnchoredRectCreateCallback OnAfterCreateInterface[RectAnchoredRect]
	OnAfterRectAnchoredRectUpdateCallback OnAfterUpdateInterface[RectAnchoredRect]
	OnAfterRectAnchoredRectDeleteCallback OnAfterDeleteInterface[RectAnchoredRect]
	OnAfterRectAnchoredRectReadCallback   OnAfterReadInterface[RectAnchoredRect]

	RectAnchoredTexts           map[*RectAnchoredText]any
	RectAnchoredTexts_mapString map[string]*RectAnchoredText

	// insertion point for slice of pointers maps
	RectAnchoredText_Animates_reverseMap map[*Animate]*RectAnchoredText

	OnAfterRectAnchoredTextCreateCallback OnAfterCreateInterface[RectAnchoredText]
	OnAfterRectAnchoredTextUpdateCallback OnAfterUpdateInterface[RectAnchoredText]
	OnAfterRectAnchoredTextDeleteCallback OnAfterDeleteInterface[RectAnchoredText]
	OnAfterRectAnchoredTextReadCallback   OnAfterReadInterface[RectAnchoredText]

	RectLinkLinks           map[*RectLinkLink]any
	RectLinkLinks_mapString map[string]*RectLinkLink

	// insertion point for slice of pointers maps
	OnAfterRectLinkLinkCreateCallback OnAfterCreateInterface[RectLinkLink]
	OnAfterRectLinkLinkUpdateCallback OnAfterUpdateInterface[RectLinkLink]
	OnAfterRectLinkLinkDeleteCallback OnAfterDeleteInterface[RectLinkLink]
	OnAfterRectLinkLinkReadCallback   OnAfterReadInterface[RectLinkLink]

	SVGs           map[*SVG]any
	SVGs_mapString map[string]*SVG

	// insertion point for slice of pointers maps
	SVG_Layers_reverseMap map[*Layer]*SVG

	OnAfterSVGCreateCallback OnAfterCreateInterface[SVG]
	OnAfterSVGUpdateCallback OnAfterUpdateInterface[SVG]
	OnAfterSVGDeleteCallback OnAfterDeleteInterface[SVG]
	OnAfterSVGReadCallback   OnAfterReadInterface[SVG]

	SvgTexts           map[*SvgText]any
	SvgTexts_mapString map[string]*SvgText

	// insertion point for slice of pointers maps
	OnAfterSvgTextCreateCallback OnAfterCreateInterface[SvgText]
	OnAfterSvgTextUpdateCallback OnAfterUpdateInterface[SvgText]
	OnAfterSvgTextDeleteCallback OnAfterDeleteInterface[SvgText]
	OnAfterSvgTextReadCallback   OnAfterReadInterface[SvgText]

	Texts           map[*Text]any
	Texts_mapString map[string]*Text

	// insertion point for slice of pointers maps
	Text_Animates_reverseMap map[*Animate]*Text

	OnAfterTextCreateCallback OnAfterCreateInterface[Text]
	OnAfterTextUpdateCallback OnAfterUpdateInterface[Text]
	OnAfterTextDeleteCallback OnAfterDeleteInterface[Text]
	OnAfterTextReadCallback   OnAfterReadInterface[Text]

	AllModelsStructCreateCallback AllModelsStructCreateInterface

	AllModelsStructDeleteCallback AllModelsStructDeleteInterface

	BackRepo BackRepoInterface

	// if set will be called before each commit to the back repo
	OnInitCommitCallback          OnInitCommitInterface
	OnInitCommitFromFrontCallback OnInitCommitInterface
	OnInitCommitFromBackCallback  OnInitCommitInterface

	// store the number of instance per gongstruct
	Map_GongStructName_InstancesNb map[string]int

	// store meta package import
	MetaPackageImportPath  string
	MetaPackageImportAlias string

	// to be removed after fix of [issue](https://github.com/golang/go/issues/57559)
	// map to enable docLink renaming when an identifier is renamed
	Map_DocLink_Renaming map[string]GONG__Identifier

	// store the stage order of each instance in order to
	// preserve this order when serializing them
	// insertion point for order fields declaration
	AnimateOrder            uint
	AnimateMap_Staged_Order map[*Animate]uint

	CircleOrder            uint
	CircleMap_Staged_Order map[*Circle]uint

	EllipseOrder            uint
	EllipseMap_Staged_Order map[*Ellipse]uint

	LayerOrder            uint
	LayerMap_Staged_Order map[*Layer]uint

	LineOrder            uint
	LineMap_Staged_Order map[*Line]uint

	LinkOrder            uint
	LinkMap_Staged_Order map[*Link]uint

	LinkAnchoredTextOrder            uint
	LinkAnchoredTextMap_Staged_Order map[*LinkAnchoredText]uint

	PathOrder            uint
	PathMap_Staged_Order map[*Path]uint

	PointOrder            uint
	PointMap_Staged_Order map[*Point]uint

	PolygoneOrder            uint
	PolygoneMap_Staged_Order map[*Polygone]uint

	PolylineOrder            uint
	PolylineMap_Staged_Order map[*Polyline]uint

	RectOrder            uint
	RectMap_Staged_Order map[*Rect]uint

	RectAnchoredPathOrder            uint
	RectAnchoredPathMap_Staged_Order map[*RectAnchoredPath]uint

	RectAnchoredRectOrder            uint
	RectAnchoredRectMap_Staged_Order map[*RectAnchoredRect]uint

	RectAnchoredTextOrder            uint
	RectAnchoredTextMap_Staged_Order map[*RectAnchoredText]uint

	RectLinkLinkOrder            uint
	RectLinkLinkMap_Staged_Order map[*RectLinkLink]uint

	SVGOrder            uint
	SVGMap_Staged_Order map[*SVG]uint

	SvgTextOrder            uint
	SvgTextMap_Staged_Order map[*SvgText]uint

	TextOrder            uint
	TextMap_Staged_Order map[*Text]uint

	NamedStructs []*NamedStruct
	// contains filtered or unexported fields
}

Stage enables storage of staged instances swagger:ignore

func NewStage

func NewStage(name string) (stage *Stage)

func (*Stage) Backup

func (stage *Stage) Backup(dirPath string)

backup generates backup files in the dirPath

func (*Stage) BackupXL

func (stage *Stage) BackupXL(dirPath string)

backup generates backup files in the dirPath

func (*Stage) Checkout

func (stage *Stage) Checkout()

func (*Stage) Commit

func (stage *Stage) Commit()

func (*Stage) CommitWithSuspendedCallbacks

func (stage *Stage) CommitWithSuspendedCallbacks()

func (*Stage) ComputeReverseMaps

func (stage *Stage) ComputeReverseMaps()

ComputeReverseMaps computes the reverse map, for all intances, for all slice to pointers field Its complexity is in O(n)O(p) where p is the number of pointers

func (*Stage) GetCommitId

func (stage *Stage) GetCommitId() uint

func (*Stage) GetCommitTS

func (stage *Stage) GetCommitTS() time.Time

func (*Stage) GetDigramsEmbededDir

func (stage *Stage) GetDigramsEmbededDir() embed.FS

func (*Stage) GetMap_GongStructName_InstancesNb

func (stage *Stage) GetMap_GongStructName_InstancesNb() map[string]int

func (*Stage) GetModelsEmbededDir

func (stage *Stage) GetModelsEmbededDir() embed.FS

func (*Stage) GetName

func (stage *Stage) GetName() string

func (*Stage) GetNamedStructNamesByOrder

func (stage *Stage) GetNamedStructNamesByOrder(namedStructName string) (res []string)

func (*Stage) GetNamedStructsNames

func (stage *Stage) GetNamedStructsNames() (res []string)

GetNamedStructs implements models.ProbebStage.

func (*Stage) GetProbeFormStageName

func (stage *Stage) GetProbeFormStageName() string

func (*Stage) GetProbeSplitStageName

func (stage *Stage) GetProbeSplitStageName() string

func (*Stage) GetProbeTableStageName

func (stage *Stage) GetProbeTableStageName() string

func (*Stage) GetProbeTreeSidebarStageName

func (stage *Stage) GetProbeTreeSidebarStageName() string

func (*Stage) GetType

func (stage *Stage) GetType() string

func (*Stage) IsStagedAnimate

func (stage *Stage) IsStagedAnimate(animate *Animate) (ok bool)

insertion point for stage per struct

func (*Stage) IsStagedCircle

func (stage *Stage) IsStagedCircle(circle *Circle) (ok bool)

func (*Stage) IsStagedEllipse

func (stage *Stage) IsStagedEllipse(ellipse *Ellipse) (ok bool)

func (*Stage) IsStagedLayer

func (stage *Stage) IsStagedLayer(layer *Layer) (ok bool)

func (*Stage) IsStagedLine

func (stage *Stage) IsStagedLine(line *Line) (ok bool)
func (stage *Stage) IsStagedLink(link *Link) (ok bool)

func (*Stage) IsStagedLinkAnchoredText

func (stage *Stage) IsStagedLinkAnchoredText(linkanchoredtext *LinkAnchoredText) (ok bool)

func (*Stage) IsStagedPath

func (stage *Stage) IsStagedPath(path *Path) (ok bool)

func (*Stage) IsStagedPoint

func (stage *Stage) IsStagedPoint(point *Point) (ok bool)

func (*Stage) IsStagedPolygone

func (stage *Stage) IsStagedPolygone(polygone *Polygone) (ok bool)

func (*Stage) IsStagedPolyline

func (stage *Stage) IsStagedPolyline(polyline *Polyline) (ok bool)

func (*Stage) IsStagedRect

func (stage *Stage) IsStagedRect(rect *Rect) (ok bool)

func (*Stage) IsStagedRectAnchoredPath

func (stage *Stage) IsStagedRectAnchoredPath(rectanchoredpath *RectAnchoredPath) (ok bool)

func (*Stage) IsStagedRectAnchoredRect

func (stage *Stage) IsStagedRectAnchoredRect(rectanchoredrect *RectAnchoredRect) (ok bool)

func (*Stage) IsStagedRectAnchoredText

func (stage *Stage) IsStagedRectAnchoredText(rectanchoredtext *RectAnchoredText) (ok bool)
func (stage *Stage) IsStagedRectLinkLink(rectlinklink *RectLinkLink) (ok bool)

func (*Stage) IsStagedSVG

func (stage *Stage) IsStagedSVG(svg *SVG) (ok bool)

func (*Stage) IsStagedSvgText

func (stage *Stage) IsStagedSvgText(svgtext *SvgText) (ok bool)

func (*Stage) IsStagedText

func (stage *Stage) IsStagedText(text *Text) (ok bool)

func (*Stage) Marshall

func (stage *Stage) Marshall(file *os.File, modelsPackageName, packageName string)

Marshall marshall the stage content into the file as an instanciation into a stage

func (*Stage) Nil

func (stage *Stage) Nil()

func (*Stage) Reset

func (stage *Stage) Reset()

func (*Stage) Restore

func (stage *Stage) Restore(dirPath string)

Restore resets Stage & BackRepo and restores their content from the restore files in dirPath

func (*Stage) RestoreXL

func (stage *Stage) RestoreXL(dirPath string)

Restore resets Stage & BackRepo and restores their content from the restore files in dirPath

func (*Stage) SetGeneratesDiff

func (stage *Stage) SetGeneratesDiff(generatesDiff bool)

func (*Stage) StageBranchAnimate

func (stage *Stage) StageBranchAnimate(animate *Animate)

insertion point for stage branch per struct

func (*Stage) StageBranchCircle

func (stage *Stage) StageBranchCircle(circle *Circle)

func (*Stage) StageBranchEllipse

func (stage *Stage) StageBranchEllipse(ellipse *Ellipse)

func (*Stage) StageBranchLayer

func (stage *Stage) StageBranchLayer(layer *Layer)

func (*Stage) StageBranchLine

func (stage *Stage) StageBranchLine(line *Line)
func (stage *Stage) StageBranchLink(link *Link)

func (*Stage) StageBranchLinkAnchoredText

func (stage *Stage) StageBranchLinkAnchoredText(linkanchoredtext *LinkAnchoredText)

func (*Stage) StageBranchPath

func (stage *Stage) StageBranchPath(path *Path)

func (*Stage) StageBranchPoint

func (stage *Stage) StageBranchPoint(point *Point)

func (*Stage) StageBranchPolygone

func (stage *Stage) StageBranchPolygone(polygone *Polygone)

func (*Stage) StageBranchPolyline

func (stage *Stage) StageBranchPolyline(polyline *Polyline)

func (*Stage) StageBranchRect

func (stage *Stage) StageBranchRect(rect *Rect)

func (*Stage) StageBranchRectAnchoredPath

func (stage *Stage) StageBranchRectAnchoredPath(rectanchoredpath *RectAnchoredPath)

func (*Stage) StageBranchRectAnchoredRect

func (stage *Stage) StageBranchRectAnchoredRect(rectanchoredrect *RectAnchoredRect)

func (*Stage) StageBranchRectAnchoredText

func (stage *Stage) StageBranchRectAnchoredText(rectanchoredtext *RectAnchoredText)
func (stage *Stage) StageBranchRectLinkLink(rectlinklink *RectLinkLink)

func (*Stage) StageBranchSVG

func (stage *Stage) StageBranchSVG(svg *SVG)

func (*Stage) StageBranchSvgText

func (stage *Stage) StageBranchSvgText(svgtext *SvgText)

func (*Stage) StageBranchText

func (stage *Stage) StageBranchText(text *Text)

func (*Stage) Unstage

func (stage *Stage) Unstage()

func (*Stage) UnstageBranchAnimate

func (stage *Stage) UnstageBranchAnimate(animate *Animate)

insertion point for unstage branch per struct

func (*Stage) UnstageBranchCircle

func (stage *Stage) UnstageBranchCircle(circle *Circle)

func (*Stage) UnstageBranchEllipse

func (stage *Stage) UnstageBranchEllipse(ellipse *Ellipse)

func (*Stage) UnstageBranchLayer

func (stage *Stage) UnstageBranchLayer(layer *Layer)

func (*Stage) UnstageBranchLine

func (stage *Stage) UnstageBranchLine(line *Line)
func (stage *Stage) UnstageBranchLink(link *Link)

func (*Stage) UnstageBranchLinkAnchoredText

func (stage *Stage) UnstageBranchLinkAnchoredText(linkanchoredtext *LinkAnchoredText)

func (*Stage) UnstageBranchPath

func (stage *Stage) UnstageBranchPath(path *Path)

func (*Stage) UnstageBranchPoint

func (stage *Stage) UnstageBranchPoint(point *Point)

func (*Stage) UnstageBranchPolygone

func (stage *Stage) UnstageBranchPolygone(polygone *Polygone)

func (*Stage) UnstageBranchPolyline

func (stage *Stage) UnstageBranchPolyline(polyline *Polyline)

func (*Stage) UnstageBranchRect

func (stage *Stage) UnstageBranchRect(rect *Rect)

func (*Stage) UnstageBranchRectAnchoredPath

func (stage *Stage) UnstageBranchRectAnchoredPath(rectanchoredpath *RectAnchoredPath)

func (*Stage) UnstageBranchRectAnchoredRect

func (stage *Stage) UnstageBranchRectAnchoredRect(rectanchoredrect *RectAnchoredRect)

func (*Stage) UnstageBranchRectAnchoredText

func (stage *Stage) UnstageBranchRectAnchoredText(rectanchoredtext *RectAnchoredText)
func (stage *Stage) UnstageBranchRectLinkLink(rectlinklink *RectLinkLink)

func (*Stage) UnstageBranchSVG

func (stage *Stage) UnstageBranchSVG(svg *SVG)

func (*Stage) UnstageBranchSvgText

func (stage *Stage) UnstageBranchSvgText(svgtext *SvgText)

func (*Stage) UnstageBranchText

func (stage *Stage) UnstageBranchText(text *Text)

type SvgText

type SvgText struct {
	Name string

	//gong:text
	//gong:width 600 gong:height 300
	Text string

	Proxy SvgTextProxyInterface
}

func CopyBranchSvgText

func CopyBranchSvgText(mapOrigCopy map[any]any, svgtextFrom *SvgText) (svgtextTo *SvgText)

func (*SvgText) Checkout

func (svgtext *SvgText) Checkout(stage *Stage) *SvgText

Checkout svgtext to the back repo (if it is already staged)

func (*SvgText) Commit

func (svgtext *SvgText) Commit(stage *Stage) *SvgText

commit svgtext to the back repo (if it is already staged)

func (*SvgText) CommitVoid

func (svgtext *SvgText) CommitVoid(stage *Stage)

func (*SvgText) CopyBasicFields

func (from *SvgText) CopyBasicFields(to *SvgText)

func (*SvgText) GetName

func (svgtext *SvgText) GetName() (res string)

for satisfaction of GongStruct interface

func (*SvgText) OnAfterUpdate

func (svgtext *SvgText) OnAfterUpdate(
	stage *Stage,
	stageSvgText, frontSvgText *SvgText)

func (*SvgText) Stage

func (svgtext *SvgText) Stage(stage *Stage) *SvgText

Stage puts svgtext to the model stage

func (*SvgText) Unstage

func (svgtext *SvgText) Unstage(stage *Stage) *SvgText

Unstage removes svgtext off the model stage

func (*SvgText) UnstageVoid

func (svgtext *SvgText) UnstageVoid(stage *Stage)

UnstageVoid removes svgtext off the model stage

type SvgTextOrchestrator

type SvgTextOrchestrator struct {
}

SvgTextOrchestrator

func (*SvgTextOrchestrator) OnAfterUpdate

func (orchestrator *SvgTextOrchestrator) OnAfterUpdate(
	gongsvgStage *Stage,
	stagedSvgText, backRepoSvgText *SvgText)

type SvgTextProxy

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

SvgTextProxy implements the SvgTextProxyInterface to intercept updates to the SvgText field and send the content through a channel.

func (*SvgTextProxy) Updated

func (p *SvgTextProxy) Updated()

Updated is the method called by the gong framework when the SvgText instance might have changed. It now matches the SvgTextProxyInterface signature: Updated().

type SvgTextProxyInterface

type SvgTextProxyInterface interface {
	Updated()
}

type SvgText_WOP

type SvgText_WOP struct {
	Name string

	Text string
}

type Tabulator

type Tabulator interface {
	AddSheet(sheetName string)
	AddRow(sheetName string) int
	AddCell(sheetName string, rowId, columnIndex int, value string)
}

Tabulator is an interface for writing to a table strings

type Text

type Text struct {
	Name    string
	X, Y    float64
	Content string
	Presentation

	TextAttributes

	Animates []*Animate
}

func CopyBranchText

func CopyBranchText(mapOrigCopy map[any]any, textFrom *Text) (textTo *Text)

func (*Text) Checkout

func (text *Text) Checkout(stage *Stage) *Text

Checkout text to the back repo (if it is already staged)

func (*Text) Commit

func (text *Text) Commit(stage *Stage) *Text

commit text to the back repo (if it is already staged)

func (*Text) CommitVoid

func (text *Text) CommitVoid(stage *Stage)

func (*Text) CopyBasicFields

func (from *Text) CopyBasicFields(to *Text)

func (*Text) GetName

func (text *Text) GetName() (res string)

for satisfaction of GongStruct interface

func (*Text) Stage

func (text *Text) Stage(stage *Stage) *Text

Stage puts text to the model stage

func (*Text) Unstage

func (text *Text) Unstage(stage *Stage) *Text

Unstage removes text off the model stage

func (*Text) UnstageVoid

func (text *Text) UnstageVoid(stage *Stage)

UnstageVoid removes text off the model stage

type TextAnchorType

type TextAnchorType string
const (
	TEXT_ANCHOR_START  TextAnchorType = "start"
	TEXT_ANCHOR_CENTER TextAnchorType = "middle"
	TEXT_ANCHOR_END    TextAnchorType = "end"
)

values for https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor

func (TextAnchorType) CodeValues

func (textanchortype TextAnchorType) CodeValues() (res []string)

func (TextAnchorType) Codes

func (textanchortype TextAnchorType) Codes() (res []string)

func (*TextAnchorType) FromCodeString

func (textanchortype *TextAnchorType) FromCodeString(input string) (err error)

func (*TextAnchorType) FromString

func (textanchortype *TextAnchorType) FromString(input string) (err error)

func (*TextAnchorType) ToCodeString

func (textanchortype *TextAnchorType) ToCodeString() (res string)

func (TextAnchorType) ToString

func (textanchortype TextAnchorType) ToString() (res string)

Utility function for TextAnchorType if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type TextAttributes

type TextAttributes struct {
	/*
		Numeric Font Weights

		100: Thin
		200: Extra Light (Ultra Light)
		300: Light
		400: Normal (Regular)
		500: Medium
		600: Semi Bold (Demi Bold)
		700: Bold
		800: Extra Bold (Ultra Bold)
		900: Black (Heavy)
		950: Extra Black (Ultra Black)

		Keyword Font Weights

		normal: Equivalent to 400
		bold: Equivalent to 700
		bolder: Increases the font weight compared to the parent element
		lighter: Decreases the font weight compared to the parent element
		inherit: Inherits the font weight from the parent element

			<text x="10" y="30" font-size="20" font-weight="100">Thin (100)</text>
			<text x="10" y="60" font-size="20" font-weight="200">Extra Light (200)</text>
			<text x="10" y="90" font-size="20" font-weight="300">Light (300)</text>
			<text x="10" y="120" font-size="20" font-weight="400">Normal (400)</text>
			<text x="10" y="150" font-size="20" font-weight="500">Medium (500)</text>
			<text x="10" y="180" font-size="20" font-weight="600">Semi Bold (600)</text>
			<text x="150" y="30" font-size="20" font-weight="700">Bold (700)</text>
			<text x="150" y="60" font-size="20" font-weight="800">Extra Bold (800)</text>
			<text x="150" y="90" font-size="20" font-weight="900">Black (900)</text>
	*/
	FontWeight string

	/*
		Units for font-size

		Pixels (px): The most common unit for specifying font size.
		Points (pt): 1 point is 1/72 inch.
		Em (em): Relative to the font size of the parent element. 1em means the same size as the parent.
		Percentage (%): Relative to the parent element’s font size. 100% means the same size as the parent.
		Centimeters (cm) / Millimeters (mm): Absolute units.
		Inches (in): Absolute unit. 1 inch is 96 pixels.
		Picas (pc): 1 pica is 1/6 inch.
		Ex (ex): Relative to the x-height of the font.
		Ch (ch): Relative to the width of the zero (0) character.

			<text x="10" y="30" font-size="10px">Font size 10px</text>
			<text x="10" y="60" font-size="14pt">Font size 14pt</text>
			<text x="10" y="90" font-size="2em">Font size 2em</text>
			<text x="10" y="120" font-size="150%">Font size 150%</text>
			<text x="10" y="150" font-size="10mm">Font size 10mm</text>
			<text x="10" y="180" font-size="x-large">Font size x-large</text>
	*/
	FontSize string

	// Specifies the style of the font (e.g., normal, italic, oblique).
	FontStyle string

	/*
		Absolute Units

		    Pixels (px): Most commonly used because of their straightforward nature. For example, letter-spacing: 2px; adds two pixels between each character.
		    Points (pt): Often used in print, with 1 point equal to 1/72 of an inch. For example, letter-spacing: 1pt;.
		    Picas (pc): Another unit used in typography, where 1 pica equals 12 points. For example, letter-spacing: 0.5pc;.

		Relative Units

		    Em (em): Relative to the current font-size of the element. For instance, letter-spacing: 0.1em; means the letter spacing will be 0.1 times the size of the current font.
		    Percentage (%): Relative to the current font size. For example, letter-spacing: 5%; adjusts spacing based on a percentage of the current font size.
		    Viewport Width (vw) and Viewport Height (vh): These are relative to 1% of the width or height of the viewport. For example, letter-spacing: 0.1vw; would adjust the spacing based on the width of the viewport.

		Keyword

		    Normal: This is the default value, meaning the default spacing as determined by the font itself.
	*/
	LetterSpacing string
}

type TextContext

type TextContext struct {
	Text    *RectAnchoredText
	AnchorX float64
	AnchorY float64
}

type Text_WOP

type Text_WOP struct {
	Name string

	X float64

	Y float64

	Content string

	Color string

	FillOpacity float64

	Stroke string

	StrokeOpacity float64

	StrokeWidth float64

	StrokeDashArray string

	StrokeDashArrayWhenSelected string

	Transform string

	FontWeight string

	FontSize string

	FontStyle string

	LetterSpacing string
}

type WritingMode

type WritingMode string

The writing-mode property in SVG and CSS specifies how lines of text are laid out, determining whether text flows horizontally or vertically, and the direction in which lines stack. Here are the primary possible values:

horizontal-tb:

This is the default value for most languages. Text flows horizontally from left to right (for left-to-right scripts like English) or right to left (for right-to-left scripts like Arabic or Hebrew). Lines are stacked from top to bottom. Think of a standard English book.

vertical-rl:

Text flows vertically from top to bottom. Lines are stacked from right to left. This is common for traditional East Asian scripts like Chinese, Japanese, and Korean. Individual characters within the vertical lines are typically oriented according to their script's rules (Latin characters will usually appear rotated 90 degrees clockwise by default).

vertical-lr:

Text flows vertically from top to bottom. Lines are stacked from left to right. This is less common for natural language scripts but can be used for specific layout effects or some boustrophedon scripts. Similar to vertical-rl, Latin characters will usually appear rotated 90 degrees clockwise by default.

const (
	WritingModeHorizontalTB WritingMode = "horizontal-tb"
	WritingModeVerticalRL   WritingMode = "vertical-rl"
	WritingModeVertivcalLR  WritingMode = "vertical-lr"
)

func (WritingMode) CodeValues

func (writingmode WritingMode) CodeValues() (res []string)

func (WritingMode) Codes

func (writingmode WritingMode) Codes() (res []string)

func (*WritingMode) FromCodeString

func (writingmode *WritingMode) FromCodeString(input string) (err error)

func (*WritingMode) FromString

func (writingmode *WritingMode) FromString(input string) (err error)

func (*WritingMode) ToCodeString

func (writingmode *WritingMode) ToCodeString() (res string)

func (WritingMode) ToString

func (writingmode WritingMode) ToString() (res string)

Utility function for WritingMode if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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