Added header (company num, cheque num etc) to pdf part of routine.
[capital-apms-progress.git] / sec / v-usgmnu.w
blob82576bcf788fcac89a792b89869a8ddb38976a47
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI
2 &ANALYZE-RESUME
3 &Scoped-define WINDOW-NAME CURRENT-WINDOW
4 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS V-table-Win
5 /*------------------------------------------------------------------------
6 File:
7 ------------------------------------------------------------------------*/
9 CREATE WIDGET-POOL.
11 /* *************************** Definitions ************************** */
13 DEF WORK-TABLE MenuNode NO-UNDO
14 FIELD NodeCode LIKE LinkNode.NodeCode
15 FIELD Description LIKE LinkNode.Description.
17 DEF WORK-TABLE ItemNode NO-UNDO
18 FIELD ButtonLabel LIKE ProgramLink.ButtonLabel
19 FIELD LinkCode LIKE ProgramLink.LinkCode
20 FIELD ItemStatus AS CHAR.
22 DEF VAR menu-altered AS LOGI NO-UNDO.
23 DEF VAR last-id AS ROWID NO-UNDO.
24 DEF VAR this-win AS HANDLE NO-UNDO.
26 /* _UIB-CODE-BLOCK-END */
27 &ANALYZE-RESUME
30 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
32 /* ******************** Preprocessor Definitions ******************** */
34 &Scoped-define PROCEDURE-TYPE SmartViewer
36 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
38 /* Name of first Frame and/or Browse and/or first Query */
39 &Scoped-define FRAME-NAME F-Main
41 /* Standard List Definitions */
42 &Scoped-Define ENABLED-OBJECTS tgl_topmost sel_mavail btn_madd sel_mcurr ~
43 btn_mrem sel_iavail btn_save sel_icurr btn_iadd btn_irem btn_iup btn_idown
44 &Scoped-Define DISPLAYED-OBJECTS tgl_topmost sel_mavail sel_mcurr ~
45 sel_iavail sel_icurr
47 /* Custom List Definitions */
48 /* ADM-CREATE-FIELDS,ADM-ASSIGN-FIELDS,List-3,List-4,List-5,List-6 */
50 /* _UIB-PREPROCESSOR-BLOCK-END */
51 &ANALYZE-RESUME
54 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Foreign Keys" V-table-Win _INLINE
55 /* Actions: ? adm/support/keyedit.w ? ? ? */
56 /* STRUCTURED-DATA
57 <KEY-OBJECT>
58 THIS-PROCEDURE
59 </KEY-OBJECT>
60 <FOREIGN-KEYS>
61 GroupName|y|y|TTPL.UsrGroup.GroupName
62 </FOREIGN-KEYS>
63 <EXECUTING-CODE>
64 **************************
65 * Set attributes related to FOREIGN KEYS
67 RUN set-attribute-list (
68 'Keys-Accepted = "GroupName",
69 Keys-Supplied = "GroupName"':U).
70 /**************************
71 </EXECUTING-CODE> */
72 /* _UIB-CODE-BLOCK-END */
73 &ANALYZE-RESUME
76 /* *********************** Control Definitions ********************** */
79 /* Menu Definitions */
80 DEFINE MENU POPUP-MENU-sel_iavail
81 MENU-ITEM m_AvailEdit LABEL "Edit Link" .
83 DEFINE MENU POPUP-MENU-sel_icurr
84 MENU-ITEM m_Edit LABEL "&Edit Link"
85 MENU-ITEM m_Edit_i-Target LABEL "Edit &Target"
86 MENU-ITEM m_Change_i-Group LABEL "Change &Group" .
88 DEFINE MENU POPUP-MENU-sel_mcurr
89 MENU-ITEM m_Edit_m-node LABEL "&Edit node"
90 MENU-ITEM m_Change_m-Group LABEL "Change &Group" .
93 /* Definitions of the field level widgets */
94 DEFINE BUTTON btn_iadd
95 LABEL "&Add"
96 SIZE 10.29 BY 1.05
97 FONT 10.
99 DEFINE BUTTON btn_idown
100 LABEL "Move &Down"
101 SIZE 10.29 BY 1.05
102 FONT 10.
104 DEFINE BUTTON btn_irem
105 LABEL "&Remove"
106 SIZE 10.29 BY 1.05
107 FONT 10.
109 DEFINE BUTTON btn_iup
110 LABEL "Move &Up"
111 SIZE 10.29 BY 1.05
112 FONT 10.
114 DEFINE BUTTON btn_madd
115 LABEL "Add"
116 SIZE 10.29 BY 1.05
117 FONT 10.
119 DEFINE BUTTON btn_mrem
120 LABEL "Remove"
121 SIZE 10.29 BY 1.05
122 FONT 10.
124 DEFINE BUTTON btn_save
125 LABEL "&Save"
126 SIZE 10 BY 1.05
127 FONT 10.
129 DEFINE VARIABLE sel_iavail AS CHARACTER
130 VIEW-AS SELECTION-LIST MULTIPLE SORT SCROLLBAR-VERTICAL
131 SIZE 30 BY 13
132 FONT 10 NO-UNDO.
134 DEFINE VARIABLE sel_icurr AS CHARACTER
135 VIEW-AS SELECTION-LIST MULTIPLE SCROLLBAR-VERTICAL
136 SIZE 30 BY 13
137 FONT 10 NO-UNDO.
139 DEFINE VARIABLE sel_mavail AS CHARACTER
140 VIEW-AS SELECTION-LIST SINGLE SORT SCROLLBAR-VERTICAL
141 SIZE 30 BY 8.5
142 FONT 10 NO-UNDO.
144 DEFINE VARIABLE sel_mcurr AS CHARACTER
145 VIEW-AS SELECTION-LIST SINGLE SORT SCROLLBAR-VERTICAL
146 SIZE 30 BY 8.5
147 FONT 10 NO-UNDO.
149 DEFINE VARIABLE tgl_topmost AS LOGICAL INITIAL no
150 LABEL "On Top ?"
151 VIEW-AS TOGGLE-BOX
152 SIZE 10 BY 1
153 FONT 10 NO-UNDO.
156 /* ************************ Frame Definitions *********************** */
158 DEFINE FRAME F-Main
159 tgl_topmost AT ROW 1 COL 65
160 sel_mavail AT ROW 2 COL 2 NO-LABEL
161 btn_madd AT ROW 2 COL 33
162 sel_mcurr AT ROW 2 COL 45 NO-LABEL
163 btn_mrem AT ROW 3.2 COL 33
164 sel_iavail AT ROW 11.5 COL 2 NO-LABEL
165 btn_save AT ROW 11.5 COL 33
166 sel_icurr AT ROW 11.5 COL 45 NO-LABEL
167 btn_iadd AT ROW 16 COL 33
168 btn_irem AT ROW 17.2 COL 33
169 btn_iup AT ROW 20.5 COL 33
170 btn_idown AT ROW 21.7 COL 33
171 "Current Items" VIEW-AS TEXT
172 SIZE 10 BY 1 AT ROW 10.5 COL 45
173 FONT 10
174 "Available Items" VIEW-AS TEXT
175 SIZE 11 BY 1 AT ROW 10.5 COL 2
176 FONT 10
177 "Current Menus" VIEW-AS TEXT
178 SIZE 13.72 BY 1 AT ROW 1 COL 45
179 FONT 10
180 "Available Menus" VIEW-AS TEXT
181 SIZE 16 BY 1 AT ROW 1 COL 2
182 FONT 10
183 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
184 SIDE-LABELS NO-UNDERLINE THREE-D
185 AT COL 1 ROW 1 SCROLLABLE .
188 /* *********************** Procedure Settings ************************ */
190 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
191 /* Settings for THIS-PROCEDURE
192 Type: SmartViewer
193 Allow: Basic,DB-Fields
194 Frames: 1
195 Add Fields to: EXTERNAL-TABLES
196 Other Settings: PERSISTENT-ONLY COMPILE
199 /* This procedure should always be RUN PERSISTENT. Report the error, */
200 /* then cleanup and return. */
201 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
202 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT."
203 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
204 RETURN.
205 END.
207 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
209 /* ************************* Create Window ************************** */
211 &ANALYZE-SUSPEND _CREATE-WINDOW
212 /* DESIGN Window definition (used by the UIB)
213 CREATE WINDOW V-table-Win ASSIGN
214 HEIGHT = 23.95
215 WIDTH = 75.43.
216 /* END WINDOW DEFINITION */
218 &ANALYZE-RESUME
221 /* *************** Runtime Attributes and UIB Settings ************** */
223 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
224 /* SETTINGS FOR WINDOW V-table-Win
225 VISIBLE,,RUN-PERSISTENT */
226 /* SETTINGS FOR FRAME F-Main
227 NOT-VISIBLE Size-to-Fit */
228 ASSIGN
229 FRAME F-Main:SCROLLABLE = FALSE
230 FRAME F-Main:HIDDEN = TRUE.
232 ASSIGN
233 sel_iavail:POPUP-MENU IN FRAME F-Main = MENU POPUP-MENU-sel_iavail:HANDLE.
235 ASSIGN
236 sel_icurr:POPUP-MENU IN FRAME F-Main = MENU POPUP-MENU-sel_icurr:HANDLE.
238 ASSIGN
239 sel_mcurr:POPUP-MENU IN FRAME F-Main = MENU POPUP-MENU-sel_mcurr:HANDLE.
241 /* _RUN-TIME-ATTRIBUTES-END */
242 &ANALYZE-RESUME
245 /* Setting information for Queries and Browse Widgets fields */
247 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
248 /* Query rebuild information for FRAME F-Main
249 _Options = "NO-LOCK"
250 _Query is NOT OPENED
251 */ /* FRAME F-Main */
252 &ANALYZE-RESUME
257 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB V-table-Win
258 /* ************************* Included-Libraries *********************** */
260 {src/adm/method/viewer.i}
261 {inc/method/m-mntvwr.i}
263 /* _UIB-CODE-BLOCK-END */
264 &ANALYZE-RESUME
269 /* ************************ Control Triggers ************************ */
271 &Scoped-define SELF-NAME btn_iadd
272 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_iadd V-table-Win
273 ON CHOOSE OF btn_iadd IN FRAME F-Main /* Add */
275 RUN add-item.
276 END.
278 /* _UIB-CODE-BLOCK-END */
279 &ANALYZE-RESUME
282 &Scoped-define SELF-NAME btn_idown
283 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_idown V-table-Win
284 ON CHOOSE OF btn_idown IN FRAME F-Main /* Move Down */
286 RUN move-item-down.
287 END.
289 /* _UIB-CODE-BLOCK-END */
290 &ANALYZE-RESUME
293 &Scoped-define SELF-NAME btn_irem
294 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_irem V-table-Win
295 ON CHOOSE OF btn_irem IN FRAME F-Main /* Remove */
297 RUN remove-item.
298 END.
300 /* _UIB-CODE-BLOCK-END */
301 &ANALYZE-RESUME
304 &Scoped-define SELF-NAME btn_iup
305 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_iup V-table-Win
306 ON CHOOSE OF btn_iup IN FRAME F-Main /* Move Up */
308 RUN move-item-up.
309 END.
311 /* _UIB-CODE-BLOCK-END */
312 &ANALYZE-RESUME
315 &Scoped-define SELF-NAME btn_madd
316 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_madd V-table-Win
317 ON CHOOSE OF btn_madd IN FRAME F-Main /* Add */
319 RUN add-menu.
320 END.
322 /* _UIB-CODE-BLOCK-END */
323 &ANALYZE-RESUME
326 &Scoped-define SELF-NAME btn_mrem
327 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_mrem V-table-Win
328 ON CHOOSE OF btn_mrem IN FRAME F-Main /* Remove */
330 RUN remove-menu.
331 END.
333 /* _UIB-CODE-BLOCK-END */
334 &ANALYZE-RESUME
337 &Scoped-define SELF-NAME btn_save
338 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_save V-table-Win
339 ON CHOOSE OF btn_save IN FRAME F-Main /* Save */
341 RUN save-items.
342 END.
344 /* _UIB-CODE-BLOCK-END */
345 &ANALYZE-RESUME
348 &Scoped-define SELF-NAME m_AvailEdit
349 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL m_AvailEdit V-table-Win
350 ON CHOOSE OF MENU-ITEM m_AvailEdit /* Edit Link */
352 DO WITH FRAME {&FRAME-NAME}:
353 FIND FIRST ItemNode WHERE ItemNode.ButtonLabel = INPUT sel_iavail.
354 RUN edit-link-dialog( ItemNode.LinkCode ).
355 END.
356 END.
358 /* _UIB-CODE-BLOCK-END */
359 &ANALYZE-RESUME
362 &Scoped-define SELF-NAME m_Change_i-Group
363 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL m_Change_i-Group V-table-Win
364 ON CHOOSE OF MENU-ITEM m_Change_i-Group /* Change Group */
366 RUN item-group-dialog.
367 END.
369 /* _UIB-CODE-BLOCK-END */
370 &ANALYZE-RESUME
373 &Scoped-define SELF-NAME m_Change_m-Group
374 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL m_Change_m-Group V-table-Win
375 ON CHOOSE OF MENU-ITEM m_Change_m-Group /* Change Group */
377 RUN menu-group-dialog.
378 END.
380 /* _UIB-CODE-BLOCK-END */
381 &ANALYZE-RESUME
384 &Scoped-define SELF-NAME m_Edit
385 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL m_Edit V-table-Win
386 ON CHOOSE OF MENU-ITEM m_Edit /* Edit Link */
388 DO WITH FRAME {&FRAME-NAME}:
389 FIND FIRST ItemNode WHERE ItemNode.ButtonLabel = INPUT sel_icurr.
390 RUN edit-link-dialog( ItemNode.LinkCode ).
391 END.
392 END.
394 /* _UIB-CODE-BLOCK-END */
395 &ANALYZE-RESUME
398 &Scoped-define SELF-NAME m_Edit_i-Target
399 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL m_Edit_i-Target V-table-Win
400 ON CHOOSE OF MENU-ITEM m_Edit_i-Target /* Edit Target */
402 RUN edit-target-dialog.
403 END.
405 /* _UIB-CODE-BLOCK-END */
406 &ANALYZE-RESUME
409 &Scoped-define SELF-NAME m_Edit_m-node
410 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL m_Edit_m-node V-table-Win
411 ON CHOOSE OF MENU-ITEM m_Edit_m-node /* Edit node */
413 RUN edit-node-dialog.
414 END.
416 /* _UIB-CODE-BLOCK-END */
417 &ANALYZE-RESUME
420 &Scoped-define SELF-NAME sel_iavail
421 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_iavail V-table-Win
422 ON CURSOR-RIGHT OF sel_iavail IN FRAME F-Main
423 OR "CURSOR-LEFT" OF {&SELF-NAME} DO:
424 RETURN NO-APPLY.
425 END.
427 /* _UIB-CODE-BLOCK-END */
428 &ANALYZE-RESUME
431 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_iavail V-table-Win
432 ON MOUSE-SELECT-DBLCLICK OF sel_iavail IN FRAME F-Main
434 APPLY 'CHOOSE':U TO btn_iadd .
435 END.
437 /* _UIB-CODE-BLOCK-END */
438 &ANALYZE-RESUME
441 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_iavail V-table-Win
442 ON VALUE-CHANGED OF sel_iavail IN FRAME F-Main
444 RUN update-item-buttons.
445 END.
447 /* _UIB-CODE-BLOCK-END */
448 &ANALYZE-RESUME
451 &Scoped-define SELF-NAME sel_icurr
452 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_icurr V-table-Win
453 ON CURSOR-RIGHT OF sel_icurr IN FRAME F-Main
454 OR "CURSOR-LEFT" OF {&SELF-NAME} DO:
455 RETURN NO-APPLY.
456 END.
458 /* _UIB-CODE-BLOCK-END */
459 &ANALYZE-RESUME
462 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_icurr V-table-Win
463 ON MOUSE-SELECT-DBLCLICK OF sel_icurr IN FRAME F-Main
465 APPLY 'CHOOSE':U TO btn_irem .
466 END.
468 /* _UIB-CODE-BLOCK-END */
469 &ANALYZE-RESUME
472 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_icurr V-table-Win
473 ON VALUE-CHANGED OF sel_icurr IN FRAME F-Main
475 RUN update-item-buttons.
476 END.
478 /* _UIB-CODE-BLOCK-END */
479 &ANALYZE-RESUME
482 &Scoped-define SELF-NAME sel_mavail
483 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_mavail V-table-Win
484 ON MOUSE-SELECT-DBLCLICK OF sel_mavail IN FRAME F-Main
486 APPLY 'CHOOSE':U TO btn_madd .
487 END.
489 /* _UIB-CODE-BLOCK-END */
490 &ANALYZE-RESUME
493 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_mavail V-table-Win
494 ON VALUE-CHANGED OF sel_mavail IN FRAME F-Main
496 RUN update-menu-buttons.
497 END.
499 /* _UIB-CODE-BLOCK-END */
500 &ANALYZE-RESUME
503 &Scoped-define SELF-NAME sel_mcurr
504 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_mcurr V-table-Win
505 ON MOUSE-SELECT-DBLCLICK OF sel_mcurr IN FRAME F-Main
507 APPLY 'CHOOSE':U TO btn_mrem .
508 END.
510 /* _UIB-CODE-BLOCK-END */
511 &ANALYZE-RESUME
514 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_mcurr V-table-Win
515 ON VALUE-CHANGED OF sel_mcurr IN FRAME F-Main
517 RUN current-menu-changed.
518 END.
520 /* _UIB-CODE-BLOCK-END */
521 &ANALYZE-RESUME
524 &Scoped-define SELF-NAME tgl_topmost
525 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL tgl_topmost V-table-Win
526 ON VALUE-CHANGED OF tgl_topmost IN FRAME F-Main /* On Top ? */
528 RUN top-most-changed.
529 END.
531 /* _UIB-CODE-BLOCK-END */
532 &ANALYZE-RESUME
535 &UNDEFINE SELF-NAME
537 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK V-table-Win
540 /* *************************** Main Block *************************** */
542 &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
543 RUN dispatch IN THIS-PROCEDURE ('initialize':U).
544 &ENDIF
546 /************************ INTERNAL PROCEDURES ********************/
548 /* _UIB-CODE-BLOCK-END */
549 &ANALYZE-RESUME
552 /* ********************** Internal Procedures *********************** */
554 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE add-item V-table-Win
555 PROCEDURE add-item :
556 /*------------------------------------------------------------------------------
557 Purpose:
558 Parameters: <none>
559 Notes:
560 ------------------------------------------------------------------------------*/
562 DO WITH FRAME {&FRAME-NAME}:
563 RUN move-item( sel_iavail:HANDLE, sel_icurr:HANDLE, "C" ).
564 END.
566 END PROCEDURE.
568 /* _UIB-CODE-BLOCK-END */
569 &ANALYZE-RESUME
572 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE add-menu V-table-Win
573 PROCEDURE add-menu :
574 /*------------------------------------------------------------------------------
575 Purpose:
576 Parameters: <none>
577 Notes:
578 ------------------------------------------------------------------------------*/
580 DO WITH FRAME {&FRAME-NAME}:
582 IF NOT AVAILABLE UsrGroup THEN RETURN.
584 RUN notify( 'set-busy, CONTAINER-SOURCE':U ).
586 FIND FIRST MenuNode WHERE MenuNode.Description = INPUT sel_mavail.
587 FIND LinkNode WHERE LinkNode.NodeCode = MenuNode.NodeCode NO-LOCK.
589 CREATE UsrGroupMenu.
590 ASSIGN
591 UsrGroupMenu.GroupName = UsrGroup.GroupName
592 UsrGroupMenu.MenuName = LinkNode.Description
593 UsrGroupMenu.NodeCode = LinkNode.NodeCode.
595 IF sel_mcurr:ADD-LAST( UsrGroupMenu.MenuName ) THEN.
596 sel_mcurr:SCREEN-VALUE = UsrGroupMenu.MenuName.
597 IF sel_mavail:DELETE( INPUT sel_mavail ) THEN.
599 RUN update-menu-buttons.
600 RUN refresh-items.
602 RUN notify( 'set-idle, CONTAINER-SOURCE':U ).
604 END.
606 END PROCEDURE.
608 /* _UIB-CODE-BLOCK-END */
609 &ANALYZE-RESUME
612 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-find-using-key V-table-Win adm/support/_key-fnd.p
613 PROCEDURE adm-find-using-key :
614 /*------------------------------------------------------------------------------
615 Purpose: Finds the current record using the contents of
616 the 'Key-Name' and 'Key-Value' attributes.
617 Parameters: <none>
618 ------------------------------------------------------------------------------*/
619 DEF VAR key-value AS CHAR NO-UNDO.
620 DEF VAR row-avail-enabled AS LOGICAL NO-UNDO.
622 /* LOCK status on the find depends on FIELDS-ENABLED. */
623 RUN get-attribute ('FIELDS-ENABLED':U).
624 row-avail-enabled = (RETURN-VALUE eq 'yes':U).
625 /* Look up the current key-value. */
626 RUN get-attribute ('Key-Value':U).
627 key-value = RETURN-VALUE.
629 /* Find the current record using the current Key-Name. */
630 RUN get-attribute ('Key-Name':U).
631 CASE RETURN-VALUE:
632 WHEN 'GroupName':U THEN
633 {src/adm/template/find-tbl.i
634 &TABLE = UsrGroup
635 &WHERE = "WHERE UsrGroup.GroupName eq key-value"
637 END CASE.
639 END PROCEDURE.
641 /* _UIB-CODE-BLOCK-END */
642 &ANALYZE-RESUME
645 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available V-table-Win _ADM-ROW-AVAILABLE
646 PROCEDURE adm-row-available :
647 /*------------------------------------------------------------------------------
648 Purpose: Dispatched to this procedure when the Record-
649 Source has a new row available. This procedure
650 tries to get the new row (or foriegn keys) from
651 the Record-Source and process it.
652 Parameters: <none>
653 ------------------------------------------------------------------------------*/
655 /* Define variables needed by this internal procedure. */
656 {src/adm/template/row-head.i}
658 /* Process the newly available records (i.e. display fields,
659 open queries, and/or pass records on to any RECORD-TARGETS). */
660 {src/adm/template/row-end.i}
662 END PROCEDURE.
664 /* _UIB-CODE-BLOCK-END */
665 &ANALYZE-RESUME
668 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE current-menu-changed V-table-Win
669 PROCEDURE current-menu-changed :
670 /*------------------------------------------------------------------------------
671 Purpose:
672 Parameters: <none>
673 Notes:
674 ------------------------------------------------------------------------------*/
676 menu-altered = No.
677 RUN refresh-items.
678 RUN update-menu-buttons.
680 END PROCEDURE.
682 /* _UIB-CODE-BLOCK-END */
683 &ANALYZE-RESUME
686 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI V-table-Win _DEFAULT-DISABLE
687 PROCEDURE disable_UI :
688 /*------------------------------------------------------------------------------
689 Purpose: DISABLE the User Interface
690 Parameters: <none>
691 Notes: Here we clean-up the user-interface by deleting
692 dynamic widgets we have created and/or hide
693 frames. This procedure is usually called when
694 we are ready to "clean-up" after running.
695 ------------------------------------------------------------------------------*/
696 /* Hide all frames. */
697 HIDE FRAME F-Main.
698 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
699 END PROCEDURE.
701 /* _UIB-CODE-BLOCK-END */
702 &ANALYZE-RESUME
705 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE edit-link-dialog V-table-Win
706 PROCEDURE edit-link-dialog :
707 /*------------------------------------------------------------------------------
708 Purpose:
709 ------------------------------------------------------------------------------*/
710 DEF INPUT PARAMETER link-code AS INT NO-UNDO.
712 FIND ProgramLink WHERE ProgramLink.LinkCode = link-code NO-LOCK.
714 RUN lnk/d-edtlnk.w ( ProgramLink.LinkCode ).
716 END PROCEDURE.
718 /* _UIB-CODE-BLOCK-END */
719 &ANALYZE-RESUME
722 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE edit-node-dialog V-table-Win
723 PROCEDURE edit-node-dialog :
724 /*------------------------------------------------------------------------------
725 Purpose:
726 ------------------------------------------------------------------------------*/
727 DO WITH FRAME {&FRAME-NAME}:
729 FIND FIRST MenuNode WHERE MenuNode.Description = INPUT sel_mcurr.
730 FIND LinkNode WHERE LinkNode.NodeCode = MenuNode.NodeCode NO-LOCK.
732 RUN lnk/d-edtnod.w ( LinkNode.NodeCode ).
733 END.
734 END PROCEDURE.
736 /* _UIB-CODE-BLOCK-END */
737 &ANALYZE-RESUME
740 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE edit-target-dialog V-table-Win
741 PROCEDURE edit-target-dialog :
742 /*------------------------------------------------------------------------------
743 Purpose:
744 ------------------------------------------------------------------------------*/
745 DO WITH FRAME {&FRAME-NAME}:
747 FIND FIRST ItemNode WHERE ItemNode.ButtonLabel = INPUT sel_icurr.
748 FIND ProgramLink WHERE ProgramLink.LinkCode = ItemNode.LinkCode NO-LOCK.
750 RUN lnk/d-edtnod.w ( ProgramLink.Target ).
751 END.
752 END PROCEDURE.
754 /* _UIB-CODE-BLOCK-END */
755 &ANALYZE-RESUME
758 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-initialize V-table-Win
759 PROCEDURE inst-initialize :
760 /*------------------------------------------------------------------------------
761 Purpose:
762 Parameters: <none>
763 Notes:
764 ------------------------------------------------------------------------------*/
766 this-win = {&WINDOW-NAME}:HANDLE .
767 /* tgl_topmost:SCREEN-VALUE IN FRAME {&FRAME-NAME} = "Yes". */
768 RUN top-most-changed.
770 END PROCEDURE.
772 /* _UIB-CODE-BLOCK-END */
773 &ANALYZE-RESUME
776 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-row-available V-table-Win
777 PROCEDURE inst-row-available :
778 /*------------------------------------------------------------------------------
779 Purpose:
780 Parameters: <none>
781 Notes:
782 ------------------------------------------------------------------------------*/
784 RUN dispatch( 'find-using-key':u ).
785 IF NOT AVAILABLE UsrGroup THEN RETURN.
787 CURRENT-WINDOW:TITLE = "Menus - " + UsrGroup.GroupName.
788 IF ROWID( UsrGroup ) <> last-id THEN RUN refresh-menus.
789 last-id = ROWID( UsrGroup ).
790 RUN update-node IN sys-mgr ( THIS-PROCEDURE ).
792 END PROCEDURE.
794 /* _UIB-CODE-BLOCK-END */
795 &ANALYZE-RESUME
798 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE item-group-dialog V-table-Win
799 PROCEDURE item-group-dialog :
800 /*------------------------------------------------------------------------------
801 Purpose:
802 ------------------------------------------------------------------------------*/
803 DO WITH FRAME {&FRAME-NAME}:
805 FIND FIRST MenuNode WHERE MenuNode.Description = INPUT sel_mcurr.
806 FIND FIRST ItemNode WHERE ItemNode.ButtonLabel = INPUT sel_icurr.
808 RUN lnk/d-movlnk.w ( UsrGroup.GroupName, MenuNode.NodeCode, ItemNode.LinkCode ).
809 IF RETURN-VALUE = "CHANGED" THEN RUN current-menu-changed.
811 END.
812 END PROCEDURE.
814 /* _UIB-CODE-BLOCK-END */
815 &ANALYZE-RESUME
818 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE menu-group-dialog V-table-Win
819 PROCEDURE menu-group-dialog :
820 /*------------------------------------------------------------------------------
821 Purpose:
822 ------------------------------------------------------------------------------*/
823 DO WITH FRAME {&FRAME-NAME}:
825 FIND FIRST MenuNode WHERE MenuNode.Description = INPUT sel_mcurr.
827 RUN lnk/d-movnod.w ( UsrGroup.GroupName, MenuNode.NodeCode ).
828 IF RETURN-VALUE = "CHANGED" THEN RUN refresh-menus.
829 END.
830 END PROCEDURE.
832 /* _UIB-CODE-BLOCK-END */
833 &ANALYZE-RESUME
836 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE move-item V-table-Win
837 PROCEDURE move-item :
838 /*------------------------------------------------------------------------------
839 Purpose:
840 Parameters: <none>
841 Notes:
842 ------------------------------------------------------------------------------*/
844 DEF INPUT PARAMETER h-from AS HANDLE NO-UNDO.
845 DEF INPUT PARAMETER h-to AS HANDLE NO-UNDO.
846 DEF INPUT PARAMETER i-status AS CHAR NO-UNDO.
848 DO WITH FRAME {&FRAME-NAME}:
850 DEF VAR i AS INT NO-UNDO.
851 DEF VAR sv AS CHAR NO-UNDO.
852 DEF VAR delim AS CHAR NO-UNDO.
853 DEF VAR item AS CHAR NO-UNDO.
855 RUN notify( 'set-busy, CONTAINER-SOURCE':U ).
857 delim = h-from:DELIMITER.
858 sv = h-from:SCREEN-VALUE.
860 DO i = 1 TO NUM-ENTRIES( sv, delim ):
862 item = ENTRY( i, sv, delim ).
863 FIND FIRST ItemNode WHERE ItemNode.ButtonLabel = item.
864 ASSIGN ItemNode.ItemStatus = i-status.
866 IF h-to:ADD-LAST( item ) THEN.
867 IF h-from:DELETE( item ) THEN.
869 END.
871 menu-altered = Yes.
872 RUN update-item-buttons.
874 RUN notify( 'set-idle, CONTAINER-SOURCE':U ).
876 END.
878 END PROCEDURE.
880 /* _UIB-CODE-BLOCK-END */
881 &ANALYZE-RESUME
884 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE move-item-down V-table-Win
885 PROCEDURE move-item-down :
886 /*------------------------------------------------------------------------------
887 Purpose:
888 Parameters: <none>
889 Notes:
890 ------------------------------------------------------------------------------*/
892 DO WITH FRAME {&FRAME-NAME}:
894 DEF VAR i AS INT NO-UNDO.
895 DEF VAR sv AS CHAR NO-UNDO.
896 DEF VAR li AS CHAR NO-UNDO.
897 DEF VAR delim AS CHAR NO-UNDO.
899 sv = INPUT sel_icurr.
900 li = sel_icurr:LIST-ITEMS.
901 delim = sel_icurr:DELIMITER.
903 DEF VAR pos AS INT NO-UNDO.
904 DEF VAR curr-val AS CHAR NO-UNDO.
906 DO i = NUM-ENTRIES( sv, delim ) TO 1 BY -1:
907 curr-val = ENTRY( i, sv, delim ).
908 pos = LOOKUP( curr-val, li, delim ).
909 IF sel_icurr:REPLACE( sel_icurr:ENTRY( pos + 1 ), pos ) THEN.
910 IF sel_icurr:REPLACE( curr-val, pos + 1 ) THEN.
911 END.
913 menu-altered = Yes.
914 sel_icurr:SCREEN-VALUE = sv.
915 RUN update-item-buttons.
917 END.
919 END PROCEDURE.
921 /* _UIB-CODE-BLOCK-END */
922 &ANALYZE-RESUME
925 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE move-item-up V-table-Win
926 PROCEDURE move-item-up :
927 /*------------------------------------------------------------------------------
928 Purpose:
929 Parameters: <none>
930 Notes:
931 ------------------------------------------------------------------------------*/
933 DO WITH FRAME {&FRAME-NAME}:
935 DEF VAR i AS INT NO-UNDO.
936 DEF VAR sv AS CHAR NO-UNDO.
937 DEF VAR li AS CHAR NO-UNDO.
938 DEF VAR delim AS CHAR NO-UNDO.
940 sv = INPUT sel_icurr.
941 li = sel_icurr:LIST-ITEMS.
942 delim = sel_icurr:DELIMITER.
944 DEF VAR pos AS INT NO-UNDO.
945 DEF VAR curr-val AS CHAR NO-UNDO.
947 DO i = 1 TO NUM-ENTRIES( sv, delim ):
948 curr-val = ENTRY( i, sv, delim ).
949 pos = LOOKUP( curr-val, li, delim ).
950 IF sel_icurr:REPLACE( sel_icurr:ENTRY( pos - 1 ), pos ) THEN.
951 IF sel_icurr:REPLACE( curr-val, pos - 1 ) THEN.
952 END.
954 menu-altered = Yes.
955 sel_icurr:SCREEN-VALUE = sv.
956 RUN update-item-buttons.
958 END.
960 END PROCEDURE.
962 /* _UIB-CODE-BLOCK-END */
963 &ANALYZE-RESUME
966 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-row-available V-table-Win
967 PROCEDURE pre-row-available :
968 /*------------------------------------------------------------------------------
969 Purpose:
970 Parameters: <none>
971 Notes:
972 ------------------------------------------------------------------------------*/
974 have-records = No.
976 END PROCEDURE.
978 /* _UIB-CODE-BLOCK-END */
979 &ANALYZE-RESUME
982 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE refresh-available-items V-table-Win
983 PROCEDURE refresh-available-items :
984 /*------------------------------------------------------------------------------
985 Purpose:
986 Parameters: <none>
987 Notes:
988 ------------------------------------------------------------------------------*/
990 DO WITH FRAME {&FRAME-NAME}:
992 sel_iavail:LIST-ITEMS = "".
993 DEF VAR screen-label AS CHAR NO-UNDO.
995 IF NOT AVAILABLE UsrGroup THEN RETURN.
997 FIND FIRST MenuNode WHERE MenuNode.Description = INPUT sel_mcurr NO-ERROR.
998 IF NOT AVAILABLE MenuNode THEN RETURN.
1000 FIND LinkNode WHERE LinkNode.NodeCode = MenuNode.NodeCode NO-LOCK.
1001 FIND UsrGroupMenu OF UsrGroup WHERE
1002 UsrGroupMenu.NodeCode = LinkNode.NodeCode NO-LOCK.
1004 IF LinkNode.NodeType = "MN" THEN
1005 FIND LinkNode WHERE LinkNode.File = 'win/w-mainmn.w':U NO-LOCK.
1007 FOR EACH ProgramLink NO-LOCK WHERE
1008 ProgramLink.Source = LinkNode.NodeCode AND
1009 NOT CAN-FIND( FIRST UsrGroupMenuItem OF UsrGroupMenu WHERE
1010 UsrGroupMenuItem.LinkCode = ProgramLink.LinkCode ):
1012 /* IF ProgramLink.Target = LinkNode.NodeCode THEN NEXT. */
1014 /* This will ensure uniqueness by tagging with the linkcode */
1015 screen-label = ProgramLink.ButtonLabel + FILL( " ", 100 ) + STRING( ProgramLink.LinkCode ).
1017 IF sel_iavail:ADD-LAST( screen-label ) THEN DO:
1018 CREATE ItemNode.
1019 ASSIGN
1020 ItemNode.LinkCode = ProgramLink.LinkCode
1021 ItemNode.ButtonLabel = screen-label
1022 ItemNode.ItemStatus = "A".
1023 END.
1025 END.
1027 RUN update-item-buttons.
1029 END.
1031 END PROCEDURE.
1033 /* _UIB-CODE-BLOCK-END */
1034 &ANALYZE-RESUME
1037 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE refresh-current-items V-table-Win
1038 PROCEDURE refresh-current-items :
1039 /*------------------------------------------------------------------------------
1040 Purpose:
1041 Parameters: <none>
1042 Notes:
1043 ------------------------------------------------------------------------------*/
1045 DO WITH FRAME {&FRAME-NAME}:
1047 DEF VAR screen-label AS CHAR NO-UNDO.
1049 sel_icurr:LIST-ITEMS = "".
1051 IF NOT AVAILABLE UsrGroup THEN RETURN.
1053 FIND FIRST MenuNode WHERE MenuNode.Description = INPUT sel_mcurr NO-ERROR.
1054 IF NOT AVAILABLE MenuNode THEN RETURN.
1056 FIND LinkNode WHERE LinkNode.NodeCode = MenuNode.NodeCode NO-LOCK.
1057 FIND UsrGroupMenu OF UsrGroup WHERE
1058 UsrGroupMenu.NodeCode = LinkNode.NodeCode NO-LOCK.
1060 FOR EACH UsrGroupMenuItem OF UsrGroupMenu NO-LOCK
1061 BY UsrGroupMenuItem.SequenceCode:
1063 /* This will ensure label uniqueness by tagging with the linkcode */
1064 screen-label = UsrGroupMenuItem.ButtonLabel + FILL( " ", 100 ) + STRING( UsrGroupMenuItem.LinkCode ).
1065 IF sel_icurr:ADD-LAST( screen-label ) THEN
1067 CREATE ItemNode.
1068 ASSIGN
1069 ItemNode.LinkCode = UsrGroupMenuItem.LinkCode
1070 ItemNode.ButtonLabel = screen-label
1071 ItemNode.ItemStatus = "C".
1072 END.
1074 END.
1076 RUN update-item-buttons.
1078 END.
1081 END PROCEDURE.
1083 /* _UIB-CODE-BLOCK-END */
1084 &ANALYZE-RESUME
1087 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE refresh-items V-table-Win
1088 PROCEDURE refresh-items :
1089 /*------------------------------------------------------------------------------
1090 Purpose:
1091 Parameters: <none>
1092 Notes:
1093 ------------------------------------------------------------------------------*/
1095 DO WITH FRAME {&FRAME-NAME}:
1097 RUN notify( 'set-busy, CONTAINER-SOURCE':U ).
1099 sel_iavail:LIST-ITEMS = "".
1100 sel_icurr:LIST-ITEMS = "".
1102 FOR EACH ItemNode: DELETE ItemNode. END.
1104 RUN refresh-available-items.
1105 RUN refresh-current-items.
1106 RUN update-item-buttons.
1108 RUN notify( 'set-idle, CONTAINER-SOURCE':U ).
1110 END.
1112 END PROCEDURE.
1114 /* _UIB-CODE-BLOCK-END */
1115 &ANALYZE-RESUME
1118 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE refresh-menus V-table-Win
1119 PROCEDURE refresh-menus :
1120 /*------------------------------------------------------------------------------
1121 Purpose:
1122 Parameters: <none>
1123 Notes:
1124 ------------------------------------------------------------------------------*/
1126 DO WITH FRAME {&FRAME-NAME}:
1128 DEF VAR stat AS LOGI NO-UNDO.
1130 sel_mavail:LIST-ITEMS = "".
1131 sel_mcurr:LIST-ITEMS = "".
1133 IF NOT AVAILABLE UsrGroup THEN RETURN.
1135 RUN notify( 'set-busy, CONTAINER-SOURCE':U ).
1137 FOR EACH MenuNode: DELETE MenuNode. END.
1139 FOR EACH LinkNode NO-LOCK WHERE
1140 LinkNode.NodeType <> "MV":
1142 IF CAN-FIND( FIRST UsrGroupMenu WHERE
1143 UsrGroupMenu.Groupname = UsrGroup.GroupName AND
1144 UsrGroupMenu.NodeCode = LinkNode.NodeCode ) THEN
1146 stat = sel_mcurr:ADD-LAST( LinkNode.Description ).
1148 ELSE
1149 IF (
1150 LinkNode.NodeType = 'MN' OR
1151 CAN-FIND( FIRST ProgramLink WHERE ProgramLink.Source = LinkNode.NodeCode )
1152 ) THEN
1154 stat = sel_mavail:ADD-LAST( LinkNode.Description ).
1156 IF stat THEN
1158 CREATE MenuNode.
1159 ASSIGN
1160 MenuNode.NodeCode = LinkNode.NodeCode
1161 MenuNode.Description = LinkNode.Description.
1162 END.
1164 END.
1166 RUN update-buttons.
1168 RUN notify( 'set-idle, CONTAINER-SOURCE':U ).
1170 END.
1172 END PROCEDURE.
1174 /* _UIB-CODE-BLOCK-END */
1175 &ANALYZE-RESUME
1178 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE remove-item V-table-Win
1179 PROCEDURE remove-item :
1180 /*------------------------------------------------------------------------------
1181 Purpose:
1182 Parameters: <none>
1183 Notes:
1184 ------------------------------------------------------------------------------*/
1186 DO WITH FRAME {&FRAME-NAME}:
1187 RUN move-item( sel_icurr:HANDLE, sel_iavail:HANDLE, "A" ).
1188 END.
1190 END PROCEDURE.
1192 /* _UIB-CODE-BLOCK-END */
1193 &ANALYZE-RESUME
1196 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE remove-menu V-table-Win
1197 PROCEDURE remove-menu :
1198 /*------------------------------------------------------------------------------
1199 Purpose:
1200 Parameters: <none>
1201 Notes:
1202 ------------------------------------------------------------------------------*/
1204 DO WITH FRAME {&FRAME-NAME}:
1206 IF NOT AVAILABLE UsrGroup THEN RETURN.
1208 RUN notify( 'set-busy, CONTAINER-SOURCE':U ).
1210 FIND FIRST MenuNode WHERE MenuNode.Description = INPUT sel_mcurr.
1211 FIND LinkNode WHERE LinkNode.NodeCode = MenuNode.NodeCode NO-LOCK.
1212 FIND UsrGroupMenu OF UsrGroup WHERE
1213 UsrGroupMenu.NodeCode = LinkNode.NodeCode EXCLUSIVE-LOCK.
1214 DELETE UsrGroupMenu.
1216 IF sel_mavail:ADD-LAST( INPUT sel_mcurr ) THEN.
1217 sel_mavail:SCREEN-VALUE = INPUT sel_mcurr.
1218 IF sel_mcurr:DELETE( INPUT sel_mcurr ) THEN.
1220 RUN update-menu-buttons.
1221 RUN refresh-items.
1223 RUN notify( 'set-idle, CONTAINER-SOURCE':U ).
1225 END.
1227 END PROCEDURE.
1229 /* _UIB-CODE-BLOCK-END */
1230 &ANALYZE-RESUME
1233 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE save-items V-table-Win
1234 PROCEDURE save-items :
1235 /*------------------------------------------------------------------------------
1236 Purpose:
1237 Parameters: <none>
1238 Notes:
1239 ------------------------------------------------------------------------------*/
1241 DO WITH FRAME {&FRAME-NAME}:
1243 IF NOT AVAILABLE UsrGroup THEN RETURN.
1245 RUN notify( 'set-busy, CONTAINER-SOURCE':U ).
1247 FIND FIRST MenuNode WHERE MenuNode.Description = INPUT sel_mcurr NO-ERROR.
1248 IF NOT AVAILABLE MenuNode THEN RETURN.
1250 FIND LinkNode WHERE LinkNode.NodeCode = MenuNode.NodeCode NO-LOCK.
1251 FIND UsrGroupMenu OF UsrGroup WHERE
1252 UsrGroupMenu.NodeCode = LinkNode.NodeCode NO-LOCK.
1254 FOR EACH UsrGroupMenuItem OF UsrGroupMenu:
1255 FIND FIRST ItemNode WHERE ItemNode.LinkCode = UsrGroupMenuItem.LinkCode.
1256 IF ItemNode.ItemStatus = "A" THEN DELETE UsrGroupMenuItem.
1257 END.
1259 DEF VAR i AS INT NO-UNDO.
1260 DEF VAR li AS CHAR NO-UNDO.
1261 DEF VAR delim AS CHAR NO-UNDO.
1262 DEF VAR item AS CHAR NO-UNDO.
1264 li = sel_icurr:LIST-ITEMS.
1265 delim = sel_icurr:DELIMITER.
1267 DO i = 1 TO NUM-ENTRIES( li, delim ):
1268 item = ENTRY( i, li, delim ).
1269 FIND FIRST ItemNode WHERE ItemNode.ButtonLabel = item.
1270 FIND ProgramLink WHERE ProgramLink.LinkCode = ItemNode.LinkCode NO-LOCK.
1271 FIND FIRST UsrGroupMenuItem OF UsrGroupMenu
1272 WHERE UsrGroupMenuItem.LinkCode = ItemNode.LinkCode NO-ERROR.
1274 IF NOT AVAILABLE UsrGroupMenuItem THEN
1276 CREATE UsrGroupMenuItem.
1277 ASSIGN
1278 UsrGroupMenuItem.GroupName = UsrGroup.GroupName
1279 UsrGroupMenuItem.MenuName = UsrGroupMenu.MenuName
1280 UsrGroupMenuItem.LinkCode = ProgramLink.LinkCode
1281 UsrGroupMenuItem.ButtonLabel = ProgramLink.ButtonLabel.
1282 END.
1284 ASSIGN UsrGroupMenuItem.SequenceCode = i.
1286 END.
1288 menu-altered = No.
1289 RUN update-item-buttons.
1291 RUN notify( 'set-idle, CONTAINER-SOURCE':U ).
1293 END.
1295 END PROCEDURE.
1297 /* _UIB-CODE-BLOCK-END */
1298 &ANALYZE-RESUME
1301 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-key V-table-Win adm/support/_key-snd.p
1302 PROCEDURE send-key :
1303 /*------------------------------------------------------------------------------
1304 Purpose: Sends a requested KEY value back to the calling
1305 SmartObject.
1306 Parameters: <see adm/template/sndkytop.i>
1307 ------------------------------------------------------------------------------*/
1309 /* Define variables needed by this internal procedure. */
1310 {src/adm/template/sndkytop.i}
1312 /* Return the key value associated with each key case. */
1313 {src/adm/template/sndkycas.i "GroupName" "UsrGroup" "GroupName"}
1315 /* Close the CASE statement and end the procedure. */
1316 {src/adm/template/sndkyend.i}
1318 END PROCEDURE.
1320 /* _UIB-CODE-BLOCK-END */
1321 &ANALYZE-RESUME
1324 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records V-table-Win _ADM-SEND-RECORDS
1325 PROCEDURE send-records :
1326 /*------------------------------------------------------------------------------
1327 Purpose: Send record ROWID's for all tables used by
1328 this file.
1329 Parameters: see template/snd-head.i
1330 ------------------------------------------------------------------------------*/
1332 /* SEND-RECORDS does nothing because there are no External
1333 Tables specified for this SmartViewer, and there are no
1334 tables specified in any contained Browse, Query, or Frame. */
1336 END PROCEDURE.
1338 /* _UIB-CODE-BLOCK-END */
1339 &ANALYZE-RESUME
1342 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed V-table-Win
1343 PROCEDURE state-changed :
1344 /* -----------------------------------------------------------
1345 Purpose:
1346 Parameters: <none>
1347 Notes:
1348 -------------------------------------------------------------*/
1349 DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
1350 DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
1352 CASE p-state:
1353 /* Object instance CASEs can go here to replace standard behavior
1354 or add new cases. */
1355 {src/adm/template/vstates.i}
1356 END CASE.
1357 END PROCEDURE.
1359 /* _UIB-CODE-BLOCK-END */
1360 &ANALYZE-RESUME
1363 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE top-most-changed V-table-Win
1364 PROCEDURE top-most-changed :
1365 /*------------------------------------------------------------------------------
1366 Purpose:
1367 ------------------------------------------------------------------------------*/
1369 IF INPUT FRAME {&FRAME-NAME} tgl_topmost THEN
1370 RUN notify( 'set-topmost,container-source':U ).
1371 ELSE
1372 RUN notify( 'reset-topmost,container-source':U ).
1374 END PROCEDURE.
1376 /* _UIB-CODE-BLOCK-END */
1377 &ANALYZE-RESUME
1380 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE update-buttons V-table-Win
1381 PROCEDURE update-buttons :
1382 /*------------------------------------------------------------------------------
1383 Purpose:
1384 Parameters: <none>
1385 Notes:
1386 ------------------------------------------------------------------------------*/
1388 RUN update-menu-buttons.
1389 RUN update-item-buttons.
1391 END PROCEDURE.
1393 /* _UIB-CODE-BLOCK-END */
1394 &ANALYZE-RESUME
1397 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE update-item-buttons V-table-Win
1398 PROCEDURE update-item-buttons :
1399 /*------------------------------------------------------------------------------
1400 Purpose:
1401 Parameters: <none>
1402 Notes:
1403 ------------------------------------------------------------------------------*/
1405 DO WITH FRAME {&FRAME-NAME}:
1406 btn_iadd:SENSITIVE = sel_iavail:SCREEN-VALUE <> "" AND sel_iavail:SCREEN-VALUE <> ?.
1407 btn_irem:SENSITIVE = sel_icurr:SCREEN-VALUE <> "" AND sel_icurr:SCREEN-VALUE <> ?.
1409 /* Move buttons */
1411 DEF VAR delim AS CHAR NO-UNDO.
1412 delim = sel_icurr:DELIMITER.
1414 btn_iup:SENSITIVE =
1415 ( sel_icurr:SCREEN-VALUE <> "" AND sel_icurr:SCREEN-VALUE <> ? ) AND
1416 ENTRY( 1, INPUT sel_icurr, delim ) <> ENTRY( 1, sel_icurr:LIST-ITEMS, delim ).
1417 btn_idown:SENSITIVE =
1418 ( sel_icurr:SCREEN-VALUE <> "" AND sel_icurr:SCREEN-VALUE <> ? ) AND
1419 ENTRY( NUM-ENTRIES( INPUT sel_icurr, delim ), INPUT sel_icurr, delim ) <>
1420 ENTRY( NUM-ENTRIES( sel_icurr:LIST-ITEMS, delim ), sel_icurr:LIST-ITEMS, delim ).
1422 btn_save:SENSITIVE = menu-altered.
1424 END.
1426 END PROCEDURE.
1428 /* _UIB-CODE-BLOCK-END */
1429 &ANALYZE-RESUME
1432 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE update-menu-buttons V-table-Win
1433 PROCEDURE update-menu-buttons :
1434 /*------------------------------------------------------------------------------
1435 Purpose:
1436 Parameters: <none>
1437 Notes:
1438 ------------------------------------------------------------------------------*/
1440 DO WITH FRAME {&FRAME-NAME}:
1441 btn_madd:SENSITIVE = sel_mavail:SCREEN-VALUE <> "" AND sel_mavail:SCREEN-VALUE <> ?.
1442 btn_mrem:SENSITIVE = sel_mcurr:SCREEN-VALUE <> "" AND sel_mcurr:SCREEN-VALUE <> ?.
1443 END.
1445 END PROCEDURE.
1447 /* _UIB-CODE-BLOCK-END */
1448 &ANALYZE-RESUME