ironflow.gui.workflows.canvas_widgets.base module

Shared code among various canvas widgets.

class ironflow.gui.workflows.canvas_widgets.base.CanvasWidget(x: Number, y: Number, parent: FlowCanvas | CanvasWidget, layout: Layout, selected: bool = False, title: str | None = None)[source]

Bases: ABC

Parent class for all “widgets” that exist inside the scope of the flow canvas.

add_widget(widget: CanvasWidget) None[source]
add_x_y(dx_in: int | float, dy_in: int | float) None[source]
property canvas: Canvas
property color: str
deselect() None[source]
deselect_all() None[source]
draw() None[source]
draw_shape() None[source]
abstract draw_title() None[source]
property flow: Flow
property flow_canvas: FlowCanvas
get_element_at_xy(x_in: int | float, y_in: int | float) CanvasWidget | None[source]
property gui: HasSession
property height: int
is_here(x_in: int | float, y_in: int | float) bool[source]
abstract on_click(last_selected_object: CanvasWidget | None) CanvasWidget | None[source]
on_double_click() CanvasWidget | None[source]
property screen: WorkflowsGUI
select() None[source]
property selected
set_x_y(x_in: int | float, y_in: int | float) None[source]
property width: int
property x: int | float
property y: int | float
class ironflow.gui.workflows.canvas_widgets.base.HideableWidget(x: Number, y: Number, parent: FlowCanvas | CanvasWidget, layout: Layout, selected: bool = False, title: str | None = None, visible: bool = True, hidden_x: Number | None = None, hidden_y: Number | None = None)[source]

Bases: CanvasWidget, ABC

draw() None[source]
property hidden_x: int | float
property hidden_y: int | float
hide()[source]
is_here(x_in: int | float, y_in: int | float) bool[source]
show()[source]
property x: int | float
property y: int | float