ironflow.gui.canvas_widgets.flow module
The parent canvas for the whole flow representation.
- class ironflow.gui.canvas_widgets.flow.FlowCanvas(gui: GUI, flow: Optional[Flow] = None)[source]
Bases:
objectA canvas for representing a particular Ryven script, which is determined at instantiation by the currently active gui script.
- Mouse behaviour:
Mouse click (down and release) on a node element or any child element selects that element
Mouse down, hold, and move on a node element or any child element selects the (parent) node and moves it
Mouse click on nothing clears selection
Mouse double-click on nothing creates a new node of the type currently selected in the node menu
Mouse click on a selected (pressed) port (button) deselects (unpresses) that port (button)
Todo: Mouse down, hold, and move on nothing draws a rectangle, everything inside is selected on release
- Keyboard behaviour: Todo
ESC: Deselect all.
- Backspace/Delete:
If a node is selected, deletes it
If a port is selected, deletes all connections it is part of
- property canvas
- property flow_canvas: FlowCanvas
- get_element_at_xy(x_in: Number, y_in: Number) CanvasWidget | None[source]
- get_selected_objects() list[ironflow.gui.canvas_widgets.base.CanvasWidget][source]
- property gui
- load_node(x: Number, y: Number, node: Node) NodeWidget[source]
- property title: str