/// <summary> /// Creates a new chunk of terminals for a given chunk. /// </summary> /// <param name="chunkIndex">the chunk index (useful for dynamic chunk nodes; you can pass -1 if it's not a dynamic chunk node)</param> /// <returns>new terminals created by this function</returns> public override IList <WireableTerminal> CreateTerminalsForVerticalChunk(int chunkIndex) { return(new List <WireableTerminal> { new NodeTerminal(Direction.Input, PFTypes.Void, "element", TerminalHotspots.CreateInputTerminalHotspot(TerminalSize.Small, 0)) }); }
/// <summary> /// Performs node initialization /// </summary> /// <param name="info">Information about why the node is being created</param> protected override void Init(IElementCreateInfo info) { base.Init(info); Width = 80; Height = 50; _input1Terminal = new NodeTerminal(Direction.Unknown, NITypes.Void, "Input 1", TerminalHotspots.CreateInputTerminalHotspot(TerminalSize.Small, 0)); _input2Terminal = new NodeTerminal(Direction.Unknown, NITypes.Void, "Input 1", TerminalHotspots.CreateInputTerminalHotspot(TerminalSize.Small, 3)); // We are using a custom terminal for our outputs so that the wires of these terminals will be spline wires. _output1Terminal = new SplineWireTerminal(Direction.Unknown, NITypes.Void, "Output 1", TerminalHotspots.CreateOutputTerminalHotspot(TerminalSize.Small, Width, 0)); _output2Terminal = new SplineWireTerminal(Direction.Unknown, NITypes.Void, "Output 1", TerminalHotspots.CreateOutputTerminalHotspot(TerminalSize.Small, Width, 3)); OnComponentInserted(_input1Terminal); OnComponentInserted(_input2Terminal); OnComponentInserted(_output1Terminal); OnComponentInserted(_output2Terminal); }
/// <summary> /// Performs node initialization /// </summary> /// <param name="info">Information about why the node is being created</param> protected override void Init(IElementCreateInfo info) { base.Init(info); Width = StockDiagramGeometries.StandardNodeWidth; Height = StockDiagramGeometries.StandardNodeHeight; _input1Terminal = new NodeTerminal(Direction.Unknown, NITypes.Void, "Input 1", TerminalHotspots.CreateInputTerminalHotspot(TerminalSize.Small, 0)); _input2Terminal = new NodeTerminal(Direction.Unknown, NITypes.Void, "Input 1", TerminalHotspots.CreateInputTerminalHotspot(TerminalSize.Small, 3)); _output1Terminal = new NodeTerminal(Direction.Unknown, NITypes.Void, "Output 1", TerminalHotspots.CreateOutputTerminalHotspot(TerminalSize.Small, Width, 0)); _output2Terminal = new NodeTerminal(Direction.Unknown, NITypes.Void, "Output 1", TerminalHotspots.CreateOutputTerminalHotspot(TerminalSize.Small, Width, 3)); OnComponentInserted(_input1Terminal); OnComponentInserted(_input2Terminal); OnComponentInserted(_output1Terminal); OnComponentInserted(_output2Terminal); }
/// <summary> /// Performs node initialization /// </summary> /// <param name="info">Information about why the node is being created</param> protected override void Init(IElementCreateInfo info) { base.Init(info); Width = StockDiagramGeometries.StandardNodeWidth; Height = StockDiagramGeometries.StandardNodeHeight; _inputTerminal = new NodeTerminal(Direction.Input, PFTypes.Double, "Input", TerminalHotspots.CreateInputTerminalHotspot(TerminalSize.Small, 0)); _outputTerminal = new NodeTerminal(Direction.Output, PFTypes.Double, "Result", TerminalHotspots.CreateOutputTerminalHotspot(TerminalSize.Small, Width, 0)); OnComponentInserted(_inputTerminal); OnComponentInserted(_outputTerminal); }
/// <summary> /// Performs node initialization /// </summary> /// <param name="info">Information about why the node is being created</param> protected override void Init(IElementCreateInfo info) { base.Init(info); Width = 80; Height = 50; _input1Terminal = new NodeTerminal(Direction.Unknown, PFTypes.Void, "Input 1", TerminalHotspots.CreateInputTerminalHotspot(TerminalSize.Small, 0)); _input2Terminal = new NodeTerminal(Direction.Unknown, PFTypes.Void, "Input 1", TerminalHotspots.CreateInputTerminalHotspot(TerminalSize.Small, 3)); _output1Terminal = new NodeTerminal(Direction.Unknown, PFTypes.Void, "Output 1", TerminalHotspots.CreateOutputTerminalHotspot(TerminalSize.Small, Width, 0)); _output2Terminal = new NodeTerminal(Direction.Unknown, PFTypes.Void, "Output 1", TerminalHotspots.CreateOutputTerminalHotspot(TerminalSize.Small, Width, 3)); OnComponentInserted(_input1Terminal); OnComponentInserted(_input2Terminal); OnComponentInserted(_output1Terminal); OnComponentInserted(_output2Terminal); }