Tree, graph, preorder, cursor... what!?

Hi guys,

Following on from a previous thread (not necessary to click through, but linking anyway) where together with users from this forum we attempted to build our own graph. It's a little bit beyond my comfort level and I'm very okay with not reinventing the wheel. :slight_smile:

I know there is petgraph and likely very many others, so please let me explain what I want, and maybe you can suggest me a library, and especially the functions I need to use to put it together...

I'm creating a GUI wizard and want to divide my window into two columns, a 'navigation' and 'other'. and have two global buttons; 'Previous' and 'Next' for walking the tree / progressing the wizard.

Something like this:

The number simply corresponds to the equivalent step in the GUI. Blue means its the active/current view.

When we get to 'C', let's say, it will reveal another column, with 'X', 'Y' and 'Z', So next should progress us like this: A -> B -> C.X -> C.Y -> C.Z -> D -> E.

But important, When we get to any 'C' view, a column should appear for X Y and Z (alongside A, B, C, D). When we eventually get to D the C column should disappear again, as if being popped off of a stack.

I know this has to be common, but I can't figure out how to implement it. How to maintain the data, and tell my GUI lib what to draw.

If you can help me plllleeeeeaaase :smiley:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.