Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MxCell ¶
type MxCell struct {
Id string `xml:"id,attr,omitempty"`
Value *string `xml:"value,attr,omitempty"`
Style string `xml:"style,attr,omitempty"`
Parent string `xml:"parent,attr,omitempty"`
Source string `xml:"source,attr,omitempty"`
Target string `xml:"target,attr,omitempty"`
Edge string `xml:"edge,attr,omitempty"`
Vertex string `xml:"vertex,attr,omitempty"`
Geo *MxGeometry `xml:"mxGeometry"`
}
type MxFile ¶
type MxFile struct {
XMLName xml.Name `xml:"mxfile"`
Host string `xml:"host,attr"`
Modified string `xml:"modified,attr"`
Agent string `xml:"agent,attr"`
Version string `xml:"version,attr"`
Type string `xml:"type,attr"`
Etag string `xml:"etag,attr"`
Diagram []Diagram `xml:"diagram"`
}
type MxGeometry ¶
type MxGraphModel ¶
type MxGraphModel struct {
XMLName xml.Name `xml:"mxGraphModel"`
Content Root `xml:"root"`
Dx string `xml:"dx,attr"`
Dy string `xml:"dy,attr"`
Grid string `xml:"grid,attr"`
GridSize string `xml:"gridSize,attr"`
Guides string `xml:"guides,attr"`
Tooltips string `xml:"tooltips,attr"`
Connect string `xml:"connect,attr"`
Arrows string `xml:"arrows,attr"`
Fold string `xml:"fold,attr"`
Page string `xml:"page,attr"`
PageScale string `xml:"pageScale,attr"`
PageWidth string `xml:"pageWidth,attr"`
PageHeight string `xml:"pageHeight,attr"`
Math string `xml:"math,attr"`
Shadow string `xml:"shadow,attr"`
Title *string
}
func Decompress ¶
func Decompress(compressedStr string) (*MxGraphModel, error)
Decompress compressed MxGraphModel string. Map to MxGraphModel struct after decompress string.
func (*MxGraphModel) Compress ¶
func (m *MxGraphModel) Compress() (string, error)
Compress MxGraphModel string.
func (*MxGraphModel) FindMxCell ¶
func (m *MxGraphModel) FindMxCell(id string) *MxCell
Find MxCell from MxGraphModel.Mxcells by ID.
func (*MxGraphModel) FindObject ¶
func (m *MxGraphModel) FindObject(id string) *Object
Find Object from MxGraphModel.Object by ID.
func (*MxGraphModel) GetIds ¶
func (m *MxGraphModel) GetIds() []string
Get Object and MxCell ID list.
type MxLibObject ¶
type MxLibrary ¶
type MxLibrary struct {
XMLName xml.Name `xml:"mxlibrary"`
Value string `xml:",chardata"`
MxGraphModels []MxGraphModel
}
func NewMxLibrary ¶
func NewMxLibrary() *MxLibrary
func (*MxLibrary) MakeMxLibObj ¶
func (m *MxLibrary) MakeMxLibObj(mxGraphModel *MxGraphModel, title string, height, width int) (*MxLibObject, error)
Make MxLibObj from MxGraphModel, title, height, width
func (*MxLibrary) MakeMxLibrary ¶
func (m *MxLibrary) MakeMxLibrary(mxlibObjects []MxLibObject) error
Make MxLibrary string from MxLibrary.MxGraphModels, then set to MxLibrary.Value.
Click to show internal directories.
Click to hide internal directories.