PF-Set-Panel-Stack (Value 18)

Resets the stack of enabled panels according to the specified list of enabled panels, then redraws the screen.

Parameters:

Panels-Order-List A group item containing:
POL-Count pic 9(4) comp-x.
POL-ID pic 9(4) comp-x occurs 254.

On Entry:

POL-Count The number of enabled panels in the list.
POL-ID The list of identifying handles of the enabled panels that are to be redrawn.

On Exit:

None

Comments:

Any panel not specifed in POL-ID is disabled, while any panel that is specified in POL-ID is enabled and displayed.

Example:

The following example shows how you could use the PF-Get-Panel-Stack and PF-Set-Panel-Stack functions together to save the state of an application's panels, before changing the panels, then restoring the panels to their original state.

The example shows extracts of a main program that calls a subprogram, where the state of the main program's panels is saved prior to calling the subprogram and restored on return. The subprogram requires only one panel to be displayed, a company logo, which is displayed by the main program.

 working-storage section.
 01 panels-order-list.
     03  pol-count          pic 9(4) comp-x.
     03  pol-id             pic 9(4) comp-x occurs 254.
 01 save-panels-order-list  pic x(510).
 01 company-logo-panel-id   pic 9(4) comp-x.
  ...
 procedure division.
      ...
 call-subprogram section.
      ...
* Before calling the subprogram, get a copy of the current 
* stack of panels.
     move pf-get-panel-stack to ppb-function
     perform make-panels-call
* Now save this copy of the stack.
     move panels-order-list to save-panel-order-list
* Next, remove all of the main program's panels from the
* display, except for the panel showing the company logo.
     move 1 to pol-count
     move company-logo-panel-id to pol-id(1)
     move pf-set-panel-stack to ppb-function
     perform make-panels-call
* The Stack is now empty, except for the company logo, so 
* call the subprogram.
     call "SUBPROG"   
* On return from the subprogram, restore the program's 
* panels to their state prior to the subprogram call.
     move pf-set-panel-stack to ppb-function
     perform make-panels-call
      ...
 make-panels-call section.
     call "PANELS" using panels-parameter-block
     panels-order-list