forked from MindFusionComponents/JavaScript-Diagram-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsdiag.d.ts
More file actions
2419 lines (2419 loc) · 117 KB
/
Copy pathjsdiag.d.ts
File metadata and controls
2419 lines (2419 loc) · 117 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
declare namespace MindFusion
{
/** The base type of classes that define arguments passed to event handler functions. */
class EventArgs
{
}
}
declare namespace MindFusion.Graphs
{
/** Defines values that specify how automatic layout algorithms align links to anchor points. */
enum Anchoring
{
/** Anchor points are ignored. */
Ignore = 0,
/** Links are aligned to their original anchor points. */
Keep = 1,
/** Links are aligned to new anchor points, depending on the positions of graph nodes after a layout is applied. */
Reassign = 2
}
/** Specifies placement of graph connected components relatively to each other. */
enum MultipleGraphsPlacement
{
/** Indicates that subgraphs should be placed in a column. */
Vertical = 0,
/** Indicates that subgraphs should be placed in a row. */
Horizontal = 1
}
/** Specifies in what direction to place nodes processed by a layout algorithm. */
enum LayoutDirection
{
/** Indicates a top-to-bottom layout direction. */
TopToBottom = 0,
/** Indicates a left-to-right layout direction. */
LeftToRight = 1,
/** Indicates a bottom-to-top layout direction. */
BottomToTop = 2,
/** Indicates a right-to-left layout direction. */
RightToLeft = 3
}
/** Specifies the shape of the diagram links after they are laid out. */
enum TreeLayoutLinkType
{
/** Indicates that links will be arranged to point to the centers of the related nodes. */
Default = 0,
/** Indicates that links will be attached to the middles of the adjoining node sides. */
Straight = 1,
/** Indicates that links will be arranged as cascading and attached to the middles of the adjoining node sides. */
Cascading = 2
}
/** Base class for automatic layout algorithms. */
class Layout
{
/** Indicates how to align links to the anchor points of nodes. */
anchoring: Anchoring;
/** Indicates whether to treat each Group of nodes as a single vertex in the arranged graph. */
keepGroupLayout: boolean;
/** Indicates how multiple independent graphs in the diagram should be positioned relatively to each other. */
multipleGraphsPlacement: MultipleGraphsPlacement;
}
/** Implements algorithms for arranging tree structures. */
class TreeLayout extends Layout
{
/** Initializes a new instance of the TreeLayout class. */
constructor();
/** The space to leave between adjacent levels of the tree. */
levelDistance: number;
/** The space to leave between adjacent nodes on the same level. */
nodeDistance: number;
/** Indicates whether to keep the root node at its original position. */
keepRootPosition: boolean;
/** The orientation of the arranged graph. */
direction: LayoutDirection;
/** The type of the links in the arranged tree. */
linkType: TreeLayoutLinkType;
/** Indicates whether the 'assistant' trait is regarded when performing the layout. */
enableAssistants: boolean;
/** Indicates whether 'assistant' nodes on the same side of a single parent are arranged as close to each other as possible. */
compactAssistants: boolean;
}
/** Implements algorithms for arranging tree structures. */
class BorderedTreeLayout extends Layout
{
/** Initializes a new instance of the BorderedTreeLayout class. */
constructor();
/** The space to leave between adjacent levels of the tree. */
levelDistance: number;
/** The space to leave between adjacent nodes on the same level. */
nodeDistance: number;
/** Indicates whether to keep the root node at its original position. */
keepRootPosition: boolean;
/** The orientation of the arranged graph. */
direction: LayoutDirection;
/** The type of the links in the arranged tree. */
linkType: TreeLayoutLinkType;
}
/** This algorithm assigns diagram nodes to distinct horizontal or vertical layers. */
class LayeredLayout extends Layout
{
/** Initializes a new instance of the LayeredLayout class. */
constructor();
/** The desired distance between layer axis lines. */
layerDistance: number;
/** The desired distance between adjacent nodes in a layer. */
nodeDistance: number;
/** The orientation of the arranged graph. */
direction: LayoutDirection;
/** The number of iterations to perform when untwining the layout. */
siftingRounds: number;
}
/** Implements the Spring-Embedder graph layout algorithm. */
class SpringLayout extends Layout
{
/** Initializes a new instance of the SpringLayout class. */
constructor();
/** The desired distance between nodes. */
nodeDistance: number;
/** The number of iterations to run the layout routine. */
iterations: number;
}
/** FractalLayout is a tree layout algorithm that places child nodes symmetrically around their parent node. */
class FractalLayout extends Layout
{
/** Initializes a new instance of the FractalLayout class. */
constructor();
/** Indicates how to align links to the anchor points of nodes. */
anchoring: Anchoring;
/** Indicates whether to treat each Group of nodes as a single vertex in the arranged graph. */
keepGroupLayout: boolean;
/** Specifies the node that should be placed at the center of the tree. */
root: MindFusion.Diagramming.DiagramNode;
/** Indicates how multiple independent graphs in the diagram should be positioned relatively to each other. */
multipleGraphsPlacement: MultipleGraphsPlacement;
}
/** Performs tree-map layout on a graph. */
class TreeMapLayout extends Layout
{
/** Initializes a new instance of the TreeMapLayout class. */
constructor();
/** Indicates whether the layout should attempt to keep the dimension ratio of nodes closer to 1. */
squarify: boolean;
/** The distance between adjacent nodes. */
padding: number;
/** The padding inside containers. */
containerPadding: number;
/** The rectangle in which the layout will try to arrange nodes. */
layoutArea: MindFusion.Drawing.Rect;
}
}
declare namespace MindFusion.Drawing
{
/** Represents units of measure. */
enum GraphicsUnit
{
/** Specifies display units (1/100 inch) as the unit of measure. */
Display = 1,
/** Specifies device pixels as the unit of measure. */
Pixel = 2,
/** Specifies printer's points (1/72 inch) as the unit of measure. */
Point = 3,
/** Specifies inches as the unit of measure. */
Inch = 4,
/** Specifies document units (1/300 inch) as the unit of measure. */
Document = 5,
/** Specifies millimeters as the unit of measure. */
Millimeter = 6,
/** Specifies device-independent pixels (1/96 inch) as the unit of measure. */
WpfPoint = 7,
/** Specifies percents as the unit of measure. */
Percent = 8,
/** Specifies centimeters as the unit of measure. */
Centimeter = 9
}
/** Specifies font style attributes. */
enum FontStyle
{
/** Normal text. */
Regular = 0,
/** Bold text. */
Bold = 1,
/** Italic text. */
Italic = 2,
/** Underlined text. */
Underline = 4
}
/** Represents a font. */
class Font
{
/** Initializes a new instance of the Font class with the specified attributes.
* @param name The font name.
* @param size The font size.
* @param bold true if this font is bold, otherwise false.
* @param italic true if this font is italic, otherwise false.
* @param underline true if this font is underlined, otherwise false.
*/
constructor(name: string, size: number, bold: boolean, italic: boolean, underline: boolean);
/** The font name. */
name: string;
/** The font size. */
size: number;
/** true if this font is bold, otherwise false. */
bold: boolean;
/** true if this font is italic, otherwise false. */
italic: boolean;
/** true if this font is underlined, otherwise false. */
underline: boolean;
}
/** Describes the thickness of a rectangular frame. */
class Thickness
{
/** Initializes a new instance of the Thickness class with the specified widths.
* @param left Specifies the width of the left side of the frame.
* @param top Specifies the width of the top side of the frame.
* @param right Specifies the width of the right side of the frame.
* @param bottom Specifies the width of the bottom side of the frame.
*/
constructor(left: number, top: number, right: number, bottom: number);
/** The width of the left side of the frame. */
left: number;
/** The width of the top side of the frame. */
top: number;
/** The width of the right side of the frame. */
right: number;
/** The width of the bottom side of the frame. */
bottom: number;
}
/** Represents a rectangle. */
class Rect
{
/** Initializes a new instance of the Rect class.
* @param x The X-coordinate of the top left corner of the rectangle.
* @param y The Y-coordinate of the top left corner of the rectangle.
* @param width The width of the rectangle.
* @param height The height of the rectangle.
*/
constructor(x: number, y: number, width: number, height: number);
/** The X-coordinate of the top left corner of the rectangle. */
x: number;
/** The Y-coordinate of the top left corner of the rectangle. */
y: number;
/** The width of the rectangle. */
width: number;
/** The height of the rectangle. */
height: number;
}
/** Represents the size of 2D object. */
class Size
{
/** Initializes a new instance of the Size class with the specified width and height.
* @param width Specifies object's width.
* @param height Specifies object's height.
*/
constructor(width: number, height: number);
/** The object's width. */
width: number;
/** The object's height. */
height: number;
}
/** Represents a point. */
class Point
{
/** Initializes a new instance of the Point class with the specified X and Y coordinates.
* @param x The X-coordinate of the Point.
* @param y The Y-coordinate of the Point.
*/
constructor(x: number, y: number);
/** The X-coordinate of the Point. */
x: number;
/** The Y-coordinate of the Point. */
y: number;
}
/** Specifies the dash pattern of lines. */
enum DashStyle
{
/** Specifies a solid line. */
Solid = 0,
/** Specifies a line consisting of dashes. */
Dash = 1,
/** Specifies a line consisting of dots. */
Dot = 2,
/** Specifies a dash-dot pattern. */
DashDot = 3,
/** Specifies a dash-dot-dot pattern. */
DashDotDot = 4
}
/** The Canvas class wraps the HTML5 Canvas element. */
class Canvas
{
/** Gets the underlying Canvas element's bounds. */
getBounds(): Rect;
/** Sets the underlying Canvas element's bounds. */
setBounds(value: Rect);
/** Gets the unit of measure used for logical coordinates. */
getMeasureUnit(): GraphicsUnit;
/** Sets the unit of measure used for logical coordinates. */
setMeasureUnit(value: GraphicsUnit);
/** Gets the zoom factor. */
getZoomFactor(): number;
/** Sets the zoom factor. */
setZoomFactor(value: number);
/** Transforms a point from client to document coordinates.
* @param point The point to transform.
* @return The transformed point.
*/
clientToDoc(point: Point): Point;
/** Transforms a point from document to client coordinates.
* @param point The point to transform.
* @return The transformed point.
*/
docToClient(point: Point): Point;
}
}
declare namespace MindFusion.Diagramming
{
/** Represents an item in the diagram document. All classes representing diagram elements derive from DiagramItem. */
class DiagramItem
{
constructor(parent: Diagram);
/** Serializes this item into a JSON string.
* @return A string containing the item's JSON representation.
*/
toJson(): string;
/** Deserializes this item from a JSON string.
* @param json A string created by the toJson method.
*/
fromJson(json: string): void;
/** Loads property values from specified XML element.
* @param xmlElement An XML DOM element that contains the item's serialized content.
* @param context An object providing contextual information about the serialization process and some helper serialization methods.
*/
loadFromXml(xmlElement: any, context: XmlPersistContext): void;
/** Gets the parent diagram.
* @return Gets the Diagram this DiagramItem belongs to.
*/
getParent(): Diagram;
/** Gets a string containing the DiagramItem's text. */
getText(): string;
/** Sets a string containing the DiagramItem's text. */
setText(value: string);
/** Gets a string specifying the color of the text of this item. */
getTextColor(): string;
/** Sets a string specifying the color of the text of this item. */
setTextColor(value: string);
/** Gets a string specifying the color of the text outline of this item. */
getTextStroke(): string;
/** Sets a string specifying the color of the text outline of this item. */
setTextStroke(value: string);
/** Gets the width of the text outline of this item. */
getTextStrokeThickness(): number;
/** Sets the width of the text outline of this item. */
setTextStrokeThickness(value: number);
/** Gets the spacing between the item boundaries and its text. */
getTextPadding(): MindFusion.Drawing.Thickness;
/** Sets the spacing between the item boundaries and its text. */
setTextPadding(value: MindFusion.Drawing.Thickness);
/** Gets the font used to render this item's text. */
getFont(): MindFusion.Drawing.Font;
/** Sets the font used to render this item's text. */
setFont(value: MindFusion.Drawing.Font);
/** Gets an object that specifies how to paint the interior of the DiagramItem. */
getBrush(): any;
/** Sets an object that specifies how to paint the interior of the DiagramItem. */
setBrush(value: any);
/** Gets a string specifying the color used to stroke the item's frame. */
getStroke(): string;
/** Sets a string specifying the color used to stroke the item's frame. */
setStroke(value: string);
/** Gets the line width applied when stroking the item's frame. */
getStrokeThickness(): number;
/** Sets the line width applied when stroking the item's frame. */
setStrokeThickness(value: number);
/** Gets the line dash pattern applied when stroking the item's frame. */
getStrokeDashStyle(): MindFusion.Drawing.DashStyle;
/** Sets the line dash pattern applied when stroking the item's frame. */
setStrokeDashStyle(value: MindFusion.Drawing.DashStyle);
/** Gets a custom value associated with this item. */
getTag(): any;
/** Sets a custom value associated with this item. */
setTag(value: any);
/** Gets a custom value associated with this item. */
getId(): any;
/** Sets a custom value associated with this item. */
setId(value: any);
/** Gets the tooltip text that should be displayed when the mouse hovers over this item. */
getTooltip(): string;
/** Sets the tooltip text that should be displayed when the mouse hovers over this item. */
setTooltip(value: string);
/** Gets a value indicating whether the position of this item should not be changed by automatic layout methods. */
getIgnoreLayout(): boolean;
/** Sets a value indicating whether the position of this item should not be changed by automatic layout methods. */
setIgnoreLayout(value: boolean);
/** Gets an object containing properties of the node, used by some layout algorithms.
* @return An object containing the layout properties.
*/
getLayoutTraits(): any;
/** Gets the z-order position of the object. */
getZIndex(): number;
/** Sets the z-order position of the object. */
setZIndex(value: number);
/** Gets a value indicating whether a diagram item is selected. */
getSelected(): boolean;
/** Sets a value indicating whether a diagram item is selected. */
setSelected(value: boolean);
/** Gets the hyperlink associated with this diagram item. */
getHyperLink(): string;
/** Sets the hyperlink associated with this diagram item. */
setHyperLink(value: string);
/** Gets a value indicating whether this item is visible. */
getVisible(): boolean;
/** Sets a value indicating whether this item is visible. */
setVisible(value: boolean);
/** Gets a value indicating whether users are allowed to modify this item. */
getLocked(): boolean;
/** Sets a value indicating whether users are allowed to modify this item. */
setLocked(value: boolean);
/** Gets the color used to draw the shadow of this item. */
getShadowColor(): string;
/** Sets the color used to draw the shadow of this item. */
setShadowColor(value: string);
/** Gets the horizontal offset of the item's shadow. */
getShadowOffsetX(): number;
/** Sets the horizontal offset of the item's shadow. */
setShadowOffsetX(value: number);
/** Gets the vertical offset of the item's shadow. */
getShadowOffsetY(): number;
/** Sets the vertical offset of the item's shadow. */
setShadowOffsetY(value: number);
/** Gets the style associated with this item. */
getStyle(): Style;
/** Sets the style associated with this item. */
setStyle(value: Style);
}
/** DiagramNode is an abstract base class from which the ShapeNode, TableNode and ControlNode classes derive. DiagramNode instances can represent graph vertices, nodes in organizational or flow diagrams, entities in ER diagrams, and so on. */
class DiagramNode extends DiagramItem
{
/** Initializes a new instance of the DiagramNode class.
* @param parent A Diagram instance whose default node attributes are copied to this node.
*/
constructor(parent: Diagram);
/** Gets the incoming links collection of this node.
* @return An array containing incoming DiagramLink objects.
*/
getIncomingLinks(): Array<DiagramLink>;
/** Gets the outgoing links collection of this node.
* @return An array containing outgoing DiagramLink objects.
*/
getOutgoingLinks(): Array<DiagramLink>;
/** Gets a value indicating whether users are allowed to draw incoming links to this node. */
getAllowIncomingLinks(): boolean;
/** Sets a value indicating whether users are allowed to draw incoming links to this node. */
setAllowIncomingLinks(value: boolean);
/** Gets a value indicating whether users are allowed to draw outgoing links from this node. */
getAllowOutgoingLinks(): boolean;
/** Sets a value indicating whether users are allowed to draw outgoing links from this node. */
setAllowOutgoingLinks(value: boolean);
/** Gets the angle at which this node is rotated. */
getRotationAngle(): number;
/** Sets the angle at which this node is rotated. */
setRotationAngle(value: number);
/** Gets the rectangle that defines the position of the diagram node. */
getBounds(): MindFusion.Drawing.Rect;
/** Sets the rectangle that defines the position of the diagram node. */
setBounds(value: MindFusion.Drawing.Rect);
/** Gets the kinds of modifications that end-users are permitted to perform on the node. */
getEnabledHandles(): AdjustmentHandles;
/** Sets the kinds of modifications that end-users are permitted to perform on the node. */
setEnabledHandles(value: AdjustmentHandles);
/** Gets a value indicating how the node adjustment handles behave and what do they look like. */
getHandlesStyle(): HandlesStyle;
/** Sets a value indicating how the node adjustment handles behave and what do they look like. */
setHandlesStyle(value: HandlesStyle);
/** Gets a value indicating whether this node is considered an obstacle by the link-routing algorithm. */
getObstacle(): boolean;
/** Sets a value indicating whether this node is considered an obstacle by the link-routing algorithm. */
setObstacle(value: boolean);
/** Gets a value indicating whether users are allowed to expand or collapse the tree branch that starts at this node. */
getExpandable(): boolean;
/** Sets a value indicating whether users are allowed to expand or collapse the tree branch that starts at this node. */
setExpandable(value: boolean);
/** Gets a value indicating whether the tree branch that starts at this node is expanded or collapsed. */
getExpanded(): boolean;
/** Sets a value indicating whether the tree branch that starts at this node is expanded or collapsed. */
setExpanded(value: boolean);
/** Gets the anchor points to which links are attached when connected to the node. */
getAnchorPattern(): AnchorPattern;
/** Sets the anchor points to which links are attached when connected to the node. */
setAnchorPattern(value: AnchorPattern);
/** Attaches this node to the specified master node so that when the master is moved, the attached node follows it.
* @param node A DiagramNode instance specifying the master node.
*/
attachTo(node: DiagramNode): void;
/** Detaches this node from its current master node. */
detach(): void;
/** Attaches the specified subordinate node to this node, so that when this node is moved, the subordinate follows it.
* @param subordinate A DiagramNode instance specifying the node that should be attached.
*/
attach(subordinate: DiagramNode): void;
/** Returns the node to which this node is attached.
* @return A DiagramNode reference specifying the node to which this node has been previously attached via the attach or attachTo method.
*/
getMasterNode(): DiagramNode;
/** Returns the nodes attached to this node.
* @return An array of nodes attached to this node via the attach or attachTo methods.
*/
getAttachedNodes(): Array<DiagramNode>;
/** Gets an array containing all effects applied to this node.
* @return An array containing all node effects.
*/
getEffects(): Array<NodeEffect>;
/** Gets a value indicating whether this node displays a delete button. */
getShowDeleteButton(): boolean;
/** Sets a value indicating whether this node displays a delete button. */
setShowDeleteButton(value: boolean);
}
/** Represents a link between two diagram nodes. */
class DiagramLink extends DiagramItem
{
/** Initializes a new instance of the DiagramLink class between the specified nodes using the specified diagram link as a prototype.
* @param parent The Diagram from which to obtain default values for the link properties.
* @param origin The origin node of the new link.
* @param destination The destination node of the new link.
*/
constructor(parent: Diagram, origin: DiagramNode, destination: DiagramNode);
/** Gets the type of link segments and how they are positioned relatively to each other. */
getShape(): LinkShape;
/** Sets the type of link segments and how they are positioned relatively to each other. */
setShape(value: LinkShape);
/** Gets the control points of this link. */
getControlPoints(): Array<MindFusion.Drawing.Point>;
/** Sets the control points of this link. */
setControlPoints(value: Array<MindFusion.Drawing.Point>);
/** Gets the link's text placement and orientation. */
getTextStyle(): LinkTextStyle;
/** Sets the link's text placement and orientation. */
setTextStyle(value: LinkTextStyle);
/** Gets the link's text alignment. */
getTextAlignment(): Alignment;
/** Sets the link's text alignment. */
setTextAlignment(value: Alignment);
/** Gets the origin node of this DiagramLink. */
getOrigin(): DiagramNode;
/** Sets the origin node of this DiagramLink. */
setOrigin(value: DiagramNode);
/** Gets the destination node of this DiagramLink. */
getDestination(): DiagramNode;
/** Sets the destination node of this DiagramLink. */
setDestination(value: DiagramNode);
/** Gets the origin table row of this DiagramLink. */
getOriginIndex(): number;
/** Sets the origin table row of this DiagramLink. */
setOriginIndex(value: number);
/** Gets the destination table row of this DiagramLink. */
getDestinationIndex(): number;
/** Sets the destination table row of this DiagramLink. */
setDestinationIndex(value: number);
/** Updates the link's internal state after the link's control points have been changed. */
updateFromPoints(): void;
/** Gets the first control point of this link. */
getStartPoint(): MindFusion.Drawing.Point;
/** Sets the first control point of this link. */
setStartPoint(value: MindFusion.Drawing.Point);
/** Gets the last control point of this link. */
getEndPoint(): MindFusion.Drawing.Point;
/** Sets the last control point of this link. */
setEndPoint(value: MindFusion.Drawing.Point);
/** Gets the shape to display at the beginning of this link. */
getBaseShape(): Shape;
/** Sets the shape to display at the beginning of this link. */
setBaseShape(value: Shape);
/** Gets the size of the shape displayed at the beginning of this link. */
getBaseShapeSize(): number;
/** Sets the size of the shape displayed at the beginning of this link. */
setBaseShapeSize(value: number);
/** Gets the shape to display at the end of this link. */
getHeadShape(): Shape;
/** Sets the shape to display at the end of this link. */
setHeadShape(value: Shape);
/** Gets the size of the shape displayed at the end of this link. */
getHeadShapeSize(): number;
/** Sets the size of the shape displayed at the end of this link. */
setHeadShapeSize(value: number);
/** Gets an object that specifies how to paint the interior of the link's base shape. */
getBaseBrush(): any;
/** Sets an object that specifies how to paint the interior of the link's base shape. */
setBaseBrush(value: any);
/** Gets an object that specifies how to paint the interior of the link's arrowhead shape. */
getHeadBrush(): any;
/** Sets an object that specifies how to paint the interior of the link's arrowhead shape. */
setHeadBrush(value: any);
/** Routes this link, regardless of whether the link's AutoRoute flag is enabled. */
route(): void;
/** Gets a value indicating whether a link should avoid nodes by going the shortest path from its origin to its destination without crossing any other nodes. */
getAutoRoute(): boolean;
/** Sets a value indicating whether a link should avoid nodes by going the shortest path from its origin to its destination without crossing any other nodes. */
setAutoRoute(value: boolean);
/** Gets a value indicating whether a link automatically adjusts its end points' positions in order to keep pointing to the centers of nodes that it connects. */
getDynamic(): boolean;
/** Sets a value indicating whether a link automatically adjusts its end points' positions in order to keep pointing to the centers of nodes that it connects. */
setDynamic(value: boolean);
/** Adds a new label to this link.
* @param text The label's text.
* @return A LinkLabel instance.
*/
addLabel(text: string): LinkLabel;
/** Removes the specified label from this link.
* @param label A LinkLabel instance.
*/
removeLabel(label: LinkLabel): void;
}
/** ShapeNode instances are diagram nodes that represent geometric shapes. */
class ShapeNode extends DiagramNode
{
/** Initializes a new instance of the ShapeNode class with default values supplied from the specified Diagram.
* @param parent The Diagram from which to obtain default values for the node properties.
*/
constructor(parent: Diagram);
/** Gets a value indicating whether text is rotated when the node is rotated. */
getRotateText(): boolean;
/** Sets a value indicating whether text is rotated when the node is rotated. */
setRotateText(value: boolean);
/** Gets a value indicating whether the image is rotated when the node is rotated. */
getRotateImage(): boolean;
/** Sets a value indicating whether the image is rotated when the node is rotated. */
setRotateImage(value: boolean);
/** Gets the HTMLImageElement displayed inside this node. */
getImage(): any;
/** Sets the HTMLImageElement displayed inside this node. */
setImage(value: any);
/** Gets the alignment for the image of this node. */
getImageAlign(): ImageAlign;
/** Sets the alignment for the image of this node. */
setImageAlign(value: ImageAlign);
/** Gets a value indicating whether this shape node is transparent. */
getTransparent(): boolean;
/** Sets a value indicating whether this shape node is transparent. */
setTransparent(value: boolean);
/** Gets a reference to the node's geometric shape definition. */
getShape(): Shape;
/** Sets a reference to the node's geometric shape definition. */
setShape(value: Shape);
/** Gets the URL of the image displayed in this ShapeNode. */
getImageLocation(): string;
/** Sets the URL of the image displayed in this ShapeNode. */
setImageLocation(value: string);
/** Gets the Base64-encoded data of the image displayed in this ShapeNode. */
getImageContent(): string;
/** Sets the Base64-encoded data of the image displayed in this ShapeNode. */
setImageContent(value: string);
/** Gets how the text should be aligned inside the ShapeNode's bounding rectangle. */
getTextAlignment(): Alignment;
/** Sets how the text should be aligned inside the ShapeNode's bounding rectangle. */
setTextAlignment(value: Alignment);
/** Gets how the text should be vertically aligned inside the ShapeNode's bounding rectangle. */
getLineAlignment(): Alignment;
/** Sets how the text should be vertically aligned inside the ShapeNode's bounding rectangle. */
setLineAlignment(value: Alignment);
/** Gets a value indicating whether styled text rendering is enabled. */
getEnableStyledText(): boolean;
/** Sets a value indicating whether styled text rendering is enabled. */
setEnableStyledText(value: boolean);
/** Makes the shape node big enough to display its text without clipping.
* @param fit One of the FitSize enumeration values.
* @return true if the node is resized successfully; otherwise, false.
*/
resizeToFitText(fit: FitSize): boolean;
}
/** Represents a set of items selected in the diagram document. */
class Selection
{
/** A list of all selected diagram items. */
items: Array<DiagramItem>;
/** A list of selected nodes. */
nodes: Array<DiagramNode>;
/** A list of selected links. */
links: Array<DiagramLink>;
/** Adds an item to this Selection.
* @param item The item to add.
*/
addItem(item: DiagramItem): void;
/** Removes an item from this Selection.
* @param item The item to remove.
* @return true if the item was found and removed from selection, or false otherwise.
*/
removeItem(item: DiagramItem): boolean;
/** Removes all items from the selection. */
clear(): void;
}
/** Represents a cell of a TableNode. */
class Cell
{
/** Initializes a new instance of the Cell class. */
constructor();
/** Gets a string containing the cell's text. */
getText(): string;
/** Sets a string containing the cell's text. */
setText(value: string);
/** Gets how the text should be aligned inside the cell's bounding rectangle. */
getTextAlignment(): Alignment;
/** Sets how the text should be aligned inside the cell's bounding rectangle. */
setTextAlignment(value: Alignment);
/** Gets how the text should be vertically aligned inside the cell's bounding rectangle. */
getLineAlignment(): Alignment;
/** Sets how the text should be vertically aligned inside the cell's bounding rectangle. */
setLineAlignment(value: Alignment);
/** Gets the HTMLImageElement displayed inside this cell. */
getImage(): any;
/** Sets the HTMLImageElement displayed inside this cell. */
setImage(value: any);
/** Gets the alignment for the image of this cell. */
getImageAlign(): ImageAlign;
/** Sets the alignment for the image of this cell. */
setImageAlign(value: ImageAlign);
/** Gets the URL of the image displayed inside this cell. */
getImageLocation(): string;
/** Sets the URL of the image displayed inside this cell. */
setImageLocation(value: string);
/** Gets the Base64-encoded data of the image displayed inside this cell. */
getImageContent(): string;
/** Sets the Base64-encoded data of the image displayed inside this cell. */
setImageContent(value: string);
/** Gets the font used to render this cell's text. */
getFont(): MindFusion.Drawing.Font;
/** Sets the font used to render this cell's text. */
setFont(value: MindFusion.Drawing.Font);
/** Gets an object that specifies how to paint the interior of this cell. */
getBrush(): any;
/** Sets an object that specifies how to paint the interior of this cell. */
setBrush(value: any);
/** Gets A string value identifying the color of the text. */
getTextColor(): string;
/** Sets A string value identifying the color of the text. */
setTextColor(value: string);
/** Gets the number of columns spanned by this cell. */
getColumnSpan(): number;
/** Sets the number of columns spanned by this cell. */
setColumnSpan(value: number);
/** Gets the number of rows spanned by this cell. */
getRowSpan(): number;
/** Sets the number of rows spanned by this cell. */
setRowSpan(value: number);
}
/** TableNode instances are diagram nodes that can be used to display tabular or list data. */
class TableNode extends DiagramNode
{
/** Initializes a new instance of the TableNode class with default values supplied from the specified Diagram.
* @param parent The Diagram from which to obtain default values for the node properties.
*/
constructor(parent: Diagram);
/** Returns a reference to the cell located at the specified column and row of this table.
* @param col An integer value specifying the index of a table's column.
* @param row An integer value specifying the index of a table's row.
* @return A Cell instance representing the specified cell.
*/
getCell(col: number, row: number): Cell;
/** Returns a reference to the column with specified index
* @param col An integer value specifying the index of a table's column.
* @return A Column instance representing the specified cell.
*/
getColumn(col: number): Column;
/** Returns a reference to the row with specified index
* @param row An integer value specifying the index of a table's row.
* @return A Row instance representing the specified cell.
*/
getRow(row: number): Row;
/** Sets the height of specified row.
* @param row An integer value specifying the index of a table's row.
* @param value The row's height.
*/
setRowHeight(row: number, value: number): void;
/** Sets the width of specified column.
* @param col An integer value specifying the index of a table's column.
* @param value The column's width.
*/
setColumnWidth(col: number, value: number): void;
/** Gets the shape of the table's outline. */
getShape(): SimpleShape;
/** Sets the shape of the table's outline. */
setShape(value: SimpleShape);
/** Gets the height of the table's caption area. */
getCaptionHeight(): number;
/** Sets the height of the table's caption area. */
setCaptionHeight(value: number);
/** Gets the style of the cell frame lines. */
getCellFrameStyle(): CellFrameStyle;
/** Sets the style of the cell frame lines. */
setCellFrameStyle(value: CellFrameStyle);
/** Gets a value indicating whether drawing a link from/to this table should connect a row of the table, or the whole table as an integral entity. */
getConnectionStyle(): ConnectionStyle;
/** Sets a value indicating whether drawing a link from/to this table should connect a row of the table, or the whole table as an integral entity. */
setConnectionStyle(value: ConnectionStyle);
/** Changes the number of columns and rows in this table.
* @param columns An integer value specifying the new number of columns.
* @param rows An integer value specifying the new number of rows.
*/
redimTable(columns: number, rows: number): void;
/** Deletes the specified column.
* @param col An integer value specifying which column to delete.
*/
deleteColumn(col: number): void;
/** Inserts a new column at the specified position.
* @param col An integer value specifying the position within the table's list of columns where the new column should be inserted.
*/
insertColumn(col: number): void;
/** Deletes the specified row.
* @param row An integer value specifying which row to delete.
*/
deleteRow(row: number): void;
/** Inserts a new row at the specified position.
* @param row Inserts a new row at the specified position.
*/
insertRow(row: number): void;
/** Adds a new column to the table. */
addColumn(): any;
/** Adds a new row to the table. */
addRow(): any;
/** Gets a value indicating whether the user is allowed to scroll the table rows. */
getScrollable(): boolean;
/** Sets a value indicating whether the user is allowed to scroll the table rows. */
setScrollable(value: boolean);
/** Gets an object that specifies how to fill the caption bar. */
getCaptionBackBrush(): any;
/** Sets an object that specifies how to fill the caption bar. */
setCaptionBackBrush(value: any);
/** Gets the font used to render the table's caption text. */
getCaptionFont(): MindFusion.Drawing.Font;
/** Sets the font used to render the table's caption text. */
setCaptionFont(value: MindFusion.Drawing.Font);
/** Gets a value indicating whether styled text rendering is enabled. */
getEnableStyledText(): boolean;
/** Sets a value indicating whether styled text rendering is enabled. */
setEnableStyledText(value: boolean);
/** Gets a value indicating whether users are allowed to resize table columns. */
getAllowResizeColumns(): boolean;
/** Sets a value indicating whether users are allowed to resize table columns. */
setAllowResizeColumns(value: boolean);
/** Gets a value indicating whether users are allowed to resize table rows. */
getAllowResizeRows(): boolean;
/** Sets a value indicating whether users are allowed to resize table rows. */
setAllowResizeRows(value: boolean);
}
/** SvgContent represents the markup code of an SVG drawing. */
class SvgContent
{
/** Initializes a new instance of the SvgContent class. */
constructor();
/** Loads SVG code from the specified file.
* @param url A string specifying the SVG file location.
*/
parse(url: string): void;
/** Loads SVG code from the specified string.
* @param svg A string containing the SVG markup code.
*/
parseSvg(svg: string): void;
}
/** SvgNode instances are diagram nodes that can render SVG drawings. */
class SvgNode extends ShapeNode
{
/** Initializes a new instance of the SvgNode class with default values supplied from the specified Diagram.
* @param parent The Diagram from which to obtain default values for the node properties.
*/
constructor(parent: Diagram);
/** Gets an SvgContent instance representing the SVG drawing rendered in this node. */
getContent(): SvgContent;
/** Sets an SvgContent instance representing the SVG drawing rendered in this node. */
setContent(value: SvgContent);
}
/** ContainerNode instances are diagram nodes that can contain other nodes. */
class ContainerNode extends DiagramNode
{
/** Initializes a new instance of the ContainerNode class with default values supplied from the specified Diagram.
* @param parent The Diagram from which to obtain default values for the node properties.
*/
constructor(parent: Diagram);
/** Adds a node to this container.
* @param node The node that should be added to this container.
*/
add(node: DiagramNode): void;
/** Removes a node from this container.
* @param node The node that should be removed from this container.
*/
remove(node: DiagramNode): void;
/** Gets a value indicating whether child items should be clipped by container boundaries. */
getClipChildren(): boolean;
/** Sets a value indicating whether child items should be clipped by container boundaries. */
setClipChildren(value: boolean);
/** Gets the shape of the container's outline. */
getShape(): SimpleShape;
/** Sets the shape of the container's outline. */
setShape(value: SimpleShape);
/** Gets the height of the container's caption area. */
getCaptionHeight(): number;
/** Sets the height of the container's caption area. */
setCaptionHeight(value: number);
/** Resizes the container making it big enough to contain its child nodes.
* @param allowShrink true to allow setting smaller size than current one, or false otherwise.
* @param margin Specifies the size of margin space around child nodes.
*/
resizeToFitChildren(allowShrink: boolean, margin: number): void;
/** Gets a value indicating whether users are allowed to fold this container. */
getFoldable(): boolean;
/** Sets a value indicating whether users are allowed to fold this container. */
setFoldable(value: boolean);
/** Gets a value indicating whether the container is folded. */
getFolded(): boolean;
/** Sets a value indicating whether the container is folded. */
setFolded(value: boolean);
/** Gets a value indicating whether users are allowed to add child nodes to this container. */
getAllowAddChildren(): boolean;
/** Sets a value indicating whether users are allowed to add child nodes to this container. */
setAllowAddChildren(value: boolean);
/** Gets a value indicating whether users are allowed to remove child nodes from the container. */
getAllowRemoveChildren(): boolean;
/** Sets a value indicating whether users are allowed to remove child nodes from the container. */
setAllowRemoveChildren(value: boolean);
/** Arranges the container's children using the specified layout algorithm.
* @param layout An instance of Layout -derived class representing the algorithm to apply.
*/
arrange(layout: MindFusion.Graphs.Layout): void;
}
/** A FreeFormNode collects all points from users' mouse or touch input and displays them as node's outline. */
class FreeFormNode extends DiagramNode
{
/** Initializes a new instance of the FreeFormNode class.
* @param parent A Diagram instance whose default node attributes are copied to this node.
*/
constructor(parent: Diagram);
/** Gets a value indicating whether the node's shape is closed. */
getClosed(): boolean;
/** Sets a value indicating whether the node's shape is closed. */
setClosed(value: boolean);
/** Gets the node's outline points. */
getPoints(): Array<MindFusion.Drawing.Point>;
/** Sets the node's outline points. */
setPoints(value: Array<MindFusion.Drawing.Point>);
}
/** The Diagram class represents a flow diagram. */
class Diagram extends MindFusion.Drawing.Canvas
{
/** Initializes a new instance of the Diagram class.
* @param element The Canvas DOM Element this Diagram is associated with.
*/
constructor(element: any);
/** Creates and initializes a new Diagram associated with specified Canvas DOM element.
* @param element The Canvas DOM element that the Diagram should be attached to.
* @return A Diagram instance.
*/
static create(element: any): Diagram;
/** Gets a Factory instance that lets you add programmatically new items to the diagram.
* @return A Factory instance
*/
getFactory(): Factory;
/** Registers a single event listener with the Diagram.
* @param eventName The name of the event; a member of the Events class.
* @param handler Represents the method that will handle the event specified with eventName.
*/
addEventListener(eventName: string, handler: any): void;
/** Removes a single event listener attached to the Diagram.
* @param eventName The name of the event; a member of the Events class.
* @param handler Represents the method that will handle the event specified with eventName.
*/
removeEventListener(eventName: string, handler: any): void;
/** Gets a value indicating whether in-place editing of the text of objects is enabled. */
getAllowInplaceEdit(): boolean;
/** Sets a value indicating whether in-place editing of the text of objects is enabled. */
setAllowInplaceEdit(value: boolean);
/** Gets a value that specifies what action should be performed when the user hits the Del key. */
getDelKeyAction(): DelKeyAction;
/** Sets a value that specifies what action should be performed when the user hits the Del key. */
setDelKeyAction(value: DelKeyAction);
/** Gets The object used for painting the background. */
getBackBrush(): any;
/** Sets The object used for painting the background. */
setBackBrush(value: any);
/** Gets the default shape of shape nodes. */
getDefaultShape(): Shape;
/** Sets the default shape of shape nodes. */
setDefaultShape(value: Shape);
/** Gets an array of Shape objects used to replace FreeFormNode instances with ShapeNode ones when Behavior is set to LinkFreeShapes or DrawFreeShapes. */
getFreeFormTargets(): Array<Shape>;
/** Sets an array of Shape objects used to replace FreeFormNode instances with ShapeNode ones when Behavior is set to LinkFreeShapes or DrawFreeShapes. */
setFreeFormTargets(value: Array<Shape>);
/** Gets the maximum distance between first and last points of a FreeFormNode for which the node's outline is closed automatically. */
getAutoCloseDistance(): number;
/** Sets the maximum distance between first and last points of a FreeFormNode for which the node's outline is closed automatically. */
setAutoCloseDistance(value: number);
/** Gets the radius around dragged free-form adjustment handle in which other points of FreeFormNode are modified too. */
getFreeFormAttractDistance(): number;
/** Sets the radius around dragged free-form adjustment handle in which other points of FreeFormNode are modified too. */
setFreeFormAttractDistance(value: number);
/** Gets the default fill of shape nodes. */
getShapeBrush(): any;
/** Sets the default fill of shape nodes. */
setShapeBrush(value: any);
/** Gets the default fill of links. */
getLinkBrush(): any;
/** Sets the default fill of links. */
setLinkBrush(value: any);
/** Gets the initial shape assigned to new links. */
getLinkShape(): LinkShape;
/** Sets the initial shape assigned to new links. */
setLinkShape(value: LinkShape);