Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add imnodes widget. #905

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

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.

None yet

1 participant