ironflow.gui.workflows.canvas_widgets.nodes module

Canvas representations of the nodes.

class ironflow.gui.workflows.canvas_widgets.nodes.ButtonNodeWidget(x: Number, y: Number, parent: FlowCanvas | CanvasWidget, layout: NodeLayout, node: Node, selected: bool = False, title: str | None = None, port_radius: Number = 10)[source]

Bases: NodeWidget

class ironflow.gui.workflows.canvas_widgets.nodes.NodeWidget(x: Number, y: Number, parent: FlowCanvas | CanvasWidget, layout: NodeLayout, node: Node, selected: bool = False, title: str | None = None, port_radius: Number = 10)[source]

Bases: CanvasWidget

The main ipycanvas representation of a node. Has graphical elements for IO ports. Collapsable to save space.

Also has a SHOW button that sends a representation over to the ironflow.GUI.node_presenter window. Presentation gets locked until the button is pressed again, the node is deleted, or another node gets presented. While presented, representation updates automatically on changes to input.

add_inputs() None[source]
add_outputs() None[source]
collapse_io()[source]
property color: str
delete() None[source]
deselect() None[source]
draw_title() None[source]
expand_io()[source]
on_click(last_selected_object: CanvasWidget | None) NodeWidget | None[source]
on_double_click() None[source]
property port_widgets: list[PortWidget]