static SizeF PreRenderItem(Graphics graphics, NodeItem item, PointF position) { var itemSize = item.Measure(graphics); item.bounds = new RectangleF(position, itemSize); return(itemSize); }
public void RemoveItem(NodeItem item) { if (!nodeItems.Contains(item)) { return; } item.Node = null; nodeItems.Remove(item); }
public static uint GetSide(NodeItem item) { if (item.Input != null && item.Input.Enabled) { return(0); } else if (item.Output != null && item.Output.Enabled) { return(2); } return(1); }
public void AddItem(NodeItem item) { if (nodeItems.Contains(item)) { return; } if (item.Node != null) { item.Node.RemoveItem(item); } nodeItems.Add(item); item.Node = this; }
static void RenderItem(Graphics graphics, SizeF minimumSize, NodeItem item, PointF position, object context) { item.Render(graphics, minimumSize, position, context); }
public NodeConnection Connect(NodeItem from, NodeItem to, string name) { return(Connect(from.Output, to.Input, name)); }
static void RenderItem(Graphics graphics, SizeF minimumSize, NodeItem item, PointF position) { item.Render(graphics, minimumSize, position); }
public void AddItem(NodeItem item) { if (nodeItems.Contains(item)) return; if (item.Node != null) item.Node.RemoveItem(item); nodeItems.Add(item); item.Node = this; }
static SizeF PreRenderItem(Graphics graphics, NodeItem item, PointF position) { var itemSize = (SizeF)item.Measure(graphics); item.bounds = new RectangleF(position, itemSize); return itemSize; }
public NodeOutputConnector(NodeItem item, bool enabled) : base(item, enabled) { }
public static uint GetSide(NodeItem item) { if (item.Input != null && item.Input.Enabled) return 0; else if (item.Output != null && item.Output.Enabled) return 2; return 1; }
public NodeConnection Connect(NodeItem from, NodeItem to) { return Connect(from.Output, to.Input); }
public NodeItemEventArgs(NodeItem item) { Item = item; }
public NodeConnector(NodeItem item, bool enabled) { Item = item; Enabled = enabled; }
public void RemoveItem(NodeItem item) { if (!nodeItems.Contains(item)) return; item.Node = null; nodeItems.Remove(item); }
public NodeConnection Connect(NodeItem from, NodeItem to, string name) { return Connect(from.Output, to.Input, name); }