2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /*** DTB_USER_CODE_START vvv Add file header below vvv ***/
25 * $XConsortium: cgen_win_stubs.c /main/4 1996/04/18 13:17:43 drk $
27 * @(#)cgen_win_stubs.c 1.26 13 Apr 1995 cde_app_builder/src/ab
29 * RESTRICTED CONFIDENTIAL INFORMATION:
31 * The information in this document is subject to special
32 * restrictions in a confidential disclosure agreement between
33 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
34 * document outside HP, IBM, Sun, USL, SCO, or Univel without
35 * Sun's specific written approval. This document and all copies
36 * and derivative works thereof must be returned or destroyed at
39 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
43 /*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
46 * File: cgen_win_stubs.c
47 * Contains: Module callbacks and connection functions
49 * This file was generated by dtcodegen, from module cgen_win
51 * Any text may be added between the DTB_USER_CODE_START and
52 * DTB_USER_CODE_END comments (even non-C code). Descriptive comments
53 * are provided only as an aid.
55 * ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
56 * ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
57 * ** DELETE THE GENERATED COMMENTS! **
62 #include "dtb_utils.h"
63 #include "dtbuilder.h"
64 #include "cgen_win_ui.h"
67 /**************************************************************************
68 *** DTB_USER_CODE_START
70 *** All necessary header files have been included.
72 *** Add include files, types, macros, externs, and user functions here.
77 #include "dtbuilder.h"
78 #include "cgen_win_ui.h"
79 #include "cgen_props_ui.h"
80 #include "cgen_env_ui.h"
82 #include <ab_private/ab.h>
83 #include <ab_private/proj.h>
84 #include <ab_private/cgen.h>
85 #include <ab_private/obj_notify.h>
86 #include <ab_private/util.h>
88 #define public_entry_point() if (AB_cgen_win == NULL) { return 0; }
89 #include "dtb_utils.h"
92 * End declarations of global widgets
97 /*** DTB_USER_CODE_END
99 *** End of user code section
101 **************************************************************************/
106 cgen_win_help_pulldown_Using_Help_item_CB1(
108 XtPointer clientData,
112 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
113 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
115 dtb_show_help_volume_info("Help4Help", "_hometopic");
116 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
117 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
122 cgen_win_help_pulldown_Overview_item_CB1(
124 XtPointer clientData,
128 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
129 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
131 dtb_show_help_volume_info("AppBuilder", "ABCodeGenerator");
132 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
133 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
138 cgen_win_help_pulldown_Reference_item_CB1(
140 XtPointer clientData,
144 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
145 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
147 dtb_show_help_volume_info("AppBuilder", "ABCodeGenerator");
148 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
149 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
154 cgen_win_help_pulldown_Tasks_item_CB1(
156 XtPointer clientData,
160 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
161 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
163 dtb_show_help_volume_info("AppBuilder", "ABBuildandRun");
164 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
165 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
170 cgen_win_help_pulldown_On_Item_item_CB1(
172 XtPointer clientData,
176 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
177 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
179 dtb_do_onitem_help();
180 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
181 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
188 XtPointer clientData,
192 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
194 cgen_gen_code(CG_CMD_UNDEF);
196 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
198 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
199 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
206 XtPointer clientData,
210 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
212 cgen_make(CG_CMD_UNDEF);
214 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
216 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
217 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
224 XtPointer clientData,
228 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
230 cgen_run(CG_CMD_UNDEF);
232 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
234 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
235 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
242 XtPointer clientData,
246 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
248 cgen_make_run(CG_CMD_UNDEF);
250 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
252 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
253 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
260 XtPointer clientData,
264 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
268 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
270 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
271 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
276 connP_set_insensitive(
278 XtPointer clientData,
282 DtbCgenWinMainwindowInfo dtbSource = (DtbCgenWinMainwindowInfo)callData;
284 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
285 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
287 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
289 /* widget is either the abort button or the abort menu item */
290 XtSetSensitive(widget, False);
292 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
297 cgenP_close_cgen_winCB(
299 XtPointer clientData,
303 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
305 DtbCgenWinMainwindowInfo cgen_win =
306 (DtbCgenWinMainwindowInfo)clientData;
308 ui_win_show(cgen_win->mainwindow, False, NULL);
310 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
312 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
313 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
318 connP_set_termp_inactive(
320 XtPointer clientData,
324 DtbCgenWinMainwindowInfo dtbSource = (DtbCgenWinMainwindowInfo)callData;
326 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
327 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
329 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
331 /* widget is the output term pane */
332 XtSetSensitive(widget, False);
334 /* Make the cursor stop blinking. */
335 XtVaSetValues(widget, DtNblinkRate, 0, NULL);
337 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
344 XtPointer clientData,
348 DtbCgenWinMainwindowInfo dtbSource = (DtbCgenWinMainwindowInfo)callData;
350 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
354 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
356 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
358 /* Make the cursor stop blinking. */
359 XtVaSetValues(widget, DtNblinkRate, 0, NULL);
361 /* Set the input term pane shell to be the same as the
362 * user's $SHELL environment variable.
364 shell = (STRING) getenv("SHELL");
365 XtVaSetValues(widget, DtNsubprocessCmd, shell, NULL);
367 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
374 XtPointer clientData,
378 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
379 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
381 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
385 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
390 cgenP_generate_entire_projCB(
392 XtPointer clientData,
396 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
399 * generate code for the entire project this one time.
401 CG_GEN_FLAG orig_cmd_flag = CodeGenOptions.cmd_flag;
403 CodeGenOptions.cmd_flag = CG_GEN_PROJ_FLAG;
404 cgen_gen_code(CG_CMD_UNDEF);
405 CodeGenOptions.cmd_flag = orig_cmd_flag;
407 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
409 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
410 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
415 cgenP_show_cgen_optionsCB(
417 XtPointer clientData,
421 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
423 if (AB_cgen_prop_dialog == (Widget) NULL)
426 * Module initialization
428 dtbCgenPropsCgenPropsDlgInfo_clear(&dtb_cgen_props_cgen_props_dlg);
429 dtb_cgen_props_cgen_props_dlg_initialize(&dtb_cgen_props_cgen_props_dlg,
431 AB_cgen_prop_dialog = dtb_cgen_props_cgen_props_dlg.cgen_props_dlg_shellform;
433 XtVaSetValues(AB_cgen_prop_dialog,
434 XmNuserData, dtb_cgen_props_cgen_props_dlg.module_list,
437 ab_register_window(AB_cgen_prop_dialog, AB_WIN_DIALOG, WindowHidden,
438 XtParent(AB_cgen_win), AB_WPOS_TILE_HORIZONTAL,
439 cgenP_cancel_propsCB, (XtPointer)&dtb_cgen_props_cgen_props_dlg);
441 /* Update the project name for the prop sheet */
442 cgen_notify_props_new_proj(proj_get_project());
444 /* Initialize module list */
445 cgenP_init_props_module_list(dtb_cgen_props_cgen_props_dlg.module_list);
447 /* Add Rename and Destroy object callbacks to update module_list */
451 ab_show_window(AB_cgen_prop_dialog);
453 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
455 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
456 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
461 cgenP_show_env_dlgCB(
463 XtPointer clientData,
467 /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
469 if (AB_cgen_env_dialog == (Widget) NULL)
471 dtbCgenEnvDialogInfo_clear(&dtb_cgen_env_dialog);
472 dtb_cgen_env_dialog_initialize(&dtb_cgen_env_dialog, AB_cgen_win);
473 AB_cgen_env_dialog = dtb_cgen_env_dialog.dialog_shellform;
475 ab_register_window(AB_cgen_env_dialog, AB_WIN_DIALOG, WindowHidden,
476 XtParent(AB_cgen_win), AB_WPOS_TILE_HORIZONTAL,
477 cgenP_cancel_envCB, (XtPointer)&dtb_cgen_env_dialog);
480 ab_show_window(AB_cgen_env_dialog);
482 /*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
484 /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
485 /*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
490 /**************************************************************************
491 *** DTB_USER_CODE_START
493 *** All automatically-generated data and functions have been defined.
495 *** Add new functions here, or at the top of the file.
497 /*** DTB_USER_CODE_END
499 *** End of user code section
501 **************************************************************************/