Vixen
02b45cc4
csharp
public sealed class NodePortEditor

The boxes on a port, for the value it takes when nothing is wired to it.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

On the node rather than only in a panel beside it. A graph is read by looking at it, and a constant that is only visible once its node is selected makes "what is this multiply multiplying by" a click and a glance somewhere else — for every node, one at a time. The panel is still where a port with no room on the node is edited; this is where the common case lives.

⚠ Its elements are pooled and parked, never removed. This is a part of NodePortView, which is itself pooled and rebound as the canvas scrolls — so a row that once showed four lanes keeps four boxes and hides three of them. Removal is final in this framework, so a pool that shrank would have to build fresh elements the next time a float4 came back into view.

⚠ It writes into the editor it was given before it tells anybody. Same bargain as the wire drag: the picture is authoritative for the length of the gesture and the command follows. See PortEdited.

Fields and properties (5)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public GraphPort? Port

    The port whose value is showing, or null if nothing is.

  • public IReadOnlyList<NumericInput> Boxes

    The number boxes, including the parked ones.

  • public CheckBox? Tick

    The tick, once something has needed one.

Methods (1)

  • protected override void OnCreated()

Used by (5)

  • NodeCanvasVixen.Ui.Controls.Advanced
  • NodeCanvasTestsVixen.Ui.Controls.Advanced.Tests
  • NodeItemVixen.Ui.Controls.Advanced
  • NodePortViewVixen.Ui.Controls.Advanced
  • PortValueTestsVixen.Editor.NodeGraph.Tests