                           CONTROL PANEL NDA vers 2.0
                        Copyright (c) 1988, Paul Elseth
                            (Documentation vers 1.0)


                                  INTRODUCTION
                                  ------------

This program may be freely distributed to anyone.  I do, however, retain the
copyright.  When you do share this program, please be sure to include all five
files:
      .  PANEL          This is the control panel NDA main program
      .  GENERAL.CP     This is the definition file for the GENERAL module
                        of the control panel.
      .  INPUT.CP       This is the def file for the INPUT module.
      .  SLOTS.CP       This is the def file for the SLOTS module.
  (the above files should all be placed in the SYSTEM/DESK.ACCS folder on
  your boot disk)
      .  PANEL.DOC      This file.

Also, please feel free to examine, modify, or add new modules to the control 
panel.  That's what the source code is for.  If you create a new section, or 
significantly modify an existing one and would like to have it included with 
the standard package, please contact me at the address given below.



                          USING THE CONTROL PANEL NDA
                          ---------------------------

For the most part, the use of the control panel is self-explanatory.  A few 
areas need a little clarification, however.

 . To use the control panel NDA, the main program (PANEL), and all of the 
modules (currently GENERAL.CP, INPUT.CP, and SLOTS.CP) must be copied into the 
SYSTEM/DESK.ACCS subdirectory on your startup disk.  Then, reboot your system.  
The control panel will be accessible from any "desktop" application that 
supports desk accessories (via the colored-Apple menu).

 . The control panel NDA is intended to be used in 640-mode only.  This 
restriction may be lifted later.  Use in 320-mode will not hurt anything, but 
it looks pretty bad.  (If the control panel window looks REALLY big, and only 
part of it is visible on the screen, you are probably using a program in 
320-mode.)

 . The control panel starts up with the GENERAL module selected.  To change to 
another module, just click on an icon on the left side of the control panel 
window.  If there are more than 4 modules available, you can use the scroll bar 
to scroll the icon list.

 . To select you desktop color, click on the white rectangle part of the 
desktop color control.  The lower rectangle will then cycle through the colors 
available.  When the color you want shows, click on the colored rectangle to 
change the desktop color.

   Note: Some programs (such as the FINDER) draw their own desktop
         pattern, so it cannot be changed using the control panel.  If
         this is the case, clicking the color square will just beep
         instead of changing the background.

 . At this time, changing slots in the SLOTS module does not affect the current 
slot settings - they will change next time you boot the system, just like in 
the control panel CDA.

 . You cannot currently edit the date or time, only change their display 
display format.


Please send any comments, questions, suggestions, etc to one of the following:

          BIXMAIL:      pelseth

          CIS:          76067,1155

          US MAIL:      Paul Elseth                   !please include a SASE if
                        1929 NW 19th Ave, Apt C       !you wish a response via
                        Rochester, MN 55901           !US MAIL.




                       CREATING NEW CONTROL PANEL MODULES
                       ----------------------------------

This following is a brief technical explanation on writing module for the 
control panel NDA.  If you are not a programmer, feel very free to skip this 
section.

It will be very helpful to examine the source code for the modules provided as 
you read the information below.  Bear in mind that these modules are not 
intended to be examples of fantastic programming style.  However, if you come 
up with a really great improvement to any of them, feel free to let me know.  
If you did not get source code for the supplied modules with the object code, 
try looking on Compuserve or BIX, or contact me at any of the sources above.


LOADING MODULES:
  All control panel modules are type RTL ($B4), and reside in the DESK.ACCS 
  subdirectory of the boot disk.
  The individual modules are located and loaded each time the control panel is 
  selected from the Apple menu.  The loader checks the first two bytes of the 
  file, which must be:  $4331 ("C1").

MODULE HEADER:
  Each module must start with a specific header as show below:


         DC    C'C1'              ;id code/version
         JMP   INIT               ;initialization routine
         JMP   DRAW               ;drawing routine
         JMP   CLOCK              ;clock (1-second) handler

         DC    I'n'               ;number of controls

         DC    I4'CDEF1'          ;pointer to control 1 definition
         DC    I4'0'              ;handle of control 1 record
         :         :
         DC    I4'CDEFn'          ;pointer to control n definition
         DC    I4'0'              ;handle of control n record

         DC    I4'MNAME'          ;pointer to module's name (Pstring)

         DC    I4'MICON'          ;pointer to module's icon (QD-Aux type)


  The INIT routine is called each time the module is selected from the module 
  list, before the controls are added to the window.  Nothing can be assumed 
  about the register contents, but you must restore the data bank register and 
  direct page register if you change them.  Return with an RTL statement when 
  done.

  The DRAW routine is called to update the control panel window.  Assume 
  nothing about the register contents, but you must restore the data bank 
  register and direct page register if you change them.  Return with an RTL 
  statement when done.
  The CLOCK routine is called once every second, and can be used to update a 
  time display, or anything else that must be done every second.  If you don't 
  need this, place an RTL, NOP, NOP in the field (it must be three bytes long). 
  Assume nothing about the register contents, but you must restore the data 
  bank register and direct page register if you change them. Return with an RTL 
  statement when done.

  The control definition is explained below.

  The control handles are put in when the controls are added to the window. 
  They are here for your use, if needed, but DON'T MODIFY THEM!

  The module name pointer points to a PASCAL (length-byte first) string 
  containing the name that is shown in the module list.

  The module icon pointer points to a Quickdraw II Aux type icon (icon + mask) 
  that is shown in the module list.


CONTROL DEFINITION:
  The control definition is as follows:

CDEF1    ANOP
         DC    I2'0,0,10,10'                ;enclosing rectangle
         DC    I4'TITLESTR'                 ;ptr to title
         DC    I2'%0000000000000000'        ;flags
         DC    I2'0'                        ;value
         DC    I2'0'                        ;parameter 1
         DC    I2'0'                        ;parameter 2
         DC    I4'$00000000'                ;defProcPtr or std ctrl value
         DC    I4'GHAND1'                   ;ptr to control handler
         DC    I4'0'                        ;color table

  The enclosing rect field contains the actual rectangle, NOT a pointer to the 
  rectangle.

  The title pointer points to the title string for the control (points to a 
  zero if no title).

  The flags field depends on the control being defined, as do the value and 
  parameter fields.

  The defProcPtr field either points to a definitions procedure for the 
  control, or contains a standard control value.

  The control handler field contains a pointer to the routine which is called 
  every time the control is selected by the user.  This routine should do any 
  processing needed for that control setting.  The values for each of the 
  standard controls are updated automatically by the control panel main program 
  before the handler is called.

  The color table field contains a ptr to the color table for this control, or 
  a null for standard colors.

SUMMARY:
  This brief discussion, along with the sample module source code, should 
  provide enough information for you to be able to create your own control 
  panel modules.  If you have any questions, comments, or suggestions, feel 
  free to contact me at an address given above.
