Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
XCOMM $XConsortium: Imakefile /main/4 1996/04/21 19:26:53 drk $
XCOMM
XCOMM RESTRICTED CONFIDENTIAL INFORMATION:
XCOMM
XCOMM The information in this document is subject to special
XCOMM restrictions in a confidential disclosure agreement between
XCOMM HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
XCOMM document outside HP, IBM, Sun, USL, SCO, or Univel without
XCOMM Sun's specific written approval. This document and all copies
XCOMM and derivative works thereof must be returned or destroyed at
XCOMM Sun's request.
XCOMM
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1996 International Business Machines Corp.
XCOMM (c) Copyright 1993,1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
#ifdef SunArchitecture
.NO_PARALLEL: # don't build subdirs in parallel
#endif
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
SUBDIRS = libAButil libABobj libABobjXm libABil abmf ab
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
dtbuilder::
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in libAButil libABobj libABobjXm libABil ab ;\
do \
(cd $$i ; echo "making" dtbuilder "in $(CURRENT_DIR)/$$i..."; \
$(MAKE) $(MFLAGS) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'FIRST_LIBPATH=$(FIRST_LIBPATH)' 'FIRST_INCLUDES=$(FIRST_INCLUDES)' dtbuilder); \
done
dtcodegen::
@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
for i in libAButil libABobj libABobjXm libABil abmf ;\
do \
(cd $$i ; echo "making" dtcodegen "in $(CURRENT_DIR)/$$i..."; \
$(MAKE) $(MFLAGS) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'FIRST_LIBPATH=$(FIRST_LIBPATH)' 'FIRST_INCLUDES=$(FIRST_INCLUDES)' dtcodegen); \
done
clean::
$(RM) -rf include

View File

@@ -0,0 +1,248 @@
%W% %G%
$XConsortium: README.src /main/3 1995/11/06 17:09:47 rswiston $
CDE1.0 Application Builder Source Code Documentation
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This document describes the structure & style guidelines for the source
code of the CDE1.0 Application Builder reference implementation. This
document covers:
I. Source Architecture (libraries & dependencies)
II. Source Directory Structure
III. Style Guidelines
A. Files (.h & .c)
i. naming
ii. structure
B. Functions
i. naming
ii. return values
C. Data
i. naming
I. Source Architecture
----------------------
The Application Builder consists of 2 independent (but tightly
integrated) executables:
. The AB Front-end (ab): the GUI which is used to 'build'
the GUI & application-framework definitions for a CDE
application and write them out into BIL (Builder Interchage
Language) files.
. The AB Code-generator (abmf): the engine which interprets
the BIL files and generates the appropriate Motif/CDE
C code/resource files/etc.
Both of these executables are based on a common internal mechanism
which is implemented in a set of separate libraries. Each library
is composed of one or more logical modules.
libAButil
|
----------------------------------
| | | |
| | libABobj |
| | | |
| | ------------------ |
| | | | | |
| libABobjXm | libABil
| | | |
| | | |
-----------------------------------
| |
Front-end Code-generator
ab . . . . . . . . . abmf
1. libAButil - Provides general purpose utility mechanisms used
throughout the source code, including definitions of
common types and an efficient string-handling
mechanism. This library is window-system/toolkit
independent.
2. libABobj - Provides core mechinism for storing the representation
for an application (and the objects it contains) in
memory. This library is window-system/toolkit
independent ("mechanism", NOT "policy").
3. libABobjXm- Provides engine which manipulates the libABobj data
structures in a way appropriate for, and dependent on,
the Motif toolkit. This library is heavily dependent
on the X11 window-system & the Motif toolkit
(implements the "policy" for libABobj).
4. libABil - Provides the mechanism for translating the libABobj
data structures in memory to disk (reads/writes
BIL, UIL files).
II. Source Directory Structure
-------------------------------
The source code for the CDE Application Builder is organized
in a "flattened" structure corresponding to the architecture
described above. The directory structure looks like the following:
/src
|
-------------------------------------------------------------
| | | | | | | |
/ab /abmf /doc /include /libABil /libABobj /libABobjXm /libAButil
|
------------
| |
ab/ ab_private/
Each directory contains a Makefile, and all header & .c source
files for its modules. The "ab" & "ab_private" include directories
contain symbolic links to the shared header files in each directory
(make include-paths simpler!).
Below is a desription of each directory & the modules it includes:
ab:
pal- implements the mainwindow palette of objects
ab - manipulates the UI objects created by the user
(create, resize, copy, etc)
brws - implements the AB Browser mechanism
conn - implements the AB Connections manager
proj - implements the AB Project mechanism
prop - implements the AB Property Dialogs
help - implements the AB Help Editor
ttalk- implements the AB ToolTalk Editor
abui - implements UI utility routines used by all ab modules
abx - implements X utility routines used by all ab modules
abmf:
abmf - implements the code generator
libABil:
abil - implements generic interchange-language functions
bil - implements reading/writing BIL files
uil - implements reading/writing UIL files
libABobj:
obj - implements the AB object data structures
trav - implements the traversal mechanisms for the 'obj'
data structures
libABobjXm:
objxm - implements Motif-izing 'obj' data structures
libAButil:
abio - implements AB input/output routines
util - implements general-purpose AB utilities
istr - implements the AB string library
III. Style Guidelines
---------------------
Since the Application Builder is a large & complex application
being developed by multiple engineers, a set of coding style
conventions have been adopted in order to make the source more easily
readable.
0. The general C programming style follows the Guidelines
outlined in the "The C++ Programming Style Guide Quick Reference"
(by HP & SunSoft) (except that indent is 4 spaces, not 8).
A. Files
Each module consists of a single public header file, and one or
more private header & source files, as required.
If the module contains a GUI (built with AB), then the module may
also include BIL & AB-generated-source files.
i. naming
a) All files for a module are prefixed by their module-name.
b) The public header file matches identically the module-name.
c) Any private header files are appended with a "P".
e.g. brws module -->>
public header: brws.h
private headers: brws_mthdsP.h
source files: brws.c, brws_mthds.c, ...
bil files: brws.bil
AB-generated: brws_ui.c, brws_stubs.c
ii. structure
All header & source files generally follow the format contained
in the "template.h" & "template.c" files present in each
directory (see those files for details).
B. Functions
Functions are categorized into 3 basic categories:
. public : other modules/libraries may call them
. module-private : only files within the module may call them
. private : static within a file
i. naming
a) All public functions are prefixed with the module name*
b) All module-private functions are prefixed with the module
name + "P"
c) All private functions do NOT have the module prefix,
but have a unique and relatively meaningful name
e.g.
public: objxm_instantiate_obj()
module-private: objxmP_merge_args()
private: destroy_widget_tree()
ii. return values
a) If a function does not return any specific data and is
relatively guaranteed to complete successfully, it is
defined as type "void".
b) Otherwise, it returns an "int" indicating the degree of
success in completing its task, with values >=0 defining
success (the return codes defined in libAButil/[ABerror.h]
are used for consistency).
C. Data
Data is categorized into 3 classes:
. global : other modules within the library/directory can
access them (AVOIDED WHENEVER POSSIBLE!)
. module-global : different files within a module may access
. private : statically defined in a file
i. naming
a) All global data is prefixed with the module name, first
letter capitalized
b) All module-global data is prefixed with the module name
+ "P"
c) All private data is NOT prefixed, but should have a
unique and relatively meaningful name
e.g.
global: Ab_project
module-global: abP_grid_size
private: gbox_gc

View File

@@ -0,0 +1,70 @@
/*
* $XConsortium: ab.rules /main/5 1996/05/30 10:54:06 drk $
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1996 Hewlett-Packard Company.
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1993,1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
/*
* Rule to create a help volume using dthelptag
*/
#ifndef HelpVolumeTarget
# define HelpVolumeTarget(volbasename,helpsrc,cmdopts,paropts) @@\
all:: volbasename.sdl @@\
@@\
volbasename.sdl:: helpsrc @@\
$(CLIENTENVSETUP) \ @@\
HELPTAGPASS1=$(HELPTAGPASS1DEF) \ @@\
HELPTAGPASS2=$(HELPTAGPASS2DEF) \ @@\
sh $(HELPTAG) cmdopts volbasename paropts
#endif /* HelpVolumeTarget */
/*
* Rule to generate a message catalog using gencat
*/
#ifndef AbMessageCatalogTarget
# define AbMessageCatalogTarget(catalogname) @@\
AllTarget(catalogname.cat) @@\
@@\
catalogname.cat:: $(SOURCES.msg) @@\
$(GENCAT) catalogname.cat $(SOURCES.msg)
#endif /* AbMessageCatalogTarget */
/*
* Rule to generate module ui.c, ui.h, and stubs.c files
* Looks messy now - I can't figure out how to just ifdef out the
* $(UIFILE).c + $(UIFILE).h + $(STUBSFILE).c: $(PROJFILE).bip $(MODFILE).bil
* line.
*/
#ifdef SunArchitecture
# ifndef BilTarget
# define BilTarget(module) @@\
Concat(module,_ui.c) + Concat(module,_ui.h) + Concat(module,_stubs.c): $(PROJFILE).bip Concat(module,.bil) @@\
$(DTCODEGEN) -changed -merge -p $(PROJFILE).bip Concat(module,.bil) @@\
Concat(module,_ui).o: Concat(module,_ui.c) Concat(module,_ui.h) Concat(module,.bil) @@\
Concat(module,_stubs).o: Concat(module,_stubs.c) Concat(module,_ui.c) Concat(module,_ui.h) Concat(module,.bil)
# endif /* BilTarget */
#else
# ifndef BilTarget
# define BilTarget(module) @@\
Concat(module,_ui.c) Concat(module,_ui.h) Concat(module,_stubs.c): $(PROJFILE).bip Concat(module,.bil) @@\
$(DTCODEGEN) -changed -merge -p $(PROJFILE).bip Concat(module,.bil) @@\
Concat(module,_ui).o: Concat(module,_ui.c) Concat(module,_ui.h) Concat(module,.bil) @@\
Concat(module,_stubs).o: Concat(module,_stubs.c) Concat(module,_ui.c) Concat(module,_ui.h) Concat(module,.bil)
# endif /* BilTarget */
#endif /* SunArchitecture */

View File

@@ -0,0 +1,116 @@
/*
* $XConsortium: ab.tmpl /main/10 1996/10/07 16:57:05 drk $
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, Fujitsu, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, Fujitsu, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* (c) Copyright 1996 Digital Equipment Corporation.
* (c) Copyright 1996 Hewlett-Packard Company.
* (c) Copyright 1996 International Business Machines Corp.
* (c) Copyright 1993,1996 Sun Microsystems, Inc.
* (c) Copyright 1996 Novell, Inc.
* (c) Copyright 1996 FUJITSU LIMITED.
* (c) Copyright 1996 Hitachi.
*/
/*
* Variables private to the App Builder src directory and general imake
* variables set for App Builder builds
*
* ABINCLUDES path from any one of ab subdirs to include
*/
/*
* App Builder private variables
*/
ABINCLUDES = ../include
/*
* use only posix-compliant functions
* and force ansi compliance
*/
/*
* We're going to add a clean target, so we need this here, so that
* clean does not become the default
*/
default_target: all
/*
* Imake variables
*/
#ifdef SunArchitecture
/*
* -xF and -M cause reordering of executable
*/
LOCAL_LDFLAGS = -M Mapfile
EXTRA_DEFINES = -D_POSIX_SOURCE=1 -Xa -xF
clean::
touch .make.state
$(RM) .make.*
#endif
#if defined(USLArchitecture)
EXTRA_DEFINES = -D_POSIX_SOURCE=1
#elif defined(UXPArchitecture)
/* Need to define __uxp__ when using -Xc */
EXTRA_DEFINES = -D_POSIX_SOURCE=1 -Xc -D__uxp__
#elif defined(AlphaArchitecture)
EXTRA_DEFINES = -D_XOPEN_SOURCE=1 -D_OSF_SOURCE=1
/* default storage(40000) is not enough to process ./src/libABil/bil_parse.y */
YACCFLAGS = -N100000
#else
YACC = YaccCmd
LEX = LexCmd
#endif
#ifdef HPArchitecture
/*
* use only posix-compliant functions
* Set yaccflags here because hp.cf does not have -Nc20000
* The YACCFLAGS line will be removed if/when hp.cf is updated
*/
EXTRA_DEFINES = -D_POSIX_SOURCE=1
YACCFLAGS = -Nm100000 -Nc20000
/*
* dtbuilder (e.g. in abmf.c'abmf_init) modifies string constants
* declared in lib_func_strings.c, so we must suppress +ESlit.
*/
CCOPTIONS = -Ae
#endif
#ifdef IBMArchitecture
/*
* use only posix-compliant functions
* and force ansi compliance
*/
EXTRA_DEFINES = -D_POSIX_SOURCE=1
YACCFLAGS = -Nm100000
#endif
/*
* Create the necesary build-time include directories
*/
#ifdef SunArchitecture
.NO_PARALLEL: $(ABINCLUDES)/ab $(ABINCLUDES)/ab_private
.NO_PARALLEL: depend install binstall install.man includes shared_includes localincludes $(PROGRAM) $(LIBRARY) $(TARGET)
#endif
$(ABINCLUDES)/ab_private:
$(MKDIRHIER) $(ABINCLUDES)/ab_private
$(ABINCLUDES)/ab:
$(MKDIRHIER) $(ABINCLUDES)/ab
includes:: $(ABINCLUDES)/ab $(ABINCLUDES)/ab_private

View File

@@ -0,0 +1,211 @@
!
! $XConsortium: Ab /main/3 1995/11/06 17:11:11 rswiston $
!
! @(#)Ab 1.27 03 Feb 1994 cde_app_builder/src/ab
!
! RESTRICTED CONFIDENTIAL INFORMATION:
!
! The information in this document is subject to special
! restrictions in a confidential disclosure agreement between
! HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
! document outside HP, IBM, Sun, USL, SCO, or Univel without
! Sun's specific written approval. This document and all copies
! and derivative works thereof must be returned or destroyed at
! Sun's request.
!
! Copyright 1993 Sun Microsystems, Inc. All rights reserved.
!
!
ab.title: Application Builder
ab*applicationShell.mainWindow1*traversalOn: FALSE
ab*applicationShell.mainWindow1.palette_menubar1.File1.fontList: *hel*-b*-r-*-12-*=font_1
ab*applicationShell.mainWindow1.palette_menubar1.Edit1.fontList: *hel*-b*-r-*-12-*=font_1
ab*applicationShell.mainWindow1.palette_menubar1.View1.fontList: *hel*-b*-r-*-12-*=font_1
ab*applicationShell.mainWindow1.palette_menubar1.Layout1.fontList: *hel*-b*-r-*-12-*=font_1
ab*applicationShell.mainWindow1.palette_menubar1.Editors1.fontList: *hel*-b*-r-*-12-*=font_1
ab*applicationShell.mainWindow1.palette_menubar1.Help1.fontList: *hel*-b*-r-*-12-*=font_1
ab*applicationShell.mainWindow1.palette_menubar1*pulldownMenu11.cascadeButton44.fontList: *hel*-b*-r-*-12-*
ab*applicationShell.mainWindow1.palette_menubar1*pulldownMenu11.cascadeButton45.fontList: *hel*-b*-r-*-12-*
ab*applicationShell.mainWindow1.palette_command1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_command1.palette_type_row_col1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_command1.palette_type_row_col1.palette_type_option_menu1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_command1.palette_type_row_col1*palette_type_pulldown1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_command1.palette_type_row_col1*palette_type_pulldown1.standard_button1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_command1.palette_type_row_col1*palette_type_pulldown1.user_def_button1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_command1.build_test_rowcol1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_command1.build_test_rowcol1.build_test1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_command1.build_test_rowcol1.build_test1.build_mode_toggle1.fontList: *hel*-b*-r-*-12-*
ab*applicationShell.mainWindow1.palette_command1.build_test_rowcol1.build_test1.build_mode_toggle1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_command1.build_test_rowcol1.build_test1.test_mode_toggle1.fontList: *hel*-b*-r-*-12-*
ab*applicationShell.mainWindow1.palette_command1.build_test_rowcol1.build_test1.test_mode_toggle1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_footer1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_footer1.footer_row_col1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_footer1.footer_row_col1.obj_name_label1.fontList: *hel*-b*-r-*-12-*
ab*applicationShell.mainWindow1.palette_footer1.footer_row_col1.obj_name_label1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_footer1.footer_row_col1.obj_pos_label1.fontList: *hel*-b*-r-*-12-*
ab*applicationShell.mainWindow1.palette_footer1.footer_row_col1.obj_pos_label1.background: #8f8f8f
ab*windows_label.fontList: *hel*-b*-r-*-12-*
ab*cont_label.fontList: *hel*-b*-r-*-12-*
ab*panes_label.fontList: *hel*-b*-r-*-12-*
ab*choosers_label.fontList: *hel*-b*-r-*-12-*
ab*controls_label.fontList: *hel*-b*-r-*-12-*
ab*palette_footer*background: #8f8f8f
ab*palette_footer*background: #8f8f8f
ab*palette_footer*background: #8f8f8f
ab*obj_name_label.fontList: *hel*-b*-r-*-12-*
ab*obj_type_label.fontList: *hel*-b*-r-*-12-*
ab*obj_pos_label.fontList: *hel*-b*-r-*-12-*
ab*obj_size_label.fontList: *hel*-b*-r-*-12-*
ab*curs_pos_label.fontList: *hel*-b*-r-*-12-*
ab*cur_module_label.fontList: *hel*-b*-r-*-12-*
ab*obj_name_string.fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*obj_type_string.fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*obj_pos_string.fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*obj_size_string.fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*curs_pos_string.fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*cur_module_string.fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.row_col_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.drawnButton6.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.sel_box_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.file_chooser_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.drawnButton9.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group3279.button_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group3279.exclusive_choice_obj1.choice_item_obj3.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group3279.exclusive_choice_obj1.choice_item_obj4.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group3279.exclusive_choice_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group3279.check_box243.check_choice_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group3279.check_box243.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group4280.menu_bar_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group4280.option_menu_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group4280.slider_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group5281.label_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group5281.separator_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group5281.text_field_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group5281.text_field_obj1.text_field_label1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.group5281.text_field_obj1.text_field_field1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.list_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.base_win_obj1.background: #8f8f8f
ab*base_win_obj.background: #8f8f8f
ab*dialog_obj.background: #8f8f8f
ab*message_obj.background: #8f8f8f
ab*paned_win_obj.background: #8f8f8f
ab*row_col_obj.background: #8f8f8f
ab*draw_area_obj.background: #8f8f8f
ab*text_pane_obj.background: #8f8f8f
ab*term_pane_obj.background: #8f8f8f
ab*menubar_obj.background: #8f8f8f
ab*sel_box_obj.background: #8f8f8f
ab*file_chooser_obj.background: #8f8f8f
ab*command_obj.background: #8f8f8f
ab*print_box_obj.background: #8f8f8f
ab*button_obj.background: #8f8f8f
ab*menu_button_obj.background: #8f8f8f
ab*button_obj.fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*menu_button_obj.fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*exclusive_choice_obj*background: #8f8f8f
ab*exclusive_choice_obj*fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*check_box242*background: #8f8f8f
ab*check_box242*fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*option_menu_obj.background: #8f8f8f
ab*stack_option_pulldown249*fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*option_menu_obj*OptionLabel*fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*slider_obj.background: #8f8f8f
ab*gauge_obj.background: #8f8f8f
ab*text_field_obj*background: #8f8f8f
ab*text_field_obj*XmLabel.fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*spin_box_obj*background: #8f8f8f
ab*spin_box_obj*fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*combo_box_obj*background: #8f8f8f
ab*combo_box_obj*fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*list_obj*background: #8f8f8f
ab*list_obj*fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*list_obj*XmScrolledWindow*background: #8f8f8f
ab*label_obj.background: #8f8f8f
ab*label_obj.fontList: -adobe-helvetica-medium-r-normal--12-*-iso8859-1
ab*separator_obj.background: #8f8f8f
ab*menu_bar_obj*background: #8f8f8f
ab*menu_bar_obj*fontList: -adobe-helvetica-medium-r-normal--8-*-iso8859-1
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.dialog_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.paned_win_obj1.background: #8f8f8f
ab*applicationShell.mainWindow1.palette_items_frame1.palette_items_form1.draw_area_obj1.background: #8f8f8f
*ab_palette_main.palette_command.background: #8f8f8f
*ab_palette_main.palette_command.palette_type_row_col.background: #8f8f8f
*ab_palette_main.palette_command.palette_type_row_col.palette_type_option_menu.background: #8f8f8f
*ab_palette_main.palette_command.palette_type_row_col*palette_type_pulldown.background: #8f8f8f
*ab_palette_main.palette_command.palette_type_row_col*palette_type_pulldown.standard_button.background: #8f8f8f
*ab_palette_main.palette_command.palette_type_row_col*palette_type_pulldown.user_def_button.background: #8f8f8f
*ab_palette_main.palette_command.build_test_rowcol.background: #8f8f8f
*ab_palette_main.palette_command.build_test_rowcol.build_test.background: #8f8f8f
*ab_palette_main.palette_command.build_test_rowcol.build_test.build_mode_toggle.fontList: *hel*-b*-r-*-12-*
*ab_palette_main.palette_command.build_test_rowcol.build_test.build_mode_toggle.background: #8f8f8f
*ab_palette_main.palette_command.build_test_rowcol.build_test.test_mode_toggle.fontList: *hel*-b*-r-*-12-*
*ab_palette_main.palette_command.build_test_rowcol.build_test.test_mode_toggle.background: #8f8f8f
*ab_palette_main.palette_menubar.Help.fontList: *hel*-b*-r-*-12-*=font_1
*ab_palette_main.palette_menubar.File.fontList: *hel*-b*-r-*-12-*=font_1
*ab_palette_main.palette_menubar.Edit.fontList: *hel*-b*-r-*-12-*=font_1
*ab_palette_main.palette_menubar.View.fontList: *hel*-b*-r-*-12-*=font_1
*ab_palette_main.palette_menubar.Layout.fontList: *hel*-b*-r-*-12-*=font_1
*ab_palette_main.palette_menubar.Editors.fontList: *hel*-b*-r-*-12-*=font_1
!*ab_palette_main.palette_menubar*pulldownMenu5.cascadeButton24.fontList: *hel*-b*-r-*-12-*
!*ab_palette_main.palette_menubar*pulldownMenu5.cascadeButton25.fontList: *hel*-b*-r-*-12-*
*ab_palette_main.palette_footer.background: #8f8f8f
*ab_palette_main.palette_footer.footer_row_col.background: #8f8f8f
*ab_palette_main.palette_footer.footer_row_col.obj_name_label.fontList: *hel*-b*-r-*-12-*
*ab_palette_main.palette_footer.footer_row_col.obj_name_label.background: #8f8f8f
*ab_palette_main.palette_footer.footer_row_col.obj_pos_label.fontList: *hel*-b*-r-*-12-*
*ab_palette_main.palette_footer.footer_row_col.obj_pos_label.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.dialog_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.paned_win_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.draw_area_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.row_col_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.drawnButton5.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.sel_box_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.file_chooser_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.drawnButton8.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group3278.button_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group3278.exclusive_choice_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group3278.exclusive_choice_obj.choice_item_obj1.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group3278.exclusive_choice_obj.choice_item_obj2.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group3278.check_box242.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group3278.check_box242.check_choice_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group4279.menu_bar_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group4279.option_menu_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group4279.slider_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group5280.label_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group5280.separator_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group5280.text_field_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group5280.text_field_obj.text_field_label.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.group5280.text_field_obj.text_field_field.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.list_obj.background: #8f8f8f
*ab_palette_main.palette_items_frame.palette_items_form.base_win_obj.background: #8f8f8f
*rev_prop_dialog*prop_label.fontList: *hel*-b*-r-*-12-*
*rev_prop_dialog*prop_menus_button.fontList: *hel*-b*-r-*-12-*
*fixed_prop_dialog*prop_menus_button.fontList: *hel*-b*-r-*-12-*
*fixed_prop_dialog*prop_label.fontList: *hel*-b*-r-*-12-*
*rev_prop_dialog*list_prop_label*fontList: *hel*-b*-r-*-12-*
*fixed_prop_dialog*list_prop_label*fontList: *hel*-b*-r-*-12-*
*rev_prop_dialog*common_form*XmPushButton.fontList: *hel*-b*-r-*-12-*
*fixed_prop_dialog*common_form*XmPushButton.fontList: *hel*-b*-r-*-12-*
*rev_prop_dialog*activate_form*XmPushButton.fontList: *hel*-b*-r-*-12-*
*fixed_prop_dialog*activate_form*XmPushButton.fontList: *hel*-b*-r-*-12-*
!*prop_tearoff_button.fontList: *hel*-b*-r-*-12-*
*ab_help_dialog*XmLabel*fontList: *hel*-b*-r-*-12-*
*ab_help_dialog*XmPushButton*fontList: *hel*-b*-r-*-12-*
*ab_tooltalk_dialog*XmLabel*fontList: *hel*-b*-r-*-12-*
*ab_tooltalk_dialog*XmPushButton*fontList: *hel*-b*-r-*-12-*
!*pathMode: True
*dirTextLabelString: Path
!*showHiddenFiles: False
!
! Font resources for the Connections, Layout and Group Editors
!
*ab_conn_dialog*XmLabel*fontList: *hel*-b*-r-*-12-*
*ab_conn_dialog*XmLabelGadget*fontList: *hel*-b*-r-*-12-*
*ab_conn_dialog*XmPushButton*fontList: *hel*-b*-r-*-12-*
*ab_conn_dialog*XmToggleButton*fontList: *hel*-b*-r-*-12-*
*ablayoutwin*XmLabel*fontList: *hel*-b*-r-*-12-*
*ablayoutwin*XmPushButton*fontList: *hel*-b*-r-*-12-*
*ggpwin112*XmLabel*fontList: *hel*-b*-r-*-12-*
*ggpwin112*XmPushButton*fontList: *hel*-b*-r-*-12-*
! For Titles in Menus
*ab*XmMenuShell*XmRowColumn*XmLabel.fontList: *hel*-b*-r-*-12-*

View File

@@ -0,0 +1,28 @@
######################################################################
#
# action
#
# @(#)AppBuilder 1.1 22 Mar 1994
#
# Common Desktop Environment (CDE)
#
# (c) Copyright 1993, 1994 Hewlett-Packard Company
# (c) Copyright 1993, 1994 International Business Machines Corp.
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
# Novell, Inc.
#
# $XConsortium: AppBuilder /main/3 1995/11/06 17:11:21 rswiston $
#
######################################################################
# This file represents a CDE DT action. The contents of the file do not
# matter; the action will work even if the file is empty. If this file is
# executable and the name of the file matches an entry in the action
# database (*.dt files), the CDE DT File Manager will treat this file as an
# action.
#
# For more information on DT actions, see the CDE DT manuals.
echo "Common Desktop Environment DT action"

View File

@@ -0,0 +1,266 @@
! DTB_USER_RES_START - vvv Add file header below vvv
!
! $XConsortium: Dtbuilder.ad /main/3 1995/11/06 17:11:29 rswiston $
!
! @(#)Dtbuilder.ad 1.2 16 May 1995 cde_app_builder/src/ab
!
! RESTRICTED CONFIDENTIAL INFORMATION:
!
! The information in this document is subject to special
! restrictions in a confidential disclosure agreement between
! HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
! document outside HP, IBM, Sun, USL, SCO, or Univel without
! Sun's specific written approval. This document and all copies
! and derivative works thereof must be returned or destroyed at
! Sun's request.
!
! Copyright 1993 Sun Microsystems, Inc. All rights reserved.
! DTB_USER_RES_END - ^^^ Add file header above ^^^
! File: Dtbuilder
!
! Resource file for application dtbuilder
! This file was generated by dtcodegen, from project dtbuilder
!
! Any text may be added between the DTB_USER_RES_START
! and DTB_USER_RES_END comments. Descriptive comments are
! provided only as an aid.
!
! ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_ COMMENTS. **
! ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
! ** DELETE THE GENERATED COMMENTS! **
!
! All CDE applications should include the standard Dt resource file
#include "Dt"
! Resource list for AppBuilder project dtbuilder
!
! Resource list for AppBuilder module palette
!
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar.File_item.mnemonic: %|nls-3-#F#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar.Edit_item.mnemonic: %|nls-4-#E#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar.View_item.mnemonic: %|nls-5-#V#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar.Layout_item.mnemonic: %|nls-6-#L#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar.Editors_item.mnemonic: %|nls-7-#d#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar.Help_item.mnemonic: %|nls-8-#H#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.New_Project_item.accelerator: %|nls-9-#Ctrl<Key>N#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.New_Project_item.mnemonic: %|nls-10-#N#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.New_Project_item.acceleratorText: %|nls-11-#Ctrl+N#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Open_Project_item.accelerator: %|nls-12-#Ctrl<Key>O#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Open_Project_item.mnemonic: %|nls-13-#O#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Open_Project_item.acceleratorText: %|nls-14-#Ctrl+O#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Save_Project_item.accelerator: %|nls-15-#Ctrl<Key>S#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Save_Project_item.mnemonic: %|nls-16-#S#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Save_Project_item.acceleratorText: %|nls-17-#Ctrl+S#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Save_Project_As_item.accelerator: %|nls-18-#Ctrl<Key>A#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Save_Project_As_item.mnemonic: %|nls-19-#A#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Save_Project_As_item.acceleratorText: %|nls-20-#Ctrl+A#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.New_Module_item.mnemonic: %|nls-21-#M#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Import_Module_item.mnemonic: %|nls-22-#I#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Export_Module_item.mnemonic: %|nls-23-#E#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Code_Generator_item.mnemonic: %|nls-24-#G#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Project_Organizer_item.mnemonic: %|nls-25-#P#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Close_Project_item.mnemonic: %|nls-26-#C#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Exit_item.accelerator: %|nls-27-#Alt<Key>F4#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Exit_item.mnemonic: %|nls-28-#x#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_File_item_file_pulldown.Exit_item.acceleratorText: %|nls-29-#Alt+F4#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Undo_item.accelerator: %|nls-30-#Ctrl<Key>Z#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Undo_item.mnemonic: %|nls-31-#U#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Undo_item.acceleratorText: %|nls-32-#Ctrl+Z#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Cut_item.accelerator: %|nls-33-#Ctrl<Key>X#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Cut_item.mnemonic: %|nls-34-#t#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Cut_item.acceleratorText: %|nls-35-#Ctrl+X#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Copy_item.accelerator: %|nls-36-#Ctrl<Key>C#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Copy_item.mnemonic: %|nls-37-#C#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Copy_item.acceleratorText: %|nls-38-#Ctrl+C#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Paste_item.accelerator: %|nls-39-#Ctrl<Key>V#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Paste_item.mnemonic: %|nls-40-#P#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Paste_item.acceleratorText: %|nls-41-#Ctrl+V#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Edit_item_edit_pulldown.Delete_item.mnemonic: %|nls-42-#D#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_View_item_view_pulldown.Next_Layer_item.mnemonic: %|nls-43-#L#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Properties_item.accelerator: %|nls-44-#Ctrl<Key>I#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Properties_item.mnemonic: %|nls-45-#P#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Properties_item.acceleratorText: %|nls-46-#Ctrl+I#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Help_item.mnemonic: %|nls-47-#H#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Menus_item.mnemonic: %|nls-48-#M#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Connections_item.mnemonic: %|nls-49-#C#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Messages_item.mnemonic: %|nls-50-#e#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Groups_item.mnemonic: %|nls-51-#G#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Attachments_item.mnemonic: %|nls-52-#t#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Drag_and_Drop_item.mnemonic: %|nls-53-#D#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Editors_item_editors_pulldown.Application_Framework_item.mnemonic: %|nls-54-#A#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Help_item_help_pulldown.Overview_item.mnemonic: %|nls-55-#v#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Help_item_help_pulldown.Tasks_item.mnemonic: %|nls-56-#T#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Help_item_help_pulldown.Reference_item.mnemonic: %|nls-57-#R#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Help_item_help_pulldown.On_Item_item.mnemonic: %|nls-58-#O#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Help_item_help_pulldown.Using_Help_item.mnemonic: %|nls-59-#U#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_menubar_Help_item_help_pulldown.About_Application_Builder_item.mnemonic: %|nls-60-#A#|
! Resource list for AppBuilder module about_box
!
! Resource list for AppBuilder module brws
!
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar.Edit_item.mnemonic: %|nls-61-#E#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar.View_item.mnemonic: %|nls-62-#V#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar.Help_item.mnemonic: %|nls-63-#H#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Edit_item_edit_pulldown.Undo_item.mnemonic: %|nls-64-#U#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Edit_item_edit_pulldown.Cut_item.mnemonic: %|nls-65-#u#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Edit_item_edit_pulldown.Copy_item.mnemonic: %|nls-66-#C#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Edit_item_edit_pulldown.Paste_item.mnemonic: %|nls-67-#P#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Edit_item_edit_pulldown.Delete_item.mnemonic: %|nls-68-#D#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Edit_item_edit_pulldown.Close_item.mnemonic: %|nls-69-#C#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_View_item_view_pulldown.Collapse_item.mnemonic: %|nls-70-#C#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_View_item_view_pulldown.Expand_item.mnemonic: %|nls-71-#E#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Help_item_help_pulldown.Overview_item.mnemonic: %|nls-72-#v#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Help_item_help_pulldown.Tasks_item.mnemonic: %|nls-73-#T#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Help_item_help_pulldown.Reference_item.mnemonic: %|nls-74-#R#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Help_item_help_pulldown.On_Item_item.mnemonic: %|nls-75-#O#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Help_item_help_pulldown.Using_Help_item.mnemonic: %|nls-76-#U#|
Dtbuilder*dtb_brws_mainwindow_mainwin*menubar_Help_item_help_pulldown.About_Application_Builder_item.mnemonic: %|nls-77-#A#|
! Resource list for AppBuilder module proj
!
Dtbuilder*dtb_proj_proj_main_mainwin*menubar.Project_item.mnemonic: %|nls-78-#P#|
Dtbuilder*dtb_proj_proj_main_mainwin*menubar.Module_item.mnemonic: %|nls-79-#M#|
Dtbuilder*dtb_proj_proj_main_mainwin*menubar.Help_item.mnemonic: %|nls-80-#H#|
Dtbuilder*dtb_proj_proj_main_mainwin*menubar_Help_item_proj_help_menu.Overview_item.mnemonic: %|nls-81-#v#|
Dtbuilder*dtb_proj_proj_main_mainwin*menubar_Help_item_proj_help_menu.Tasks_item.mnemonic: %|nls-82-#T#|
Dtbuilder*dtb_proj_proj_main_mainwin*menubar_Help_item_proj_help_menu.Reference_item.mnemonic: %|nls-83-#R#|
Dtbuilder*dtb_proj_proj_main_mainwin*menubar_Help_item_proj_help_menu.On_Item_item.mnemonic: %|nls-84-#O#|
Dtbuilder*dtb_proj_proj_main_mainwin*menubar_Help_item_proj_help_menu.Using_Help_item.mnemonic: %|nls-85-#U#|
Dtbuilder*dtb_proj_proj_main_mainwin*menubar_Help_item_proj_help_menu.About_Application_Builder_item.mnemonic: %|nls-86-#A#|
! Resource list for AppBuilder module cgen_win
!
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar.File_item.mnemonic: %|nls-87-#F#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar.Options_item.mnemonic: %|nls-88-#O#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar.Help_item.mnemonic: %|nls-89-#H#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_File_item_file_pulldown.Make_Run_item.mnemonic: %|nls-90-#k#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_File_item_file_pulldown.Generate_Code_item.mnemonic: %|nls-91-#G#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_File_item_file_pulldown.Make_item.mnemonic: %|nls-92-#M#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_File_item_file_pulldown.Run_item.mnemonic: %|nls-93-#R#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_File_item_file_pulldown.Abort_item.mnemonic: %|nls-94-#A#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_File_item_file_pulldown.CD_to_Project_item.mnemonic: %|nls-95-#D#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_File_item_file_pulldown.Close_item.mnemonic: %|nls-96-#C#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*file_pulldown_Generate_Code_item_generate_menu2.According_to_Options_item.mnemonic: %|nls-97-#A#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*file_pulldown_Generate_Code_item_generate_menu2.Entire_Project_item.mnemonic: %|nls-98-#E#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_Options_item_options_pulldown.Generator_item.mnemonic: %|nls-99-#G#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_Options_item_options_pulldown.Environment_item.mnemonic: %|nls-100-#E#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_Help_item_help_pulldown.Overview_item.mnemonic: %|nls-101-#v#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_Help_item_help_pulldown.Tasks_item.mnemonic: %|nls-102-#T#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_Help_item_help_pulldown.Reference_item.mnemonic: %|nls-103-#R#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_Help_item_help_pulldown.On_Item_item.mnemonic: %|nls-104-#O#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_Help_item_help_pulldown.Using_Help_item.mnemonic: %|nls-105-#U#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*menubar_Help_item_help_pulldown.About_Application_Builder_item.mnemonic: %|nls-106-#A#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*output_termp.subprocessCmd: %|nls-107-#/bin/cat#|
Dtbuilder*dtb_cgen_win_mainwindow_mainwin*input_termp.subprocessCmd: %|nls-108-#/bin/csh#|
! Resource list for AppBuilder module conn
!
! Resource list for AppBuilder module appfw
!
! Resource list for AppBuilder module color_chooser
!
! Resource list for AppBuilder module dnd_ed
!
! Resource list for AppBuilder module help_ed
!
! Resource list for AppBuilder module attch_ed
!
! Resource list for AppBuilder module revolv
!
! Resource list for AppBuilder module button
!
! Resource list for AppBuilder module choice
!
! Resource list for AppBuilder module combobox
!
! Resource list for AppBuilder module cpanel
!
! Resource list for AppBuilder module custdlg
!
! Resource list for AppBuilder module drawp
!
! Resource list for AppBuilder module group
!
! Resource list for AppBuilder module label
!
! Resource list for AppBuilder module list
!
! Resource list for AppBuilder module mainwin
!
! Resource list for AppBuilder module menu
!
! Resource list for AppBuilder module menubar
!
! Resource list for AppBuilder module scale
!
! Resource list for AppBuilder module sep
!
! Resource list for AppBuilder module spinbox
!
! Resource list for AppBuilder module termp
!
! Resource list for AppBuilder module textf
!
! Resource list for AppBuilder module textp
!
! Resource list for AppBuilder module cgen_props
!
! Resource list for AppBuilder module cgen_env
!
! Resource list for AppBuilder module fchooser
!
! Resource list for AppBuilder module message_ed
!
! Resource list for AppBuilder module panedwin_ed
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! The remainder of this file (following this comment) may be modified.
! Add new resources or override values defined above.
!
! DTB_USER_RES_START
!
! App Builder resource settings
!
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_cpanel*fontList: %|nls-1-#-adobe-helvetica-bold-r-normal--12-*-*-*-*-*-*-*:#|
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_footer*fontList: %|nls-2-#-adobe-helvetica-bold-r-normal--12-*-*-*-*-*-*-*:#|

View File

@@ -0,0 +1,49 @@
! DTB_USER_RES_START - vvv Add file header below vvv
!
! $XConsortium: Dtbuilder.src /main/3 1995/11/06 17:11:40 rswiston $
!
! @(#)Dtbuilder 1.41 05 May 1995 cde_app_builder/src/ab
!
! RESTRICTED CONFIDENTIAL INFORMATION:
!
! The information in this document is subject to special
! restrictions in a confidential disclosure agreement between
! HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
! document outside HP, IBM, Sun, USL, SCO, or Univel without
! Sun's specific written approval. This document and all copies
! and derivative works thereof must be returned or destroyed at
! Sun's request.
!
! Copyright 1993 Sun Microsystems, Inc. All rights reserved.
! DTB_USER_RES_END - ^^^ Add file header above ^^^
! File: Dtbuilder
!
! Resource file for application dtbuilder
! This file was generated by dtcodegen, from project dtbuilder
!
! Any text may be added between the DTB_USER_RES_START
! and DTB_USER_RES_END comments. Descriptive comments are
! provided only as an aid.
!
! ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_ COMMENTS. **
! ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
! ** DELETE THE GENERATED COMMENTS! **
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! The remainder of this file (following this comment) may be modified.
! Add new resources or override values defined above.
!
! DTB_USER_RES_START
!
! App Builder resource settings
!
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_cpanel*fontList: -adobe-helvetica-bold-r-normal--12-*-*-*-*-*-*-*:
Dtbuilder*dtb_palette_ab_palette_main_mainwin*palette_footer*fontList: -adobe-helvetica-bold-r-normal--12-*-*-*-*-*-*-*:

View File

@@ -0,0 +1,346 @@
XCOMM $TOG: Imakefile /main/19 1999/03/29 09:33:27 mgreess $
XCOMM
XCOMM RESTRICTED CONFIDENTIAL INFORMATION:
XCOMM
XCOMM The information in this document is subject to special
XCOMM restrictions in a confidential disclosure agreement between
XCOMM HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
XCOMM document outside HP, IBM, Sun, USL, SCO, or Univel without
XCOMM Sun's specific written approval. This document and all copies
XCOMM and derivative works thereof must be returned or destroyed at
XCOMM Sun's request.
XCOMM
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1996 International Business Machines Corp.
XCOMM (c) Copyright 1993,1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
/*
* Since dtcodegen depends on libXm, libDtWidget, and other libs,
* it will not be built properly during make includes.
* So, when 'all' is made in this directory, redo make includes/depend.
* An imake hack no doubt, but it is necessary for now.
*/
all:: generated_includes depend
#include "../ab.tmpl"
#include "../ab.rules"
INCLUDES = -I. -I$(ABINCLUDES)
DEFINES = -DPIXMAP_WORKAROUND
#ifndef GeneratedUISource
#define GeneratedUISource(macro, suffix) @@\
macro = \ @@\
Concat(dtb_utils,suffix) \ @@\
Concat(appfw_ui,suffix) \ @@\
Concat(brws_ui,suffix) \ @@\
Concat(color_chooser_ui,suffix) \ @@\
Concat(conn_ui,suffix) \ @@\
Concat(dnd_ed_ui,suffix) \ @@\
Concat(help_ed_ui,suffix) \ @@\
Concat(attch_ed_ui,suffix) \ @@\
Concat(proj_ui,suffix) \ @@\
Concat(revolv_ui,suffix) \ @@\
Concat(button_ui,suffix) \ @@\
Concat(choice_ui,suffix) \ @@\
Concat(combobox_ui,suffix) \ @@\
Concat(cpanel_ui,suffix) \ @@\
Concat(custdlg_ui,suffix) \ @@\
Concat(drawp_ui,suffix) \ @@\
Concat(group_ui,suffix) \ @@\
Concat(label_ui,suffix) \ @@\
Concat(list_ui,suffix) \ @@\
Concat(mainwin_ui,suffix) \ @@\
Concat(menu_ui,suffix) \ @@\
Concat(menubar_ui,suffix) \ @@\
Concat(scale_ui,suffix) \ @@\
Concat(sep_ui,suffix) \ @@\
Concat(spinbox_ui,suffix) \ @@\
Concat(termp_ui,suffix) \ @@\
Concat(textf_ui,suffix) \ @@\
Concat(textp_ui,suffix) \ @@\
Concat(cgen_win_ui,suffix) \ @@\
Concat(cgen_props_ui,suffix) \ @@\
Concat(cgen_env_ui,suffix) \ @@\
Concat(fchooser_ui,suffix) \ @@\
Concat(message_ed_ui,suffix) \ @@\
Concat(panedwin_ed_ui,suffix) \ @@\
Concat(palette_ui,suffix) \ @@\
Concat(about_box_ui,suffix)
#endif
GeneratedUISource(TARGETS.h,.h)
GeneratedUISource(TARGETS.c,.c)
GeneratedUISource(TARGETS.o,.o)
TARGETS.h.merged = \
dtbuilder.h
#ifndef GeneratedStubsSource
#define GeneratedStubsSource(macro, suffix) @@\
macro = \ @@\
Concat(appfw_stubs,suffix) \ @@\
Concat(brws_stubs,suffix) \ @@\
Concat(color_chooser_stubs,suffix) \ @@\
Concat(conn_stubs,suffix) \ @@\
Concat(dnd_ed_stubs,suffix) \ @@\
Concat(help_ed_stubs,suffix) \ @@\
Concat(attch_ed_stubs,suffix) \ @@\
Concat(proj_stubs,suffix) \ @@\
Concat(revolv_stubs,suffix) \ @@\
Concat(button_stubs,suffix) \ @@\
Concat(choice_stubs,suffix) \ @@\
Concat(combobox_stubs,suffix) \ @@\
Concat(cpanel_stubs,suffix) \ @@\
Concat(custdlg_stubs,suffix) \ @@\
Concat(drawp_stubs,suffix) \ @@\
Concat(group_stubs,suffix) \ @@\
Concat(label_stubs,suffix) \ @@\
Concat(list_stubs,suffix) \ @@\
Concat(mainwin_stubs,suffix) \ @@\
Concat(menu_stubs,suffix) \ @@\
Concat(menubar_stubs,suffix) \ @@\
Concat(scale_stubs,suffix) \ @@\
Concat(sep_stubs,suffix) \ @@\
Concat(spinbox_stubs,suffix) \ @@\
Concat(termp_stubs,suffix) \ @@\
Concat(textf_stubs,suffix) \ @@\
Concat(textp_stubs,suffix) \ @@\
Concat(cgen_win_stubs,suffix) \ @@\
Concat(cgen_props_stubs,suffix) \ @@\
Concat(cgen_env_stubs,suffix) \ @@\
Concat(fchooser_stubs,suffix) \ @@\
Concat(message_ed_stubs,suffix) \ @@\
Concat(palette_stubs,suffix) \ @@\
Concat(about_box_stubs,suffix)
#endif
GeneratedStubsSource(TARGETS.c.stubs,.c)
GeneratedStubsSource(TARGETS.o.stubs,.o)
TARGETS.c.merged = \
dtbuilder.c \
$(TARGETS.c.stubs)
SOURCES.h = $(TARGETS.h.merged) $(TARGETS.h)
SOURCES.c = $(TARGETS.c.merged) $(TARGETS.c)
SOURCES.h.shipped =
SOURCES.h.shared = \
$(TARGETS.h) \
ab.h \
ab_resources.h \
ab_utils.h \
abobj.h \
abobj_edit.h \
abobj_list.h \
abobj_set.h \
abobjP.h \
ab_bil.h \
ab_dnd.h \
appfw.h \
attch_ed.h \
brws.h \
brwsP.h \
cgen.h \
color_chooser.h \
conn.h \
connP.h \
dtbuilder.h \
help.h \
message.h \
pal.h \
proj.h \
projP.h \
prop.h \
propP.h \
tmode.h \
tmodeP.h \
ui_util.h \
vwr.h \
x_util.h
SOURCES.h.unshared = \
abobjP.h
SOURCES.msg = \
dtbuilder.msg \
../libAButil/libAButil.msg \
../libABobjXm/libABobjXm.msg \
../libABil/libABil.msg
#ifndef UngeneratedSource
#define UngeneratedSource(macro, suffix) @@\
macro = \ @@\
Concat(ab_utils,suffix) \ @@\
Concat(ab_bil,suffix) \ @@\
Concat(ab_dnd,suffix) \ @@\
Concat(ab_globals,suffix) \ @@\
Concat(abobj_align,suffix) \ @@\
Concat(abobj_edit,suffix) \ @@\
Concat(abobj_list,suffix) \ @@\
Concat(abobj_events,suffix) \ @@\
Concat(abobj_layers,suffix) \ @@\
Concat(abobj_layout,suffix) \ @@\
Concat(abobj_menu,suffix) \ @@\
Concat(abobj_move,suffix) \ @@\
Concat(abobj_resize,suffix) \ @@\
Concat(abobj_select,suffix) \ @@\
Concat(abobj_set,suffix) \ @@\
Concat(abobj_util,suffix) \ @@\
Concat(brws,suffix) \ @@\
Concat(brws_find,suffix) \ @@\
Concat(brws_mthds,suffix) \ @@\
Concat(brws_utils,suffix) \ @@\
Concat(cgen_utils,suffix) \ @@\
Concat(conn_drag,suffix) \ @@\
Concat(conn_interpret,suffix) \ @@\
Concat(conn_obj,suffix) \ @@\
Concat(dtbuilder,suffix) \ @@\
Concat(pal,suffix) \ @@\
Concat(pal_create,suffix) \ @@\
Concat(pal_button,suffix) \ @@\
Concat(pal_choice,suffix) \ @@\
Concat(pal_combobox,suffix) \ @@\
Concat(pal_cpanel,suffix) \ @@\
Concat(pal_custdlg,suffix) \ @@\
Concat(pal_drawp,suffix) \ @@\
Concat(pal_fchooser,suffix) \ @@\
Concat(pal_group,suffix) \ @@\
Concat(pal_label,suffix) \ @@\
Concat(pal_list,suffix) \ @@\
Concat(pal_mainwin,suffix) \ @@\
Concat(pal_menu,suffix) \ @@\
Concat(pal_menubar,suffix) \ @@\
Concat(pal_panedwin,suffix) \ @@\
Concat(pal_scale,suffix) \ @@\
Concat(pal_sep,suffix) \ @@\
Concat(pal_spinbox,suffix) \ @@\
Concat(pal_termp,suffix) \ @@\
Concat(pal_textf,suffix) \ @@\
Concat(pal_textp,suffix) \ @@\
Concat(proj,suffix) \ @@\
Concat(proj_utils,suffix) \ @@\
Concat(projP_utils,suffix) \ @@\
Concat(prop,suffix) \ @@\
Concat(prop_items,suffix) \ @@\
Concat(tmode,suffix) \ @@\
Concat(tmodeP,suffix) \ @@\
Concat(ui_msg,suffix) \ @@\
Concat(ui_list,suffix) \ @@\
Concat(ui_util,suffix) \ @@\
Concat(vwr,suffix) \ @@\
Concat(x_util,suffix)
#endif
UngeneratedSource(NONTGTS.c,.c)
UngeneratedSource(NONTGTS.o,.o)
SRCS = $(TARGETS.c) $(TARGETS.c.stubs) $(NONTGTS.c)
OBJS = $(TARGETS.o) $(TARGETS.o.stubs) $(NONTGTS.o)
SYS_LIBRARIES = -lm $(ICONVSYSLIB) $(DYNLIBSYSLIB) $(REGEXSYSLIB)
#ifdef SunArchitecture
WAITTARGET = .WAIT
#endif /* SunArchitecture */
PROGRAMS = dtbuilder
LINTLIBS = $(XINPUTLIB) $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) $(XTOOLLIB) $(XLIB)
/* DEPLIBS contains the list of library depencies for a client.
* LOCAL_LIBRARIES contains the list of libraries on the link line.
* Generally, the dependency form of a library has DEP as a prefix.
* e.g. put $(XLIB) in LOCAL_LIBRARIES and $(DEPXLIB) in DEPLIBS.
* NOTE: if DEPLIBS is not set here, it is by default null and there
* are no library dependencies for clients.
* You cannot put -Llibpath into DEPLIBS. You must put actual
* paths to the library.
*/
DEPLIBS = ../libABil/libABil.a ../libABobjXm/libABobjXm.a \
../libABobj/libABobj.a ../libAButil/libAButil.a $(DEPDTWIDGETLIB) \
$(DEPDTTERMLIB) $(DEPDTHELPLIB) $(DEPDTSVCLIB) $(DEPTTLIB) \
$(DEPUILLIB) $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
LOCAL_LIBRARIES = ../libABil/libABil.a ../libABobjXm/libABobjXm.a \
../libABobj/libABobj.a ../libAButil/libAButil.a \
$(DTWIDGETLIB) $(DTTERMLIB) $(DTHELPLIB) $(DTSVCLIB) \
$(TTLIB) $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB)
$(OBJS): $(SOURCES.h)
XCOMM dtcodegen wants to rewrite some files, so we make copies for it.
dtbuilder.msg: dtbuilder.msg.src
$(CP) $? $@ && chmod ug+w $@
dtbuilder.c: dtbuilder.c.src
$(CP) $? $@ && chmod ug+w $@
includes:: dtbuilder.msg dtbuilder.c
ComplexProgramTarget(dtbuilder)
AbMessageCatalogTarget(dtbuilder)
XCOMM Try to replace the original dtbuilder.msg.src file if necessary.
all:: dtbuilder dtbuilder.cat
clean::
$(RM) $(TARGETS.h) $(TARGETS.c) .dtcodegen.log *.delta dtbuilder.c dtbuilder.msg
CppSourceFile(Dtbuilder,Dtbuilder.src,$(LOCAL_CPP_DEFINES),)
LinkFileList(generated_includes,$(SOURCES.h.shared),../include/ab_private,../../ab)
XCOMM includes:: generated_includes
sdtgilcvt:
#ifdef SunArchitecture
dtbuilder.h + dtb_utils.c + dtb_utils.h:: dtbuilder.bip dtbuilder.c dtbuilder.msg
$(DTCODEGEN) -changed -merge -p dtbuilder.bip -main
dtbuilder.o: dtbuilder.c dtbuilder.bip $(TARGETS.h) $(TARGETS.h.merged)
#else
dtbuilder.h dtb_utils.c dtb_utils.h:: dtbuilder.bip dtbuilder.c dtbuilder.msg
$(DTCODEGEN) -changed -merge -p dtbuilder.bip -main
dtbuilder.o: dtbuilder.c dtbuilder.bip $(TARGETS.h) $(TARGETS.h.merged)
#endif
PROJFILE = dtbuilder
BilTarget(about_box)
BilTarget(appfw)
BilTarget(attch_ed)
BilTarget(brws)
BilTarget(button)
BilTarget(cgen_env)
BilTarget(cgen_props)
BilTarget(cgen_win)
BilTarget(choice)
BilTarget(color_chooser)
BilTarget(combobox)
BilTarget(conn)
BilTarget(cpanel)
BilTarget(custdlg)
BilTarget(dnd_ed)
BilTarget(drawp)
BilTarget(fchooser)
BilTarget(group)
BilTarget(help_ed)
BilTarget(label)
BilTarget(list)
BilTarget(mainwin)
BilTarget(menu)
BilTarget(menubar)
BilTarget(message_ed)
BilTarget(palette)
BilTarget(panedwin_ed)
BilTarget(proj)
BilTarget(revolv)
BilTarget(scale)
BilTarget(sep)
BilTarget(spinbox)
BilTarget(termp)
BilTarget(textf)
BilTarget(textp)

View File

@@ -0,0 +1,106 @@
text = LOAD ?RXO;
text : .text%termp_prop_load : pal_termp.o;
text : .text%abobj_undo : abobj_edit.o;
text : .text%layout_offset_create : layout_ui.o;
text : .text%layout_of_object_create : layout_ui.o;
text : .text%layout_to_choice_create : layout_ui.o;
text : .text%process_chord_extend : conn_drag.o;
text : .text%textTransferCB : ab_dnd.o;
text : .text%abobj_copy : abobj_edit.o;
text : .text%distribute_vertical : abobj_align.o;
text : .text%get_when_label : conn_obj.o;
text : .text%setup_drag : conn_drag.o;
text : .text%layout_attach_type_choice_create : layout_ui.o;
text : .text%layout_right_attach_create : layout_ui.o;
text : .text%connP_set_source_type : conn_obj.o;
text : .text%layout_percentage_create : layout_ui.o;
text : .text%select_connection : conn.o;
text : .text%layout_dialog_initialize : layout_ui.o;
text : .text%layout_obj_list_create : layout_ui.o;
text : .text%abobj_get_greatest_size : abobj_util.o;
text : .text%termp_prop_init : pal_termp.o;
text : .text%abobj_show_next_layer : abobj_layers.o;
text : .text%brws_set_module_name : brws_utils.o;
text : .text%conn_connect_button_create : conn_ui.o;
text : .text%conn_action_type_execute_code_item_CB3 : conn_stubs.o;
text : .text%connP_update_on_obj_destroy : conn.o;
text : .text%connP_change_in_builtin : conn_obj.o;
text : .text%dtb_set_label_pixmaps : dtbuilder.o;
text : .text%layout_help_button_create : layout_ui.o;
text : .text%conn_source_choices_create : conn_ui.o;
text : .text%abobj_force_dang_form_resize : abobj_util.o;
text : .text%obj_verify : ../libABobj/libABobj.a(obj_utils.o);
text : .text%update_cur_src : conn.o;
text : .text%draw_viewer : brws.o;
text : .text%conn_conn_dialog_initialize : conn_ui.o;
text : .text%resolve_layout : abobj_edit.o;
text : .text%set_undo_rec : abobj_edit.o;
text : .text%conn_target_choices_create : conn_ui.o;
text : .text%dtb_cvt_file_to_pixmap : dtbuilder.o;
text : .text%get_menu_item_refs : conn_interpret.o;
text : .text%layout_bottom_attach_create : layout_ui.o;
text : .text%conn_source_group_create : conn_ui.o;
text : .text%find_win_match : conn_drag.o;
text : .text%conn_change_button_create : conn_ui.o;
text : .text%conn_source_list_create : conn_ui.o;
text : .text%conn_drag_chord : conn_drag.o;
text : .text%browser_toggle_select : brws.o;
text : .text%get_cur_when : conn.o;
text : .text%get_cur_act : conn.o;
text : .text%termp_prop_clear : pal_termp.o;
text : .text%browser_popup_menu : brws.o;
text : .text%istr_dup : ../libAButil/libAButil.a(istr.o);
text : .text%aob_select : brws_utils.o;
text : .text%group_prop_init : pal_group.o;
text : .text%abobjP_move_object_outline : abobj_move.o;
text : .text%connP_change_connection : conn.o;
text : .text%conn_conn_dialog_create : conn_ui.o;
text : .text%conn_view_choices_create : conn_ui.o;
text : .text%choice_prop_init : pal_choice.o;
text : .text%textf_prop_init : pal_textf.o;
text : .text%abobj_popup_menu : abobj_menu.o;
text : .text%object_mselect_release : abobj_events.o;
text : .text%connP_get_act_labels : conn_obj.o;
text : .text%conn_delete_button_create : conn_ui.o;
text : .text%get_stdact_label : conn_obj.o;
text : .text%ui_preview_object : conn_drag.o;
text : .text%abobj_set_min_value : abobj_set.o;
text : .text%abobj_set_save_needed : abobj_set.o;
text : .text%connP_guess_when_action : conn_obj.o;
text : .text%is_descendant : conn_obj.o;
text : .text%abobj_set_read_only : abobj_set.o;
text : .text%attach_interpretation : conn_interpret.o;
text : .text%conn_disable_action_interpret : conn_interpret.o;
text : .text%abobj_paste : abobj_edit.o;
text : .text%turnoff_changebars : pal_graphp.o;
text : .text%align_left_edges : abobj_align.o;
text : .text%verify_props : pal_graphp.o;
text : .text%abobj_dup_tree : abobj_util.o;
text : .text%termp_prop_apply : pal_termp.o;
text : .text%conn_view_sep_create : conn_ui.o;
text : .text%compute_node : brws_mthds.o;
text : .text%abobj_move : abobj_move.o;
text : .text%conn_conn_list_create : conn_ui.o;
text : .text%verify_clipboard_space : abobj_edit.o;
text : .text%menubar_prop_init : pal_menubar.o;
text : .text%menubar_prop_activate : pal_menubar.o;
text : .text%menubar_prop_load : pal_menubar.o;
text : .text%separator_prop_init : pal_separator.o;
text : .text%separator_initialize : pal_separator.o;
text : .text%separator_prop_activate : pal_separator.o;
text : .text%separator_prop_load : pal_separator.o;
text : .text%separator_prop_apply : pal_separator.o;
text : .text%verify_props : pal_separator.o;
text : .text%turnoff_changebars : pal_slider.o;
text : .text%spinbox_prop_init : pal_spinbox.o;
text : .text%spinbox_prop_clear : pal_spinbox.o;
text : .text%spinbox_prop_apply : pal_spinbox.o;
text : .text%verify_props : pal_spinbox.o;
text : .text%termp_initialize : pal_termp.o;
text : .text%objxm_file_to_pixmap : ../libABobjXm/libABobjXm.a(objxm_util.o);
text : .text%turnoff_changebars : pal_textp.o;
text : .text%obj_set_name : ../libABobj/libABobj.a(obj_fields.o);
text : .text%AByyparse : ../libABil/libABil.a(bil_parse.o);
text : .text%bilP_load_att_hoffset : ../libABil/libABil.a(bil_loadatt.o);
text : .text%abobj_ungroup_selected_objects : pal_group.o;
text : .text%abobjP_find_resize_direction : abobj_resize.o;

View File

@@ -0,0 +1,33 @@
#
# $XConsortium: README /main/3 1995/11/06 17:12:11 rswiston $
#
# %W% %G% cde_app_builder/src/ab
#
# RESTRICTED CONFIDENTIAL INFORMATION:
#
# The information in this document is subject to special
# restrictions in a confidential disclosure agreement between
# HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
# document outside HP, IBM, Sun, USL, SCO, or Univel without
# Sun's specific written approval. This document and all copies
# and derivative works thereof must be returned or destroyed at
# Sun's request.
#
# Copyright 1993 Sun Microsystems, Inc. All rights reserved.
#
#
For running the AppBuilder (ab), do the following:
--------------------------------------------------
1. setenv XAPPLRESDIR to
<AB_WORK_SPACE>/cose/unity1/cde_app_builder/src/ab
2. (optional) setenv XENVIRONMENT to
<AB_WORK_SPACE>/cose/unity1/cde_app_builder/src/ab/Ab
Do this only if you plan to use the app-builder from
another directory.
3. The executible is called ab.

View File

@@ -0,0 +1,24 @@
XCOMM $XConsortium: README.src /main/3 1996/04/23 20:03:38 drk $
Executable: ab
Description: Application Builder Front-end
-------------------------------------------------------
-------------------------------------------------------
Module Prefix Description
------ ------ -----------------------
AB objects abobj_ AB object manipulation
Palette pal_ AB palette object functions
Browser brws_ AB Browser
Connections conn_ AB Connection manager
Group group_ aB Group editor
Layout layout_ AB Layout editor
Projects proj_ AB Project manager
Properties prop_ AB Property Dialog editors
Help help_ AB Help editor
ToolTalk ttalk_ AB ToolTalk editor
CodeGenerator cgen_ AB Code generator interface
X-Utilities x_ AB X11 utility functions
UI-Utilities ui_ AB User-interface utilities

View File

@@ -0,0 +1,82 @@
/*
* $XConsortium: ab.h /main/3 1995/11/06 17:12:23 rswiston $
*
* @(#)ab.h 1.49 94/07/31 Copyright 1993 Sun Microsystems
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* ab.h
*/
#ifndef _AB_H_
#define _AB_H_
#include <Xm/Xm.h>
#include <nl_types.h> /* Necessary for message I18N */
#include <ab_private/obj.h>
#include <ab_private/vwr.h>
#include <ab_private/ab_utils.h>
#include <Dt/Dt.h> /* for version information */
#define MODE_BUILD 1
#define MODE_TEST_SHOWN 2
#define MODE_TEST_PROJ 3
/*
* Determine the version string
*/
#ifdef SDtVERSION_STRING
#define AbVERSION_STRING SDtVERSION_STRING
#elif defined DtVERSION_STRING
#define AbVERSION_STRING DtVERSION_STRING
#else
#define AbVERSION_STRING "CDE Version Unknown"
#endif
extern ABObj AB_project;
extern ABObj AB_cur_module;
extern int AB_builder_mode;
extern Widget AB_toplevel;
extern Widget AB_cgen_win;
extern Widget AB_proj_window;
extern Widget AB_generic_chooser;
extern Widget AB_appfw_dialog;
extern Widget AB_attch_ed_dialog;
extern Widget AB_cgen_env_dialog;
extern Widget AB_cgen_prop_dialog;
extern Widget AB_conn_dialog;
extern Widget AB_dnd_dialog;
extern Widget AB_help_dialog;
extern Widget AB_layout_dialog;
extern Widget AB_msgEd_dialog;
extern Widget AB_rev_prop_dialog;
extern Vwr Proj_viewer;
extern XrmDatabase AB_db;
extern Boolean AB_btn1_transfer;
extern int AB_BMenu;
/* Needed for message I18N */
extern nl_catd Dtb_project_catd;
#endif /* _AB_H_ */

View File

@@ -0,0 +1,599 @@
/*
* $XConsortium: ab_bil.c /main/3 1995/11/06 17:12:37 rswiston $
*
* @(#)ab_bil.c 1.85 22 May 1995
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* File: ab_bil.c - functions dealing with bil files
*/
#include <stdio.h>
#include <sys/times.h>
#include <time.h>
#include <sys/param.h> /* MAXPATHLEN */
#include <errno.h>
#include <ab_private/obj.h>
#include <ab_private/trav.h>
#include <ab_private/bil.h>
#include <ab_private/objxm.h>
#include <ab_private/abobj.h>
#include <ab_private/abobj_set.h>
#include <ab_private/brws.h>
#include <ab_private/proj.h>
#include <ab_private/conn.h>
#include <ab_private/ui_util.h>
#include <ab_private/ab.h>
#include <ab_private/ab_bil.h>
#include "../libABobj/objP.h"
#include "palette_ui.h"
/* REMIND: #ifdef DEBUG */
typedef struct
{
double startSeconds;
double endSeconds;
double elapsedSeconds;
} ABTimedIntervalRec, *ABTimedInterval;
typedef struct
{
ABTimedIntervalRec realTime;
ABTimedIntervalRec CPUTime;
} ABProfiledIntervalRec, *ABProfiledInterval;
static int get_cur_times(double *realTimeOut, double *cpuTimeOut);
static int get_start_times(ABProfiledInterval);
static int get_end_times(ABProfiledInterval);
static int calc_elapsed_times(ABProfiledInterval);
static int print_load_stats(
ABObj tree,
ABProfiledInterval totalTime,
ABProfiledInterval loadTime,
ABProfiledInterval configTime
);
char Buf[MAXPATHLEN]; /* Work buffer */
/*
* Loads in a new project, replacing the current project.
* Chdirs to the directory where the project is. Called
* from the 'File->Open Project' and 'Project->Open'
* (Project Organizer) menus, and the cmd-line (dtbuilder.c).
*/
int
ab_load_bil_file(
STRING fileName,
FILE *inFile,
BOOL BufferDrop
)
{
int rc = 0; /* return code */
ABObj newProject = NULL;
ABObj mod = NULL;
STRING init_msg = NULL;
STRING modfile = NULL;
int pLinesRead = 0;
ABProfiledIntervalRec totalTime;
ABProfiledIntervalRec loadTime;
ABProfiledIntervalRec configTime;
XmString xm_buf = (XmString) NULL;
int NoWrite = 0;
int len = 0;
STRING errmsg = NULL;
BOOL read_OK, write_OK;
AB_TRAVERSAL trav;
get_start_times(&totalTime);
get_start_times(&loadTime);
rc = bil_load_file_and_resolve_all(fileName, inFile, &newProject);
if (newProject == NULL)
{
return rc;
}
/* If BufferDrop is TRUE, then that means that
* ab_load_bil_file() is being called due to
* a buffer drop (i.e. a .bix dtmail attachment).
* In that case, we don't need to check whether
* the modules are read-only, since there aren't
* .bil files associated with the modules.
*/
if (!BufferDrop)
{
/* Check if any of the modules are read-only. If so, post
* a message.
*/
for (trav_open(&trav, newProject, AB_TRAV_MODULES);
(mod = trav_next(&trav)) != NULL; )
{
if (!obj_is_defined(mod))
{
continue;
}
modfile = obj_get_file(mod);
abio_access_file(modfile, &read_OK, &write_OK);
if (!write_OK && !util_strempty(modfile))
{
obj_set_read_only(mod, TRUE);
len = len + strlen(modfile) + 2;
/*
** Is this the first read-only file we've encountered?
** If so, initialize the notice message.
*/
if (NoWrite == 0)
{
/* The first thing in the message is
* some general text.
*/
init_msg = catgets(Dtb_project_catd, 100, 38, "The following modules are read-only.\nIf you edit these modules, you\nwill not be able to save your edits.");
/* If we have an old buffer lying around, free it */
if (errmsg != (STRING) NULL)
util_free(errmsg);
/* Now create a new buffer of the proper size */
len = strlen(init_msg) + strlen(modfile) + 3;
errmsg = (STRING) util_malloc(len);
/*
** Put the general text plus name of the first
** read-only file into the notice message.
*/
sprintf(errmsg, "%s\n\n%s", init_msg, modfile);
}
else
{
errmsg = (STRING) realloc(errmsg, len);
strcat(errmsg, "\n");
strcat(errmsg, modfile);
}
NoWrite++;
}
}
}
if (!util_strempty(errmsg))
{
util_set_help_data(catgets(Dtb_project_catd, 100, 92,
"Any changes made to a read-only module cannot be saved,\nunless you save the module to a different file name."),
NULL, NULL);
util_puts(errmsg);
util_free(errmsg);
}
get_end_times(&loadTime);
if( obj_get_num_children(newProject) == 0 )
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 23,
"%s: Empty project file loaded."), fileName);
xm_buf = XmStringCreateLocalized(Buf);
dtb_palette_empty_proj_msg_initialize(&dtb_palette_empty_proj_msg);
(void)dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_palette_empty_proj_msg, xm_buf, NULL, NULL);
XmStringFree(xm_buf);
}
if (util_get_verbosity() >= 5)
obj_tree_print(newProject);
/* Destroy the old project, first. Then initialize
* the project to be the one just created. This
* also sets the current module to NULL, since a
* module has not been shown yet.
*/
proj_destroy_project(proj_get_project());
proj_set_project(newProject);
/* REMIND: Check this out later */
get_start_times(&configTime);
objxm_tree_configure(newProject, OBJXM_CONFIG_BUILD);
get_end_times(&configTime);
abobj_update_proj_name(newProject);
abobj_update_palette_title(newProject);
obj_tree_update_clients(newProject);
#ifdef DEBUG
get_end_times(&totalTime);
print_load_stats(newProject, &totalTime, &loadTime, &configTime);
#endif /* DEBUG */
return 0;
}
int
ab_import_bil_file(
STRING fileName,
FILE *inFile,
BOOL ImportByCopy
)
{
int return_value = 0;
AB_TRAVERSAL trav;
ABObj project = proj_get_project();
ABObj module = NULL;
ABObjList loaded_comp_objs = NULL;
ABObj loaded_module = NULL;
STRING file = NULL;
/*
* XmConfigured flags is not getting set properly. If it's already
* here, we'll assume it's configured.
*/
for (trav_open(&trav, project, AB_TRAV_MODULES);
(module= trav_next(&trav)) != NULL; )
{
obj_set_flag(module, XmConfiguredFlag);
}
trav_close(&trav);
if (bil_load_file(fileName, inFile, project, &loaded_comp_objs)
== NULL)
{
return_value = -1;
goto epilogue;
}
/* loaded_module will point to the module that was
* created.
*/
loaded_module = NULL;
if (objlist_get_num_objs(loaded_comp_objs) >= 1)
{
loaded_module = objlist_get_obj(loaded_comp_objs, 0, NULL);
}
if (loaded_module != NULL)
{
if (ImportByCopy)
{
obj_set_file(loaded_module, (String) NULL);
}
else /* Import by reference */
{
/* Convert the imported module's file field to a
* path that is relative to the directory in which
* the project is stored.
*/
file = proj_cvt_mod_file_to_rel_path(fileName,
obj_get_file(project));
obj_set_file(loaded_module, file);
util_free(file);
}
/*
* configure anything that's not marked as configured
*/
abobj_show_tree(loaded_module, TRUE);
obj_tree_update_clients(loaded_module);
proj_set_cur_module(loaded_module);
}
epilogue:
objlist_destroy(loaded_comp_objs);
return return_value;
}
static int
get_start_times(ABProfiledInterval interval)
{
return get_cur_times(&(interval->realTime.startSeconds),
&(interval->CPUTime.startSeconds));
}
static int
get_end_times(ABProfiledInterval interval)
{
return get_cur_times(&(interval->realTime.endSeconds),
&(interval->CPUTime.endSeconds));
}
static int
calc_elapsed_times(ABProfiledInterval interval)
{
interval->realTime.elapsedSeconds =
interval->realTime.endSeconds - interval->realTime.startSeconds;
interval->CPUTime.elapsedSeconds =
interval->CPUTime.endSeconds - interval->CPUTime.startSeconds;
return 0;
}
/* REMIND: #ifdef DEBUG */
static int
print_load_stats(
ABObj tree,
ABProfiledInterval totalTime,
ABProfiledInterval loadTime,
ABProfiledInterval configTime
)
{
ABProfiledIntervalRec otherTimeRec;
ABProfiledInterval otherTime = &otherTimeRec;
/*
* Print out statistics about load
*/
calc_elapsed_times(totalTime);
calc_elapsed_times(loadTime);
calc_elapsed_times(configTime);
otherTime->realTime.elapsedSeconds =
(totalTime->realTime.elapsedSeconds
- loadTime->realTime.elapsedSeconds
- configTime->realTime.elapsedSeconds);
otherTime->CPUTime.elapsedSeconds =
(totalTime->CPUTime.elapsedSeconds
- loadTime->CPUTime.elapsedSeconds
- configTime->CPUTime.elapsedSeconds);
fprintf(stderr, "\nLoad Times (Real/CPU) seconds:\n");
fprintf(stderr, " Total: (%lg/%lg)\n",
totalTime->realTime.elapsedSeconds,
totalTime->CPUTime.elapsedSeconds);
fprintf(stderr, " Actual load: (%lg/%lg)\n",
loadTime->realTime.elapsedSeconds,
loadTime->CPUTime.elapsedSeconds);
fprintf(stderr, " Config: (%lg/%lg)\n",
configTime->realTime.elapsedSeconds,
configTime->CPUTime.elapsedSeconds);
fprintf(stderr, " Other: (%lg/%lg)\n",
otherTime->realTime.elapsedSeconds,
otherTime->CPUTime.elapsedSeconds);
fprintf(stderr, "Number of objects loaded - salient:%d total:%d\n",
trav_count(tree, AB_TRAV_SALIENT),
trav_count(tree, AB_TRAV_ALL));
return 0;
}
/* REMIND: #endif DEBUG */
static int
get_cur_times(double *realTimeOut, double *cpuTimeOut)
{
static BOOL initialized = FALSE;
static long ticks_per_second = 1;
struct tms timeInfo;
double realTime;
double cpuTime;
if (!initialized)
{
initialized = TRUE;
ticks_per_second = sysconf(_SC_CLK_TCK);
}
realTime = times(&timeInfo);
cpuTime = timeInfo.tms_utime + timeInfo.tms_stime
+ timeInfo.tms_cutime + timeInfo.tms_cstime;
*realTimeOut = realTime / ticks_per_second;
*cpuTimeOut = cpuTime / ticks_per_second;
return 0;
}
/* Called by the 'File->Open Project' callback and the
* 'Project->Open' callback. NOT called when a project
* is loaded from the command-line.
*/
int
ab_check_and_open_bip(
STRING fileName
)
{
DTB_MODAL_ANSWER answer = DTB_ANSWER_NONE;
BOOL read_OK, write_OK;
int iRet = 0;
XmString xm_buf = (XmString) NULL;
DtbObjectHelpData help_data = NULL;
abio_access_file(fileName, &read_OK, &write_OK);
if (read_OK)
{
if (write_OK)
{
iRet = ab_load_project(fileName, NULL, FALSE);
}
else /* Read-only file */
{
/* You can read it but you can't write to it. */
sprintf(Buf, catgets(Dtb_project_catd, 100, 17,
"The file %s is a read-only file.\nYou may open the project\nor cancel the operation."), fileName);
xm_buf = XmStringCreateLocalized(Buf);
dtb_palette_open_ro_proj_msg_initialize(
&dtb_palette_open_ro_proj_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 90,
"Opening a read-only project means that any changes that\naffect the project (.bip) file, such as creation of a\nnew module or creation of a cross-module connection,\ncannot be saved, unless you save the project to a\ndifferent file name. You have the option of continuing\nwith the open operation or cancelling it.");
help_data->help_volume = "";
help_data->help_locationID = "";
answer = dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_palette_open_ro_proj_msg, xm_buf, help_data, NULL);
util_free(help_data);
XmStringFree(xm_buf);
switch (answer)
{
case DTB_ANSWER_ACTION1:
iRet = ab_load_project(fileName, NULL, FALSE);
break;
case DTB_ANSWER_CANCEL:
break;
case DTB_ANSWER_HELP:
break;
}
}
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 20,
"%s does not have read permission."), fileName);
xm_buf = XmStringCreateLocalized(Buf);
dtb_palette_error_msg_initialize(&dtb_palette_error_msg);
(void)dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_palette_error_msg, xm_buf, NULL, NULL);
XmStringFree(xm_buf);
iRet = -1;
}
return (iRet);
}
int
ab_load_project(
STRING fileName,
FILE *inFile,
BOOL BufferDrop
)
{
int ret = 0;
ab_set_busy_cursor(TRUE);
ui_sync_display_of_widget(AB_toplevel);
if ((ret = ab_load_bil_file(fileName, inFile, BufferDrop)) != -1)
{
proj_show_proj_dir();
objxm_tree_configure(proj_get_project(), OBJXM_CONFIG_BUILD);
/* Popup the Project Organizer */
proj_show_dialog();
}
ab_set_busy_cursor(FALSE);
return (ret);
}
/* Calls ab_import_bil_file(). Called by the File->Import->Module
* callback and the Module->Import callback. NOT called when
* a project is loaded from the command-line.
*/
int
ab_check_and_import_bil(
STRING fileName,
BOOL ImportByCopy
)
{
BOOL read_OK, write_OK;
DTB_MODAL_ANSWER answer = DTB_ANSWER_NONE;
ABObj project = proj_get_project();
int iRet = 0;
XmString xm_buf = (XmString) NULL;
DtbObjectHelpData help_data = NULL;
abio_access_file(fileName, &read_OK, &write_OK);
if (read_OK)
{
if (ImportByCopy)
{
iRet = ab_import_module(fileName, NULL, TRUE);
}
else /* Importing by Reference. Have to check permissions. */
{
if (write_OK)
{
/* The file is readable and writable, can be opened,
* and is a valid module file, so import it.
*/
iRet = ab_import_module(fileName, NULL, FALSE);
}
else
{
/* You can read it but you can't write to it. */
sprintf(Buf, catgets(Dtb_project_catd, 100, 21,
"The file %s is a read-only file.\n\
You may import the module or cancel\n\
the operation."), fileName);
xm_buf = XmStringCreateLocalized(Buf);
dtb_palette_import_ro_msg_initialize(
&dtb_palette_import_ro_msg);
help_data = (DtbObjectHelpData) util_malloc(sizeof(DtbObjectHelpDataRec));
help_data->help_text = catgets(Dtb_project_catd, 100, 91,
"Importing a read-only module means that any changes\nthat affect the module cannot be saved, unless you\nsave the module to a different file name. You have\nthe option of continuing with the import operation\nor cancelling it.");
help_data->help_volume = "";
help_data->help_locationID = "";
answer = dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_palette_import_ro_msg, xm_buf, help_data, NULL);
util_free(help_data);
XmStringFree(xm_buf);
switch (answer)
{
case DTB_ANSWER_ACTION1:
iRet = ab_import_module(fileName, NULL, ImportByCopy);
break;
case DTB_ANSWER_CANCEL:
case DTB_ANSWER_HELP:
break;
}
}
}
}
else
{
sprintf(Buf, catgets(Dtb_project_catd, 100, 9,
"%s does not have read permission."), fileName);
xm_buf = XmStringCreateLocalized(Buf);
dtb_palette_error_msg_initialize(&dtb_palette_error_msg);
(void)dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_palette_error_msg, xm_buf, NULL, NULL);
XmStringFree(xm_buf);
iRet = -1;
}
return (iRet);
}
int
ab_import_module(
STRING fileName,
FILE *inFile,
BOOL ImportByCopy
)
{
int iRet = 0;
ab_set_busy_cursor(TRUE);
ui_sync_display_of_widget(AB_toplevel);
iRet = ab_import_bil_file(fileName, inFile, ImportByCopy);
if (iRet != -1)
{
abobj_set_save_needed(proj_get_project(), TRUE);
}
ab_set_busy_cursor(FALSE);
return (iRet);
}

View File

@@ -0,0 +1,85 @@
/*
* $XConsortium: ab_bil.h /main/3 1995/11/06 17:12:53 rswiston $
*
* @(#)ab_bil.h 1.13 02 Apr 1995
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* File: ab_bil.h
*/
#ifndef _ab_ab_bil_h
#define _ab_ab_bil_h
#include <ab_private/obj.h>
/* Defines for data types returned by DtDtsBufferToDataType()
* and DtDtsFileToDataType().
*/
#define BIL "BIL"
#define BIP "BIP"
#define BIX "BIX"
/* Loads entire project. Sets/replaces current project.
*/
int ab_load_bil_file(
STRING fileName,
FILE *inFile,
BOOL BufferDrop
);
/* Loads one bil file, containing one or more modules, into
* the current project.
*/
int ab_import_bil_file(
STRING fileName,
FILE *inFile,
BOOL import_by_ref
);
/* Calls ab_load_bil_file(). Called by the File->Open Project
* callback and the Project->Open callback. Also called when
* a project is loaded from the command-line.
*/
int ab_check_and_open_bip(
STRING fileName
);
/* Calls ab_import_bil_file(). Called by the File->Import->Module
* callback and the Module->Import callback. Also called when
* a project or module is loaded from the command-line.
*/
int ab_check_and_import_bil(
STRING fileName,
BOOL ImportByCopy
);
int ab_load_project(
STRING fileName,
FILE *inFile,
BOOL BufferDrop
);
int ab_import_module(
STRING fileName,
FILE *inFile,
BOOL ImportByCopy
);
#endif /* _ab_ab_bil_h */

View File

@@ -0,0 +1,434 @@
/*
* $XConsortium: ab_dnd.c /main/3 1995/11/06 17:13:05 rswiston $
*
* @(#)ab_dnd.c 1.19 18 Apr 1995 cde_app_builder/src/
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include <Xm/DragDrop.h>
#include <Dt/Dt.h>
#include <Dt/Dts.h>
#include <Dt/Dnd.h>
#include <ab_private/ab.h>
#include <ab_private/ab_dnd.h>
#include <ab_private/ab_bil.h>
#include <ab_private/ui_util.h>
#include <ab_private/proj.h>
#include "palette_ui.h"
#include "proj_ui.h"
/*
* ab_dnd.c
*/
static void textTransferCB(
Widget widget,
XtPointer clientData,
XtPointer callData
);
static void textAnimateCB(
Widget widget,
XtPointer clientData,
XtPointer callData
);
static int dnd_load_file(
STRING fileName
);
static int dnd_load_buffer(
DtDndBuffer dropBuf
);
/*
* ab_dnd_register_drop_file
*
* Registers widget to accept drops of files.
* NOTE: DtAppInitialize() or DtDragInitialize()
* must be called prior to calling this function.
*/
void
ab_dnd_register_drop_file
(
Widget dropFile
)
{
static XtCallbackRec transferCBRec[] = { {textTransferCB, NULL},
{NULL, NULL} };
static XtCallbackRec animateCBRec[] = { {textAnimateCB, NULL},
{NULL, NULL} };
Arg arg[1];
if (!dropFile)
return;
XtSetArg(arg[0], DtNdropAnimateCallback, animateCBRec);
DtDndDropRegister(dropFile,
DtDND_FILENAME_TRANSFER | DtDND_BUFFER_TRANSFER,
XmDROP_COPY,
transferCBRec,
arg,
1); /* number of args in argument list */
}
/*
* textTransferCB
*
* Handles transfer of files or text to the text edit. Files are transfered
* by placing their name in the field, text by inserting the text into the
* field.
*/
static void
textTransferCB
(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtDndTransferCallbackStruct *transferInfo =
(DtDndTransferCallbackStruct *) callData;
String newString = NULL;
int iRet = 0;
switch (transferInfo->dropData->protocol)
{
case DtDND_FILENAME_TRANSFER:
newString = XtNewString((char *)
transferInfo->dropData->data.files[0]);
if (dnd_load_file(newString) < 0)
transferInfo->status = DtDND_FAILURE;
break;
case DtDND_BUFFER_TRANSFER:
iRet = dnd_load_buffer(transferInfo->dropData->data.buffers[0]);
if (iRet < 0)
transferInfo->status = DtDND_FAILURE;
break;
default:
break;
}
}
static int
dnd_load_buffer(
DtDndBuffer dropBuf
)
{
char *dataType = NULL;
FILE *inFile = NULL;
int iRet = 0;
ABObj project = proj_get_project();
STRING fmtStr = NULL, fileName = NULL, msg = NULL;
XmString xm_str = NULL;
DTB_MODAL_ANSWER answer = DTB_ANSWER_NONE;
dataType = (char *) DtDtsBufferToDataType(
dropBuf.bp, dropBuf.size, dropBuf.name);
inFile = util_create_tmp_file((char *) dropBuf.bp);
if (inFile == NULL)
{
(void)dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_palette_drop_err_msg, NULL, NULL, NULL);
iRet = -1;
goto epilogue;
}
fileName = dropBuf.name? dropBuf.name : catgets(Dtb_project_catd, 100, 104, "NoName");
fileName = XtNewString(fileName);
if ( (strcmp(dataType, BIX) == 0) ||
(strcmp(dataType, BIP) == 0) )
{
/* Before loading in the new project, check if
* there are unsaved edits in the existing project.
* If so, post a warning and allow the user to
* cancel the operation.
*/
if (proj_check_unsaved_edits(project))
{
answer = dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_proj_open_proj_warn_msg,
NULL, NULL, NULL);
switch (answer)
{
case DTB_ANSWER_ACTION1:
/* Go ahead and destroy the old project. */
proj_destroy_project(project);
iRet = ab_load_project(fileName, inFile, TRUE);
break;
case DTB_ANSWER_CANCEL:
iRet = -1;
break;
}
}
else
{
iRet = ab_load_project(fileName, inFile, TRUE);
}
}
else if (strcmp(dataType, BIL) == 0)
{
iRet = ab_import_module(fileName, inFile, FALSE);
}
else
{
fmtStr = XtNewString(catgets(Dtb_project_catd, 100, 103,
"Cannot determine file type for %s.\nDo you want to load the file as a project or a module?"));
msg = (STRING) util_malloc(strlen(fmtStr) + strlen(fileName) + 1);
sprintf(msg, fmtStr, fileName);
xm_str = XmStringCreateLocalized(msg);
answer = dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_proj_ld_as_bip_or_bil_msg, xm_str, NULL, NULL);
XtFree(fmtStr);
util_free(msg);
XmStringFree(xm_str);
switch (answer)
{
case DTB_ANSWER_ACTION1: /* Load as Project */
if (proj_check_unsaved_edits(project))
{
answer = dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_proj_open_proj_warn_msg,
NULL, NULL, NULL);
switch (answer)
{
case DTB_ANSWER_ACTION1:
/* Go ahead and destroy the old project. */
proj_destroy_project(project);
iRet = ab_load_project(fileName, inFile, TRUE);
break;
case DTB_ANSWER_CANCEL:
iRet = -1;
break;
}
}
else
{
iRet = ab_load_project(fileName, inFile, TRUE);
}
break;
case DTB_ANSWER_ACTION2: /*Load as Module */
iRet = ab_import_module(fileName, inFile, FALSE);
break;
case DTB_ANSWER_CANCEL:
iRet = -1;
break;
}
}
if (fileName)
XtFree(fileName);
epilogue:
return (iRet);
}
static int
dnd_load_file(
STRING fileName
)
{
char *dataType = NULL;
ABObj project = proj_get_project();
STRING fmtStr = NULL, msg = NULL;
XmString xm_str = NULL;
int iRet = 0;
DTB_MODAL_ANSWER answer = DTB_ANSWER_NONE;
/* A file has been dropped on dtbuilder. */
if (!util_strempty(fileName))
{
util_dprintf(2, "Dropped file %s on App Builder\n", fileName);
dataType = (char *) DtDtsFileToDataType(fileName);
if ( (strcmp(dataType, BIP) == 0) ||
(strcmp(dataType, BIX) == 0) )
{
/* Before loading in the new project, check if
* there are unsaved edits in the existing project.
* If so, post a warning and allow the user to
* cancel the operation.
*/
if (proj_check_unsaved_edits(project))
{
answer = dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_proj_open_proj_warn_msg,
NULL, NULL, NULL);
switch (answer)
{
case DTB_ANSWER_ACTION1:
/* Go ahead and destroy the old project. */
proj_destroy_project(project);
iRet = ab_check_and_open_bip(fileName);
break;
case DTB_ANSWER_CANCEL:
iRet = -1;
break;
}
}
else
{
iRet = ab_check_and_open_bip(fileName);
}
}
else if (strcmp(dataType, BIL) == 0)
{
answer = dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_palette_import_by_msg, NULL, NULL, NULL);
switch (answer)
{
case DTB_ANSWER_ACTION1: /* Copy */
iRet = ab_check_and_import_bil(fileName, TRUE);
break;
case DTB_ANSWER_ACTION2: /* Reference */
iRet = ab_check_and_import_bil(fileName, FALSE);
break;
case DTB_ANSWER_CANCEL:
iRet = -1;
break;
}
}
else
{
fmtStr = XtNewString(catgets(Dtb_project_catd, 100, 103,
"Cannot determine file type for %s.\nDo you want to load the file as a project or a module?"));
msg = (STRING) util_malloc(strlen(fmtStr) + strlen(fileName) + 1);
sprintf(msg, fmtStr, fileName);
xm_str = XmStringCreateLocalized(msg);
answer = dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_proj_ld_as_bip_or_bil_msg, xm_str, NULL, NULL);
XtFree(fmtStr);
util_free(msg);
XmStringFree(xm_str);
switch (answer)
{
case DTB_ANSWER_ACTION1: /* Load as Project */
if (proj_check_unsaved_edits(project))
{
answer = dtb_show_modal_message(
dtb_get_toplevel_widget(),
&dtb_proj_open_proj_warn_msg,
NULL, NULL, NULL);
switch (answer)
{
case DTB_ANSWER_ACTION1:
/* Go ahead and destroy the old project. */
proj_destroy_project(project);
iRet = ab_check_and_open_bip(fileName);
break;
case DTB_ANSWER_CANCEL:
iRet = -1;
break;
}
}
else
{
iRet = ab_check_and_open_bip(fileName);
}
break;
case DTB_ANSWER_ACTION2: /*Load as Module */
answer = dtb_show_modal_message(dtb_get_toplevel_widget(),
&dtb_palette_import_by_msg, NULL, NULL, NULL);
switch (answer)
{
case DTB_ANSWER_ACTION1: /* Copy */
iRet = ab_check_and_import_bil(fileName, TRUE);
break;
case DTB_ANSWER_ACTION2: /* Reference */
iRet = ab_check_and_import_bil(fileName, FALSE);
break;
case DTB_ANSWER_CANCEL:
iRet = -1;
break;
}
break;
case DTB_ANSWER_CANCEL:
iRet = -1;
break;
}
}
}
else iRet = -1;
return (iRet);
}
/*
* textAnimateCB
*
* Not implemented.
*/
static void
textAnimateCB
(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/* REMIND: Do something! */
}
/*
* ab_dnd_unregister_drop
*
* Unregisters widget to accept drops of files.
* NOTE: DtAppInitialize() or DtDragInitialize()
* must be called prior to calling this function.
*/
void
ab_dnd_unregister_drop
(
Widget dropFile
)
{
if (!dropFile)
return;
DtDndDropUnregister(dropFile);
}

View File

@@ -0,0 +1,36 @@
/*
* $XConsortium: ab_dnd.h /main/3 1995/11/06 17:13:18 rswiston $
*
* %W% %G% cde_app_builder/src/
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* ab_dnd.h
* Declarations for drag and drop functions in the app builder.
*/
#ifndef _ab_dnd_h
#define _ab_dnd_h
extern void ab_dnd_register_drop_file(
Widget dropFile
);
extern void ab_dnd_unregister_drop(
Widget dropFile
);
#endif /* _ab_dnd_h */

View File

@@ -0,0 +1,60 @@
/*
* $XConsortium: ab_globals.c /main/3 1995/11/06 17:13:29 rswiston $
*
* @(#)ab_globals.c 1.35 19 May 1995 cde_app_builder/src/libABobj
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
***********************************************************************
* ab_globals.c - Defines all AB global variables
*
***********************************************************************
*/
#include <stdio.h>
#include <X11/Intrinsic.h>
#include <ab_private/obj.h>
#include <ab_private/ab.h>
ABObj AB_project = NULL;
ABObj AB_cur_module = NULL;
Widget AB_toplevel = NULL;
Widget AB_menubar = NULL;
Widget AB_generic_chooser = NULL;
Widget AB_group_dialog = NULL;
Widget AB_layout_dialog = NULL;
Widget AB_proj_window = NULL;
Widget AB_rev_prop_dialog = NULL;
Widget AB_conn_dialog = NULL;
Widget AB_dnd_dialog = NULL;
Widget AB_help_dialog = NULL;
Widget AB_cgen_win = NULL;
Widget AB_appfw_dialog = NULL;
Widget AB_attch_ed_dialog = NULL;
Widget AB_cgen_prop_dialog = NULL;
Widget AB_cgen_env_dialog = NULL;
Widget AB_msgEd_dialog = NULL;
int AB_builder_mode = MODE_BUILD;
int AB_grid_size = 10;
Boolean AB_btn1_transfer = True;
int AB_BMenu = Button3;
Vwr Proj_viewer = NULL;
XrmDatabase AB_db = NULL;

View File

@@ -0,0 +1,22 @@
/*
* $XConsortium: ab_resources.h /main/3 1995/11/06 17:13:44 rswiston $
*
* @(#)ab_resources.h 1.1 27 Jun 1994
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
#define AB_XRM_CUR_PROJECT "Dtbuilder.currentProject"
#define AB_XRM_SHOWN_MODULES "Dtbuilder.shownModules"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,144 @@
/*
* $XConsortium: ab_utils.h /main/3 1995/11/06 17:14:16 rswiston $
*
* @(#)ab_utils.h 1.10 95/03/09 Copyright 1993 Sun Microsystems
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* ab_utils.h
*/
#ifndef _AB_UTILS_H_
#define _AB_UTILS_H_
#include <ab_private/abio.h>
#define InTestMode AB_builder_mode == MODE_TEST_SHOWN || \
AB_builder_mode == MODE_TEST_PROJ
#define InBuildMode AB_builder_mode == MODE_BUILD
/* To implement dtbuilder window protocol */
#define WindowHidden 0x0000
#define WindowUp 0x0001
#define WindowIconified 0x0002
typedef enum
{
AB_WIN_LEADER,
AB_WIN_WINDOW,
AB_WIN_DIALOG,
AB_WIN_MODAL,
AB_WIN_TYPE_NUM_VALUES
} AB_WIN_TYPE;
typedef enum
{
AB_WPOS_UNSPECIFIED,
AB_WPOS_TILE_ABOVE,
AB_WPOS_TILE_BELOW,
AB_WPOS_TILE_HORIZONTAL,
AB_WPOS_TILE_LEFT,
AB_WPOS_TILE_RIGHT,
AB_WPOS_TILE_VERTICAL,
AB_WPOS_STACK_DIAGONAL,
AB_WPOS_STACK_CENTER,
AB_WPOS_TYPE_NUM_VALUES
} AB_WPOS_TYPE;
typedef enum
{
AB_STATUS_OBJ_TYPE,
AB_STATUS_OBJ_NAME,
AB_STATUS_OBJ_POS,
AB_STATUS_OBJ_SIZE,
AB_STATUS_CURS_POS,
AB_STATUS_CUR_MODULE,
AB_STATUS_NUM_VALUES /* number of valid values - MUST BE
LAST */
/* ANSI: no comma after last enum item! */
} AB_STATUS_INFO;
typedef struct AB_WINDOW {
Widget widget;
AB_WIN_TYPE type;
unsigned long state;
struct AB_WINDOW *next;
} ABWindow;
extern void ab_register_window(
Widget widget,
AB_WIN_TYPE type,
unsigned long init_state,
Widget init_pos_ref_win,
AB_WPOS_TYPE init_pos_type,
XtCallbackProc close_callback,
XtPointer close_clientdata
);
extern void ab_show_window(
Widget widget
);
extern void ab_takedown_windows(void);
extern void ab_putback_windows(void);
extern BOOL ab_window_leader_iconified(void);
extern BOOL ab_window_is_open(
Widget widget
);
extern void ab_position_window(
Widget widget,
Widget ref_widget,
AB_WPOS_TYPE pos_type
);
extern BOOL ab_is_cur_dir(
STRING dir
);
extern int ab_change_dir(
STRING new_dir
);
extern STRING ab_get_cur_dir(void);
extern int ab_cvt_image_file_to_pixmap(
Widget widget,
STRING file_name,
Pixmap *pixmap_out
);
extern int ab_post_instantiate(
ABObj obj
);
extern int ab_update_stat_region(
AB_STATUS_INFO type,
String valuestring
);
extern void ab_set_busy_cursor(
BOOL on
);
extern void ab_palette_set_active(
BOOL active
);
extern void ab_exit_dtbuilder(void);
#endif /* _AB_UTILS_H_ */

View File

@@ -0,0 +1,458 @@
/*
* $XConsortium: abobj.h /main/3 1995/11/06 17:14:34 rswiston $
*
* @(#)abobj.h 1.27 15 Feb 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
#ifndef _ABOBJ_H_
#define _ABOBJ_H_
/*
* abobj.h - AB object manipulation functions
*/
#include <X11/Intrinsic.h>
#include <ab_private/objxm.h>
#include "dtb_utils.h"
/*
* Flags to control ABObj Edit Menu state
*/
#define ABMenuNone 0x0000
#define ABMenuProps 0x0001
#define ABMenuUndo 0x0002
#define ABMenuCut 0x0004
#define ABMenuCopy 0x0008
#define ABMenuPaste 0x0010
#define ABMenuDelete 0x0020
#define ABMenuAlign 0x0040
#define ABMenuDistribute 0x0080
#define ABMenuGroup 0x0100
#define ABMenuUngroup 0x0200
#define ABMenuNextLayer 0x0400
#define ABMenuBrowse 0x0800
#define ABMenuAttach 0x1000
#define ABMenuPane 0x2000
#define ABMenuUnpane 0x4000
#define ABMenuExpand 0x8000
#define ABMenuExpandAll 0x10000
#define ABMenuCollapse 0x20000
#define ABMenuTearOff 0x40000
/*
* Two Types of Object Edit Menus: Browser & WindowObj
*/
typedef enum
{
WIN_EDIT_MENU,
BROWSER_EDIT_MENU,
EDIT_MENU_TYPE_NUM_VALUES /* number of valid values - MUST BE LAST */
/* ANSI: no comma after last enum item! */
} EDIT_MENU_TYPE;
/*
* Selected Object storage
*/
typedef struct _AB_SELECTED_REC
{
ABObj *list;
int count;
} ABSelectedRec;
/*
* EVENT-HANDLING for AB objects
*/
extern void abobj_register_build_actions(
XtAppContext app
);
extern int abobj_tree_set_build_actions(
ABObj root
);
/*
* Instantiate/Show/Hide/Propogate an AB object hierarchy
*/
extern int abobj_instantiate_tree(
ABObj root,
BOOL manage_last
);
extern int abobj_show_tree(
ABObj root,
BOOL manage_last
);
extern int abobj_hide_tree(
ABObj root
);
/*
* SELECT AB object functions
*/
extern void abobj_select(
ABObj obj
);
extern void abobj_deselect(
ABObj obj
);
extern void abobj_deselect_all(
ABObj root
);
extern int abobj_get_selected(
/* NOTE: caller must free the memory for sel->list! */
ABObj root,
BOOL include_root,
BOOL include_items,
ABSelectedRec *sel
);
extern void abobj_sort_sel_list(
ABObj *sel_list,
int sel_count,
int sort);
extern void abobj_group_selected_objects(
);
extern void abobj_ungroup_selected_objects(
);
extern void abobj_layout_group(
ABObj obj,
BOOL init
);
extern void abobj_register_group_expose_handler(
ABObj obj
);
extern void abobj_make_panedwin(
);
extern void abobj_unmake_panedwin(
);
/*
* MOVE AB object functions
*/
extern int abobj_move(
ABObj obj,
XEvent *event
);
extern void abobj_move_selected(
ABObj *sel_list,
int sel_count,
XRectangle *start,
XRectangle *stop
);
extern void abobj_nudge_selected(
ABObj *sel_list,
int sel_count,
short x_delta,
short y_delta,
BOOL reselect
);
extern BOOL abobj_is_movable(
ABObj obj
);
/*
* ALIGN AB object functions
*/
extern void abobj_align(
unsigned long align_mask
);
/*
* RESIZE AB object functions
*/
extern int abobj_resize(
ABObj obj,
XEvent *event
);
extern BOOL abobj_is_directly_resizable(
ABObj obj
);
extern BOOL abobj_width_resizable(
ABObj obj
);
extern BOOL abobj_height_resizable(
ABObj obj
);
/*
* LAYOUT AB object functions
*/
extern int abobj_layout_changed(
ABObj obj
);
extern int abobj_calculate_new_layout(
ABObj obj,
int new_x,
int new_y,
Dimension new_width,
Dimension new_height
);
extern void abobj_sort_children(
ABObj obj,
int sort);
extern void abobj_clear_layout(
ABObj obj,
BOOL clear_children,
BOOL init_attachments
);
extern ABObj abobj_handle_layered_pane(
ABObj newobj,
ABObj pane
);
extern int abobj_init_pane_position(
ABObj pane
);
extern int abobj_layer_show_next(
ABObj layer
);
extern void abobj_layer_set_size(
ABObj layer,
int new_width,
int new_height
);
extern int abobj_layer_manage_visible(
ABObj layer
);
/*
* Functions to duplicate an ABObj tree for the clipboard
*/
extern ABObj abobj_dup(
ABObj obj
);
extern ABObj abobj_dup_tree(
ABObj obj
);
/*
* POPUP-MENU AB object functions
*/
/* Handles Caching Menus */
extern void abobj_popup_menu(
EDIT_MENU_TYPE mtype,
Widget origin,
ABSelectedRec *target,
XButtonEvent *event
);
/* Creates/Destroys Menu each time */
extern void abobj_menu(
Widget origin,
ABSelectedRec *target,
XButtonEvent *event
);
/*
* Miscellaneous AB object utilities
*/
extern int abobj_comp_rename(
ABObj obj,
STRING oldname,
STRING newname
);
extern int abobj_get_value_x(
ABObj obj
);
extern int abobj_get_actual_width(
ABObj obj
);
extern int abobj_get_actual_height(
ABObj obj
);
extern int abobj_get_comp_width(
ABObj obj
);
extern int abobj_get_comp_height(
ABObj obj
);
extern int abobj_get_x(
ABObj obj
);
extern int abobj_get_y(
ABObj obj
);
extern int abobj_get_actual_x(
ABObj obj
);
extern int abobj_get_actual_y(
ABObj obj
);
extern int abobj_get_comp_x(
ABObj obj
);
extern int abobj_get_comp_y(
ABObj obj
);
extern int abobj_get_label_width(
ABObj obj
);
extern void abobj_get_rect_for_objects(
ABObj *list,
int count,
XRectangle *j_rect
);
extern void abobj_get_greatest_size(
ABObj *list,
int count,
int *width,
int *height,
ABObj *tallest_obj,
ABObj *widest_obj
);
extern BOOL abobj_has_attached_label(
ABObj obj
);
/* Given an obj, return a module-format name:
* "modulename :: objname"
* NOTE: it is up to caller to free memory allocated
* by this function
*/
extern STRING abobj_get_moduled_name(
ABObj obj
);
/* Give a module-name & an obj-name, return in format:
* "modulename :: objname"
* NOTE: the caller must free the memory allocated
* by this function
*/
extern STRING abobj_alloc_moduled_name(
STRING mod_name,
STRING obj_name
);
/* Given a module-format name "modulename :: objname",
* return the correct 'module' & 'obj' ABobjs
*/
extern int abobj_moduled_name_extract(
STRING m_o_name,
ABObj *module,
ABObj *obj
);
extern int abobj_reset_colors(
ABObj obj,
BOOL reset_bg,
BOOL reset_fg
);
extern void abobj_force_dang_form_resize(
ABObj obj
);
extern int abobj_update_module_name(
ABObj modobj
);
extern int abobj_update_proj_name(
ABObj proj_obj
);
extern int abobj_update_palette_title(
ABObj proj_obj
);
extern void abobj_tree_realize(
ABObj ab_interface,
Bool manage
);
extern int abobj_tree_set_centering_handler(
ABObj root
);
extern DTB_CENTERING_TYPES abobj_get_centering_type(
ABObj obj
);
extern int abobj_build_menus_array(
ABObj root,
ABObj **menus_ptr,
int *menu_count_ptr
);
extern void abobj_build_layout_menu(
Widget menu
);
extern void abobj_set_menu_item_state(
Widget menu
);
extern void abobj_strings_init(
);
extern int abobj_project_name_extract(
STRING app_name,
ABObj *obj
);
/*
* Data
*/
extern int AB_grid_size;
extern const int AB_selected_rect_size;
/*************************************************************************
** **
** INLINE IMPLEMENTATION **
** **
*************************************************************************/
#endif /* _ABOBJ_H_ */

View File

@@ -0,0 +1,160 @@
/*
* $XConsortium: abobjP.h /main/3 1995/11/06 17:14:46 rswiston $
*
* @(#)abobjP.h 1.17 15 Feb 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* abobjP.h -
*/
#ifndef _ABOBJ_P_H_
#define _ABOBJ_P_H_
#include <values.h>
#include <ab_private/abobj.h>
#include <ab_private/abobj_set.h>
#ifndef MAXINT
#define MAXINT (0x7FFFFFFF)
#endif /* MAXINT */
#define XSORT (1)
#define YSORT (2)
/*
* Resize directions.
*/
typedef enum {
NONE,
MOVE,
NORTH,
SOUTH,
EAST,
WEST,
NORTH_EAST,
NORTH_WEST,
SOUTH_EAST,
SOUTH_WEST,
RESIZE_DIR_NUM_VALUES
/* ANSI: no comma after last enum item! */
} RESIZE_DIR;
typedef enum {
LEFT_EDGES = (1L << 0),
VCENTERS = (1L << 1),
RIGHT_EDGES = (1L << 2),
LABELS = (1L << 3),
TOP_EDGES = (1L << 4),
HCENTERS = (1L << 5),
BOTTOM_EDGES = (1L << 6),
TO_GRID = (1L << 7),
VSPACING = (1L << 8),
HSPACING = (1L << 9),
FIXEDROWS = (1L << 10),
FIXEDCOLS = (1L << 12),
ROWFIRST = (1L << 13),
COLFIRST = (1L << 14),
HCENTERED = (1L << 15),
VCENTERED = (1L << 16)
/* ANSI: no comma after last enum item! */
} AB_ALIGN_TYPES;
/*
* Translation Table storage
*/
typedef struct _AB_TRANS_TBL
{
WidgetClass wclass;
XtTranslations translations;
} ABTransTbl;
/*
* Object Menu Cache structure
*/
typedef struct _WIN_MENU_CACHE
{
ABObj winobj;
Widget menu;
} WinMenuCache;
/*
* Browser Menu Cache structure
*/
typedef struct _BROWSER_MENU_CACHE
{
Widget brws_widget;
Widget menu;
} BrowserMenuCache;
/*
* EVENT-HANDLING for AB objects
*/
extern void abobjP_enable_build_actions(
ABObj obj,
Widget widget
);
extern void abobjP_disable_build_actions(
ABObj obj,
Widget widget
);
/*
* SELECT AB object functions
*/
/*
* MOVE AB object functions
*/
extern int abobjP_move_object_outline(
ABObj obj,
XMotionEvent *mevent
);
/*
* RESIZE AB object functions
*/
extern Cursor abobjP_get_resize_cursor(
Widget w,
RESIZE_DIR dir
);
extern RESIZE_DIR abobjP_find_resize_direction(
ABObj obj,
Widget w,
XEvent *event
);
extern int abobjP_resize_object_outline(
ABObj obj,
XEvent *event,
RESIZE_DIR dir
);
extern void abobjP_track_external_resizes(
Widget widget,
XtPointer client_data,
XEvent *event,
Boolean cont_to_dispatch
);
#endif /* _ABOBJ_P_H_ */

View File

@@ -0,0 +1,464 @@
/*
* $XConsortium: abobj_align.c /main/3 1995/11/06 17:14:58 rswiston $
*
* @(#)abobj_align.c 1.21 24 May 1994 cde_app_builder/src/libABobj
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
***********************************************************************
* ab_align.c - User-Interface alignment functions.
*
*
***********************************************************************
*/
#include <stdio.h>
#include <X11/Intrinsic.h>
#include <X11/Composite.h>
#include <X11/Shell.h>
#include <Xm/Xm.h>
#include <Xm/CascadeB.h>
#include <Xm/ScrolledW.h>
#include <Xm/RowColumn.h>
#include <Xm/TextF.h>
#include <Xm/Text.h>
#include <ab_private/trav.h>
#include <ab_private/proj.h>
#include <Dt/xpm.h> /* will this be in include/Dt? */
#include "abobjP.h"
static void align_left_edges(ABObj *sel_list, int sel_count);
static void align_vcenters(ABObj *sel_list, int sel_count);
static void align_right_edges(ABObj *sel_list, int sel_count);
static void align_labels(ABObj *sel_list, int sel_count);
static void align_top_edges(ABObj *sel_list, int sel_count);
static void align_hcenters(ABObj *sel_list, int sel_count);
static void align_bottom_edges(ABObj *sel_list, int sel_count);
static void distribute_horizontal(ABObj *sel_list, int sel_count, int hspacing);
static void distribute_vertical(ABObj *sel_list, int sel_count, int vspacing);
static void center_horizontal(ABObj *sel_list, int sel_count);
static void center_vertical(ABObj *sel_list, int sel_count);
/*************************************************************************
** **
** Function Definitions **
** **
**************************************************************************/
void
abobj_align(
unsigned long align_mask
)
{
ABSelectedRec sel;
extern int AB_grid_size;
int x = MAXINT;
if (!align_mask)
return;
abobj_get_selected(proj_get_project(), FALSE, FALSE, &sel);
/*
* Vertical alignment
*/
if (align_mask & LEFT_EDGES)
align_left_edges(sel.list, sel.count);
if (align_mask & VCENTERS)
align_vcenters(sel.list, sel.count);
if (align_mask & RIGHT_EDGES)
align_right_edges(sel.list, sel.count);
if (align_mask & LABELS)
align_labels(sel.list, sel.count);
/*
* Horizonatal alignment
*/
if (align_mask & TOP_EDGES)
align_top_edges(sel.list, sel.count);
if (align_mask & HCENTERS)
align_hcenters(sel.list, sel.count);
if (align_mask & BOTTOM_EDGES)
align_bottom_edges(sel.list, sel.count);
/*
* Spacing
*/
if (align_mask & HSPACING)
distribute_horizontal(sel.list, sel.count, AB_grid_size);
if (align_mask & VSPACING)
distribute_vertical(sel.list, sel.count, AB_grid_size);
/*
* Centering within parent
*/
if (align_mask & HCENTERED)
center_horizontal(sel.list, sel.count);
if (align_mask & VCENTERED)
center_vertical(sel.list, sel.count);
}
/*
* align_left_edges
*/
static void
align_left_edges(
ABObj *sel_list,
int sel_count
)
{
ABObj obj;
int i;
int x = MAXINT;
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
if (obj_get_x(obj) < x)
x = obj_get_x(obj);
}
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
/*
undo_record_move(obj);
*/
abobj_set_xy(obj, x, obj_get_y(obj));
abobj_instantiate_changes(obj);
}
}
/*
* align_vcenters
*/
static void
align_vcenters(
ABObj *sel_list,
int sel_count
)
{
int i;
ABObj obj;
int x = 0;
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
x += obj_get_x(obj) + abobj_get_actual_width(obj) / 2;
}
x /= sel_count;
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
/*
undo_record_move(obj);
*/
abobj_set_xy(obj, x - abobj_get_actual_width(obj)/2, obj_get_y(obj));
abobj_instantiate_changes(obj);
}
}
/*
* align_right_edges
*/
static void
align_right_edges(
ABObj *sel_list,
int sel_count
)
{
int i;
ABObj obj;
int x = -1;
int xtmp;
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
xtmp = obj_get_x(obj) + abobj_get_actual_width(obj);
if (xtmp > x)
x = xtmp;
}
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
/*
undo_record_move(obj);
*/
abobj_set_xy(obj, x - abobj_get_actual_width(obj), obj_get_y(obj));
abobj_instantiate_changes(obj);
}
}
/*
* align_labels
*
* Align all selected items to the topmost object's value x.
*/
static void
align_labels(
ABObj *sel_list,
int sel_count
)
{
int i;
ABObj obj;
int new_label_x = 0;
int y = MAXINT;
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
if (obj_get_y(obj) < y)
{
new_label_x = obj_get_x(obj) +
abobj_get_label_width(obj);
y = obj_get_y(obj);
}
}
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
abobj_set_xy(obj, new_label_x - abobj_get_label_width(obj),
obj_get_y(obj));
abobj_instantiate_changes(obj);
}
}
/*
* align_top_edges
*/
static void
align_top_edges(
ABObj *sel_list,
int sel_count
)
{
int i;
ABObj obj;
int y = MAXINT;
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
if (obj_get_y(obj) < y)
y = obj_get_y(obj);
}
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
/*
undo_record_move(obj);
*/
abobj_set_xy(obj, obj_get_x(obj), y);
abobj_instantiate_changes(obj);
}
}
/*
* align_hcenters
*/
static void
align_hcenters(
ABObj *sel_list,
int sel_count
)
{
int i;
ABObj obj;
int y = 0;
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
y += obj_get_y(obj) + abobj_get_actual_height(obj) / 2;
}
y /= sel_count;
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
/*
undo_record_move(obj);
*/
abobj_set_xy(obj, obj_get_x(obj), y - abobj_get_actual_height(obj)/2);
abobj_instantiate_changes(obj);
}
}
/*
* align_bottom_edges
*/
static void
align_bottom_edges(
ABObj *sel_list,
int sel_count
)
{
int i;
ABObj obj;
int y = -1;
int ytmp;
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
ytmp = obj_get_y(obj) + abobj_get_actual_height(obj);
if (ytmp > y)
y = ytmp;
}
for (i = 0; i < sel_count; i++) {
obj = sel_list[i];
/*
undo_record_move(obj);
*/
abobj_set_xy(obj, obj_get_x(obj), y - abobj_get_actual_height(obj));
abobj_instantiate_changes(obj);
}
}
/*
* distribute_horizontal
*/
static void
distribute_horizontal(
ABObj *sel_list,
int sel_count,
int hspacing
)
{
int i;
ABObj obj;
ABObj prev;
/*
* Sort list of objects based on X values
*/
abobj_sort_sel_list(sel_list, sel_count, XSORT);
/*
* Walk through the list and distribute the objects.
*/
for (i = 1; i < sel_count; i++)
{
obj = sel_list[i];
prev = sel_list[i-1];
/*
undo_record_move(obj);
*/
abobj_set_xy(obj, obj_get_x(prev) + abobj_get_actual_width(prev) +
hspacing, obj_get_y(obj));
abobj_instantiate_changes(obj);
}
}
/*
* distribute_vertical
*/
static void
distribute_vertical(
ABObj *sel_list,
int sel_count,
int vspacing
)
{
int i;
ABObj obj;
ABObj prev;
/*
* Sort list of objects based on Y values
*/
abobj_sort_sel_list(sel_list, sel_count, YSORT);
/*
* Walk through the list and distribute the objects.
*/
for (i = 1; i < sel_count; i++)
{
obj = sel_list[i];
prev = sel_list[i-1];
/*
undo_record_move(obj);
*/
abobj_set_xy(obj, obj_get_x(obj), obj_get_y(prev) +
abobj_get_actual_height(prev) + vspacing);
abobj_instantiate_changes(obj);
}
}
/*
* center_horizontal
*
* Center selected objects horizontally within their parent
*/
static void
center_horizontal(
ABObj *sel_list,
int sel_count
)
{
ABObj owner_obj = obj_get_parent(sel_list[0]);
int ownerwidth = abobj_get_actual_width(owner_obj);
XRectangle current_rect;
XRectangle new_rect;
abobj_get_rect_for_objects(sel_list, sel_count, &current_rect);
new_rect.x = ownerwidth / 2 - current_rect.width / 2;
new_rect.y = current_rect.y;
abobj_move_selected(sel_list, sel_count, &current_rect, &new_rect);
}
/*
* center_vertical
*
* Center selected objects vertically within their parent
*/
static void
center_vertical(
ABObj *sel_list,
int sel_count
)
{
ABObj owner_obj = obj_get_parent(sel_list[0]);
int owneheight = abobj_get_actual_height(owner_obj);
XRectangle current_rect;
XRectangle new_rect;
abobj_get_rect_for_objects(sel_list, sel_count, &current_rect);
new_rect.x = current_rect.x;
new_rect.y = owneheight / 2 - current_rect.height / 2;
abobj_move_selected(sel_list, sel_count, &current_rect, &new_rect);
}

View File

@@ -0,0 +1,25 @@
/*
* $XConsortium: abobj_clipb.c /main/3 1995/11/06 17:15:09 rswiston $
*
* @(#)abobj_clipb.c 1.4 15 Feb 1994
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* File: abobj_clipb.c - Functions for manipulating the clipboard
*/

View File

@@ -0,0 +1,25 @@
/*
* $XConsortium: abobj_clipb.h /main/3 1995/11/06 17:15:17 rswiston $
*
* @(#)abobj_clipb.h 1.4 15 Feb 1994
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* abobj_clipb.h
* Definitions for clipboard
*/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,298 @@
/*
* $XConsortium: abobj_edit.h /main/3 1995/11/06 17:15:39 rswiston $
*
* @(#)abobj_edit.h 1.1 15 Feb 1994
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
#ifndef _ABOBJ_EDIT_H_
#define _ABOBJ_EDIT_H_
#include <ab_private/abobj.h>
/*
* Declarations for edit features
*/
/*
* Size of each malloc'd block for clipboard/undo buffer
*/
#define ABOBJ_CLIPBOARD_BLOCK_SIZE 10
#define ABOBJ_UNDO_BLOCK_SIZE 10
/*
* Edit operations
*/
typedef enum
{
AB_EDIT_CUT = 0,
AB_EDIT_COPY,
AB_EDIT_PASTE,
AB_EDIT_DELETE,
AB_EDIT_NUM_VALUES
} AB_EDIT_TYPE;
/*
* Supported actions that can be undone
*/
typedef enum
{
AB_UNDO_NO_TYPE = 0,
AB_UNDO_CUT,
AB_UNDO_DELETE,
AB_UNDO_PASTE,
AB_UNDO_MOVE,
AB_UNDO_RESIZE,
AB_UNDO_GROUP,
AB_UNDO_UNGROUP,
AB_UNDO_NUM_VALUES
} AB_UNDO_TYPE;
/*
** Supported initiator locations of a paste operation
*/
typedef enum
{
AB_PASTE_INITIATOR_NO_TYPE = 0,
AB_PASTE_INITIATOR_OBJ_MENU, /* Object popup menu */
AB_PASTE_INITIATOR_BRWS_MENU, /* Browser popup menu */
AB_PASTE_INITIATOR_BRWS_EDIT_MENU, /* Browser's edit menu */
AB_PASTE_INITIATOR_PAL_EDIT_MENU, /* Palette's edit menu */
AB_PASTE_INITIATOR_NUM_VALUES
} AB_PASTE_INITIATOR_TYPE;
/*
* Data structures for clipboard/undo
* What follows are data structures that are used to store
* ABOBj's and related data for undo and the clipboard.
*
* The two main data structures are:
* AB_CLIPBOARD_REC and
* AB_UNDO_REC
*
* AB_UNDO_REC is a bit complicated because it consists
* of data for cut/delete/paste/move/resize/group/ungroup
* which are all contained in a union.
*/
/*
* Additional info needed for clipboard
*/
typedef struct _AB_CLIPB_INFO
{
ABObj dup_obj; /* duplicated object, not just ptr to */
ABObj action_list; /* duplicated ACTIONS for object and it's descendants */
char *other_stuff; /* placeholder for now, will be filled
* in later */
}AB_CLIPB_INFO, *ABClipbInfo;
/*
* Additional info needed for undoing cut
*/
typedef struct _AB_UNDO_CUT_INFO
{
ABObj dup_obj;
ABObj from_action_list; /* duplicated ACTIONS for object (object == source) */
ABObj to_action_list; /* duplicated ACTIONS for object (object == target) */
ABObj parent; /* POINTER to parent */
ABObj pane_sibling; /* POINTER to sibling - used for layers */
} AB_UNDO_CUT_INFO, *ABUndoCutInfo;
/*
* Additional info needed for undoing move
*/
typedef struct _AB_UNDO_MOVE_INFO
{
int x;
int y;
} AB_UNDO_MOVE_INFO, *ABUndoMoveInfo;
/*
* Additional info needed for undoing resize
*/
typedef struct _AB_UNDO_RESIZE_INFO
{
int width;
int height;
} AB_UNDO_RESIZE_INFO, *ABUndoResizeInfo;
/*
* Additional info needed for undoing ungroup
*/
typedef struct _AB_UNDO_UNGROUP_INFO
{
ABObj dup_old_group; /* DUPLICATE of ungrouped group */
ABObj *member_list; /* List of POINTERS to members */
int member_count;
} AB_UNDO_UNGROUP_INFO, *ABUndoUngroupInfo;
/*
* Union of additional info for undo actions
*/
typedef union _AB_UNDO_EXTRA_INFO
{
AB_UNDO_CUT_INFO cut;
/* undo for cut == undo for delete */
/* don't need special info for undoing paste */
AB_UNDO_MOVE_INFO move;
AB_UNDO_RESIZE_INFO resize;
AB_UNDO_UNGROUP_INFO ungroup;
/* don't need special info for undoing group */
}AB_UNDO_EXTRA_INFO, *ABUndoExtraInfo;
/*
* Info for undoing an action on ONE object
*/
typedef struct _AB_UNDO_INFO
{
AB_UNDO_TYPE type;
AB_UNDO_EXTRA_INFO info;
}AB_UNDO_INFO, *ABUndoInfo;
/*
* Data structure for clipboard
*/
typedef struct _AB_CLIPBOARD_REC{
ABObj *list; /* List of POINTERS to copied/cut objects */
AB_CLIPB_INFO *info_list;
int count;
int action_count;
int size;
} AB_CLIPBOARD_REC, *ABClipboardRec;
/*
* Type for ABUndoFunc
*/
struct _AB_UNDO_REC; /* forward ref for ABUndoFunc */
typedef void AB_UNDO_FUNC(struct _AB_UNDO_REC *undo_rec);
typedef AB_UNDO_FUNC *ABUndoFunc;
/*
* Data structure for undo buffer
*/
typedef struct _AB_UNDO_REC{
ABObj *list;
AB_UNDO_INFO *info_list;
ABUndoFunc undo_func;
int count;
int action_count;
int size;
} AB_UNDO_REC, *ABUndoRec;
/*
* Editing functions
*/
extern void abobj_edit_init(
);
extern int abobj_cut(
);
extern int abobj_copy(
);
extern int abobj_paste(
AB_PASTE_INITIATOR_TYPE initiator
);
extern int abobj_delete(void);
extern int abobj_undo(void);
extern int abobj_cancel_undo(void);
extern BOOL abobj_undo_active(
);
/*
* CLIPBOARD manipulating functions
*/
extern BOOL abobj_clipboard_is_empty(
);
extern BOOL abobj_in_clipboard(
ABObj obj
);
extern void abobj_clipboard_clear(
);
extern void abobj_clipboard_set(
ABObj *obj,
int count
);
extern void abobj_clipboard_add(
ABObj *obj,
int count
);
/*
* Function to set undo buffer
*/
extern int abobj_set_undo(
ABObj *obj,
int count,
ABUndoFunc undo_func,
AB_UNDO_TYPE undo_type
);
extern void abobj_setup_undo_cut_layer(
ABObj layer,
ABObj last_pane
);
/*
* Xt Callbacks for editing functions:
* undo
* cut
* copy
* paste
* delete
*/
extern void abobj_undo_cb(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
extern void abobj_cut_cb(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
extern void abobj_copy_cb(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
extern void abobj_paste_cb(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
extern void abobj_delete_cb(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
#endif /* _ABOBJ_EDIT_H_ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,396 @@
/*
* $XConsortium: abobj_layers.c /main/3 1995/11/06 17:16:01 rswiston $
*
* @(#)abobj_layers.c 1.18 02 Feb 1995 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
***********************************************************************
* abobj_layers.c - Implements Layered Panes
*
***********************************************************************
*/
#include <stdio.h>
#include <X11/Intrinsic.h>
#include <Xm/Xm.h>
#include <Xm/Form.h>
#include <ab_private/trav.h>
#include <ab_private/obj_notify.h>
#include <ab_private/objxm.h>
#include <ab_private/abobj.h>
#include <ab_private/abobj_set.h>
#include <ab_private/abobj_edit.h>
#include <ab_private/x_util.h>
/*************************************************************************
** **
** Private Function Declarations **
** **
**************************************************************************/
static void set_pane_attachments(
ABObj pane
);
static int obj_destroyedOCB(
ObjEvDestroyInfo info
);
/*************************************************************************
** **
** Private Data **
** **
**************************************************************************/
static AB_COMPASS_POINT attach_dirs[] = { AB_CP_NORTH, AB_CP_WEST,
AB_CP_EAST, AB_CP_SOUTH };
/*************************************************************************
** **
** Function Definitions **
** **
**************************************************************************/
ABObj
abobj_handle_layered_pane(
ABObj newobj,
ABObj pane
)
{
static BOOL first_time = True;
ABObj pane_parent;
ABObj pobj;
ABObj layers;
AB_ATTACH_TYPE atype;
XRectangle p_rect;
void *aval;
int aoffset;
int i, pos;
if (first_time)
{
obj_add_destroy_callback(obj_destroyedOCB, "LAYERS");
first_time = False;
}
pane = obj_get_root(pane);
pane_parent = obj_get_parent(pane);
x_get_widget_rect(objxm_get_widget(pane), &p_rect);
if (!obj_is_layers(pane_parent)) /* Create New Layered pane */
{
pobj = objxm_comp_get_subobj(obj_get_root(pane_parent),
AB_CFG_PARENT_OBJ);
/* Create Layers Object to hold all layered panes.
* Insert the layer obj in the same position as its
* child.
*/
pos = obj_get_child_num(pane);
layers = obj_create(AB_TYPE_LAYERS, NULL);
obj_insert_child(pobj, layers, pos);
obj_set_unique_name(layers, "layers");
obj_set_width(layers, (int)p_rect.width);
obj_set_height(layers, (int)p_rect.height);
/* If the layer is being parented off of a paned window
* then the paned window will take care of positioning
* the layer object, so we don't need to set the x,y
* values. Same applies to the attachments for the new
* layer.
*/
if (!obj_is_paned_win(pane_parent))
{
obj_set_x(layers, obj_get_x(pane));
obj_set_y(layers, obj_get_y(pane));
/* Copy original Pane's attachments to the Layers object */
for (i=0; i < XtNumber(attach_dirs); i++)
{
atype = obj_get_attach_type(pane, attach_dirs[i]);
aval = obj_get_attach_value(pane,attach_dirs[i]);
aoffset = obj_get_attach_offset(pane, attach_dirs[i]);
obj_set_attachment(layers, attach_dirs[i], atype, aval, aoffset);
}
}
else
{
/* Set the correct position for the layer object,
* so that when it is instantiated, it ends up in
* the right position in the paned window.
*/
objxm_obj_set_ui_arg(layers, AB_ARG_INT,
XmNpositionIndex, (short) pos);
}
/* Reset pane's attachment's to be to all sides of the Layers object */
set_pane_attachments(pane);
obj_reparent(pane, layers);
obj_clear_flag(pane, InstantiatedFlag);
abobj_show_tree(layers, FALSE);
}
else /* Layers already exist */
layers = pane_parent;
obj_set_width(newobj, (int)p_rect.width);
obj_set_height(newobj, (int)p_rect.height);
obj_set_x(newobj, 0);
obj_set_y(newobj, 0);
set_pane_attachments(newobj);
obj_clear_flag(pane, VisibleFlag);
XtUnmanageChild(objxm_get_widget(pane));
obj_set_flag(newobj, VisibleFlag);
return layers;
}
int
abobj_layer_show_next(
ABObj layers
)
{
AB_TRAVERSAL trav;
ABObj pane;
ABObj old_top = NULL;
ABObj new_top = NULL;
if (layers == NULL || !obj_is_layers(layers))
return -1;
/* If there is only one pane, do nothing */
if (obj_get_num_salient_children(layers) <= 1)
return 0;
for (trav_open(&trav, layers, AB_TRAV_SALIENT_CHILDREN);
(pane = trav_next(&trav)) != NULL; )
{
/* Search for currently visible pane and mark it */
if (obj_has_flag(pane, VisibleFlag))
old_top = pane;
else if (old_top != NULL) /* previous pane is visible */
{
new_top = pane;
break;
}
}
trav_close(&trav);
if (new_top == NULL) /* wraparound to first pane */
new_top = obj_get_salient_child(layers, 0);
if (old_top)
abobj_deselect(old_top);
XtManageChild(objxm_get_widget(new_top));
obj_set_flag(new_top, VisibleFlag);
if (old_top)
{
XtUnmanageChild(objxm_get_widget(old_top));
obj_clear_flag(old_top, VisibleFlag);
}
abobj_select(new_top);
return 0;
}
void
abobj_layer_set_size(
ABObj layers,
int new_width,
int new_height
)
{
ABObj pane;
ABObj szObj, xyObj;
Widget szWidget, xyWidget;
XRectangle sz_rect, xy_rect;
int border_w;
AB_TRAVERSAL trav;
util_dprintf(3,"abobj_layer_set_size: %s: %d x %d\n",
obj_get_name(layers), new_width, new_height);
/* If a dimension is -1, then that dimension is not being modified */
if (new_width == -1)
new_width = obj_get_width(layers);
if (new_height == -1)
new_height = obj_get_height(layers);
abobj_set_pixel_size(layers, new_width, new_height, 0);
for (trav_open(&trav, layers, AB_TRAV_SALIENT_CHILDREN);
(pane = trav_next(&trav)) != NULL; )
{
if (obj_has_border_frame(pane))
{
szObj = objxm_comp_get_subobj(pane, AB_CFG_SIZE_OBJ);
xyObj = objxm_comp_get_subobj(pane, AB_CFG_POSITION_OBJ);
szWidget = objxm_get_widget(szObj);
xyWidget = objxm_get_widget(xyObj);
x_get_widget_rect(szWidget, &sz_rect);
x_get_widget_rect(xyWidget, &xy_rect);
border_w = ((int)(xy_rect.width - sz_rect.width))/2;
}
else
border_w = 0;
if ((obj_is_text(pane) || obj_is_term_pane(pane)) &&
obj_get_num_columns(pane) != -1)
/* TextPane, TermPane with Character-based Sizing */
abobj_set_text_size(pane, new_width, new_height);
/* If Pane has "Fit Contents" size-policy, then don't set new size */
else if (obj_get_width(pane) != -1 && obj_get_height(pane) != -1)
abobj_set_pixel_size(pane, new_width, new_height, border_w);
}
trav_close(&trav);
}
/*
* Manage the visible pane in the layer, and unmanage the rest
*/
int
abobj_layer_manage_visible(
ABObj layer
)
{
AB_TRAVERSAL trav;
ABObj pane;
if (layer == NULL || !obj_is_layers(layer))
return -1;
/* manage the visible pane, unmanage the rest */
for (trav_open(&trav, layer, AB_TRAV_SALIENT_CHILDREN);
(pane = trav_next(&trav)) != NULL; )
{
if (obj_has_flag(pane, VisibleFlag))
{
if (!XtIsManaged(objxm_get_widget(pane)))
XtManageChild(objxm_get_widget(pane));
}
else
{
if (XtIsManaged(objxm_get_widget(pane)))
XtUnmanageChild(objxm_get_widget(pane));
}
}
trav_close(&trav);
return 0;
}
/*
* Make all 4 sides of pane attached to Layers object
*/
static void
set_pane_attachments(
ABObj pane
)
{
obj_set_attachment(pane, AB_CP_NORTH, AB_ATTACH_GRIDLINE, 0, 0);
obj_set_attachment(pane, AB_CP_WEST, AB_ATTACH_GRIDLINE, 0, 0);
obj_set_attachment(pane, AB_CP_EAST, AB_ATTACH_GRIDLINE, (void*)100, 0);
obj_set_attachment(pane, AB_CP_SOUTH, AB_ATTACH_GRIDLINE, (void*)100, 0);
}
/*
* obj-callback: object is being destroyed - remove from Prop dialog lists
*/
static int
obj_destroyedOCB(
ObjEvDestroyInfo info
)
{
static ABObj pane = NULL;
ABObj layers;
ABObj last_pane;
AB_ATTACH_TYPE atype;
void *aval;
int aoffset;
int i;
if (obj_get_parent(info->obj) == NULL)
return 0;
layers = obj_get_root(obj_get_parent(info->obj));
if (obj_is_layers(layers))
{
/* A Pane inside the Layers has been destroyed...*/
pane = info->obj;
/* If it was the one currently visible, then show the next one
*/
if (obj_has_flag(pane, VisibleFlag))
abobj_layer_show_next(layers);
if (obj_get_num_salient_children(layers) == 1)
{
/* Since there is only 1 pane left, we no longer need the layers.
* So, reparent the last pane to the layer's parent and destroy
* the layers object.
*/
last_pane = obj_get_child(layers, 0);
/*
* Update undo buffer to depend on this last pane for undo
* instead of the parent (layer) which is about to be nuked
*/
abobj_setup_undo_cut_layer(layers, last_pane);
/* Reparenting the last layer causes the obj_notify function to
* flush its queue, which in turn causes this function to be
* called again with the same object to destroy. Therefore we
* need to track when we are in the reparent phase so that we
* don't get into an infinite loop...
*/
obj_unparent(last_pane);
obj_append_child(obj_get_parent(layers), last_pane);
/* Copy layers object's attachments back to the last pane
* so that it remains positioned in the same spot.
*/
for (i=0; i < XtNumber(attach_dirs); i++)
{
atype = obj_get_attach_type(layers, attach_dirs[i]);
aval = obj_get_attach_value(layers,attach_dirs[i]);
aoffset = obj_get_attach_offset(layers, attach_dirs[i]);
obj_set_attachment(last_pane, attach_dirs[i], atype, aval, aoffset);
}
obj_destroy(layers);
obj_clear_flag(last_pane, InstantiatedFlag);
abobj_show_tree(last_pane, FALSE);
}
}
return 0;
}

View File

@@ -0,0 +1,357 @@
/*
* $XConsortium: abobj_layout.c /main/3 1995/11/06 17:16:15 rswiston $
*
* @(#)abobj_layout.c 1.17 15 Feb 1994 cde_app_builder/src/libABobj
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
***********************************************************************
* ab_layout.c - Implements Layout semantics for objects
*
*
***********************************************************************
*/
#include <stdio.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <Xm/Xm.h>
#include <ab_private/objxm.h>
#include <ab_private/trav.h>
#include "abobjP.h"
#define LL_BUF_SIZE 20
/*************************************************************************
** **
** Private Function Declarations **
** **
**************************************************************************/
static void clear_layout(
ABObj obj
);
/*************************************************************************
** **
** Private Data **
** **
**************************************************************************/
static ABObj layout_list[LL_BUF_SIZE];
static int layout_count = 0;
/*************************************************************************
** **
** Function Definitions **
** **
**************************************************************************/
int
abobj_layout_changed(
ABObj obj
)
{
if (obj->attachments)
layout_list[layout_count++] = obj;
return 0;
}
/*
* Given a new x,y,width,height, calculate appropriate layout info
*/
int
abobj_calculate_new_layout(
ABObj obj,
int new_x,
int new_y,
Dimension new_width,
Dimension new_height
)
{
ABObj parent;
ABAttachListPtr attachments;
Position x, y;
Dimension width, height;
Dimension p_width, p_height;
int gridpos;
if ((attachments = obj->attachments) == NULL)
return -1;
if (obj->ui_handle == NULL)
{
if (util_get_verbosity() > 0)
fprintf(stderr,"abobj_calculate_new_layout: %s: NULL widget\n", obj_get_name(obj));
return -1;
}
XtVaGetValues((Widget)obj->ui_handle,
XmNx, &x,
XmNy, &y,
XmNwidth, &width,
XmNheight, &height,
NULL);
parent = obj_get_parent(obj);
XtVaGetValues((Widget)parent->ui_handle,
XmNwidth, &p_width,
XmNheight, &p_height,
NULL);
switch(attachments->west.type)
{
case AB_ATTACH_POINT:
attachments->west.offset = new_x;
break;
case AB_ATTACH_GRIDLINE:
gridpos = (100 * new_x)/(int)p_width;
attachments->west.value = (void*)gridpos;
break;
case AB_ATTACH_CENTER_GRIDLINE:
gridpos = (100 * (new_x + (int)new_width/2))/(int)p_width;
attachments->west.value = (void*)gridpos;
break;
case AB_ATTACH_OBJ:
case AB_ATTACH_ALIGN_OBJ_EDGE:
attachments->west.offset += (new_x - x);
if (new_x == 0 && attachments->west.offset < 0)
attachments->west.offset = 0;
break;
}
switch(attachments->east.type)
{
case AB_ATTACH_POINT:
attachments->east.offset = p_width - (new_x + new_width);
break;
case AB_ATTACH_GRIDLINE:
gridpos = (100 * (new_x + (int)new_width))/(int)p_width;
attachments->east.value = (void*)gridpos;
break;
case AB_ATTACH_CENTER_GRIDLINE:
gridpos = (100 * (new_x + (int)new_width/2))/(int)p_width;
attachments->east.value = (void*)gridpos;
break;
case AB_ATTACH_OBJ:
attachments->east.offset = p_width - (new_x + new_width + 1);
break;
case AB_ATTACH_ALIGN_OBJ_EDGE:
attachments->east.offset += (x + width - new_x - new_width);
break;
}
switch(attachments->north.type)
{
case AB_ATTACH_POINT:
attachments->north.offset = new_y;
break;
case AB_ATTACH_GRIDLINE:
gridpos = (100 * new_y)/(int)p_height;
attachments->north.value = (void*)gridpos;
break;
case AB_ATTACH_CENTER_GRIDLINE:
gridpos = (100 * (new_y + (int)new_height/2))/(int)p_height;
attachments->north.value = (void*)gridpos;
break;
case AB_ATTACH_OBJ:
case AB_ATTACH_ALIGN_OBJ_EDGE:
attachments->north.offset += (new_y - y);
if (new_y == 0 && attachments->north.offset < 0)
attachments->north.offset = 0;
break;
}
switch(attachments->south.type)
{
case AB_ATTACH_POINT:
attachments->south.offset = p_height - (new_y + new_height);
break;
case AB_ATTACH_GRIDLINE:
gridpos = (100 * (new_y + (int)new_height))/(int)p_height;
attachments->south.value = (void*)gridpos;
break;
case AB_ATTACH_CENTER_GRIDLINE:
gridpos = (100 * (new_y + (int)new_height/2))/(int)p_height;
attachments->south.value = (void*)gridpos;
break;
case AB_ATTACH_OBJ:
attachments->south.offset = p_height - (new_y + new_height + 1);
break;
case AB_ATTACH_ALIGN_OBJ_EDGE:
attachments->south.offset += (y + height - new_y - new_height);
break;
}
objxm_obj_set_attachment_args(obj, OBJXM_CONFIG_BUILD);
return 0;
}
/*
* Sort the objects children by either X or Y.
*/
void
abobj_sort_children(
ABObj obj,
int sort
)
{
ABObj child1, child2;
ABObj pobj = objxm_comp_get_subobj(obj, AB_CFG_PARENT_OBJ);
int num_children = obj_get_num_children(pobj);
int i, j;
int x1, y1, x2, y2;
for (i = 0; i < num_children; i++)
{
for (j = i; j < num_children; j++)
{
child1 = obj_get_child(pobj, i);
child2 = obj_get_child(pobj, j);
x1 = obj_get_x(child1);
y1 = obj_get_y(child1);
x2 = obj_get_x(child2);
y2 = obj_get_y(child2);
if (sort == XSORT)
{
if (x2 < x1 || (x2 == x1 && y2 < y1))
obj_swap_siblings(child1, child2);
} else
{
if (y2 < y1 || (y2 == y1 && x2 < x1))
obj_swap_siblings(child1, child2);
}
}
}
}
/*
* Set North and West to objs y and x positions. Set
* South and East to none.
*/
void
clear_layout(
ABObj obj
)
{
obj_set_attachment(obj, AB_CP_NORTH,
AB_ATTACH_POINT,
NULL,
obj_get_y(obj));
obj_set_attachment(obj, AB_CP_WEST,
AB_ATTACH_POINT,
NULL,
obj_get_x(obj));
obj_set_attachment(obj, AB_CP_SOUTH,
AB_ATTACH_NONE,
NULL,
0);
obj_set_attachment(obj, AB_CP_EAST,
AB_ATTACH_NONE,
NULL,
0);
}
/*
* Either works on a object or its children.
* Clear the obj's attachments entirely if init_attachments
* is TRUE but also configure the widget hierarchy to have two
* basic connections: North and West point attachments with the
* objs x and y offsets.
*/
void
abobj_clear_layout(
ABObj obj,
BOOL clear_children,
BOOL init_attachments
)
{
ABObj pos_obj = objxm_comp_get_subobj(obj, AB_CFG_POSITION_OBJ);
ABAttachment attach;
if (clear_children)
{
AB_TRAVERSAL trav;
ABObj child;
for (trav_open(&trav, pos_obj, AB_TRAV_SALIENT_CHILDREN |
AB_TRAV_MOD_SAFE);
(child = trav_next(&trav)) != NULL; )
{
/* Configure the tree to have just basic attachments */
attach.type = AB_ATTACH_POINT;
attach.value = (void *)NULL;
attach.offset = abobj_get_y(child);
abobj_set_attachment(child, AB_CP_NORTH, &attach);
attach.type = AB_ATTACH_POINT;
attach.value = (void *)NULL;
attach.offset = abobj_get_x(child);
abobj_set_attachment(child, AB_CP_WEST, &attach);
attach.type = AB_ATTACH_NONE;
attach.value = (void *)NULL;
attach.offset = 0;
abobj_set_attachment(child, AB_CP_SOUTH, &attach);
abobj_set_attachment(child, AB_CP_EAST, &attach);
abobj_instantiate_changes(child);
/*
* Clear out all attachments in obj structure
* if init_attachments is set
*/
if (init_attachments)
obj_init_attachments(child);
}
trav_close(&trav);
}
else
{
attach.type = AB_ATTACH_POINT;
attach.value = (void *)NULL;
attach.offset = abobj_get_y(pos_obj);
abobj_set_attachment(pos_obj, AB_CP_NORTH, &attach);
attach.type = AB_ATTACH_POINT;
attach.value = (void *)NULL;
attach.offset = abobj_get_x(pos_obj);
abobj_set_attachment(pos_obj, AB_CP_WEST, &attach);
attach.type = AB_ATTACH_NONE;
attach.value = (void *)NULL;
attach.offset = 0;
abobj_set_attachment(pos_obj, AB_CP_SOUTH, &attach);
abobj_set_attachment(pos_obj, AB_CP_EAST, &attach);
abobj_instantiate_changes(pos_obj);
/*
* Clear out all attachments in obj structure
* if init_attachments is set
*/
if (init_attachments)
obj_init_attachments(pos_obj);
}
}

View File

@@ -0,0 +1,282 @@
/*
* $XConsortium: abobj_list.c /main/3 1995/11/06 17:16:26 rswiston $
*
* @(#)abobj_list.c 1.7 25 Jul 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* File: abobj_list.c - handles a scrolling list of ABObjs
*/
#include <stdio.h>
#include <Xm/List.h>
#include <ab_private/abobj_list.h>
#include <ab_private/ui_util.h>
#include <ab_private/trav.h>
/*************************************************************************
** **
** Private Function Declarations **
** **
**************************************************************************/
/*************************************************************************
** **
** Data **
** **
**************************************************************************/
/*************************************************************************
** **
** Function Definitions **
** **
**************************************************************************/
/*
** Traverse the project and load all objects into the scrolling list. This
** is a generalized function that traverses all salient objects as candidates
** to be displayed. It takes an additional test function as an argument, and
** applies that function to each object in turn. The object will appear in
** the list only if the test function returns non-zero.
**
** ("He's making a list, and checking it twice..." (well, o.k., once))
*/
int
abobj_list_load(
Widget list,
ABObj root,
ABObjTestFunc list_obj_func
)
{
int return_value = 0;
if ((root == NULL) || (list == NULL)) return(0);
/* Clear out the list so we can start afresh */
XmListDeleteAllItems(list);
return_value = abobj_list_update(list, root, list_obj_func);
return return_value;
}
int
abobj_list_update(
Widget list,
ABObj root,
ABObjTestFunc list_obj_func
)
{
ABObj obj = NULL;
AB_TRAVERSAL trav;
STRING modname;
int item_count = 0;
int item_pos = 0;
if ((root == NULL) || (list == NULL)) return(0);
for( (trav_open(&trav,root,AB_TRAV_SALIENT));
(obj = trav_next(&trav)) != NULL; )
{
if (obj_get_name(obj) != NULL)
{
modname = abobj_get_moduled_name(obj);
if((*list_obj_func)(obj))
{
if (ui_list_find_item(list,modname,&item_pos)
== ERR_NOT_FOUND)
{
ui_list_add_item(list,modname,0);
}
item_count++;
}
else
{
ui_list_delete_item(list,modname);
}
XtFree(modname);
}
}
trav_close(&trav);
return(item_count);
}
/*
* An object was created - add it to the list (maybe)
*
* Returns a negative ERR_ code if an error occurs
* Returns 0 if the object was not added
* Returns 1 if the object was added to the list
*/
int
abobj_list_obj_created(
Widget list,
ABObj obj,
ABObjTestFunc list_obj_test
)
{
int return_value = 0;
int rc = 0; /* return code */
if ((obj == NULL) || (list == NULL)) return(0);
if (!list_obj_test(obj))
{
return_value = 0;
goto epilogue;
}
if (obj_get_name(obj) != NULL)
{
STRING modname = abobj_get_moduled_name(obj);
rc = ui_list_add_item(list, modname, 0);
if (rc >= 0)
{
return_value = 1;
}
else
{
return_value = rc;
}
XtFree(modname); modname = NULL;
}
epilogue:
return return_value;
}
/*
** Some object has been deleted and we should act accordingly.
** Note -- this is a synthetic callback generated from within AppBuilder,
** not a traditional Xt-style callback (hence the different argument style)
*/
int
abobj_list_obj_destroyed(
Widget list,
ABObj obj,
ABObjTestFunc list_obj_test
)
{
STRING modname = NULL;
if ((obj == NULL) || (list == NULL)) return(0);
/*
** Check to make sure this is an object we'd have in the list to
** begin with.
*/
if (list_obj_test(obj)) {
modname = abobj_get_moduled_name(obj);
ui_list_delete_item(list, modname);
XtFree(modname);
}
return(0);
}
/*
** Some object has been renamed and we should act accordingly.
** Note -- this is a synthetic callback generated from within AppBuilder,
** not a traditional Xt-style callback (hence the different argument style)
*/
int
abobj_list_obj_renamed(
Widget list,
ABObj obj,
STRING old_name,
ABObjTestFunc list_obj_test
)
{
int rc = 0; /* return code */
STRING new_modname = NULL;
STRING old_modname = NULL;
ABObj module = obj_get_module(obj);
if ((obj == NULL) || (list == NULL)) return(0);
if (obj_is_module(obj))
{
ui_list_replace_item_prefix(
list, old_name, obj_get_name(obj));
}
else if ((module != NULL) && list_obj_test(obj)) {
new_modname = abobj_get_moduled_name(obj);
old_modname = abobj_alloc_moduled_name(
obj_get_name(module), old_name);
rc = ui_list_replace_item(list, old_modname, new_modname);
if (rc == ERR_NOT_FOUND)
{
ui_list_add_item(list, new_modname, 0);
}
XtFree(new_modname);
XtFree(old_modname);
}
return(0);
}
/*
* Completely rebuild all that is known about this object or tree
*/
int
abobj_list_obj_updated(
Widget list,
ObjEvUpdateInfo info,
ABObjTestFunc list_obj_test
)
{
return abobj_list_update(list, info->obj, list_obj_test);
}
int
abobj_list_obj_reparented(
Widget list,
ObjEvReparentInfo info,
ABObjTestFunc list_obj_test
)
{
static char full_name[BUFSIZ];
STRING moduled_name = NULL,
module = NULL,
name = NULL;
ABObj obj = NULL;
int ret = 0;
obj = info->obj;
if ((obj == NULL) || (list == NULL)) return(0);
if (obj_get_parent(obj) == NULL)
{
module = obj_get_name(obj_get_module(info->old_parent));
strcpy(full_name, module);
strcat(full_name, " :: ");
strcat(full_name, obj_get_name(obj));
name = full_name;
}
else
name = abobj_get_moduled_name(obj);
if (list_obj_test(obj))
ret = ui_list_add_item(list, name, 0);
else
ret = ui_list_delete_item(list, name);
return (ret);
}

View File

@@ -0,0 +1,75 @@
/*
* $XConsortium: abobj_list.h /main/3 1995/11/06 17:16:36 rswiston $
*
* @(#)abobj_list.h 1.3 22 Jul 1994
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* File: abobj_list.h - keeps a scrolling list of object names
*/
#ifndef _ab_abobj_list_h
#define _ab_abobj_list_h
#include <ab_private/obj_notify.h>
#include <ab_private/abobj.h>
int abobj_list_load(
Widget w,
ABObj root,
ABObjTestFunc show_obj_func
);
int abobj_list_update(
Widget w,
ABObj root,
ABObjTestFunc show_obj_func
);
int abobj_list_obj_created(
Widget list,
ABObj obj,
ABObjTestFunc show_obj_func
);
int abobj_list_obj_renamed(
Widget list,
ABObj obj,
STRING old_name,
ABObjTestFunc show_obj_func
);
int abobj_list_obj_destroyed(
Widget list,
ABObj obj,
ABObjTestFunc show_obj_func
);
int abobj_list_obj_updated(
Widget list,
ObjEvUpdateInfo update_info,
ABObjTestFunc show_obj_func
);
int abobj_list_obj_reparented(
Widget list,
ObjEvReparentInfo info,
ABObjTestFunc list_obj_test
);
#endif /* _ab_abobj_list_h */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,402 @@
/*
* $XConsortium: abobj_move.c /main/3 1995/11/06 17:17:00 rswiston $
*
* @(#)abobj_move.c 1.25 15 Feb 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
***********************************************************************
* ab_move.c - Implements moving UI objects around
*
*
***********************************************************************
*/
#include <stdio.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <ab_private/x_util.h>
#include <ab_private/objxm.h>
#include <ab_private/abobj_edit.h>
#include "abobjP.h"
/* XRectangle Transformation macros used for passing rects up/down embedded
* coordinate systems.
*/
#define rect_passtoparent(a, b, rect) \
{(rect)->x = (unsigned short)(rect)->x + (a); (rect)->y = (unsigned short)(rect)->y + (b);}
#define rect_passtochild(a, b, rect) \
{(rect)->x = (rect)->x - (a); (rect)->y = (rect)->y - (b);}
const int AB_drag_threshold = 4;
static void undo_move(
ABUndoRec undo_rec
);
/*************************************************************************
** **
** Private Data **
** **
**************************************************************************/
static XRectangle drag_init_rect, orig_rect, move_rect;
static Boolean first_move = True;
static ABObj xy_obj;
static Widget xy_widget;
static Widget parent;
static ABSelectedRec sel;
/*************************************************************************
** **
** Function Definitions **
** **
**************************************************************************/
int
abobjP_move_object_outline(
ABObj obj,
XMotionEvent *mevent
)
{
static XRectangle parent_rect;
static XRectangle last_rect;
static int x_offset, y_offset;
static Dimension border_w;
static Display *dpy;
XRectangle widget_rect;
int trans_x, trans_y;
/* First time: set up initial move variables */
if (first_move)
{
if (obj_is_item(obj))
obj = obj_get_parent(obj);
obj = obj_get_root(obj);
/* Multiple objects might be selected...*/
if (obj_is_control(obj) ||
obj_is_group(obj) ||
obj_is_pane(obj))
{
abobj_get_selected(obj_get_root(obj_get_parent(obj)), False, False, &sel);
}
else
{
sel.count = 1;
sel.list = (ABObj*)util_malloc(sizeof(ABObj));
sel.list[0] = obj;
}
xy_obj = objxm_comp_get_subobj(obj, AB_CFG_POSITION_OBJ);
xy_widget = (Widget)xy_obj->ui_handle;
if (xy_widget == NULL)
{
if (util_get_verbosity() > 2)
fprintf(stderr,"abobjP_move_object_outline: %s :no POSITION widget\n",
util_strsafe(obj_get_name(obj)));
return ERROR;
}
dpy = XtDisplay(xy_widget);
parent = XtParent(xy_widget);
x_get_widget_rect(xy_widget, &widget_rect);
x_get_widget_rect(parent, &parent_rect);
if (sel.count > 1)
{
abobj_get_rect_for_objects(sel.list, sel.count, &orig_rect);
}
else
{
orig_rect = widget_rect;
XtVaGetValues(xy_widget, XtNborderWidth, &border_w, NULL);
orig_rect.width += (2*border_w);
orig_rect.height += (2*border_w);
orig_rect.width--;
orig_rect.height--;
}
move_rect = orig_rect;
drag_init_rect.x = mevent->x - AB_drag_threshold;
drag_init_rect.y = mevent->y - AB_drag_threshold;
drag_init_rect.width = drag_init_rect.height = 2 * AB_drag_threshold;
x_offset = widget_rect.x - orig_rect.x + mevent->x;
y_offset = widget_rect.y - orig_rect.y + mevent->y;
first_move = False;
rect_zero_out(&last_rect);
}
/* Don't begin rendering move outline until pointer is out of
* the drag_init bounding box
*/
else if (!rect_includespoint(&drag_init_rect, mevent->x, mevent->y))
{
Window win;
/* event coords are relative to widget-must translate to parent */
XTranslateCoordinates(dpy, XtWindow(xy_widget), XtWindow(parent),
mevent->x, mevent->y, &trans_x, &trans_y, &win);
move_rect.x = trans_x - x_offset;
move_rect.y = trans_y - y_offset;
/* Ensure move outline is within the parent's rect */
if (move_rect.x < 0)
move_rect.x = 0;
else if ((move_rect.x + (short)move_rect.width + 1) >= (short)parent_rect.width)
move_rect.x = parent_rect.width - (move_rect.width + 1);
if (move_rect.y < 0)
move_rect.y = 0;
else if ((move_rect.y + (short)move_rect.height + 1) >= (short)parent_rect.height)
move_rect.y = parent_rect.height - (move_rect.height + 1);
/* If cursor has moved since last event, erase previous outline
* and render new one (using XOR function)
*/
if (!rect_equal(&move_rect, &last_rect))
{
if (!rect_isnull(&last_rect))
x_box_r(parent, &last_rect);
x_box_r(parent, &move_rect);
last_rect = move_rect;
}
}
return OK;
}
/*
* Move the object to the location of the last drag rect
*/
int
abobj_move(
ABObj obj,
XEvent *event
)
{
short x_delta = 0;
short y_delta = 0;
if (!first_move)
{
first_move = True;
/* erase last box */
x_box_r(parent, &move_rect);
x_delta = move_rect.x - orig_rect.x;
y_delta = move_rect.y - orig_rect.y;
/*
* Before the move is performed, record undo information
*/
(void)abobj_set_undo(sel.list, sel.count, undo_move, AB_UNDO_MOVE);
abobj_nudge_selected(sel.list, sel.count, x_delta, y_delta, True);
util_free(sel.list);
return OK;
}
return ERROR;
}
void
abobj_nudge_selected(
ABObj *sel_list,
int sel_count,
short x_delta,
short y_delta,
BOOL reselect
)
{
ABObj moveobj;
ABObj xyobj;
XRectangle new_rect;
int i;
for (i=0; i < sel_count; i++)
{
if (obj_is_layers(obj_get_parent(sel_list[i])))
moveobj = obj_get_parent(sel_list[i]);
else
moveobj = sel_list[i];
xyobj = objxm_comp_get_subobj(moveobj, AB_CFG_POSITION_OBJ);
x_get_widget_rect(objxm_get_widget(xyobj), &new_rect);
new_rect.x += x_delta;
new_rect.y += y_delta;
/* Move object */
abobj_set_xy(moveobj, new_rect.x, new_rect.y);
/*
if (xyobj->attachments)
abobj_calculate_new_layout(xyobj, new_rect.x, new_rect.y,
new_rect.width, new_rect.height);
*/
abobj_tree_instantiate_changes(moveobj);
/*
* UGLY WORKAROUND for Motif bug which prevents a 1 pixel move
* to the Left from working if only 1 object is being moved...
*/
if (sel_count == 1 && x_delta == -1)
abobj_force_dang_form_resize(moveobj);
if (reselect)
abobj_select(sel_list[i]);
}
}
void
abobj_move_selected(
ABObj *sel_list,
int sel_count,
XRectangle *start,
XRectangle *stop
)
{
ABObj obj;
XRectangle obj_rect;
int i;
/*
* Loop through all selected objects with the same owner. Only
* move selected objects, groups without anchors, and anchored groups
* if the anchor is also selected.
*/
/* andy, revisit to add in all the group and anchor stuff */
for (i = 0; i < sel_count; i++)
{
obj = sel_list[i];
x_get_widget_rect(objxm_get_widget(obj), &obj_rect);
rect_passtochild(start->x, start->y, &obj_rect);
rect_passtoparent(stop->x, stop->y, &obj_rect);
/*
undo_record_move(obj);
*/
abobj_set_xy(obj, (int)obj_rect.x, (int)obj_rect.y);
abobj_instantiate_changes(obj);
}
}
/*
* Undo function for move
* NOTE: may need to change when moving multiple objects is
* implemented.
*/
static void
undo_move(
ABUndoRec undo_rec
)
{
int i,
x,
y;
ABObj obj;
if (!undo_rec)
return;
/*
* Set undo to undo this move (undo of undo)
*/
(void)abobj_set_undo(undo_rec->list, undo_rec->count,
undo_move, AB_UNDO_MOVE);
/*
* For each object that was moved previously
*/
for (i = 0; i < undo_rec->count; ++i)
{
/*
* If undo record is not the right type, something is WRONG !!
*/
if (undo_rec->info_list[i].type != AB_UNDO_MOVE)
continue;
/*
* Get previous x,y and object taht was moved
*/
x = undo_rec->info_list[i].info.move.x;
y = undo_rec->info_list[i].info.move.y;
obj = undo_rec->list[i];
/* Move object */
abobj_set_xy(obj, x, y);
if (xy_obj->attachments)
abobj_calculate_new_layout(xy_obj, x, y,
move_rect.width, move_rect.height);
abobj_instantiate_changes(obj);
}
}
BOOL
abobj_is_movable(
ABObj obj
)
{
BOOL movable = True;
ABObj pobj;
AB_CONTAINER_TYPE cont_type;
/* If object is a child of a Group and the group has a
* defined layout type, then it is not movable
*/
pobj = obj_get_root(obj_get_parent(obj));
if (obj_is_group(pobj) &&
obj_get_group_type(pobj) != AB_GROUP_IGNORE)
movable = False;
switch(obj_get_type(obj))
{
case AB_TYPE_TEXT_PANE:
case AB_TYPE_TERM_PANE:
case AB_TYPE_DRAWING_AREA:
case AB_TYPE_CONTAINER:
{
/* If object is child of PanedWindow, it cannot be moved */
if (obj_is_paned_win(pobj))
movable = False;
else if (obj_is_container(obj))
{
cont_type = obj_get_container_type(obj);
if (cont_type == AB_CONT_MENU_BAR ||
cont_type == AB_CONT_TOOL_BAR ||
cont_type == AB_CONT_FOOTER ||
cont_type == AB_CONT_BUTTON_PANEL)
movable = False;
}
break;
}
default:
break;
}
return movable;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,689 @@
/*
* $XConsortium: abobj_select.c /main/3 1995/11/06 17:17:19 rswiston $
*
* @(#)abobj_select.c 1.37 15 Feb 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
***********************************************************************
* ab_select.c - Implements "select" behavior of a UI object
*
*
***********************************************************************
*/
#include <stdio.h>
#include <X11/Intrinsic.h>
#include <X11/cursorfont.h>
#include <X11/StringDefs.h>
#include <Xm/Xm.h>
#include <Xm/ScrolledW.h>
#include <ab_private/trav.h>
#include <ab_private/ui_util.h>
#include <ab_private/x_util.h>
#include <ab_private/objxm.h>
#include <ab_private/proj.h>
#include "abobjP.h"
const int AB_selected_rect_size = 7;
/*************************************************************************
** **
** Private Function Declarations **
** **
**************************************************************************/
static void select_feedback(
ABObj selObj,
BOOL on
);
static void select_footer(
ABObj obj,
BOOL on
);
static void turnon_select_feedback(
ABObj selObj,
BOOL resizable
);
static void turnoff_select_feedback(
ABObj selObj,
BOOL resizable
);
static void draw_select_feedback(
ABObj selObj,
BOOL resizable
);
/*
* Event Handlers
*/
static void monitor_cursor(
Widget w,
XtPointer clientdata,
XEvent *event,
Boolean *cont_dispatch
);
static void select_feedback_redraw(
Widget w,
XtPointer clientdata,
XEvent *event,
Boolean *cont_dispatch
);
/*************************************************************************
** **
** Private Data **
** **
**************************************************************************/
static GC AB_grab_handle_gc;
static XRectangle rb_rect;
static Widget rb_widget;
static BOOL first_time = TRUE;
/*************************************************************************
** **
** Function Definitions **
** **
**************************************************************************/
/*
* cause the object to appear "selected"
*/
void
abobj_select(
ABObj obj
)
{
AB_CONTAINER_TYPE cont_type;
ABObj rootObj = obj_get_root(obj);
ABObj selObj;
/* Make sure the window is on screen */
if (obj_is_window(rootObj))
ui_win_front(objxm_get_widget(rootObj));
proj_set_cur_module(obj_get_module(obj));
if (obj_is_selected(rootObj))
return;
obj_set_is_selected(rootObj, TRUE);
if (obj_is_module(rootObj))
return;
if (obj_is_item(obj))
{
rootObj = obj_get_root(obj_get_parent(obj));
obj_set_is_selected(rootObj, TRUE);
}
selObj = objxm_comp_get_subobj(rootObj, AB_CFG_SELECT_OBJ);
if (selObj == NULL)
{
if (util_get_verbosity() > 0)
fprintf(stderr, "abobj_select: %s :no selection object\n",
obj_get_name(rootObj));
return;
}
if (obj_is_window(rootObj))
select_footer(selObj, True);
else
turnon_select_feedback(selObj, abobj_is_directly_resizable(rootObj));
}
/*
* remove "select" feedback from object
*/
void
abobj_deselect(
ABObj obj
)
{
AB_CONTAINER_TYPE cont_type;
ABObj rootObj = obj_get_root(obj);
ABObj selObj;
if (!obj_is_selected(rootObj))
return;
obj_set_is_selected(rootObj, FALSE);
if (obj_is_module(obj))
return;
if (obj_is_item(obj))
{
rootObj = obj_get_root(obj_get_parent(obj));
obj_set_is_selected(rootObj, FALSE);
}
selObj = objxm_comp_get_subobj(rootObj, AB_CFG_SELECT_OBJ);
if (selObj == NULL)
{
if (util_get_verbosity() > 0)
fprintf(stderr, "abobj_deselect: %s :no selection object\n",
obj_get_name(rootObj));
return;
}
if (obj_is_window(rootObj))
select_footer(selObj, False);
else
turnoff_select_feedback(selObj, abobj_is_directly_resizable(rootObj));
}
void
abobj_deselect_all(
ABObj root
)
{
ABObj obj = root;
AB_TRAVERSAL trav;
if (obj == NULL)
return;
for (trav_open(&trav, obj, AB_TRAV_UI);
(obj = trav_next(&trav)) != NULL; )
{
if (obj_is_selected(obj))
abobj_deselect(obj);
}
trav_close(&trav);
/*
* The browser displays the module as well,
* so we must deselect it when abobj_deselect_all() is
* called
*/
if (obj_is_project(root))
{
for (trav_open(&trav, root, AB_TRAV_MODULES);
(obj = trav_next(&trav)) != NULL; )
{
if (obj_is_selected(obj))
abobj_deselect(obj);
}
trav_close(&trav);
}
else
{
ABObj module = obj_get_module(root);
if (obj_is_selected(module))
abobj_deselect(module);
}
}
/*
* abobj_get_selected- Return an array containing ptrs to
* all selected ABObjs in a given
*/
int
abobj_get_selected(
ABObj root,
BOOL include_root,
BOOL include_items,
ABSelectedRec *sel
)
{
ABObj obj = root;
AB_TRAVERSAL trav;
sel->count = 0;
sel->list = NULL;
if (obj == NULL)
return -1;
/* First count up all selected objs */
for (trav_open(&trav, obj, AB_TRAV_SALIENT_UI);
(obj = trav_next(&trav)) != NULL; )
{
if (obj_is_selected(obj) &&
!(obj_is_item(obj) && !include_items) &&
!(obj == root && !include_root))
(sel->count)++;
}
trav_close(&trav);
/* Now alloc & fill array with selected objs */
obj = root;
if (sel->count > 0)
{
int i = 0;
sel->list = (ABObj*)XtMalloc(sel->count * sizeof(ABObj));
for (trav_open(&trav, obj, AB_TRAV_SALIENT_UI);
(obj = trav_next(&trav)) != NULL; )
{
if (obj_is_selected(obj) &&
!(obj_is_item(obj) && !include_items) &&
!(obj == root && !include_root))
sel->list[i++] = obj;
}
}
return 0;
}
/*
* Sort list of selected objects
*/
void
abobj_sort_sel_list(
ABObj *sel_list,
int sel_count,
int sort
)
{
int i, j;
int x1, y1, x2, y2;
ABObj tmp_obj;
/*
* Sort the list of objects based on x and y values
*/
for (i = 0; i < sel_count; i++)
{
for (j = i; j < sel_count; j++)
{
x1 = obj_get_x(sel_list[i]);
y1 = obj_get_y(sel_list[i]);
x2 = obj_get_x(sel_list[j]);
y2 = obj_get_y(sel_list[j]);
if (sort == XSORT)
{
if (x2 < x1 || (x2 == x1 && y2 < y1))
{
tmp_obj = sel_list[i];
sel_list[i] = sel_list[j];
sel_list[j] = tmp_obj;
}
} else
{
if (y2 < y1 || (y2 == y1 && x2 < x1))
{
tmp_obj = sel_list[i];
sel_list[i] = sel_list[j];
sel_list[j] = tmp_obj;
}
}
}
}
}
/*
* render select feedback for objects which do not have grab handles
*/
static void
select_feedback(
ABObj selObj,
BOOL on
)
{
Widget selWidget;
Pixel contrast;
selWidget = (Widget)selObj->ui_handle;
if (selWidget == NULL)
{
if (util_get_verbosity() > 0)
fprintf(stderr, "select_feedback: %s :no selection widget\n",
obj_get_name(selObj));
return;
}
if (on)
{
contrast = x_contrast_color(selWidget);
XtVaSetValues(selWidget,
XmNborderWidth, (XtArgVal)2,
XmNborderColor, contrast,
NULL);
}
else
XtVaSetValues(selWidget, XmNborderWidth, (XtArgVal)0, NULL);
}
static void
select_footer(
ABObj selObj,
BOOL on
)
{
Widget selWidget;
Pixel contrast;
XmString xmstr;
if (!(selWidget = (Widget)selObj->ui_handle))
return;
if (on)
{
contrast = x_contrast_color(selWidget);
xmstr = XmStringCreateLocalized("Window SELECTED ");
XtVaSetValues(selWidget,
XmNlabelString, xmstr,
XmNforeground, contrast,
NULL);
XmStringFree(xmstr);
}
else /* off */
{
xmstr = XmStringCreateLocalized(" ");
XtVaSetValues(selWidget,
XmNlabelString, xmstr,
NULL);
XmStringFree(xmstr);
}
}
/*
* set event handlers to draw the grab handles on
* the object's selection widget
*/
static void
turnon_select_feedback(
ABObj selObj,
BOOL resizable
)
{
Widget selWidget;
selWidget = (Widget)selObj->ui_handle;
if (selWidget == NULL)
return;
draw_select_feedback(selObj, resizable);
XtAddEventHandler(selWidget, StructureNotifyMask | ExposureMask, FALSE,
select_feedback_redraw, (XtPointer)resizable);
XtAddEventHandler(selWidget, PointerMotionMask, FALSE,
monitor_cursor, (XtPointer)selObj);
}
/*
* remove the expose event handlers and clear the
* grab handles off the widget
*/
static void
turnoff_select_feedback(
ABObj selObj,
BOOL resizable
)
{
XRectangle w_rect;
Widget selWidget;
selWidget = (Widget)selObj->ui_handle;
if (selWidget == NULL)
return;
x_get_widget_rect(selWidget, &w_rect);
XtRemoveEventHandler(selWidget, StructureNotifyMask | ExposureMask, FALSE,
select_feedback_redraw, (XtPointer)resizable);
XtRemoveEventHandler(selWidget, PointerMotionMask, FALSE,
monitor_cursor, (XtPointer)selObj);
/* Make sure cursor is reset to normal */
monitor_cursor(selWidget, selObj, NULL, NULL);
ui_refresh_widget_tree(selWidget);
}
/*
* Draw the grabhandles on the selection-widget for the object
*/
static void
draw_select_feedback(
ABObj selObj,
BOOL resizable
)
{
ABObj obj;
Widget selWidget;
Dimension width = 0;
Dimension height = 0;
register int x0,y0,x1,y1;
int border_w;
Display *display;
Drawable drawable;
XGCValues gc_val;
unsigned long bg, color_contrast;
int grabbox_size;
obj = obj_get_root(selObj);
selWidget = (Widget)selObj->ui_handle;
if ( (obj_is_drawing_area(obj) || obj_is_text_pane(obj)) &&
(obj_has_hscrollbar(obj) || obj_has_vscrollbar(obj)) )
{
ABObj swobj = objxm_comp_get_subobj(obj, AB_CFG_SIZE_OBJ);
Widget cwidget;
XtVaGetValues((Widget)swobj->ui_handle,
XmNclipWindow, &cwidget,
NULL);
if (cwidget)
{
XtVaGetValues(cwidget,
XtNwidth, &width,
XtNheight, &height,
NULL);
XtVaGetValues(selWidget,
XtNbackground, &bg,
NULL);
}
}
if (height == 0 || width == 0)
XtVaGetValues(selWidget,
XtNwidth, &width,
XtNheight, &height,
XtNbackground,&bg,
NULL);
/*
if (obj_is_control(obj))
grabbox_size = (AB_selected_rect_size / 2) + 1;
else
*/
grabbox_size = AB_selected_rect_size;
if (obj_is_control(obj))
border_w = 1;
else
border_w = 2;
x0 = y0 = border_w - 1;
x1 = width - grabbox_size;
y1 = height - grabbox_size;
color_contrast = x_contrast_color(selWidget);
display = (Display *) XtDisplay(selWidget);
drawable = (Drawable) XtWindow(selWidget);
if (!AB_grab_handle_gc)
{
gc_val.foreground = color_contrast;
gc_val.line_width = border_w;
gc_val.function = GXcopy;
gc_val.subwindow_mode = IncludeInferiors;
AB_grab_handle_gc = XCreateGC(display, drawable,
(GCFunction | GCForeground | GCLineWidth | GCSubwindowMode),
&gc_val);
}
else
{
XSetForeground(display, AB_grab_handle_gc, color_contrast);
XSetLineAttributes(display, AB_grab_handle_gc, border_w,
LineSolid, CapButt, JoinMiter);
}
/* Draw Select Rectangle */
XDrawRectangle(display, drawable, AB_grab_handle_gc,
x0, y0,
width-border_w, height-border_w);
/* If Obj is Resizable, Draw Resize handles */
if (resizable)
{
/* North-West */
XFillRectangle(display, drawable, AB_grab_handle_gc, x0, y0,
grabbox_size, grabbox_size);
/* South-West */
XFillRectangle(display, drawable, AB_grab_handle_gc, x0, y1,
grabbox_size, grabbox_size);
/* North-East */
XFillRectangle(display, drawable, AB_grab_handle_gc, x1, y0,
grabbox_size, grabbox_size);
/* South-East */
XFillRectangle(display, drawable, AB_grab_handle_gc, x1, y1,
grabbox_size, grabbox_size);
/* North */
XFillRectangle(display, drawable, AB_grab_handle_gc, (x0+x1)/2, y0,
grabbox_size, grabbox_size);
/* South */
XFillRectangle(display, drawable, AB_grab_handle_gc, (x0+x1)/2, y1,
grabbox_size, grabbox_size);
/* West */
XFillRectangle(display, drawable, AB_grab_handle_gc, x0, (y0+y1)/2,
grabbox_size, grabbox_size);
/* East */
XFillRectangle(display, drawable, AB_grab_handle_gc, x1, (y0+y1)/2,
grabbox_size, grabbox_size);
}
XFlush(display);
}
/*
* EventHandler: detect when cursor moves over grab handles
*/
static void
monitor_cursor(
Widget selWidget,
XtPointer clientdata,
XEvent *event,
Boolean *cont_dispatch
)
{
ABObj selObj = (ABObj)clientdata;
XMotionEvent *mevent;
Cursor resize_cursor;
RESIZE_DIR dir;
static Boolean cursor_changed = FALSE;
Window win;
Display *dpy;
if (event != NULL)
{
if (event->type != MotionNotify)
return;
else
mevent = (XMotionEvent*)event;
dir = abobjP_find_resize_direction(selObj, selWidget, event);
}
else
dir = NONE;
dpy = XtDisplay(selWidget);
win = XtWindow(selWidget);
if (dir == NONE)
{
if (cursor_changed)
{
XUndefineCursor(dpy, win);
cursor_changed = FALSE;
}
}
else
{
if ((resize_cursor = abobjP_get_resize_cursor(selWidget, dir)) != NULL)
{
XDefineCursor(dpy, win, resize_cursor);
cursor_changed = TRUE;
}
}
}
/*
* EventHandler: render grab handles on widget for Expose events
*/
static void
select_feedback_redraw(
Widget selWidget,
XtPointer clientdata,
XEvent *event,
Boolean *cont_dispatch
)
{
ABObj selObj = NULL;
BOOL resizable = (BOOL)((unsigned int)clientdata);
Boolean redraw = FALSE;
selObj = objxm_get_obj_from_widget(selWidget);
if (event->type == ConfigureNotify)
{
XRectangle w_rect;
x_get_widget_rect(selWidget, &w_rect);
/* ClearArea is roundtrip, should use XOR..*/
ui_refresh_widget_tree(selWidget);
redraw = TRUE;
}
else if (event->type == Expose)
redraw = TRUE;
if (redraw)
draw_select_feedback(selObj, resizable);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,405 @@
/*
* $XConsortium: abobj_set.h /main/3 1995/11/06 17:17:42 rswiston $
*
* @(#)abobj_set.h 1.53 02 Feb 1995
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* abobj_set.h
*/
#ifndef _ABOBJ_SET_H_
#define _ABOBJ_SET_H_
#include <ab_private/obj.h>
/*
* Routines to instantiate attribute changes in the Motif
* instance of the objects
*/
extern void abobj_instantiate_changes(
ABObj obj
);
extern void abobj_tree_instantiate_changes(
ABObj root
);
/*
* Routines to set attribute changes in objects
*/
extern void abobj_set_accelerator(
ABObj obj,
STRING accel
);
extern void abobj_set_background_color(
ABObj obj,
STRING colorname
);
extern void abobj_set_choice_type(
ABObj obj,
AB_CHOICE_TYPE type
);
extern void abobj_set_direction(
ABObj obj,
AB_DIRECTION dir
);
extern void abobj_set_drawarea_size(
ABObj obj,
int width,
int height
);
extern void abobj_set_foreground_color(
ABObj obj,
STRING colorname
);
extern void abobj_set_icon(
ABObj obj,
STRING icon,
STRING icon_mask,
STRING icon_label
);
extern void abobj_set_initial_state(
ABObj obj,
AB_OBJECT_STATE istate
);
extern void abobj_set_initial_value(
ABObj obj,
STRING strval,
int intval
);
extern void abobj_set_label(
ABObj obj,
AB_LABEL_TYPE label_type,
STRING label
);
extern void abobj_set_label_alignment(
ABObj obj,
AB_ALIGNMENT align
);
extern void abobj_set_label_position(
ABObj obj,
AB_COMPASS_POINT pos
);
extern void abobj_set_group_type(
ABObj obj,
AB_GROUP_TYPE group_type
);
extern void abobj_set_row_alignment(
ABObj obj,
AB_ALIGNMENT align
);
extern void abobj_set_col_alignment(
ABObj obj,
AB_ALIGNMENT align
);
extern void abobj_set_row_attach_type(
ABObj obj,
AB_ATTACH_TYPE type
);
extern void abobj_set_col_attach_type(
ABObj obj,
AB_ATTACH_TYPE type
);
extern void abobj_set_row_offset(
ABObj obj,
int offset
);
extern void abobj_set_col_offset(
ABObj obj,
int offset
);
extern void abobj_set_border_frame(
ABObj obj,
AB_LINE_TYPE btype
);
extern void abobj_set_line_style(
ABObj obj,
AB_LINE_TYPE type
);
extern void abobj_set_arrow_style(
ABObj obj,
AB_ARROW_STYLE astyle
);
extern void abobj_set_button_type(
ABObj obj,
AB_BUTTON_TYPE type
);
extern void abobj_set_name(
ABObj obj,
STRING name
);
extern void abobj_set_selection_mode(
ABObj obj,
AB_SELECT_TYPE select
);
extern void abobj_set_show_value(
ABObj obj,
BOOL show_val
);
extern void abobj_set_size_policy(
ABObj obj,
BOOL resizable
);
extern STRING abobj_construct_item_name(
STRING prefix,
STRING namebase,
STRING suffix
);
extern void abobj_set_item_name(
ABObj iobj,
ABObj module,
STRING basename,
STRING label
);
extern void abobj_set_menu_name(
ABObj obj,
STRING menuname
);
extern void abobj_set_menu_title(
ABObj obj,
STRING menu_title
);
extern void abobj_set_mnemonic(
ABObj obj,
STRING mnemonic
);
extern void abobj_set_orientation(
ABObj obj,
AB_ORIENTATION orient
);
extern void abobj_set_num_columns(
ABObj obj,
int num_cols
);
extern void abobj_set_num_rows(
ABObj obj,
int num_rows
);
extern void abobj_set_read_only(
ABObj obj,
BOOL readonly
);
extern void abobj_set_resize_mode(
ABObj obj,
BOOL resizable
);
extern void abobj_set_scrollbar_state(
ABObj obj,
AB_SCROLLBAR_POLICY scrolling
);
extern void abobj_set_pixel_width(
ABObj obj,
int width,
int border_frame_w
);
extern void abobj_set_pixel_height(
ABObj obj,
int height,
int border_frame_w
);
extern void abobj_set_pixel_size(
ABObj obj,
int height,
int width,
int border_frame_w
);
extern void abobj_set_text_size(
ABObj obj,
int height,
int width
);
extern void abobj_set_max_length(
ABObj obj,
int max_len
);
extern void abobj_set_win_parent(
ABObj obj,
ABObj win_parent
);
extern void abobj_set_word_wrap(
ABObj obj,
BOOL wrap
);
extern void abobj_set_xy(
ABObj obj,
int x,
int y
);
extern void abobj_set_active(
ABObj obj,
BOOL active
);
extern void abobj_set_visible(
ABObj obj,
BOOL visible
);
extern void abobj_set_iconic(
ABObj obj,
BOOL iconic
);
extern void abobj_set_selected(
ABObj obj,
BOOL selected
);
extern void abobj_set_tearoff(
ABObj obj,
BOOL tearoff
);
extern void abobj_set_text_type(
ABObj obj,
AB_TEXT_TYPE ttype
);
extern void abobj_set_decimal_points(
ABObj obj,
int dec_points
);
extern void abobj_set_default_act_button(
ABObj obj,
ABObj button
);
extern void abobj_set_help_act_button(
ABObj obj,
ABObj button
);
extern void abobj_set_increment(
ABObj obj,
int incr
);
extern void abobj_set_min_max_values(
ABObj obj,
int min,
int max
);
extern int abobj_set_save_needed(
ABObj obj,
BOOL set
);
extern void abobj_disable_save_needed(
);
extern void abobj_enable_save_needed(
);
extern BOOL abobj_save_needed_enabled(
);
extern void abobj_set_pattern_type(
ABObj obj,
AB_FILE_TYPE_MASK fmtype
);
extern void abobj_set_directory(
ABObj obj,
STRING val
);
extern void abobj_set_filter_pattern(
ABObj obj,
STRING val
);
extern void abobj_set_ok_label(
ABObj obj,
STRING val
);
extern void abobj_set_auto_dismiss(
ABObj obj,
BOOL val
);
extern void abobj_set_sessioning_method(
ABObj proj,
AB_SESSIONING_METHOD ss_mthd
);
extern void abobj_set_pane_min(
ABObj obj,
int value
);
extern void abobj_set_pane_max(
ABObj obj,
int value
);
extern void abobj_set_attachment(
ABObj obj,
AB_COMPASS_POINT dir,
ABAttachment *attach
);
extern void abobj_set_i18n_enabled(
ABObj proj,
BOOL i18n_enabled
);
#endif /* _ABOBJ_SET_H_ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,675 @@
// $XConsortium: about_box.bil /main/3 1995/11/06 17:18:01 rswiston $
//
// @(#)about_box.bil 1.9 01 Aug 1995
//
// RESTRICTED CONFIDENTIAL INFORMATION:
//
// The information in this document is subject to special
// restrictions in a confidential disclosure agreement between
// HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
// document outside HP, IBM, Sun, USL, SCO, or Univel without
// Sun's specific written approval. This document and all copies
// and derivative works thereof must be returned or destroyed at
// Sun's request.
//
// Copyright 1993 Sun Microsystems, Inc. All rights reserved.
//
// about_box.bil - Module file for App Builder 'About Box'
//
:bil-version 1 0
:module about_box
(
:element dialog
(
:type :dialog
:bg-color "white"
:label "About Application Builder"
:resizable :false
:visible :false
:default-button ok_btn
:children (
ctrl_panel
dialog_button_panel
)
)
:element ctrl_panel
(
:type :container
:container-type :relative
:x 0
:y 0
:visible :true
:border-frame :etched-in
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:point 0 0)
:children (
group3
group4
)
)
:element group3
(
:type :container
:container-type :group
:active :true
:visible :true
:x 176
:y 10
:width 284
:height 270
:group-type :ignore
:border-frame :none
:north-attachment (:point 0 20)
:south-attachment (:point 0 20)
:east-attachment (:point 0 24)
:west-attachment (:obj group4 50)
:children (
app_name
os_number
version
release_date
copyright_date
group
)
)
:element app_name
(
:type :label
:x 0
:y 0
:label-type :string
:label "Application Builder"
:label-alignment :left
:active :true
:visible :true
:north-attachment (:point 0 0)
:west-attachment (:point 0 0)
)
:element os_number
(
:type :label
:x 0
:y 19
:label-type :string
:label "dtbuilder"
:label-alignment :left
:active :true
:visible :true
:north-attachment (:obj app_name 5)
:west-attachment (:point 0 0)
)
:element version
(
:type :label
:x 0
:y 38
:label-type :string
:label "Sample Implementation Release"
:label-alignment :left
:active :true
:visible :false
:north-attachment (:obj os_number 5)
:west-attachment (:point 0 0)
)
:element release_date
(
:type :label
:x 0
:y 57
:label-type :string
:label "October 1994"
:label-alignment :left
:active :true
:visible :false
:north-attachment (:obj version 5)
:west-attachment (:point 0 0)
)
:element copyright_date
(
:type :label
:x 0
:y 76
:label-type :string
:label "Copyright (c) 1993, 1994, 1995:"
:label-alignment :left
:active :true
:visible :true
:north-attachment (:obj release_date 100)
:west-attachment (:point 0 0)
)
:element group
(
:type :container
:container-type :group
:active :true
:visible :true
:x 0
:y 95
:width 274
:height 68
:group-type :ignore
:border-frame :none
:north-attachment (:obj copyright_date 2)
:south-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:point 0 10)
:children (
hp_copyright
ibm_copyright
novell_copyright
sun_copyright
)
)
:element hp_copyright
(
:type :label
:x 0
:y 0
:label-type :string
:label "Hewlett-Packard Company"
:label-alignment :left
:active :true
:visible :true
:north-attachment (:point 0 0)
:west-attachment (:point 0 0)
)
:element ibm_copyright
(
:type :label
:x 0
:y 17
:label-type :string
:label "International Business Machines Corp."
:label-alignment :left
:active :true
:visible :true
:north-attachment (:obj hp_copyright 0)
:west-attachment (:point 0 0)
)
:element novell_copyright
(
:type :label
:x 0
:y 34
:label-type :string
:label "Novell, Inc."
:label-alignment :left
:active :true
:visible :true
:north-attachment (:obj ibm_copyright 0)
:west-attachment (:point 0 0)
)
:element sun_copyright
(
:type :label
:x 0
:y 51
:label-type :string
:label "Sun Microsystems, Inc."
:label-alignment :left
:active :true
:visible :true
:north-attachment (:obj novell_copyright 0)
:west-attachment (:point 0 0)
)
:element group4
(
:type :container
:container-type :group
:active :true
:visible :true
:x 24
:y 47
:width 102
:height 270
:group-type :column
:column-alignment :vcenter
:voffset 8
:vattach_type :obj
:border-frame :none
:north-attachment (:point 0 20)
:south-attachment (:point 0 20)
:west-attachment (:point 0 24)
:children (
exe_name
graphic
)
)
:element exe_name
(
:type :label
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
)
:element graphic
(
:type :label
:label-type :graphic
:label "DtBldrA"
:label-alignment :center
:active :true
:visible :true
)
:element dialog_button_panel
(
:type :container
:container-type :button-panel
:height 36
:visible :true
:border-frame :none
:children (
ok_btn
more_btn
)
)
:element ok_btn
(
:type :button
:button-type :push-button
:x 97
:y 2
:label-type :string
:label-alignment :center
:label "Close"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 94 0)
:east-attachment (:grid-line 80 0)
:west-attachment (:grid-line 60 0)
)
:element more_btn
(
:type :button
:button-type :push-button
:x 63
:y 8
:label-type :string
:label-alignment :center
:label "More..."
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 40 0)
:west-attachment (:grid-line 20 0)
)
:element dialog2
(
:type :dialog
:width 615
:height 449
:bg-color "white"
:label "More About Application Builder"
:resizable :false
:visible :false
:default-button by_close_btn
:children (
ctrl_pane
dialog2_button_panel
)
)
:element ctrl_pane
(
:type :container
:container-type :relative
:x 0
:y 0
:width 615
:height 449
:visible :true
:border-frame :none
:north-attachment (:point 0 0)
:south-attachment (:obj dialog2 0)
:east-attachment (:obj dialog2 0)
:west-attachment (:point 0 0)
:children (
graphic2
by
by1
by2
by3
by4
by5
by6
by7
by8
by9
by10
by11
by12
)
)
:element graphic2
(
:type :label
:x 15
:y 14
:label-type :graphic
:label "DtBldrA"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:point 0 14)
:west-attachment (:point 0 15)
)
:element by
(
:type :label
:x 81
:y 19
:label-type :string
:label "This application was brought to you by:"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:point 0 19)
:west-attachment (:obj graphic2 12)
)
:element by1
(
:type :label
:x 348
:y 62
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by 22)
:west-attachment (:center-grid-line 50 0)
)
:element by2
(
:type :label
:x 348
:y 83
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by1 0)
:west-attachment (:center-grid-line 50 0)
)
:element by3
(
:type :label
:x 348
:y 104
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by2 0)
:west-attachment (:center-grid-line 50 0)
)
:element by4
(
:type :label
:x 348
:y 125
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by3 0)
:west-attachment (:center-grid-line 50 0)
)
:element by5
(
:type :label
:x 348
:y 146
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by4 0)
:west-attachment (:center-grid-line 50 0)
)
:element by6
(
:type :label
:x 348
:y 167
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by5 0)
:west-attachment (:center-grid-line 50 0)
)
:element by7
(
:type :label
:x 348
:y 188
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by6 0)
:west-attachment (:center-grid-line 50 0)
)
:element by8
(
:type :label
:x 348
:y 209
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by7 0)
:west-attachment (:center-grid-line 50 0)
)
:element by9
(
:type :label
:x 348
:y 230
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by8 0)
:west-attachment (:center-grid-line 50 0)
)
:element by10
(
:type :label
:x 348
:y 251
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by9 0)
:west-attachment (:center-grid-line 50 0)
)
:element by11
(
:type :label
:x 348
:y 272
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by10 0)
:west-attachment (:center-grid-line 50 0)
)
:element by12
(
:type :label
:x 277
:y 247
:label-type :string
:label "dtbuilder"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj by11 0)
:west-attachment (:center-grid-line 50 0)
)
:element dialog2_button_panel
(
:type :container
:container-type :button-panel
:width 615
:height 36
:visible :true
:border-frame :none
:children (
by_close_btn
)
)
:element by_close_btn
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Close"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 60 0)
:west-attachment (:grid-line 40 0)
)
:connection
(
:from ok_btn
:to dialog
:when :activate
:action-type :builtin
:action :hide
:arg-type :void
)
:connection
(
:from more_btn
:to dialog2
:when :activate
:action-type :builtin
:action :show
:arg-type :void
)
:connection
(
:from by_close_btn
:to dialog2
:when :activate
:action-type :builtin
:action :hide
:arg-type :void
)
:connection
(
:from by1
:when :after-create
:action-type :call-function
:action by1_createCB
)
:connection
(
:from by2
:when :after-create
:action-type :call-function
:action by2_createCB
)
:connection
(
:from by3
:when :after-create
:action-type :call-function
:action by3_createCB
)
:connection
(
:from by4
:when :after-create
:action-type :call-function
:action by4_createCB
)
:connection
(
:from by5
:when :after-create
:action-type :call-function
:action by5_createCB
)
:connection
(
:from by6
:when :after-create
:action-type :call-function
:action by6_createCB
)
:connection
(
:from by7
:when :after-create
:action-type :call-function
:action by7_createCB
)
:connection
(
:from by8
:when :after-create
:action-type :call-function
:action by8_createCB
)
:connection
(
:from by9
:when :after-create
:action-type :call-function
:action by9_createCB
)
:connection
(
:from by10
:when :after-create
:action-type :call-function
:action by10_createCB
)
:connection
(
:from by11
:when :after-create
:action-type :call-function
:action by11_createCB
)
:connection
(
:from by12
:when :after-create
:action-type :call-function
:action by12_createCB
)
:connection
(
:from os_number
:when :after-create
:action-type :call-function
:action os_number_createCB
)
)

View File

@@ -0,0 +1,400 @@
/*** DTB_USER_CODE_START vvv Add file header below vvv ***/
/*
* $XConsortium: about_box_stubs.c /main/4 1996/04/18 13:18:26 drk $
*
* @(#)about_box_stubs.c 1.13 01 Aug 1995 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
/*
* File: about_box_stubs.c
* Contains: Module callbacks and connection functions
*
* This file was generated by dtcodegen, from module about_box
*
* Any text may be added between the DTB_USER_CODE_START and
* DTB_USER_CODE_END comments (even non-C code). Descriptive comments
* are provided only as an aid.
*
* ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
* ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include "dtbuilder.h"
#include "about_box_ui.h"
/*
* Header files for cross-module connections
*/
#include "palette_ui.h"
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All necessary header files have been included.
***
*** Add include files, types, macros, externs, and user functions here.
***/
#include "ab.h"
static void set_by( Widget widget, char *by);
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/
void
about_box_ok_btn_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
DtbAboutBoxDialogInfo instance = (DtbAboutBoxDialogInfo)clientData;
if (!(instance->initialized))
{
dtb_about_box_dialog_initialize(instance, dtb_palette_ab_palette_main.ab_palette_main);
}
XtUnmanageChild(instance->dialog_shellform);
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
about_box_more_btn_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
DtbAboutBoxDialog2Info instance = (DtbAboutBoxDialog2Info)clientData;
if (!(instance->initialized))
{
dtb_about_box_dialog2_initialize(instance, dtb_palette_ab_palette_main.ab_palette_main);
}
XtManageChild(instance->dialog2_shellform);
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
about_box_by_close_btn_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
DtbAboutBoxDialog2Info instance = (DtbAboutBoxDialog2Info)clientData;
if (!(instance->initialized))
{
dtb_about_box_dialog2_initialize(instance, dtb_palette_ab_palette_main.ab_palette_main);
}
XtUnmanageChild(instance->dialog2_shellform);
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by1_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"David Blomgren");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by2_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"David Bryant");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by3_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"Patrick Curran");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by4_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"Jeff Dunn");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by5_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"Brian Freeman");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by6_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"Monica Gaines");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by7_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"Isa Hashim");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by8_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"Terre Layton");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by9_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"Amy Moore");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by10_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"Satyajit Nath");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by11_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"Andy Sobel");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
by12_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialog2Info dtbSource = (DtbAboutBoxDialog2Info)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,"Martha Venegas");
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
os_number_createCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbAboutBoxDialogInfo dtbSource = (DtbAboutBoxDialogInfo)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
set_by(widget,AbVERSION_STRING);
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All automatically-generated data and functions have been defined.
***
*** Add new functions here, or at the top of the file.
***/
static void
set_by(
Widget widget,
char *by
)
{
XmString label;
label = XmStringCreateLocalized(by);
XtVaSetValues(widget,XmNlabelString,label, NULL);
XmStringFree(label);
}
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/

View File

@@ -0,0 +1,36 @@
PURPOSE
The CDE Application Builder provides an interactive, graphical environment
that facilitates the development of CDE applications.
DESCRIPTION
The Application Builder is designed to make it easier for developers to
construct applications that integrate well into the Common Desktop
Environment. It provides two basic services - aid in assembling Motif
objects into the desired application user interface, and generation of
appropriate calls to the routines that support desktop integration
services (e.g., ToolTalk messaging, drag and drop, etc.).
KEY SUPPORTED TASKS
o Interactive layout of the user interface for an application,
constructing it piece-by-piece from a collection of objects from the
CDE Motif toolkit.
o Definition of connections between objects to provide elements
of application interface behavior, and a limited test mode that allows
connections to be exercised.
o Interactive specification of the interconnections desired
between the application and CDE desk- top services.
o Editing of applications previously created using the Application Builder
o Generation of C language source code and associated project
files (e.g., Imakefile, message cata- log) for the application
o Generation (compilation) and invocation of the application from
within the Application Builder, allowing the developer to execute the
build/run/debug cycle all from a common environment (and without having
to exit and restart the Application Builder)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,41 @@
/*
* $XConsortium: appfw.h /main/3 1995/11/06 17:18:44 rswiston $
*
* @(#)appfw.h 1.1 27 Jun 1994
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* appfw.h
*
* Functions for manipulating the Application Frameworks Editor
*/
#ifndef _appfw_h
#define _appfw_h
#include <ab_private/obj.h>
#include "appfw_ui.h"
void appfw_show_dialog(
ABObj project
);
void appfw_notify_new_project(
ABObj project
);
#endif /* _appfw_h */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,87 @@
/*
* $XConsortium: attch_ed.h /main/3 1995/11/06 17:19:33 rswiston $
*
* @(#)attch_ed.h 1.4 08 Oct 1994
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* attch_ed.h
*
* Functions for manipulating the Attachments Editor
*/
#ifndef _attch_ed_h
#define _attch_ed_h
typedef enum
{
ATTCH_ED_PARENT = 0,
ATTCH_ED_OPPOSITE_PARENT,
ATTCH_ED_SIBLING,
ATTCH_ED_OPPOSITE_SIBLING,
ATTCH_ED_GRIDLINE,
ATTCH_ED_CENTER_GRIDLINE,
ATTCH_ED_NONE
} ATTCH_ED_ATTACH_TYPE;
typedef enum
{
ATTCH_ED_WRN_LOAD = 0,
ATTCH_ED_WRN_CHANGE_OBJTYPE,
ATTCH_ED_WRN_CLOSE
} ATTCH_ED_WRN_TYPE;
#define attch_ed_need_obj_menu(attach_type) \
((attach_type == ATTCH_ED_SIBLING) || (attach_type == ATTCH_ED_OPPOSITE_SIBLING))
/*
* Attachment Editor Settings
*/
typedef struct ATTACHMENT_EDITOR_SETTINGS
{
Widget prop_sheet;
PropOptionsSettingRec top_attach_type;
PropFieldSettingRec top_attach_offset;
PropFieldSettingRec top_attach_position;
PropOptionsSettingRec top_attach_obj;
PropOptionsSettingRec bottom_attach_type;
PropFieldSettingRec bottom_attach_offset;
PropFieldSettingRec bottom_attach_position;
PropOptionsSettingRec bottom_attach_obj;
PropOptionsSettingRec left_attach_type;
PropFieldSettingRec left_attach_offset;
PropFieldSettingRec left_attach_position;
PropOptionsSettingRec left_attach_obj;
PropOptionsSettingRec right_attach_type;
PropFieldSettingRec right_attach_offset;
PropFieldSettingRec right_attach_position;
PropOptionsSettingRec right_attach_obj;
ABObj cur_object;
} AttchEditorSettingsRec, *AttchEditorSettings;
void attch_ed_init(
);
void attch_ed_show_dialog(
ABObj cur_obj
);
BOOL attch_ed_can_edit_attachments(
ABObj obj
);
#endif /* _attch_ed_h */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
/* $XConsortium: align_bottom.xbm /main/2 1995/07/17 18:07:35 drk $ */
#define align_bottom_width 32
#define align_bottom_height 32
static unsigned char align_bottom_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xf0,0x0f,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,
0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x30,0x10,0x08,0x00,0x48,
0x10,0x08,0x00,0x48,0x10,0x08,0x00,0x84,0x10,0x08,0x00,0x84,0x10,0x08,0x00,
0x84,0x10,0x08,0x00,0x84,0x10,0x08,0x00,0x84,0x10,0x08,0x00,0x84,0x10,0x08,
0x00,0x84,0x10,0x08,0x04,0x84,0x10,0x08,0x0a,0x84,0x10,0x08,0x0a,0x84,0x10,
0x08,0x11,0x84,0x10,0x08,0x11,0x84,0x10,0x88,0x20,0x48,0x10,0x88,0x20,0x48,
0x10,0x48,0x40,0x30,0xf0,0xcf,0x7f,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: align_grid.xbm /main/2 1995/07/17 18:07:42 drk $ */
#define align_grid_width 32
#define align_grid_height 32
static unsigned char align_grid_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x3f,0x22,0x22,0x22,
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xfe,0xff,0xff,0x3f,0x22,0x22,
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xfe,0xff,0xff,0x3f,0x22,
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xfe,0xff,0xff,0x3f,
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xfe,0xff,0xff,
0x3f,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xfe,0xff,
0xff,0x3f,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xfe,
0xff,0xff,0x3f,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
0xfe,0xff,0xff,0x3f,0x00,0x00,0x00,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: align_hcenter.xbm /main/2 1995/07/17 18:07:50 drk $ */
#define align_hcenter_width 32
#define align_hcenter_height 32
static unsigned char align_hcenter_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xf0,0x0f,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x30,0x10,
0x08,0x00,0x48,0x10,0x08,0x00,0x48,0x10,0x08,0x00,0x84,0x10,0x08,0x00,0x84,
0x10,0x08,0x08,0x84,0x10,0x08,0x14,0x84,0x10,0x08,0x14,0x84,0x10,0x08,0x22,
0x84,0x10,0x08,0x22,0xff,0xff,0xff,0xff,0x84,0x10,0x08,0x41,0x84,0x10,0x88,
0x80,0x84,0x10,0x88,0xff,0x84,0x10,0x08,0x00,0x84,0x10,0x08,0x00,0x48,0x10,
0x08,0x00,0x48,0x10,0x08,0x00,0x30,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,
0x10,0x08,0x00,0x00,0xf0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: align_labels.xbm /main/2 1995/07/17 18:07:57 drk $ */
#define align_labels_width 32
#define align_labels_height 32
static unsigned char align_labels_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,
0x00,0x00,0xfe,0x33,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x30,0x00,0x00,0xf0,0x33,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x30,0x00,0x00,0xfc,0x33,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: align_left.xbm /main/2 1995/07/17 18:08:11 drk $ */
#define align_left_width 32
#define align_left_height 32
static unsigned char align_left_bits[] = {
0x08,0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x88,0x02,0x00,0x00,0x88,0x02,0x00,
0x00,0x48,0x04,0x00,0x00,0x48,0x04,0x00,0x00,0x28,0x08,0x00,0x00,0x28,0x08,
0x00,0x00,0x18,0x10,0x00,0x00,0xf8,0x1f,0x00,0x00,0x08,0x00,0x00,0x00,0x08,
0x00,0x00,0x00,0xf8,0xff,0xff,0x0f,0x18,0x00,0x00,0x08,0x18,0x00,0x00,0x08,
0x18,0x00,0x00,0x08,0x18,0x00,0x00,0x08,0x18,0x00,0x00,0x08,0x18,0x00,0x00,
0x08,0xf8,0xff,0xff,0x0f,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,
0x00,0x00,0x08,0x00,0x00,0x00,0x88,0xff,0x07,0x00,0x68,0x00,0x18,0x00,0x18,
0x00,0x20,0x00,0x18,0x00,0x20,0x00,0x68,0x00,0x18,0x00,0x88,0xff,0x07,0x00,
0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: align_right.xbm /main/2 1995/07/17 18:08:19 drk $ */
#define align_right_width 32
#define align_right_height 32
static unsigned char align_right_bits[] = {
0x00,0x00,0x00,0x10,0x00,0x00,0x80,0x10,0x00,0x00,0x40,0x11,0x00,0x00,0x40,
0x11,0x00,0x00,0x20,0x12,0x00,0x00,0x20,0x12,0x00,0x00,0x10,0x14,0x00,0x00,
0x10,0x14,0x00,0x00,0x08,0x18,0x00,0x00,0xf8,0x1f,0x00,0x00,0x00,0x10,0x00,
0x00,0x00,0x10,0xf0,0xff,0xff,0x1f,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,
0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,
0x18,0xf0,0xff,0xff,0x1f,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,
0x00,0x10,0x00,0x00,0x00,0x10,0x00,0xe0,0xff,0x11,0x00,0x18,0x00,0x16,0x00,
0x04,0x00,0x18,0x00,0x04,0x00,0x18,0x00,0x18,0x00,0x16,0x00,0xe0,0xff,0x11,
0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: align_top.xbm /main/2 1995/07/17 18:08:28 drk $ */
#define align_top_width 32
#define align_top_height 32
static unsigned char align_top_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,
0xff,0x30,0xf0,0x0f,0x08,0x48,0x10,0x08,0x14,0x48,0x10,0x08,0x14,0x84,0x10,
0x08,0x22,0x84,0x10,0x08,0x22,0x84,0x10,0x08,0x41,0x84,0x10,0x08,0x41,0x84,
0x10,0x88,0x80,0x84,0x10,0x88,0xff,0x84,0x10,0x08,0x00,0x84,0x10,0x08,0x00,
0x84,0x10,0x08,0x00,0x84,0x10,0x08,0x00,0x84,0x10,0x08,0x00,0x84,0x10,0x08,
0x00,0x48,0x10,0x08,0x00,0x48,0x10,0x08,0x00,0x30,0x10,0x08,0x00,0x00,0x10,
0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,
0x10,0x08,0x00,0x00,0xf0,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: align_vcenter.xbm /main/2 1995/07/17 18:08:34 drk $ */
#define align_vcenter_width 32
#define align_vcenter_height 32
static unsigned char align_vcenter_bits[] = {
0x00,0x00,0x01,0x00,0x00,0x80,0x03,0x00,0x00,0x80,0x03,0x00,0x00,0x40,0x05,
0x00,0x00,0x40,0x05,0x00,0x00,0x20,0x09,0x00,0x00,0x20,0x09,0x00,0x00,0x10,
0x11,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,
0x00,0x01,0x00,0xf0,0xff,0xff,0x0f,0x10,0x00,0x01,0x08,0x10,0x00,0x01,0x08,
0x10,0x00,0x01,0x08,0x10,0x00,0x01,0x08,0x10,0x00,0x01,0x08,0x10,0x00,0x01,
0x08,0xf0,0xff,0xff,0x0f,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,0x01,0x00,0x00,0xfc,0x3f,0x00,0x00,0x03,0xc1,0x00,0x80,
0x00,0x01,0x01,0x80,0x00,0x01,0x01,0x00,0x03,0xc1,0x00,0x00,0xfc,0x3f,0x00,
0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00};

View File

@@ -0,0 +1,7 @@
/* $XConsortium: copy_cursor.xbm /main/2 1995/07/17 18:08:42 drk $ */
#define copy_cursor_bm_width 16
#define copy_cursor_bm_height 16
static unsigned char copy_cursor_bm_bits[] = {
0x03, 0x00, 0x0f, 0x00, 0x3e, 0x00, 0xfe, 0x00, 0xfc, 0x00, 0x7c, 0x3c,
0xf8, 0x3e, 0xd8, 0xbb, 0x80, 0xb9, 0xc0, 0xb8, 0x60, 0xb8, 0xe0, 0xbf,
0xe0, 0xbf, 0xe0, 0xbf, 0x00, 0x80, 0x80, 0xff};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: distribute_hcenter.xbm /main/2 1995/07/17 18:08:49 drk $ */
#define distribute_hcenter_width 32
#define distribute_hcenter_height 32
static unsigned char distribute_hcenter_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
0x00,0x00,0x08,0x18,0xf0,0x0f,0x18,0x0c,0x10,0x08,0x30,0x06,0x10,0x08,0x60,
0xff,0x1f,0xf8,0xff,0xff,0x1f,0xf8,0xff,0x06,0x10,0x08,0x60,0x0c,0x10,0x08,
0x30,0x18,0xf0,0x0f,0x18,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: distribute_horizontal.xbm /main/2 1995/07/17 18:08:57 drk $ */
#define distribute_horizontal_width 32
#define distribute_horizontal_height 32
static unsigned char distribute_horizontal_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xff,0xf0,0x0f,0xff,0x81,0x10,0x08,0x81,0x81,0x10,0x08,0x81,
0x81,0x10,0x08,0x81,0x81,0x10,0x08,0x81,0x81,0x10,0x08,0x81,0x81,0x10,0x08,
0x81,0xff,0xf0,0x0f,0xff,0x00,0x06,0x60,0x00,0x00,0x0f,0xf0,0x00,0x80,0x1f,
0xf8,0x01,0xc0,0x36,0x6c,0x03,0x60,0x66,0x66,0x06,0x00,0x06,0x60,0x00,0x00,
0x06,0x60,0x00,0x00,0x06,0x60,0x00,0x00,0x06,0x60,0x00,0x00,0x06,0x60,0x00,
0x00,0x06,0x60,0x00,0x00,0x06,0x60,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: distribute_vcenter.xbm /main/2 1995/07/17 18:09:06 drk $ */
#define distribute_vcenter_width 32
#define distribute_vcenter_height 32
static unsigned char distribute_vcenter_bits[] = {
0x00,0x80,0x01,0x00,0x00,0xc0,0x03,0x00,0x00,0xe0,0x07,0x00,0x00,0xb0,0x0d,
0x00,0x00,0x98,0x19,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,
0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,
0x80,0x01,0x00,0x00,0xf0,0x0f,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,
0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,
0x00,0x00,0xf0,0x0f,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,
0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,
0x80,0x01,0x00,0x00,0x98,0x19,0x00,0x00,0xb0,0x0d,0x00,0x00,0xe0,0x07,0x00,
0x00,0xc0,0x03,0x00,0x00,0x80,0x01,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: distribute_vertical.xbm /main/2 1995/07/17 18:09:14 drk $ */
#define distribute_vertical_width 32
#define distribute_vertical_height 32
static unsigned char distribute_vertical_bits[] = {
0x00,0xf0,0x0f,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,
0x00,0x00,0x10,0x08,0x00,0x80,0x10,0x08,0x00,0x80,0x11,0x08,0x00,0x00,0xf3,
0x0f,0x00,0x00,0x06,0x00,0x00,0xff,0x0f,0x00,0x00,0xff,0x0f,0x00,0x00,0x00,
0x06,0x00,0x00,0x00,0xf3,0x0f,0x00,0x80,0x11,0x08,0x00,0x80,0x10,0x08,0x00,
0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x80,0x10,0x08,0x00,0x80,0x11,0x08,
0x00,0x00,0xf3,0x0f,0x00,0x00,0x06,0x00,0x00,0xff,0x0f,0x00,0x00,0xff,0x0f,
0x00,0x00,0x00,0x06,0x00,0x00,0x00,0xf3,0x0f,0x00,0x80,0x11,0x08,0x00,0x80,
0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,
0x00,0x10,0x08,0x00,0x00,0xf0,0x0f,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: ggp_as_is.xbm /main/2 1995/07/17 18:09:21 drk $ */
#define ggp_as_is_width 32
#define ggp_as_is_height 32
static unsigned char ggp_as_is_bits[] = {
0x01,0x00,0x00,0x80,0x03,0x00,0x00,0xc0,0xc6,0x00,0x00,0x60,0xcc,0x00,0xf0,
0x31,0x38,0x01,0x08,0x1a,0x30,0x01,0x04,0x0c,0x70,0x02,0x02,0x0e,0xd0,0x02,
0x01,0x13,0x88,0x05,0x81,0x11,0xf8,0x07,0xc1,0x10,0x00,0x06,0x61,0x10,0x00,
0x0c,0x31,0x10,0x00,0x18,0x1a,0x08,0x00,0x30,0x0c,0x04,0x00,0x60,0x0e,0x02,
0x00,0xc0,0xf3,0x01,0x00,0x80,0x01,0x00,0x00,0xc0,0x03,0x00,0x00,0x60,0x06,
0x00,0x80,0x7f,0x0c,0x00,0x80,0x58,0x18,0x00,0x80,0x4c,0x30,0x00,0x80,0x46,
0x60,0x00,0x80,0x43,0xc0,0x00,0x80,0x41,0x80,0x01,0xc0,0x40,0x00,0x03,0xe0,
0x40,0x00,0x06,0xb0,0x7f,0x00,0x0c,0x18,0x00,0x00,0x18,0x0c,0x00,0x00,0x30,
0x06,0x00,0x00,0x60,0x03,0x00,0x00,0xc0};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: ggp_col.xbm /main/2 1995/07/17 18:09:29 drk $ */
#define ggp_col_width 32
#define ggp_col_height 32
static unsigned char ggp_col_bits[] = {
0x00,0x80,0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x40,0x02,0x00,0x00,0x40,0x02,
0x00,0x00,0x20,0x04,0x00,0x00,0x20,0x04,0x00,0x00,0x10,0x08,0x00,0x00,0xf0,
0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x03,0x00,0x00,0x10,0x04,0x00,0x00,
0x08,0x08,0x00,0x00,0x04,0x10,0x00,0x00,0x02,0x20,0x00,0x00,0x02,0x20,0x00,
0x00,0x02,0x20,0x00,0x00,0x02,0x20,0x00,0x00,0x02,0x20,0x00,0x00,0x04,0x10,
0x00,0x00,0x08,0x08,0x00,0x00,0x10,0x04,0x00,0x00,0xe0,0x03,0x00,0x00,0x00,
0x00,0x00,0x00,0xf0,0x0f,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,
0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,0x00,0x10,0x08,0x00,
0x00,0x10,0x08,0x00,0x00,0xf0,0x0f,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: ggp_row.xbm /main/2 1995/07/17 18:09:35 drk $ */
#define ggp_row_width 32
#define ggp_row_height 32
static unsigned char ggp_row_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x03,0x00,0x00,0x10,0x04,0x00,0x00,
0x08,0x08,0xff,0x18,0x04,0x10,0x81,0x18,0x02,0x20,0x81,0x24,0x02,0x20,0x81,
0x24,0x02,0x20,0x81,0x42,0x02,0x20,0x81,0x42,0x02,0x20,0x81,0x81,0x04,0x10,
0x81,0xff,0x08,0x08,0xff,0x00,0x10,0x04,0x00,0x00,0xe0,0x03,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

View File

@@ -0,0 +1,13 @@
/* $XConsortium: ggp_rowcol.xbm /main/2 1995/07/17 18:09:42 drk $ */
#define ggp_rowcol_width 32
#define ggp_rowcol_height 32
static unsigned char ggp_rowcol_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x01,0x00,0x00,0x08,
0x02,0x80,0x01,0x04,0x04,0x80,0x01,0x02,0x08,0x40,0x02,0x01,0x10,0x40,0x02,
0x01,0x10,0x20,0x04,0x01,0x10,0x20,0x04,0x01,0x10,0x10,0x08,0x01,0x10,0xf0,
0x0f,0x02,0x08,0x00,0x00,0x04,0x04,0x00,0x00,0x08,0x02,0x00,0x00,0xf0,0x01,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xf0,0x0f,0x00,0x00,0x10,0x08,0x60,0x00,0x10,0x08,0x60,0x00,0x10,0x08,
0x90,0x00,0x10,0x08,0x90,0x00,0x10,0x08,0x08,0x01,0x10,0x08,0x08,0x01,0x10,
0x08,0x04,0x02,0xf0,0x0f,0xfc,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

View File

@@ -0,0 +1,9 @@
/* $XConsortium: left_down_link.xbm /main/2 1995/07/17 18:09:50 drk $ */
#define left_down_link_width 16
#define left_down_link_height 16
#define left_down_link_x_hot 14
#define left_down_link_y_hot 1
static unsigned char left_down_link_bits[] = {
0x00, 0xc0, 0x00, 0xe7, 0x80, 0x7f, 0xc0, 0x38, 0x60, 0x3f, 0xb0, 0x7d,
0xd8, 0x7b, 0xf8, 0x76, 0xe8, 0x3d, 0xf4, 0x1b, 0xca, 0x0f, 0x45, 0x07,
0xa3, 0x03, 0x50, 0x00, 0x28, 0x00, 0x18, 0x00};

View File

@@ -0,0 +1,9 @@
/* $XConsortium: left_up_link.xbm /main/2 1995/07/17 18:09:58 drk $ */
#define left_up_link_width 16
#define left_up_link_height 16
#define left_up_link_x_hot 14
#define left_up_link_y_hot 14
static unsigned char left_up_link_bits[] = {
0x18, 0x00, 0x28, 0x00, 0x50, 0x00, 0xa3, 0x03, 0x45, 0x07, 0xca, 0x0f,
0xf4, 0x1b, 0xe8, 0x3d, 0xf8, 0x76, 0xd8, 0x7b, 0xb0, 0x7d, 0x60, 0x3f,
0xc0, 0x38, 0x80, 0x7f, 0x00, 0xe7, 0x00, 0xc0};

View File

@@ -0,0 +1,7 @@
/* $XConsortium: move_cursor.xbm /main/2 1995/07/17 18:10:07 drk $ */
#define move_cursor_bm_width 16
#define move_cursor_bm_height 16
static unsigned char move_cursor_bm_bits[] = {
0x03, 0x00, 0x0f, 0x00, 0x3e, 0x00, 0xfe, 0x00, 0xfc, 0x03, 0xfc, 0x03,
0xf8, 0x00, 0xf8, 0xf1, 0xb0, 0xfb, 0x30, 0xef, 0x00, 0xe6, 0x00, 0xe3,
0x80, 0xe1, 0x80, 0xff, 0x80, 0xff, 0x80, 0xff};

View File

@@ -0,0 +1,9 @@
/* $XConsortium: right_down_link.xbm /main/2 1995/07/17 18:10:14 drk $ */
#define right_down_link_width 16
#define right_down_link_height 16
#define right_down_link_x_hot 1
#define right_down_link_y_hot 1
static unsigned char right_down_link_bits[] = {
0x03, 0x00, 0xe7, 0x00, 0xfe, 0x01, 0x1c, 0x03, 0xfc, 0x06, 0xbe, 0x0d,
0xde, 0x1b, 0x6e, 0x1f, 0xbc, 0x17, 0xd8, 0x2f, 0xf0, 0x53, 0xe0, 0xa2,
0xc0, 0xc5, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x18};

View File

@@ -0,0 +1,9 @@
/* $XConsortium: right_up_link.xbm /main/2 1995/07/17 18:10:21 drk $ */
#define right_up_link_width 16
#define right_up_link_height 16
#define right_up_link_x_hot 1
#define right_up_link_y_hot 14
static unsigned char right_up_link_bits[] = {
0x00, 0x18, 0x00, 0x14, 0x00, 0x0a, 0xc0, 0xc5, 0xe0, 0xa2, 0xf0, 0x53,
0xd8, 0x2f, 0xbc, 0x17, 0x6e, 0x1f, 0xde, 0x1b, 0xbe, 0x0d, 0xfc, 0x06,
0x1c, 0x03, 0xfe, 0x01, 0xe7, 0x00, 0x03, 0x00};

View File

@@ -0,0 +1,642 @@
// $XConsortium: brws.bil /main/3 1995/11/06 17:20:14 rswiston $
//
// @(#)brws.bil 1.17 13 Apr 1995
//
// RESTRICTED CONFIDENTIAL INFORMATION:
//
// The information in this document is subject to special
// restrictions in a confidential disclosure agreement between
// HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
// document outside HP, IBM, Sun, USL, SCO, or Univel without
// Sun's specific written approval. This document and all copies
// and derivative works thereof must be returned or destroyed at
// Sun's request.
//
// Copyright 1993 Sun Microsystems, Inc. All rights reserved.
//
:bil-version 1 0
:module brws
(
:element mainwindow
(
:type :base-window
:width 487
:height 688
:icon-label "Module Browser"
:label "Module Browser"
:resizable :true
:visible :false
:iconic :false
:children (
menubar
ctrl_panel
ctrl_panel1
)
)
:element menubar
(
:type :container
:container-type :menu-bar
:active :true
:children (
menubar_Edit_item
menubar_View_item
menubar_Help_item
)
)
:element menubar_Edit_item
(
:type :item
:item-type :item-for-menubar
:label-type :string
:label "Edit"
:is-help-item :false
:mnemonic "E"
:menu edit_pulldown
:active :true
)
:element menubar_View_item
(
:type :item
:item-type :item-for-menubar
:label-type :string
:label "View"
:is-help-item :false
:mnemonic "V"
:menu view_pulldown
:active :true
)
:element menubar_Help_item
(
:type :item
:item-type :item-for-menubar
:label-type :string
:label "Help"
:is-help-item :true
:mnemonic "H"
:menu help_pulldown
:active :true
)
:element ctrl_panel
(
:type :container
:container-type :relative
:x 0
:y 0
:width 487
:height 38
:visible :true
:border-frame :none
:north-attachment (:point 0 0)
:east-attachment (:obj mainwindow 0)
:west-attachment (:point 0 0)
:children (
group
)
)
:element group
(
:type :container
:container-type :group
:active :true
:visible :true
:x 9
:y 5
:group-type :row
:row-alignment :left
:hoffset 10
:hattach_type :obj
:border-frame :none
:north-attachment (:point 0 5)
:west-attachment (:point 0 9)
:children (
module_label
module_name
)
)
:element module_label
(
:type :label
:label-type :string
:label "Module:"
:label-alignment :center
:active :true
:visible :true
)
:element module_name
(
:type :label
:label-type :string
:label " "
:label-alignment :left
:active :true
:visible :true
)
:element ctrl_panel1
(
:type :container
:container-type :relative
:x 0
:y 37
:width 487
:height 651
:visible :true
:border-frame :none
:north-attachment (:point 0 37)
:south-attachment (:obj mainwindow 0)
:east-attachment (:obj mainwindow 0)
:west-attachment (:point 0 0)
:children (
toplevel_drawarea
detailed_drawarea
)
)
:element toplevel_drawarea
(
:type :drawing-area
:x 0
:y 0
:width 487
:height 114
:drawarea-width 482
:drawarea-height 114
:border-frame :none
:hscrollbar :always
:vscrollbar :always
:active :true
:visible :true
:north-attachment (:point 0 0)
:east-attachment (:obj ctrl_panel1 0)
:west-attachment (:point 0 0)
)
:element detailed_drawarea
(
:type :drawing-area
:x 0
:y 113
:width 487
:height 538
:drawarea-width 496
:drawarea-height 533
:border-frame :none
:hscrollbar :always
:vscrollbar :always
:active :true
:visible :true
:north-attachment (:point 0 113)
:south-attachment (:obj ctrl_panel1 0)
:east-attachment (:obj ctrl_panel1 0)
:west-attachment (:point 0 0)
)
:element edit_pulldown
(
:type :menu
:tear-off :false
:children (
edit_pulldown_Undo_item
edit_pulldown_Cut_item
edit_pulldown_Copy_item
edit_pulldown_Paste_item
edit_pulldown_Delete_item
edit_pulldown_separator1_item
edit_pulldown_Close_item
)
)
:element edit_pulldown_Undo_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Undo"
:mnemonic "U"
:active :true
)
:element edit_pulldown_Cut_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Cut"
:mnemonic "u"
:active :true
)
:element edit_pulldown_Copy_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Copy"
:mnemonic "C"
:active :true
)
:element edit_pulldown_Paste_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Paste"
:mnemonic "P"
:active :true
)
:element edit_pulldown_Delete_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Delete"
:mnemonic "D"
:active :true
)
:element edit_pulldown_separator1_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-out
:active :true
)
:element edit_pulldown_Close_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Close"
:mnemonic "C"
:active :true
)
:element view_pulldown
(
:type :menu
:tear-off :false
:children (
view_pulldown_Horizontal_item
view_pulldown_Hide_Object_Glyph_item
view_pulldown_Show_Object_Type_item
view_pulldown_Hide_Object_Name_item
view_pulldown_Collapse_item
view_pulldown_Expand_item
view_pulldown_Expand_All_item
view_pulldown_Module_item
view_pulldown_Find_item
view_pulldown_Tear_Off_Browser_item
)
)
:element view_pulldown_Horizontal_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Horizontal"
:active :true
)
:element view_pulldown_Hide_Object_Glyph_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Hide Object Glyph"
:active :true
)
:element view_pulldown_Show_Object_Type_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Show Object Type"
:active :true
)
:element view_pulldown_Hide_Object_Name_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Hide Object Name"
:active :true
)
:element view_pulldown_Collapse_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Collapse"
:mnemonic "C"
:active :true
)
:element view_pulldown_Expand_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Expand"
:mnemonic "E"
:active :true
)
:element view_pulldown_Expand_All_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Expand All"
:active :true
)
:element view_pulldown_Module_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Module"
:menu view_module_pulldown
:active :true
)
:element view_pulldown_Find_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Find..."
:active :true
)
:element view_pulldown_Tear_Off_Browser_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Tear Off Browser..."
:active :true
)
:element help_pulldown
(
:type :menu
:tear-off :false
:children (
help_pulldown_Overview_item
help_pulldown_separator1_item
help_pulldown_Tasks_item
help_pulldown_Reference_item
help_pulldown_separator4_item
help_pulldown_On_Item_item
help_pulldown_separator2_item
help_pulldown_Using_Help_item
help_pulldown_separator3_item
help_pulldown_About_Application_Builder_item
)
)
:element help_pulldown_Overview_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Overview..."
:mnemonic "v"
:active :true
)
:element help_pulldown_separator1_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-in
:active :true
)
:element help_pulldown_Tasks_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Tasks..."
:mnemonic "T"
:active :true
)
:element help_pulldown_Reference_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Reference..."
:mnemonic "R"
:active :true
)
:element help_pulldown_separator4_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-in
:active :true
)
:element help_pulldown_On_Item_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "On Item"
:mnemonic "O"
:active :true
)
:element help_pulldown_separator2_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-in
:active :true
)
:element help_pulldown_Using_Help_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Using Help..."
:mnemonic "U"
:active :true
)
:element help_pulldown_separator3_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-in
:active :true
)
:element help_pulldown_About_Application_Builder_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "About Application Builder..."
:mnemonic "A"
:active :true
)
:element view_module_pulldown
(
:type :menu
:tear-off :false
)
:connection
(
:from view_pulldown_Horizontal_item
:when :activate
:action-type :call-function
:action brwsP_orientation
)
:connection
(
:from view_pulldown_Hide_Object_Glyph_item
:when :activate
:action-type :call-function
:action brwsP_obj_glyph
)
:connection
(
:from view_pulldown_Show_Object_Type_item
:when :activate
:action-type :call-function
:action brwsP_obj_class
)
:connection
(
:from view_pulldown_Hide_Object_Name_item
:when :activate
:action-type :call-function
:action brwsP_obj_name
)
:connection
(
:from view_pulldown_Find_item
:when :activate
:action-type :call-function
:action brwsP_find
)
:connection
(
:from edit_pulldown_Undo_item
:when :activate
:action-type :call-function
:action brwsP_undo
)
:connection
(
:from edit_pulldown_Cut_item
:when :activate
:action-type :call-function
:action brwsP_cut
)
:connection
(
:from edit_pulldown_Copy_item
:when :activate
:action-type :call-function
:action brwsP_copy
)
:connection
(
:from edit_pulldown_Paste_item
:when :activate
:action-type :call-function
:action brwsP_paste
)
:connection
(
:from edit_pulldown_Delete_item
:when :activate
:action-type :call-function
:action brwsP_delete
)
:connection
(
:from toplevel_drawarea
:when :repaint-needed
:action-type :call-function
:action brwsP_toplevel_repaint
)
:connection
(
:from detailed_drawarea
:when :repaint-needed
:action-type :call-function
:action brwsP_detailed_repaint
)
:connection
(
:from detailed_drawarea
:when :resize
:action-type :call-function
:action brwsP_detailed_resize
)
:connection
(
:from view_pulldown_Collapse_item
:when :activate
:action-type :call-function
:action brwsP_collapse
)
:connection
(
:from view_pulldown_Expand_item
:when :activate
:action-type :call-function
:action brwsP_expand
)
:connection
(
:from view_pulldown_Expand_All_item
:when :activate
:action-type :call-function
:action brwsP_expandAll
)
:connection
(
:from view_pulldown_Tear_Off_Browser_item
:when :activate
:action-type :call-function
:action brwsP_tear_off
)
:connection
(
:from help_pulldown_Overview_item
:when :activate
:action-type :access-help-volume
:help-volume "AppBuilder"
:help-location "ABBrowser"
)
:connection
(
:from help_pulldown_Tasks_item
:when :activate
:action-type :access-help-volume
:help-volume "AppBuilder"
:help-location "ABBrowser"
)
:connection
(
:from help_pulldown_Reference_item
:when :activate
:action-type :access-help-volume
:help-volume "AppBuilder"
:help-location "ABBrowser"
)
:connection
(
:from help_pulldown_Using_Help_item
:when :activate
:action-type :access-help-volume
:help-volume "Help4Help"
:help-location "_hometopic"
)
:connection
(
:from help_pulldown_On_Item_item
:when :activate
:action-type :on-item-help
)
:connection
(
:from edit_pulldown_Close_item
:when :activate
:action-type :call-function
:action brwsP_close
)
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,372 @@
/*
* $XConsortium: brws.h /main/3 1995/11/06 17:20:37 rswiston $
*
* @(#)brws.h 1.40 29 Mar 1995
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* ab_browser.h
* Declarations for the App Builder browser
*
* Currently, this is a direct port of the Devguide browser. It will change
* for the CDE APP Builder soon.
*/
#ifndef _brws_h
#define _brws_h
#include <ab/util_types.h>
#include <ab_private/obj.h>
#include <ab_private/vwr.h>
#include <X11/Intrinsic.h>
#ifndef BIT_FIELD
#define BIT_FIELD(field) unsigned field : 1
#endif
/*
* Indices to the node element array
* e.g. index 2 points to the data that
* represents the AB_OBJ type.
*
* This is also used to determine which bit in the
* 'elements_shown' bit vector corresponds to
* the particular node element.
* e.g. The AB_OBJ name is shown only if bit # 1
* in the vector is set.
*/
#define BRWS_GLYPH_POS 0
#define BRWS_NAME_POS 1
#define BRWS_TYPE_POS 2
#define BRWS_WCLASS_POS 3
#define BRWS_NUM_ELM BRWS_WCLASS_POS + 1
#define BRWS_SHOW_GLYPH (1L << BRWS_GLYPH_POS) /* Node elements shown, */
#define BRWS_SHOW_NAME (1L << BRWS_NAME_POS) /* max = sizeof(int) */
#define BRWS_SHOW_TYPE (1L << BRWS_TYPE_POS)
#define BRWS_SHOW_WIDGET_CLASS (1L << BRWS_WCLASS_POS)
/*
* Flags for browser properties
*/
#define BRWS_MATRIX_MODE 0 /* Draw mode */
#define BRWS_TREE_MODE 1
#define BRWS_VERTICAL 0 /* Orientation */
#define BRWS_HORIZONTAL 1
/*
* Masks for browser node state
*/
#define BRWS_NODE_SELECTED (1L << 0)
#define BRWS_BNODE_PREVIEWED (1L << 1)
#define BRWS_NODE_EXPANDED (1L << 2)
#define BRWS_NODE_VISIBLE (1L << 3)
#define BRWS_NODE_STATE_IS_SET(bnode, mask) (bnode->state & mask)
#define BRWS_NODE_SET_STATE(bnode, mask) (bnode->state |= mask)
#define BRWS_NODE_UNSET_STATE(bnode, mask) (bnode->state &= ~mask)
/*
* Dimensions of borders, margins, lines
*/
#define BRWS_INTER_ELM_DISTANCE 1
#define BRWS_ELM_BBOX_MARGIN 3
#define BRWS_ELM_BORDER_WIDTH 2
#define BRWS_LINE_WIDTH 0
#define BRWS_NODE_LINK_GAP 4
#define BRWS_NODE_SUBTREE_GAP 5
/*
* The gap between two nodes
*/
#define BRWS_NODE_X_GAP 10 + BRWS_NODE_LINK_GAP + BRWS_NODE_SUBTREE_GAP
#define BRWS_NODE_Y_GAP 10 + BRWS_NODE_LINK_GAP + BRWS_NODE_SUBTREE_GAP
/*
* The origin where the graphics starts
*/
#define BRWS_X_ORIGIN 10
#define BRWS_Y_ORIGIN 10
typedef struct _AB_BROWSER *ABBrowser;
typedef struct _BrowserUiObjects *BrowserUiObj;
typedef struct _BrowserProperties *BrowserProps;
/*
* The browser window consists of 2 windows:
* - the project window, where the modules for the project is displayed
* - the module window, where the relevant modules are 'expanded'
* into the tree structured diagram.
*/
typedef struct _AB_BROWSER
{
Vwr project;
Vwr module;
ABBrowser previous;
ABBrowser next;
} AB_BROWSER;
/*
* Description of the Xt specific data in the browser
*/
typedef struct _BrowserUiObjects
{
void *ip;
Widget shell;
Widget textf;
Widget find_box;
GC normal_gc;
GC select_gc;
GC line_gc;
XFontStruct *sm_font;
XFontStruct *bg_font;
unsigned long fg_color;
unsigned long bg_color;
}BrowserUiObjects;
/*
* Description of browser properties
*/
typedef struct _BrowserProperties
{
unsigned long elements_shown;
int initial_state; /* of browser nodes */
Dimension min_width; /* of drawing area */
Dimension min_height;
BIT_FIELD(orientation); /* values: VERTICAL, HORIZONTAL */
BIT_FIELD(show_mult_trees); /* values: TRUE, FALSE */
BIT_FIELD(active); /* values: TRUE, FALSE */
}BrowserProperties;
/*
* API for manipulating App Builder browser
*/
extern void brws_register_actions(
XtAppContext app
);
extern ABBrowser brws_create (
);
extern void brws_destroy (
ABBrowser b
);
extern void brws_add_objects(
AB_OBJ *obj
);
extern void brws_add_objects_to_browser(
ABBrowser ab,
AB_OBJ *obj
);
extern void brws_delete_objects(
AB_OBJ *obj
);
extern int aob_populate_tree(
Viewer *browser,
AB_OBJ *root
);
extern BOOL aob_is_browser_win(
AB_OBJ *project,
Window w
);
extern AB_OBJ *aob_get_object_from_xy(
AB_OBJ *project,
Window w,
int x,
int y
);
extern void brws_select(
AB_OBJ *obj
);
extern void brws_deselect(
AB_OBJ *obj
);
extern void brws_toggle_select(
AB_OBJ *obj
);
extern void aob_redraw(
Viewer *b
);
extern ViewerNode *aob_object_insert(
Viewer *browser,
AB_OBJ *obj
);
extern void brws_popup(
ABBrowser b
);
extern void brws_popdown(
ABBrowser b
);
extern void aob_set_mode(
AB_OBJ *project
);
extern void aob_free_graphics(
Viewer *b
);
extern int browser_get_num_siblings(
ViewerNode *bnode
);
extern int browser_num_elm_shown(
Viewer *b
);
extern ViewerNode *aob_find_bnode(
AB_OBJ *obj,
Viewer *b
);
extern AB_OBJ *aob_project_from_browser(
Viewer *b
);
extern BrowserProps aob_browser_properties(
Viewer *b
);
extern void aob_copy_props(
Viewer *from,
Viewer *to
);
extern BrowserUiObjects *aob_ui_from_browser(
Viewer *b
);
extern Widget aob_ui_shell(
Viewer *b
);
extern ViewerNodeElm *aob_bnode_elements(
ViewerNode *bnode
);
extern void aob_str_elm_render (
ViewerNode *node,
ViewerNodeElm *elm
);
extern unsigned long browser_get_elm_shown(
Viewer *b
);
extern Vwr aob_proj_or_module(
ABBrowser b,
Widget w
);
extern void brws_set_module_name(
Vwr b
);
extern void aob_preview(
ABObj obj,
Window browser_window
);
extern void aob_deselect_all_nodes(
Vwr b,
int flag
);
extern void aob_deselect_all_objects(
AB_OBJ *project
);
extern int number_of_selected(
VNode tree
);
extern VNode node_selected(
VNode tree
);
extern void draw_viewer(
Vwr v
);
extern void erase_viewer(
Vwr v
);
extern void setup_vwr_graphics(
Vwr v
);
extern BrowserUiObj aob_create_ui_obj();
extern void brws_switch_module(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
extern void brws_update_node(
ABObj obj
);
extern ABBrowser brws_get_browser_for_obj(
ABObj obj
);
extern Widget brws_get_browser_shell_for_obj(
ABObj obj
);
extern void brws_edit_cascadeCB(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
extern void brws_build_module_menu(
Widget pulldown,
XtCallbackProc callback
);
extern void brws_show_browser(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
extern void brws_center_on_obj(
ABBrowser ab,
ABObj obj
);
extern void brws_init(
);
#endif /* _brws_h */

View File

@@ -0,0 +1,100 @@
/*
* $XConsortium: brwsP.h /main/3 1995/11/06 17:20:46 rswiston $
*
* @(#)brwsP.h 1.15 03 Oct 1994
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
* brwsP.h
* Private declarations for browser
*/
#ifndef _BRWSP_H
#define _BRWSP_H
#include <ab_private/brws.h>
#include "brws_ui.h"
extern Widget brws_draw_area(
Vwr v
);
void brwsP_create_find_box(
ABBrowser b
);
void brwsP_destroy_find_box(
Vwr v
);
void brwsP_show_find_box(
Vwr v
);
void brwsP_hide_find_box(
Vwr v
);
int brwsP_select_fn(
VNode vnode
);
void brwsP_sync_views(
ABBrowser ab,
short select_at_least_one
);
void browser_show_view_elements(
Viewer *b,
unsigned long mask,
Widget widget,
char *set_str,
char *unset_str
);
void recompute_viewer(
Viewer *v
);
int brwsP_node_is_collapsed(
VNode vnode
);
int brwsP_node_is_visible(
VNode vnode
);
void brwsP_make_drawarea_snap(
Vwr v,
Widget draw_area
);
void brwsP_collapse_selected(
ABBrowser ab
);
void brwsP_expand_selected(
ABBrowser ab
);
void brwsP_expand_collapsed(
ABBrowser ab
);
void brwsP_tear_off_selected(
ABBrowser ab
);
#endif /* _BRWSP_H */

View File

@@ -0,0 +1,226 @@
/*
* $XConsortium: brws_edit.c /main/3 1995/11/06 17:20:54 rswiston $
*
* @(#)brws_edit.c 1.2 28 Jan 1994
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
#include <sys/param.h>
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <X11/Xlib.h>
#include <Xm/Xm.h>
#include <Xm/TextF.h>
#include <ab_private/obj.h>
#include <ab_private/trav.h>
#include <ab_private/istr.h>
#include <ab/util_types.h>
#include <ab_private/abobj.h>
#include <ab_private/abobj_set.h>
#include <ab_private/proj.h>
#include <ab_private/brwsP.h>
#include <ab_private/objxm.h>
static void browser_textf_activate(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
static void
browser_textf_activate(
Widget widget,
XtPointer client_data,
XtPointer call_data
)
{
ABObj textf_obj = NULL;
VNode textf_node = NULL;
char *newName = NULL;
XtVaGetValues(widget, XmNuserData, &textf_node, NULL);
if (!textf_node)
return;
textf_obj = (AB_OBJ *)textf_node->obj_data;
newName = XmTextFieldGetString(widget);
if (!newName)
return;
XtUnmanageChild(widget);
XtVaSetValues(widget, XmNuserData, NULL, NULL);
if (!util_streq(obj_get_name(textf_obj), newName))
{
abobj_set_name(textf_obj, newName);
proj_update_node(textf_obj);
brws_update_node(textf_obj);
}
XtFree(newName);
}
void
brwsP_create_textf(
Vwr v
)
{
BrowserUiObjects *ui;
if (!v)
return;
ui = aob_ui_from_browser(v);
if (!ui)
return;
if (!ui->textf)
{
XmFontListEntry font_list_entry;
XmFontList font_list;
Widget draw_area;
draw_area = brws_draw_area(v);
if (!draw_area)
return;
font_list_entry = XmFontListEntryCreate(
XmFONTLIST_DEFAULT_TAG,
XmFONT_IS_FONT,
ui->sm_font);
font_list = XmFontListAppendEntry(NULL, font_list_entry);
ui->textf = XtVaCreateWidget("change_name",
xmTextFieldWidgetClass,
draw_area,
XmNfontList, font_list,
XmNshadowThickness, 0,
XmNhighlightThickness, 0,
XmNmarginWidth, BRWS_ELM_BBOX_MARGIN,
XmNmarginHeight, BRWS_ELM_BBOX_MARGIN,
XmNmaxLength, 80,
XmNbackground,
BlackPixelOfScreen(XtScreen(ui->shell)),
XmNforeground,
WhitePixelOfScreen(XtScreen(ui->shell)),
NULL);
XtAddCallback(ui->textf, XmNactivateCallback,
(XtCallbackProc)browser_textf_activate,
(XtPointer)NULL);
}
}
void
brwsP_destroy_textf(
Vwr v
)
{
BrowserUiObjects *ui;
if (!v)
return;
ui = aob_ui_from_browser(v);
if (!ui)
return;
if (ui->textf)
{
XtDestroyWidget(ui->textf);
ui->textf = NULL;
}
}
void
brwsP_hide_textf(
Vwr v
)
{
BrowserUiObjects *ui;
if (!v)
return;
ui = aob_ui_from_browser(v);
if (!ui)
return;
if (ui->textf && XtIsManaged(ui->textf))
XtUnmanageChild(ui->textf);
}
/*
* brwsP_show_textf()
* Show the edit in place textfield on the node element specified
* by 'elm_pos'.
* Also, store the vnode as XmNuserData on the textfield.
*/
void
brwsP_show_textf(
VNode vnode,
int elm_pos
)
{
Vwr v;
BrowserUiObj ui;
if (!vnode || (elm_pos < 0) ||
!vnode->num_elements ||
(elm_pos >= vnode->num_elements))
return;
if (!(v = vnode->browser))
return;
if (!(ui = aob_ui_from_browser(v)))
return;
if (ui->textf)
{
VNodeElm elm = vnode->elements;
if (!elm)
return;
XtVaSetValues(ui->textf,
XmNvalue, (char *)elm[elm_pos].data,
XmNx, vnode->x +
BRWS_ELM_BORDER_WIDTH,
XmNy, elm[elm_pos].y -
BRWS_ELM_BBOX_MARGIN,
XmNwidth, vnode->width -
(2 * BRWS_ELM_BORDER_WIDTH),
XmNheight, elm[elm_pos].height +
(2 * BRWS_ELM_BBOX_MARGIN),
XmNuserData,vnode,
NULL);
XtManageChild(ui->textf);
}
}

View File

@@ -0,0 +1,279 @@
/*
* $XConsortium: brws_find.c /main/3 1995/11/06 17:21:05 rswiston $
*
* @(#)brws_find.c 1.8 12 Aug 1994
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1994 Sun Microsystems, Inc. All rights reserved.
*
*/
#include <sys/param.h>
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <Xm/Xm.h>
#include <Xm/ScrollBar.h>
#include <Xm/SelectioB.h>
#include <ab_private/obj.h>
#include <ab/util_types.h>
#include <ab_private/abobj.h>
#include <ab_private/proj.h>
#include <ab_private/brwsP.h>
#include <ab_private/ab.h>
#include <ab_private/objxm.h>
/*************************************************************************
** **
** Private Function Declarations **
** **
**************************************************************************/
static void find_callback(
Widget widget,
XtPointer client_data,
XmSelectionBoxCallbackStruct *call_data
);
static void cancel_callback(
Widget widget,
XtPointer client_data,
XmSelectionBoxCallbackStruct *call_data
);
/*************************************************************************
** **
** Data **
** **
**************************************************************************/
void
brwsP_create_find_box(
ABBrowser b
)
{
Vwr v;
BrowserUiObjects *ui;
if (!b)
return;
v = b->module;
ui = aob_ui_from_browser(v);
if (!ui)
return;
if (!ui->find_box)
{
char *title;
XmString sel_label,
ok_label;
XtCallbackRec find_callback_list[] = {
{(XtCallbackProc)find_callback, (XtPointer) NULL},
{(XtCallbackProc) NULL, (XtPointer) NULL}
};
XtCallbackRec cancel_callback_list[] = {
{(XtCallbackProc)cancel_callback, (XtPointer) NULL},
{(XtCallbackProc) NULL, (XtPointer) NULL}
};
Arg args[3];
int num_args = 0;
XtSetArg(args[num_args], XmNautoUnmanage, FALSE); num_args++;
ui->find_box = XmCreatePromptDialog(ui->shell,
"find_box",
args,
num_args);
title = XtNewString(catgets(Dtb_project_catd, 100, 230,
"Module Browser: Find Object"));
XtVaSetValues(XtParent(ui->find_box),
XmNtitle, title,
NULL);
XtFree(title);
sel_label = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 231, "Object Name"));
ok_label = XmStringCreateLocalized(
catgets(Dtb_project_catd, 100, 232, "Find"));
XtVaSetValues(ui->find_box,
XmNselectionLabelString, sel_label,
XmNokLabelString, ok_label,
XmNokCallback, &find_callback_list,
XmNcancelCallback, &cancel_callback_list,
XmNuserData, b,
NULL);
XmStringFree(sel_label);
XmStringFree(ok_label);
}
}
void
brwsP_destroy_find_box(
Vwr v
)
{
BrowserUiObjects *ui;
if (!v)
return;
ui = aob_ui_from_browser(v);
if (!ui)
return;
if (ui->find_box)
{
XtDestroyWidget(ui->find_box);
ui->find_box = NULL;
}
}
void
brwsP_show_find_box(
Vwr v
)
{
BrowserUiObjects *ui;
if (!v)
return;
ui = aob_ui_from_browser(v);
if (!ui)
return;
if (ui->find_box)
{
XtManageChild(ui->find_box);
}
}
void
brwsP_hide_find_box(
Vwr v
)
{
BrowserUiObjects *ui;
if (!v)
return;
ui = aob_ui_from_browser(v);
if (!ui)
return;
if (ui->find_box && XtIsManaged(ui->find_box))
XtManageChild(ui->find_box);
}
/*
* Find callback
* Using the name/type supplied by the user, search for an object
* that matches the name/type. (We currently only support find based
* on name).
* Also, scroll the window as best we can so that the found object
* is in the center of the window.
*/
static void
find_callback(
Widget widget,
XtPointer client_data,
XmSelectionBoxCallbackStruct *call_data
)
{
ABBrowser b = NULL;
Vwr v;
VNode root_node;
BrowserUiObj ui;
DtbBrwsMainwindowInfo instance;
ABObj root_obj;
ABObj found_obj;
char *obj_name_str = NULL;
char *obj_type_str = NULL;
XtVaGetValues(widget, XmNuserData, &b, NULL);
if (!b)
return;
/*
* Get the root ABObj to use as the start of our search
*/
v = b->module;
root_node = v->current_tree;
root_obj = (ABObj)root_node->obj_data;
ui = aob_ui_from_browser(v);
instance = (DtbBrwsMainwindowInfo)ui->ip;
if (!instance->detailed_drawarea)
return;
/*
* Get instance name entered by user
*/
obj_name_str = objxm_xmstr_to_str(call_data->value);
if (!obj_name_str)
return;
found_obj = obj_find_by_name(root_obj, obj_name_str);
if (found_obj)
{
/*
**********************************************************
* Center browser node to the middle of the scrolled window
**********************************************************
*/
brws_center_on_obj(b, found_obj);
/*
* Select object on UI
*/
abobj_deselect_all(obj_get_project(found_obj));
abobj_select(found_obj);
}
if (obj_name_str)
XtFree(obj_name_str);
/*
obj_find_by_name(ABObj root, STRING name);
obj_find_by_type(ABObj root, AB_OBJECT_TYPE type);
obj_find_by_name_and_type(ABObj root, STRING name, AB_OBJECT_TYPE type);
*/
}
/*
* Cancel callback
*/
static void
cancel_callback(
Widget widget,
XtPointer client_data,
XmSelectionBoxCallbackStruct *call_data
)
{
XtUnmanageChild(widget);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,663 @@
/*** DTB_USER_CODE_START vvv Add file header below vvv ***/
/*
* $XConsortium: brws_stubs.c /main/4 1996/04/18 13:18:05 drk $
*
* @(#)brws_stubs.c 1.19 13 Apr 1995 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
/*
* File: brws_stubs.c
* Contains: Module callbacks and connection functions
*
* This file was generated by dtcodegen, from module brws
*
* Any text may be added between the DTB_USER_CODE_START and
* DTB_USER_CODE_END comments (even non-C code). Descriptive comments
* are provided only as an aid.
*
* ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
* ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include "dtbuilder.h"
#include "brws_ui.h"
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All necessary header files have been included.
***
*** Add include files, types, macros, externs, and user functions here.
***/
#include <ab_private/abobj_edit.h>
#include <ab_private/util.h>
#include "dtbuilder.h"
#include "brws.h"
#include "brwsP.h"
#include "brws_ui.h"
#include "projP.h"
#include "dtb_utils.h"
/*
* Declarations of global widgets used by callbacks.
*/
/*
* End declarations of global widgets
*/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/
void
brws_help_pulldown_Overview_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("AppBuilder", "ABBrowser");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brws_help_pulldown_Tasks_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("AppBuilder", "ABBrowser");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brws_help_pulldown_Reference_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("AppBuilder", "ABBrowser");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brws_help_pulldown_Using_Help_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("Help4Help", "_hometopic");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brws_help_pulldown_On_Item_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_do_onitem_help();
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_orientation(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser ab = NULL;
BrowserProps props;
XmString xmlabel;
char *str;
XtVaGetValues(widget, XmNuserData, &ab, NULL);
props = aob_browser_properties(ab->module);
if (props->orientation == BRWS_VERTICAL) {
props->orientation = BRWS_HORIZONTAL;
str = catgets(Dtb_project_catd, 100, 66, "Vertical");
xmlabel = XmStringCreateLocalized(str);
}
else {
props->orientation = BRWS_VERTICAL;
str = catgets(Dtb_project_catd, 100, 67, "Horizontal");
xmlabel = XmStringCreateLocalized(str);
}
XtVaSetValues(widget, XmNlabelString, xmlabel, NULL);
XmStringFree(xmlabel);
erase_viewer(ab->module);
draw_viewer(ab->module);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_obj_glyph(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser ab = NULL;
char *hide_str = NULL,
*show_str = NULL;
XtVaGetValues(widget, XmNuserData, &ab, NULL);
if (!ab || !ab->module)
return;
hide_str = XtNewString(catgets(Dtb_project_catd, 100, 60,
"Hide Object Glyph"));
show_str = XtNewString(catgets(Dtb_project_catd, 100, 61,
"Show Object Glyph"));
browser_show_view_elements(ab->module,
BRWS_SHOW_GLYPH, widget, hide_str, show_str);
XtFree(hide_str);
XtFree(show_str);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_obj_class(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser b = NULL;
char *hide_str = NULL,
*show_str = NULL;
XtVaGetValues(widget, XmNuserData, &b, NULL);
if (!b || !b->module)
return;
hide_str = XtNewString(catgets(Dtb_project_catd, 100, 62,
"Hide Object Type"));
show_str = XtNewString(catgets(Dtb_project_catd, 100, 63,
"Show Object Type"));
browser_show_view_elements(b->module,
BRWS_SHOW_TYPE, widget, hide_str, show_str);
XtFree(hide_str);
XtFree(show_str);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_obj_name(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser ab = NULL;
char *hide_str = NULL,
*show_str = NULL;
XtVaGetValues(widget, XmNuserData, &ab, NULL);
if (!ab || !ab->module)
return;
hide_str = XtNewString(catgets(Dtb_project_catd, 100, 64,
"Hide Object Name"));
show_str = XtNewString(catgets(Dtb_project_catd, 100, 65,
"Show Object Name"));
browser_show_view_elements(ab->module,
BRWS_SHOW_NAME, widget, hide_str, show_str);
XtFree(hide_str);
XtFree(show_str);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_find(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser b = NULL;
Vwr v;
BrowserUiObj ui;
XtVaGetValues(widget, XmNuserData, &b, NULL);
v = b->module;
ui = aob_ui_from_browser(v);
if (!ui->find_box)
{
brwsP_create_find_box(b);
}
brwsP_show_find_box(v);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_undo(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
(void)abobj_undo();
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_cut(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
(void)abobj_cut();
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_copy(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
(void)abobj_copy();
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_paste(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
(void)abobj_paste(AB_PASTE_INITIATOR_BRWS_EDIT_MENU);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_delete(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
(void)abobj_delete();
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_toplevel_repaint(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser ab = NULL;
Vwr b;
XtVaGetValues(widget, XmNuserData, &ab, NULL);
b = aob_proj_or_module(ab, widget);
/*
* Don't call repaint proc if no project associated with
* browser yet
*/
if (!b->obj_data)
return;
vwr_repaint(b);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_detailed_repaint(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser ab = NULL;
Vwr b;
XtVaGetValues(widget, XmNuserData, &ab, NULL);
b = aob_proj_or_module(ab, widget);
/*
* Don't call repaint proc if no project associated with
* browser yet
*/
if (!b->obj_data)
return;
vwr_repaint(b);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_detailed_resize(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*
* Will remove this function soon
*/
return;
/*
ABBrowser ab = NULL;
Vwr b;
XtVaGetValues(widget, XmNuserData, &ab, NULL);
b = aob_proj_or_module(ab, widget);
recompute_viewer(b);
*/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_collapse(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser ab = NULL;
XtVaGetValues(widget, XmNuserData, &ab, NULL);
brwsP_collapse_selected(ab);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_expand(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser ab = NULL;
XtVaGetValues(widget, XmNuserData, &ab, NULL);
brwsP_expand_selected(ab);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_expandAll(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser ab = NULL;
XtVaGetValues(widget, XmNuserData, &ab, NULL);
brwsP_expand_collapsed(ab);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_tear_off(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
ABBrowser b = NULL;
XtVaGetValues(widget, XmNuserData, &b, NULL);
brwsP_tear_off_selected(b);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
brwsP_close(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbBrwsMainwindowInfo instance = (DtbBrwsMainwindowInfo)clientData;
Widget shell;
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*
* Return right away if instance ptr is NULL
* or if the instance struct is not initialized
* or the 'mainwindow' field is NULL
*/
if (!instance || !instance->initialized || !instance->mainwindow)
return;
/*
* Get parent shell
*/
shell = ui_get_ancestor_shell(instance->mainwindow);
/*
* Destroy browser shell widget. This will trigger destroy
* callbacks that will do some cleanup
*/
if (shell)
XtDestroyWidget(shell);
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All automatically-generated data and functions have been defined.
***
*** Add new functions here, or at the top of the file.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,76 @@
/*** DTB_USER_CODE_START vvv Add file header below vvv ***/
/*
* $XConsortium: button_stubs.c /main/4 1996/04/18 13:18:01 drk $
*
* @(#)button_stubs.c 1.5 27 Sep 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
/*
* File: button_stubs.c
* Contains: Module callbacks and connection functions
*
* This file was generated by dtcodegen, from module button
*
* Any text may be added between the DTB_USER_CODE_START and
* DTB_USER_CODE_END comments (even non-C code). Descriptive comments
* are provided only as an aid.
*
* ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
* ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include "dtbuilder.h"
#include "button_ui.h"
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All necessary header files have been included.
***
*** Add include files, types, macros, externs, and user functions here.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All automatically-generated data and functions have been defined.
***
*** Add new functions here, or at the top of the file.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/

View File

@@ -0,0 +1,144 @@
/*
* $XConsortium: cgen.h /main/3 1995/11/06 17:22:21 rswiston $
*
* @(#)cgen.h 1.14 14 Nov 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
#ifndef _CGEN_H_
#define _CGEN_H_
/*
* cgen.h - Code Generator interface
*/
#include <X11/Intrinsic.h>
#include <ab_private/obj.h>
#include <ab_private/obj_notify.h>
/*
* The final goal the user wants to reach. May need to issue a series of
* (system) commands to achieve this goal.
*/
typedef enum
{
CG_GOAL_UNDEF = 0, /* CG = codegen */
CG_GOAL_GEN_CODE,
CG_GOAL_MAKE,
CG_GOAL_RUN,
CG_GOAL_MAKE_AND_RUN,
CG_GOAL_NUM_VALUES
} CG_GOAL;
typedef enum
{
CG_CMD_UNDEF = 0,
CG_CMD_GEN_CODE,
CG_CMD_MAKE,
CG_CMD_RUN,
CG_SUBCOMMAND_NUM_VALUES
} CG_SUBCOMMAND;
typedef enum
{
CG_VERBOSITY_UNDEF = 0,
CG_VERBOSITY_NORMAL,
CG_VERBOSITY_SILENT,
CG_VERBOSITY_VERBOSE,
CB_VERBOSITY_NUM_VALUES
} CG_VERBOSITY;
typedef enum
{
CG_GEN_FLAG_UNDEF = 0,
CG_GEN_PROJ_FLAG,
CG_GEN_MAIN_FLAG,
CG_GEN_SPECIFIC_FILES_FLAG,
CG_GEN_SPECIFIC_FILES_AND_MAIN_FLAG,
CG_GEN_FLAG_NUM_VALUES
} CG_GEN_FLAG;
typedef struct
{
CG_GEN_FLAG cmd_flag;
Boolean no_merge;
CG_VERBOSITY verbosity;
StringList module_list;
STRING make_args;
STRING run_args;
} CGenOptions;
extern CGenOptions CodeGenOptions;
extern StringList user_env_vars;
extern StringList module_list;
/*
extern void cgen_show_dialog(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
*/
extern void cgen_show_codegen_win(
void
);
extern void cgen_gen_code(
CG_SUBCOMMAND cmd
);
extern void cgen_make(
CG_SUBCOMMAND cmd
);
extern void cgen_run(
CG_SUBCOMMAND cmd
);
extern void cgen_make_run(
CG_SUBCOMMAND cmd
);
extern void cgenP_init_props_module_list(
Widget mod_list
);
extern void cgenP_prop_init(void);
extern void cgenP_update_mod_listCB(
Widget widget,
XtPointer clientData,
XtPointer callData
);
/*
* Updates project directory, title, ...
*/
extern int cgen_notify_new_directory(STRING directory);
extern int cgen_notify_new_project(ABObj project);
extern int cgen_notify_props_new_proj(ABObj project);
extern int cgenP_sync_up_dir(void);
/*
* Aborts whatever command is running (if any)
*/
extern int cgen_abort(void);
#endif /* _CGEN_H_ */

View File

@@ -0,0 +1,247 @@
// $XConsortium: cgen_env.bil /main/3 1995/11/06 17:22:29 rswiston $
//
// @(#)cgen_env.bil 1.3 27 May 1994
//
// RESTRICTED CONFIDENTIAL INFORMATION:
//
// The information in this document is subject to special
// restrictions in a confidential disclosure agreement between
// HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
// document outside HP, IBM, Sun, USL, SCO, or Univel without
// Sun's specific written approval. This document and all copies
// and derivative works thereof must be returned or destroyed at
// Sun's request.
//
// Copyright 1993 Sun Microsystems, Inc. All rights reserved.
//
:bil-version 1 0
:module cgen_env
(
:element dialog
(
:type :dialog
:bg-color "white"
:label "Environment Options"
:resizable :true
:visible :false
:default-button get_btn
:help-button help_btn
:help-volume "AppBuilder"
:help-location "ABCodeGenEnvirOptionsDialog"
:help-text "Use this dialog to edit or examine the value of environment variables to be used when the code generator is run from the Code Generator Window."
:children (
ctrl_panel
dialog_button_panel
)
)
:element ctrl_panel
(
:type :container
:container-type :relative
:x 0
:y 0
:visible :true
:border-frame :shadow-in
:north-attachment (:point 0 0)
:south-attachment (:obj dialog 0)
:east-attachment (:obj dialog 0)
:west-attachment (:point 0 0)
:children (
name_textf
group
)
)
:element name_textf
(
:type :text-field
:text-type :alphanumeric
:x 39
:y 12
:label-type :string
:label "Variable Name:"
:label-position :north
:num-columns 35
:max-length 80
:read-only :false
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:east-attachment (:grid-line 90 0)
:west-attachment (:grid-line 10 0)
)
:element group
(
:type :container
:container-type :group
:active :true
:visible :true
:x 84
:y 85
:group-type :ignore
:border-frame :none
:north-attachment (:obj name_textf 15)
:south-attachment (:grid-line 90 0)
:east-attachment (:grid-line 90 0)
:west-attachment (:grid-line 10 0)
:children (
textpane
env_label
)
)
:element textpane
(
:type :text-pane
:text-type :alphanumeric
:x 0
:y 31
:border-frame :none
:num-rows 13
:num-columns 35
:hscrollbar :never
:vscrollbar :never
:word-wrap :true
:read-only :false
:active :true
:visible :true
:north-attachment (:obj env_label 5)
:south-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:point 0 0)
)
:element env_label
(
:type :label
:x 0
:y 0
:label-type :string
:label "Value:"
:label-alignment :left
:active :true
:visible :true
:north-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:point 0 0)
)
:element dialog_button_panel
(
:type :container
:container-type :button-panel
:height 36
:visible :true
:border-frame :none
:children (
get_btn
set_btn
reset_btn
cancel_btn
help_btn
)
)
:element get_btn
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Get"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 19 0)
:west-attachment (:grid-line 2 0)
)
:element set_btn
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Set"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 39 0)
:west-attachment (:grid-line 21 0)
)
:element reset_btn
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Reset"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 59 0)
:west-attachment (:grid-line 41 0)
)
:element cancel_btn
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Cancel"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 79 0)
:west-attachment (:grid-line 61 0)
)
:element help_btn
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Help"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 98 0)
:west-attachment (:grid-line 81 0)
)
:connection
(
:from get_btn
:when :activate
:action-type :call-function
:action cgenP_get_envCB
)
:connection
(
:from set_btn
:when :activate
:action-type :call-function
:action cgenP_set_envCB
)
:connection
(
:from reset_btn
:when :activate
:action-type :call-function
:action cgenP_reset_envCB
)
:connection
(
:from dialog
:when :after-create
:action-type :call-function
:action cgenP_init_env_list
)
:connection
(
:from cancel_btn
:when :activate
:action-type :call-function
:action cgenP_cancel_envCB
)
)

View File

@@ -0,0 +1,267 @@
/*** DTB_USER_CODE_START vvv Add file header below vvv ***/
/*
* $XConsortium: cgen_env_stubs.c /main/4 1996/04/18 13:17:55 drk $
*
* @(#)cgen_env_stubs.c 1.15 16 Feb 1995 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
/*
* File: cgen_env_stubs.c
* Contains: Module callbacks and connection functions
*
* This file was generated by dtcodegen, from module cgen_env
*
* Any text may be added between the DTB_USER_CODE_START and
* DTB_USER_CODE_END comments (even non-C code). Descriptive comments
* are provided only as an aid.
*
* ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
* ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include "dtbuilder.h"
#include "cgen_env_ui.h"
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All necessary header files have been included.
***
*** Add include files, types, macros, externs, and user functions here.
***/
#include <Xm/TextF.h>
#include <Xm/Text.h>
#include "dtbuilder.h"
#include "cgen_env_ui.h"
#include <ab_private/strlist.h>
#include "palette_ui.h"
#include "cgen.h"
#include "dtb_utils.h"
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/
void
cgenP_get_envCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenEnvDialogInfo env_dlg = (DtbCgenEnvDialogInfo)clientData;
STRING var_name = NULL;
STRING var_value = NULL;
int index = 0;
var_name = XmTextFieldGetString(env_dlg->name_textf);
if (util_strempty(var_name))
{
/* clean out the value textpane */
XmTextSetString(env_dlg->textpane, NULL);
}
else
{
if (strlist_str_exists(user_env_vars, var_name))
{
var_value = (STRING) strlist_get_str_data(user_env_vars, var_name);
}
else
{
/* not in list */
var_value = getenv(var_name);
}
if (var_value == NULL)
{
XmTextSetString(env_dlg->textpane, catgets(Dtb_project_catd, 100, 58, "*** Not Set ***"));
}
else
{
XmTextSetString(env_dlg->textpane, var_value);
}
}
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_set_envCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenEnvDialogInfo env_dlg = (DtbCgenEnvDialogInfo)clientData;
STRING var_name = NULL;
STRING var_value = NULL;
STRING old_var_value = NULL;
var_name = XmTextFieldGetString(env_dlg->name_textf);
if (util_strempty(var_name))
return;
var_value = XmTextGetString(env_dlg->textpane);
if (strlist_str_exists(user_env_vars, var_name))
{
/* the user has set this before - we need to deallocate
* the string we allocated
*/
old_var_value = (STRING) strlist_get_str_data(user_env_vars, var_name);
util_free(old_var_value);
strlist_remove_str(user_env_vars, var_name);
}
if (!util_strempty(var_value))
strlist_add_str(user_env_vars, var_name, (void *)strdup(var_value));
else
strlist_add_str(user_env_vars, var_name, (void *)NULL);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_reset_envCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenEnvDialogInfo env_dlg = (DtbCgenEnvDialogInfo)clientData;
STRING var_name = NULL;
STRING var_value = NULL;
var_name = XmTextFieldGetString(env_dlg->name_textf);
if (util_strempty(var_name))
return;
if (strlist_str_exists(user_env_vars, var_name))
{
/* the user has set this before - we need to deallocate
* the string we allocated
*/
var_value = (STRING) strlist_get_str_data(user_env_vars, var_name);
util_free(var_value);
strlist_remove_str(user_env_vars, var_name);
}
var_value = getenv(var_name);
if (var_value == NULL)
{
XmTextSetString(env_dlg->textpane, catgets(Dtb_project_catd, 100, 58, "*** Not Set ***"));
}
else
{
XmTextSetString(env_dlg->textpane, var_value);
}
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_init_env_list(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbCgenEnvDialogInfo dtbSource = (DtbCgenEnvDialogInfo)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
if (user_env_vars == NULL)
{
user_env_vars = strlist_create();
}
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_cancel_envCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenEnvDialogInfo env_dlg = (DtbCgenEnvDialogInfo)clientData;
char buf[10];
sprintf(buf, "");
XmTextFieldSetString(env_dlg->name_textf, buf);
XmTextSetString(env_dlg->textpane, buf);
XtPopdown(env_dlg->dialog);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All automatically-generated data and functions have been defined.
***
*** Add new functions here, or at the top of the file.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/

View File

@@ -0,0 +1,596 @@
// $XConsortium: cgen_props.bil /main/3 1995/11/06 17:22:46 rswiston $
//
// @(#)cgen_props.bil 1.6 14 Jun 1994
//
// RESTRICTED CONFIDENTIAL INFORMATION:
//
// The information in this document is subject to special
// restrictions in a confidential disclosure agreement between
// HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
// document outside HP, IBM, Sun, USL, SCO, or Univel without
// Sun's specific written approval. This document and all copies
// and derivative works thereof must be returned or destroyed at
// Sun's request.
//
// Copyright 1993 Sun Microsystems, Inc. All rights reserved.
//
:bil-version 1 0
:module cgen_props
(
:element cgen_props_dlg
(
:type :dialog
:bg-color "white"
:label "Code Generator Options"
:resizable :true
:visible :false
:default-button dialog_apply_button
:help-button dialog_help_button
:help-volume "AppBuilder"
:help-location "ABCodeGenOptionsDialog"
:help-text "This dialog allows control of the way in which the code generator will run when it is executed from the Code Generator Window."
:children (
ctrl_panel
dialog_button_panel
)
)
:element ctrl_panel
(
:type :container
:container-type :relative
:x 0
:y 0
:visible :true
:border-frame :shadow-in
:north-attachment (:point 0 0)
:south-attachment (:obj cgen_props_dlg 0)
:east-attachment (:obj cgen_props_dlg 0)
:west-attachment (:point 0 0)
:children (
proj_group
cgen_flags_radiobox
module_list
cgen_label
defaults_button
options_group
)
)
:element proj_group
(
:type :container
:container-type :group
:active :true
:visible :true
:x 10
:y 10
:group-type :ignore
:border-frame :none
:north-attachment (:point 0 10)
:east-attachment (:point 0 10)
:west-attachment (:point 0 10)
:children (
proj_label
proj_name
)
)
:element proj_label
(
:type :label
:x 0
:y 0
:label-type :string
:label "Project:"
:label-alignment :left
:active :true
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:west-attachment (:point 0 0)
)
:element proj_name
(
:type :label
:x 72
:y 0
:label-type :string
:label " "
:label-alignment :left
:active :true
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:east-attachment (:point 0 10)
:west-attachment (:obj proj_label 5)
)
:element cgen_flags_radiobox
(
:type :choice
:choice-type :exclusive
:x 10
:y 45
:label-type :string
:label "Generate Code For:"
:label-position :north
:num-columns 1
:orientation :vertical
:selection-required :false
:active :true
:visible :true
:north-attachment (:obj proj_group 10)
:east-attachment (:point 0 10)
:west-attachment (:point 0 10)
:children (
cgen_flags_radiobox_Entire_Project_item
cgen_flags_radiobox_Main_Only_item
cgen_flags_radiobox_Specific_Modules_Only_item
cgen_flags_radiobox_Specific_Modules_and_Main_item
)
)
:element cgen_flags_radiobox_Entire_Project_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Entire Project"
:active :true
:selected :true
)
:element cgen_flags_radiobox_Main_Only_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Main Only"
:active :true
:selected :false
)
:element cgen_flags_radiobox_Specific_Modules_Only_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Specific Modules Only"
:active :true
:selected :false
)
:element cgen_flags_radiobox_Specific_Modules_and_Main_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Specific Modules and Main"
:active :true
:selected :false
)
:element module_list
(
:type :list
:x 40
:y 185
:selection-mode :multiple
:selection-required :false
:num-rows 4
:active :false
:visible :true
:north-attachment (:obj cgen_flags_radiobox 5)
:south-attachment (:obj cgen_label 5)
:east-attachment (:point 0 10)
:west-attachment (:point 0 40)
)
:element cgen_label
(
:type :label
:x 10
:y 275
:label-type :string
:label "When code is generated:"
:label-alignment :left
:active :true
:visible :true
:south-attachment (:obj options_group 5)
:east-attachment (:point 0 10)
:west-attachment (:point 0 10)
)
:element defaults_button
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Reset to Defaults"
:active :true
:visible :true
:south-attachment (:point 0 10)
:east-attachment (:point 0 25)
)
:element options_group
(
:type :container
:container-type :group
:active :true
:visible :true
:x 10
:y 268
:group-type :ignore
:border-frame :none
:south-attachment (:obj defaults_button 10)
:east-attachment (:point 0 25)
:west-attachment (:point 0 10)
:children (
options_left
options_right
)
)
:element options_left
(
:type :container
:container-type :group
:active :true
:visible :true
:x 0
:y 0
:group-type :ignore
:border-frame :none
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:west-attachment (:point 0 0)
:children (
merge_checkbox
arg_labels
)
)
:element merge_checkbox
(
:type :choice
:choice-type :nonexclusive
:x 5
:y 0
:num-columns 1
:orientation :vertical
:selection-required :false
:active :true
:visible :true
:north-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:point 0 5)
:children (
merge_checkbox_Don_t_Merge_item
)
)
:element merge_checkbox_Don_t_Merge_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Don't Merge"
:active :true
:selected :false
)
:element arg_labels
(
:type :container
:container-type :group
:active :true
:visible :true
:x 0
:y 47
:group-type :column
:column-alignment :labels
:voffset 10
:vattach_type :obj
:border-frame :none
:north-attachment (:obj merge_checkbox 15)
:south-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:point 0 0)
:children (
make_label
run_time_label
)
)
:element make_label
(
:type :label
:label-type :string
:label "Make Arguments:"
:label-alignment :right
:active :true
:visible :true
)
:element run_time_label
(
:type :label
:label-type :string
:label "Run Time Arguments:"
:label-alignment :right
:active :true
:visible :true
)
:element options_right
(
:type :container
:container-type :group
:active :true
:visible :true
:x 131
:y 0
:group-type :ignore
:border-frame :none
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:obj options_left 1)
:children (
make_textf
run_time_textf
verbosity_opmenu
)
)
:element make_textf
(
:type :text-field
:text-type :alphanumeric
:x 5
:y 46
:num-columns 26
:max-length 80
:read-only :false
:active :true
:visible :true
:north-attachment (:obj verbosity_opmenu 15)
:east-attachment (:point 0 0)
:west-attachment (:point 0 0)
)
:element run_time_textf
(
:type :text-field
:text-type :alphanumeric
:x 6
:y 73
:num-columns 26
:max-length 80
:read-only :false
:active :true
:visible :true
:north-attachment (:obj make_textf 2)
:south-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:point 0 0)
)
:element verbosity_opmenu
(
:type :choice
:choice-type :option-menu
:x 0
:y 0
:num-columns 1
:orientation :vertical
:selection-required :false
:active :true
:visible :true
:north-attachment (:point 0 0)
:east-attachment (:point 0 0)
:children (
verbosity_opmenu_Report_Normal_Messages_item
verbosity_opmenu_Be_Silent_item
verbosity_opmenu_Be_Verbose_item
)
)
:element verbosity_opmenu_Report_Normal_Messages_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Report Normal Messages"
:active :true
:selected :true
)
:element verbosity_opmenu_Be_Silent_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Be Silent"
:active :true
:selected :false
)
:element verbosity_opmenu_Be_Verbose_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Be Verbose"
:active :true
:selected :false
)
:element dialog_button_panel
(
:type :container
:container-type :button-panel
:height 36
:visible :true
:border-frame :none
:children (
dialog_ok_button
dialog_apply_button
dialog_reset_button
dialog_cancel_button
dialog_help_button
)
)
:element dialog_ok_button
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "OK"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 19 0)
:west-attachment (:grid-line 2 0)
)
:element dialog_apply_button
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Apply"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 39 0)
:west-attachment (:grid-line 21 0)
)
:element dialog_reset_button
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Reset"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 59 0)
:west-attachment (:grid-line 41 0)
)
:element dialog_cancel_button
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Cancel"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 79 0)
:west-attachment (:grid-line 61 0)
)
:element dialog_help_button
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Help"
:active :true
:visible :true
:north-attachment (:grid-line 5 0)
:south-attachment (:grid-line 95 0)
:east-attachment (:grid-line 98 0)
:west-attachment (:grid-line 81 0)
)
:element no_sel_mod_msg
(
:type :message
:message-type :error
:label "Application Builder"
:message "No modules selected."
:action1-label "OK"
:cancel-button :false
:help-button :true
:default-button :action1-button
:help-text "You must select at least one module for which to \ngenerate code."
)
:connection
(
:from cgen_flags_radiobox_Entire_Project_item
:when :toggle
:action-type :call-function
:action cgenP_set_gen_projCB
)
:connection
(
:from cgen_flags_radiobox_Main_Only_item
:when :toggle
:action-type :call-function
:action cgenP_set_gen_mainCB
)
:connection
(
:from cgen_flags_radiobox_Specific_Modules_Only_item
:when :toggle
:action-type :call-function
:action cgenP_set_gen_specificCB
)
:connection
(
:from cgen_flags_radiobox_Specific_Modules_and_Main_item
:when :toggle
:action-type :call-function
:action cgenP_set_gen_specific_and_mainCB
)
:connection
(
:from verbosity_opmenu_Report_Normal_Messages_item
:when :activate
:action-type :call-function
:action cgenP_set_normal_verbosityCB
)
:connection
(
:from verbosity_opmenu_Be_Silent_item
:when :activate
:action-type :call-function
:action cgenP_set_silent_verbosityCB
)
:connection
(
:from verbosity_opmenu_Be_Verbose_item
:when :activate
:action-type :call-function
:action cgenP_set_verbose_verbosityCB
)
:connection
(
:from defaults_button
:when :activate
:action-type :call-function
:action cgenP_reset_default_propsCB
)
:connection
(
:from dialog_apply_button
:when :activate
:action-type :call-function
:action cgenP_apply_propsCB
)
:connection
(
:from dialog_ok_button
:when :activate
:action-type :call-function
:action cgenP_ok_propsCB
)
:connection
(
:from dialog_reset_button
:when :activate
:action-type :call-function
:action cgenP_reset_propsCB
)
:connection
(
:from module_list
:when :after-create
:action-type :call-function
:action cgenP_add_update_list_cb
)
:connection
(
:from dialog_cancel_button
:when :activate
:action-type :call-function
:action cgenP_cancel_propsCB
)
)

View File

@@ -0,0 +1,719 @@
/*** DTB_USER_CODE_START vvv Add file header below vvv ***/
/*
* $XConsortium: cgen_props_stubs.c /main/4 1996/04/18 13:17:49 drk $
*
* @(#)cgen_props_stubs.c 1.24 21 Mar 1995 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
/*
* File: cgen_props_stubs.c
* Contains: Module callbacks and connection functions
*
* This file was generated by dtcodegen, from module cgen_props
*
* Any text may be added between the DTB_USER_CODE_START and
* DTB_USER_CODE_END comments (even non-C code). Descriptive comments
* are provided only as an aid.
*
* ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
* ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include "dtbuilder.h"
#include "cgen_props_ui.h"
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All necessary header files have been included.
***
*** Add include files, types, macros, externs, and user functions here.
***/
#include <Xm/List.h>
#include <Xm/TextF.h>
#include <Xm/RowColumn.h>
#include "dtbuilder.h"
#include "cgen_props_ui.h"
#include "palette_ui.h"
#include <ab_private/objxm.h>
#include <ab_private/proj.h>
#include <ab_private/util.h>
#include <ab_private/cgen.h>
#include <ab_private/strlist.h>
#include "dtb_utils.h"
/*
* Definition of global widgets used by callbacks.
*/
CGenOptions CodeGenOptions = {
CG_GEN_PROJ_FLAG,
False,
CG_VERBOSITY_NORMAL,
NULL,
NULL,
NULL};
CG_GEN_FLAG CodeGenCmd = CG_GEN_PROJ_FLAG;
CG_VERBOSITY CodeGenVerbosityLevel = CG_VERBOSITY_NORMAL;
void
cgenP_update_mod_listCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
STRING module_name = NULL;
int pos = 0;
XmListCallbackStruct *list_info = (XmListCallbackStruct *)callData;
module_name = objxm_xmstr_to_str(list_info->item);
pos = XmListItemPos(widget, list_info->item);
/* Check if the list item has been selected or de-selected */
if (XmListPosSelected(widget, pos))
{
/* If it has been selected, add it to the module_list */
strlist_add_str(module_list, module_name, (void *)NULL);
}
else
{
/* If it has been de-selected, remove it from the module_list */
strlist_remove_str(module_list, module_name);
}
}
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/
void
cgenP_set_gen_projCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenPropsCgenPropsDlgInfo props_dlg =
(DtbCgenPropsCgenPropsDlgInfo)clientData;
CodeGenCmd = CG_GEN_PROJ_FLAG;
if (XtIsSensitive(props_dlg->module_list))
{
XtSetSensitive(props_dlg->module_list, False);
XtSetSensitive(props_dlg->module_list_scrolledwin, False);
}
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_set_gen_mainCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenPropsCgenPropsDlgInfo props_dlg =
(DtbCgenPropsCgenPropsDlgInfo)clientData;
CodeGenCmd = CG_GEN_MAIN_FLAG;
if (XtIsSensitive(props_dlg->module_list))
{
XtSetSensitive(props_dlg->module_list, False);
XtSetSensitive(props_dlg->module_list_scrolledwin, False);
}
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_set_gen_specificCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenPropsCgenPropsDlgInfo props_dlg =
(DtbCgenPropsCgenPropsDlgInfo)clientData;
CodeGenCmd = CG_GEN_SPECIFIC_FILES_FLAG;
if (!XtIsSensitive(props_dlg->module_list))
{
XtSetSensitive(props_dlg->module_list, True);
XtSetSensitive(props_dlg->module_list_scrolledwin, True);
}
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_set_gen_specific_and_mainCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenPropsCgenPropsDlgInfo props_dlg =
(DtbCgenPropsCgenPropsDlgInfo)clientData;
CodeGenCmd = CG_GEN_SPECIFIC_FILES_AND_MAIN_FLAG;
if (!XtIsSensitive(props_dlg->module_list))
{
XtSetSensitive(props_dlg->module_list, True);
XtSetSensitive(props_dlg->module_list_scrolledwin, True);
}
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_set_normal_verbosityCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
CodeGenVerbosityLevel = CG_VERBOSITY_NORMAL;
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_set_silent_verbosityCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
CodeGenVerbosityLevel = CG_VERBOSITY_SILENT;
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_set_verbose_verbosityCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
CodeGenVerbosityLevel = CG_VERBOSITY_VERBOSE;
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_reset_default_propsCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenPropsCgenPropsDlgInfo props_dlg =
(DtbCgenPropsCgenPropsDlgInfo)clientData;
int num_selected_mods = 0, i;
XmStringTable gen_module_list = NULL;
Widget opmenu_label = NULL;
XmString lbl_str = NULL;
/* set the code generation flag */
CodeGenCmd = CG_GEN_PROJ_FLAG;
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Entire_Project_item,
XmNset, True, NULL);
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Main_Only_item,
XmNset, False, NULL);
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Specific_Modules_Only_item,
XmNset, False, NULL);
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Specific_Modules_and_Main_item,
XmNset, False, NULL);
/* set the merge flag */
XtVaSetValues(props_dlg->merge_checkbox_items.Don_t_Merge_item,
XmNset, False, NULL);
/* set the verbosity */
CodeGenVerbosityLevel = CG_VERBOSITY_NORMAL;
XtVaSetValues(props_dlg->verbosity_opmenu_items.Report_Normal_Messages_item,
XmNset, True, NULL);
XtVaSetValues(props_dlg->verbosity_opmenu_items.Be_Silent_item,
XmNset, False, NULL);
XtVaSetValues(props_dlg->verbosity_opmenu_items.Be_Verbose_item,
XmNset, False, NULL);
opmenu_label = XmOptionButtonGadget(props_dlg->verbosity_opmenu);
XtVaGetValues(props_dlg->verbosity_opmenu_items.Report_Normal_Messages_item,
XmNlabelString, &lbl_str, NULL);
XtVaSetValues(opmenu_label, XmNlabelString, lbl_str, NULL);
/* deselect all in the module list */
XmListDeselectAllItems(props_dlg->module_list);
if (module_list != NULL)
{
strlist_destroy(module_list);
module_list = strlist_create();
}
/* clear the make args */
XmTextFieldSetString(props_dlg->make_textf, NULL);
/* clear the run time args */
XmTextFieldSetString(props_dlg->run_time_textf, NULL);
/* set the sensitivity */
if (XtIsSensitive(props_dlg->module_list))
{
XtSetSensitive(props_dlg->module_list, False);
XtSetSensitive(props_dlg->module_list_scrolledwin, False);
}
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_apply_propsCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenPropsCgenPropsDlgInfo props_dlg =
(DtbCgenPropsCgenPropsDlgInfo)clientData;
int i;
int num_selected_mods = 0;
Widget merge_toggle;
Boolean no_merge = False;
STRING make_args = NULL;
STRING run_args = NULL;
if (CodeGenOptions.make_args != NULL)
{
free(CodeGenOptions.make_args);
CodeGenOptions.make_args = NULL;
}
if (CodeGenOptions.run_args != NULL)
{
free(CodeGenOptions.run_args);
CodeGenOptions.run_args = NULL;
}
if (CodeGenOptions.module_list != NULL)
{
strlist_destroy(CodeGenOptions.module_list);
CodeGenOptions.module_list = NULL;
}
merge_toggle = props_dlg->merge_checkbox_items.Don_t_Merge_item;
XtVaGetValues(merge_toggle, XmNset, &no_merge, NULL);
CodeGenOptions.cmd_flag = CodeGenCmd;
CodeGenOptions.no_merge = no_merge;
CodeGenOptions.verbosity = CodeGenVerbosityLevel;
make_args = XmTextFieldGetString(props_dlg->make_textf);
if (!util_strempty(make_args))
CodeGenOptions.make_args = strdup(make_args);
run_args = XmTextFieldGetString(props_dlg->run_time_textf);
if (!util_strempty(run_args))
CodeGenOptions.run_args = strdup(run_args);
if (CodeGenCmd == CG_GEN_SPECIFIC_FILES_FLAG ||
CodeGenCmd == CG_GEN_SPECIFIC_FILES_AND_MAIN_FLAG)
{
XtVaGetValues(props_dlg->module_list,
XmNselectedItemCount, &num_selected_mods,
NULL);
if (num_selected_mods == 0)
{
dtb_cgen_props_no_sel_mod_msg_initialize(
&dtb_cgen_props_no_sel_mod_msg);
(void)dtb_show_modal_message(
dtb_cgen_props_cgen_props_dlg.cgen_props_dlg_shellform,
&dtb_cgen_props_no_sel_mod_msg, NULL, NULL,NULL);
}
else
{
CodeGenOptions.module_list = strlist_dup(module_list);
}
}
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_ok_propsCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
cgenP_apply_propsCB(widget, clientData, callData);
ui_win_show(dtb_cgen_props_cgen_props_dlg.cgen_props_dlg_shellform,False,NULL);
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_reset_propsCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenPropsCgenPropsDlgInfo props_dlg =
(DtbCgenPropsCgenPropsDlgInfo)clientData;
int num_selected_mods = 0, i, pos;
XmStringTable gen_module_list = NULL;
XmString mod = NULL;
Widget opmenu_label = NULL;
XmString lbl_str = NULL;
/* undo the user's generate code modifications */
switch (CodeGenCmd)
{
case CG_GEN_PROJ_FLAG:
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Entire_Project_item,
XmNset, False, NULL);
break;
case CG_GEN_MAIN_FLAG:
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Main_Only_item,
XmNset, False, NULL);
break;
case CG_GEN_SPECIFIC_FILES_FLAG:
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Specific_Modules_Only_item,
XmNset, False, NULL);
XmListDeselectAllItems(props_dlg->module_list);
break;
case CG_GEN_SPECIFIC_FILES_AND_MAIN_FLAG:
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Specific_Modules_and_Main_item,
XmNset, False, NULL);
XmListDeselectAllItems(props_dlg->module_list);
break;
default:
break;
}
/* set the generate code options back + field sensitivity */
switch (CodeGenOptions.cmd_flag)
{
case CG_GEN_PROJ_FLAG:
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Entire_Project_item,
XmNset, True, NULL);
CodeGenCmd = CG_GEN_PROJ_FLAG;
if (XtIsSensitive(props_dlg->module_list))
{
XtSetSensitive(props_dlg->module_list, False);
XtSetSensitive(props_dlg->module_list_scrolledwin, False);
}
break;
case CG_GEN_MAIN_FLAG:
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Main_Only_item,
XmNset, True, NULL);
CodeGenCmd = CG_GEN_MAIN_FLAG;
if (XtIsSensitive(props_dlg->module_list))
{
XtSetSensitive(props_dlg->module_list, False);
XtSetSensitive(props_dlg->module_list_scrolledwin, False);
}
break;
case CG_GEN_SPECIFIC_FILES_FLAG:
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Specific_Modules_Only_item,
XmNset, True, NULL);
CodeGenCmd = CG_GEN_SPECIFIC_FILES_FLAG;
/* Select items that should be selected */
if (CodeGenOptions.module_list != NULL)
{
XmListDeselectAllItems(props_dlg->module_list);
for (i=0; i<strlist_get_num_strs(CodeGenOptions.module_list); i++)
{
mod = objxm_str_to_xmstr(props_dlg->module_list,
strlist_get_str(CodeGenOptions.module_list, i, (void **)NULL));
pos = XmListItemPos(props_dlg->module_list, mod);
if (!XmListPosSelected(props_dlg->module_list, pos))
{
XmListSelectItem(props_dlg->module_list,
mod, True);
}
}
}
if (!XtIsSensitive(props_dlg->module_list))
{
XtSetSensitive(props_dlg->module_list, True);
XtSetSensitive(props_dlg->module_list_scrolledwin, True);
}
break;
case CG_GEN_SPECIFIC_FILES_AND_MAIN_FLAG:
XtVaSetValues(props_dlg->cgen_flags_radiobox_items.Specific_Modules_and_Main_item,
XmNset, True, NULL);
CodeGenCmd = CG_GEN_SPECIFIC_FILES_AND_MAIN_FLAG;
/* Select items that should be selected */
if (CodeGenOptions.module_list != NULL)
{
XmListDeselectAllItems(props_dlg->module_list);
for (i=0; i<strlist_get_num_strs(CodeGenOptions.module_list); i++)
{
mod = objxm_str_to_xmstr(props_dlg->module_list,
strlist_get_str(CodeGenOptions.module_list, i, (void **)NULL));
pos = XmListItemPos(props_dlg->module_list, mod);
if (!XmListPosSelected(props_dlg->module_list, pos))
{
XmListSelectItem(props_dlg->module_list,
mod, True);
}
}
}
if (!XtIsSensitive(props_dlg->module_list))
{
XtSetSensitive(props_dlg->module_list, True);
XtSetSensitive(props_dlg->module_list_scrolledwin, True);
}
break;
default:
break;
}
/* undo the user's verbosity changes */
switch (CodeGenVerbosityLevel)
{
case CG_VERBOSITY_NORMAL:
XtVaSetValues(props_dlg->verbosity_opmenu_items.Report_Normal_Messages_item,
XmNset, False, NULL);
break;
case CG_VERBOSITY_SILENT:
XtVaSetValues(props_dlg->verbosity_opmenu_items.Be_Silent_item,
XmNset, False, NULL);
break;
case CG_VERBOSITY_VERBOSE:
XtVaSetValues(props_dlg->verbosity_opmenu_items.Be_Verbose_item,
XmNset, False, NULL);
break;
default:
break;
}
/* set the verbosity back */
switch (CodeGenOptions.verbosity)
{
case CG_VERBOSITY_NORMAL:
CodeGenVerbosityLevel = CG_VERBOSITY_NORMAL;
XtVaSetValues(props_dlg->verbosity_opmenu_items.Report_Normal_Messages_item,
XmNset, True, NULL);
/* set the option menu label string */
opmenu_label = XmOptionButtonGadget(props_dlg->verbosity_opmenu);
XtVaGetValues(props_dlg->verbosity_opmenu_items.Report_Normal_Messages_item,
XmNlabelString, &lbl_str, NULL);
XtVaSetValues(opmenu_label, XmNlabelString, lbl_str, NULL);
break;
case CG_VERBOSITY_SILENT:
CodeGenVerbosityLevel = CG_VERBOSITY_SILENT;
XtVaSetValues(props_dlg->verbosity_opmenu_items.Be_Silent_item,
XmNset, True, NULL);
/* set the option menu label string */
opmenu_label = XmOptionButtonGadget(props_dlg->verbosity_opmenu);
XtVaGetValues(props_dlg->verbosity_opmenu_items.Be_Silent_item,
XmNlabelString, &lbl_str, NULL);
XtVaSetValues(opmenu_label, XmNlabelString, lbl_str, NULL);
break;
case CG_VERBOSITY_VERBOSE:
CodeGenVerbosityLevel = CG_VERBOSITY_VERBOSE;
XtVaSetValues(props_dlg->verbosity_opmenu_items.Be_Verbose_item,
XmNset, True, NULL);
/* set the option menu label string */
opmenu_label = XmOptionButtonGadget(props_dlg->verbosity_opmenu);
XtVaGetValues(props_dlg->verbosity_opmenu_items.Be_Verbose_item,
XmNlabelString, &lbl_str, NULL);
XtVaSetValues(opmenu_label, XmNlabelString, lbl_str, NULL);
break;
default:
break;
}
/* reset the merge option */
if (CodeGenOptions.no_merge)
XtVaSetValues(props_dlg->merge_checkbox_items.Don_t_Merge_item,
XmNset, True, NULL);
else
XtVaSetValues(props_dlg->merge_checkbox_items.Don_t_Merge_item,
XmNset, False, NULL);
/* reset the argument values */
XmTextFieldSetString(props_dlg->make_textf, CodeGenOptions.make_args);
XmTextFieldSetString(props_dlg->run_time_textf, CodeGenOptions.run_args);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_add_update_list_cb(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbCgenPropsCgenPropsDlgInfo dtbSource = (DtbCgenPropsCgenPropsDlgInfo)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/* Work-around for not being able to add a ":select" callback
* on a list object.
*/
XtAddCallback(dtbSource->module_list,
XmNmultipleSelectionCallback, cgenP_update_mod_listCB,
NULL);
/* Initialize module_list global variable */
module_list = strlist_create();
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_cancel_propsCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgenP_reset_default_propsCB(widget, clientData, callData);
XtPopdown(dtb_cgen_props_cgen_props_dlg.cgen_props_dlg);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All automatically-generated data and functions have been defined.
***
*** Add new functions here, or at the top of the file.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,844 @@
// $XConsortium: cgen_win.bil /main/3 1995/11/06 17:23:20 rswiston $
//
// @(#)cgen_win.bil 1.19 13 Apr 1995
//
// RESTRICTED CONFIDENTIAL INFORMATION:
//
// The information in this document is subject to special
// restrictions in a confidential disclosure agreement between
// HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
// document outside HP, IBM, Sun, USL, SCO, or Univel without
// Sun's specific written approval. This document and all copies
// and derivative works thereof must be returned or destroyed at
// Sun's request.
//
// Copyright 1993 Sun Microsystems, Inc. All rights reserved.
//
:bil-version 1 0
:module cgen_win
(
:element mainwindow
(
:type :base-window
:bg-color "white"
:icon-label "Code Generator"
:label "Code Generator"
:resizable :true
:visible :false
:iconic :false
:children (
menubar
proj_ctrl_panel
output_termp
button_ctrl_panel
input_termp
)
:win-children (
cgen_props.cgen_props_dlg
cgen_env.dialog
)
)
:element menubar
(
:type :container
:container-type :menu-bar
:active :true
:children (
menubar_File_item
menubar_Options_item
menubar_Help_item
)
)
:element menubar_File_item
(
:type :item
:item-type :item-for-menubar
:label-type :string
:label "File"
:is-help-item :false
:mnemonic "F"
:menu file_pulldown
:active :true
)
:element menubar_Options_item
(
:type :item
:item-type :item-for-menubar
:label-type :string
:label "Options"
:is-help-item :false
:mnemonic "O"
:menu options_pulldown
:active :true
)
:element menubar_Help_item
(
:type :item
:item-type :item-for-menubar
:label-type :string
:label "Help"
:is-help-item :true
:mnemonic "H"
:menu help_pulldown
:active :true
)
:element proj_ctrl_panel
(
:type :container
:container-type :relative
:x 0
:y 0
:visible :true
:border-frame :none
:north-attachment (:point 0 0)
:east-attachment (:obj mainwindow 0)
:west-attachment (:point 0 0)
:children (
output_term_label
proj_path_group
)
)
:element output_term_label
(
:type :label
:x 8
:y 25
:label-type :string
:label "Output Pane:"
:label-alignment :left
:active :true
:visible :true
:north-attachment (:obj proj_path_group 4)
:south-attachment (:point 0 4)
:east-attachment (:point 0 8)
:west-attachment (:point 0 8)
)
:element proj_path_group
(
:type :container
:container-type :group
:active :true
:visible :true
:x 8
:y 4
:group-type :ignore
:border-frame :none
:north-attachment (:point 0 4)
:east-attachment (:point 0 8)
:west-attachment (:point 0 8)
:children (
proj_label
proj_dir
)
)
:element proj_label
(
:type :label
:x 0
:y 0
:label-type :string
:label "Path:"
:label-alignment :left
:active :true
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:west-attachment (:point 0 0)
)
:element proj_dir
(
:type :label
:x 52
:y 0
:label-type :string
:label " "
:label-alignment :left
:active :true
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:obj proj_label 5)
)
:element output_termp
(
:type :term-pane
:x 0
:y 44
:border-frame :none
:num-rows 13
:num-columns 82
:vscrollbar :always
:process-string "/bin/cat"
:active :true
:visible :true
:north-attachment (:obj proj_ctrl_panel 0)
:east-attachment (:obj mainwindow 0)
:west-attachment (:point 0 0)
)
:element button_ctrl_panel
(
:type :container
:container-type :relative
:x 0
:y 224
:visible :true
:border-frame :none
:north-attachment (:obj output_termp 0)
:east-attachment (:obj mainwindow 0)
:west-attachment (:point 0 0)
:children (
input_term_label
group
separator
)
)
:element input_term_label
(
:type :label
:x 5
:y 37
:label-type :string
:label "Term Pane:"
:label-alignment :left
:active :true
:visible :true
:north-attachment (:obj separator 5)
:south-attachment (:point 0 4)
:east-attachment (:point 0 8)
:west-attachment (:point 0 8)
)
:element group
(
:type :container
:container-type :group
:active :true
:visible :true
:x 128
:y 4
:group-type :ignore
:border-frame :none
:north-attachment (:point 0 5)
:east-attachment (:point 0 0)
:west-attachment (:point 0 0)
:children (
gen_code_btn
make_btn
run_btn
make_run_btn
abort_btn
)
)
:element gen_code_btn
(
:type :button
:button-type :push-button
:x 0
:y 0
:label-type :string
:label-alignment :center
:label "Generate Code"
:active :true
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:east-attachment (:grid-line 20 0)
:west-attachment (:grid-line 2 0)
)
:element make_btn
(
:type :button
:button-type :push-button
:x 140
:y 0
:label-type :string
:label-alignment :center
:label "Make"
:active :true
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:east-attachment (:grid-line 39 0)
:west-attachment (:grid-line 21 0)
)
:element run_btn
(
:type :button
:button-type :push-button
:x 221
:y 0
:label-type :string
:label-alignment :center
:label "Run"
:active :true
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:east-attachment (:grid-line 59 0)
:west-attachment (:grid-line 41 0)
)
:element make_run_btn
(
:type :button
:button-type :push-button
:x 275
:y 0
:label-type :string
:label-alignment :center
:label "Make & Run"
:active :true
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:east-attachment (:grid-line 79 0)
:west-attachment (:grid-line 61 0)
)
:element abort_btn
(
:type :button
:button-type :push-button
:x 369
:y 0
:label-type :string
:label-alignment :center
:label "Abort"
:active :true
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:point 0 0)
:east-attachment (:grid-line 98 0)
:west-attachment (:grid-line 81 0)
)
:element separator
(
:type :separator
:line-style :etched-in
:orientation :horizontal
:x 237
:y 26
:visible :true
:north-attachment (:obj group 5)
:east-attachment (:point 0 0)
:west-attachment (:point 0 0)
)
:element input_termp
(
:type :term-pane
:x 1
:y 261
:border-frame :none
:num-rows 27
:num-columns 82
:vscrollbar :always
:process-string "/bin/csh"
:active :true
:visible :true
:north-attachment (:obj button_ctrl_panel 0)
:south-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:point 0 0)
)
:element file_pulldown
(
:type :menu
:tear-off :false
:children (
file_pulldown_Make_Run_item
file_pulldown_Generate_Code_item
file_pulldown_Make_item
file_pulldown_Run_item
file_pulldown_Abort_item
file_pulldown_separator1_item
file_pulldown_CD_to_Project_item
file_pulldown_separator2_item
file_pulldown_Close_item
)
)
:element file_pulldown_Make_Run_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Make & Run"
:mnemonic "k"
:active :true
)
:element file_pulldown_Generate_Code_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Generate Code"
:mnemonic "G"
:menu generate_menu
:active :true
)
:element file_pulldown_Make_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Make"
:mnemonic "M"
:active :true
)
:element file_pulldown_Run_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Run"
:mnemonic "R"
:active :true
)
:element file_pulldown_Abort_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Abort"
:mnemonic "A"
:active :true
)
:element file_pulldown_separator1_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-in
:active :true
)
:element file_pulldown_CD_to_Project_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "CD to Project"
:mnemonic "D"
:active :true
)
:element file_pulldown_separator2_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-in
:active :true
)
:element file_pulldown_Close_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Close"
:mnemonic "C"
:active :true
)
:element options_pulldown
(
:type :menu
:tear-off :false
:children (
options_pulldown_Generator_item
options_pulldown_Environment_item
)
)
:element options_pulldown_Generator_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Generator..."
:mnemonic "G"
:active :true
)
:element options_pulldown_Environment_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Environment..."
:mnemonic "E"
:active :true
)
:element help_pulldown
(
:type :menu
:tear-off :false
:children (
help_pulldown_Overview_item
help_pulldown_separator1_item
help_pulldown_Tasks_item
help_pulldown_Reference_item
help_pulldown_separator2_item
help_pulldown_On_Item_item
help_pulldown_separator3_item
help_pulldown_Using_Help_item
help_pulldown_separator4_item
help_pulldown_About_Application_Builder_item
)
)
:element help_pulldown_Overview_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Overview..."
:mnemonic "v"
:active :true
)
:element help_pulldown_separator1_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-in
:active :true
)
:element help_pulldown_Tasks_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Tasks..."
:mnemonic "T"
:active :true
)
:element help_pulldown_Reference_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Reference..."
:mnemonic "R"
:active :true
)
:element help_pulldown_separator2_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-in
:active :true
)
:element help_pulldown_On_Item_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "On Item"
:mnemonic "O"
:active :true
)
:element help_pulldown_separator3_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-in
:active :true
)
:element help_pulldown_Using_Help_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Using Help..."
:mnemonic "U"
:active :true
)
:element help_pulldown_separator4_item
(
:type :item
:item-type :item-for-menu
:label-type :separator
:line-style :etched-in
:active :true
)
:element help_pulldown_About_Application_Builder_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "About Application Builder..."
:mnemonic "A"
:active :true
)
:element generate_menu
(
:type :menu
:tear-off :false
:children (
generate_menu_According_to_Options_item
generate_menu_Entire_Project_item
)
)
:element generate_menu_According_to_Options_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "According to Options"
:mnemonic "A"
:active :true
)
:element generate_menu_Entire_Project_item
(
:type :item
:item-type :item-for-menu
:label-type :string
:label "Entire Project"
:mnemonic "E"
:active :true
)
:element query_save_or_abort_msg
(
:type :message
:message-type :question
:label "Code Generator"
:message "You have unsaved edits.\n\nYou may save your changes or cancel."
:action1-label "Save"
:cancel-button :true
:help-button :true
:default-button :action1-button
:help-text "Click Cancel to cancel the code generator operation.\n\nClick Save to save the project before performing the\ncode generator operation."
)
:element query_save_or_gen_old_msg
(
:type :message
:message-type :question
:label "Code Generator"
:message "You have unsaved edits.\n\nYou may save your changes or perform the\noperation on the version of the project\nthat was most recently saved."
:action1-label "Save"
:action2-label "Use Previous"
:cancel-button :true
:help-button :true
:default-button :action1-button
:help-text "Code was generated for the project previously.\nChanges have been made to the project which\nhave not been saved. \n\nClick Save to save the project before performing\nthe operation.\n\nClick Use Previous to perform the operation on\nthe project as it was most recently saved.\n\nClick Cancel to cancel the operation."
)
:element modify_path_msg
(
:type :message
:message-type :question
:label "Code Generator"
:message "\n"
:action1-label "Yes"
:action2-label "No"
:cancel-button :true
:help-button :true
:default-button :action1-button
:help-text "When a command is invoked, it first needs to be\nfound. Your PATH environment variable specifies\nthe directories that should be searched. In order\nto execute this command the specified directory\nneeds to be added to the list of directories to\nsearch. \n\nClick Yes to add the directory to your path and\nrun the command.\n\nClick No if you do not want to add the directory\nto your path, but still want to run the command.\n\nClick Cancel if you do not want to add the directory\nto your path and you do not want to run the command."
)
:element no_makefile_msg
(
:type :message
:message-type :question
:label "Code Generator"
:message "No makefile exists.\n\nDo you want to create one?\n\n"
:action1-label "Yes"
:action2-label "No"
:cancel-button :true
:help-button :true
:default-button :action1-button
:help-text "A Makefile does not exist for the current project.\n\nClick Yes to create a Makefile by running the\ncode generator on the project; and 'make' will\nbe run.\n\nClick No to cancel the operation."
)
:element wrong_makefile_msg
(
:type :message
:message-type :question
:label "Code Generator"
:message "The Makefile in this directory does not seem\nto belong to the project you have loaded.\n\nDo you want to destroy the existing Makefile\nand create a new one?\n\n"
:action1-label "Yes"
:action2-label "No"
:action3-label "Never"
:cancel-button :true
:help-button :true
:default-button :action2-button
:help-text "The existing Makefile may not build the current\nproject. \n\nClick Yes to continue, creating a new Makefile\nand overwriting the existing one.\n\nClick No to run make using the current Makefile.\n\nClick Never only if you never want to overwrite\nthe existing Makefile. You will not be asked\nagain for confirmation, during this session of\nApp Builder.\n"
)
:element no_exe_msg
(
:type :message
:message-type :question
:label "Code Generator"
:message "The executable for this project does not exist.\n\nDo you want to build it?"
:action1-label "Build"
:cancel-button :true
:help-button :true
:default-button :action1-button
:help-text "The code for the current project has not been\ncompiled yet to produce an executable. You have\nthe option of building the project or cancelling\nthe operation."
)
:connection
(
:from gen_code_btn
:when :activate
:action-type :call-function
:action cgenP_gen_codeCB
)
:connection
(
:from make_btn
:when :activate
:action-type :call-function
:action cgenP_makeCB
)
:connection
(
:from run_btn
:when :activate
:action-type :call-function
:action cgenP_runCB
)
:connection
(
:from make_run_btn
:when :activate
:action-type :call-function
:action cgenP_make_runCB
)
:connection
(
:from abort_btn
:when :activate
:action-type :call-function
:action cgenP_abortCB
)
:connection
(
:from abort_btn
:when :after-create
:action-type :call-function
:action connP_set_insensitive
)
:connection
(
:from file_pulldown_Close_item
:when :activate
:action-type :call-function
:action cgenP_close_cgen_winCB
)
:connection
(
:from output_termp
:when :after-create
:action-type :call-function
:action connP_set_termp_inactive
)
:connection
(
:from input_termp
:when :after-create
:action-type :call-function
:action connP_init_termp
)
:connection
(
:from file_pulldown_Make_Run_item
:when :activate
:action-type :call-function
:action cgenP_make_runCB
)
:connection
(
:from file_pulldown_Make_item
:when :activate
:action-type :call-function
:action cgenP_makeCB
)
:connection
(
:from file_pulldown_Run_item
:when :activate
:action-type :call-function
:action cgenP_runCB
)
:connection
(
:from file_pulldown_Abort_item
:when :activate
:action-type :call-function
:action cgenP_abortCB
)
:connection
(
:from file_pulldown_Abort_item
:when :after-create
:action-type :call-function
:action connP_set_insensitive
)
:connection
(
:from file_pulldown_CD_to_Project_item
:when :activate
:action-type :call-function
:action cgenP_cd_to_projCB
)
:connection
(
:from generate_menu_According_to_Options_item
:when :activate
:action-type :call-function
:action cgenP_gen_codeCB
)
:connection
(
:from generate_menu_Entire_Project_item
:when :activate
:action-type :call-function
:action cgenP_generate_entire_projCB
)
:connection
(
:from options_pulldown_Generator_item
:when :activate
:action-type :call-function
:action cgenP_show_cgen_optionsCB
)
:connection
(
:from options_pulldown_Environment_item
:when :activate
:action-type :call-function
:action cgenP_show_env_dlgCB
)
:connection
(
:from help_pulldown_Using_Help_item
:when :activate
:action-type :access-help-volume
:help-volume "Help4Help"
:help-location "_hometopic"
)
:connection
(
:from help_pulldown_Overview_item
:when :activate
:action-type :access-help-volume
:help-volume "AppBuilder"
:help-location "ABCodeGenerator"
)
:connection
(
:from help_pulldown_Reference_item
:when :activate
:action-type :access-help-volume
:help-volume "AppBuilder"
:help-location "ABCodeGenerator"
)
:connection
(
:from help_pulldown_Tasks_item
:when :activate
:action-type :access-help-volume
:help-volume "AppBuilder"
:help-location "ABBuildandRun"
)
:connection
(
:from help_pulldown_On_Item_item
:when :activate
:action-type :on-item-help
)
)

View File

@@ -0,0 +1,481 @@
/*** DTB_USER_CODE_START vvv Add file header below vvv ***/
/*
* $XConsortium: cgen_win_stubs.c /main/4 1996/04/18 13:17:43 drk $
*
* @(#)cgen_win_stubs.c 1.26 13 Apr 1995 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
/*
* File: cgen_win_stubs.c
* Contains: Module callbacks and connection functions
*
* This file was generated by dtcodegen, from module cgen_win
*
* Any text may be added between the DTB_USER_CODE_START and
* DTB_USER_CODE_END comments (even non-C code). Descriptive comments
* are provided only as an aid.
*
* ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
* ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include "dtbuilder.h"
#include "cgen_win_ui.h"
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All necessary header files have been included.
***
*** Add include files, types, macros, externs, and user functions here.
***/
#include <Dt/Term.h>
#include "dtbuilder.h"
#include "cgen_win_ui.h"
#include "cgen_props_ui.h"
#include "cgen_env_ui.h"
#include <ab_private/ab.h>
#include <ab_private/proj.h>
#include <ab_private/cgen.h>
#include <ab_private/obj_notify.h>
#include <ab_private/util.h>
#define public_entry_point() if (AB_cgen_win == NULL) { return 0; }
#include "dtb_utils.h"
/*
* End declarations of global widgets
*/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/
void
cgen_win_help_pulldown_Using_Help_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("Help4Help", "_hometopic");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgen_win_help_pulldown_Overview_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("AppBuilder", "ABCodeGenerator");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgen_win_help_pulldown_Reference_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("AppBuilder", "ABCodeGenerator");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgen_win_help_pulldown_Tasks_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_show_help_volume_info("AppBuilder", "ABBuildandRun");
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgen_win_help_pulldown_On_Item_item_CB1(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
dtb_do_onitem_help();
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_gen_codeCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgen_gen_code(CG_CMD_UNDEF);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_makeCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgen_make(CG_CMD_UNDEF);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_runCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgen_run(CG_CMD_UNDEF);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_make_runCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgen_make_run(CG_CMD_UNDEF);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_abortCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
cgen_abort();
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
connP_set_insensitive(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbCgenWinMainwindowInfo dtbSource = (DtbCgenWinMainwindowInfo)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/* widget is either the abort button or the abort menu item */
XtSetSensitive(widget, False);
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_close_cgen_winCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbCgenWinMainwindowInfo cgen_win =
(DtbCgenWinMainwindowInfo)clientData;
ui_win_show(cgen_win->mainwindow, False, NULL);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
connP_set_termp_inactive(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbCgenWinMainwindowInfo dtbSource = (DtbCgenWinMainwindowInfo)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/* widget is the output term pane */
XtSetSensitive(widget, False);
/* Make the cursor stop blinking. */
XtVaSetValues(widget, DtNblinkRate, 0, NULL);
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
connP_init_termp(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbCgenWinMainwindowInfo dtbSource = (DtbCgenWinMainwindowInfo)callData;
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
STRING shell = NULL;
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/* Make the cursor stop blinking. */
XtVaSetValues(widget, DtNblinkRate, 0, NULL);
/* Set the input term pane shell to be the same as the
* user's $SHELL environment variable.
*/
shell = (STRING) getenv("SHELL");
XtVaSetValues(widget, DtNsubprocessCmd, shell, NULL);
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_cd_to_projCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
cgenP_sync_up_dir();
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_generate_entire_projCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*
* generate code for the entire project this one time.
*/
CG_GEN_FLAG orig_cmd_flag = CodeGenOptions.cmd_flag;
CodeGenOptions.cmd_flag = CG_GEN_PROJ_FLAG;
cgen_gen_code(CG_CMD_UNDEF);
CodeGenOptions.cmd_flag = orig_cmd_flag;
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_show_cgen_optionsCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
if (AB_cgen_prop_dialog == (Widget) NULL)
{
/*
* Module initialization
*/
dtbCgenPropsCgenPropsDlgInfo_clear(&dtb_cgen_props_cgen_props_dlg);
dtb_cgen_props_cgen_props_dlg_initialize(&dtb_cgen_props_cgen_props_dlg,
AB_cgen_win);
AB_cgen_prop_dialog = dtb_cgen_props_cgen_props_dlg.cgen_props_dlg_shellform;
XtVaSetValues(AB_cgen_prop_dialog,
XmNuserData, dtb_cgen_props_cgen_props_dlg.module_list,
NULL);
ab_register_window(AB_cgen_prop_dialog, AB_WIN_DIALOG, WindowHidden,
XtParent(AB_cgen_win), AB_WPOS_TILE_HORIZONTAL,
cgenP_cancel_propsCB, (XtPointer)&dtb_cgen_props_cgen_props_dlg);
/* Update the project name for the prop sheet */
cgen_notify_props_new_proj(proj_get_project());
/* Initialize module list */
cgenP_init_props_module_list(dtb_cgen_props_cgen_props_dlg.module_list);
/* Add Rename and Destroy object callbacks to update module_list */
cgenP_prop_init();
}
ab_show_window(AB_cgen_prop_dialog);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cgenP_show_env_dlgCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
if (AB_cgen_env_dialog == (Widget) NULL)
{
dtbCgenEnvDialogInfo_clear(&dtb_cgen_env_dialog);
dtb_cgen_env_dialog_initialize(&dtb_cgen_env_dialog, AB_cgen_win);
AB_cgen_env_dialog = dtb_cgen_env_dialog.dialog_shellform;
ab_register_window(AB_cgen_env_dialog, AB_WIN_DIALOG, WindowHidden,
XtParent(AB_cgen_win), AB_WPOS_TILE_HORIZONTAL,
cgenP_cancel_envCB, (XtPointer)&dtb_cgen_env_dialog);
}
ab_show_window(AB_cgen_env_dialog);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All automatically-generated data and functions have been defined.
***
*** Add new functions here, or at the top of the file.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,76 @@
/*** DTB_USER_CODE_START vvv Add file header below vvv ***/
/*
* $XConsortium: choice_stubs.c /main/4 1996/04/18 13:17:38 drk $
*
* @(#)choice_stubs.c 1.5 27 Sep 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
/*
* File: choice_stubs.c
* Contains: Module callbacks and connection functions
*
* This file was generated by dtcodegen, from module choice
*
* Any text may be added between the DTB_USER_CODE_START and
* DTB_USER_CODE_END comments (even non-C code). Descriptive comments
* are provided only as an aid.
*
* ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
* ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include "dtbuilder.h"
#include "choice_ui.h"
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All necessary header files have been included.
***
*** Add include files, types, macros, externs, and user functions here.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All automatically-generated data and functions have been defined.
***
*** Add new functions here, or at the top of the file.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/

View File

@@ -0,0 +1,179 @@
// $XConsortium: color_chooser.bil /main/3 1995/11/06 17:24:12 rswiston $
//
// @(#)color_chooser.bil 1.12 05 Feb 1995
//
// RESTRICTED CONFIDENTIAL INFORMATION:
//
// The information in this document is subject to special
// restrictions in a confidential disclosure agreement between
// HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
// document outside HP, IBM, Sun, USL, SCO, or Univel without
// Sun's specific written approval. This document and all copies
// and derivative works thereof must be returned or destroyed at
// Sun's request.
//
// Copyright 1993 Sun Microsystems, Inc. All rights reserved.
//
// color_chooser.bil - Module file for App Builder color chooser
//
:bil-version 1 0
:module color_chooser
(
:element dialog
(
:type :dialog
:width 469
:height 312
:bg-color "white"
:label "Color Chooser"
:resizable :true
:visible :false
:help-button help_button
:help-volume "AppBuilder"
:help-location "ABColorChooser"
:help-text "The Color Chooser provides an interactive way to select a color for the foreground or background color attribute of an object."
:children (
swatch_panel
ctrl_panel
dialog_button_panel
)
)
:element swatch_panel
(
:type :container
:container-type :relative
:x 0
:y 0
:width 469
:height 281
:visible :true
:border-frame :none
:north-attachment (:point 0 0)
:south-attachment (:obj ctrl_panel 0)
:east-attachment (:obj dialog 0)
:west-attachment (:point 0 0)
)
:element ctrl_panel
(
:type :container
:container-type :relative
:x 0
:y 214
:width 469
:height 31
:visible :true
:border-frame :none
:south-attachment (:point 0 0)
:east-attachment (:point 0 0)
:west-attachment (:point 0 0)
:children (
color_name_label
color_name
)
)
:element color_name_label
(
:type :label
:x 11
:y 12
:label-type :string
:label "Color Name:"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:point 0 5)
:west-attachment (:point 0 11)
)
:element color_name
(
:type :label
:x 118
:y 9
:label-type :string
:label "**color**"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:point 0 5)
:west-attachment (:obj color_name_label 5)
)
:element dialog_button_panel
(
:type :container
:container-type :button-panel
:width 469
:height 36
:visible :true
:border-frame :none
:children (
ok_button
cancel_button
help_button
)
)
:element ok_button
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "OK"
:active :true
:visible :true
:north-attachment (:point 0 5)
:east-attachment (:grid-line 30 0)
:west-attachment (:grid-line 10 0)
)
:element cancel_button
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Cancel"
:active :true
:visible :true
:north-attachment (:point 0 5)
:east-attachment (:grid-line 60 0)
:west-attachment (:grid-line 40 0)
)
:element help_button
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Help"
:active :true
:visible :true
:north-attachment (:point 0 5)
:east-attachment (:grid-line 90 0)
:west-attachment (:grid-line 70 0)
)
:element message
(
:type :message
:message-type :info
:label "Color Chooser"
:message "Color Chooser could not allocate all its standard colors.\n\nThis is probably because you are running other\napplications that have claimed all the available\ncells in your workstation's colormap.\nTo see more colors in Color Chooser, try quitting\nsome of those applications."
:action1-label "OK"
:cancel-button :false
:help-button :false
:default-button :action1-button
)
:connection
(
:from ok_button
:when :activate
:action-type :call-function
:action applyCB
)
:connection
(
:from cancel_button
:when :activate
:action-type :call-function
:action cancelCB
)
)

View File

@@ -0,0 +1,28 @@
/*
* $XConsortium: color_chooser.h /main/3 1995/11/06 17:24:25 rswiston $
*
* @(#)color_chooser.h 1.1 21 Feb 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*
** color_chooser.h -- declarations associated with the color chooser
*/
/*
** Routine to display the color chooser and return the name of the
** color selected. Returns an empty string if no color is selected.
*/
char * display_color_chooser();

View File

@@ -0,0 +1,649 @@
/*** DTB_USER_CODE_START vvv Add file header below vvv ***/
/*
* $XConsortium: color_chooser_stubs.c /main/4 1996/04/18 13:17:31 drk $
*
* @(#)color_chooser_stubs.c 1.15 29 Sep 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
/*
* File: color_chooser_stubs.c
* Contains: Module callbacks and connection functions
*
* This file was generated by dtcodegen, from module color_chooser
*
* Any text may be added between the DTB_USER_CODE_START and
* DTB_USER_CODE_END comments (even non-C code). Descriptive comments
* are provided only as an aid.
*
* ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
* ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include "dtbuilder.h"
#include "color_chooser_ui.h"
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All necessary header files have been included.
***
*** Add include files, types, macros, externs, and user functions here.
***/
#include <math.h>
#include <Xm/DrawnB.h>
#include <ab_private/util.h>
#include "color_chooser_ui.h"
#include <Xm/Form.h>
#include <Xm/TextF.h>
#include <Xm/Label.h>
/*
* Declarations of global widgets used by callbacks.
*/
/*
* End declarations of global widgets
*/
#define SWATCH_SZ 18
#define SHADOW_SZ 3
#include <Xm/Xm.h>
#include "dtbuilder.h"
#include "dtb_utils.h"
static int Answer;
Pixel objxm_name_to_pixel(Widget w, String color);
Pixel name_to_pixel(Widget w,String color);
static void swatchCB(
Widget w,
XtPointer clientdata,
XtPointer calldata
);
static void swatch_resizeCB(
Widget w,
XtPointer clientdata,
XtPointer calldata
);
static void helpCB(
Widget w,
XtPointer clientdata,
XtPointer calldata
);
static void create_color_chooser();
static void update_color_palette(Widget parent);
static void create_color_palette(
Widget parent
);
char *display_color_chooser();
/*
** The first two colors *MUST* be black and white so things work out
** O.K. on monochrome workstations.
*/
char *Color[] = {
"Black", "White", "Dark Slate Gray", "Dim Gray", "Gray",
"Light Gray", "Yellow", "Gold", "Khaki", "Wheat",
"Tan", "Goldenrod", "Orange", "Coral", "Salmon",
"Red", "Orange Red", "Indian Red", "Firebrick", "Brown",
"Sienna", "Maroon", "Medium Violet Red", "Violet Red", "Pink",
"Green", "Spring Green", "Medium Spring Green", "Green Yellow", "Pale Green",
"Yellow Green", "Lime Green", "Medium Sea Green", "Sea Green", "Forest Green",
"Olive Drab", "Dark Olive Green", "Dark Green", "Cadet Blue", "Medium Aquamarine",
"Dark Turquoise", "Medium Turquoise","Turquoise", "Aquamarine", "Cyan",
"Blue", "Medium Blue", "Medium Slate Blue", "Cornflower Blue", "Sky Blue",
"Light Blue", "Light Steel Blue", "Steel Blue", "Dark Slate Blue", "Navy",
"Navy Blue", "Midnight Blue", "Dark Orchid", "Medium Orchid", "Orchid",
"Magenta", "Violet", "Plum", "Thistle", "Blue Violet",
"Slate Blue",
NULL
};
static int Num_colors = -1; /* Number of colors in our standard set */
static int Shown_colors = -1; /* Number of colors currently shown */
static int Rows = 0; /* Number of rows of swatches to be displayed */
static int Cols = 0; /* Number of columns of swatches to display */
static Widget Panel; /* Swatch panel (parent) */
static Widget *Swatch; /* Base for array of swatches */
static Widget CacheAnchor; /* Dummy widget used to control caching of color
name-to-pixel conversion as provided by
objxm_name_to_pixel (via XtConvertAndStore). */
char *
display_color_chooser(
)
{
extern Widget AB_toplevel;
static int first_time = 1;
XtAppContext app;
XmString label;
if(first_time) {
create_color_chooser();
first_time = 0;
}
else {
/* If we didn't get all our colors last time, we need to retry */
if(Shown_colors != Num_colors) {
update_color_palette(dtb_color_chooser_dialog.swatch_panel);
}
}
XtVaSetValues(dtb_color_chooser_dialog.dialog_shellform,
XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL,
NULL);
/* Clear out place-holder name in color_name field */
label = XmStringCreateLocalized("");
XtVaSetValues(dtb_color_chooser_dialog.color_name, XmNlabelString,label,
NULL);
XmStringFree(label);
/*
** When the user has made a selection from the dialog, Answer will
** either be the color number in the range (0,num_colors) or -1
** to indicate that they canceled color selection altogether. We
** therefore use -2 to indicate that they user hasn't answered yet.
*/
Answer = -2;
XtManageChild(dtb_color_chooser_dialog.dialog_shellform);
app = XtDisplayToApplicationContext(XtDisplay(AB_toplevel));
while (Answer == -2) {
XtAppProcessEvent(app,XtIMAll);
}
if(Answer >= 0) return(Color[Answer]);
else return("");
}
void
create_color_chooser(
)
{
extern Widget AB_toplevel;
XmString label;
dtbColorChooserDialogInfo_clear(&dtb_color_chooser_dialog);
dtb_color_chooser_dialog_initialize(&dtb_color_chooser_dialog, AB_toplevel);
create_color_palette(dtb_color_chooser_dialog.swatch_panel);
/* Clear out place-holder name in color_name field */
label = XmStringCreateLocalized("");
XtVaSetValues(dtb_color_chooser_dialog.color_name, XmNlabelString,label,
NULL);
XmStringFree(label);
}
void
create_color_palette(
Widget parent
)
{
extern Widget AB_toplevel;
Widget swatch;
XmString label = XmStringCreateLocalized(" ");
int i, r, c;
Pixel color;
Pixmap tile;
int depth;
XGCValues gcv;
XtGCMask gcm;
GC gc;
/* Force color count if we're on a monochrome system */
depth = DefaultDepthOfScreen(XtScreen(AB_toplevel));
if(depth == 1) {
Num_colors = 2;
Rows = 1;
Cols = 2;
}
else {
/* Count the number of colors in our list */
for(Num_colors=0;Color[Num_colors]!=(char *)NULL;Num_colors++);
Rows = (int) (0.5 + sqrt(((double)(3*Num_colors))/4.0));
Cols = (Num_colors+Rows-1)/Rows;
}
util_dprintf(2,"Color chooser: there are %d colors (%dx%d)\n",
Num_colors,Rows,Cols);
/* Create the swatch array */
Swatch = (Widget *) XtMalloc(sizeof(Widget)*Num_colors);
Panel = XtVaCreateWidget("color_panel",
xmFormWidgetClass,
parent,
XmNfractionBase,Rows*Cols,
XmNrightOffset, 10,
XmNrightAttachment, XmATTACH_FORM,
XmNleftOffset, 10,
XmNleftAttachment, XmATTACH_FORM,
XmNtopOffset, 10,
XmNtopAttachment, XmATTACH_FORM,
XmNbottomOffset, 10,
XmNbottomAttachment, XmATTACH_FORM,
NULL);
/* Create the dummy widget used to control color name-to-pixel caching */
CacheAnchor = XtVaCreateWidget("CaChEaNcHoR",
xmLabelWidgetClass,
parent,
XmNlabelString,label,
NULL);
for(i=0,Shown_colors=0;i<Num_colors;i++) {
/* See if we can allocate a color */
if( (color=name_to_pixel(CacheAnchor,Color[i])) == ((Pixel)-1) ) {
continue;
}
/* The color is available, so create a swatch to show it */
tile = XCreatePixmap(XtDisplay(AB_toplevel),
XtWindow(AB_toplevel),SWATCH_SZ,SWATCH_SZ,depth);
gcv.foreground = color;
gcm = GCForeground;
gc = XtGetGC(AB_toplevel, gcm, &gcv);
XFillRectangle(XtDisplay(AB_toplevel),tile,gc,0,0,SWATCH_SZ,SWATCH_SZ);
r = Shown_colors/Cols;
c = Shown_colors%Cols;
swatch = XtVaCreateWidget("swatch",
xmDrawnButtonWidgetClass,
Panel,
XmNlabelType,XmPIXMAP,
XmNlabelPixmap,tile,
XmNforeground,color,
XmNshadowType,XmSHADOW_OUT,
XmNshadowThickness,SHADOW_SZ,
XmNleftAttachment,XmATTACH_POSITION,
XmNleftPosition,c*Rows,
XmNrightAttachment,XmATTACH_POSITION,
XmNrightPosition,(c+1)*Rows,
XmNtopAttachment,XmATTACH_POSITION,
XmNtopPosition,r*Cols,
XmNbottomAttachment,XmATTACH_POSITION,
XmNbottomPosition,(r+1)*Cols,
XmNuserData,i, /* Save color index for later use */
NULL);
XtAddCallback(swatch,XmNactivateCallback,swatchCB,(XtPointer)0);
XtAddCallback(swatch,XmNresizeCallback,swatch_resizeCB,(XtPointer)0);
XtManageChild(swatch);
XtReleaseGC(parent,gc);
/* Store successfully-allocated widget in Swatch table */
Swatch[Shown_colors] = swatch;
/* Increment count of shown colors */
Shown_colors++;
}
util_dprintf(2,"Got %d out of %d colors\n",Shown_colors,Num_colors);
/* Clear out the storage location we use to hold the current color */
XtVaSetValues(dtb_color_chooser_dialog.color_name,XmNuserData,0,NULL);
/* Make the swatch panel appear */
XtManageChild(Panel);
/* If we didn't get all the standard colors, explain it to the user */
if(Shown_colors != Num_colors) {
dtb_color_chooser_message_initialize(&dtb_color_chooser_message);
dtb_show_message(parent,&dtb_color_chooser_message,NULL, NULL);
}
}
static void
swatchCB(
Widget w,
XtPointer clientdata,
XtPointer calldata
)
{
int index;
XmString label;
Widget old_color;
/* XtVaGetValues(w,XmNpositionIndex,&index,NULL); */
XtVaGetValues(w,XmNuserData,&index,NULL);
util_dprintf(2,"Selection is color #%d, <%s>\n",index,Color[index]);
/*
XmTextFieldSetString(dtb_color_chooser_dialog.color_name,Color[index]);
*/
label = XmStringCreateLocalized(Color[index]);
XtVaSetValues(dtb_color_chooser_dialog.color_name,
XmNlabelString,label,
NULL);
XmStringFree(label);
/* Figure out which widget was the old color, and reset it */
XtVaGetValues(dtb_color_chooser_dialog.color_name,XmNuserData,
(XtPointer)&old_color,NULL);
if(old_color != 0) {
XtVaSetValues(old_color,XmNshadowType,XmSHADOW_OUT,NULL);
}
/* Set the shadow on the new color choice */
XtVaSetValues(w,XmNshadowType,XmSHADOW_IN,NULL);
/* Save the new widget handle so we can reset it later */
XtVaSetValues(dtb_color_chooser_dialog.color_name,XmNuserData,
w,NULL);
}
void
swatch_resizeCB(
Widget w,
XtPointer clientdata,
XtPointer calldata
)
{
Pixmap tile;
Dimension wid, ht;
int depth;
XGCValues gcv;
XtGCMask gcm;
GC gc;
int col_index;
Pixel color;
extern Widget AB_toplevel;
XtVaGetValues(w,
XmNheight,&ht,
XmNwidth,&wid,
XmNlabelPixmap,&tile,
XmNforeground,&color,
NULL);
XFreePixmap(XtDisplay(AB_toplevel),tile);
/* allow for shadow thickness */
wid -= 4*SHADOW_SZ;
ht -= 4*SHADOW_SZ;
depth = DefaultDepthOfScreen(XtScreen(AB_toplevel));
tile = XCreatePixmap(XtDisplay(AB_toplevel),
XtWindow(AB_toplevel),wid,ht,depth);
gcv.foreground = color;
gcm = GCForeground;
gc = XtGetGC(AB_toplevel, gcm, &gcv);
XFillRectangle(XtDisplay(AB_toplevel),tile,gc,
0,0,wid,ht);
XtVaSetValues(w,
XmNlabelPixmap,tile,
NULL);
}
void
update_color_palette(
Widget parent
)
{
extern Widget AB_toplevel;
Widget swatch;
XmString label = XmStringCreateLocalized(" ");
int old_shown_colors, i, r, c;
Pixel color;
Pixmap tile, oldtile;
int depth;
XGCValues gcv;
XtGCMask gcm;
GC gc;
util_dprintf(2,"Updating color palette (%d/%d)\n",Shown_colors,Num_colors);
/* Go back through and rebuild the palette */
depth = DefaultDepthOfScreen(XtScreen(AB_toplevel));
/* See how many colors we had up the last time out */
old_shown_colors = Shown_colors;
/* Destroy the old (dummy) cache anchor widget to free the cache */
XtDestroyWidget(CacheAnchor);
/* Create a new dummy widget used to control color name-to-pixel caching */
CacheAnchor = XtVaCreateWidget("CaChEaNcHoR",
xmLabelWidgetClass,
parent,
XmNlabelString,label,
NULL);
for(i=0,Shown_colors=0;i<Num_colors;i++) {
/* See if we can allocate a color */
if( (color=name_to_pixel(CacheAnchor,Color[i])) == ((Pixel)-1) ) {
continue;
}
/* The color is available, so create a swatch to show it */
tile = XCreatePixmap(XtDisplay(AB_toplevel),
XtWindow(AB_toplevel),SWATCH_SZ,SWATCH_SZ,depth);
gcv.foreground = color;
gcm = GCForeground;
gc = XtGetGC(AB_toplevel, gcm, &gcv);
XFillRectangle(XtDisplay(AB_toplevel),tile,gc,0,0,SWATCH_SZ,SWATCH_SZ);
r = Shown_colors/Cols;
c = Shown_colors%Cols;
if(Shown_colors < old_shown_colors) {
/* Reusing an existing swatch button */
swatch = Swatch[Shown_colors];
util_dprintf(2,"reusing swatch widget #%d for color #%d (%s)\n",
Shown_colors,i,Color[i]);
/* Destroy old tile pixmap */
XtVaGetValues(swatch,
XmNlabelPixmap,&oldtile,
NULL);
XFreePixmap(XtDisplay(AB_toplevel),oldtile);
}
else {
/* Need to create a new swatch button */
swatch = XtVaCreateWidget("swatch",
xmDrawnButtonWidgetClass,
Panel,
NULL);
Swatch[Shown_colors] = swatch;
util_dprintf(2,"creating swatch widget #%d for color #%d (%s)\n",
Shown_colors,i,Color[i]);
}
XtVaSetValues(swatch,
XmNlabelType,XmPIXMAP,
XmNlabelPixmap,tile,
XmNforeground,color,
XmNshadowType,XmSHADOW_OUT,
XmNshadowThickness,SHADOW_SZ,
XmNleftAttachment,XmATTACH_POSITION,
XmNleftPosition,c*Rows,
XmNrightAttachment,XmATTACH_POSITION,
XmNrightPosition,(c+1)*Rows,
XmNtopAttachment,XmATTACH_POSITION,
XmNtopPosition,r*Cols,
XmNbottomAttachment,XmATTACH_POSITION,
XmNbottomPosition,(r+1)*Cols,
XmNuserData,i, /* Save color index for later use */
NULL);
XtAddCallback(swatch,XmNactivateCallback,swatchCB,(XtPointer)0);
XtAddCallback(swatch,XmNresizeCallback,swatch_resizeCB,(XtPointer)0);
XtManageChild(swatch);
XtReleaseGC(AB_toplevel,gc);
/* Increment count of shown colors */
Shown_colors++;
}
/* Clear out the storage location we use to hold the current color */
XtVaSetValues(dtb_color_chooser_dialog.color_name,XmNuserData,0,NULL);
/* Make the swatch panel appear */
XtManageChild(Panel);
/* If we didn't get all the standard colors, explain it to the user */
if(Shown_colors != Num_colors) {
dtb_show_message(parent,&dtb_color_chooser_message,NULL,NULL);
}
}
/*
** REMIND:
**
** We'd like to use objxm_name_to_pixel() to convert color names to pixel
** values, as that'd give us identical functionality vs. libXt. However,
** the XtConvertAndStore() function provides look-up caching, which is not
** how you'd want to handle translating colors given the dynamism of the
** colormap. (E.g., if an app exits and frees up colors, the Xt converter
** doesn't realize it and continues to return values from a cache built prior
** to the app exit and increase in color availability). You're supposed to be
** able to reset the cache, but so far attempts to do so herein have falied.
** This function is a workaround that uses XAllocNamedColor() to do the name-
** to-pixel conversion.
*/
Pixel
name_to_pixel(
Widget w,
String color
)
{
extern Widget AB_toplevel;
Display *dpy;
Colormap cmap;
XColor exact, actual;
dpy = XtDisplay(AB_toplevel);
cmap = XDefaultColormap(dpy,XDefaultScreen(dpy));
if(XAllocNamedColor(XtDisplay(AB_toplevel),cmap,color,&exact,&actual) != 0) {
return(actual.pixel);
}
else return((Pixel)-1);
}
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/
void
applyCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
int index;
Widget current_color;
XmString label;
/* Find out which color was chosen */
XtVaGetValues(dtb_color_chooser_dialog.color_name,XmNuserData,
(XtPointer)&current_color,NULL);
if(current_color != 0) {
XtVaGetValues(current_color,XmNuserData,&index,NULL);
util_dprintf(2,"You picked \"%s\" (color #%d)\n",Color[index],index);
Answer = index;
/* Reset the shadow on the color choice */
XtVaSetValues(current_color,XmNshadowType,XmSHADOW_OUT,NULL);
}
else {
util_dprintf(2,"You didn't pick a color!\n");
Answer = -1;
}
/* Clear out color choice in chooser */
XtVaSetValues(dtb_color_chooser_dialog.color_name,XmNuserData,0,NULL);
label = XmStringCreateLocalized("None");
XtVaSetValues(dtb_color_chooser_dialog.color_name,
XmNlabelString,label,
NULL);
XmStringFree(label);
XtUnmanageChild(dtb_color_chooser_dialog.dialog_shellform);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
void
cancelCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
short index;
Widget current_color;
XmString label;
/* Find out which color was chosen (if any) */
XtVaGetValues(dtb_color_chooser_dialog.color_name,XmNuserData,
(XtPointer)&current_color,NULL);
if(current_color != 0) {
/* Reset the shadow on the color choice */
XtVaSetValues(current_color,XmNshadowType,XmSHADOW_OUT,NULL);
}
util_dprintf(2,"Canceling color selection...\n");
Answer = -1;
label = XmStringCreateLocalized("None");
XtVaSetValues(dtb_color_chooser_dialog.color_name,
XmNlabelString,label,
NULL);
XmStringFree(label);
XtUnmanageChild(dtb_color_chooser_dialog.dialog_shellform);
/*** DTB_USER_CODE_END ^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All automatically-generated data and functions have been defined.
***
*** Add new functions here, or at the top of the file.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,76 @@
/*** DTB_USER_CODE_START vvv Add file header below vvv ***/
/*
* $XConsortium: combobox_stubs.c /main/4 1996/04/18 13:17:27 drk $
*
* @(#)combobox_stubs.c 1.4 27 Sep 1994 cde_app_builder/src/ab
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
/*** DTB_USER_CODE_END ^^^ Add file header above ^^^ ***/
/*
* File: combobox_stubs.c
* Contains: Module callbacks and connection functions
*
* This file was generated by dtcodegen, from module combobox
*
* Any text may be added between the DTB_USER_CODE_START and
* DTB_USER_CODE_END comments (even non-C code). Descriptive comments
* are provided only as an aid.
*
* ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS. **
* ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR **
* ** DELETE THE GENERATED COMMENTS! **
*/
#include <stdio.h>
#include <Xm/Xm.h>
#include "dtb_utils.h"
#include "dtbuilder.h"
#include "combobox_ui.h"
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All necessary header files have been included.
***
*** Add include files, types, macros, externs, and user functions here.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/
/**************************************************************************
*** DTB_USER_CODE_START
***
*** All automatically-generated data and functions have been defined.
***
*** Add new functions here, or at the top of the file.
***/
/*** DTB_USER_CODE_END
***
*** End of user code section
***
**************************************************************************/

View File

@@ -0,0 +1,828 @@
// $XConsortium: conn.bil /main/3 1995/11/06 17:25:12 rswiston $
//
// @(#)conn.bil 1.2 02 Mar 1994
//
// RESTRICTED CONFIDENTIAL INFORMATION:
//
// The information in this document is subject to special
// restrictions in a confidential disclosure agreement between
// HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
// document outside HP, IBM, Sun, USL, SCO, or Univel without
// Sun's specific written approval. This document and all copies
// and derivative works thereof must be returned or destroyed at
// Sun's request.
//
// Copyright 1993 Sun Microsystems, Inc. All rights reserved.
//
:bil-version 1 0
:module conn
(
:element conn_dialog
(
:type :dialog
:bg-color "white"
:label "Connections Editor"
:resizable :true
:visible :false
:default-button connect_button
:help-button help_button
:help-volume "AppBuilder"
:help-location "ABConnectionsEditor"
:help-text "The Connections Editor is used to establish application interface behaviors, typically by specifying actions to be taken when objects are manipulated or certain events occur."
:children (
ctrl_panel
activate_panel
)
)
:element ctrl_panel
(
:type :container
:container-type :relative
:x 0
:y 0
:visible :true
:border-frame :none
:north-attachment (:point 0 0)
:south-attachment (:obj conn_dialog 0)
:east-attachment (:obj conn_dialog 0)
:west-attachment (:point 0 0)
:children (
view_sep
view_choices
when_choices
when_action_sep
source_choices
source_list
target_choices
target_list
when_label
conn_list
group
)
)
:element view_sep
(
:type :separator
:line-style :etched-in
:orientation :horizontal
:x 1
:y 238
:width 814
:height 2
:visible :true
:north-attachment (:obj group 15)
:east-attachment (:grid-line 100 0)
:west-attachment (:grid-line 0 0)
)
:element view_choices
(
:type :choice
:choice-type :option-menu
:x 5
:y 259
:label-type :string
:label "View:"
:label-position :west
:num-columns 1
:orientation :vertical
:selection-required :false
:active :true
:visible :true
:north-attachment (:obj view_sep 10)
:west-attachment (:point 0 3)
)
:element when_choices
(
:type :choice
:choice-type :option-menu
:x 127
:y 131
:num-columns 1
:orientation :vertical
:selection-required :false
:active :true
:visible :true
:north-attachment (:obj source_list 10)
:west-attachment (:grid-line 14 0)
)
:element when_action_sep
(
:type :separator
:line-style :etched-in
:orientation :vertical
:x 393
:y 0
:width 2
:height 241
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:obj view_sep 0)
:west-attachment (:grid-line 50 0)
)
:element source_choices
(
:type :choice
:choice-type :option-menu
:x 0
:y 2
:label-type :string
:label "Source:"
:label-position :west
:num-columns 1
:orientation :vertical
:selection-required :true
:active :true
:visible :true
:north-attachment (:point 0 5)
:west-attachment (:point 0 3)
)
:element source_list
(
:type :list
:x 4
:y 23
:width 395
:height 89
:selection-mode :browse
:selection-required :false
:num-rows 4
:active :true
:visible :true
:north-attachment (:obj source_choices 7)
:east-attachment (:grid-line 49 0)
:west-attachment (:point 0 4)
)
:element target_choices
(
:type :choice
:choice-type :option-menu
:x 423
:y 5
:width 38
:height 18
:label-type :string
:label "Target:"
:label-position :west
:num-columns 1
:orientation :vertical
:selection-required :false
:active :true
:visible :true
:north-attachment (:point 0 5)
:west-attachment (:grid-line 51 0)
)
:element target_list
(
:type :list
:x 392
:y 18
:width 392
:height 89
:selection-mode :browse
:selection-required :false
:num-rows 4
:active :true
:visible :true
:north-attachment (:obj target_choices 7)
:east-attachment (:grid-line 99 0)
:west-attachment (:grid-line 51 0)
)
:element when_label
(
:type :label
:x 3
:y 132
:label-type :string
:label "When:"
:label-alignment :center
:active :true
:visible :true
:north-attachment (:obj source_list 10)
:west-attachment (:point 0 3)
)
:element conn_list
(
:type :list
:x 0
:y 279
:width 801
:selection-mode :browse
:selection-required :false
:num-rows 6
:active :true
:visible :true
:north-attachment (:obj view_choices 5)
:south-attachment (:grid-line 99 0)
:east-attachment (:grid-line 98 0)
:west-attachment (:point 0 0)
)
:element group
(
:type :container
:container-type :group
:active :true
:visible :true
:x 415
:y 132
:group-type :ignore
:border-frame :none
:north-attachment (:obj target_list 10)
:west-attachment (:grid-line 51 0)
:children (
action_type_choices
predef_act_choices
arg_field
vol_textf
loc_textf
)
)
:element action_type_choices
(
:type :choice
:choice-type :option-menu
:x 0
:y 0
:label-type :string
:label "Action Type:"
:label-position :north
:num-columns 1
:orientation :vertical
:selection-required :true
:active :true
:visible :true
:north-attachment (:point 0 0)
:west-attachment (:point 0 0)
:children (
action_type_choices_Predefined_item
action_type_choices_Call_Function_item
action_type_choices_Execute_Code_item
action_type_choices_Activate_On_Item_Help_item
action_type_choices_Access_Help_Volume_item
)
)
:element action_type_choices_Predefined_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Predefined"
:active :true
:selected :true
)
:element action_type_choices_Call_Function_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Call Function"
:active :true
:selected :false
)
:element action_type_choices_Execute_Code_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Execute Code"
:active :true
:selected :false
)
:element action_type_choices_Activate_On_Item_Help_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Activate On-Item Help"
:active :true
:selected :false
)
:element action_type_choices_Access_Help_Volume_item
(
:type :item
:item-type :item-for-choice
:label-type :string
:label "Access Help Volume"
:active :true
:selected :false
)
:element predef_act_choices
(
:type :choice
:choice-type :option-menu
:x 208
:y 0
:num-columns 1
:orientation :vertical
:selection-required :false
:active :true
:visible :true
:north-attachment (:point 0 0)
:west-attachment (:obj action_type_choices 7)
)
:element arg_field
(
:type :text-field
:text-type :alphanumeric
:x 242
:y 22
:label-type :string
:label "Argument:"
:label-position :north
:num-columns 20
:max-length 80
:read-only :false
:active :true
:visible :true
:north-attachment (:obj predef_act_choices 1)
:west-attachment (:obj action_type_choices 12)
)
:element vol_textf
(
:type :text-field
:text-type :alphanumeric
:x 8
:y 67
:label-type :string
:label "Volume:"
:label-position :west
:num-columns 10
:max-length 80
:read-only :false
:active :true
:visible :false
:north-attachment (:obj action_type_choices 15)
:west-attachment (:point 0 0)
)
:element loc_textf
(
:type :text-field
:text-type :alphanumeric
:x 167
:y 67
:label-type :string
:label "Location:"
:label-position :west
:num-columns 15
:max-length 80
:read-only :false
:active :true
:visible :false
:north-attachment (:obj action_type_choices 15)
:west-attachment (:obj vol_textf 18)
)
:element activate_panel
(
:type :container
:container-type :button-panel
:height 36
:visible :true
:border-frame :none
:children (
connect_button
change_button
cancel_button
delete_button
help_button
)
)
:element connect_button
(
:type :button
:button-type :push-button
:x 16
:y 2
:label-type :string
:label-alignment :center
:label "Connect"
:active :true
:visible :true
:north-attachment (:point 0 2)
:east-attachment (:grid-line 18 0)
:west-attachment (:grid-line 1 0)
)
:element change_button
(
:type :button
:button-type :push-button
:label-type :string
:label-alignment :center
:label "Change"
:active :true
:visible :true
:north-attachment (:point 0 2)
:east-attachment (:grid-line 38 0)
:west-attachment (:grid-line 22 0)
)
:element cancel_button
(
:type :button
:button-type :push-button
:x 346
:y 1
:label-type :string
:label-alignment :center
:label "Cancel"
:active :true
:visible :true
:north-attachment (:point 0 2)
:east-attachment (:grid-line 78 0)
:west-attachment (:grid-line 62 0)
)
:element delete_button
(
:type :button
:button-type :push-button
:x 505
:y 2
:label-type :string
:label-alignment :center
:label "Delete"
:active :true
:visible :true
:north-attachment (:point 0 2)
:east-attachment (:grid-line 58 0)
:west-attachment (:grid-line 42 0)
)
:element help_button
(
:type :button
:button-type :push-button
:x 680
:y 9
:label-type :string
:label-alignment :center
:label "Help"
:active :true
:visible :true
:north-attachment (:point 0 2)
:east-attachment (:grid-line 98 0)
:west-attachment (:grid-line 82 0)
)
:element no_func_msg
(
:type :message
:message-type :error
:label "Application Builder"
:message "A function name was not specified\nfor the call-function connection."
:action1-label "OK"
:cancel-button :false
:help-button :true
:default-button :action1-button
:help-text "When creating a call-function connection, a\nfunction name must be supplied. That name will\nbe used by the code generator to create the\ncallback routine."
)
:element exec_code_dialog
(
:type :dialog
:width 593
:height 187
:bg-color "white"
:label "Application Builder - Execute Code Editor"
:resizable :true
:visible :false
:default-button exec_code_apply_button
:help-button exec_code_help_button
:help-volume "AppBuilder"
:help-location "ABConnectionsEditor"
:help-text "The Execute Code Editor provides a way to examine and edit specific C program instructions that are to be executed as the action for a connection."
:children (
exec_code_textpane
dialog_button_panel
)
)
:element exec_code_textpane
(
:type :text-pane
:text-type :alphanumeric
:x 0
:y 0
:border-frame :none
:num-rows 12
:num-columns 80
:hscrollbar :always
:vscrollbar :always
:word-wrap :false
:read-only :false
:active :true
:visible :true
:north-attachment (:point 0 0)
:south-attachment (:obj exec_code_dialog 0)
:east-attachment (:obj exec_code_dialog 0)
:west-attachment (:point 0 0)
)
:element dialog_button_panel
(
:type :container
:container-type :button-panel
:width 593
:height 48
:visible :true
:border-frame :none
:children (
exec_code_help_button
exec_code_ok_button
exec_code_apply_button
exec_code_cancel_button
)
)
:element exec_code_help_button
(
:type :button
:button-type :push-button
:x 441
:y 14
:label-type :string
:label-alignment :center
:label "Help"
:active :true
:visible :true
:north-attachment (:point 0 5)
:east-attachment (:grid-line 98 0)
:west-attachment (:grid-line 77 0)
)
:element exec_code_ok_button
(
:type :button
:button-type :push-button
:x 12
:y 5
:label-type :string
:label-alignment :center
:label "OK"
:active :true
:visible :true
:north-attachment (:point 0 5)
:east-attachment (:grid-line 22 0)
:west-attachment (:grid-line 2 0)
)
:element exec_code_apply_button
(
:type :button
:button-type :push-button
:x 121
:y 8
:label-type :string
:label-alignment :center
:label "Apply"
:active :true
:visible :true
:north-attachment (:point 0 5)
:east-attachment (:grid-line 48 0)
:west-attachment (:grid-line 27 0)
)
:element exec_code_cancel_button
(
:type :button
:button-type :push-button
:x 234
:y 10
:label-type :string
:label-alignment :center
:label "Cancel"
:active :true
:visible :true
:north-attachment (:point 0 5)
:east-attachment (:grid-line 73 0)
:west-attachment (:grid-line 52 0)
)
:connection
(
:from cancel_button
:when :activate
:action-type :call-function
:action conn_cancelCB
)
:connection
(
:from connect_button
:when :activate
:action-type :call-function
:action connP_make_connection
)
:connection
(
:from change_button
:when :activate
:action-type :call-function
:action connP_change_connection
)
:connection
(
:from delete_button
:when :activate
:action-type :call-function
:action connP_delete_connection
)
:connection
(
:from connect_button
:when :after-create
:action-type :call-function
:action connP_register_connect_button
)
:connection
(
:from change_button
:when :after-create
:action-type :call-function
:action connP_register_change_button
)
:connection
(
:from cancel_button
:when :after-create
:action-type :call-function
:action connP_register_cancel_button
)
:connection
(
:from delete_button
:when :after-create
:action-type :call-function
:action connP_register_delete_button
)
:connection
(
:from source_choices
:when :after-create
:action-type :call-function
:action connP_register_source_choices
)
:connection
(
:from target_choices
:when :after-create
:action-type :call-function
:action connP_register_target_choices
)
:connection
(
:from when_choices
:when :after-create
:action-type :call-function
:action connP_register_when_choices
)
:connection
(
:from predef_act_choices
:when :after-create
:action-type :call-function
:action connP_register_predef_act_choices
)
:connection
(
:from view_choices
:when :after-create
:action-type :call-function
:action connP_register_view_choices
)
:connection
(
:from source_list
:when :after-create
:action-type :call-function
:action connP_register_source_list
)
:connection
(
:from target_list
:when :after-create
:action-type :call-function
:action connP_register_target_list
)
:connection
(
:from conn_list
:when :after-create
:action-type :call-function
:action connP_register_conn_list
)
:connection
(
:from arg_field
:when :after-create
:action-type :call-function
:action connP_register_arg_field
)
:connection
(
:from action_type_choices_Predefined_item
:when :after-create
:action-type :call-function
:action connP_register_action_Predefined_item
)
:connection
(
:from action_type_choices_Call_Function_item
:when :after-create
:action-type :call-function
:action connP_register_action_Call_Function_item
)
:connection
(
:from action_type_choices_Execute_Code_item
:when :after-create
:action-type :call-function
:action connP_register_action_Execute_Code_item
)
:connection
(
:from action_type_choices_Execute_Code_item
:when :activate
:action-type :call-function
:action connP_show_execute_code
)
:connection
(
:from action_type_choices_Activate_On_Item_Help_item
:when :after-create
:action-type :call-function
:action connP_register_action_on_item_help_item
)
:connection
(
:from action_type_choices_Access_Help_Volume_item
:when :after-create
:action-type :call-function
:action connP_register_action_help_vol_item
)
:connection
(
:from loc_textf
:when :after-create
:action-type :call-function
:action connP_register_loc_textf
)
:connection
(
:from vol_textf
:when :after-create
:action-type :call-function
:action connP_register_vol_textf
)
:connection
(
:from action_type_choices
:when :after-create
:action-type :call-function
:action connP_register_action_type_opmenu
)
:connection
(
:from action_type_choices_Predefined_item
:when :activate
:action-type :call-function
:action connP_enable_std_actions
)
:connection
(
:from action_type_choices_Call_Function_item
:when :activate
:action-type :call-function
:action connP_enable_call_function
)
:connection
(
:from action_type_choices_Activate_On_Item_Help_item
:when :activate
:action-type :call-function
:action connP_enable_on_item_help
)
:connection
(
:from action_type_choices_Access_Help_Volume_item
:when :activate
:action-type :call-function
:action connP_enable_access_help_vol
)
:connection
(
:from exec_code_ok_button
:when :activate
:action-type :call-function
:action connP_exec_code_okCB
)
:connection
(
:from exec_code_apply_button
:when :activate
:action-type :call-function
:action connP_exec_code_applyCB
)
:connection
(
:from exec_code_cancel_button
:when :activate
:action-type :call-function
:action exec_code_cancelCB
)
:connection
(
:from exec_code_dialog
:when :hide
:action-type :call-function
:action connP_clear_exec_dlg
)
)

View File

@@ -0,0 +1,79 @@
/*
* $XConsortium: conn.h /main/3 1995/11/06 17:25:27 rswiston $
*
* @(#)conn.h 1.17 02 May 1995 cde_app_builder/src/libABobj
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
#ifndef _CONN_H_
#define _CONN_H_
/*
* conn.h -
*/
#include <X11/Intrinsic.h>
#include <ab_private/obj.h>
#include "conn_ui.h"
extern ABObj project;
extern void conn_drag_chord(
Widget widget,
XEvent *event,
String *params,
Cardinal num_params
);
extern void conn_popup_dialog(
Widget widget,
XtPointer client_data,
XtPointer call_data
);
extern void conn_set_source(
ABObj obj
);
extern void conn_set_target(
ABObj obj
);
extern void conn_enable_action_interpret(
ABObj project,
BOOL to_test_project
);
extern void conn_disable_action_interpret(
ABObj project
);
extern void conn_test_mode_initialize(
ABObj project
);
extern void conn_test_mode_cleanup(
ABObj project
);
extern void conn_init();
extern void conn_strings_init();
extern void conn_override_default_when(
AB_WHEN when
);
extern void conn_reset_default_when(void);
extern void conn_reset_default_action(void);
extern void conn_override_default_action_type(
AB_FUNC_TYPE func_type
);
extern void conn_reset_default_action_type();
#endif /* _CONN_H_ */

View File

@@ -0,0 +1,259 @@
/*
* $XConsortium: connP.h /main/3 1995/11/06 17:25:39 rswiston $
*
* @(#)connP.h 1.12 17 Feb 1994 cde_app_builder/src/libABobj
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*/
#ifndef _CONN_P_H_
#define _CONN_P_H_
/*
* connP.h -
*/
#include <X11/Intrinsic.h>
#include <ab_private/obj.h>
#include <ab_private/obj_notify.h>
#include <ab_private/conn.h>
#include "conn_ui.h"
#define FUNCTION_LABEL "Function:"
#define ARGUMENT_LABEL "Argument:"
#define CODE_LABEL "Code:"
extern Widget ConnP_dialog;
typedef enum {
ACTION_TYPE_PREDEFINED = 0,
ACTION_TYPE_CALLFUNC,
ACTION_TYPE_EXECUTE_CODE,
ACTION_TYPE_ON_ITEM_HELP,
ACTION_TYPE_HELP_VOLUME,
ACTION_TYPE_NUM_VALUES
} ACTION_TYPE;
typedef struct _ConnWhenRec
{
AB_WHEN when_type;
char *label;
} ConnWhen;
typedef struct _ConnActRec
{
AB_BUILTIN_ACTION act_type;
char *label;
} ConnAct;
typedef struct _ConnObjRec
{
AB_OBJECT_TYPE obj_type;
int obj_subtype;
char *label;
AB_WHEN *when_list;
Cardinal num_whens;
AB_WHEN default_when;
AB_BUILTIN_ACTION *action_list;
Cardinal num_actions;
AB_BUILTIN_ACTION default_act;
} ConnObj;
extern ConnObj ConnP_conn_objs[];
extern int ConnP_num_conn_objs;
extern ConnWhen *ConnP_conn_whens;
extern int ConnP_num_conn_whens;
extern ConnAct *ConnP_conn_acts;
extern int ConnP_num_conn_acts;
extern char ** connP_get_when_labels(
int *num_labels
);
extern char ** connP_get_act_labels(
int *num_labels
);
extern int connP_get_obj_type_index(
AB_OBJECT_TYPE ab_type,
int ab_subtype
);
extern STRING connP_get_moduled_name(
ABObj obj
);
extern char *connP_make_conn_string(
ABObj action_obj
);
extern ABObj connP_get_source(
void
);
extern ABObj connP_get_target(
void
);
extern ABObj connP_get_connection(
void
);
extern void connP_set_connection(
ABObj action
);
extern void connP_set_source_type(
AB_OBJECT_TYPE obj_type,
int obj_subtype
);
extern void connP_set_target_type(
AB_OBJECT_TYPE obj_type,
int obj_subtype
);
extern AB_OBJECT_TYPE connP_get_source_type(
void
);
extern int connP_get_source_subtype(
void
);
extern AB_OBJECT_TYPE connP_get_target_type(
void
);
extern int connP_get_target_subtype(
void
);
extern void connP_set_action_type(
AB_FUNC_TYPE action_type
);
extern AB_FUNC_TYPE connP_get_action_type(
void
);
extern void connP_ui_source_type_update(
AB_OBJECT_TYPE new_type,
int new_subtype
);
extern void connP_ui_target_type_update(
AB_OBJECT_TYPE new_type,
int new_subtype
);
extern AB_ARG_TYPE connP_action_needs_arg(
AB_BUILTIN_ACTION act_type
);
extern void connP_guess_when_action(
AB_OBJECT_TYPE source_type,
int source_subtype,
AB_OBJECT_TYPE target_type,
int target_subtype,
AB_WHEN *when_ret,
AB_FUNC_TYPE *func_type_ret,
AB_BUILTIN_ACTION *act_ret
);
extern int connP_objtype_needs_subtype(
AB_OBJECT_TYPE obj_type,
int obj_subtype
);
extern int connP_obj_enabled(
AB_OBJECT_TYPE obj_type,
int obj_subtype
);
extern void connP_set_conn_arg(
ABObj ab_action,
AB_ARG_TYPE arg_type,
char *str_value
);
extern void connP_make_builtin_conn(
ABObj ab_action,
ABObj c_source,
ABObj c_target,
AB_WHEN c_when,
AB_BUILTIN_ACTION c_act
);
extern void connP_make_user_def_conn(
ABObj ab_action,
ABObj c_source,
AB_WHEN c_when,
char *function_name
);
extern void connP_make_code_frag_conn(
ABObj ab_action,
ABObj c_source,
AB_WHEN c_when,
char *code_frag
);
extern void connP_make_on_item_help_conn(
ABObj ab_action,
ABObj c_source,
AB_WHEN c_when
);
extern void connP_make_help_vol_conn(
ABObj ab_action,
ABObj c_source,
AB_WHEN c_when,
STRING volume,
STRING location
);
extern int connP_update_on_obj_destroy(
ObjEvDestroyInfo destroyInfo
);
extern int connP_update_on_obj_rename(
ObjEvAttChangeInfo info
);
extern int connP_update_on_obj_reparent(
ObjEvReparentInfo info
);
extern int connP_update_on_show_status(
ObjEvUpdateInfo info
);
extern BOOL connP_change_in_builtin(
ABObj ab_action,
ABObj c_source,
ABObj c_target,
AB_WHEN c_when,
AB_BUILTIN_ACTION c_act,
char *arg_str
);
extern void connP_builtin_remove_arg(
ABObj ab_action
);
extern void connP_destroy_connections_for(
ABObj obj
);
extern BOOL connP_conn_is_possible(
void
);
extern BOOL allow_show_help_connection(
ABObj src_obj,
ABObj target_obj
);
extern void connP_update_when_menu(
Widget widget,
XtPointer clientData,
XtPointer callData
);
extern void connP_update_action_menu(
Widget widget,
XtPointer clientData,
XtPointer callData
);
extern BOOL connP_obj_part_of_conn(
ABObj obj,
ABObj conn_obj
);
#endif /* _CONN_P_H_ */

Some files were not shown because too many files have changed in this diff Show More