Question

I'm fooling around with panel.h and ncurses.h in C.

At the moment I'm interested in the ways of changing panels stacking order.
I know that when I call create_panel I push panel on top of that stack.
I'm also aware of bottom_panel() and top_panel() functions that can change stacking order by pushing given panel on top or placing on the bottom of stack or panel_below() and panel_above() for browsing through the stack of panels.

My quesion is: what are other built-in functions for messing with panels order?

For example ( actually that's something I'm trying myself right now ) I create array of 7 windows. And then create array of 7 panels accordingly.

Then I want to change active panel(done and working), move active panel around(done), get active panel on top or bottom(done) and move active panel deeper or closer to the top one level at the time( not done, problematic ).

I appreciate your help and will be grateful for NOT posting complete solutions. I can think of few ways of doing it and want to try them myself later. I just want to be sure I won't spend my time reinventing the wheel by keeping order of panels manually or writing overly-complicated functions for reorganising them by calling functions I already know.

Was it helpful?

Solution

There are no other functions for changing the order of panels, top_panel() and bottom_panel() are the only way.

Calling top_panel() and bottom_panel() does not redraw the screen so you can call them multiple times to reorder the stack.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top