bug-ncurses
[Top][All Lists]
Advanced

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

Re: flashing screen symptoms (an example)


From: Neil Zanella
Subject: Re: flashing screen symptoms (an example)
Date: Fri, 3 Nov 2000 23:53:05 -0330 (NST)

On Fri, 3 Nov 2000, Brian Raiter wrote:

> > But whenever a subwindow is created it overlaps with stdscr so what
> > exactly is the meaning of a nonoverlapping window?
> 
> >From the ncurses man page:
> 
>        Note that curses  does  not  handle  overlapping  windows,
>        that's  done by the panel(3X) library. This means that you
>        can either use stdscr or divide the screen into tiled win-
>        dows  and  not  using  stdscr  at all. Mixing the two will
>        result in unpredictable, and undesired, effects.

However can I generalize this statement to the situation where stdscr
is partitioned into subwindows {w_i} and where in turn each subwindow
w_i is partitioned into subwindows {w_ij} and each w_ij is partitioned
into subwindows {w_ijk} and only the w_ijk windows are refreshed?
The man page does not say whether or not this will work.

> In other words, you *can* have two windows that overlap (such as
> stdscr and a subwindow), as long as you only draw on, and refresh, one
> of them.

OK. So are you saying that the code with the w_ijk windows will work if
I only refresh only the w_ijk windows? And now comes the usual question:
If I do this then am I supposed to call touchwin() or not? This is
also not clear to me and I believe that touchwin() need only be called
when refreshing a parent window. At least that's my interpretation.
Any objections? All are welcome.

> For my part, I've generally found it simpler to just use stdscr and
> calculate the coordinates of subregions in the code, or to go all the
> way and use panels. Using tiled subwindows usually makes for more
> complicated code in the end.

Obviously you must not be using the scrolling features of separate windows
very much. It depends on the application. Originally calculating my own
coordinates was what I planned but I decided that doing so would make
the code harder for others to read so I opted out for subwindows.

Thanks,

Neil




reply via email to

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