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

  1. /*
  2.     bordsetp.c
  3.  
  4.     % bord_SetPixPosition
  5.  
  6.     OWL 1.2
  7.     Copyright (c) 1989, by Oakland Group, Inc.
  8.     ALL RIGHTS RESERVED.
  9.  
  10.     Revision History:
  11.     -----------------
  12.      3/28/90 jmd    ansi-fied
  13. */
  14.  
  15. #include "oakhead.h"
  16. #include "disppriv.h"
  17. #include "bordobj.h"
  18.  
  19. /* -------------------------------------------------------------------------- */
  20.  
  21. void bord_SetPosition(win_type win, int row, int col)
  22. /*
  23.     Change the position of window.
  24.     Moves the window so that the corner of its border is at row, col
  25. */
  26. {
  27.     bord_SetPixPosition(win, 
  28.         col * win_GetFontWidth(win), row * win_GetFontHeight(win));
  29. }
  30. /* -------------------------------------------------------------------------- */
  31.  
  32. void bord_SetPixPosition(win_type win, opcoord xpos, opcoord ypos)
  33. /*
  34.     Change the position of window.
  35.     Moves the window so that the corner of its border is at xpos, ypos
  36. */
  37. {
  38.     xpos -= bord_xoffs(win);
  39.     ypos -= bord_yoffs(win);
  40.  
  41.     win_SetPixPosition(win, xpos, ypos);
  42. }
  43. /* -------------------------------------------------------------------------- */
  44.  
  45.