Added capital works blank section. Synced calling screen.
[capital-apms-progress.git] / win / w-mainmn.w
blobed460c1a4f6564b58fb91b7623455c77da652f1b
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1
2 &ANALYZE-RESUME
3 &Scoped-define WINDOW-NAME W-Win
4 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS W-Win
5 /*------------------------------------------------------------------------
6 File: win/w-mainmn.w
7 Description: Main Menu process
8 ------------------------------------------------------------------------*/
9 DEF VAR rem-user-name AS CHAR NO-UNDO.
10 {inc/username.i "rem-user-name"}
12 RUN setup-environment.
14 CREATE WIDGET-POOL.
16 /* *************************** Definitions ************************** */
18 IF SEARCH( "update-in-progress.LCK" ) <> ? THEN RUN process/linkimpt.p( "RESTART" ).
20 DEF VAR img_mainmenu AS WIDGET-HANDLE NO-UNDO.
22 DEF VAR abbrev AS CHAR NO-UNDO.
23 DEF VAR org-name AS CHAR NO-UNDO.
24 DEF VAR icon-file AS CHAR NO-UNDO.
25 DEF VAR bitmap-file AS CHAR NO-UNDO.
27 DEF VAR initialized AS INT NO-UNDO INITIAL 0.
29 DEF VAR remote-user AS LOGI NO-UNDO INITIAL No.
31 IF CAN-FIND( UsrGroupMember WHERE UsrGroupMember.GroupName = "RemoteUser" AND UsrGroupMember.UserName = rem-user-name) THEN
32 remote-user = Yes.
34 /* _UIB-CODE-BLOCK-END */
35 &ANALYZE-RESUME
38 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
40 /* ******************** Preprocessor Definitions ******************** */
42 &Scoped-define PROCEDURE-TYPE SmartWindow
43 &Scoped-define DB-AWARE no
45 &Scoped-define ADM-CONTAINER WINDOW
47 /* Name of first Frame and/or Browse and/or first Query */
48 &Scoped-define FRAME-NAME F-Main
50 /* Standard List Definitions */
51 &Scoped-Define ENABLED-OBJECTS RECT-MASTER
52 &Scoped-Define DISPLAYED-OBJECTS fil_CompanyName
54 /* Custom List Definitions */
55 /* List-1,List-2,List-3,List-4,List-5,List-6 */
57 /* _UIB-PREPROCESSOR-BLOCK-END */
58 &ANALYZE-RESUME
62 /* *********************** Control Definitions ********************** */
64 /* Define the widget handle for the window */
65 DEFINE VAR W-Win AS WIDGET-HANDLE NO-UNDO.
67 /* Definitions of the field level widgets */
68 DEFINE VARIABLE fil_CompanyName AS CHARACTER FORMAT "X(256)":U INITIAL "Trans Tasman Properties Limited"
69 VIEW-AS TEXT
70 SIZE 69.72 BY 1
71 FGCOLOR 0 FONT 13 NO-UNDO.
73 DEFINE RECTANGLE RECT-MASTER
74 EDGE-PIXELS 0 NO-FILL
75 SIZE 71.43 BY 1.6.
78 /* ************************ Frame Definitions *********************** */
80 DEFINE FRAME F-Main
81 fil_CompanyName AT ROW 1 COL 2.14 NO-LABEL
82 RECT-MASTER AT ROW 1 COL 1
83 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
84 SIDE-LABELS NO-UNDERLINE THREE-D
85 AT COL 1 ROW 1
86 SIZE 103.29 BY 34.05
87 FONT 9.
90 /* *********************** Procedure Settings ************************ */
92 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
93 /* Settings for THIS-PROCEDURE
94 Type: SmartWindow
95 Allow: Basic,Browse,DB-Fields,Query,Smart,Window
96 Other Settings: COMPILE
98 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
100 /* ************************* Create Window ************************** */
102 &ANALYZE-SUSPEND _CREATE-WINDOW
103 IF SESSION:DISPLAY-TYPE = "GUI":U THEN
104 CREATE WINDOW W-Win ASSIGN
105 HIDDEN = YES
106 TITLE = "Capital APMS Main Menu"
107 COLUMN = 30.86
108 ROW = 10.55
109 HEIGHT = 21.7
110 WIDTH = 87.43
111 MAX-HEIGHT = 34.3
112 MAX-WIDTH = 103.72
113 VIRTUAL-HEIGHT = 34.3
114 VIRTUAL-WIDTH = 103.72
115 RESIZE = no
116 SCROLL-BARS = no
117 STATUS-AREA = no
118 BGCOLOR = ?
119 FGCOLOR = ?
120 PRIVATE-DATA = "w-mainmn"
121 THREE-D = yes
122 MESSAGE-AREA = no
123 SENSITIVE = yes.
124 ELSE {&WINDOW-NAME} = CURRENT-WINDOW.
126 &IF '{&WINDOW-SYSTEM}' NE 'TTY' &THEN
127 IF NOT W-Win:LOAD-ICON("BITMAPS\capital":U) THEN
128 MESSAGE "Unable to load icon: BITMAPS\capital"
129 VIEW-AS ALERT-BOX WARNING BUTTONS OK.
130 &ENDIF
131 /* END WINDOW DEFINITION */
132 &ANALYZE-RESUME
134 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB W-Win
135 /* ************************* Included-Libraries *********************** */
137 {src/adm/method/containr.i}
138 {inc/method/m-mnuwin.i}
140 /* _UIB-CODE-BLOCK-END */
141 &ANALYZE-RESUME
146 /* *********** Runtime Attributes and AppBuilder Settings *********** */
148 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
149 /* SETTINGS FOR WINDOW W-Win
150 NOT-VISIBLE,,RUN-PERSISTENT */
151 /* SETTINGS FOR FRAME F-Main
153 /* SETTINGS FOR FILL-IN fil_CompanyName IN FRAME F-Main
154 NO-ENABLE ALIGN-L */
155 ASSIGN
156 RECT-MASTER:HIDDEN IN FRAME F-Main = TRUE.
158 IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(W-Win)
159 THEN W-Win:HIDDEN = yes.
161 /* _RUN-TIME-ATTRIBUTES-END */
162 &ANALYZE-RESUME
168 /* ************************ Control Triggers ************************ */
170 &Scoped-define SELF-NAME W-Win
171 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL W-Win W-Win
172 ON CLOSE OF W-Win /* Capital APMS Main Menu */
174 MESSAGE "Close" SESSION:IMMEDIATE-DISPLAY.
175 SESSION:IMMEDIATE-DISPLAY = No.
176 END.
178 /* _UIB-CODE-BLOCK-END */
179 &ANALYZE-RESUME
182 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL W-Win W-Win
183 ON END-ERROR OF W-Win /* Capital APMS Main Menu */
184 OR ENDKEY OF {&WINDOW-NAME} ANYWHERE DO:
185 /* This case occurs when the user presses the "Esc" key.
186 In a persistently run window, just ignore this. If we did not, the
187 application would exit. */
188 IF THIS-PROCEDURE:PERSISTENT THEN RETURN NO-APPLY.
189 END.
191 /* _UIB-CODE-BLOCK-END */
192 &ANALYZE-RESUME
195 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL W-Win W-Win
196 ON WINDOW-CLOSE OF W-Win /* Capital APMS Main Menu */
198 /* This ADM code must be left here in order for the SmartWindow
199 and its descendents to terminate properly on exit. */
200 {&WINDOW-NAME}:HIDDEN = Yes.
201 APPLY "CLOSE":U TO THIS-PROCEDURE.
202 RETURN NO-APPLY.
203 END.
205 /* _UIB-CODE-BLOCK-END */
206 &ANALYZE-RESUME
209 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL W-Win W-Win
210 ON WINDOW-MAXIMIZED OF W-Win /* Capital APMS Main Menu */
212 {&WINDOW-NAME}:WINDOW-STATE = WINDOW-NORMAL.
213 END.
215 /* _UIB-CODE-BLOCK-END */
216 &ANALYZE-RESUME
219 &UNDEFINE SELF-NAME
221 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK W-Win
224 /* *************************** Main Block *************************** */
226 RUN start-splash-screen.
228 {&WINDOW-NAME}:VISIBLE = FALSE.
229 IF NOT VALID-HANDLE(sys-mgr) THEN MESSAGE "sys-mgr not initialised".
230 RUN get-system-information IN sys-mgr ( OUTPUT abbrev, OUTPUT fil_CompanyName,
231 OUTPUT icon-file, OUTPUT bitmap-file ).
232 {&WINDOW-NAME}:VISIBLE = FALSE.
234 /* Include custom Main Block code for SmartWindows. */
235 {src/adm/template/windowmn.i}
237 /* _UIB-CODE-BLOCK-END */
238 &ANALYZE-RESUME
241 /* ********************** Internal Procedures *********************** */
243 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects W-Win _ADM-CREATE-OBJECTS
244 PROCEDURE adm-create-objects :
245 /*------------------------------------------------------------------------------
246 Purpose: Create handles for all SmartObjects used in this procedure.
247 After SmartObjects are initialized, then SmartLinks are added.
248 Parameters: <none>
249 ------------------------------------------------------------------------------*/
251 END PROCEDURE.
253 /* _UIB-CODE-BLOCK-END */
254 &ANALYZE-RESUME
256 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available W-Win _ADM-ROW-AVAILABLE
257 PROCEDURE adm-row-available :
258 /*------------------------------------------------------------------------------
259 Purpose: Dispatched to this procedure when the Record-
260 Source has a new row available. This procedure
261 tries to get the new row (or foriegn keys) from
262 the Record-Source and process it.
263 Parameters: <none>
264 ------------------------------------------------------------------------------*/
266 /* Define variables needed by this internal procedure. */
267 {src/adm/template/row-head.i}
269 /* Process the newly available records (i.e. display fields,
270 open queries, and/or pass records on to any RECORD-TARGETS). */
271 {src/adm/template/row-end.i}
273 END PROCEDURE.
275 /* _UIB-CODE-BLOCK-END */
276 &ANALYZE-RESUME
278 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI W-Win _DEFAULT-DISABLE
279 PROCEDURE disable_UI :
280 /*------------------------------------------------------------------------------
281 Purpose: DISABLE the User Interface
282 Parameters: <none>
283 Notes: Here we clean-up the user-interface by deleting
284 dynamic widgets we have created and/or hide
285 frames. This procedure is usually called when
286 we are ready to "clean-up" after running.
287 ------------------------------------------------------------------------------*/
288 /* Delete the WINDOW we created */
289 IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(W-Win)
290 THEN DELETE WIDGET W-Win.
291 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
292 END PROCEDURE.
294 /* _UIB-CODE-BLOCK-END */
295 &ANALYZE-RESUME
297 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI W-Win _DEFAULT-ENABLE
298 PROCEDURE enable_UI :
299 /*------------------------------------------------------------------------------
300 Purpose: ENABLE the User Interface
301 Parameters: <none>
302 Notes: Here we display/view/enable the widgets in the
303 user-interface. In addition, OPEN all queries
304 associated with each FRAME and BROWSE.
305 These statements here are based on the "Other
306 Settings" section of the widget Property Sheets.
307 ------------------------------------------------------------------------------*/
308 DISPLAY fil_CompanyName
309 WITH FRAME F-Main IN WINDOW W-Win.
310 ENABLE RECT-MASTER
311 WITH FRAME F-Main IN WINDOW W-Win.
312 {&OPEN-BROWSERS-IN-QUERY-F-Main}
313 END PROCEDURE.
315 /* _UIB-CODE-BLOCK-END */
316 &ANALYZE-RESUME
318 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-destroy W-Win
319 PROCEDURE inst-destroy :
320 /*------------------------------------------------------------------------------
321 Purpose:
322 ------------------------------------------------------------------------------*/
323 SESSION:IMMEDIATE-DISPLAY = No.
325 END PROCEDURE.
327 /* _UIB-CODE-BLOCK-END */
328 &ANALYZE-RESUME
330 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-create-controls W-Win
331 PROCEDURE local-create-controls :
332 /*------------------------------------------------------------------------------
333 Purpose: Override standard ADM method
334 Notes:
335 ------------------------------------------------------------------------------*/
336 DEF VAR jurgen-hdl AS HANDLE NO-UNDO.
338 /* Code placed here will execute PRIOR to standard behavior. */
340 /* Dispatch standard ADM method. */
341 RUN dispatch IN THIS-PROCEDURE ( INPUT 'create-controls':U ) .
343 /* Code placed here will execute AFTER standard behavior. */
344 RUN stop-splash-screen.
346 SESSION:IMMEDIATE-DISPLAY = No.
348 END PROCEDURE.
350 /* _UIB-CODE-BLOCK-END */
351 &ANALYZE-RESUME
353 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-exit W-Win
354 PROCEDURE local-exit :
355 /* -----------------------------------------------------------
356 Purpose: Starts an "exit" by APPLYing CLOSE event, which starts "destroy".
357 Parameters: <none>
358 Notes: If activated, should APPLY CLOSE, *not* dispatch adm-exit.
359 -------------------------------------------------------------*/
360 MESSAGE "local-exit" SESSION:IMMEDIATE-DISPLAY.
361 SESSION:IMMEDIATE-DISPLAY = No.
363 APPLY "CLOSE":U TO THIS-PROCEDURE.
364 RETURN.
366 END PROCEDURE.
368 /* _UIB-CODE-BLOCK-END */
369 &ANALYZE-RESUME
371 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE post-resize-window W-Win
372 PROCEDURE post-resize-window :
373 /*------------------------------------------------------------------------------
374 Purpose: Override the m-layout.i resize-window so that the window is
375 guaranteed to be big enough for img_mainmenu.
376 ------------------------------------------------------------------------------*/
377 DEF VAR x-min AS INTEGER NO-UNDO.
378 DEF VAR y-min AS INTEGER NO-UNDO.
380 OUTPUT TO VALUE( SESSION:TEMP-DIRECTORY + "/xxx.out" ) KEEP-MESSAGES.
381 MESSAGE "post-resize-window".
383 DO WITH FRAME {&FRAME-NAME}:
385 MESSAGE "post-resize-window a.0".
386 IF VALID-HANDLE(img_mainmenu) THEN DO:
387 img_mainmenu:X = 0.
388 x-min = img_mainmenu:X + img_mainmenu:WIDTH-PIXELS.
389 y-min = img_mainmenu:Y + img_mainmenu:HEIGHT-PIXELS.
390 END.
392 MESSAGE "post-resize-window a.1".
393 IF FRAME {&FRAME-NAME}:WIDTH-PIXELS < x-min THEN
394 FRAME {&FRAME-NAME}:WIDTH-PIXELS = x-min.
395 MESSAGE "post-resize-window b".
396 IF FRAME {&FRAME-NAME}:HEIGHT-PIXELS < y-min THEN
397 FRAME {&FRAME-NAME}:HEIGHT-PIXELS = y-min.
398 /* img_mainmenu:HEIGHT-PIXELS = FRAME {&FRAME-NAME}:HEIGHT-PIXELS - img_mainmenu:Y. */
400 MESSAGE "post-resize-window c".
401 IF {&WINDOW-NAME}:WIDTH-PIXELS < x-min THEN
402 {&WINDOW-NAME}:WIDTH-PIXELS = x-min.
403 MESSAGE "post-resize-window d".
404 IF {&WINDOW-NAME}:HEIGHT-PIXELS < y-min THEN
405 {&WINDOW-NAME}:HEIGHT-PIXELS = y-min.
407 {&WINDOW-NAME}:X = (SESSION:WIDTH-PIXELS - (FRAME {&FRAME-NAME}:WIDTH-PIXELS)) / 2.
408 {&WINDOW-NAME}:Y = (SESSION:HEIGHT-PIXELS - (FRAME {&FRAME-NAME}:HEIGHT-PIXELS)) / 2.
410 MESSAGE "post-resize-window e".
411 {&WINDOW-NAME}:VISIBLE = TRUE.
412 {&WINDOW-NAME}:HIDDEN = FALSE.
413 SESSION:IMMEDIATE-DISPLAY = Yes.
415 END.
417 OUTPUT CLOSE.
418 /* OS-DELETE VALUE( SESSION:TEMP-DIRECTORY + "/xxx.out" ) . */
420 END PROCEDURE.
422 /* _UIB-CODE-BLOCK-END */
423 &ANALYZE-RESUME
425 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-initialize W-Win
426 PROCEDURE pre-initialize :
427 /*------------------------------------------------------------------------------
428 Purpose: Start the window manager
429 Parameters: <none>
430 Notes:
431 ------------------------------------------------------------------------------*/
432 /* MESSAGE "pre-initialize". */
433 DO WITH FRAME {&FRAME-NAME}:
435 {&WINDOW-NAME}:VISIBLE = FALSE.
436 IF SESSION:SET-WAIT-STATE("") THEN .
437 END.
438 END PROCEDURE.
440 /* _UIB-CODE-BLOCK-END */
441 &ANALYZE-RESUME
443 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records W-Win _ADM-SEND-RECORDS
444 PROCEDURE send-records :
445 /*------------------------------------------------------------------------------
446 Purpose: Send record ROWID's for all tables used by
447 this file.
448 Parameters: see template/snd-head.i
449 ------------------------------------------------------------------------------*/
451 /* SEND-RECORDS does nothing because there are no External
452 Tables specified for this SmartWindow, and there are no
453 tables specified in any contained Browse, Query, or Frame. */
455 END PROCEDURE.
457 /* _UIB-CODE-BLOCK-END */
458 &ANALYZE-RESUME
460 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE setup-environment W-Win
461 PROCEDURE setup-environment :
462 /*------------------------------------------------------------------------------
463 Purpose:
464 Parameters: <none>
465 Notes:
466 ------------------------------------------------------------------------------*/
467 DEF VAR i AS INT NO-UNDO.
468 DEF VAR j AS INT NO-UNDO.
469 DEF VAR k AS INT NO-UNDO.
471 j = COLOR-TABLE:NUM-ENTRIES.
472 DEF VAR colors AS INT EXTENT 64 NO-UNDO.
473 DO i = 0 TO j:
474 colors[i + 1] = COLOR-TABLE:GET-RGB-VALUE(i).
475 END.
477 j = FONT-TABLE:NUM-ENTRIES.
478 DEF VAR fonts AS CHAR EXTENT 64 NO-UNDO.
479 DEF VAR font-string AS CHAR NO-UNDO.
480 DEF VAR font-name AS CHAR NO-UNDO.
481 DO i = 0 TO j:
482 font-name = "Font" + TRIM(STRING(i,">>9")).
483 GET-KEY-VALUE SECTION "Fonts" KEY font-name VALUE font-string.
484 fonts[i + 1] = font-string.
485 END.
487 LOAD "apms" NO-ERROR.
488 USE "apms" NO-ERROR.
490 j = COLOR-TABLE:NUM-ENTRIES.
491 IF j < 32 THEN DO:
492 COLOR-TABLE:NUM-ENTRIES = 32.
493 DO i = j TO 32:
494 COLOR-TABLE:SET-DYNAMIC( i, TRUE ) NO-ERROR.
495 COLOR-TABLE:SET-RGB-VALUE( i, colors[i + 1]) NO-ERROR.
496 END.
497 END.
499 FIND RP WHERE RP.UserName = rem-user-name
500 AND RP.ReportID = "Report Viewer" NO-LOCK NO-ERROR.
502 j = FONT-TABLE:NUM-ENTRIES.
503 IF j < 35 THEN DO:
504 FONT-TABLE:NUM-ENTRIES = 35.
505 DO i = j TO 35:
506 font-string = fonts[i + 1].
507 IF AVAILABLE(RP) THEN DO:
508 IF i = 28 AND RP.Char3 <> ? THEN font-string = RP.Char3.
509 IF i = 29 AND RP.Char4 <> ? THEN font-string = RP.Char4.
510 END.
511 font-name = "Font" + TRIM(STRING(i,">>9")).
512 PUT-KEY-VALUE SECTION "Fonts" KEY font-name VALUE font-string NO-ERROR.
513 END.
514 END.
517 END PROCEDURE.
519 /* _UIB-CODE-BLOCK-END */
520 &ANALYZE-RESUME
522 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE start-splash-screen W-Win
523 PROCEDURE start-splash-screen :
524 /*------------------------------------------------------------------------------
525 Purpose: Start the splash screen.
526 Parameters: <none>
527 Notes:
528 ------------------------------------------------------------------------------*/
529 /* MESSAGE "start-splash-screen". */
531 IF remote-user OR SEARCH( "win\w-splash.w" ) = ? THEN DO:
532 splash = ?.
533 RETURN.
534 END.
536 DEF VAR wh-splash AS HANDLE NO-UNDO.
538 RUN win\w-splash.w PERSISTENT SET splash.
539 RUN dispatch IN splash ( 'Initialize':U ).
541 END PROCEDURE.
543 /* _UIB-CODE-BLOCK-END */
544 &ANALYZE-RESUME
546 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed W-Win
547 PROCEDURE state-changed :
548 /* -----------------------------------------------------------
549 Purpose:
550 Parameters: <none>
551 Notes:
552 -------------------------------------------------------------*/
553 DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
554 DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
555 END PROCEDURE.
557 /* _UIB-CODE-BLOCK-END */
558 &ANALYZE-RESUME
560 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE stop-splash-screen W-Win
561 PROCEDURE stop-splash-screen :
562 /*------------------------------------------------------------------------------
563 Purpose:
564 Parameters: <none>
565 Notes:
566 ------------------------------------------------------------------------------*/
567 DEF VAR splash-win AS HANDLE NO-UNDO.
569 /* MESSAGE "stop-splash-screen". */
571 IF splash = ? THEN RETURN.
572 splash-win = splash:CURRENT-WINDOW.
573 APPLY 'WINDOW-CLOSE':U TO splash-win.
575 END PROCEDURE.
577 /* _UIB-CODE-BLOCK-END */
578 &ANALYZE-RESUME
580 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE user-layout W-Win
581 PROCEDURE user-layout :
582 /*------------------------------------------------------------------------------
583 Purpose:
584 ------------------------------------------------------------------------------*/
585 /* MESSAGE "user-layout". */
586 DO WITH FRAME {&FRAME-NAME}:
588 RUN set-window-icon IN sys-mgr ( {&WINDOW-NAME} ).
589 {&WINDOW-NAME}:TITLE = abbrev + (IF abbrev <> "" THEN " " ELSE "") + "Capital APMS Main Menu".
591 /* OUTPUT TO VALUE( SESSION:TEMP-DIRECTORY + "/xxx.out" ) KEEP-MESSAGES. */
593 IF NOT remote-user THEN DO:
594 CREATE IMAGE img_mainmenu NO-ERROR
595 ASSIGN X = 1
596 Y = 23
597 FRAME = FRAME {&FRAME-NAME}:HANDLE .
599 img_mainmenu:LOAD-IMAGE( bitmap-file ).
600 FRAME {&FRAME-NAME}:WIDTH-PIXELS = img_mainmenu:WIDTH-PIXELS + 5.
601 FRAME {&FRAME-NAME}:HEIGHT-PIXELS = img_mainmenu:HEIGHT-PIXELS + 25.
603 RECT-MASTER:WIDTH-PIXELS = img_mainmenu:WIDTH-PIXELS - ( {&GAP} * 2 ).
604 RECT-MASTER:HEIGHT-PIXELS = img_mainmenu:HEIGHT-PIXELS - ( ({&GAP} + 24) * 3 ) + fil_CompanyName:HEIGHT-PIXELS.
605 END.
606 /* ELSE */
608 /* MESSAGE "user-layout a". */
609 fil_CompanyName:WIDTH-PIXELS = RECT-MASTER:WIDTH-PIXELS - 25.
610 /* MESSAGE "user-layout b". */
612 RUN get-default-groups.
613 /* MESSAGE "user-layout c". */
614 RUN stack( STRING( RECT-MASTER:HANDLE ) + ",btn-group", "mst-group", "T", Yes ).
615 /* MESSAGE "user-layout d". */
617 /* img_mainmenu:X = 0. */
618 /* NOTE: the window size is set in post-resize-window */
619 /* OUTPUT CLOSE. */
620 /* OS-DELETE VALUE( SESSION:TEMP-DIRECTORY + "/xxx.out" ) . */
622 END.
624 END PROCEDURE.
626 /* _UIB-CODE-BLOCK-END */
627 &ANALYZE-RESUME