Added capital works blank section. Synced calling screen.
[capital-apms-progress.git] / win / w-defmnu.w
blobb1b461ce3f05758c542ca0b0b70f32723ef3fd3d
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI
2 &ANALYZE-RESUME
3 &Scoped-define WINDOW-NAME Win_DefMenu
4 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Win_DefMenu
5 /*------------------------------------------------------------------------
6 File:
7 Description:
8 ------------------------------------------------------------------------*/
9 CREATE WIDGET-POOL.
10 /* *************************** Definitions ************************** */
12 /* _UIB-CODE-BLOCK-END */
13 &ANALYZE-RESUME
16 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
18 /* ******************** Preprocessor Definitions ******************** */
20 &Scoped-define PROCEDURE-TYPE SmartWindow
22 &Scoped-define ADM-CONTAINER WINDOW
24 /* Name of first Frame and/or Browse and/or first Query */
25 &Scoped-define FRAME-NAME F-Main-prop
27 /* Custom List Definitions */
28 /* List-1,List-2,List-3,List-4,List-5,List-6 */
30 /* _UIB-PREPROCESSOR-BLOCK-END */
31 &ANALYZE-RESUME
35 /* *********************** Control Definitions ********************** */
37 /* Define the widget handle for the window */
38 DEFINE VAR Win_DefMenu AS WIDGET-HANDLE NO-UNDO.
40 /* ************************ Frame Definitions *********************** */
42 DEFINE FRAME F-Main-prop
43 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
44 SIDE-LABELS NO-UNDERLINE THREE-D
45 AT COL 1 ROW 1
46 SIZE 61.86 BY 15.4.
49 /* *********************** Procedure Settings ************************ */
51 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
52 /* Settings for THIS-PROCEDURE
53 Type: SmartWindow
54 Allow: Basic,Browse,DB-Fields,Query,Smart,Window
55 Other Settings: COMPILE
57 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
59 /* ************************* Create Window ************************** */
61 &ANALYZE-SUSPEND _CREATE-WINDOW
62 IF SESSION:DISPLAY-TYPE = "GUI":U THEN
63 CREATE WINDOW Win_DefMenu ASSIGN
64 HIDDEN = YES
65 TITLE = "Menu Window"
66 HEIGHT = 18.4
67 WIDTH = 71
68 MAX-HEIGHT = 31.4
69 MAX-WIDTH = 142.29
70 VIRTUAL-HEIGHT = 31.4
71 VIRTUAL-WIDTH = 142.29
72 RESIZE = yes
73 SCROLL-BARS = no
74 STATUS-AREA = no
75 BGCOLOR = ?
76 FGCOLOR = ?
77 PRIVATE-DATA = "w-proper"
78 THREE-D = yes
79 MESSAGE-AREA = no
80 SENSITIVE = yes.
81 ELSE {&WINDOW-NAME} = CURRENT-WINDOW.
82 /* END WINDOW DEFINITION */
83 &ANALYZE-RESUME
86 /* *************** Runtime Attributes and UIB Settings ************** */
88 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
89 /* SETTINGS FOR WINDOW Win_DefMenu
90 VISIBLE,,RUN-PERSISTENT */
91 /* SETTINGS FOR FRAME F-Main-prop
93 IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(Win_DefMenu)
94 THEN Win_DefMenu:HIDDEN = yes.
96 /* _RUN-TIME-ATTRIBUTES-END */
97 &ANALYZE-RESUME
102 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Win_DefMenu
103 /* ************************* Included-Libraries *********************** */
105 {src/adm/method/containr.i}
106 {inc/method/m-mnuwin.i}
108 /* _UIB-CODE-BLOCK-END */
109 &ANALYZE-RESUME
114 /* ************************ Control Triggers ************************ */
116 &Scoped-define SELF-NAME Win_DefMenu
117 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Win_DefMenu Win_DefMenu
118 ON END-ERROR OF Win_DefMenu /* Menu Window */
119 OR ENDKEY OF {&WINDOW-NAME} ANYWHERE DO:
120 /* This case occurs when the user presses the "Esc" key.
121 In a persistently run window, just ignore this. If we did not, the
122 application would exit. */
123 IF THIS-PROCEDURE:PERSISTENT THEN RETURN NO-APPLY.
124 END.
126 /* _UIB-CODE-BLOCK-END */
127 &ANALYZE-RESUME
130 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Win_DefMenu Win_DefMenu
131 ON WINDOW-CLOSE OF Win_DefMenu /* Menu Window */
133 /* This ADM code must be left here in order for the SmartWindow
134 and its descendents to terminate properly on exit. */
135 APPLY "CLOSE":U TO THIS-PROCEDURE.
136 RETURN NO-APPLY.
137 END.
139 /* _UIB-CODE-BLOCK-END */
140 &ANALYZE-RESUME
143 &UNDEFINE SELF-NAME
145 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Win_DefMenu
148 /* *************************** Main Block *************************** */
150 /* Include custom Main Block code for SmartWindows. */
151 {src/adm/template/windowmn.i}
153 /* _UIB-CODE-BLOCK-END */
154 &ANALYZE-RESUME
157 /* ********************** Internal Procedures *********************** */
159 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects Win_DefMenu _ADM-CREATE-OBJECTS
160 PROCEDURE adm-create-objects :
161 /*------------------------------------------------------------------------------
162 Purpose: Create handles for all SmartObjects used in this procedure.
163 After SmartObjects are initialized, then SmartLinks are added.
164 Parameters: <none>
165 ------------------------------------------------------------------------------*/
167 END PROCEDURE.
169 /* _UIB-CODE-BLOCK-END */
170 &ANALYZE-RESUME
173 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available Win_DefMenu _ADM-ROW-AVAILABLE
174 PROCEDURE adm-row-available :
175 /*------------------------------------------------------------------------------
176 Purpose: Dispatched to this procedure when the Record-
177 Source has a new row available. This procedure
178 tries to get the new row (or foriegn keys) from
179 the Record-Source and process it.
180 Parameters: <none>
181 ------------------------------------------------------------------------------*/
183 /* Define variables needed by this internal procedure. */
184 {src/adm/template/row-head.i}
186 /* Process the newly available records (i.e. display fields,
187 open queries, and/or pass records on to any RECORD-TARGETS). */
188 {src/adm/template/row-end.i}
190 END PROCEDURE.
192 /* _UIB-CODE-BLOCK-END */
193 &ANALYZE-RESUME
196 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI Win_DefMenu _DEFAULT-DISABLE
197 PROCEDURE disable_UI :
198 /*------------------------------------------------------------------------------
199 Purpose: DISABLE the User Interface
200 Parameters: <none>
201 Notes: Here we clean-up the user-interface by deleting
202 dynamic widgets we have created and/or hide
203 frames. This procedure is usually called when
204 we are ready to "clean-up" after running.
205 ------------------------------------------------------------------------------*/
206 /* Delete the WINDOW we created */
207 IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(Win_DefMenu)
208 THEN DELETE WIDGET Win_DefMenu.
209 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
210 END PROCEDURE.
212 /* _UIB-CODE-BLOCK-END */
213 &ANALYZE-RESUME
216 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI Win_DefMenu _DEFAULT-ENABLE
217 PROCEDURE enable_UI :
218 /*------------------------------------------------------------------------------
219 Purpose: ENABLE the User Interface
220 Parameters: <none>
221 Notes: Here we display/view/enable the widgets in the
222 user-interface. In addition, OPEN all queries
223 associated with each FRAME and BROWSE.
224 These statements here are based on the "Other
225 Settings" section of the widget Property Sheets.
226 ------------------------------------------------------------------------------*/
227 VIEW FRAME F-Main-prop IN WINDOW Win_DefMenu.
228 {&OPEN-BROWSERS-IN-QUERY-F-Main-prop}
229 VIEW Win_DefMenu.
230 END PROCEDURE.
232 /* _UIB-CODE-BLOCK-END */
233 &ANALYZE-RESUME
236 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-exit Win_DefMenu
237 PROCEDURE local-exit :
238 /* -----------------------------------------------------------
239 Purpose: Starts an "exit" by APPLYing CLOSE event, which starts "destroy".
240 Parameters: <none>
241 Notes: If activated, should APPLY CLOSE, *not* dispatch adm-exit.
242 -------------------------------------------------------------*/
243 APPLY "CLOSE":U TO THIS-PROCEDURE.
245 RETURN.
247 END PROCEDURE.
249 /* _UIB-CODE-BLOCK-END */
250 &ANALYZE-RESUME
253 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records Win_DefMenu _ADM-SEND-RECORDS
254 PROCEDURE send-records :
255 /*------------------------------------------------------------------------------
256 Purpose: Send record ROWID's for all tables used by
257 this file.
258 Parameters: see template/snd-head.i
259 ------------------------------------------------------------------------------*/
261 /* SEND-RECORDS does nothing because there are no External
262 Tables specified for this SmartWindow, and there are no
263 tables specified in any contained Browse, Query, or Frame. */
265 END PROCEDURE.
267 /* _UIB-CODE-BLOCK-END */
268 &ANALYZE-RESUME
271 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed Win_DefMenu
272 PROCEDURE state-changed :
273 /* -----------------------------------------------------------
274 Purpose:
275 Parameters: <none>
276 Notes:
277 -------------------------------------------------------------*/
278 DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
279 DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
280 END PROCEDURE.
282 /* _UIB-CODE-BLOCK-END */
283 &ANALYZE-RESUME
286 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE user-layout Win_DefMenu
287 PROCEDURE user-layout :
288 /*------------------------------------------------------------------------------
289 Purpose: sub menus stack vertically.
290 ------------------------------------------------------------------------------*/
292 DEF VAR btn-list AS CHAR NO-UNDO.
294 RUN get-btn-list IN sys-mgr( THIS-PROCEDURE, OUTPUT btn-list ).
295 RUN stack( btn-list, "btn-group", "L", No ).
297 END PROCEDURE.
299 /* _UIB-CODE-BLOCK-END */
300 &ANALYZE-RESUME