Interface ICompositeNode
A composite node is a node that contains children.
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public interface ICompositeNode
Remarks
This interface has methods for adding and removing child nodes.
INodeProperties
CanUngroup
Gets or sets a value indicating whether composite node can be ungrouped.
Declaration
bool CanUngroup { get; set; }
Property Value
Type |
---|
System.Boolean |
ChildCount
Gets the number of child nodes contained by this node.
Declaration
int ChildCount { get; }
Property Value
Type |
---|
System.Int32 |
Methods
AppendChild(Node)
Appends the given node to the collection of child nodes.
Declaration
int AppendChild(Node child)
Parameters
Type | Name | Description |
---|---|---|
Node | child | Node to append. |
Returns
Type | Description |
---|---|
System.Int32 | Zero-based index at which the node was added to the collection or -1 for failure. |
AppendChildren(NodeCollection, out Int32)
Appends the given collection of nodes as child nodes.
Declaration
int AppendChildren(NodeCollection children, out int startIdx)
Parameters
Type | Name | Description |
---|---|---|
NodeCollection | children | Nodes to append. |
System.Int32 | startIdx | Zero-based index at which the first node was added to the collection of child nodes. |
Returns
Type | Description |
---|---|
System.Int32 | Number of child nodes appended. |
CheckConstrainingRegion(Node)
Tests to see if the given node falls within the constraining region of the composite node.
Declaration
bool CheckConstrainingRegion(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node | Node to test. |
Returns
Type | Description |
---|---|
System.Boolean | True if node falls within the constraining region; False if it does not. |
GetChild(Int32)
Returns the child node at the given index position.
Declaration
Node GetChild(int childIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | childIndex | Zero-based index into the collection of child nodes. |
Returns
Type | Description |
---|---|
Node | Child node at the given position or NULL if the index is out of range. |
GetChildByName(String)
Returns the child node matching the given name.
Declaration
Node GetChildByName(string childName)
Parameters
Type | Name | Description |
---|---|---|
System.String | childName | Name of node to return. |
Returns
Type | Description |
---|---|
Node | Node matching the given name. |
GetChildIndex(Node)
Returns the index position of the given child node.
Declaration
int GetChildIndex(Node child)
Parameters
Type | Name | Description |
---|---|---|
Node | child | Child node to query. |
Returns
Type | Description |
---|---|
System.Int32 | Zero-based index into the collection of child nodes. |
GetChildrenAtPoint(NodeCollection, PointF)
Returns all children that are intersected by the given point.
Declaration
int GetChildrenAtPoint(NodeCollection childNodes, PointF ptModel)
Parameters
Type | Name | Description |
---|---|---|
NodeCollection | childNodes | Collection in which to add the children hit by the given point. |
System.Drawing.PointF | ptModel | Point to test. |
Returns
Type | Description |
---|---|
System.Int32 | The number of child nodes that intersect the given point. |
GetChildrenContainedBy(NodeCollection, RectangleF)
Returns all children inside the given rectangle.
Declaration
int GetChildrenContainedBy(NodeCollection childNodes, RectangleF rcModel)
Parameters
Type | Name | Description |
---|---|---|
NodeCollection | childNodes | Collection in which to add the children inside the specified rectangle. |
System.Drawing.RectangleF | rcModel | Rectangle to test. |
Returns
Type | Description |
---|---|
System.Int32 | The number of child nodes added to the collection. |
GetChildrenIntersecting(NodeCollection, RectangleF)
Returns all children that intersect the given rectangle.
Declaration
int GetChildrenIntersecting(NodeCollection childNodes, RectangleF rcModel)
Parameters
Type | Name | Description |
---|---|---|
NodeCollection | childNodes | Collection in which to add the children hit by the given point. |
System.Drawing.RectangleF | rcModel | Rectangle to test. |
Returns
Type | Description |
---|---|
System.Int32 | The number of child nodes that intersect the given rectangle. |
InsertChild(Node, Int32)
Insert the given node into the collection of child nodes at a specific position.
Declaration
void InsertChild(Node child, int childIndex)
Parameters
Type | Name | Description |
---|---|---|
Node | child | Node to insert. |
System.Int32 | childIndex | Zero-based index at which to insert the node. |
RemoveAllChildren()
Removes all child nodes from the node.
Declaration
void RemoveAllChildren()
RemoveChild(Node)
Removes the child node at the given position.
Declaration
bool RemoveChild(Node child)
Parameters
Type | Name | Description |
---|---|---|
Node | child | Node to remove. |
Returns
Type | Description |
---|---|
System.Boolean | True if the node was successfully removed; otherwise False. |
RemoveChild(Int32)
Removes the child node at the given position.
Declaration
bool RemoveChild(int childIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | childIndex | Zero-based index into the collection of child nodes. |
Returns
Type | Description |
---|---|
System.Boolean | True if the node was successfully removed; otherwise False. |
UpdateCompositeBounds()
Update bounds size to content size.
Declaration
void UpdateCompositeBounds()
Remarks
Used to update composite node bounds if children position or size changed.