パネルに書き込むテキストおよび属性は、PPB-Update-Mask のビット 4 および 5 を使用し、パネルが使用可能である場合に、画面上に表示されます。
PPB-Update-Mask でのビット設定に応じて、次のように特定のデータ項目を指定する必要があります。
attribute-buffer | pic x(n) |
PPB-Buffer-Offset | pic 9(4) comp-x |
PPB-Fill-Attribute | pic x |
PPB-Fill-Character | pic x |
PPB-Panel-ID | pic 9(4) comp-x |
PPB-Update-Height | pic 9(4) comp-x |
PPB-Update-Mask | pic x |
PPB-Update-Start-Col | pic 9(4) comp-x |
PPB-Update-Start-Row | pic 9(4) comp-x |
PPB-Update-Width | pic 9(4) comp-x |
PPB-Vertical-Stride | pic 9(4) comp-x |
text-buffer | pic x(n) |
attribute-buffer | PPB-Update-Mask のビット 1 が設定されている場合は、領域を埋める属性バッファーを指定します。 |
PPB-Buffer-Offset | PPB-Update-Mask のビット 0 が設定されている場合は、text-buffer から表示する最初の文字位置を指定します。PPB-Update-Mask のビット 1 が設定されている場合は、attribute-buffer から表示する最初の属性位置を指定します。 |
PPB-Fill-Attribute | PPB-Update-Mask のビット 3 が設定されている場合は、領域を埋める属性を指定します。 |
PPB-Fill-Character | PPB-Update-Mask のビット 2 が設定されている場合は、領域を埋める文字を指定します。 |
PPB-Panel-ID | 書き込むパネルの識別ハンドル。 |
PPB-Update-Height | 更新領域の高さ。 |
PPB-Update-Mask | 「Panels パラメーター ブロック」セクションを参照してください。 |
PPB-Update-Start-Col | 書き込みで影響を受ける領域の最初の列。 |
PPB-Update-Start-Row | 書き込みで影響を受ける領域の最初の行。 |
PPB-Update-Width | 更新領域の幅。 |
PPB-Vertical-Stride | PPB-Update-Mask のビット 0 または 1 が設定されている場合は、text-buffer または attribute-buffer の行の長さを指定します。 |
text-buffer | PPB-Update-Mask のビット 0 が設定されている場合は、領域を埋めるテキスト バッファーを指定します。 |
この例は、50 文字の幅で 15 行の高さのパネルを仮定しています。パネルのハンドルは、ws-save-panel-id に保存されています。
この例は、テキストおよび属性バッファーから最初の 15 行をパネルに書き込みます。
* Define an update rectangle (that is a block of the panel * to update). In this case, define the entire panel as the * rectangle. move 50 to ppb-update-width move 15 to ppb-update-height * Since the "update rectangle" is the same size * as the panel, the update window has no offset within the * panel. move 0 to ppb-update-start-row move 0 to ppb-update-start-col * Write using text and attribute buffers starting with the * first character of the buffers. move 1 to ppb-buffer-offset * One row of the update window is 50 characters wide. move 50 to ppb-vertical-stride * Start writing beginning with the first character of the * update window (where 0 is the top left-hand corner of the * window). move 0 to ppb-rectangle-offset * Write 750 characters (15 rows times 50 characters per row) * to the panel. move 750 to ppb-update-count * Use text and attribute buffers (set bits 0 and 1 of * PPB-Update-Mask) and have the text immediately visible on * the screen if the panel is enabled (set bits 4 and 5 of * PPB-Update-Mask). x"33" is binary 00110011. move x"33" to ppb-update-mask * The panel identifier was saved in ws-save-panel-id. move ws-save-panel-id to ppb-panel-id * Write to the panel. The text buffer is text-buffer and the * attribute buffer is attribute-buffer. move pf-write-panel to ppb-function call "PANELS" using panels-parameter-block ws-text-buffer ws-attribute-buffer. if ppb-status not = zero * (code to abort)