home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / BORDAUX.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  1.7 KB  |  75 lines

  1. /*
  2.     bordaux.c
  3.  
  4.     % auxillary    routines for borders.
  5.  
  6.     OWL 1.1
  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.  
  20. #include "oakhead.h"
  21. #include "disppriv.h"
  22. #include "bordobj.h"
  23.  
  24. /* -------------------------------------------------------------------------- */
  25.  
  26. void bord_GetPixBox(win, boxp)
  27.     win_type win;
  28.     opbox *boxp;
  29. {
  30.     boxp->xmin = 0;
  31.     boxp->ymin = 0;
  32.     boxp->xmax = bord_GetPixWidth(win);
  33.     boxp->ymax = bord_GetPixHeight(win);
  34.  
  35.     opbox_trans(boxp, bord_xoffs(win), bord_yoffs(win));
  36. }
  37. /* -------------------------------------------------------------------------- */
  38.  
  39. void bord_GetBox(win, cboxp)
  40.     win_type win;
  41.     ocbox *cboxp;
  42. {
  43.     opcoord fw, fh;
  44.  
  45.     fw = win_GetFontWidth(win);
  46.     fh = win_GetFontHeight(win);
  47.  
  48.     cboxp->toprow   = 0;
  49.     cboxp->leftcol  = 0;
  50.     cboxp->botrow   = bord_GetHeight(win) - 1;
  51.     cboxp->rightcol = bord_GetWidth(win) - 1;
  52.  
  53.     ocbox_trans(cboxp, bord_yoffs(win)/fh, bord_xoffs(win)/fw);
  54. }
  55. /* -------------------------------------------------------------------------- */
  56.  
  57. void bord_Expose(win, msg, msgdata)
  58.     win_type win;
  59.     int msg;
  60.     VOID *msgdata;
  61. /*
  62.     Expose the whole window which the border is attached to, including the
  63.     border frame and shadow.
  64. */
  65. {
  66.     opbox shbox;
  67.  
  68.     if (win != NULL) {
  69.         win_getshadowbox(win, &shbox);
  70.         wmgr_ExposePixBox(win, NULL, &shbox, msg, msgdata);
  71.     }
  72. }
  73. /* -------------------------------------------------------------------------- */
  74.  
  75.