home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C ++ / Code Resources / Windows 95 MDEF 2.0.1 / Sourcery / WinFun95 / Win95Look.h < prev   
Encoding:
C/C++ Source or Header  |  1997-08-18  |  3.3 KB  |  135 lines  |  [TEXT/CWIE]

  1. #include <ColorPicker.h>
  2.  
  3. #ifndef WIN95LOOK_H_
  4. #define WIN95LOOK_H_
  5.  
  6. /*
  7.     Ack! Routines which give your Mac a distinct Windows95 look!
  8.     Blasphemy! Heretic!
  9.     
  10.     Written by Hiep Dam.
  11.     Version 1.0
  12.     From The Witches' Brew
  13.     Created: Dec 3 95
  14.     
  15.     Version history:
  16.     
  17.     6/12/96        1.01    Cleaned up interfaces.
  18.     
  19. */
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24.  
  25. // ---------------------------------------------------------------------------
  26.  
  27. /***** Windows 95 text drawing routines *****/
  28.  
  29. /*
  30.     The text-drawing routines give the text an "embossed look". The routine
  31.     uses two colors to get an embossed look. You will want the <embossColor>
  32.     to be lighter than <textColor> for the standard embossed effect.
  33.     
  34.     These routines save whatever GrafPort variables they set, with the
  35.     exception of the penLoc.
  36.     
  37.     Before calling these routines you should first set the destination port
  38.     via SetPort(), and set the following to what you want:
  39.         - textFont
  40.         - textSize
  41.         - textFace
  42.     
  43.     The textMode for these routines is always srcOr.
  44. */
  45.  
  46.  
  47. // Draw one char
  48. void W95DrawChar(
  49.     char theChar,
  50.     const RGBColor *textColor,
  51.     const RGBColor *embossColor);
  52.  
  53. // Draw a string. Note: does not use pascal or c strings.
  54. void W95DrawText(
  55.     char *text,                        // Pointer to first char of string
  56.     unsigned short length,
  57.     const RGBColor *textColor,
  58.     const RGBColor *embossColor);
  59.  
  60. // Similar to above, put you specify an explicit drawing location.
  61. void W95DrawTextAt(
  62.     char *text,
  63.     unsigned short length,
  64.     short h,
  65.     short v,
  66.     const RGBColor *textColor,
  67.     const RGBColor *embossColor);
  68.  
  69. // ---------------------------------------------------------------------------
  70.  
  71. /*
  72.     Line and rect drawing routines. Creates a 3D effect by using the
  73.     line and hilite colors. <hiliteColor> should be lighter than
  74.     <lineColor>.
  75.     
  76.     These routines also save the GrafPort variables with the exception
  77.     of the penLoc.
  78. */
  79. void W95LineTo(
  80.     short h,
  81.     short v,
  82.     const RGBColor *lineColor,
  83.     const RGBColor *hiliteColor);
  84.  
  85. void W95DrawRect(
  86.     const Rect *frame,
  87.     const RGBColor *lineColor,
  88.     const RGBColor *hiliteColor);
  89.  
  90. // ---------------------------------------------------------------------------
  91.  
  92. /*
  93.     These routines draw a right-pointing and a downward-pointing
  94.     triangle. There are two different looks involved, depending
  95.     on whether <exactWin95Look> is true or false...
  96.         
  97.     How the parameters are used depends on <exactWin95Look>.
  98.     If true, all three RGBColors are used.
  99.     If false, only <lineColor> and <hiliteColor> are used, and
  100.     drawn in a 3D fashion. <hiliteColor> should be lighter than
  101.     <lineColor>. <fillColor> is not used.
  102.     
  103.     Confused yet?
  104. */
  105. void W95DrawTriangleRight(
  106.     const Rect *triangleBounds,
  107.     Boolean exactWin95Look,
  108.     const RGBColor *lineColor,
  109.     const RGBColor *hiliteColor,
  110.     const RGBColor *fillColor);
  111.  
  112. void W95DrawTriangleDown(
  113.     const Rect *triangleBounds,
  114.     Boolean exactWin95Look,
  115.     const RGBColor *lineColor,
  116.     const RGBColor *hiliteColor,
  117.     const RGBColor *fillColor);
  118.  
  119. // ---------------------------------------------------------------------------
  120.  
  121. void W95DrawEmbossedButton(
  122.     const Rect *btnRect,
  123.     Boolean pushedIn,
  124.     const RGBColor *baseColor,
  125.     const RGBColor *hiliteColor,
  126.     const RGBColor *shadowColor,
  127.     const RGBColor *frameColor);    // optional; if NULL, black is used.
  128.  
  129. // ---------------------------------------------------------------------------
  130.  
  131. #ifdef __cplusplus
  132. }
  133. #endif
  134.  
  135. #endif // WIN95LOOK_H_