bug-ncurses
[Top][All Lists]
Advanced

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

Re: Problems with chgat-family of functions


From: Thomas Dickey
Subject: Re: Problems with chgat-family of functions
Date: Sat, 3 Jun 2006 06:55:40 -0400 (EDT)

On Wed, 31 May 2006, Sadrul H Chowdhury wrote:

Hi. I am trying the following piece of code:

/***************************** start of code *****************************/
#include <ncurses.h>

int main()
{
      WINDOW *w;

      initscr();
      start_color();

      box(stdscr, 0, 0);

      mvwchgat(stdscr, 0, 0, 6, A_BLINK, 1, NULL);

chgat() doesn't mark the text as altered.
I agree that it would be nice, but other implementations appear to agree.
You'll have to use touchline or touchwin to get the effect you want.

      wrefresh(stdscr);

      w = newwin(5, 5, 10, 10);
      box(w, 0, 0);
      mvwchgat(w, 0, 0, -1, A_BLINK, 1, NULL);
      wrefresh(w);
      getch();

      mvwchgat(stdscr, 0, 8, 6, A_BLINK, 1, NULL);
      wrefresh(stdscr);
      getch();

      endwin();

      return 0;
}

/***************************** end of code *****************************/

The changes after the first getch() doesn't seem to do anything. Is there
something I need to do to show the update on the screen?

Also, the call to `box` shows a nice proper rectangular box. But when I do
chgat on them, they show up as ascii chars (eg. l,q,k,x etc). Is there any
way I can chgat and still show the nice straight-line characters?

Line-drawing is an attribute. If you change the attributes so line-drawing isn't in effect, you'll see the mapping characters.

Thanks.
Sadrul


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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