bug-ncurses
[Top][All Lists]
Advanced

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

Re: color in subwindows


From: Thomas Dickey
Subject: Re: color in subwindows
Date: Mon, 16 Jun 2003 19:51:33 -0400
User-agent: Mutt/1.3.28i

On Mon, Jun 16, 2003 at 05:34:32PM -0600, D. Stimits wrote:
> Thomas Dickey wrote:
> 
> >On Mon, Jun 16, 2003 at 05:05:30PM -0600, D. Stimits wrote:
> >
> >>I'm trying to use wbkgd(), with a different wbkgd() in different
> >>subwindows, recursively. These are also inside of a panel. So I might
> >>have a panel with a subwindow that has a border, and a useful subwindow
> >>inside of the border; this in turn might have a temporary "pop up" style
> >>subwindow inside of it, and I want to set wbkgd() separately for each
> >>subwindow. Unfortunately, I seem to be doing something wrong, and the
> >>final wbkgd() (although called for the specific subwindow and not for

I don't know - part of the answer is that we're trying to be compatible
with other implementations of curses, and what you're talking about is
a detail that I don't recall having been well-tested.  From my standpoint,
I'd like to have a small test program that I could compare with Solaris
curses, and see that it's not doing what you want.  If there's a difference
at that level, I'll try to fix it.  Otherwise, it's a matter of seeing how
to achieve the effect you're working on within the existing design (I can
try to offer advice on that).
 
> PS: What are the chances that the wprintw family can be fixed to keep 
> the fmt const char* instead of just char*? I know curses.h says they are 
> const, but the actual functions are throwing the const away (according 

that seems to be a matter of interpretation.  I added an extension (an
option to the configure script) which compiles-in "const" in the places
where I thought it should have been.  But that's not compatible with
X/Open curses - so it's not standard (it's fairly easy to construct
a program that will then compile only with ncurses - I've done it
accidentally more than once ;-).

Some people (including some packagers) simply turn on the const because
they want to appease g++ -Wall.  For packagers - that's a bad idea, since
it creates a ripple effect with people having trouble porting to/from
other systems.

(I'm aware that NetBSD curses simply makes some of those "const", having
gotten an uninformed opinion from someone at X/Open, but they didn't
make the changes as systematically as I did, and the opinion was apparently
by someone who doesn't program ;-)

> to the g++ compiler, which rejects 100% of passing a const to a 
> non-const argument position). Ncurses is not altering these values, but 
> merely having it declared as non-const breaks compiles, so I have to do 
> a strdup(std::string.c_str()) and passing the dup to all print functions 
> taking char*, then deallocating the dup. The generated functions are 
> discarding const.
> 
> > When using this routine, it is nec-
> >       essary  to call touchwin or touchline on orig before call-
> >       ing wrefresh on the subwindow.
> >
> 
> 
> 
> 
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-ncurses

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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