home *** CD-ROM | disk | FTP | other *** search
- /*
- bordssds.c
-
- % bord_SetSides
-
- 2/87 by jmd
-
- OWL 1.1
- Copyright (c) 1987, 1988, 1989 by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 10/31/88 Ted Removed linking.
- 5/28/89 jmd added Shadow support
- 8/10/89 ted Moved Shadow support to winexpos.
- */
-
- #include "oakhead.h"
- #include "disppriv.h"
- #include "bordobj.h"
- /* -------------------------------------------------------------------------- */
-
- void bord_SetSides(win, topoffs, leftoffs, botoffs, rightoffs)
- win_type win;
- int topoffs, leftoffs, botoffs, rightoffs;
- /*
- Sets the relative sides of the border.
-
- Should be called when border is opened and when
- a SETSIZE message is received.
- */
- {
- opcoord fw, fh;
-
- fw = win_GetFontWidth(win);
- fh = win_GetFontHeight(win);
-
- bord_SetPixSides(win, (opcoord) leftoffs*fw, (opcoord) topoffs*fh,
- (opcoord) rightoffs*fw, (opcoord) botoffs*fh);
- }
- /* -------------------------------------------------------------------------- */
-
- void bord_SetPixSides(win, xminoffs, yminoffs, xmaxoffs, ymaxoffs)
- win_type win;
- opcoord xminoffs, yminoffs, xmaxoffs, ymaxoffs;
- /*
- Sets the relative sides of the border.
- Should be called when border is opened and when SETSIZE message is received.
- */
- {
- opcoord winx, winy, winw, winh;
-
- winx = win_GetXmin(win);
- winy = win_GetYmin(win);
-
- winw = win_GetPixWidth(win);
- winh = win_GetPixHeight(win);
-
- win_inboxp(win)->xmin = -xminoffs;
- win_inboxp(win)->ymin = -yminoffs;
-
- win_ReallySetPixPosition(win, winx, winy);
-
- win_inboxp(win)->xmax = opbox_GetWidth(win_pixboxp(win)) - xmaxoffs;
- win_inboxp(win)->ymax = opbox_GetHeight(win_pixboxp(win)) - ymaxoffs;
-
- win_ReallySetPixSize(win, winw, winh);
- }
- /* -------------------------------------------------------------------------- */
-
-