bug-ncurses
[Top][All Lists]
Advanced

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

Re: Problems with overlapping windows


From: Stephan Beal
Subject: Re: Problems with overlapping windows
Date: Mon, 16 Mar 2009 22:03:37 +0100

On Mon, Mar 16, 2009 at 6:18 PM, Jiri Fogl <address@hidden> wrote:
> Hi, I'd like to ask if there are some circumstances I should be aware of when
> creating overlapping windows.

Overlapping windows are fundamentally problematic (and painful) in
curses. Use the PANEL interface instead, as those can be stacked,
moved, etc. In my experience, the easiest way to set up the screen
when using overlapping stuff:

a) Create a PANEL with the same size as stdscr. i use this as my "root window".
b) any "smaller" windows get stacked somewhere above that root. To
hide a window i can either use the PANEL's hide API or move it to the
bottom of the stack (under the root panel).

Note that panels cannot be embedded within each other - a panel is a
top-level component with an associated WINDOW (of the same size as the
panel) on which it draws. The panel can be subdivided into smaller
areas by creating (non-overlapping) subwindows of the panel's main
window element.

It takes some practice, but it's MUCH less painful than working with
overlapping windows.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/




reply via email to

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