home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / utils / precognition / include / precognition3d.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-24  |  3.6 KB  |  124 lines

  1. /* ==========================================================================
  2. **
  3. **                       Precognition3D.h
  4. **
  5. **
  6. ** ©1991 WILLISoft
  7. **
  8. ** ==========================================================================
  9. */
  10.  
  11. #ifndef PRECOGNITION3D_H
  12. #define PRECOGNITION3D_H
  13.  
  14. #include "intuition_typedefs.h"
  15.  
  16.  
  17. typedef struct pcg_3DPens
  18.    {
  19.       UBYTE FrontPen,   BackPen;    /* Foreground Pen, Background Pen */
  20.       UBYTE BrightPen,  DarkPen;    /* 3D Highlight, shadow.          */
  21.    } pcg_3DPens;
  22.  
  23.  
  24. /* ==================== pcg_3DBox ============================
  25. ** This type is compatible with a 'Border' structure.
  26. ** It is used to create a 3D looking box, like under
  27. ** Workbench 2.0.  It consists of 2 Border structures linked
  28. ** together.
  29. ** ===========================================================
  30. */
  31.  
  32. typedef struct pcg_3DBox
  33.    {
  34.       Border     TopLeft;       /* Top & Left edge of box.     */
  35.       Border     BottomRight;   /* Bottom & right edge of box. */
  36.       SHORT      Points[20];    /* Box outline.                */
  37.    } pcg_3DBox;
  38.  
  39. /* ======================= pcg_3DBevel ========================
  40. ** This type is compatible with a 'Border' structure.
  41. ** It is used to create a 3D looking Bevel, like the string
  42. ** gadgets under Workbench 2.0.
  43. ** ============================================================
  44. */
  45.  
  46. typedef struct pcg_3DBevel
  47.    {
  48.       pcg_3DBox Outer, Inner;
  49.    } pcg_3DBevel;
  50.  
  51.  
  52. typedef struct pcg_3DThinBevel
  53.    {
  54.       Border         b[4];
  55.       SHORT          Points[20];
  56.    } pcg_3DThinBevel;
  57.    /*
  58.    ** ThinBevels are 2 pixels along the X axis, they're used for
  59.    ** embossed outline boxes.
  60.    */
  61.  
  62.  
  63. pcg_3DPens StandardPens();
  64.    /*
  65.    ** Returns the standard color pens.  This works for both
  66.    ** Workbench 1.2/3 and Workbench 2.0.
  67.    */
  68.  
  69.  
  70. void pcg_Init3DBox(     
  71.    #ifdef ANSI_HEADERS
  72.                         pcg_3DBox *Box,
  73.                         SHORT      LeftEdge,
  74.                         SHORT      TopEdge,
  75.                         USHORT     Width,
  76.                         USHORT     Height,
  77.                         UBYTE      TopLeftPen,
  78.                         UBYTE      BottomRightPen,
  79.                         Border    *NextBorder
  80.    #endif
  81.                   );
  82.  
  83.  
  84. void pcg_Init3DBevel(   
  85.    #ifdef ANSI_HEADERS
  86.                         pcg_3DBevel *Bevel,
  87.                         SHORT        LeftEdge,
  88.                         SHORT        TopEdge,
  89.                         USHORT       Width,
  90.                         USHORT       Height,
  91.                         USHORT       BevelWidth,
  92.                         UBYTE        TopLeftPen,
  93.                         UBYTE        BottomRightPen,
  94.                         Border      *NextBorder 
  95.    #endif
  96.                     );
  97.  
  98. /* LeftEdge, TopEdge, Width, Height refer to the _outer_ box.
  99. **
  100. ** 'BevelWidth' is the amount of blankspace between the inner and
  101. ** outer border.  (0 is an ok value.)
  102. **
  103. ** If 'TopLeftPen' is bright, and 'BottomRightPen' is dark, the bevel
  104. ** will appear to stand out.  If 'TopLeftPen' is dark, the bevel will
  105. ** appear recessed.
  106. */
  107.  
  108. void pcg_Init3DThinBevel(  
  109.    #ifdef ANSI_HEADERS
  110.                            pcg_3DThinBevel *Bevel,
  111.                            SHORT            LeftEdge,
  112.                            SHORT            TopEdge,
  113.                            USHORT           Width,
  114.                            USHORT           Height,
  115.                            USHORT           BevelWidth,
  116.                            UBYTE            TopLeftPen,
  117.                            UBYTE            BottomRightPen,
  118.                            Border          *NextBorder 
  119.    #endif
  120.                         );
  121.  
  122.  
  123. #endif
  124.