Returns the identifying handle and information about the panel that would be the topmost panel if the currently topmost panel were deleted.
Parameters:
Panel-Name-Buffer.
|
Group item containing:
Panel-Name-Length pic 99 comp-x.
Panel-Name-Text pic x(30).
|
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-x.
|
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.
|
On Exit:
Panel-Name-Length
|
The length of the name associated with the panel.
|
Panel-Name-Text
|
The name associated with the panel by a call to function PF-Set-Panel-Name.
|
PPB-First-Visible-Col
|
The horizontal position of the visible window on the panel.
|
PPB-First-Visible-Row
|
The vertical position of the visible window on the panel.
|
PPB-Panel-Height
|
The height of the panel.
|
PPB-Panel-ID
|
The identifying handle of the panel that was enabled most recently.
|
PPB-Panel-Start-Column
|
The horizontal position of the panel on the screen.
|
PPB-Panel-Start-Row
|
The vertical position of the panel on the screen.
|
PPB-Panel-Width
|
The width of the panel.
|
PPB-Visible-Height
|
The height of the visible window in the panel.
|
PPB-Visible-Width
|
The width of the visible window in the panel.
|
Example:
This example returns the details of all panels that Panels is aware of. The example assumes that you have declared a table in the Working-Storage Section of your program to hold the information, and a data item panel-num to use as a subscript.
*
* Get details of the first panel
*
move 1 to panel-num
move pf-get-first-panel to ppb-function
perform make-panels-call
if ppb-status not = error-invalid-id
* (code to abort)
perform move-values-to-working-storage
add 1 to panel-num
*
* Get details of all other panels, until ppb-status is
* returned as error-invalid-id.
*
move pf-get-next-panel to ppb-function
call "PANELS" using panels-parameter-block
panel-name-buffer
perform until ppb-status = error-invalid-id
perform move-values-to-working-storage
add 1 to panel-num
perform make-panels-call
end-perform
...
move-values-to-working-storage section.
*
* Move all the exit parameters to the Working-Storage section
* to retain their values.
*
move ppb-panel-id to ws-panel-id (panel-num)
move ppb-panel-height to ws-panel-height (panel-num)
move ppb-panel-width to ws-panel-width (panel-num)
move ppb-visible-height
to ws-visible-height (panel-num)
move ppb-visible-width
to ws-visible-width (panel-num)
move ppb-panel-start-column
to ws-panel-start-column (panel-num)
move ppb-panel-start-row
to ws-panel-start-row (panel-num)
move ppb-first-visible-col
to ws-first-visible-col (panel-num)
move ppb-first-visible-row
to ws-first-visible-row (panel-mum)
move panel-name-buffer
to ws-panel-name-buffer (panel-num)
move panel-name-length
to ws-panel-name-length (panel-num)
move panel-name-text
to ws-panel-name-text (panel-num)
.
make-panels-call section.
call "PANELS" using panels-parameter-block
panel-name-buffer
Comments:
On exit from this function, the most significant bit of Panel-Name-Length is a flag that indicates whether or not the panel is enabled - zero indicates that the panel is not enabled, while a non-zero value shows that it is enabled. To check whether this is the case, you should check whether Panel-Name-Length > 127.
The only Panels calls that you can use immediately before PF-Get-Next-Panel are PF-Get-First-Panel and other PF-Get-Next-Panel. That is, there must be no other Panels calls between two successive calls to PF-Get-Next-Panel, or between a call to PF-Get-First-Panel and one to PF-Get-Next-Panel.
If there is no next panel when you call PF-Get-Next-Panel, PPB-Status contains the value Error-Invalid-ID.