home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / prettywindows_399.lzh / PrettyWindows / pwindows1.c < prev    next >
C/C++ Source or Header  |  1990-11-02  |  2KB  |  103 lines

  1. #include <exec/types.h>
  2. #include <exec/exec.h>
  3. #include <intuition/intuition.h>
  4. #include <graphics/gfxbase.h>
  5. #include <graphics/gfx.h>
  6. #include <graphics/gfxmacros.h>
  7.  
  8. /********************************************
  9.  *  PrettyWindows v1.0   by Thom Robertson  *
  10.  ********************************************/
  11.  
  12.  
  13. prettywindow1(win,color)
  14. struct Window *win;
  15. int color;
  16. {
  17.  
  18.  
  19. /* Here we define our border structures. */
  20.  
  21. static SHORT vectors1[10];
  22.  
  23. struct Border line1 = {
  24.     0,0,    /* XY origin relative to container TopLeft */
  25.     1,0,JAM2,    /* front pen, back pen and drawmode */
  26.     5,    /* number of XY vectors */
  27.     vectors1,    /* pointer to XY vectors */
  28.     NULL    /* next border in list */
  29. };
  30.  
  31. static SHORT vectors2[10];
  32.  
  33. struct Border line2 = {
  34.     0,0,    /* XY origin relative to container TopLeft */
  35.     2,0,JAM2,    /* front pen, back pen and drawmode */
  36.     5,    /* number of XY vectors */
  37.     vectors2,    /* pointer to XY vectors */
  38.     NULL    /* next border in list */
  39. };
  40.  
  41. static SHORT vectors3[10];
  42.  
  43. struct Border line3 = {
  44.     0,0,    /* XY origin relative to container TopLeft */
  45.     3,0,JAM2,    /* front pen, back pen and drawmode */
  46.     5,    /* number of XY vectors */
  47.     vectors3,    /* pointer to XY vectors */
  48.     NULL    /* next border in list */
  49. };
  50.  
  51.  
  52.  
  53. vectors1[0] = 4;
  54. vectors1[6] = 4;
  55. vectors1[8] = 4;
  56. vectors1[2] = win->Width - 4;
  57. vectors1[4] = win->Width - 4;
  58. vectors1[1] = 2;
  59. vectors1[3] = 2;
  60. vectors1[9] = 2;
  61. vectors1[5] = win->Height - 2;
  62. vectors1[7] = win->Height - 2;
  63.  
  64. vectors2[0] = 8;
  65. vectors2[6] = 8;
  66. vectors2[8] = 8;
  67. vectors2[2] = win->Width - 8;
  68. vectors2[4] = win->Width - 8;
  69. vectors2[1] = 4;
  70. vectors2[3] = 4;
  71. vectors2[9] = 4;
  72. vectors2[5] = win->Height - 4;
  73. vectors2[7] = win->Height - 4;
  74.  
  75. vectors3[0] = 12;
  76. vectors3[6] = 12;
  77. vectors3[8] = 12;
  78. vectors3[2] = win->Width - 12;
  79. vectors3[4] = win->Width - 12;
  80. vectors3[1] = 6;
  81. vectors3[3] = 6;
  82. vectors3[9] = 6;
  83. vectors3[5] = win->Height - 6;
  84. vectors3[7] = win->Height - 6;
  85.  
  86. SetRast(win->RPort,color);
  87.  
  88. if (color == 1)
  89.    line1.FrontPen = 0;
  90. if (color == 2)
  91.    line2.FrontPen = 0;
  92. if (color == 3)
  93.    line3.FrontPen = 0;
  94.  
  95. DrawBorder(win->RPort,&line1,0,0);
  96. DrawBorder(win->RPort,&line2,0,0);
  97. DrawBorder(win->RPort,&line3,0,0);
  98.  
  99.  
  100. }  /* end of routine */
  101.  
  102.  
  103.