note 27671 added to function.ncurses-border
| From: | joeldegan at rack1 dot php dot net | Date: | Sun, 15 Dec 2002 02:40:47 +0000 |
| Subject: | note 27671 added to function.ncurses-border | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40920@lists.php.net to get a copy of this message | ||
Okay, what happened to the documentation for "wborder", the function is there? I was
trying to figure out what was going on with it when I just decided to "try" it and see..
If you run the following example, it borders the whole screen, then fills in part of it, writes a
window to the middle of it and then borders that new window and leaves the cusor there. (php
4.3.0RC0)
Any idea on when these features are going to be finalized?
enjoy.
<?php
# set the following just to be sure.
ini_set("ncurses.value",42);
ini_set("ncurses.string","foobar");
$n=0;
ncurses_init();
if(ncurses_has_colors()){
ncurses_start_color();
ncurses_init_pair(1,NCURSES_COLOR_RED,NCURSES_COLOR_BLACK);
ncurses_init_pair(2,NCURSES_COLOR_BLUE,NCURSES_COLOR_BLACK);
ncurses_init_pair(3,NCURSES_COLOR_YELLOW,NCURSES_COLOR_BLACK);
ncurses_init_pair(4,NCURSES_COLOR_BLUE,NCURSES_COLOR_BLACK);
ncurses_init_pair(5,NCURSES_COLOR_MAGENTA,NCURSES_COLOR_BLACK);
ncurses_init_pair(6,NCURSES_COLOR_CYAN,NCURSES_COLOR_BLACK);
ncurses_init_pair(7,NCURSES_COLOR_WHITE,NCURSES_COLOR_BLACK);
}
ncurses_border(0,0, 0,0, 0,0, 0,0);
while(1){
for ($x=1; $x<80; $x++) {
for ($y=1; $y<24; $y++) {
$n++;
ncurses_move($y,$x);
ncurses_addch($n+64);
ncurses_color_set($n%8);
ncurses_refresh();
if($n>26)$n=0;
}
}
$z = ncurses_newwin ( 15, 15, 10, 10);
# note the first var is the window handle, then the normal vars..
# nine total.
ncurses_wborder($z,0,0, 0,0, 0,0, 0,0);
ncurses_wrefresh($z);
ncurses_getch();
}
?>
--
http://www.php.net/manual/en/function.ncurses-border.php
http://master.php.net/manage/user-notes.php?action=edit+27671
http://master.php.net/manage/user-notes.php?action=delete+27671
http://master.php.net/manage/user-notes.php?action=reject+27671