home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / CSAPE32.ARJ / SOURCE / OWLSCR / BORDAUX.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-28  |  1.8 KB  |  71 lines

  1. /*
  2.     bordaux.c
  3.  
  4.     % auxillary    routines for borders.
  5.  
  6.     OWL 1.2
  7.     Copyright (c) 1986, 1987, 1988, by Oakland Group, Inc.
  8.     ALL RIGHTS RESERVED.
  9.  
  10.     Revision History:
  11.     -----------------
  12.     12/16/88 jmd    pulled out of border.c
  13.     12/18/88 jmd    removed bord_SendMsg
  14.  
  15.      1/20/89 jmd    fixed bug in bord_GetPixBox
  16.      5/28/89 jmd    added Shadow support
  17.      8/12/89 ted    changed Shadow support
  18.  
  19.      1/17/90 ted    Added shademsg args to _Expose functions.
  20.      3/28/90 jmd    ansi-fied
  21. */
  22.  
  23. #include "oakhead.h"
  24. #include "disppriv.h"
  25. #include "bordobj.h"
  26.  
  27. /* -------------------------------------------------------------------------- */
  28.  
  29. void bord_GetPixBox(win_type win, opbox *boxp)
  30. {
  31.     boxp->xmin = 0;
  32.     boxp->ymin = 0;
  33.     boxp->xmax = bord_GetPixWidth(win);
  34.     boxp->ymax = bord_GetPixHeight(win);
  35.  
  36.     opbox_trans(boxp, bord_xoffs(win), bord_yoffs(win));
  37. }
  38. /* -------------------------------------------------------------------------- */
  39.  
  40. void bord_GetBox(win_type win, ocbox *cboxp)
  41. {
  42.     opcoord fw, fh;
  43.  
  44.     fw = win_GetFontWidth(win);
  45.     fh = win_GetFontHeight(win);
  46.  
  47.     cboxp->toprow   = 0;
  48.     cboxp->leftcol  = 0;
  49.     cboxp->botrow   = bord_GetHeight(win) - 1;
  50.     cboxp->rightcol = bord_GetWidth(win) - 1;
  51.  
  52.     ocbox_trans(cboxp, bord_yoffs(win)/fh, bord_xoffs(win)/fw);
  53. }
  54. /* -------------------------------------------------------------------------- */
  55.  
  56. void bord_Expose(win_type win, int emsg, VOID *emsgdata, int shademsg, VOID *shademsgdata)
  57. /*
  58.     Expose the whole window which the border is attached to, including the
  59.     border frame and shadow.
  60. */
  61. {
  62.     opbox shbox;
  63.  
  64.     if (win != NULL) {
  65.         win_getshadowbox(win, &shbox);
  66.         wmgr_ExposePixBox(win, NULL, &shbox, emsg, emsgdata, shademsg, shademsgdata);
  67.     }
  68. }
  69. /* -------------------------------------------------------------------------- */
  70.  
  71.