PHP Velho Oeste 2024

ncurses_wborder

(PHP 4 >= 4.3.0, PHP 5 < 5.3.0, PECL ncurses >= 1.0.0)

ncurses_wborder属性文字を使用してウィンドウの周囲に線を描画する

説明

ncurses_wborder ( resource $window , int $left , int $right , int $top , int $bottom , int $tl_corner , int $tr_corner , int $bl_corner , int $br_corner ) : int
警告

この関数は、 実験的 なものです。この関数の動作・ 名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 この関数は自己責任で使用してください。

window で指定したウィンドウの周囲を指定した線と角で囲みます。

メインウィンドウの周囲を囲むには、ncurses_border() を使用します。

パラメータ

各パラメータに 0 を渡すとその部分を描画し、1 を渡すと描画しません。

window

操作するウィンドウ。

left

right

top

bottom

tl_corner

左上隅。

tr_corner

右上隅。

bl_corner

左下隅。

br_corner

右下隅。

参考

  • ncurses_border() - 属性付きの文字で画面周囲に境界を描画する

add a note add a note

User Contributed Notes 1 note

up
1
kermodebear (at) gmail dot com
15 years ago
Note that this function is looking for the ordinal value of a character - you must pass integers, not actual characters.

For the sake of 'ease of use', I use this in my ncurses Window class:

<?php
public function border($left = '|', $top = '-', $right = '|', $bottom = '-', $tlCorner = '+', $trCorner = '+', $brCorner = '+', $blCorner = '+')
{
   
ncurses_wborder($this->window, ord($left), ord($right), ord($top), ord($bottom), ord($tlCorner), ord($trCorner), ord($blCorner), ord($brCorner));
}
?>

This allows you to do something like the following:
<?php
// Border the window with some weird stuff.
$window->border('.', '~', 'l', '$');
?>
To Top