Added header (company num, cheque num etc) to pdf part of routine.
[capital-apms-progress.git] / adecomm / okrun.i
blobf273b0a9ad189fa305124ef19e11e3c8ee70f736
1 /*************************************************************/
2 /* Copyright (c) 1984-1996 by Progress Software Corporation */
3 /* */
4 /* All rights reserved. No part of this program or document */
5 /* may be reproduced in any form or by any means without */
6 /* permission in writing from PROGRESS Software Corporation. */
7 /*************************************************************/
9 /* PROGRAM: okrun.i
11 ** This file is part of a trio: adestds.i okform.i okrun.i. This file should
12 ** be included to provide the runtime layout for the OK CANCEL bar. For more
13 ** information on this, see the document design\ade\misc\sullivan.doc.
15 ** PARAMETERS:
16 ** &FRAME widget name of the frame containing the okform.i
17 ** &BOX widget name of the rectangle to be used for the background box
18 ** &OK widget name of the ok button
19 ** &CANCEL widget name of the cancel button (only need for tty w/ no help btn)
20 ** &OTHER widget name any intervening buttons (optional)
21 ** &HELP widget name of the help button
22 ** &FORCEDEF force defines of local variables
25 /* stdui.i is required for this file */
26 &IF DEFINED(ADESTDSI) = 0 &THEN
27 { adecomm/adestds.i }
28 &ENDIF
30 &IF DEFINED(OKRUN_VARS) = 0 OR "{&FORCEDEF}" = "yes" &THEN
31 DEFINE VARIABLE eff_frame_width AS DECIMAL. /* effective frame width */
32 DEFINE VARIABLE vwidget AS HANDLE. /* general widget handle */
33 &GLOBAL OKRUN_VARS ""
34 &ENDIF
36 /* Increase the compile defined frame width by 1 PPU. */
37 {&FRAME}:WIDTH-CHARS = {&FRAME}:WIDTH-CHARS + {&HFM_WID}.
38 eff_frame_width = {&FRAME}:WIDTH-CHARS -
39 {&FRAME}:BORDER-LEFT-CHARS -
40 {&FRAME}:BORDER-RIGHT-CHARS.
42 /* adjust the size of the box */
43 &IF {&OKBOX} &THEN
44 /* adjust the ok box to the width of the frame for Windows */
45 vwidget = {&BOX}:HANDLE IN {&FRAME}.
46 vwidget:HEIGHT-CHARS = {&OK}:HEIGHT-CHARS IN {&FRAME} + ({&IVM_OKBOX} * 2).
47 vwidget:WIDTH-CHARS = eff_frame_width - ({&HFM_OKBOX} * 2).
48 &ELSEIF "{&WINDOW-SYSTEM}" = "OSF/Motif" &THEN
49 /* set the rule for Motif */
50 {&FRAME}:RULE-ROW = {&OK}:ROW IN {&FRAME} - {&IVM_OKBOX}.
51 &ENDIF
53 &IF "{&HELP}" <> "" &THEN
54 /* runtime adjust the help button to the right of the frame */
55 vwidget = {&HELP}:HANDLE IN {&FRAME}.
56 vwidget:column = eff_frame_width - vwidget:WIDTH-CHARS - {&HFM_OKBOX}.
57 &ENDIF
58 &IF "{&WINDOW-SYSTEM}" = "TTY" &THEN
59 /* Starting in 8.0B, handle TTY this way (jep 2/8/96):
60 - Hide HELP button.
61 - If only OK or OK-CANCEL, then center them.
62 - If OTHER button, then leave all buttons flush left.
64 &IF "{&HELP}" <> "" &THEN
65 {&HELP}:VISIBLE IN {&FRAME} = NO.
66 &ENDIF
67 &IF "{&OTHER}" = "" &THEN
68 &IF "{&CANCEL}" <> "" &THEN
69 {&OK}:COLUMN IN {&Frame} = (eff_frame_width -
70 {&OK}:WIDTH-CHARS IN {&FRAME} -
71 {&CANCEL}:WIDTH-CHARS IN {&FRAME} -
72 {&HM_DBTNG}) / 2.
73 {&CANCEL}:COLUMN IN {&FRAME} = {&OK}:COLUMN IN {&FRAME} +
74 {&OK}:WIDTH-CHARS IN {&FRAME} +
75 {&HM_DBTNG}.
76 &ELSE
77 {&OK}:COLUMN IN {&FRAME} = (eff_frame_width -
78 {&OK}:WIDTH-CHARS IN {&FRAME}) / 2.
79 &ENDIF
80 &ENDIF
81 &ENDIF
83 &IF "{&USE-3D}" = "" &THEN
84 IF NOT {&FRAME}:VISIBLE AND {&FRAME}:THREE-D NE SESSION:THREE-D THEN
85 ASSIGN {&FRAME}:THREE-D = IF SESSION:THREE-D THEN TRUE ELSE FALSE.
86 &ELSEIF "{&USE-3D}" = "YES" &THEN
87 /* Add THREE-D to the static frame definition. This is preferred to
88 setting a run-time value. */
89 DEFINE {&FRAME} WITH THREE-D.
90 &ENDIF
92 ASSIGN std_fillin_bgcolor = IF SESSION:THREE-D THEN ? ELSE 8.
95 * This last section is for RESULTS. We need it as a workaround to insure
96 * that the watch cursor, turned on by the Menu Subsystem, gets turned off.
97 * This shouldn't affect any other application.
99 &IF DEFINED(TURN-OFF-CURSOR) &THEN
100 RUN adecomm/_setcurs.p ("").
101 &ENDIF
103 /* okrun.i - end of file */