パネルを作成します。
パラメーター:
パネルのウィンドウは、作成されるだけで、使用不能です。つまり、表示されません。
PPB-First-Visible-Col |
pic 9(4) comp-x |
PPB-First-Visible-Row |
pic 9(4) comp-x |
PPB-Panel-Height |
pic 9(4) comp-x |
PPB-Panel-ID |
pic 9(4) comp |
PPB-Panel-Start-Column |
pic 9(4) comp-x |
PPB-Panel-Start-Row |
pic 9(4) comp-x |
PPB-Panel-Width |
pic 9(4) comp-x |
PPB-Visible-Height |
pic 9(4) comp-x |
PPB-Visible-Width |
pic 9(4) comp-x |
入力パラメーター:
PPB-First-Visible-Col |
パネル内でのウィンドウの水平位置を指定します。値 0 は、ウィンドウの左端がパネルの左端に位置することを示します。 |
PPB-First-Visible-Row |
パネル内でのウィンドウの垂直位置を指定します。値 0 は、ウィンドウの上端がパネルの上端に位置することを示します。 |
PPB-Panel-Height |
作成されるパネルのテキストの行数。 |
PPB-Panel-Start-Column |
画面上でのパネルの水平位置を指定します。値 0 は、パネルの左端が画面の左端に位置することを示します。 |
PPB-Panel-Start-Row |
画面上でのパネルの垂直位置を指定します。値 0 は、パネルの上端が画面の上端に位置することを示します。 |
PPB-Panel-Width |
作成されるパネルのテキストの列数。 |
PPB-Visible-Height |
表示するウィンドウのテキストの行数。 |
PPB-Visible-Width |
表示するウィンドウのテキストの列数。 |
出力パラメーター:
PPB-Panel-ID |
作成されたパネルの識別ハンドル。プログラムの作業場所節内のデータ項目にこの値をコピーし、このパネルに対する機能を使用する場合に指定します。 |
例:
次の例は、20 文字の幅で 15 行の高さのパネルを作成します。このパネルは、画面上の 4 行目、1 列目から始まります。このパネルのウィンドウは、パネルの最初の行、最初の列から始まります。このウィンドウは、20 文字幅で 10 行の高さです。
* Panel size is 20 characters wide by 15 lines
move 20 to ppb-panel-width.
move 15 to ppb-panel-height.
* The window starts on screen line 4, col 1. Remember that
* PPB-Panel-Start-Column and PPB-Panel-Start-Row specify a
* screen position, where 0,0 is the top left corner of the
* screen.
move 3 to ppb-panel-start-row.
move 0 to ppb-panel-start-column.
* The window into the panel is 20 char wide by 10 lines.
move 20 to ppb-visible-width.
move 10 to ppb-visible-height.
* The window starts on the first line and column of the panel.
* Remember that 0,0 is the top left corner of the panel.
move 0 to ppb-first-visible-row.
move 0 to ppb-first-visible-col.
* Create the panel. It is initially disabled (invisible).
move pf-create-panel to ppb-function.
call "PANELS" using panels-parameter-block.
if ppb-status not = zero
* (code to abort)
...
* Save the panel identifier.
move ppb-panel-id to ws-save-panel-id.
説明:
Panels は、新しいパネルに対し、そのサイズに基づいて、メモリ領域を割り当てます。パネルに使用されるメモリのバイト数は、次のように決定されます。
2 × PPB-Panel-Height × PPB-Panel-Width
新しいパネルのサイズは、画面よりも大きくできますが、次のような制限があります。
これらの制限のどちらかに違反すると、エラー コード 6 が返されます。
パネルを作成した後、PF-Shift-Panel を使用して、幅および高さを除く任意の変数を変更できます。新しく作成されたパネルは、現在の背景文字および属性で埋められます。