HELP SIM_CONTROL_PANEL                           Aaron Sloman March 1999
                                            (With help from Brian Logan)


sim_control_panel(xloc, yloc, tracevars, columns, title);
sim_control_panel(xloc, yloc, tracevars, columns, title, panel);

Produces a control panel with some standard buttons, and also
toggle buttons corresponding to the variables whose names are in the
list tracevars.

The new panel is assigned to the global variable sim_panel.

This is an experimental adjunt to LIB SIM_AGENT and LIB SIM_HARNESS,
still under development and likely to evolve.

For the most up to date information see

    LIB * SIM_CONTROL_PANEL

Which contains some simple test examples.

EXAMPLE: which may be out of date if I forget to update it after
extending the library!

    ;;; sim_alltracevars can be given as fourth argument
    ;;;     to run_simulation_withvars.
    ;;; All these variables will have their values set false.
    ;;; Some, in the list given to run_simulation, are subsequently
    ;;; set true. The whole lot will be displayed in the panel
    ;;; created, along with buttons for stopping the demo, killing
    ;;; windows, etc.

global vars
    sim_alltracevars =
        [
            ;;; Poprulebase variables (See HELP POPRULEBASE)
            prb_walk prb_chatty prb_show_conditions

            ;;; SIM_HARNESS variables
            demo_startrules_trace demo_endrules_trace
            demo_data_trace demo_message_trace
            demo_actions_trace
            demo_cycle_trace demo_cycle_pause
            demo_end_sim_trace
            demo_check_popready

            ;;; switch garbage collection tracing on or off
            popgctrace];

;;; test

sim_control_panel(10, 10, sim_alltracevars, 2, 'Control');

This creates a panel and assigns it to the global variable sim_panel.

To see the effect of putting one panel inside another try:

sim_control_panel(20, 20, [], 2, 'Control', sim_panel);


LIKELY TO BE MODIFIED OR EXTENDED.
THIS FILE LAST UPDATED 19 May 1999

--- $poplocal/local/sim/help/sim_control_panel
--- Copyright University of Birmingham 1999. All rights reserved. ------
