Back to index

lightning-sunbird  0.9+nobinonly
temncurses.c
Go to the documentation of this file.
00001 
00002   /* Move cursor and display string */
00003   x = 2;
00004   y = 4;
00005 
00006   /* if (scanf("%d %d", &y, &x) == EOF) break; */
00007 
00008   /* Display string at specified location and advance cursor */
00009   mvaddnstr(y, x, "test 1", 6);
00010 
00011   attron(A_BOLD);
00012   mvaddnstr(y, x+6, "test2 ", 6);
00013   attroff(A_BOLD);
00014 
00015   refresh();
00016 
00017   for (;;) {
00018     c = getch();
00019     if (c == KEY_MOUSE) {
00020       if (getmouse(&mev) == OK) {
00021         move(mev.y, mev.x);
00022         addnstr("MEV ", 4);
00023         refresh();
00024 
00025         /* Delete top line, and move up (if +1, insert top line, move down) */
00026         move(0,0);
00027         insdelln(-1);
00028 
00029       }
00030     }
00031   }
00032