[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: moving nested subwins

From: Thomas Dickey
Subject: Re: moving nested subwins
Date: Wed, 6 Jun 2007 14:50:56 -0400 (EDT)

On Wed, 6 Jun 2007, Bryan Christ wrote:

Is moving nested subwins supported?  In other words, I have a

no.  It could be (as an extension ;-).

Note that in a WINDOW there's no record of the subwin/derwin's. ncurses keeps track (because I added it for memory-leak checking) of all of the WINDOW's created. So one could extend ncurses to to something of this type. I don't believe it would be portable to any other implementation though.

The workaround in portable applications is for the application
to keep track of the windows it has created, and move those.

window->subwin1->subwin2 scenario. I try to move subwin2 with mvderwin() but it doesn't work properly. My guess is similar to the "menu subwin moving" problem which has been discussed a couple of times on this list.

Right - it's much the same case: there's a portable workaround for something that would be nice-to-have within the library. The main difference here is that there's no associated user-window as in the menu which would list things.

That points to a better extension than a move_nested_windows: a function that would return the number of child-windows and the list of WINDOW* pointers, so an application could do whatever it wanted with the list. That would still lead to making things unportable, but would give a lot more leverage to developers than making ad hoc extensions for each "whatever".

Thomas E. Dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]