Skip to content

Conversation

@gucio321
Copy link
Collaborator

@gucio321 gucio321 commented Nov 7, 2024

This is a bit complex widget but I think after a few more redesigns I'll be able to make it useful and easy to use.

Doc

We are 3 things here:

  1. NodeEditor which is a workspace for node editor. Its pretty simple for giu impl - we do similar to giu.Plot.
  2. NodeWidget coonsists of several things:
    • header (required) (TitleBar)
    • InputAttribute
    • OutputAttrbute
  3. Links between input and output elements

My idea is the following usage:

giu.NodeEditor().Nodes(
   giu.Node(1). // maybe this "1" could be of type "comparable" because I'll need to use internal ID anyway
      Static(giu.Label("main content")).
      Output(giu.Label("output")),
   giu.Node(2).
      Input(giu.Label("input")),
   giu.NodeLink(1,2),
)

Note

Also I think that NodeEditor could provide Links method to store lsit of links for reference

@gucio321 gucio321 marked this pull request as draft February 10, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant