This commit is contained in:
Ludovic Jacomme 2002-03-29 17:40:14 +00:00
parent 9ab0376694
commit 4a56cf6149
146 changed files with 36681 additions and 0 deletions

View File

@ -0,0 +1 @@
SUBDIRS = src man1

View File

@ -0,0 +1,36 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/dreal.c)
DREAL_MAJOR_VERSION=1
DREAL_MINOR_VERSION=14
DREAL_VERSION=$DREAL_MAJOR_VERSION.$DREAL_MINOR_VERSION
AC_SUBST(DREAL_MAJOR_VERSION)
AC_SUBST(DREAL_MINOR_VERSION)
AC_SUBST(DREAL_VERSION)
# For automake.
VERSION=$DREAL_VERSION
PACKAGE=dreal
dnl Initialize automake stuff
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
dnl Checks for programs.
AC_PROG_CC
AM_PROG_LEX
AC_PROG_YACC
AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_FIND_MOTIF
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AM_ALLIANCE
AC_OUTPUT([
Makefile
src/Makefile
man1/Makefile
])

View File

@ -0,0 +1,120 @@
# /*------------------------------------------------------------\
# | |
# | Title : Parameters File for Dreal |
# | |
# | Technology : Cmos V7 |
# | |
# | Date : 02/08/95 |
# | |
# \------------------------------------------------------------*/
# /*------------------------------------------------------------\
# | |
# | Lower Grid Step in pixel |
# | |
# \------------------------------------------------------------*/
DEFINE DREAL_LOWER_GRID_STEP 10
# /*------------------------------------------------------------\
# | |
# | Lower Figure Text Step in pixel |
# | |
# \------------------------------------------------------------*/
DEFINE DREAL_LOWER_FIGURE_STEP 0.1
# /*------------------------------------------------------------\
# | |
# | Lower Instance Text Step in pixel |
# | |
# \------------------------------------------------------------*/
DEFINE DREAL_LOWER_INSTANCE_STEP 0.1
# /*------------------------------------------------------------\
# | |
# | Lower Connector Text Step in pixel |
# | |
# \------------------------------------------------------------*/
DEFINE DREAL_LOWER_CONNECTOR_STEP 0.5
# /*------------------------------------------------------------\
# | |
# | Lower Segment Text Step in pixel |
# | |
# \------------------------------------------------------------*/
DEFINE DREAL_LOWER_SEGMENT_STEP 0.7
# /*------------------------------------------------------------\
# | |
# | Lower Reference Text Step in pixel |
# | |
# \------------------------------------------------------------*/
DEFINE DREAL_LOWER_REFERENCE_STEP 1.0
# /*------------------------------------------------------------\
# | |
# | Dreal Cursor Color Name |
# | |
# \------------------------------------------------------------*/
DEFINE DREAL_CURSOR_COLOR_NAME Gray
# /*------------------------------------------------------------\
# | |
# | Dreal Cursor Size in pixel |
# | |
# \------------------------------------------------------------*/
DEFINE DREAL_CURSOR_SIZE 10
# /*------------------------------------------------------------\
# | |
# | View Layer Panel Button Label, Foreground, Background Color |
# | |
# \------------------------------------------------------------*/
TABLE DREAL_RDS_LAYER_NAME
RDS_NWELL Nwell tan Black
RDS_PWELL Pwell light_yellow Black
RDS_NIMP Nimp forest_green Black
RDS_PIMP Pimp goldenrod Black
RDS_ACTIV Activ brown Black
RDS_NDIF Ndif lawn_green Black
RDS_PDIF Pdif yellow Black
RDS_NTIE Ntie spring_green Black
RDS_PTIE Ptie light_goldenrod Black
RDS_POLY Poly red Black
RDS_VPOLY VPoly coral Black
RDS_GATE Gate orange Black
RDS_TPOLY Tpoly hot_pink Black
RDS_CONT Cont dark_violet Black
RDS_TCONT TCont orchid Black
RDS_ALU1 Alu1 royal_blue Black
RDS_VALU1 VAlu1 sky_blue Black
RDS_TALU1 Talu1 royal_blue Black
RDS_VIA1 Via1 deep_sky_blue Black
RDS_TVIA1 TVia1 dodger_blue Black
RDS_ALU2 Alu2 cyan Black
RDS_TALU2 Talu2 turquoise Black
RDS_VIA2 Via2 deep_pink Black
RDS_ALU3 Alu3 light_pink Black
RDS_TALU3 Talu3 light_pink Black
RDS_VIA3 Via3 sea_green Black
RDS_ALU4 Alu4 green Black
RDS_TALU4 Talu4 green Black
RDS_VIA4 Via4 gold Black
RDS_ALU5 Alu5 yellow Black
RDS_TALU5 Talu5 yellow Black
RDS_VIA5 Via5 violet_red Black
RDS_ALU6 Alu6 violet Black
RDS_TALU6 Talu6 violet Black
RDS_CPAS Cpas gray Black
RDS_REF Ref coral Black
RDS_ABOX Abox pink Black
END

View File

@ -0,0 +1,2 @@
man_MANS = dreal.1
EXTRA_DIST = $(man_MANS)

View File

@ -0,0 +1,77 @@
.\" $Id: dreal.1,v 1.1 2002/03/29 17:40:13 ludo Exp $
.\" @(#)dreal 1.07 94/10/10 UPMC/ASIM/LIP6/CAO-VLSI "
.TH DREAL 1 "October 1, 1997" "ASIM/LIP6" "ALLIANCE Reference Manual"
.SH NAME
dreal \- Graphic real layout viewer
.SH SYNOPSIS
.B dreal
[\-l file_name]
[\-xor]
[\-debug]
[\-install]
[\-force]
.br
.so man1/alc_origin.1
.SH DESCRIPTION
.B Dreal
is a hierarchical real layout viewer. All functionnalities can be
accessed through different menus.
.B Dreal
works under Motif and X11r5.
When entering
.B Dreal,
the main window appears and shows 4 different
menus on the top bar.These menus can be entered by simply clicking on the
mouse left button. Here is the description of these menus.
.TP 10
.B File
\f4Open\fP : load an existing cell.
.br
\f4Quit\fP : quit dreal.
.TP 10
.B View
\f4Zoom\fP : perform zoom in, zoom out, center, fit, refresh on figure.
.br
\f4Layer\fP : select types of layers displayed.
.br
\f4Map\fP : show cursor position in the entire figure.
.br
\f4Arrows\fP : show arrows for moving at the grid step.
.br
\f4Grid\fP : Set the X,Y step of the grid if displayed.
.TP 10
.B Tools
\f4Flatten\fP : flatten the current figure.
.br
\f4Message\fP : display the last error messages.
.TP 10
.B Setup
Save or load a user defined configuration of default displayed menus.
.SH ENVIRONMENT VARIABLES
.TP
.B MBK_CATA_LIB
indicates the path to the read only libraries to be used.
.TP
.B MBK_WORK_LIB
indicates the path to the read directory for the session.
.TP
.B RDS_IN
indicates the file format to be used for the cell.
.TP
.B DREAL_TECHNO_NAME (optionnal)
indicates the path to the techno name file used by Dreal.
.TP
.B RDS_TECHNO_NAME (optionnal)
indicates the path to the RDS configuration file used by Dreal.
.SH SEE ALSO
mbk(1), MBK_CATA_LIB(8), RDS_IN(1), RDS_TECHNO_NAME(1)
.so man1/alc_bug_report.1

196
alliance/src/dreal/motif.m4 Normal file
View File

@ -0,0 +1,196 @@
dnl
dnl
dnl AC_FIND_MOTIF : find OSF/Motif or LessTif, and provide variables
dnl to easily use them in a Makefile.
dnl
dnl Adapted from a macro by Andreas Zeller.
dnl
dnl The variables provided are :
dnl LINK_MOTIF (e.g. -L/usr/lesstif/lib -lXm)
dnl INCLUDE_MOTIF (e.g. -I/usr/lesstif/lib)
dnl MOTIF_LIBRARIES (e.g. /usr/lesstif/lib)
dnl MOTIF_INCLUDES (e.g. /usr/lesstif/include)
dnl
dnl The LINK_MOTIF and INCLUDE_MOTIF variables should be fit to put on
dnl your application's link line in your Makefile.
dnl
dnl Oleo CVS $Id: motif.m4,v 1.1 2002/03/29 17:40:13 ludo Exp $
dnl
AC_DEFUN(AC_FIND_MOTIF,
[
AC_REQUIRE([AC_PATH_XTRA])
MOTIF_INCLUDES=
MOTIF_LIBRARIES=
dnl AC_ARG_WITH(motif,
dnl [ --without-motif do not use Motif widgets])
dnl Treat --without-motif like
dnl --without-motif-includes --without-motif-libraries.
dnl if test "$with_motif" = "no"
dnl then
dnl MOTIF_INCLUDES=none
dnl MOTIF_LIBRARIES=none
dnl fi
AC_ARG_WITH(motif-includes,
[ --with-motif-includes=DIR Motif include files are in DIR],
MOTIF_INCLUDES="$withval")
AC_ARG_WITH(motif-libraries,
[ --with-motif-libraries=DIR Motif libraries are in DIR],
MOTIF_LIBRARIES="$withval")
AC_MSG_CHECKING(for Motif)
#
#
# Search the include files.
#
if test "$MOTIF_INCLUDES" = ""; then
AC_CACHE_VAL(ac_cv_motif_includes,
[
ac_motif_save_LIBS="$LIBS"
ac_motif_save_CFLAGS="$CFLAGS"
ac_motif_save_CPPFLAGS="$CPPFLAGS"
ac_motif_save_LDFLAGS="$LDFLAGS"
#
LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
CFLAGS="$X_CFLAGS $CFLAGS"
CPPFLAGS="$X_CFLAGS $CPPFLAGS"
LDFLAGS="$X_LIBS $LDFLAGS"
#
ac_cv_motif_includes="none"
AC_TRY_COMPILE([#include <Xm/Xm.h>],[int a;],
[
# Xm/Xm.h is in the standard search path.
ac_cv_motif_includes=
],
[
# Xm/Xm.h is not in the standard search path.
# Locate it and put its directory in `MOTIF_INCLUDES'
#
# /usr/include/Motif* are used on HP-UX (Motif).
# /usr/include/X11* are used on HP-UX (X and Athena).
# /usr/dt is used on Solaris (Motif).
# /usr/openwin is used on Solaris (X and Athena).
# Other directories are just guesses.
for dir in "$x_includes" "${prefix}/include" /usr/include /usr/local/include \
/usr/include/Motif2.0 /usr/include/Motif1.2 /usr/include/Motif1.1 \
/usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 \
/usr/dt/include /usr/openwin/include \
/usr/dt/*/include /opt/*/include /usr/include/Motif* \
"${prefix}"/*/include /usr/*/include /usr/local/*/include \
"${prefix}"/include/* /usr/include/* /usr/local/include/*; do
if test -f "$dir/Xm/Xm.h"; then
ac_cv_motif_includes="$dir"
break
fi
done
])
#
LIBS="$ac_motif_save_LIBS"
CFLAGS="$ac_motif_save_CFLAGS"
CPPFLAGS="$ac_motif_save_CPPFLAGS"
LDFLAGS="$ac_motif_save_LDFLAGS"
])
MOTIF_INCLUDES="$ac_cv_motif_includes"
fi
#
#
# Now for the libraries.
#
if test "$MOTIF_LIBRARIES" = ""; then
AC_CACHE_VAL(ac_cv_motif_libraries,
[
ac_motif_save_LIBS="$LIBS"
ac_motif_save_CFLAGS="$CFLAGS"
ac_motif_save_CPPFLAGS="$CPPFLAGS"
ac_motif_save_LDFLAGS="$LDFLAGS"
#
LIBS="$X_PRE_LIBS -lXm -lXt -lX11 $X_EXTRA_LIBS $LIBS"
CFLAGS="$X_CFLAGS $CFLAGS"
CPPFLAGS="$X_CFLAGS $CPPFLAGS"
LDFLAGS="$X_LIBS $LDFLAGS"
#
ac_cv_motif_libraries="none"
AC_TRY_LINK([#include <Xm/Xm.h>],[XtToolkitInitialize();],
[
# libXm.a is in the standard search path.
ac_cv_motif_libraries=
],
[
# libXm.a is not in the standard search path.
# Locate it and put its directory in `MOTIF_LIBRARIES'
#
# /usr/lib/Motif* are used on HP-UX (Motif).
# /usr/lib/X11* are used on HP-UX (X and Athena).
# /usr/dt is used on Solaris (Motif).
# /usr/lesstif is used on Linux (Lesstif).
# /usr/openwin is used on Solaris (X and Athena).
# Other directories are just guesses.
for dir in "$x_libraries" "${prefix}/lib" /usr/lib /usr/local/lib \
/usr/lib/Motif2.0 /usr/lib/Motif1.2 /usr/lib/Motif1.1 \
/usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4 /usr/lib/X11 \
/usr/dt/lib /usr/openwin/lib \
/usr/dt/*/lib /opt/*/lib /usr/lib/Motif* \
/usr/lesstif*/lib /usr/lib/Lesstif* \
"${prefix}"/*/lib /usr/*/lib /usr/local/*/lib \
"${prefix}"/lib/* /usr/lib/* /usr/local/lib/*; do
if test -d "$dir" && test "`ls $dir/libXm.* 2> /dev/null`" != ""; then
ac_cv_motif_libraries="$dir"
break
fi
done
])
#
LIBS="$ac_motif_save_LIBS"
CFLAGS="$ac_motif_save_CFLAGS"
CPPFLAGS="$ac_motif_save_CPPFLAGS"
LDFLAGS="$ac_motif_save_LDFLAGS"
])
#
MOTIF_LIBRARIES="$ac_cv_motif_libraries"
fi
#
# Provide an easier way to link
#
if test "$MOTIF_INCLUDES" = "none" -o "$MOTIF_LIBRARIES" = "none"; then
with_motif="no"
else
with_motif="yes"
fi
if test "$with_motif" != "no"; then
if test "$MOTIF_LIBRARIES" = ""; then
LINK_MOTIF="-lXm"
MOTIF_LIBS="-lXm"
else
LINK_MOTIF="-L$MOTIF_LIBRARIES -lXm"
MOTIF_LIBS="-L$MOTIF_LIBRARIES -lXm"
fi
if test "$MOTIF_INCLUDES" != ""; then
INCLUDE_MOTIF="-I$MOTIF_INCLUDES"
MOTIF_CFLAGS="-I$MOTIF_INCLUDES"
fi
AC_DEFINE(HAVE_MOTIF)
else
with_motif="no"
fi
#
AC_SUBST(LINK_MOTIF)
AC_SUBST(INCLUDE_MOTIF)
#
#
#
motif_libraries_result="$MOTIF_LIBRARIES"
motif_includes_result="$MOTIF_INCLUDES"
test "$motif_libraries_result" = "" && motif_libraries_result="in default path"
test "$motif_includes_result" = "" && motif_includes_result="in default path"
test "$motif_libraries_result" = "none" && motif_libraries_result="(none)"
test "$motif_includes_result" = "none" && motif_includes_result="(none)"
AC_MSG_RESULT(
[libraries $motif_libraries_result, headers $motif_includes_result])
])dnl

View File

@ -0,0 +1,79 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Create.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef DREAL_GMC
# define DREAL_GMC
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealMenuItem DrealCreateMenu[];
extern DrealPanelItem DrealCreateRectanglePanel;
extern int DrealCreateRectangleDefaultValues[ 5 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealBuildPanelCreate();
extern void DrealBuildCreateDialog();
extern void DrealCreateRectangleRds();
extern void DrealCreateAbutmentBoxRds();
extern void DrealChangeRectangleLayer();
# endif

View File

@ -0,0 +1,225 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Create.c |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMC.h"
# include "GMC_create.h"
# include "GMC_dialog.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Rectangle |
| |
\------------------------------------------------------------*/
char DrealRectangleLayer = 0;
char *DrealRectangleName = (char *)NULL;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealCreateFigureRds |
| |
\------------------------------------------------------------*/
void DrealCreateFigureRds()
{
if ( DrealFigureRds == (rdsfig_list *)NULL )
{
rdsbegin();
DrealNewFigure( DREAL_DEFAULT_FIGURE_NAME );
DrealChangeTopLevelTitle( DrealFigureRds->NAME );
rdsend();
}
}
/*------------------------------------------------------------\
| |
| DrealCreateRectangleRds |
| |
\------------------------------------------------------------*/
void DrealCreateRectangleRds( LambdaX1, LambdaY1, LambdaX2, LambdaY2 )
long LambdaX1;
long LambdaY1;
long LambdaX2;
long LambdaY2;
{
rdsrec_list *Rectangle;
long Swap;
rdsbegin();
if ( ( LambdaX1 != LambdaX2 ) &&
( LambdaY1 != LambdaY2 ) )
{
if ( LambdaX1 > LambdaX2 )
{
Swap = LambdaX1; LambdaX1 = LambdaX2; LambdaX2 = Swap;
}
if ( LambdaY1 > LambdaY2 )
{
Swap = LambdaY1; LambdaY1 = LambdaY2; LambdaY2 = Swap;
}
}
else
{
DrealErrorMessage( DrealMainWindow, "This rectangle is too small !" );
rdsend();
return;
}
DrealCreateFigureRds();
Rectangle = DrealAddRectangle( DrealRectangleName,
DrealRectangleLayer,
LambdaX1 * RDS_PHYSICAL_GRID,
LambdaY1 * RDS_PHYSICAL_GRID,
( LambdaX2 - LambdaX1 ) * RDS_PHYSICAL_GRID,
( LambdaY2 - LambdaY1 ) * RDS_PHYSICAL_GRID );
DrealAddUndo();
DrealAddUndoRec( Rectangle );
DrealDisplayRectangle( Rectangle );
rdsend();
}
/*------------------------------------------------------------\
| |
| Dreal Create Abutmentbox |
| |
\------------------------------------------------------------*/
void DrealCreateAbutmentBoxRds( LambdaX1, LambdaY1, LambdaX2, LambdaY2 )
long LambdaX1;
long LambdaY1;
long LambdaX2;
long LambdaY2;
{
rdsrec_list *Rectangle;
long Swap;
rdsbegin();
if ( ( LambdaX1 != LambdaX2 ) &&
( LambdaY1 != LambdaY2 ) )
{
if ( LambdaX1 > LambdaX2 )
{
Swap = LambdaX1; LambdaX1 = LambdaX2; LambdaX2 = Swap;
}
if ( LambdaY1 > LambdaY2 )
{
Swap = LambdaY1; LambdaY1 = LambdaY2; LambdaY2 = Swap;
}
}
else
{
DrealErrorMessage( DrealMainWindow, "The abutment box must be rectangular !" );
rdsend();
return;
}
DrealCreateFigureRds();
Rectangle = DrealAddAbox( LambdaX1 * RDS_PHYSICAL_GRID,
LambdaY1 * RDS_PHYSICAL_GRID,
( LambdaX2 - LambdaX1 ) * RDS_PHYSICAL_GRID,
( LambdaY2 - LambdaY1 ) * RDS_PHYSICAL_GRID );
DrealAddUndo();
DrealAddUndoRec( Rectangle );
DrealDisplayRectangle( Rectangle );
DrealChangeEditMode( DREAL_EDIT_MEASURE,
DrealPromptEditMeasure );
rdsend();
}

View File

@ -0,0 +1,80 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Create.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_CREATE
# define DREAL_CREATE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Rectangle & Wire |
| |
\------------------------------------------------------------*/
extern char DrealRectangleLayer;
extern char *DrealRectangleName;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,192 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.c |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMC.h"
# include "GMC_dialog.h"
# include "GMC_create.h"
# include "GMC_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
char DrealCreateDialogCancel = 1;
/*------------------------------------------------------------\
| |
| Create Dialog |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Rectangle Dialog |
| |
\------------------------------------------------------------*/
DrealDialogItem DrealChangeRectangleNameDialog =
{
"Rectangle name",
DREAL_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackChangeRectangleNameOk,
(XtPointer)NULL,
(void *)CallbackChangeRectangleNameCancel,
(XtPointer)NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealBuildCreateDialog |
| |
\------------------------------------------------------------*/
void DrealBuildCreateDialog()
{
rdsbegin();
DrealBuildDialog( DrealMainWindow, &DrealChangeRectangleNameDialog );
rdsend();
}
/*------------------------------------------------------------\
| |
| Callback For Dialog |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackChangeRectangleNameOk |
| |
\------------------------------------------------------------*/
void CallbackChangeRectangleNameOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *NameSet;
rdsbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&NameSet );
XtUnmanageChild( DrealChangeRectangleNameDialog.WIDGET );
DrealExitDialog();
DrealCreateDialogCancel = 0;
NameSet = DrealPostTreatString( NameSet );
if ( NameSet != (char *)NULL )
{
NameSet = namealloc( NameSet );
}
DrealRectangleName = NameSet;
DrealChangeEditMode( DREAL_CREATE_RECTANGLE,
DrealPromptCreateRectangle );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackChangeRectangleNameCancel |
| |
\------------------------------------------------------------*/
void CallbackChangeRectangleNameCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
rdsbegin();
XtUnmanageChild( DrealChangeRectangleNameDialog.WIDGET );
DrealExitDialog();
DrealCreateDialogCancel = 1;
rdsend();
}

View File

@ -0,0 +1,77 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_CREATE_DIALOG
# define DREAL_CREATE_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern char DrealCreateDialogCancel;
extern DrealDialogItem DrealChangeRectangleNameDialog;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackChangeRectangleNameOk();
extern void CallbackChangeRectangleNameCancel();
# endif

View File

@ -0,0 +1,174 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.c |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GTB.h"
# include "GSB.h"
# include "GRD.h"
# include "GMX.h"
# include "GMC.h"
# include "GMC_menu.h"
# include "GMC_create.h"
# include "GMC_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
DrealMenuItem DrealCreateMenu[] =
{
{
"Abutment Box",
'A',
"Ctrl<Key>A",
"Ctrl A",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackCreateAbutmentBox,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Rectangle ",
't',
"Ctrl<Key>T",
"Ctrl T",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackCreateRectangle,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackCreateRectangle |
| |
\------------------------------------------------------------*/
void CallbackCreateRectangle( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealChangeEditMode( DREAL_CREATE_RECTANGLE,
DrealPromptCreateRectangle );
DrealEnterPanel( &DrealCreateRectanglePanel );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackCreateAbutmentBox |
| |
\------------------------------------------------------------*/
void CallbackCreateAbutmentBox( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
if ( ( DrealFigureRds != (rdsfig_list *)0 ) &&
( ( DrealFigureXAB1 != 0 ) ||
( DrealFigureXAB2 != 0 ) ||
( DrealFigureYAB1 != 0 ) ||
( DrealFigureYAB2 != 0 ) ) )
{
DrealErrorMessage( DrealMainWindow, "There is already one abutment box !");
}
else
{
DrealChangeEditMode( DREAL_CREATE_ABUTMENTBOX,
DrealPromptCreateAbutmentBox );
}
rdsend();
}

View File

@ -0,0 +1,73 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_CREATE_MENU
# define DREAL_CREATE_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackCreateRectangle();
extern void CallbackCreateAbutmentBox();
# endif

View File

@ -0,0 +1,153 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Message.c |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMC.h"
# include "GMC_message.h"
# include "GMC_create.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
static char MessageBuffer[ 512 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealPromptCreateRectangle |
| |
\------------------------------------------------------------*/
void DrealPromptCreateRectangle()
{
char StaticLayer;
StaticLayer = RDS_STATIC_LAYER[ DrealRectangleLayer ];
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Create Rectangle" );
if ( DrealRectangleName == (char *)NULL )
{
sprintf( MessageBuffer, "Layer: %s Name: none",
DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0] );
}
else
{
sprintf( MessageBuffer, "Layer: %s Name: %s",
DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0] ,
DrealRectangleName );
}
DrealDisplayMessage( DREAL_MESSAGE_INFO, MessageBuffer );
switch ( DrealCountEventEdit )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter first point" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter second point" );
}
}
/*------------------------------------------------------------\
| |
| DrealPromptCreateAbutmentBox |
| |
\------------------------------------------------------------*/
void DrealPromptCreateAbutmentBox()
{
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Create Abutmentbox" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select window" );
switch ( DrealCountEventEdit )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter first corner" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter second corner" );
}
}

View File

@ -0,0 +1,73 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Message.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_MESSAGE
# define DREAL_MESSAGE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealPromptCreateRectangle();
extern void DrealPromptCreateAbutmentBox();
# endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,78 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_CREATE_PANEL
# define DREAL_CREATE_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_CREATE_RECTANGLE_X 790
# define DREAL_CREATE_RECTANGLE_Y 330
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackChangeRectangleLayer();
extern void CallbackChangeRectangleName();
extern void CallbackChangeRectangleClose();
# endif

View File

@ -0,0 +1,111 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Gme101.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef DREAL_GME
# define DREAL_GME
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealMenuItem DrealEditMenu[];
extern DrealMenuItem DrealWindowMenu[];
extern DrealPanelItem DrealEditGlobalPanel;
extern DrealPanelItem DrealWindowGlobalPanel;
extern DrealPanelItem DrealEditSearchPanel;
extern DrealPanelItem DrealEditSearchViewPanel;
extern DrealPanelItem DrealEditIdentifyPanel;
extern DrealPanelItem DrealEditSelectPanel;
extern DrealPanelItem DrealModifyRectanglePanel;
extern int DrealEditGlobalDefaultValues[ 5 ];
extern int DrealWindowGlobalDefaultValues[ 5 ];
extern int DrealEditSearchDefaultValues[ 5 ];
extern int DrealEditIdentifyDefaultValues[ 5 ];
extern int DrealEditSelectDefaultValues[ 5 ];
extern int DrealEditSearchViewDefaultValues[ 5 ];
extern int DrealModifyRectangleDefaultValues[ 5 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealBuidlPanelModify();
extern void DrealBuildEditDialog();
extern void DrealEditSelectPointDelete();
extern void DrealEditSelectWindowDelete();
extern void DrealEditSelectPointCopy();
extern void DrealEditSelectWindowCopy();
extern void DrealEditSelectPointMove();
extern void DrealEditSelectWindowMove();
extern void DrealEditSelectPointModify();
extern void DrealEditSelectWindowModify();
extern void DrealEditIdentify();
extern void DrealEditUnselectAll();
extern void DrealEditSelectPoint();
extern void DrealEditSelectWindow();
extern void DrealEditSelectFence();
extern void DrealEditUndo();
extern void DrealEditRedo();
extern void DrealEditCopy();
extern void DrealEditMove();
extern void DrealEditDelete();
extern void DrealEditModify();
extern void DrealEditStretch();
# endif

View File

@ -0,0 +1,286 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.c |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
# include <Xm/SelectioB.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GSB.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GME.h"
# include "GME_dialog.h"
# include "GME_modify.h"
# include "GME_search.h"
# include "GME_edit.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Search Dialog |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Search Rectangle Dialog |
| |
\------------------------------------------------------------*/
DrealDialogItem DrealSearchRectangleDialog =
{
"Rectangle name",
DREAL_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackSearchRectangleOk,
(XtPointer)NULL,
(void *)CallbackSearchRectangleCancel,
(XtPointer)NULL
};
/*------------------------------------------------------------\
| |
| Modify Dialog |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Rectangle Dialog |
| |
\------------------------------------------------------------*/
DrealDialogItem DrealModifyRectangleNameDialog =
{
"Rectangle name",
DREAL_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackModifyRectangleNameOk,
(XtPointer)NULL,
(void *)CallbackModifyRectangleNameCancel,
(XtPointer)NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealBuildEditDialog |
| |
\------------------------------------------------------------*/
void DrealBuildEditDialog()
{
rdsbegin();
DrealBuildDialog( DrealMainWindow, &DrealSearchRectangleDialog );
DrealBuildDialog( DrealMainWindow, &DrealModifyRectangleNameDialog );
DrealBuildDialog( DrealMainWindow, &DrealSearchRectangleDialog );
rdsend();
}
/*------------------------------------------------------------\
| |
| Callback For Dialog |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback For Modify |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackModifyRectangleNameOk |
| |
\------------------------------------------------------------*/
void CallbackModifyRectangleNameOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *NameSet;
rdsbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&NameSet );
XtUnmanageChild( DrealModifyRectangleNameDialog.WIDGET );
DrealExitDialog();
NameSet = DrealPostTreatString( NameSet );
if ( NameSet != (char *)NULL )
{
NameSet = namealloc( NameSet );
}
DrealRectangleMName = NameSet;
DrealPromptModifyRectangle();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackModifyRectangleNameCancel |
| |
\------------------------------------------------------------*/
void CallbackModifyRectangleNameCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
rdsbegin();
XtUnmanageChild( DrealModifyRectangleNameDialog.WIDGET );
DrealExitDialog();
rdsend();
}
/*------------------------------------------------------------\
| |
| Search Callback |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback For Rectangle |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackSearchRectangleOk |
| |
\------------------------------------------------------------*/
void CallbackSearchRectangleOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *NameSet;
rdsbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&NameSet );
XtUnmanageChild( DrealSearchRectangleDialog.WIDGET );
DrealExitDialog();
NameSet = DrealPostTreatString( NameSet );
if ( NameSet != (char *)NULL )
{
NameSet = namealloc( NameSet );
DrealEditSearchRectangle( NameSet );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackSearchRectangleCancel |
| |
\------------------------------------------------------------*/
void CallbackSearchRectangleCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
rdsbegin();
XtUnmanageChild( DrealSearchRectangleDialog.WIDGET );
DrealExitDialog();
rdsend();
}

View File

@ -0,0 +1,83 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_EDIT_DIALOG
# define DREAL_EDIT_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealDialogItem DrealSearchRectangleDialog;
extern DrealDialogItem DrealModifyRectangleNameDialog;
extern DrealDialogItem DrealSearchRectangleDialog;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackModifyRectangleNameOk();
extern void CallbackModifyRectangleNameCancel();
extern void CallbackSearchRectangleOk();
extern void CallbackSearchRectangleCancel();
# endif

View File

@ -0,0 +1,684 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Edit.c |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GME.h"
# include "GME_edit.h"
# include "GME_panel.h"
# include "GME_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Identify Buffer |
| |
\------------------------------------------------------------*/
static char DrealIdentifyMessage[ DREAL_IDENTIFY_MESSAGE_SIZE ];
static char DrealIdentifyBuffer [ DREAL_IDENTIFY_BUFFER_SIZE ];
static char *DrealScanIdentify;
static long DrealIdentifyLength;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealEditTreatUndo |
| |
\------------------------------------------------------------*/
void DrealEditTreatUndo( HeadUndo )
drealundo *HeadUndo;
{
rdsrec_list *Rec;
drealundorec *UndoRec;
char OneElement;
if ( HeadUndo->UNDO->NEXT != (drealundorec *)NULL )
{
OneElement = DREAL_FALSE;
}
else
{
OneElement = (DrealHeadSelect == (drealselect *)NULL);
}
DrealDelSelect();
DrealRecomputeBound = DREAL_TRUE;
for ( UndoRec = HeadUndo->UNDO;
UndoRec != (drealundorec *)NULL;
UndoRec = UndoRec->NEXT )
{
Rec = UndoRec->RECTANGLE;
if ( IsRdsFigure( Rec ) )
{
if ( IsDrealDeleted( Rec ) )
{
ClearDrealDeleted( Rec );
DrealFigureXAB1 = Rec->X;
DrealFigureYAB1 = Rec->Y;
DrealFigureXAB2 = ( Rec->X + Rec->DX );
DrealFigureYAB2 = ( Rec->Y + Rec->DY );
}
else
{
DrealFigureXAB1 = 0;
DrealFigureXAB2 = 0;
DrealFigureYAB1 = 0;
DrealFigureYAB2 = 0;
DrealDeleteRectangle( Rec );
}
OneElement = DREAL_FALSE;
}
else
{
if ( IsDrealDeleted( Rec ) )
{
DrealUndeleteRectangle( Rec );
if ( OneElement ) DrealDisplayRectangle( Rec );
}
else
{
DrealDeleteRectangle( Rec );
if ( OneElement ) DrealDisplayRectangle( Rec );
}
}
}
HeadUndo->UNDO = (drealundorec *)reverse( (chain_list *)HeadUndo->UNDO );
if ( ! OneElement )
{
DrealZoomRefresh();
}
}
/*------------------------------------------------------------\
| |
| DrealEditRedo |
| |
\------------------------------------------------------------*/
void DrealEditRedo()
{
drealundo *NewUndo;
rdsbegin();
if ( DrealHeadRedo != (drealundo *)NULL )
{
DrealEditTreatUndo( DrealHeadRedo );
NewUndo = DrealHeadRedo;
DrealHeadRedo = DrealHeadRedo->NEXT;
NewUndo->NEXT = DrealHeadUndo;
DrealHeadUndo = NewUndo;
}
else
{
DrealWarningMessage( DrealMainWindow, "Nothing to Redo !" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealEditUndo |
| |
\------------------------------------------------------------*/
void DrealEditUndo()
{
drealundo *NewRedo;
rdsbegin();
if ( DrealHeadUndo != (drealundo *)NULL )
{
DrealEditTreatUndo( DrealHeadUndo );
NewRedo = DrealHeadUndo;
DrealHeadUndo = DrealHeadUndo->NEXT;
NewRedo->NEXT = DrealHeadRedo;
DrealHeadRedo = NewRedo;
}
else
{
DrealWarningMessage( DrealMainWindow, "Nothing to undo !" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealAddIdentify |
| |
\------------------------------------------------------------*/
char DrealAddIdentify( Rectangle )
rdsrec_list *Rectangle;
{
rdsins_list *Instance;
char StaticLayer;
long Length;
rdsbegin();
DrealIdentifyBuffer[0] = '\0';
if ( IsRdsInstance( Rectangle ) )
{
Instance = (rdsins_list *)DREAL_PREVIOUS( Rectangle );
sprintf( DrealIdentifyBuffer,
"INSTANCE :\n\n NAME : %s\n MODEL : %s\n TRANSF : %s\n X : %.3f\n Y : %.3f\n\n",
Instance->INSNAME,
Instance->FIGNAME,
RDS_TRANSF_NAME[ Instance->TRANSF ],
Instance->X * DREAL_RDS_UNIT_TO_MICRON,
Instance->Y * DREAL_RDS_UNIT_TO_MICRON );
}
else
if ( IsRdsFigure( Rectangle ) )
{
sprintf( DrealIdentifyBuffer,
"ABUTMENT BOX :\n\n NAME : %s\n X : %.3f\n Y : %.3f\n DX : %.3f\n DY : %.3f\n\n",
Rectangle->NAME,
Rectangle->X * DREAL_RDS_UNIT_TO_MICRON,
Rectangle->Y * DREAL_RDS_UNIT_TO_MICRON,
Rectangle->DX * DREAL_RDS_UNIT_TO_MICRON,
Rectangle->DY * DREAL_RDS_UNIT_TO_MICRON );
}
else
{
StaticLayer = RDS_STATIC_LAYER[ GetRdsLayer( Rectangle ) ];
sprintf( DrealIdentifyBuffer,
"RECTANGLE :\n\n NAME : %s\n LAYER : %s\n X : %.3f\n Y : %.3f\n DX : %.3f\n DY : %.3f\n\n",
( Rectangle->NAME != (char *)NULL ) ? Rectangle->NAME : "None",
DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0],
Rectangle->X * DREAL_RDS_UNIT_TO_MICRON,
Rectangle->Y * DREAL_RDS_UNIT_TO_MICRON,
Rectangle->DX * DREAL_RDS_UNIT_TO_MICRON,
Rectangle->DY * DREAL_RDS_UNIT_TO_MICRON );
}
Length = strlen( DrealIdentifyBuffer );
if ( ( DrealIdentifyLength + Length ) < ( DREAL_IDENTIFY_MESSAGE_SIZE - 1 ) )
{
strcpy( DrealScanIdentify, DrealIdentifyBuffer );
DrealScanIdentify += Length;
DrealIdentifyLength += Length;
rdsend();
return( DREAL_TRUE );
}
strcpy( DrealScanIdentify, "#" );
rdsend();
return( DREAL_FALSE );
}
/*------------------------------------------------------------\
| |
| DrealEditIdentify |
| |
\------------------------------------------------------------*/
void DrealEditIdentify()
{
drealselect *Select;
rdsbegin();
strcpy( DrealIdentifyMessage, "No element found !" );
DrealScanIdentify = DrealIdentifyMessage;
DrealIdentifyLength = 0;
for ( Select = DrealHeadSelect;
Select != (drealselect *)NULL;
Select = Select->NEXT )
{
if ( ! DrealAddIdentify( Select->RECTANGLE ) ) break;
}
DrealDelSelect();
DrealDisplayIdentifyMessage( DrealIdentifyMessage );
DrealEnterPanel( &DrealEditIdentifyPanel );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealEditCopy |
| |
\------------------------------------------------------------*/
void DrealEditCopy( LambdaX1, LambdaY1, LambdaX2, LambdaY2, Mode )
long LambdaX1;
long LambdaY1;
long LambdaX2;
long LambdaY2;
char Mode;
{
drealselect *Select;
rdsrec_list *Rectangle;
rdsrec_list *NewRec;
char FirstUndo;
long DeltaX;
long DeltaY;
long X;
long Y;
long DX;
long DY;
rdsbegin();
DeltaX = ( LambdaX2 - LambdaX1 ) * RDS_PHYSICAL_GRID;
DeltaY = ( LambdaY2 - LambdaY1 ) * RDS_PHYSICAL_GRID;
FirstUndo = 1;
for ( Select = DrealHeadSelect;
Select != (drealselect *)NULL;
Select = Select->NEXT )
{
Rectangle = Select->RECTANGLE;
if ( ! IsRdsFigure( Rectangle ) )
{
if ( FirstUndo )
{
DrealAddUndo();
FirstUndo = 0;
}
X = Rectangle->X + DeltaX;
Y = Rectangle->Y + DeltaY;
DX = Rectangle->DX;
DY = Rectangle->DY;
NewRec = DrealAddRectangle( Rectangle->NAME,
GetRdsLayer( Rectangle ),
X, Y, DX, DY );
DrealAddUndoRec( NewRec );
}
}
DrealDelSelect();
DrealZoomRefresh();
if ( Mode == 0 )
{
DrealChangeEditMode( DREAL_SELECT_POINT_COPY,
DrealPromptSelectPointCopy );
}
else
{
DrealChangeEditMode( DREAL_SELECT_WINDOW_COPY,
DrealPromptSelectWindowCopy );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealEditMove |
| |
\------------------------------------------------------------*/
void DrealEditMove( LambdaX1, LambdaY1, LambdaX2, LambdaY2, Mode )
long LambdaX1;
long LambdaY1;
long LambdaX2;
long LambdaY2;
char Mode;
{
drealselect *Select;
rdsrec_list *Rectangle;
rdsrec_list *NewRec;
char FirstUndo;
long DeltaX;
long DeltaY;
long X;
long Y;
long DX;
long DY;
rdsbegin();
DeltaX = ( LambdaX2 - LambdaX1 ) * RDS_PHYSICAL_GRID;
DeltaY = ( LambdaY2 - LambdaY1 ) * RDS_PHYSICAL_GRID;
FirstUndo = 1;
for ( Select = DrealHeadSelect;
Select != (drealselect *)NULL;
Select = Select->NEXT )
{
Rectangle = Select->RECTANGLE;
if ( ! IsDrealAccepted( Rectangle ) ) continue;
if ( IsRdsFigRec( Rectangle ) )
{
if ( FirstUndo )
{
DrealAddUndo();
FirstUndo = 0;
}
DrealDeleteRectangle( Rectangle );
DrealAddUndoRec( Rectangle );
X = Rectangle->X + DeltaX;
Y = Rectangle->Y + DeltaY;
DX = Rectangle->DX;
DY = Rectangle->DY;
if ( IsRdsFigure( Rectangle ) )
{
NewRec = DrealAddAbox( X, Y, DX, DY );
}
else
{
NewRec = DrealAddRectangle( Rectangle->NAME,
GetRdsLayer( Rectangle ),
X, Y, DX, DY );
}
DrealAddUndoRec( NewRec );
}
}
DrealDelSelect();
DrealZoomRefresh();
if ( Mode == 0 )
{
DrealChangeEditMode( DREAL_SELECT_POINT_MOVE,
DrealPromptSelectPointMove );
}
else
{
DrealChangeEditMode( DREAL_SELECT_WINDOW_MOVE,
DrealPromptSelectWindowMove );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealEditDelete |
| |
\------------------------------------------------------------*/
void DrealEditDelete()
{
drealselect *Select;
rdsrec_list *Rectangle;
char FirstUndo;
rdsbegin();
FirstUndo = 1;
for ( Select = DrealHeadSelect;
Select != (drealselect *)NULL;
Select = Select->NEXT )
{
Rectangle = Select->RECTANGLE;
if ( ! IsDrealAccepted( Rectangle ) ) continue;
if ( IsRdsFigRec( Rectangle ) )
{
if ( FirstUndo )
{
DrealAddUndo();
FirstUndo = 0;
}
if ( IsRdsFigure( Rectangle ) )
{
DrealFigureXAB1 = 0;
DrealFigureXAB2 = 0;
DrealFigureYAB1 = 0;
DrealFigureYAB2 = 0;
}
DrealDeleteRectangle( Rectangle );
DrealAddUndoRec( Rectangle );
}
}
DrealDelSelect();
DrealZoomRefresh();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealEditStretch |
| |
\------------------------------------------------------------*/
void DrealEditStretch( LambdaX1, LambdaY1, LambdaX2, LambdaY2 )
long LambdaX1;
long LambdaY1;
long LambdaX2;
long LambdaY2;
{
drealselect *Select;
rdsrec_list *Rectangle;
rdsrec_list *NewRec;
char Orient;
char FirstUndo;
long Delta;
long X;
long Y;
long DX;
long DY;
rdsbegin();
Orient = 0;
if ( LambdaX2 != LambdaX1 )
{
Delta = LambdaX2 - LambdaX1;
Orient = ( Delta > 0 ) ? DREAL_EAST : DREAL_WEST;
}
else
{
Delta = LambdaY2 - LambdaY1;
Orient = ( Delta > 0 ) ? DREAL_NORTH : DREAL_SOUTH;
}
Delta = Delta * RDS_PHYSICAL_GRID;
LambdaX1 = LambdaX1 * RDS_PHYSICAL_GRID;
LambdaY1 = LambdaY1 * RDS_PHYSICAL_GRID;
if ( Delta != 0 )
{
FirstUndo = 1;
for ( Select = DrealHeadSelect;
Select != (drealselect *)NULL;
Select = Select->NEXT )
{
Rectangle = Select->RECTANGLE;
if ( IsRdsFigRec( Rectangle ) )
{
X = Rectangle->X;
Y = Rectangle->Y;
DX = Rectangle->DX;
DY = Rectangle->DY;
switch ( Orient )
{
case DREAL_NORTH :
case DREAL_SOUTH :
if ( LambdaY1 >= (Y + (DY >> 1)) )
{
DY += Delta;
}
else
{
Y += Delta; DY -= Delta;
}
break;
case DREAL_WEST :
case DREAL_EAST :
if ( LambdaX1 <= (X + (DX >> 1)) )
{
X += Delta; DX -= Delta;
}
else
{
DX += Delta;
}
break;
}
if ( ( DX > 0 ) &&
( DY > 0 ) )
{
if ( FirstUndo )
{
DrealAddUndo();
FirstUndo = 0;
}
DrealDeleteRectangle( Rectangle );
DrealAddUndoRec( Rectangle );
if ( IsRdsFigure( Rectangle ) )
{
NewRec = DrealAddAbox( X, Y, DX, DY );
}
else
{
NewRec = DrealAddRectangle( Rectangle->NAME,
GetRdsLayer( Rectangle ),
X, Y, DX, DY );
}
DrealAddUndoRec( NewRec );
}
}
}
}
DrealDelSelect();
DrealZoomRefresh();
DrealChangeEditMode( DREAL_SELECT_POINT_STRETCH,
DrealPromptSelectPointStretch );
rdsend();
}

View File

@ -0,0 +1,68 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Edit.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
# ifndef DREAL_EDIT
# define DREAL_EDIT
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_IDENTIFY_BUFFER_SIZE 256
# define DREAL_IDENTIFY_MESSAGE_SIZE 4096
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,609 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.c |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GSB.h"
# include "GTB.h"
# include "GRD.h"
# include "GMV.h"
# include "GME.h"
# include "GMX.h"
# include "GME_menu.h"
# include "GME_edit.h"
# include "GME_modify.h"
# include "GME_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
DrealMenuItem DrealEditMenu[] =
{
{
"Undo",
'U',
"Ctrl<Key>U",
"Ctrl U",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditUndo,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Redo",
'R',
"Ctrl<Key>R",
"Ctrl R",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditRedo,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Copy",
'C',
"Ctrl<Key>C",
"Ctrl C",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditCopy,
(XtPointer)0,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Move",
'M',
"Ctrl<Key>M",
"Ctrl M",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditMove,
(XtPointer)0,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Delete",
'D',
"Ctrl<Key>D",
"Ctrl D",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditDelete,
(XtPointer)0,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Stretch",
'S',
"Ctrl<Key>S",
"Ctrl S",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditStretch,
(XtPointer)0,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Modify ",
'y',
"Ctrl<Key>Y",
"Ctrl Y",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditModify,
(XtPointer)0,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Identify",
'I',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditIdentify,
(XtPointer)0,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Search ",
'h',
"Ctrl<Key>H",
"Ctrl H",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditSearch,
(XtPointer)0,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
NULL
};
DrealMenuItem DrealWindowMenu[] =
{
{
"Undo",
'U',
"Meta<Key>U",
"Meta U",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditUndo,
(XtPointer)1,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Redo",
'R',
"Meta<Key>R",
"Meta R",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditRedo,
(XtPointer)1,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Copy",
'C',
"Meta<Key>C",
"Meta C",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditCopy,
(XtPointer)1,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Move",
'M',
"Meta<Key>M",
"Meta M",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditMove,
(XtPointer)1,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Delete",
'D',
"Meta<Key>D",
"Meta D",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditDelete,
(XtPointer)1,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Modify ",
'y',
"Meta<Key>Y",
"Meta Y",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditModify,
(XtPointer)1,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Identify ",
'I',
"Meta<Key>I",
"Meta I",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditIdentify,
(XtPointer)1,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackEditIdentify |
| |
\------------------------------------------------------------*/
void CallbackEditIdentify( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
if ( ClientData )
{
DrealEnterPanel( &DrealWindowGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_WINDOW_IDENTIFY,
DrealPromptSelectWindowIdentify );
}
else
{
DrealEnterPanel( &DrealEditGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_POINT_IDENTIFY,
DrealPromptSelectPointIdentify );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackEditCopy |
| |
\------------------------------------------------------------*/
void CallbackEditCopy( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
if ( ClientData )
{
DrealEnterPanel( &DrealWindowGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_WINDOW_COPY,
DrealPromptSelectWindowCopy );
}
else
{
DrealEnterPanel( &DrealEditGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_POINT_COPY,
DrealPromptSelectPointCopy );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackEditMove |
| |
\------------------------------------------------------------*/
void CallbackEditMove( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
if ( ClientData )
{
DrealEnterPanel( &DrealWindowGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_WINDOW_MOVE,
DrealPromptSelectWindowMove );
}
else
{
DrealEnterPanel( &DrealEditGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_POINT_MOVE,
DrealPromptSelectPointMove );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackEditDelete |
| |
\------------------------------------------------------------*/
void CallbackEditDelete( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
if ( ClientData )
{
DrealEnterPanel( &DrealWindowGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_WINDOW_DELETE,
DrealPromptSelectWindowDelete );
}
else
{
DrealEnterPanel( &DrealEditGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_POINT_DELETE,
DrealPromptSelectPointDelete );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackEditStretch |
| |
\------------------------------------------------------------*/
void CallbackEditStretch( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEnterPanel( &DrealEditGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_POINT_STRETCH,
DrealPromptSelectPointStretch );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackEditModify |
| |
\------------------------------------------------------------*/
void CallbackEditModify( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
if ( ClientData )
{
DrealEnterPanel( &DrealWindowGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_WINDOW_MODIFY,
DrealPromptSelectWindowModify );
}
else
{
DrealEnterPanel( &DrealEditGlobalPanel );
DrealChangeEditMode( DREAL_SELECT_POINT_MODIFY,
DrealPromptSelectPointModify );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackEditSearch |
| |
\------------------------------------------------------------*/
void CallbackEditSearch( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEnterPanel( &DrealEditSearchPanel );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackEditUndo |
| |
\------------------------------------------------------------*/
void CallbackEditUndo( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEditUndo();
if ( ClientData )
{
DrealEnterPanel( &DrealWindowGlobalPanel );
}
else
{
DrealEnterPanel( &DrealEditGlobalPanel );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackEditRedo |
| |
\------------------------------------------------------------*/
void CallbackEditRedo( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEditRedo();
if ( ClientData )
{
DrealEnterPanel( &DrealWindowGlobalPanel );
}
else
{
DrealEnterPanel( &DrealEditGlobalPanel );
}
rdsend();
}

View File

@ -0,0 +1,80 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_MENU
# define DREAL_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackEditUndo();
extern void CallbackEditRedo();
extern void CallbackEditCopy();
extern void CallbackEditMove();
extern void CallbackEditDelete();
extern void CallbackEditStretch();
extern void CallbackEditModify();
extern void CallbackEditIdentify();
extern void CallbackEditSearch();
# endif

View File

@ -0,0 +1,468 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Message.c |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GME.h"
# include "GME_modify.h"
# include "GME_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
static char MessageBuffer[ 512 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealPromptSelectPointIdentify |
| |
\------------------------------------------------------------*/
void DrealPromptSelectPointIdentify()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE , "Identify" );
DrealDisplayMessage( DREAL_MESSAGE_INFO , "Select object" );
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter select point" );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptSelectWindowIdentify |
| |
\------------------------------------------------------------*/
void DrealPromptSelectWindowIdentify()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Identify" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select window" );
switch ( DrealCountEventEdit )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter first corner" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter next corner" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptSelectPointCopy |
| |
\------------------------------------------------------------*/
void DrealPromptSelectPointCopy()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE , "Copy" );
DrealDisplayMessage( DREAL_MESSAGE_INFO , "Select object" );
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter select point" );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptSelectWindowCopy |
| |
\------------------------------------------------------------*/
void DrealPromptSelectWindowCopy()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Copy" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select window" );
switch ( DrealCountEventEdit )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter first corner" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter next corner" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptEditCopy |
| |
\------------------------------------------------------------*/
void DrealPromptEditCopy()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Copy" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select vector" );
switch ( DrealCountEventEdit )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter source point" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter target point" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptSelectPointMove |
| |
\------------------------------------------------------------*/
void DrealPromptSelectPointMove()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE , "Move" );
DrealDisplayMessage( DREAL_MESSAGE_INFO , "Select object" );
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter select point" );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptSelectWindowMove |
| |
\------------------------------------------------------------*/
void DrealPromptSelectWindowMove()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Move" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select window" );
switch ( DrealCountEventEdit )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter first corner" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter next corner" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptEditMove |
| |
\------------------------------------------------------------*/
void DrealPromptEditMove()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Move" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select vector" );
switch ( DrealCountEventEdit )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter source point" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter target point" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptSelectPointDelete |
| |
\------------------------------------------------------------*/
void DrealPromptSelectPointDelete()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE , "Delete" );
DrealDisplayMessage( DREAL_MESSAGE_INFO , "Select object" );
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter select point" );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptSelectWindowDelete |
| |
\------------------------------------------------------------*/
void DrealPromptSelectWindowDelete()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Delete" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select window" );
switch ( DrealCountEventEdit )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter first corner" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter next corner" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptSelectPointStretch |
| |
\------------------------------------------------------------*/
void DrealPromptSelectPointStretch()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE , "Stretch" );
DrealDisplayMessage( DREAL_MESSAGE_INFO , "Select object" );
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter select point" );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptEditStretch |
| |
\------------------------------------------------------------*/
void DrealPromptEditStretch()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Stretch" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select vector" );
switch ( DrealCountEventEdit )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter source point" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter target point" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptSelectPointModify |
| |
\------------------------------------------------------------*/
void DrealPromptSelectPointModify()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE , "Modify" );
DrealDisplayMessage( DREAL_MESSAGE_INFO , "Select object" );
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter select point" );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptSelectWindowModify |
| |
\------------------------------------------------------------*/
void DrealPromptSelectWindowModify()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Modify" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select window" );
switch ( DrealCountEventEdit )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter first corner" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter next corner" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptModifyRectangle |
| |
\------------------------------------------------------------*/
void DrealPromptModifyRectangle()
{
char StaticLayer;
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Modify Rectangle" );
StaticLayer = RDS_STATIC_LAYER[ DrealRectangleMLayer ];
if ( DrealRectangleMName == (char *)NULL )
{
sprintf( MessageBuffer, "Layer: %s Name: none",
DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0] );
}
else
{
sprintf( MessageBuffer, "Layer: %s Name: %s",
DREAL_RDS_LAYER_NAME_TABLE[ StaticLayer ][0] ,
DrealRectangleMName );
}
DrealDisplayMessage( DREAL_MESSAGE_INFO, MessageBuffer );
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter new properties for this rectangle" );
rdsend();
}

View File

@ -0,0 +1,89 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Message.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_MESSAGE
# define DREAL_MESSAGE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealPromptSelectPointIdentify();
extern void DrealPromptSelectPointCopy();
extern void DrealPromptSelectPointMove();
extern void DrealPromptSelectPointDelete();
extern void DrealPromptSelectPointStretch();
extern void DrealPromptSelectPointModify();
extern void DrealPromptSelectWindowIdentify();
extern void DrealPromptSelectWindowCopy();
extern void DrealPromptSelectWindowMove();
extern void DrealPromptSelectWindowDelete();
extern void DrealPromptSelectWindowModify();
extern void DrealPromptEditCopy();
extern void DrealPromptEditMove();
extern void DrealPromptEditStretch();
extern void DrealPromptModifyRectangle();
# endif

View File

@ -0,0 +1,207 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Modify.c |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GSB.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GME.h"
# include "GME_modify.h"
# include "GME_panel.h"
# include "GME_edit.h"
# include "GME_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
char DrealModifyAbort = 0;
char DrealModifyLock = 0;
char DrealModifyApply = 0;
/*------------------------------------------------------------\
| |
| Rectangle |
| |
\------------------------------------------------------------*/
char DrealRectangleMLayer;
char *DrealRectangleMName;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Changed Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealRectangleChanged |
| |
\------------------------------------------------------------*/
char DrealRectangleChanged( Rectangle )
rdsrec_list *Rectangle;
{
return
( ( Rectangle->NAME != DrealRectangleMName ) ||
( GetRdsLayer( Rectangle ) != DrealRectangleMLayer ) );
}
/*------------------------------------------------------------\
| |
| DrealEditModify |
| |
\------------------------------------------------------------*/
void DrealEditModify()
{
drealselect *Select;
rdsrec_list *Rectangle;
rdsrec_list *NewRec;
char FirstUndo;
rdsbegin();
FirstUndo = 1;
DrealModifyAbort = 0;
DrealModifyApply = 0;
DrealModifyLock = 0;
for ( Select = DrealHeadSelect;
Select != (drealselect *)NULL;
Select = Select->NEXT )
{
Rectangle = Select->RECTANGLE;
if ( ( IsRdsFigRec( Rectangle ) ) &&
( ! IsRdsFigure( Rectangle ) ) )
{
DrealAcceptRectangle( Rectangle );
DrealDisplayRectangle( Rectangle );
DrealRectangleMLayer = GetRdsLayer( Rectangle );
DrealRectangleMName = Rectangle->NAME;
DrealPromptModifyRectangle();
DrealEnterPanel( &DrealModifyRectanglePanel );
DrealModifyLock = DREAL_TRUE;
while ( DrealModifyLock )
{
DrealLimitedLoop( DrealModifyRectanglePanel.PANEL );
}
DrealRejectRectangle( Rectangle );
DrealDisplayRectangle( Rectangle );
if ( DrealModifyAbort ) break;
if ( DrealModifyApply )
{
if ( ! DrealRectangleChanged( Rectangle ) )
continue;
if ( FirstUndo )
{
DrealAddUndo();
FirstUndo = 0;
}
DrealDeleteRectangle( Rectangle );
DrealAddUndoRec( Rectangle );
NewRec = DrealAddRectangle( DrealRectangleMName,
DrealRectangleMLayer,
Rectangle->X , Rectangle->Y,
Rectangle->DX, Rectangle->DY );
DrealAddUndoRec( NewRec );
DrealDisplayRectangle( NewRec );
}
}
}
DrealExitPanel( &DrealModifyRectanglePanel );
DrealDelSelect();
DrealZoomRefresh();
rdsend();
}

View File

@ -0,0 +1,84 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Modify.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
# ifndef DREAL_MODIFY
# define DREAL_MODIFY
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern char DrealModifyAbort;
extern char DrealModifyLock;
extern char DrealModifyApply;
/*------------------------------------------------------------\
| |
| Lock |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Rectangle |
| |
\------------------------------------------------------------*/
extern char DrealRectangleMLayer;
extern char *DrealRectangleMName;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,121 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_EDIT_PANEL
# define DREAL_EDIT_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_WINDOW_GLOBAL_X 690
# define DREAL_WINDOW_GLOBAL_Y 205
# define DREAL_EDIT_GLOBAL_X 890
# define DREAL_EDIT_GLOBAL_Y 205
# define DREAL_EDIT_SEARCH_X 890
# define DREAL_EDIT_SEARCH_Y 450
# define DREAL_EDIT_VIEW_SEARCH_X 790
# define DREAL_EDIT_VIEW_SEARCH_Y 450
# define DREAL_EDIT_SELECT_X 330
# define DREAL_EDIT_SELECT_Y 280
# define DREAL_EDIT_IDENTIFY_X 330
# define DREAL_EDIT_IDENTIFY_Y 280
# define DREAL_MODIFY_RECTANGLE_X 790
# define DREAL_MODIFY_RECTANGLE_Y 330
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackEditGlobalUndo();
extern void CallbackEditGlobalRedo();
extern void CallbackEditGlobalCopy();
extern void CallbackEditGlobalMove();
extern void CallbackEditGlobalDelete();
extern void CallbackEditGlobalStretch();
extern void CallbackEditGlobalModify();
extern void CallbackEditGlobalIdentify();
extern void CallbackEditCloseGlobal();
extern void CallbackEditSearchRectangle();
extern void CallbackEditCloseSearch();
extern void CallbackEditCloseIdentify();
extern void CallbackEditSelectList();
extern void CallbackEditSelectAccept();
extern void CallbackEditSelectCancel();
extern void CallbackEditSearchViewContinue();
extern void CallbackEditSearchViewAbort();
extern void CallbackModifyRectangleLayer();
extern void CallbackModifyRectangleName();
extern void CallbackModifyRectangleApply();
extern void CallbackModifyRectangleCancel();
extern void DrealDisplayIdentifyMessage();
extern void DrealDisplaySelectList();
# endif

View File

@ -0,0 +1,221 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Search.c |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GSB.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GMV.h"
# include "GME.h"
# include "GME_search.h"
# include "GME_panel.h"
# include "GME_edit.h"
# include "GME_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
char DrealSearchAbort;
int DrealSearchNumber;
char *DrealSearchString;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealEditInitializeSearch |
| |
\------------------------------------------------------------*/
void DrealEditInitializeSearch( Name )
char *Name;
{
char *Star;
rdsbegin();
Star = strrchr( Name, '*' );
if ( Star != (char *)NULL )
{
DrealSearchNumber = (int)(Star - Name);
}
else
{
DrealSearchNumber = 0;
}
DrealSearchString = Name;
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealEditSearchCompare |
| |
\------------------------------------------------------------*/
int DrealEditSearchCompare( Name )
char *Name;
{
if ( Name != (char *)NULL )
{
if ( DrealSearchNumber )
{
return( ! strncmp( DrealSearchString, Name, DrealSearchNumber ) );
}
else
{
return( Name == DrealSearchString );
}
}
return( 0 );
}
/*------------------------------------------------------------\
| |
| DrealEditSearchRectangle |
| |
\------------------------------------------------------------*/
void DrealEditSearchRectangle( RectangleName )
char *RectangleName;
{
drealsearch *Search;
rdsins_list *Instance;
rdsfig_list *Figure;
rdsrec_list *Rec;
char Layer;
long X1;
long Y1;
if ( DrealFigureRds == (rdsfig_list *)NULL ) return;
rdsbegin();
DrealEditInitializeSearch( RectangleName );
for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ )
{
for ( Rec = DrealFigureRds->LAYERTAB[ Layer ];
Rec != (rdsrec_list *)NULL;
Rec = Rec->NEXT )
{
if ( ( ! IsDrealDeleted( Rec ) ) &&
( DrealEditSearchCompare( Rec->NAME ) ) )
{
DrealAddSearch( Rec );
}
}
}
if ( DrealHeadSearch == (drealsearch *)NULL )
{
DrealWarningMessage( DrealMainWindow, "No rectangle found !" );
}
else
{
for ( Search = DrealHeadSearch;
Search != (drealsearch *)NULL;
Search = Search->NEXT )
{
Rec = Search->RECTANGLE;
X1 = ( Rec->X + ( Rec->DX >> 1 ) ) / RDS_PHYSICAL_GRID;
Y1 = ( Rec->Y + ( Rec->DY >> 1 ) ) / RDS_PHYSICAL_GRID;
DrealZoomCenter( X1, Y1 );
if ( Search->NEXT != (drealsearch *)NULL )
{
DrealSearchAbort = DREAL_FALSE;
DrealEnterPanel( &DrealEditSearchViewPanel );
DrealLimitedLoop( DrealEditSearchViewPanel.PANEL );
if ( DrealSearchAbort ) break;
}
}
DrealDelSearch();
DrealExitPanel( &DrealEditSearchViewPanel );
}
rdsend();
}

View File

@ -0,0 +1,69 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Search.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
# ifndef DREAL_SEARCH
# define DREAL_SEARCH
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern char DrealSearchAbort;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealEditSearchRectangle();
# endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Select.h |
| |
| Author : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
# ifndef DREAL_SELECT
# define DREAL_SELECT
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_SELECT_BUFFER_SIZE 256
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealEditSelectRectangle();
# endif

View File

@ -0,0 +1,77 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : gmf101.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include files |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef DREAL_GMF
# define DREAL_GMF
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealMenuItem DrealFileMenu [];
extern char *DREAL_WORK_LIB;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealBuildFileDialog();
extern void DrealBuildPanelLibrary();
# endif

View File

@ -0,0 +1,315 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
# include <Xm/SelectioB.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMF.h"
# include "GMF_dialog.h"
# include "GMF_file.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| File Dialog |
| |
\------------------------------------------------------------*/
DrealDialogItem DrealFileOpenDialog =
{
"Open File",
DREAL_DIALOG_FILE,
(Widget)NULL,
(void *)CallbackFileOpenOk,
(XtPointer)NULL,
(void *)CallbackFileOpenCancel,
(XtPointer)NULL
};
DrealDialogItem DrealFileQuitDialog =
{
"Do you really want to quit Dreal ?",
DREAL_DIALOG_WARNING,
(Widget)NULL,
(void *)CallbackFileQuitOk,
(XtPointer)NULL,
(void *)CallbackFileQuitCancel,
(XtPointer)NULL
};
DrealDialogItem DrealFileSaveAsDialog =
{
"Save As",
DREAL_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackFileSaveAsOk,
(XtPointer)NULL,
(void *)CallbackFileSaveAsCancel,
(XtPointer)NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealBuildFileDialog |
| |
\------------------------------------------------------------*/
void DrealBuildFileDialog()
{
rdsbegin();
DrealBuildDialog( DrealMainWindow, &DrealFileSaveAsDialog );
DrealBuildDialog( DrealMainWindow, &DrealFileOpenDialog );
DrealBuildDialog( DrealMainWindow, &DrealFileQuitDialog );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackFileQuitOk |
| |
\------------------------------------------------------------*/
void CallbackFileQuitOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealExitDialog();
if ( DrealHeadUndo != (drealundo *)NULL )
{
CallbackFileSaveAs( NULL, NULL, NULL );
DrealHeadUndo = (drealundo *)0;
}
XtCloseDisplay( XtDisplay( XtParent( MyWidget ) ) );
DrealExitErrorMessage( 0 );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackFileSaveAsOk |
| |
\------------------------------------------------------------*/
void CallbackFileSaveAsOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *FileName;
rdsbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&FileName );
FileName = DrealPostTreatString( FileName );
XtUnmanageChild( DrealFileSaveAsDialog.WIDGET );
DrealExitDialog();
DrealFileSaveAs( FileName );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackFileSaveAsCancel |
| |
\------------------------------------------------------------*/
void CallbackFileSaveAsCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
rdsbegin();
XtUnmanageChild( DrealFileSaveAsDialog.WIDGET );
DrealExitDialog();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackFileQuitCancel |
| |
\------------------------------------------------------------*/
void CallbackFileQuitCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealExitDialog();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackFileOpenOk |
| |
\------------------------------------------------------------*/
void CallbackFileOpenOk( MyWidget, ClientData, FileStruct )
Widget MyWidget;
caddr_t ClientData;
XmFileSelectionBoxCallbackStruct *FileStruct;
{
char *FileName;
rdsbegin();
XtUnmanageChild( DrealFileOpenDialog.WIDGET );
DrealExitDialog();
if ( FileStruct->value != NULL )
{
XmStringGetLtoR( FileStruct->value,
XmSTRING_DEFAULT_CHARSET,
&FileName
);
FileName = DrealPostTreatString( FileName );
if ( FileName != (char *)NULL )
{
if ( DrealHeadUndo != (drealundo *)NULL )
{
CallbackFileSaveAs( NULL, NULL, NULL );
}
DrealFileOpen( FileName );
DrealChangeEditMode( DREAL_EDIT_MEASURE,
DrealPromptEditMeasure );
}
else
{
DrealErrorMessage( DrealMainWindow, "Unable to load this file !" );
}
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackFileOpenCancel |
| |
\------------------------------------------------------------*/
void CallbackFileOpenCancel( MyWidget, ClientData, FileStruct )
Widget MyWidget;
caddr_t ClientData;
XmFileSelectionBoxCallbackStruct *FileStruct;
{
rdsbegin();
XtUnmanageChild( DrealFileOpenDialog.WIDGET );
DrealExitDialog();
rdsend();
}

View File

@ -0,0 +1,82 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_FILE_DIALOG
# define DREAL_FILE_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealDialogItem DrealFileOpenDialog;
extern DrealDialogItem DrealFileQuitDialog;
extern DrealDialogItem DrealFileSaveAsDialog;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackFileQuitOk();
extern void CallbackFileQuitCancel();
extern void CallbackFileOpenOk();
extern void CallbackFileOpenCancel();
extern void CallbackFileSaveAsOk();
extern void CallbackFileSaveAsCancel();
# endif

View File

@ -0,0 +1,319 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : File.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
# include <Xm/SelectioB.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMF.h"
# include "GMF_file.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
char DrealFileFilter[ 10 ] = "*.";
char DrealFileExtention[ 10 ] = ".";
char DrealFileBuffer[ 128 ];
char DrealDirectoryBuffer[ 512 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealFileNew |
| |
\------------------------------------------------------------*/
void DrealFileNew()
{
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
if ( DrealFigureRds != (rdsfig_list *)NULL )
{
DrealDelSelect();
DrealDelFigure();
}
DrealChangeTopLevelTitle( (char *)NULL );
DrealRecomputeBound = DREAL_TRUE;
DrealInitializeZoom();
DrealInitializeUndo();
DrealClearGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0,
DrealGraphicDx, DrealGraphicDy );
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealFileSave |
| |
\------------------------------------------------------------*/
void DrealFileSave()
{
char Ok;
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
Ok = DrealSaveFigure();
DrealDisplayToolsMessage();
if ( ! Ok )
{
DrealErrorMessage( DrealMainWindow, "Unable to save this figure !" );
}
DrealInitializeUndo();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealFileSaveAs |
| |
\------------------------------------------------------------*/
void DrealFileSaveAs( FileName )
char *FileName;
{
rdsins_list *InstanceRds;
rdsrec_list *Rectangle;
char Ok;
rdsbegin();
if ( FileName == (char *)NULL )
{
FileName = DrealFigureRds->NAME;
}
else
{
FileName = namealloc( FileName );
}
for ( InstanceRds = DrealFigureRds->INSTANCE;
InstanceRds != (rdsins_list *)NULL;
InstanceRds = InstanceRds->NEXT )
{
if ( InstanceRds->FIGNAME == FileName ) break;
}
if ( InstanceRds != (rdsins_list *)NULL )
{
DrealErrorMessage( DrealMainWindow,
"A figure cannot be part of itself !" );
}
else
{
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealFigureRds->NAME = FileName;
DrealChangeTopLevelTitle( DrealFigureRds->NAME );
for ( Rectangle = DrealFigureRds->LAYERTAB[ RDS_ABOX ];
Rectangle != (rdsrec_list *)0;
Rectangle = Rectangle->NEXT )
{
Rectangle->NAME = FileName;
}
Ok = DrealSaveFigure();
DrealDisplayToolsMessage();
if ( ! Ok )
{
DrealErrorMessage( DrealMainWindow, "Unable to save this figure !" );
}
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
}
DrealInitializeUndo();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealFileOpen |
| |
\------------------------------------------------------------*/
void DrealFileOpen( FileName )
char *FileName;
{
char *Directory;
char *File;
int Index;
char *SWAP_WORK_LIB = WORK_LIB;
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealUndisplayCursor();
if ( DrealFigureRds != (rdsfig_list *)NULL )
{
DrealDelSelect();
DrealInitializeUndo();
DrealDelFigure();
}
DrealRecomputeBound = DREAL_TRUE;
if ( DREAL_WORK_LIB == (char *)NULL )
{
DREAL_WORK_LIB = WORK_LIB;
}
for ( Index = strlen( FileName ); Index >= 0; Index-- )
{
if ( FileName[ Index ] == '/' ) break;
}
if ( Index >= 0 )
{
strcpy( DrealDirectoryBuffer, FileName );
strcpy( DrealFileBuffer, FileName + Index + 1);
DrealDirectoryBuffer[ Index + 1 ] = '\0';
WORK_LIB = DrealDirectoryBuffer;
}
else
{
strcpy( DrealFileBuffer, FileName );
WORK_LIB = DREAL_WORK_LIB;
}
Index = strlen( DrealFileBuffer ) - strlen( DrealFileExtention );
if ( Index >= 0 )
{
if ( ! strcmp( DrealFileBuffer + Index, DrealFileExtention ) )
{
DrealFileBuffer[ Index ] = '\0';
}
}
DrealAddFigure( DrealFileBuffer );
DrealInitializeUndo();
DrealDisplayToolsMessage();
if ( DrealFigureRds == (rdsfig_list *)NULL )
{
DrealErrorMessage( DrealMainWindow, "Unable to open this figure !" );
DrealChangeTopLevelTitle( (char *)NULL );
DrealInitializeZoom();
DrealClearGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
}
else
{
DrealChangeTopLevelTitle( DrealFigureRds->NAME );
DrealInitializeZoom();
DrealDisplayFigure( 0, 0, DrealGraphicDx, DrealGraphicDy );
}
DrealRefreshGraphicWindow( 0, 0,
DrealGraphicDx, DrealGraphicDy );
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
DrealDisplayCursor();
WORK_LIB = SWAP_WORK_LIB;
rdsend();
}

View File

@ -0,0 +1,79 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : File.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_FILE
# define DREAL_FILE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern char DrealFileFilter[ 10 ];
extern char DrealFileExtention[ 10 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealFileNew();
extern void DrealFileSave();
extern void DrealFileOpen();
extern void DrealFileSaveAs();
# endif

View File

@ -0,0 +1,328 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
# include <Xm/SelectioB.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rtl.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMF.h"
# include "GMF_menu.h"
# include "GMF_dialog.h"
# include "GMF_file.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Menu |
| |
\------------------------------------------------------------*/
DrealMenuItem DrealFileMenu[] =
{
{
"New",
'N',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackFileNew,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Open",
'O',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackFileOpen,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Save ",
'S',
"Ctrl<Key>W",
"Ctrl W",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackFileSave,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Save As",
'A',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackFileSaveAs,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Quit ",
'Q',
"Ctrl<Key>Q",
"Ctrl Q",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackFileQuit,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackFileNew |
| |
\------------------------------------------------------------*/
void CallbackFileNew( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
if ( DrealHeadUndo != (drealundo *)NULL )
{
CallbackFileSaveAs( NULL, NULL, NULL );
}
DrealFileNew();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackFileOpen |
| |
\------------------------------------------------------------*/
void CallbackFileOpen( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
XmString Filter;
rdsbegin();
if ( DrealFileFilter[2] == '\0' )
{
strcat( DrealFileFilter, RDS_IN );
strcat( DrealFileExtention, RDS_IN );
Filter = XmStringCreateSimple( DrealFileFilter );
XtVaSetValues( DrealFileOpenDialog.WIDGET,
XmNpattern, Filter, NULL);
XmStringFree( Filter );
}
DrealEnterDialog( &DrealFileOpenDialog );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackFileSave |
| |
\------------------------------------------------------------*/
void CallbackFileSave( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
if ( DrealFigureRds != (rdsfig_list *)NULL )
{
if ( ( DrealFigureRds->NAME == (char *)NULL ) ||
( ! strcmp( DrealFigureRds->NAME,
DREAL_DEFAULT_FIGURE_NAME ) ) )
{
CallbackFileSaveAs( NULL, NULL, NULL );
}
else
{
DrealFileSave();
}
}
else
{
DrealErrorMessage( DrealMainWindow, "No current figure !" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackFileSaveAs |
| |
\------------------------------------------------------------*/
void CallbackFileSaveAs( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
Arg Args;
XmString SaveAsString;
rdsbegin();
if ( DrealFigureRds == (rdsfig_list *)NULL )
{
DrealErrorMessage( DrealMainWindow, "No current figure !" );
}
else
{
SaveAsString = XmStringCreateLtoR( DrealFigureRds->NAME,
XmSTRING_DEFAULT_CHARSET );
XtVaSetValues( DrealFileSaveAsDialog.WIDGET,
XmNtextString, SaveAsString, NULL );
XmStringFree( SaveAsString );
DrealEnterDialog( &DrealFileSaveAsDialog );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackFileQuit |
| |
\------------------------------------------------------------*/
void CallbackFileQuit( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEnterDialog( &DrealFileQuitDialog );
rdsend();
}

View File

@ -0,0 +1,76 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_FILE_MENU
# define DREAL_FILE_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackFileNew();
extern void CallbackFileOpen();
extern void CallbackFileSave();
extern void CallbackFileSaveAs();
extern void CallbackFileQuit();
# endif

View File

@ -0,0 +1,829 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/Form.h>
# include <Xm/LabelG.h>
# include <Xm/Label.h>
# include <Xm/Frame.h>
# include <Xm/List.h>
# include <Xm/Text.h>
# include <Xm/PushB.h>
# include <Xm/FileSB.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMF.h"
# include "GMF_panel.h"
# include "GMF_dialog.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
DrealPanelItem DrealLibraryPanel =
{
"Library",
1,
0,
DREAL_LIBRARY_X,
DREAL_LIBRARY_Y,
250,
375,
1,
1,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
0,
(DrealPanelButtonItem *)NULL
};
int DrealLibraryDefaultValues[ 5 ] =
{
DREAL_LIBRARY_X,
DREAL_LIBRARY_Y,
250, 375, 0
};
static char **DREAL_CATA_LIB = (char **)NULL;
static char *DREAL_DEFAULT_LIB = (char *)NULL;
char *DREAL_WORK_LIB = (char *)NULL;
static char DrealFirstLibrary = 1;
/*------------------------------------------------------------\
| |
| Buffer |
| |
\------------------------------------------------------------*/
static char *LibraryBuffer = (char *)NULL;
/*------------------------------------------------------------\
| |
| Widget For Library Panel |
| |
\------------------------------------------------------------*/
Widget DrealLibraryListLabel;
Widget DrealLibraryList;
Widget DrealLibraryButtonOk;
Widget DrealLibraryButtonUpdate;
Widget DrealLibraryButtonCancel;
Widget DrealLibraryCataLabel;
Widget DrealLibraryCata;
Widget DrealLibraryWorkLabel;
Widget DrealLibraryWork;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealIsDirectory |
| |
\------------------------------------------------------------*/
char DrealIsDirectory( FileName )
char *FileName;
{
struct stat Buffer;
rdsbegin();
if ( stat( FileName, &Buffer ) != -1 )
{
if ( ( Buffer.st_mode & S_IFMT ) == S_IFDIR )
{
rdsend();
return( 1 );
}
}
rdsend();
return( 0 );
}
/*------------------------------------------------------------\
| |
| DrealSetLibraryList |
| |
\------------------------------------------------------------*/
void DrealSetLibraryList()
{
int Index;
XmString Label;
rdsbegin();
XmListDeleteAllItems( DrealLibraryList );
for ( Index = 0;
DREAL_CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
Label = XmStringCreateSimple( DREAL_CATA_LIB[ Index ] );
XmListAddItem( DrealLibraryList , Label , 0 );
XmStringFree( Label );
}
Label = XmStringCreateSimple( DREAL_WORK_LIB );
XmListAddItem( DrealLibraryList , Label , 0 );
XmStringFree( Label );
DREAL_DEFAULT_LIB = (char *)NULL;
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealSetWorkLibrary |
| |
\------------------------------------------------------------*/
void DrealSetWorkLibrary()
{
rdsbegin();
XmTextSetString( DrealLibraryWork, DREAL_WORK_LIB );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealSetCataLibrary |
| |
\------------------------------------------------------------*/
void DrealSetCataLibrary()
{
int Index;
long Length;
char *Buffer;
char *Scan;
rdsbegin();
for ( Index = 0, Length = 0;
DREAL_CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
Length = Length + strlen( DREAL_CATA_LIB[ Index ] ) + 1;
}
Buffer = rdsallocblock( Length + 1 );
Scan = Buffer;
for ( Index = 0;
DREAL_CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
strcpy( Scan, DREAL_CATA_LIB[ Index ] );
strcat( Scan, "\n" );
Scan = Scan + strlen( Scan );
}
XmTextSetString( DrealLibraryCata, Buffer );
rdsfreeblock( Buffer );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealInitializeLibrary |
| |
\------------------------------------------------------------*/
void DrealInitializeLibrary()
{
int Index;
rdsbegin();
for ( Index = 0; CATA_LIB[ Index ] != (char *)NULL; Index++ );
DREAL_CATA_LIB = (char **)rdsallocblock( sizeof(char *) * ( Index + 1 ));
for ( Index = 0;
CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
DREAL_CATA_LIB[ Index ] = rdsallocblock( strlen( CATA_LIB[ Index ] ) + 1 );
strcpy( DREAL_CATA_LIB[ Index ], CATA_LIB[ Index ] );
}
DREAL_CATA_LIB[ Index ] = (char *)NULL;
DREAL_WORK_LIB = rdsallocblock( strlen( WORK_LIB ) + 1 );
strcpy( DREAL_WORK_LIB, WORK_LIB );
DrealSetCataLibrary();
DrealSetWorkLibrary();
DrealSetLibraryList();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealGetCataLibrary |
| |
\------------------------------------------------------------*/
void DrealGetCataLibrary()
{
char *NewCata;
char *Scan;
int Index;
int Count;
int Length;
rdsbegin();
for ( Index = 0;
DREAL_CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
rdsfreeblock( DREAL_CATA_LIB[ Index ] );
}
rdsfreeblock( DREAL_CATA_LIB );
NewCata = XmTextGetString( DrealLibraryCata );
Count = 1;
for ( Index = 0; NewCata[ Index ] != '\0'; Index++ )
{
if ( NewCata[ Index ] == '\n' )
{
Count = Count + 1;
}
}
DREAL_CATA_LIB = (char **)rdsallocblock( sizeof(char *) * ( Count + 1 ));
Count = 0;
Scan = NewCata;
for ( Index = 0; NewCata[ Index ] != '\0'; Index++ )
{
if ( NewCata[ Index ] == '\n' )
{
NewCata[ Index ] = '\0';
Length = strlen( Scan );
if ( ( Length > 0 ) &&
( DrealIsDirectory( Scan ) ) )
{
DREAL_CATA_LIB[ Count ] = rdsallocblock( Length + 1 );
strcpy( DREAL_CATA_LIB[ Count ], Scan );
Count = Count + 1;
}
Scan = NewCata + Index + 1;
}
else
if ( NewCata[ Index ] == ' ' )
{
NewCata[ Index ] = '\0';
}
}
Length = strlen( Scan );
if ( Length > 0 )
{
DREAL_CATA_LIB[ Count ] = rdsallocblock( Length + 1 );
strcpy( DREAL_CATA_LIB[ Count ], Scan );
Count = Count + 1;
}
DREAL_CATA_LIB[ Count ] = (char *)NULL;
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealGetWorkLibrary |
| |
\------------------------------------------------------------*/
void DrealGetWorkLibrary()
{
char *NewWork;
rdsbegin();
rdsfreeblock( DREAL_WORK_LIB );
NewWork = XmTextGetString( DrealLibraryWork );
if ( DrealIsDirectory( NewWork ) )
{
DREAL_WORK_LIB = rdsallocblock( strlen( NewWork ) + 1 );
strcpy( DREAL_WORK_LIB, NewWork );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackLibraryList |
| |
\------------------------------------------------------------*/
void CallbackLibraryList( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmListCallbackStruct *CallData;
{
rdsbegin();
DREAL_DEFAULT_LIB = DREAL_CATA_LIB[ CallData->item_position - 1 ];
if ( DREAL_DEFAULT_LIB == (char *)NULL )
{
DREAL_DEFAULT_LIB = DREAL_WORK_LIB;
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackLibraryOk |
| |
\------------------------------------------------------------*/
void CallbackLibraryOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
XmString Label;
int Index;
rdsbegin();
DrealExitPanel( &DrealLibraryPanel );
DrealExitDialog();
if ( DrealFirstLibrary == 0 )
{
for ( Index = 0;
CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
rdsfreeblock( CATA_LIB[ Index ] );
}
rdsfreeblock( CATA_LIB );
rdsfreeblock( WORK_LIB );
}
DrealFirstLibrary = 0;
CATA_LIB = DREAL_CATA_LIB;
WORK_LIB = DREAL_WORK_LIB;
if ( DREAL_DEFAULT_LIB != (char *)NULL )
{
Label = XmStringCreateSimple( DREAL_DEFAULT_LIB );
XtVaSetValues( DrealFileOpenDialog.WIDGET,
XmNdirectory, Label, NULL );
XmStringFree( Label );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackLibraryUpdate |
| |
\------------------------------------------------------------*/
void CallbackLibraryUpdate( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealGetCataLibrary();
DrealGetWorkLibrary();
DrealSetLibraryList();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackLibraryCancel |
| |
\------------------------------------------------------------*/
void CallbackLibraryCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
int Index;
rdsbegin();
for ( Index = 0;
DREAL_CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
rdsfreeblock( DREAL_CATA_LIB[ Index ] );
}
rdsfreeblock( DREAL_CATA_LIB );
rdsfreeblock( DREAL_WORK_LIB );
XtUnmanageChild( DrealLibraryPanel.PANEL );
DrealExitDialog();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackEnterLibrary |
| |
\------------------------------------------------------------*/
void CallbackEnterLibrary( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealInitializeLibrary();
DrealEnterPanel( &DrealLibraryPanel );
DrealLimitedLoop( DrealLibraryPanel.PANEL );
DrealReEnterDialog();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealBuildPanelLibrary |
| |
\------------------------------------------------------------*/
void DrealBuildPanelLibrary()
{
Arg Args[15];
XmString Label;
rdsbegin();
XtSetArg( Args[0], XmNshadowType , XmSHADOW_ETCHED_IN );
XtSetArg( Args[1], XmNdeleteResponse, XmDO_NOTHING );
XtSetArg( Args[2], XmNtitle , DrealLibraryPanel.TITLE );
DrealLibraryPanel.PANEL =
XmCreateFormDialog( DrealMainWindow, "DrealLibraryPanel", Args, 3);
XtAddCallback( DrealLibraryPanel.PANEL, XmNdestroyCallback,
DrealDestroyDialogCallback, NULL );
DrealLibraryPanel.PANEL_FORM =
XtVaCreateManagedWidget( "DrealLibraryPanelForm",
xmFormWidgetClass,
DrealLibraryPanel.PANEL,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
XmNfractionBase , 10,
NULL
);
DrealLibraryPanel.FRAME =
XtVaCreateManagedWidget( "DrealLibraryFrame",
xmFrameWidgetClass,
DrealLibraryPanel.PANEL_FORM,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
NULL
);
DrealLibraryPanel.FORM =
XtVaCreateManagedWidget( "DrealLibraryForm",
xmFormWidgetClass,
DrealLibraryPanel.FRAME,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
XmNfractionBase , 120,
NULL
);
DrealLibraryButtonUpdate =
XtVaCreateManagedWidget( "Update",
xmPushButtonWidgetClass,
DrealLibraryPanel.FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 10,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 40,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 105,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 115,
NULL
);
DrealLibraryButtonOk =
XtVaCreateManagedWidget( "Ok",
xmPushButtonWidgetClass,
DrealLibraryPanel.FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 50,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 70,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 105,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 115,
NULL
);
DrealLibraryButtonCancel =
XtVaCreateManagedWidget( "Cancel",
xmPushButtonWidgetClass,
DrealLibraryPanel.FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 80,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 110,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 105,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 115,
NULL
);
Label = XmStringCreateSimple( "Directories" );
DrealLibraryListLabel =
XtVaCreateManagedWidget( "DrealLibraryListLabel",
xmLabelGadgetClass ,
DrealLibraryPanel.FORM,
XmNlabelString , Label,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 5,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 5,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 10,
NULL );
XmStringFree( Label );
XtSetArg( Args[0] , XmNtopAttachment , XmATTACH_POSITION );
XtSetArg( Args[1] , XmNtopPosition , 10 );
XtSetArg( Args[2] , XmNbottomAttachment , XmATTACH_POSITION );
XtSetArg( Args[3] , XmNbottomPosition , 40 );
XtSetArg( Args[4] , XmNrightAttachment , XmATTACH_POSITION );
XtSetArg( Args[5] , XmNrightPosition , 115 );
XtSetArg( Args[6] , XmNleftAttachment , XmATTACH_POSITION );
XtSetArg( Args[7] , XmNleftPosition , 5 );
XtSetArg( Args[8] , XmNscrollBarDisplayPolicy, XmSTATIC );
XtSetArg( Args[9] , XmNscrollHorizontal , True );
XtSetArg( Args[10] , XmNscrollVertical , True );
XtSetArg( Args[11] , XmNlistSizePolicy , XmCONSTANT );
DrealLibraryList =
XmCreateScrolledList( DrealLibraryPanel.FORM,
"DrealLibraryList", Args, 12 );
Label = XmStringCreateSimple( "Catalog libraries" );
DrealLibraryCataLabel =
XtVaCreateManagedWidget( "DrealLibraryCataLabel",
xmLabelGadgetClass ,
DrealLibraryPanel.FORM,
XmNlabelString , Label,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 5,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 45,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 50,
NULL );
XmStringFree( Label );
XtSetArg( Args[0] , XmNrows , 4 );
XtSetArg( Args[1] , XmNeditable , True );
XtSetArg( Args[2] , XmNcursorPositionVisible , True );
XtSetArg( Args[3] , XmNscrollHorizontal , True );
XtSetArg( Args[4] , XmNscrollVertical , True );
XtSetArg( Args[5] , XmNeditMode , XmMULTI_LINE_EDIT );
XtSetArg( Args[6] , XmNtopAttachment , XmATTACH_POSITION );
XtSetArg( Args[7] , XmNtopPosition , 50 );
XtSetArg( Args[8] , XmNleftAttachment , XmATTACH_POSITION );
XtSetArg( Args[9] , XmNleftPosition , 5 );
XtSetArg( Args[10] , XmNrightAttachment , XmATTACH_POSITION );
XtSetArg( Args[11] , XmNrightPosition , 115 );
XtSetArg( Args[12] , XmNbottomAttachment , XmATTACH_POSITION );
XtSetArg( Args[13] , XmNbottomPosition , 80 );
DrealLibraryCata =
XmCreateScrolledText( DrealLibraryPanel.FORM,
"DrealLibraryCata", Args, 14 );
Label = XmStringCreateSimple( "Work library" );
DrealLibraryWorkLabel =
XtVaCreateManagedWidget( "DrealLibraryWorkLabel",
xmLabelGadgetClass ,
DrealLibraryPanel.FORM,
XmNlabelString , Label,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 5,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 85,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 90,
NULL );
XmStringFree( Label );
XtSetArg( Args[0] , XmNrows , 1 );
XtSetArg( Args[1] , XmNeditable , True );
XtSetArg( Args[2] , XmNeditMode , XmSINGLE_LINE_EDIT );
XtSetArg( Args[3] , XmNscrollHorizontal , False );
XtSetArg( Args[4] , XmNscrollVertical , False );
XtSetArg( Args[5] , XmNcursorPositionVisible , True );
XtSetArg( Args[6] , XmNtopAttachment , XmATTACH_POSITION );
XtSetArg( Args[7] , XmNtopPosition , 90 );
XtSetArg( Args[8] , XmNleftAttachment , XmATTACH_POSITION );
XtSetArg( Args[9] , XmNleftPosition , 5 );
XtSetArg( Args[10] , XmNrightAttachment , XmATTACH_POSITION );
XtSetArg( Args[11] , XmNrightPosition , 115 );
XtSetArg( Args[12] , XmNbottomAttachment , XmATTACH_POSITION );
XtSetArg( Args[13] , XmNbottomPosition , 100 );
DrealLibraryWork =
XmCreateText( DrealLibraryPanel.FORM,
"DrealLibraryWork", Args, 14 );
XtManageChild( DrealLibraryWork );
XtManageChild( DrealLibraryList );
XtManageChild( DrealLibraryCata );
XtAddCallback( DrealLibraryList,
XmNdefaultActionCallback,
CallbackLibraryList, NULL );
XtAddCallback( DrealLibraryButtonOk,
XmNactivateCallback,
CallbackLibraryOk, NULL );
XtAddCallback( DrealLibraryButtonCancel,
XmNactivateCallback,
CallbackLibraryCancel, NULL );
XtAddCallback( DrealLibraryButtonUpdate,
XmNactivateCallback,
CallbackLibraryUpdate, NULL );
XtVaSetValues( DrealLibraryPanel.PANEL,
XmNheight, DrealLibraryPanel.HEIGHT,
XmNwidth , DrealLibraryPanel.WIDTH,
XmNx , DrealLibraryPanel.X,
XmNy , DrealLibraryPanel.Y,
NULL );
Label = XmStringCreateSimple( "Library" );
XtVaSetValues( XmFileSelectionBoxGetChild( DrealFileOpenDialog.WIDGET,
XmDIALOG_HELP_BUTTON ),
XmNlabelString, Label, NULL );
XmStringFree( Label );
XtAddCallback( XmFileSelectionBoxGetChild( DrealFileOpenDialog.WIDGET,
XmDIALOG_HELP_BUTTON ),
XmNactivateCallback,
CallbackEnterLibrary, NULL );
rdsend();
}

View File

@ -0,0 +1,80 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_FILE_PANEL
# define DREAL_FILE_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_LIBRARY_X 100
# define DREAL_LIBRARY_Y 230
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackLibraryList();
extern void CallbackLibraryOk();
extern void CallbackLibraryUpdate();
extern void CallbackLibraryCancel();
extern void CallbackEnterLibrary();
# endif

View File

@ -0,0 +1,74 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : GMH101.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef DREAL_GMH
# define DREAL_GMH
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealMenuItem DrealHelpMenu[];
extern DrealPanelItem DrealHelpPresentPanel;
extern int DrealHelpPresentDefaultValues[5];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealBuildPresentPanel();
extern void DrealEnterPresentPanel();
# endif

View File

@ -0,0 +1,79 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Help.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GTB.h"
# include "GSB.h"
# include "GMH.h"
# include "GMX.h"
# include "GMH_help.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/

View File

@ -0,0 +1,70 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Help.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_HELP
# define DREAL_HELP
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,126 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GTB.h"
# include "GSB.h"
# include "GMH.h"
# include "GMX.h"
# include "GMH_menu.h"
# include "GMH_panel.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Help Menu |
| |
\------------------------------------------------------------*/
DrealMenuItem DrealHelpMenu[] =
{
{
"About Dreal",
'G',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackHelpAbout,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackHelpAbout |
| |
\------------------------------------------------------------*/
void CallbackHelpAbout( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEnterPresentPanel();
rdsend();
}

View File

@ -0,0 +1,73 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_HELP_MENU
# define DREAL_HELP_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackHelpAbout();
# endif

View File

@ -0,0 +1,322 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.c |
| |
| Authors : Venot Frederic and Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <X11/Intrinsic.h>
# include <Xm/Xm.h>
# include <Xm/Frame.h>
# include <Xm/Form.h>
# include <Xm/List.h>
# include <Xm/Text.h>
# include <Xm/TextF.h>
# include <Xm/PushB.h>
# include <Xm/DialogS.h>
# include <Xm/Label.h>
# include <Xm/LabelG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GSB.h"
# include "GTB.h"
# include "GMX.h"
# include "GMH.h"
# include "GMH_panel.h"
# include "LIP6bw.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
DrealPanelItem DrealHelpPresentPanel =
{
"Dreal present",
1,
0,
DREAL_HELP_PRESENT_X,
DREAL_HELP_PRESENT_Y,
700,
360,
1,
1,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
0,
(DrealPanelButtonItem *)NULL
};
int DrealHelpPresentDefaultValues[ 5 ] =
{
DREAL_HELP_PRESENT_X,
DREAL_HELP_PRESENT_Y,
700, 360, 0
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealBuildPresentPanel |
| |
\------------------------------------------------------------*/
void DrealBuildPresentPanel()
{
Widget PanelLabel;
Widget PanelButton;
Pixmap PanelPixmap;
XmString PanelString;
XmString PanelString1;
XmString PanelString2;
XmFontList PanelFontList;
XFontStruct *PanelFont;
Display *PanelDisplay;
char Buffer[ 64 ];
Arg Args[3];
rdsbegin();
PanelDisplay = XtDisplay( DrealMainWindow );
PanelFont = XLoadQueryFont( PanelDisplay, "-*-helvetica-bold-o-*--24-*" );
PanelFontList = XmFontListCreate( PanelFont, "Panel_charset1" );
PanelFont = XLoadQueryFont( PanelDisplay, "-*-helvetica-bold-r-*--18-*" );
PanelFontList = XmFontListAdd( PanelFontList, PanelFont, "Panel_charset2" );
PanelFont = XLoadQueryFont( PanelDisplay, "-*-helvetica-bold-r-*--12-*" );
PanelFontList = XmFontListAdd( PanelFontList, PanelFont, "Panel_charset4" );
XtSetArg( Args[0], XmNshadowType , XmSHADOW_ETCHED_IN );
XtSetArg( Args[1], XmNdeleteResponse, XmDO_NOTHING );
XtSetArg( Args[2], XmNtitle , "Dreal present" );
DrealHelpPresentPanel.PANEL =
XmCreateFormDialog( DrealMainWindow, DrealHelpPresentPanel.TITLE, Args, 3);
XtAddCallback( DrealHelpPresentPanel.PANEL, XmNdestroyCallback,
DrealDestroyDialogCallback, NULL );
DrealHelpPresentPanel.PANEL_FORM =
XtVaCreateManagedWidget( "",
xmFormWidgetClass,
DrealHelpPresentPanel.PANEL,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
NULL
);
DrealHelpPresentPanel.FRAME =
XtVaCreateManagedWidget( "",
xmFrameWidgetClass,
DrealHelpPresentPanel.PANEL_FORM,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 05,
XmNbottomAttachment, XmATTACH_POSITION,
XmNbottomPosition , 95,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 05,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 95,
NULL
);
DrealHelpPresentPanel.FORM =
XtVaCreateManagedWidget( "",
xmFormWidgetClass,
DrealHelpPresentPanel.FRAME,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 05,
XmNbottomAttachment, XmATTACH_POSITION,
XmNbottomPosition , 95,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 05,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 95,
NULL
);
PanelPixmap = DrealCreatePixmap( DrealMainWindow,
LIP6bw_bits,
LIP6bw_width,
LIP6bw_height);
PanelLabel = XtVaCreateManagedWidget( "",
xmLabelGadgetClass,
DrealHelpPresentPanel.FORM,
XmNlabelType , XmPIXMAP,
XmNlabelPixmap , PanelPixmap,
NULL
);
sprintf( Buffer, "ALLIANCE CAD SYSTEM %s\n", ALLIANCE_VERSION );
PanelString = XmStringCreateLtoR( Buffer, "Panel_charset2" );
PanelLabel = XtVaCreateManagedWidget( "",
xmLabelWidgetClass,
DrealHelpPresentPanel.FORM,
XmNfontList , PanelFontList,
XmNlabelString , PanelString,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 15,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 75,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 25,
NULL
);
XmStringFree( PanelString );
PanelString1 = XmStringCreateLtoR( "Dreal" , "Panel_charset1" );
PanelString2 = XmStringCreateLtoR( "\n( Click On IT )", "Panel_charset4" );
PanelString = XmStringConcat( PanelString1, PanelString2 );
PanelButton = XtVaCreateManagedWidget( "",
xmPushButtonWidgetClass,
DrealHelpPresentPanel.FORM,
XmNfontList , PanelFontList,
XmNlabelString , PanelString,
XmNshadowThickness , 3,
XmNtopAttachment , XmATTACH_WIDGET,
XmNtopWidget , PanelLabel,
XmNtopOffset , 5,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 60,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 40,
NULL
);
XmStringFree( PanelString );
XmStringFree( PanelString1 );
XmStringFree( PanelString2 );
XtAddCallback( PanelButton,
XmNactivateCallback,
DrealExitDialogCallback, NULL );
sprintf( Buffer, "\nDesign Real layout\nVersion %s", DREAL_VERSION );
PanelString = XmStringCreateLtoR( Buffer, "Panel_charset2" );
PanelLabel = XtVaCreateManagedWidget( "",
xmLabelWidgetClass,
DrealHelpPresentPanel.FORM,
XmNfontList , PanelFontList,
XmNlabelString , PanelString,
XmNtopAttachment , XmATTACH_WIDGET,
XmNtopWidget , PanelButton,
XmNtopOffset , 5,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 75,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 25,
NULL
);
XmStringFree( PanelString );
PanelString = XmStringCreateLtoR( "copyright \251 1995-2000 ASIM, \
CAO-VLSI Team\nWritten by Ludovic Jacomme\nE-mail support: alliance-support@asim.lip6.fr", "Panel_charset4" );
PanelLabel = XtVaCreateManagedWidget( "",
xmLabelWidgetClass,
DrealHelpPresentPanel.FORM,
XmNfontList , PanelFontList,
XmNlabelString , PanelString,
XmNtopAttachment , XmATTACH_WIDGET,
XmNtopWidget , PanelLabel,
XmNtopOffset , 5,
XmNrightAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
NULL
);
XmStringFree( PanelString );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealEnterPresentPanel |
| |
\------------------------------------------------------------*/
void DrealEnterPresentPanel()
{
rdsbegin();
DrealEnterPanel( &DrealHelpPresentPanel );
DrealLimitedLoop( DrealHelpPresentPanel.PANEL );
DrealExitPanel( &DrealHelpPresentPanel );
rdsend();
}

View File

@ -0,0 +1,74 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.h |
| |
| Authors : Venot Frederic and Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_HELP_PANEL
# define DREAL_HELP_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_HELP_PRESENT_X 180
# define DREAL_HELP_PRESENT_Y 200
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,80 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : GMS101.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef DREAL_GMS
# define DREAL_GMS
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealMenuItem DrealSetupMenu[];
extern DrealPanelItem DrealSetupInformationsPanel;
extern int DrealSetupInformationsDefaultValues[ 5 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackSetupLoadConfig();
extern void CallbackSetupSaveConfig();
extern void CallbackSetupDefaultConfig();
extern void CallbackSetupInformations();
extern void DrealLoadConfig();
extern void DrealLoadTopLevelConfig();
# endif

View File

@ -0,0 +1,84 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
# include <Xm/SelectioB.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMS.h"
# include "GMS_dialog.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/

View File

@ -0,0 +1,70 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_SETUP_DIALOG
# define DREAL_SETUP_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,231 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GTB.h"
# include "GSB.h"
# include "GMS.h"
# include "GMS_menu.h"
# include "GMS_setup.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
DrealMenuItem DrealSetupMenu[] =
{
{
"Default Config",
'D',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackSetupDefaultConfig,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Load Config",
'L',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackSetupLoadConfig,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Save Config",
'S',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackSetupSaveConfig,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Informations",
'I',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackSetupInformations,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackSetupLoadConfig |
| |
\------------------------------------------------------------*/
void CallbackSetupLoadConfig( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealLoadConfig( DREAL_TRUE );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackSetupSaveConfig |
| |
\------------------------------------------------------------*/
void CallbackSetupSaveConfig( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealSaveConfig();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackSetupDefaultConfig |
| |
\------------------------------------------------------------*/
void CallbackSetupDefaultConfig( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealDefaultConfig();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackSetupInformations |
| |
\------------------------------------------------------------*/
void CallbackSetupInformations( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealDisplayInformations();
rdsend();
}

View File

@ -0,0 +1,70 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_SETUP_MENU
# define DREAL_SETUP_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,175 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
# include <Xm/SelectioB.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GTB.h"
# include "GSB.h"
# include "GRD.h"
# include "GMS.h"
# include "GMS_panel.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Panel |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Panel Informations |
| |
\------------------------------------------------------------*/
DrealPanelButtonItem DrealSetupInformationsButton[] =
{
{
"Text",
"Nothing", NULL, 0, 0,
NULL,
NULL,
0, 0,
8, 9,
NULL,
(XtPointer)NULL,
(Widget)NULL
}
,
{
"Close",
NULL, NULL, 0, 0,
NULL,
NULL,
3, 9,
2, 1,
DrealExitDialogCallback,
(XtPointer)NULL,
(Widget)NULL
}
};
DrealPanelItem DrealSetupInformationsPanel =
{
"Informations",
1,
0,
DREAL_SETUP_INFORMATIONS_X,
DREAL_SETUP_INFORMATIONS_Y,
360,
250,
8,
10,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
2,
DrealSetupInformationsButton
};
int DrealSetupInformationsDefaultValues[ 5 ] =
{
DREAL_SETUP_INFORMATIONS_X,
DREAL_SETUP_INFORMATIONS_Y,
360, 250, 0
};
/*------------------------------------------------------------\
| |
| Callback For Informations |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealDisplayInformations |
| |
\------------------------------------------------------------*/
void DrealDisplayInformations()
{
char *Message;
rdsbegin();
Message = DrealGetInformations();
XmTextSetString( DrealSetupInformationsButton[0].BUTTON, Message );
DrealEnterPanel( &DrealSetupInformationsPanel );
DrealLimitedLoop( DrealSetupInformationsPanel.PANEL );
DrealExitPanel( &DrealSetupInformationsPanel );
rdsend();
}

View File

@ -0,0 +1,76 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_SETUP_PANEL
# define DREAL_SETUP_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_SETUP_INFORMATIONS_X 330
# define DREAL_SETUP_INFORMATIONS_Y 280
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealDisplayInformations();
# endif

View File

@ -0,0 +1,556 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Setup.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GTB.h"
# include "GSB.h"
# include "GMX.h"
# include "GMF.h"
# include "GMV.h"
# include "GME.h"
# include "GMC.h"
# include "GMT.h"
# include "GMS.h"
# include "GMH.h"
# include "GMS_setup.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
static FILE *FileConfig;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Set Panel New Values |
| |
\------------------------------------------------------------*/
void DrealSetPanelValues( Panel, Values )
DrealPanelItem *Panel;
int *Values;
{
rdsbegin();
Panel->COMPUTE = 1;
Panel->X = Values[0];
Panel->Y = Values[1];
Panel->WIDTH = Values[2];
Panel->HEIGHT = Values[3];
Panel->MANAGED = Values[4];
XtVaSetValues( Panel->PANEL,
XmNx , Values[0],
XmNy , Values[1],
XmNwidth , Values[2],
XmNheight , Values[3],
NULL );
if ( Panel->MANAGED )
{
DrealEnterPanel( Panel );
}
else
{
XtUnmanageChild( Panel->PANEL );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| Write TopLevel Values |
| |
\------------------------------------------------------------*/
void DrealWriteTopLevelValues()
{
Dimension Values[5];
rdsbegin();
XtVaGetValues( DrealTopLevel,
XmNx , &Values[0],
XmNy , &Values[1],
XmNwidth , &Values[2],
XmNheight , &Values[3],
NULL );
Values[0] = Values[0] - DREAL_TOPLEVEL_TRANSLATE_X;
Values[1] = Values[1] - DREAL_TOPLEVEL_TRANSLATE_Y;
Values[4] = 1;
fprintf( FileConfig, "VERSION: %s\n", DREAL_VERSION );
fprintf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n",
Values[0], Values[1], Values[2], Values[3], Values[4] );
rdsend();
}
/*------------------------------------------------------------\
| |
| Write Panel Values |
| |
\------------------------------------------------------------*/
void DrealWritePanelValues( Panel )
DrealPanelItem *Panel;
{
Dimension Values[5];
rdsbegin();
if ( Panel->COMPUTE == 0 )
{
XtVaGetValues( Panel->PANEL,
XmNx , &Values[0],
XmNy , &Values[1],
XmNwidth , &Values[2],
XmNheight , &Values[3],
NULL );
Values[0] = Values[0] - DREAL_PANEL_TRANSLATE_X;
Values[1] = Values[1] - DREAL_PANEL_TRANSLATE_Y;
}
else
{
Values[0] = Panel->X;
Values[1] = Panel->Y;
Values[2] = Panel->WIDTH;
Values[3] = Panel->HEIGHT;
}
Values[2] /= Panel->COLUMN;
Values[3] /= Panel->ROW;
Values[4] = Panel->MANAGED;
fprintf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n",
Values[0], Values[1], Values[2], Values[3], Values[4] );
rdsend();
}
/*------------------------------------------------------------\
| |
| Read Panel Values |
| |
\------------------------------------------------------------*/
void DrealReadPanelValues( Panel )
DrealPanelItem *Panel;
{
int Values[5];
rdsbegin();
fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n",
&Values[0], &Values[1], &Values[2], &Values[3], &Values[4] );
Values[2] *= Panel->COLUMN;
Values[3] *= Panel->ROW;
DrealSetPanelValues( Panel, Values );
rdsend();
}
/*------------------------------------------------------------\
| |
| Read Panel Values |
| |
\------------------------------------------------------------*/
char DrealReadTopLevelValues()
{
int Values[5];
char Version[64];
rdsbegin();
fscanf( FileConfig, "VERSION: %s\n", Version );
if ( strcmp( Version, DREAL_VERSION ) )
{
rdsend();
return( 0 );
}
fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n",
&Values[0], &Values[1], &Values[2], &Values[3], &Values[4] );
XtVaSetValues( DrealTopLevel,
XmNx , Values[0],
XmNy , Values[1],
XmNwidth , Values[2],
XmNheight , Values[3],
NULL );
rdsend();
return( 1 );
}
/*------------------------------------------------------------\
| |
| ReadActiveLayers |
| |
\------------------------------------------------------------*/
void DrealReadActiveLayers()
{
char Layer;
int Value;
rdsbegin();
for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ )
{
fscanf( FileConfig, "ACTIVE: %d\n", &Value );
if ( ( DREAL_RDS_LAYER_NAME_TABLE[ Layer ][ 0 ] != (char *)NULL ) &&
( RDS_DYNAMIC_LAYER[ Layer ] != RDS_LAYER_UNUSED ) )
{
DREAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = Value;
}
else
{
DREAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = -1;
}
}
for ( Layer = 0; Layer < DREAL_MAX_ACTIVE_NAME; Layer++ )
{
fscanf( FileConfig, "ACTIVE: %d\n", &Value );
DREAL_RDS_ACTIVE_NAME_TABLE[ Layer ] = Value;
}
fscanf( FileConfig, "FILLMODE: %d\n", &Value );
DREAL_FILL_MODE = Value;
fscanf( FileConfig, "INTERFACE: %d\n", &Value );
DREAL_INSTANCE_INTERFACE = Value;
rdsend();
}
/*------------------------------------------------------------\
| |
| WriteActiveLayers |
| |
\------------------------------------------------------------*/
void DrealWriteActiveLayers()
{
char Layer;
int Value;
rdsbegin();
for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ )
{
fprintf( FileConfig, "ACTIVE: %d\n",
( DREAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] != 0 ) );
}
for ( Layer = 0; Layer < DREAL_MAX_ACTIVE_NAME; Layer++ )
{
fprintf( FileConfig, "ACTIVE: %d\n",
DREAL_RDS_ACTIVE_NAME_TABLE[ Layer ] );
}
fprintf( FileConfig, "FILLMODE: %d\n",
DREAL_FILL_MODE );
fprintf( FileConfig, "INTERFACE: %d\n",
DREAL_INSTANCE_INTERFACE );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealDefaultTopLevelValues |
| |
\------------------------------------------------------------*/
void DrealDefaultTopLevelValues()
{
rdsbegin();
XtVaSetValues( DrealTopLevel,
XmNheight , DREAL_TOPLEVEL_HEIGHT,
XmNwidth , DREAL_TOPLEVEL_WIDTH,
XmNx , DREAL_TOPLEVEL_X,
XmNy , DREAL_TOPLEVEL_Y,
NULL
);
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealDefaultConfig |
| |
\------------------------------------------------------------*/
void DrealDefaultConfig()
{
char Layer;
rdsbegin();
DrealDefaultTopLevelValues();
DrealSetPanelValues( &DrealViewArrowsPanel,
DrealViewArrowsDefaultValues );
DrealSetPanelValues( &DrealViewZoomPanel,
DrealViewZoomDefaultValues );
DrealSetPanelValues( &DrealViewLayerPanel,
DrealViewLayerDefaultValues );
DrealSetPanelValues( &DrealViewGridPanel,
DrealViewGridDefaultValues );
DrealSetPanelValues( &DrealViewMapPanel,
DrealViewMapDefaultValues );
DrealSetPanelValues( &DrealCreateRectanglePanel,
DrealCreateRectangleDefaultValues );
DrealSetPanelValues( &DrealModifyRectanglePanel,
DrealModifyRectangleDefaultValues );
DrealSetPanelValues( &DrealToolsMessagePanel,
DrealToolsMessageDefaultValues );
DrealSetPanelValues( &DrealHelpPresentPanel,
DrealHelpPresentDefaultValues );
for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ )
{
if ( ( DREAL_RDS_LAYER_NAME_TABLE[ Layer ][ 0 ] != (char *)NULL ) &&
( RDS_DYNAMIC_LAYER[ Layer ] != RDS_LAYER_UNUSED ) )
{
DREAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = 1;
}
else
{
DREAL_RDS_ACTIVE_LAYER_TABLE[ Layer ] = -1;
}
}
for ( Layer = 0; Layer < DREAL_MAX_ACTIVE_NAME; Layer++ )
{
DREAL_RDS_ACTIVE_NAME_TABLE[ Layer ] = 1;
}
DREAL_FILL_MODE = DREAL_FILL_MODE_PATTERN;
DREAL_INSTANCE_INTERFACE = DREAL_TRUE;
DrealInitializeLayer();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealLoadTopLevelConfig |
| |
\------------------------------------------------------------*/
void DrealLoadTopLevelConfig()
{
rdsbegin();
FileConfig = fopen( DREAL_GMS_FILE_NAME, "r" );
if ( FileConfig == (FILE *)NULL )
{
DrealDefaultTopLevelValues();
}
else
{
if ( ! DrealReadTopLevelValues() )
{
DrealDefaultTopLevelValues();
}
fclose( FileConfig );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealLoadConfig |
| |
\------------------------------------------------------------*/
void DrealLoadConfig( Message )
char Message;
{
rdsbegin();
FileConfig = fopen( DREAL_GMS_FILE_NAME, "r" );
if ( FileConfig == (FILE *)NULL )
{
if ( Message )
{
DrealErrorMessage( DrealMainWindow,
"Unable to open config file !" );
}
else
{
DrealDefaultConfig();
}
}
else
{
if ( DrealReadTopLevelValues() )
{
DrealReadPanelValues( &DrealViewArrowsPanel );
DrealReadPanelValues( &DrealViewZoomPanel );
DrealReadPanelValues( &DrealViewLayerPanel );
DrealReadPanelValues( &DrealViewGridPanel );
DrealReadPanelValues( &DrealViewMapPanel );
DrealReadPanelValues( &DrealCreateRectanglePanel );
DrealReadPanelValues( &DrealModifyRectanglePanel );
DrealReadPanelValues( &DrealToolsMessagePanel );
DrealReadPanelValues( &DrealHelpPresentPanel );
DrealReadActiveLayers();
DrealInitializeLayer();
}
else
if ( Message )
{
DrealErrorMessage( DrealMainWindow,
"Bad version, unable to open config file !" );
}
else
{
DrealDefaultConfig();
}
fclose( FileConfig );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealSaveConfig |
| |
\------------------------------------------------------------*/
void DrealSaveConfig()
{
rdsbegin();
FileConfig = fopen( DREAL_GMS_FILE_NAME, "w" );
if ( FileConfig == (FILE *)NULL )
{
DrealErrorMessage( DrealMainWindow,
"Unable to open config file !" );
}
else
{
DrealWriteTopLevelValues();
DrealWritePanelValues( &DrealViewArrowsPanel );
DrealWritePanelValues( &DrealViewZoomPanel );
DrealWritePanelValues( &DrealViewLayerPanel );
DrealWritePanelValues( &DrealViewGridPanel );
DrealWritePanelValues( &DrealViewMapPanel );
DrealWritePanelValues( &DrealCreateRectanglePanel );
DrealWritePanelValues( &DrealModifyRectanglePanel );
DrealWritePanelValues( &DrealToolsMessagePanel );
DrealWritePanelValues( &DrealHelpPresentPanel );
DrealWriteActiveLayers();
fclose( FileConfig );
}
rdsend();
}

View File

@ -0,0 +1,85 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Setup.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_SETUP
# define DREAL_SETUP
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_TOPLEVEL_TRANSLATE_X 0
# define DREAL_TOPLEVEL_TRANSLATE_Y 0
# define DREAL_PANEL_TRANSLATE_X 4
# define DREAL_PANEL_TRANSLATE_Y 21
# define DREAL_TOPLEVEL_X 10
# define DREAL_TOPLEVEL_Y 10
# define DREAL_TOPLEVEL_WIDTH 1024
# define DREAL_TOPLEVEL_HEIGHT 768
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealDefaultConfig();
extern void DrealSaveConfig();
extern void DrealLoadConfig();
# endif

View File

@ -0,0 +1,74 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : GMT101.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef DREAL_GMT
# define DREAL_GMT
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealMenuItem DrealToolsMenu[];
extern DrealPanelItem DrealToolsMessagePanel;
extern int DrealToolsMessageDefaultValues[ 5 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealDisplayToolsMessage();
extern void DrealBuildToolsDialog();
# endif

View File

@ -0,0 +1,170 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
# include <Xm/SelectioB.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMT.h"
# include "GMT_dialog.h"
# include "GMT_tools.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| File Dialog |
| |
\------------------------------------------------------------*/
DrealDialogItem DrealToolsSavePixmapDialog =
{
"Save xpm file As",
DREAL_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackToolsSavePixmapOk,
(XtPointer)NULL,
(void *)CallbackToolsSavePixmapCancel,
(XtPointer)NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealBuildToolsDialog |
| |
\------------------------------------------------------------*/
void DrealBuildToolsDialog()
{
rdsbegin();
DrealBuildDialog( DrealMainWindow, &DrealToolsSavePixmapDialog );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackToolsSavePixmapOk |
| |
\------------------------------------------------------------*/
void CallbackToolsSavePixmapOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *FileName;
rdsbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&FileName );
FileName = DrealPostTreatString( FileName );
XtUnmanageChild( DrealToolsSavePixmapDialog.WIDGET );
DrealExitDialog();
DrealToolsSavePixmap( FileName );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackToolsSavePixmapCancel |
| |
\------------------------------------------------------------*/
void CallbackToolsSavePixmapCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
rdsbegin();
XtUnmanageChild( DrealToolsSavePixmapDialog.WIDGET );
DrealExitDialog();
rdsend();
}

View File

@ -0,0 +1,77 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_TOOLS_DIALOG
# define DREAL_TOOLS_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealDialogItem DrealToolsSavePixmapDialog;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackToolsSavePixmapOk();
extern void CallbackToolsSavePixmapCancel();
# endif

View File

@ -0,0 +1,202 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GSB.h"
# include "GTB.h"
# include "GRD.h"
# include "GMV.h"
# include "GMT.h"
# include "GMX.h"
# include "GMT_menu.h"
# include "GMT_tools.h"
# include "GMT_dialog.h"
# include "GMT_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
DrealMenuItem DrealToolsMenu[] =
{
{
"Save Image",
'S',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackToolsSavePixmap,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Flatten",
'F',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackToolsFlatten,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Message",
'M',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackToolsMessage,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackToolsMessage |
| |
\------------------------------------------------------------*/
void CallbackToolsMessage( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEnterPanel( &DrealToolsMessagePanel );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackToolsFlatten |
| |
\------------------------------------------------------------*/
void CallbackToolsFlatten( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealToolsFlatten();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackToolsSavePixmap |
| |
\------------------------------------------------------------*/
void CallbackToolsSavePixmap( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
if ( DrealFigureRds != (rdsfig_list *)NULL )
{
DrealEnterDialog( &DrealToolsSavePixmapDialog );
}
else
{
DrealErrorMessage( DrealMainWindow, "No current figure !" );
}
rdsend();
}

View File

@ -0,0 +1,74 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_MENU
# define DREAL_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackToolsMessage();
extern void CallbackToolsFlatten();
extern void CallbackToolsSavePixmap();
# endif

View File

@ -0,0 +1,83 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Message.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMT.h"
# include "GMT_tools.h"
# include "GMT_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/

View File

@ -0,0 +1,70 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Message.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_MESSAGE
# define DREAL_MESSAGE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,205 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
# include <Xm/SelectioB.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMT.h"
# include "GMT_panel.h"
# include "GMT_message.h"
# include "GMT_dialog.h"
# include "GMT_tools.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Panel |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Panel Message |
| |
\------------------------------------------------------------*/
DrealPanelButtonItem DrealToolsMessageButton[] =
{
{
"Text",
"Nothing", NULL, 0, 0,
NULL,
NULL,
0, 0,
8, 9,
NULL,
(XtPointer)NULL,
(Widget)NULL
}
,
{
"Close",
NULL, NULL, 0, 0,
NULL,
NULL,
3, 9,
2, 1,
CallbackToolsCloseMessage,
(XtPointer)NULL,
(Widget)NULL
}
};
DrealPanelItem DrealToolsMessagePanel =
{
"Message",
1,
0,
DREAL_TOOLS_MESSAGE_X,
DREAL_TOOLS_MESSAGE_Y,
360,
250,
8,
10,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
2,
DrealToolsMessageButton
};
int DrealToolsMessageDefaultValues[ 5 ] =
{
DREAL_TOOLS_MESSAGE_X,
DREAL_TOOLS_MESSAGE_Y,
360, 250, 0
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback For Message |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackToolsCloseMessage |
| |
\------------------------------------------------------------*/
void CallbackToolsCloseMessage( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealExitPanel( &DrealToolsMessagePanel );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealDisplayErrorMessage |
| |
\------------------------------------------------------------*/
void DrealDisplayToolsMessage()
{
char *Message;
rdsbegin();
Message = DrealGetErrorMessage();
if ( Message != (char *)NULL )
{
XmTextSetString( DrealToolsMessageButton[0].BUTTON, Message );
DrealEnterPanel( &DrealToolsMessagePanel );
}
else
{
XmTextSetString( DrealToolsMessageButton[0].BUTTON, "" );
}
rdsend();
}

View File

@ -0,0 +1,76 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_TOOLS_PANEL
# define DREAL_TOOLS_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_TOOLS_MESSAGE_X 330
# define DREAL_TOOLS_MESSAGE_Y 280
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackToolsCloseMessage();
# endif

View File

@ -0,0 +1,150 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Tools.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# ifdef AUTO_HAS_XPM
# include <X11/xpm.h>
# endif
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rfm.h"
# include "rpr.h"
# include "GTB.h"
# include "GSB.h"
# include "GMX.h"
# include "GRD.h"
# include "GMT.h"
# include "GMT_tools.h"
# include "GMT_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealToolsFlatten |
| |
\------------------------------------------------------------*/
void DrealToolsFlatten()
{
rdsbegin();
if ( DrealFigureRds != (rdsfig_list *)NULL )
{
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealFlattenFigure();
DrealComputeBound();
DrealZoomRefresh();
DrealDisplayToolsMessage();
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealToolsSavePixmap |
| |
\------------------------------------------------------------*/
void DrealToolsSavePixmap( FileName )
char *FileName;
{
# ifdef AUTO_HAS_XPM
XpmAttributes Attribute;
char *XpmFileName;
int Error;
XpmFileName = rdsallocblock( strlen( FileName ) + 4 );
sprintf( XpmFileName, "%s.xpm", FileName );
Attribute.colormap = DrealColorMap;
Attribute.valuemask = XpmColormap;
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
Error = XpmWriteFileFromPixmap( DrealGraphicDisplay,
XpmFileName,
DrealGraphicPixmap,
(Pixmap)0, &Attribute );
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
if ( Error )
{
DrealErrorMessage( DrealMainWindow, "Unable to save xpm file !" );
}
rdsfreeblock( XpmFileName );
# else
DrealErrorMessage( DrealMainWindow, "XPM cannot be used: Not enabled at compile time !" );
# endif
}

View File

@ -0,0 +1,74 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Tools.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_TOOLS
# define DREAL_TOOLS
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealToolsFlatten();
extern void DrealToolsSavePixmap();
# endif

View File

@ -0,0 +1,125 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : GMV101.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef DREAL_GMV
# define DREAL_GMV
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern char DrealFirstViewLayer;
/*------------------------------------------------------------\
| |
| Panel And Menu |
| |
\------------------------------------------------------------*/
extern DrealMenuItem DrealViewMenu[];
extern DrealPanelItem DrealViewArrowsPanel;
extern DrealPanelItem DrealViewZoomPanel;
extern DrealPanelItem DrealViewGridPanel;
extern DrealPanelItem DrealViewLayerPanel;
extern DrealPanelItem DrealViewMapPanel;
extern int DrealPercentZoom;
extern int DrealPercentMove;
extern int DrealViewArrowsDefaultValues[5];
extern int DrealViewZoomDefaultValues[5];
extern int DrealViewLayerDefaultValues[5];
extern int DrealViewGridDefaultValues[5];
extern int DrealViewMapDefaultValues[5];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Zoom |
| |
\------------------------------------------------------------*/
extern void DrealComputeAndDisplayMap();
extern void DrealInitializeZoom();
extern void DrealBuildViewDialog();
extern void DrealBuildPanelLayer();
extern void DrealBuildPanelMap();
extern void DrealInitializeMapEvent();
extern void DrealZoomUndo();
extern void DrealZoomLeft();
extern void DrealZoomRight();
extern void DrealZoomUp();
extern void DrealZoomDown();
extern void DrealZoomMore();
extern void DrealZoomLess();
extern void DrealZoomFit();
extern void DrealZoomCenter();
extern void DrealZoomRefresh();
extern void DrealZoomIn();
extern void DrealZoomPan();
extern void DrealPromptZoomIn();
extern void DrealPromptZoomPan();
extern void DrealPromptZoomCenter();
# endif

View File

@ -0,0 +1,519 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <math.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GTB.h"
# include "GSB.h"
# include "GMX.h"
# include "GMV.h"
# include "GMV_dialog.h"
# include "GMV_view.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Dialog Box |
| |
\------------------------------------------------------------*/
DrealDialogItem DrealViewZoomSetDialog =
{
"Zoom set",
DREAL_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackViewZoomSetOk,
(XtPointer)NULL,
(void *)CallbackViewZoomSetCancel,
(XtPointer)NULL
};
DrealDialogItem DrealViewZoomGotoDialog =
{
"Goto X,Y",
DREAL_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackViewZoomGotoOk,
(XtPointer)NULL,
(void *)CallbackViewZoomGotoCancel,
(XtPointer)NULL
};
DrealDialogItem DrealViewMoveSetDialog =
{
"Move set",
DREAL_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackViewMoveSetOk,
(XtPointer)NULL,
(void *)CallbackViewMoveSetCancel,
(XtPointer)NULL
};
DrealDialogItem DrealViewGridXDialog =
{
"Grid X",
DREAL_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackViewGridXOk,
(XtPointer)NULL,
(void *)CallbackViewGridXCancel,
(XtPointer)NULL
};
DrealDialogItem DrealViewGridYDialog =
{
"Grid Y",
DREAL_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackViewGridYOk,
(XtPointer)NULL,
(void *)CallbackViewGridYCancel,
(XtPointer)NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Build Dialog Box |
| |
\------------------------------------------------------------*/
void DrealBuildViewDialog()
{
rdsbegin();
DrealBuildDialog( DrealMainWindow, &DrealViewZoomSetDialog );
DrealBuildDialog( DrealMainWindow, &DrealViewZoomGotoDialog );
DrealBuildDialog( DrealMainWindow, &DrealViewMoveSetDialog );
DrealBuildDialog( DrealMainWindow, &DrealViewGridXDialog );
DrealBuildDialog( DrealMainWindow, &DrealViewGridYDialog );
rdsend();
}
/*------------------------------------------------------------\
| |
| Callback For Dialog |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackViewZoomSetOk |
| |
\------------------------------------------------------------*/
void CallbackViewZoomSetOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *ZoomSet;
int ZoomPercent;
rdsbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&ZoomSet );
XtUnmanageChild( DrealViewZoomSetDialog.WIDGET );
DrealExitDialog();
if ( ZoomSet != (char *)NULL )
{
ZoomPercent = atoi( ZoomSet );
if ( ( ZoomPercent < DREAL_PERCENT_ZOOM_MIN ) ||
( ZoomPercent > DREAL_PERCENT_ZOOM_MAX ) )
{
DrealErrorMessage( DrealMainWindow, "The value must be between 5% and 95% !" );
}
else
{
DrealPercentZoom = ZoomPercent;
}
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewZoomSetCancel |
| |
\------------------------------------------------------------*/
void CallbackViewZoomSetCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
rdsbegin();
XtUnmanageChild( DrealViewZoomSetDialog.WIDGET );
DrealExitDialog();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewZoomGotoOk |
| |
\------------------------------------------------------------*/
void CallbackViewZoomGotoOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *ZoomGoto;
int Index;
long GotoX;
long GotoY;
rdsbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&ZoomGoto );
XtUnmanageChild( DrealViewZoomGotoDialog.WIDGET );
DrealExitDialog();
if ( ZoomGoto != (char *)NULL )
{
for ( Index = 0; ZoomGoto[ Index ]; Index++ )
{
if ( ZoomGoto[ Index ] == ',' )
{
ZoomGoto[ Index ] = '\0';
if ( Index == 0 )
{
GotoX = DrealLambdaGridX + ( DrealLambdaGridDx >> 1 );
}
else
{
GotoX = atof( ZoomGoto ) / DREAL_PHYSICAL_GRID_TO_MICRON;
}
if ( ZoomGoto[ Index + 1 ] == '\0' )
{
GotoY = DrealLambdaGridY + ( DrealLambdaGridDy >> 1 );
}
else
{
GotoY = atof( ZoomGoto + Index + 1 ) / DREAL_PHYSICAL_GRID_TO_MICRON;
}
ZoomGoto = (char *)NULL;
DrealZoomCenter( GotoX, GotoY );
break;
}
}
if ( ZoomGoto != (char *)NULL )
{
DrealErrorMessage( DrealMainWindow, "A coordinate must be specified !" );
}
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewZoomGotoCancel |
| |
\------------------------------------------------------------*/
void CallbackViewZoomGotoCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
rdsbegin();
XtUnmanageChild( DrealViewZoomGotoDialog.WIDGET );
DrealExitDialog();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewMoveSetOk |
| |
\------------------------------------------------------------*/
void CallbackViewMoveSetOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *MoveSet;
int MovePercent;
rdsbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&MoveSet );
XtUnmanageChild( DrealViewMoveSetDialog.WIDGET );
DrealExitDialog();
if ( MoveSet != (char *)NULL )
{
MovePercent = atoi( MoveSet );
if ( ( MovePercent < DREAL_PERCENT_MOVE_MIN ) ||
( MovePercent > DREAL_PERCENT_MOVE_MAX ) )
{
DrealErrorMessage( DrealMainWindow, "The value must be between 5% and 95% !" );
}
else
{
DrealPercentMove = MovePercent;
}
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewMoveSetCancel |
| |
\------------------------------------------------------------*/
void CallbackViewMoveSetCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
rdsbegin();
XtUnmanageChild( DrealViewMoveSetDialog.WIDGET );
DrealExitDialog();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewGridXOk |
| |
\------------------------------------------------------------*/
void CallbackViewGridXOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *GridSet;
int GridPercent;
rdsbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&GridSet );
XtUnmanageChild( DrealViewGridXDialog.WIDGET );
DrealExitDialog();
if ( GridSet != (char *)NULL )
{
GridPercent = atoi( GridSet );
if ( GridPercent < 2 )
{
DrealErrorMessage( DrealMainWindow, "The value must be greater than one !" );
}
else
{
DrealLambdaUserGridDx = GridPercent;
DrealZoomRefresh();
}
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewGridXCancel |
| |
\------------------------------------------------------------*/
void CallbackViewGridXCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
rdsbegin();
XtUnmanageChild( DrealViewGridXDialog.WIDGET );
DrealExitDialog();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewGridYOk |
| |
\------------------------------------------------------------*/
void CallbackViewGridYOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *GridSet;
int GridPercent;
rdsbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&GridSet );
XtUnmanageChild( DrealViewGridYDialog.WIDGET );
DrealExitDialog();
if ( GridSet != (char *)NULL )
{
GridPercent = atoi( GridSet );
if ( GridPercent < 2 )
{
DrealErrorMessage( DrealMainWindow, "The value must be greater than one !" );
}
else
{
DrealLambdaUserGridDy = GridPercent;
DrealZoomRefresh();
}
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewGridYCancel |
| |
\------------------------------------------------------------*/
void CallbackViewGridYCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
rdsbegin();
XtUnmanageChild( DrealViewGridYDialog.WIDGET );
DrealExitDialog();
rdsend();
}

View File

@ -0,0 +1,93 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_VIEW_DIALOG
# define DREAL_VIEW_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealDialogItem DrealViewZoomSetDialog;
extern DrealDialogItem DrealViewZoomGotoDialog;
extern DrealDialogItem DrealViewMoveSetDialog;
extern DrealDialogItem DrealViewGridXDialog;
extern DrealDialogItem DrealViewGridYDialog;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback View Dialog |
| |
\------------------------------------------------------------*/
extern void CallbackViewZoomGotoOk();
extern void CallbackViewZoomGotoCancel();
extern void CallbackViewZoomSetOk();
extern void CallbackViewZoomSetCancel();
extern void CallbackViewMoveSetOk();
extern void CallbackViewMoveSetCancel();
extern void CallbackViewGridXOk();
extern void CallbackViewGridXCancel();
extern void CallbackViewGridYOk();
extern void CallbackViewGridYCancel();
# endif

View File

@ -0,0 +1,724 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Map.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/Form.h>
# include <Xm/Frame.h>
# include <Xm/PushB.h>
# include <Xm/DrawingA.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GSB.h"
# include "GRD.h"
# include "GTB.h"
# include "GMX.h"
# include "GMV.h"
# include "GMV_map.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
DrealPanelItem DrealViewMapPanel =
{
"Map",
1,
0,
DREAL_VIEW_MAP_X,
DREAL_VIEW_MAP_Y,
190,
200,
1,
1,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
0,
(DrealPanelButtonItem *)NULL
};
int DrealViewMapDefaultValues[ 5 ] =
{
DREAL_VIEW_MAP_X,
DREAL_VIEW_MAP_Y,
190, 200, 0
};
/*------------------------------------------------------------\
| |
| Graphic Map Window |
| |
\------------------------------------------------------------*/
Widget DrealMapWindow;
Widget DrealMapButtonCompute;
Widget DrealMapButtonClose;
Dimension DrealMapDx = 0;
Dimension DrealMapDy = 0;
static char DrealFirstEnterMap = DREAL_TRUE;
static char DrealFirstExpose = DREAL_TRUE;
/*------------------------------------------------------------\
| |
| Lambda Map |
| |
\------------------------------------------------------------*/
float DrealLambdaMapStep;
long DrealLambdaMapX;
long DrealLambdaMapY;
long DrealLambdaMapDx;
long DrealLambdaMapDy;
long DrealBoundMapX;
long DrealBoundMapY;
long DrealBoundMapDx;
long DrealBoundMapDy;
long DrealPixelMapX;
long DrealPixelMapY;
/*------------------------------------------------------------\
| |
| Expose |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Translation |
| |
\------------------------------------------------------------*/
static String DrealMapEventTranslation =
"<Btn1Up>: CallbackMapEvent( 0 )\n\
<Btn2Up>: CallbackMapEvent( 1 )\n\
<Btn3Up>: CallbackMapEvent( 2 )";
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Event Callback |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackCloseMap |
| |
\------------------------------------------------------------*/
void CallbackCloseMap( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealExitPanel( &DrealViewMapPanel );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackMapCompute |
| |
\------------------------------------------------------------*/
void CallbackMapCompute( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealComputeAndDisplayMap();
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackMapEvent |
| |
\------------------------------------------------------------*/
void CallbackMapEvent ( MyWidget, Event, Args, Argc )
Widget MyWidget;
XButtonEvent *Event;
String *Args;
int *Argc;
{
Display *EventDisplay;
char MouseEvent;
long X;
long Y;
rdsbegin();
EventDisplay = Event->display;
MouseEvent = Args[ 0 ][ 0 ] - '0';
X = Event->x;
Y = DrealMapDy - Event->y;
X = X + DrealPixelMapX;
Y = Y + DrealPixelMapY;
if ( X < 0 )
{
X = ((float)(X) / DrealLambdaMapStep) - 0.5 ;
}
else
{
X = ((float)(X) / DrealLambdaMapStep) + 0.5 ;
}
if ( Y < 0 )
{
Y = ((float)(Y) / DrealLambdaMapStep) - 0.5 ;
}
else
{
Y = ((float)(Y) / DrealLambdaMapStep) + 0.5 ;
}
switch ( MouseEvent )
{
case DREAL_B1UP :
case DREAL_B2UP :
case DREAL_B3UP :
DrealZoomCenter( X, Y );
break;
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackMapResize |
| |
\------------------------------------------------------------*/
void CallbackMapResize( MyWidget, ClientData, CallData )
Widget MyWidget;
XtPointer ClientData;
XmDrawingAreaCallbackStruct *CallData;
{
rdsbegin();
if ( ! DrealFirstExpose )
{
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealResizeMapWindow();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackMapExpose |
| |
\------------------------------------------------------------*/
void CallbackMapExpose( MyWidget, ClientData, CallData )
Widget MyWidget;
XtPointer ClientData;
XmDrawingAreaCallbackStruct *CallData;
{
XExposeEvent *ExposeEvent;
rdsbegin();
ExposeEvent = (XExposeEvent *)CallData->event;
if ( DrealFirstExpose )
{
DrealFirstExpose = DREAL_FALSE;
DrealInitializeMapWindow();
}
DrealRefreshMapWindow();
rdsend();
}
/*------------------------------------------------------------\
| |
| Initialize Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealsnitializeMapWindow |
| |
\------------------------------------------------------------*/
void DrealInitializeMapWindow()
{
rdsbegin();
XtVaGetValues( DrealMapWindow,
XmNwidth , &DrealMapDx,
XmNheight, &DrealMapDy,
NULL
);
DrealInitializeLambdaMap();
rdsend();
}
/*------------------------------------------------------------\
| |
| Graphic Window Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealRefreshMapWindow |
| |
\------------------------------------------------------------*/
void DrealRefreshMapWindow()
{
rdsbegin();
DrealClearMapWindow();
DrealDisplayLambdaMap();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealClearMapWindow |
| |
\------------------------------------------------------------*/
void DrealClearMapWindow()
{
XFillRectangle( XtDisplay( DrealMapWindow ),
XtWindow( DrealMapWindow ),
DrealBackgroundGC,
0, 0, DrealMapDx, DrealMapDy );
}
/*------------------------------------------------------------\
| |
| DrealResizeMapWindow |
| |
\------------------------------------------------------------*/
void DrealResizeMapWindow()
{
XtVaGetValues( DrealMapWindow,
XmNwidth, &DrealMapDx,
XmNheight, &DrealMapDy,
NULL
);
DrealComputeAndDisplayMap();
}
/*------------------------------------------------------------\
| |
| DrealInitializeMapEvent |
| |
\------------------------------------------------------------*/
void DrealInitializeMapEvent()
{
XtActionsRec NewActions;
XtVaSetValues( DrealMapWindow,
XmNtranslations,
XtParseTranslationTable( DrealMapEventTranslation ),
NULL
);
NewActions.string = "CallbackMapEvent";
NewActions.proc = CallbackMapEvent;
XtAppAddActions( DrealApplication, &NewActions, 1 );
XtAddCallback( DrealMapWindow,
XmNresizeCallback,
CallbackMapResize, NULL );
XtAddCallback( DrealMapWindow,
XmNexposeCallback,
CallbackMapExpose, NULL );
}
/*------------------------------------------------------------\
| |
| Lambda Map Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealInitializeLambdaMap |
| |
\------------------------------------------------------------*/
void DrealInitializeLambdaMap()
{
if ( ! DrealComputeBound() )
{
DrealBoundMapX = DREAL_DEFAULT_MAP_X;
DrealBoundMapY = DREAL_DEFAULT_MAP_Y;
DrealBoundMapDx = DREAL_DEFAULT_MAP_DX;
DrealBoundMapDy = DREAL_DEFAULT_MAP_DY;
}
else
{
DrealBoundMapX = DrealBoundXmin / RDS_PHYSICAL_GRID;
DrealBoundMapY = DrealBoundYmin / RDS_PHYSICAL_GRID;
DrealBoundMapDx = DrealBoundXmax / RDS_PHYSICAL_GRID;
DrealBoundMapDy = DrealBoundYmax / RDS_PHYSICAL_GRID;
DrealBoundMapDx = DrealBoundMapDx - DrealBoundMapX;
DrealBoundMapDy = DrealBoundMapDy - DrealBoundMapY;
}
DrealLambdaMapX = DrealBoundMapX - 2;
DrealLambdaMapY = DrealBoundMapY - 2;
DrealLambdaMapDx = DrealBoundMapDx + 4;
DrealLambdaMapDy = DrealBoundMapDy + 4;
DrealComputeLambdaMap();
}
/*------------------------------------------------------------\
| |
| DrealComputeLambdaMap |
| |
\------------------------------------------------------------*/
void DrealComputeLambdaMap()
{
long Delta;
float StepX;
float StepY;
StepX = (float)(DrealMapDx) / (float)(DrealLambdaMapDx);
StepY = (float)(DrealMapDy) / (float)(DrealLambdaMapDy);
if ( StepX < StepY )
{
DrealLambdaMapStep = StepX;
Delta = DrealLambdaMapDy;
DrealLambdaMapDy = 1 + ( DrealMapDy / StepX );
Delta = ( DrealLambdaMapDy - Delta ) >> 1;
DrealLambdaMapY = DrealLambdaMapY - Delta;
}
else
{
DrealLambdaMapStep = StepY;
Delta = DrealLambdaMapDx;
DrealLambdaMapDx = 1 + ( DrealMapDx / StepY );
Delta = ( DrealLambdaMapDx - Delta ) >> 1;
DrealLambdaMapX = DrealLambdaMapX - Delta;
}
DrealPixelMapX = (float)(DrealLambdaMapX) * DrealLambdaMapStep;
DrealPixelMapY = (float)(DrealLambdaMapY) * DrealLambdaMapStep;
}
/*------------------------------------------------------------\
| |
| DrealDisplayLambdaMap |
| |
\------------------------------------------------------------*/
void DrealDisplayLambdaMap()
{
long X1;
long Y1;
long X2;
long Y2;
X1 = (float)( DrealBoundMapX ) * DrealLambdaMapStep;
Y1 = (float)( DrealBoundMapY ) * DrealLambdaMapStep;
X2 = (float)( DrealBoundMapX + DrealBoundMapDx ) * DrealLambdaMapStep;
Y2 = (float)( DrealBoundMapY + DrealBoundMapDy ) * DrealLambdaMapStep;
X1 = X1 - DrealPixelMapX;
X2 = X2 - DrealPixelMapX;
Y1 = Y1 - DrealPixelMapY;
Y2 = Y2 - DrealPixelMapY;
XDrawRectangle( XtDisplay( DrealMapWindow ),
XtWindow( DrealMapWindow ),
DrealLargeTextGC,
X1, DrealMapDy - Y2,
X2 - X1, Y2 - Y1 );
X1 = DrealLambdaGridX + ( DrealLambdaGridDx >> 1 );
Y1 = DrealLambdaGridY + ( DrealLambdaGridDy >> 1 );
X1 = (float)( X1 ) * DrealLambdaMapStep;
Y1 = (float)( Y1 ) * DrealLambdaMapStep;
X1 = X1 - DrealPixelMapX;
Y1 = Y1 - DrealPixelMapY;
Y1 = DrealMapDy - Y1;
if ( ( X1 > 0 ) &&
( Y1 > 0 ) &&
( X1 < DrealMapDx ) &&
( Y1 < DrealMapDy ) )
{
XDrawLine( XtDisplay( DrealMapWindow ),
XtWindow( DrealMapWindow ),
DrealLargeTextGC,
X1 - 2, Y1,
X1 + 2, Y1 );
XDrawLine( XtDisplay( DrealMapWindow ),
XtWindow( DrealMapWindow ),
DrealLargeTextGC,
X1, Y1 - 2,
X1, Y1 + 2 );
}
}
/*------------------------------------------------------------\
| |
| DrealBuildPanelMap |
| |
\------------------------------------------------------------*/
void DrealBuildPanelMap()
{
Arg Args[3];
XtSetArg( Args[0], XmNshadowType , XmSHADOW_ETCHED_IN );
XtSetArg( Args[1], XmNdeleteResponse, XmDO_NOTHING );
XtSetArg( Args[2], XmNtitle , DrealViewMapPanel.TITLE );
DrealViewMapPanel.PANEL =
XmCreateFormDialog( DrealMainWindow, "DrealViewMapPanel", Args, 3);
XtAddCallback( DrealViewMapPanel.PANEL, XmNdestroyCallback,
DrealDestroyDialogCallback, NULL );
DrealViewMapPanel.PANEL_FORM =
XtVaCreateManagedWidget( "DrealViewMapPanelForm",
xmFormWidgetClass,
DrealViewMapPanel.PANEL,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
XmNfractionBase , 100,
NULL
);
DrealViewMapPanel.FRAME =
XtVaCreateManagedWidget( "DrealViewMapFrame",
xmFrameWidgetClass,
DrealViewMapPanel.PANEL_FORM,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
NULL
);
DrealViewMapPanel.FORM =
XtVaCreateManagedWidget( "DrealViewMapForm",
xmFormWidgetClass,
DrealViewMapPanel.FRAME,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
XmNfractionBase , 100,
NULL
);
DrealMapButtonCompute =
XtVaCreateManagedWidget( "Compute",
xmPushButtonWidgetClass,
DrealViewMapPanel.FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 1,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 44,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 89,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 99,
NULL
);
DrealMapButtonClose =
XtVaCreateManagedWidget( "Close",
xmPushButtonWidgetClass,
DrealViewMapPanel.FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 45,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 99,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 89,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 99,
NULL
);
DrealMapWindow =
XtVaCreateManagedWidget( "DrealMapWindow",
xmDrawingAreaWidgetClass,
DrealViewMapPanel.FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 1,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 99,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 1,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 88,
XmNbackground , 1,
XmNforeground , 0,
NULL
);
XtAddCallback( DrealMapButtonCompute,
XmNactivateCallback,
CallbackMapCompute, NULL );
XtAddCallback( DrealMapButtonClose,
XmNactivateCallback,
CallbackCloseMap, NULL );
XtVaSetValues( DrealViewMapPanel.PANEL,
XmNheight, DrealViewMapPanel.HEIGHT,
XmNwidth , DrealViewMapPanel.WIDTH,
XmNx , DrealViewMapPanel.X,
XmNy , DrealViewMapPanel.Y,
NULL );
}
/*------------------------------------------------------------\
| |
| DrealEnterMapPanel |
| |
\------------------------------------------------------------*/
void DrealEnterMapPanel()
{
DrealFirstEnterMap = DREAL_FALSE;
DrealEnterPanel( &DrealViewMapPanel );
}
/*------------------------------------------------------------\
| |
| DrealComputeAndDisplayMap |
| |
\------------------------------------------------------------*/
void DrealComputeAndDisplayMap()
{
if ( ! DrealFirstEnterMap )
{
DrealInitializeLambdaMap();
DrealClearMapWindow();
DrealDisplayLambdaMap();
}
}

View File

@ -0,0 +1,101 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Map.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_MAP
# define DREAL_MAP
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_B1UP 0
# define DREAL_B2UP 1
# define DREAL_B3UP 2
# define DREAL_VIEW_MAP_X 25
# define DREAL_VIEW_MAP_Y 520
# define DREAL_DEFAULT_MAP_X 0
# define DREAL_DEFAULT_MAP_Y 0
# define DREAL_DEFAULT_MAP_DX 40
# define DREAL_DEFAULT_MAP_DY 40
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern Widget DrealMapPanel;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealComputeLambdaMap();
extern void DrealInitializeLambdaMap();
extern void DrealDisplayLambdaMap();
extern void DrealEnterMapPanel();
extern void DrealClearMapWindow();
extern void DrealResizeMapWindow();
extern void DrealRefreshMapWindow();
extern void DrealInitializeMapWindow();
extern void CallbackCloseMap();
extern void CallbackMapResize();
extern void CallbackMapExpose();
extern void CallbackMapEvent();
# endif

View File

@ -0,0 +1,283 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GTB.h"
# include "GSB.h"
# include "GMX.h"
# include "GMV.h"
# include "GMV_menu.h"
# include "GMV_dialog.h"
# include "GMV_view.h"
# include "GMV_map.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
char DrealFirstViewLayer = 1;
/*------------------------------------------------------------\
| |
| Menu |
| |
\------------------------------------------------------------*/
DrealMenuItem DrealViewMenu[] =
{
{
"Zoom",
'Z',
"Meta<Key>Z",
"Meta Z",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackViewZoom,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Layers",
'L',
"Meta<Key>L",
"Meta L",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackViewLayers,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Map",
'M',
"Meta<Key>P",
"Meta P",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackViewMap,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Arrows",
'A',
"Meta<Key>A",
"Meta A",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackViewArrows,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
{
"Grid ",
'G',
"Meta<Key>G",
"Meta G",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackViewGrid,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(DrealMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback For Menu |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackViewLayers |
| |
\------------------------------------------------------------*/
void CallbackViewLayers( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
if ( DrealFirstViewLayer )
{
DrealInitializeLayer();
DrealFirstViewLayer = 0;
}
DrealEnterPanel( &DrealViewLayerPanel );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewGrid |
| |
\------------------------------------------------------------*/
void CallbackViewGrid( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEnterPanel( &DrealViewGridPanel );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewArrows |
| |
\------------------------------------------------------------*/
void CallbackViewArrows( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEnterPanel( &DrealViewArrowsPanel );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewZoom |
| |
\------------------------------------------------------------*/
void CallbackViewZoom( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEnterPanel( &DrealViewZoomPanel );
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackViewMap |
| |
\------------------------------------------------------------*/
void CallbackViewMap( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
rdsbegin();
DrealEnterMapPanel();
rdsend();
}

View File

@ -0,0 +1,82 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 25/02/93 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_VIEW_MENU
# define DREAL_VIEW_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback View Menu |
| |
\------------------------------------------------------------*/
extern void CallbackViewLayers();
extern void CallbackViewZoom();
extern void CallbackViewGrid();
extern void CallbackViewMap();
extern void CallbackViewArrows();
# endif

View File

@ -0,0 +1,163 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Message.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GSB.h"
# include "GMV.h"
# include "GMV_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
static char MessageBuffer[ 512 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealPromptZoomIn |
| |
\------------------------------------------------------------*/
void DrealPromptZoomIn()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Zoom In" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select window" );
switch ( DrealCountEventZoom )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter first corner" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter second corner" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptZoomPan |
| |
\------------------------------------------------------------*/
void DrealPromptZoomPan()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Zoom Pan" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select line" );
switch ( DrealCountEventZoom )
{
case 0 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter source point" );
break;
case 1 :
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter target point" );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPromptZoomCenter |
| |
\------------------------------------------------------------*/
void DrealPromptZoomCenter()
{
rdsbegin();
DrealDisplayMessage( DREAL_MESSAGE_MODE, "Zoom Center" );
DrealDisplayMessage( DREAL_MESSAGE_INFO, "Select point" );
DrealDisplayMessage( DREAL_MESSAGE_PROMPT, "Enter center point" );
rdsend();
}

View File

@ -0,0 +1,74 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Message.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_MESSAGE
# define DREAL_MESSAGE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealPromptZoomIn();
extern void DrealPromptZoomCenter();
extern void DrealPromptZoomPan();
# endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,137 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Panel.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 25/02/93 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_VIEW_PANEL
# define DREAL_VIEW_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_VIEW_ARROWS_X 990
# define DREAL_VIEW_ARROWS_Y 80
# define DREAL_VIEW_ZOOM_X 990
# define DREAL_VIEW_ZOOM_Y 230
# define DREAL_VIEW_LAYER_X 430
# define DREAL_VIEW_LAYER_Y 90
# define DREAL_VIEW_GRID_X 470
# define DREAL_VIEW_GRID_Y 330
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback View Panel |
| |
\------------------------------------------------------------*/
extern void CallbackLeftArrow();
extern void CallbackRightArrow();
extern void CallbackUpArrow();
extern void CallbackDownArrow();
extern void CallbackMoveSet();
extern void CallbackCloseArrows();
extern void CallbackZoomRefresh();
extern void CallbackZoomPrevious();
extern void CallbackZoomLess();
extern void CallbackZoomMore();
extern void CallbackZoomSet();
extern void CallbackZoomIn();
extern void CallbackZoomFit();
extern void CallbackZoomCenter();
extern void CallbackZoomGoto();
extern void CallbackZoomPan();
extern void CallbackCloseZoom();
extern void CallbackLayerAllVisible();
extern void CallbackLayerAllInvisible();
extern void CallbackNameVisible();
extern void CallbackNameInvisible();
extern void CallbackLayerVisible();
extern void CallbackLayerInvisible();
extern void CallbackLayerFillMode();
extern void CallbackLayerInterface();
extern void CallbackLayerCursor();
extern void CallbackLayerForceDisplay();
extern void CallbackLayerBlackBoxString();
extern void CallbackLayerApply();
extern void CallbackCloseLayer();
extern void DrealSetLayerVisible();
extern void DrealSetLayerInvisible();
extern void DrealSetNameVisible();
extern void DrealSetNameInvisible();
extern void DrealLayerAllVisible();
extern void DrealLayerAllInvisible();
extern void DrealChangeFillMode();
extern void DrealChangeInterface();
extern void DrealChangeCursor();
extern void DrealChangeForceDisplay();
extern void DrealChangeBlackBoxString();
extern void CallbackSetGridX();
extern void CallbackSetGridY();
extern void CallbackGridOnOff();
extern void CallbackCloseGrid();
extern void DrealInitializeLayer();
# endif

View File

@ -0,0 +1,674 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : View.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rfm.h"
# include "GRD.h"
# include "GSB.h"
# include "GTB.h"
# include "GMX.h"
# include "GMV.h"
# include "GMV_view.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
drealzoom *DrealHeadZoom = (drealzoom *)NULL;
int DrealPercentZoom = DREAL_PERCENT_ZOOM;
int DrealPercentMove = DREAL_PERCENT_MOVE;
/*------------------------------------------------------------\
| |
| Menu |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealAllocZoom |
| |
\------------------------------------------------------------*/
drealzoom *DrealAllocZoom ()
{
return ( (drealzoom *) rdsallocheap( sizeof ( drealzoom ) ) );
}
/*------------------------------------------------------------\
| |
| DrealFreeZoom |
| |
\------------------------------------------------------------*/
void DrealFreeZoom ( FreeZoom )
drealzoom *FreeZoom;
{
rdsfreeheap( (char *)FreeZoom, sizeof(FreeZoom) );
}
/*------------------------------------------------------------\
| |
| DrealAddZoom |
| |
\------------------------------------------------------------*/
void DrealAddZoom ()
{
drealzoom *DrealZoom;
rdsbegin();
DrealZoom = DrealAllocZoom ();
DrealZoom->X = DrealLambdaGridX;
DrealZoom->Y = DrealLambdaGridY;
DrealZoom->DX = DrealLambdaGridDx;
DrealZoom->DY = DrealLambdaGridDy;
DrealZoom->NEXT = DrealHeadZoom;
DrealHeadZoom = DrealZoom;
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealDelZoom |
| |
\------------------------------------------------------------*/
char DrealDelZoom()
{
drealzoom *DrealZoom;
rdsbegin();
if ( DrealHeadZoom != (drealzoom *) NULL )
{
DrealZoom = DrealHeadZoom;
DrealHeadZoom = DrealHeadZoom->NEXT;
DrealFreeZoom( DrealZoom );
rdsend();
return( DREAL_TRUE );
}
rdsend();
return( DREAL_FALSE );
}
/*------------------------------------------------------------\
| |
| DrealInitializeZoom |
| |
\------------------------------------------------------------*/
void DrealInitializeZoom()
{
rdsbegin();
while( DrealDelZoom() != DREAL_FALSE );
if ( DrealComputeBound() == DREAL_FALSE )
{
DrealInitializeLambdaGrid();
}
else
{
DrealLambdaGridX = ( DrealBoundXmin / RDS_PHYSICAL_GRID ) - 1;
DrealLambdaGridY = ( DrealBoundYmin / RDS_PHYSICAL_GRID ) - 1;
DrealLambdaGridDx = DrealBoundXmax / RDS_PHYSICAL_GRID;
DrealLambdaGridDy = DrealBoundYmax / RDS_PHYSICAL_GRID;
DrealLambdaGridDx = DrealLambdaGridDx - DrealLambdaGridX + 1;
DrealLambdaGridDy = DrealLambdaGridDy - DrealLambdaGridY + 1;
DrealComputeLambdaGrid();
}
DrealComputeAndDisplayMap();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomUndo |
| |
\------------------------------------------------------------*/
void DrealZoomUndo()
{
rdsbegin();
if ( DrealHeadZoom == (drealzoom *)NULL )
{
DrealErrorMessage( DrealMainWindow, "No previous zoom !" );
}
else
{
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealLambdaGridX = DrealHeadZoom->X;
DrealLambdaGridY = DrealHeadZoom->Y;
DrealLambdaGridDx = DrealHeadZoom->DX;
DrealLambdaGridDy = DrealHeadZoom->DY;
DrealComputeLambdaGrid();
DrealComputeAndDisplayMap();
DrealDisplayFigure( 0, 0,
DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0,
DrealGraphicDx, DrealGraphicDy);
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
DrealDelZoom();
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomRight |
| |
\------------------------------------------------------------*/
void DrealZoomRight()
{
long Delta;
long Offset;
long DrealOldPixelGridX;
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
Delta = ( DrealPercentMove * DrealLambdaGridDx ) / 100;
if ( Delta == 0 ) Delta = 1;
DrealLambdaGridX = DrealLambdaGridX + Delta;
DrealOldPixelGridX = DrealPixelGridX;
DrealPixelGridX = (float)(DrealLambdaGridX) * DrealLambdaGridStep;
Offset = DrealPixelGridX - DrealOldPixelGridX;
XCopyArea( DrealGraphicDisplay,
DrealGraphicPixmap,
DrealGraphicPixmap,
DrealBackgroundGC,
Offset, 0,
DrealGraphicDx - Offset,
DrealGraphicDy,
0, 0
);
DrealComputeAndDisplayMap();
DrealDisplayFigure( DrealGraphicDx - Offset, 0,
DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0,
DrealGraphicDx, DrealGraphicDy);
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomLeft |
| |
\------------------------------------------------------------*/
void DrealZoomLeft()
{
long Delta;
long Offset;
long DrealOldPixelGridX;
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
Delta = ( DrealPercentMove * DrealLambdaGridDx ) / 100;
if ( Delta == 0 ) Delta = 1;
DrealLambdaGridX = DrealLambdaGridX - Delta;
DrealOldPixelGridX = DrealPixelGridX;
DrealPixelGridX = (float)(DrealLambdaGridX) * DrealLambdaGridStep;
Offset = DrealOldPixelGridX - DrealPixelGridX;
XCopyArea( DrealGraphicDisplay,
DrealGraphicPixmap,
DrealGraphicPixmap,
DrealBackgroundGC,
0, 0,
DrealGraphicDx - Offset,
DrealGraphicDy,
Offset, 0
);
DrealComputeAndDisplayMap();
DrealDisplayFigure( 0, 0, Offset, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy);
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomDown |
| |
\------------------------------------------------------------*/
void DrealZoomDown()
{
long Delta;
long Offset;
long DrealOldPixelGridY;
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
Delta = ( DrealPercentMove * DrealLambdaGridDy ) / 100;
if ( Delta == 0 ) Delta = 1;
DrealLambdaGridY = DrealLambdaGridY - Delta;
DrealOldPixelGridY = DrealPixelGridY;
DrealPixelGridY = (float)(DrealLambdaGridY) * DrealLambdaGridStep;
Offset = DrealOldPixelGridY - DrealPixelGridY;
XCopyArea( DrealGraphicDisplay,
DrealGraphicPixmap,
DrealGraphicPixmap,
DrealBackgroundGC,
0, Offset,
DrealGraphicDx,
DrealGraphicDy - Offset,
0, 0
);
DrealComputeAndDisplayMap();
DrealDisplayFigure( 0, 0, DrealGraphicDx, Offset );
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy);
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomUp |
| |
\------------------------------------------------------------*/
void DrealZoomUp()
{
long Delta;
long Offset;
long DrealOldPixelGridY;
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
Delta = ( DrealPercentMove * DrealLambdaGridDy ) / 100;
if ( Delta == 0 ) Delta = 1;
DrealLambdaGridY = DrealLambdaGridY + Delta;
DrealOldPixelGridY = DrealPixelGridY;
DrealPixelGridY = (float)(DrealLambdaGridY) * DrealLambdaGridStep;
Offset = DrealPixelGridY - DrealOldPixelGridY;
XCopyArea( DrealGraphicDisplay,
DrealGraphicPixmap,
DrealGraphicPixmap,
DrealBackgroundGC,
0, 0,
DrealGraphicDx,
DrealGraphicDy - Offset,
0, Offset
);
DrealComputeAndDisplayMap();
DrealDisplayFigure( 0, DrealGraphicDy - Offset,
DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy);
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomMore |
| |
\------------------------------------------------------------*/
void DrealZoomMore()
{
long DeltaX;
long DeltaY;
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DeltaX = ( DrealPercentZoom * DrealLambdaGridDx ) / 100;
DeltaY = ( DrealPercentZoom * DrealLambdaGridDy ) / 100;
if ( ( DeltaX >= 2 ) &&
( DeltaY >= 2 ) )
{
DrealAddZoom();
DrealLambdaGridX = DrealLambdaGridX + (DeltaX >> 1);
DrealLambdaGridY = DrealLambdaGridY + (DeltaY >> 1);
DrealLambdaGridDx = DrealLambdaGridDx - DeltaX;
DrealLambdaGridDy = DrealLambdaGridDy - DeltaY;
DrealComputeLambdaGrid();
DrealComputeAndDisplayMap();
DrealDisplayFigure( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
}
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomLess |
| |
\------------------------------------------------------------*/
void DrealZoomLess()
{
long DeltaX;
long DeltaY;
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DeltaX = 100 * DrealLambdaGridDx / ( 100 - DrealPercentZoom );
DeltaY = 100 * DrealLambdaGridDy / ( 100 - DrealPercentZoom );
DrealAddZoom();
DrealLambdaGridX = DrealLambdaGridX - ((DeltaX - DrealLambdaGridDx) >> 1);
DrealLambdaGridY = DrealLambdaGridY - ((DeltaY - DrealLambdaGridDy) >> 1);
DrealLambdaGridDx = DeltaX;
DrealLambdaGridDy = DeltaY;
DrealComputeLambdaGrid();
DrealComputeAndDisplayMap();
DrealDisplayFigure( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomFit |
| |
\------------------------------------------------------------*/
void DrealZoomFit()
{
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
if ( DrealComputeBound() == DREAL_FALSE )
{
DrealErrorMessage( DrealMainWindow, "No element to display !" );
}
else
{
DrealAddZoom();
DrealLambdaGridX = ( DrealBoundXmin / RDS_PHYSICAL_GRID ) - 1;
DrealLambdaGridY = ( DrealBoundYmin / RDS_PHYSICAL_GRID ) - 1;
DrealLambdaGridDx = DrealBoundXmax / RDS_PHYSICAL_GRID;
DrealLambdaGridDy = DrealBoundYmax / RDS_PHYSICAL_GRID;
DrealLambdaGridDx = DrealLambdaGridDx - DrealLambdaGridX + 1;
DrealLambdaGridDy = DrealLambdaGridDy - DrealLambdaGridY + 1;
DrealComputeLambdaGrid();
DrealComputeAndDisplayMap();
DrealDisplayFigure( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
}
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomCenter |
| |
\------------------------------------------------------------*/
void DrealZoomCenter( LambdaX, LambdaY )
long LambdaX;
long LambdaY;
{
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealLambdaGridX = LambdaX - ( DrealLambdaGridDx >> 1 );
DrealLambdaGridY = LambdaY - ( DrealLambdaGridDy >> 1 );
DrealComputeLambdaGrid();
DrealComputeAndDisplayMap();
DrealDisplayFigure( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomIn |
| |
\------------------------------------------------------------*/
void DrealZoomIn( LambdaX1, LambdaY1, LambdaX2, LambdaY2 )
long LambdaX1;
long LambdaY1;
long LambdaX2;
long LambdaY2;
{
long Swap;
rdsbegin();
if ( ( LambdaX1 != LambdaX2 ) &&
( LambdaY1 != LambdaY2 ) )
{
if ( LambdaX1 > LambdaX2 )
{
Swap = LambdaX1; LambdaX1 = LambdaX2; LambdaX2 = Swap;
}
if ( LambdaY1 > LambdaY2 )
{
Swap = LambdaY1; LambdaY1 = LambdaY2; LambdaY2 = Swap;
}
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealAddZoom();
DrealLambdaGridX = LambdaX1;
DrealLambdaGridY = LambdaY1;
DrealLambdaGridDx = LambdaX2 - LambdaX1;
DrealLambdaGridDy = LambdaY2 - LambdaY1;
DrealComputeLambdaGrid();
DrealComputeAndDisplayMap();
DrealDisplayFigure( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomPan |
| |
\------------------------------------------------------------*/
void DrealZoomPan( LambdaX1, LambdaY1, LambdaX2, LambdaY2 )
long LambdaX1;
long LambdaY1;
long LambdaX2;
long LambdaY2;
{
rdsbegin();
if ( ( LambdaX1 != LambdaX2 ) ||
( LambdaY1 != LambdaY2 ) )
{
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealLambdaGridX = DrealLambdaGridX + ( LambdaX1 - LambdaX2 );
DrealLambdaGridY = DrealLambdaGridY + ( LambdaY1 - LambdaY2 );
DrealComputeLambdaGrid();
DrealComputeAndDisplayMap();
DrealDisplayFigure( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealZoomRefresh |
| |
\------------------------------------------------------------*/
void DrealZoomRefresh()
{
rdsbegin();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealDisplayFigure( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}

View File

@ -0,0 +1,95 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : View.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 25/02/93 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_VIEW
# define DREAL_VIEW
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_PERCENT_ZOOM 30
# define DREAL_PERCENT_ZOOM_MIN 5
# define DREAL_PERCENT_ZOOM_MAX 95
# define DREAL_PERCENT_MOVE 30
# define DREAL_PERCENT_MOVE_MIN 5
# define DREAL_PERCENT_MOVE_MAX 95
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
typedef struct drealzoom
{
struct drealzoom *NEXT;
long X;
long Y;
long DX;
long DY;
} drealzoom;
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern int DrealPercentZoom;
extern int DrealPercentMove;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,289 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : gmx101.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef DREAL_GMX
# define DREAL_GMX
/*------------------------------------------------------------\
| |
| Graphic Context |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Colors Define |
| |
\------------------------------------------------------------*/
# define DREAL_BLACK_COLOR "Black"
# define DREAL_WHITE_COLOR "White"
# define DREAL_TEXT_COLOR "White"
# define DREAL_ACCEPT_COLOR "magenta"
# define DREAL_CURSOR_COLOR "Black"
/*------------------------------------------------------------\
| |
| Dreal Message |
| |
\------------------------------------------------------------*/
# define DREAL_MAX_MESSAGE 7
# define DREAL_MESSAGE_X 0
# define DREAL_MESSAGE_Y 1
# define DREAL_MESSAGE_DX 2
# define DREAL_MESSAGE_DY 3
# define DREAL_MESSAGE_MODE 4
# define DREAL_MESSAGE_INFO 5
# define DREAL_MESSAGE_PROMPT 6
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Dreal Widget |
| |
\------------------------------------------------------------*/
extern XtAppContext DrealApplication;
extern Widget DrealTopLevel;
extern Widget DrealMainWindow;
extern Widget DrealMainForm;
extern Widget DrealMenuBar;
extern Widget DrealGraphicFrame;
extern Widget DrealGraphicWindow;
extern Display *DrealGraphicDisplay;
extern Widget DrealMessageMainPaned;
extern Widget DrealMessageMainForm;
extern Widget DrealMessageForm [ DREAL_MAX_MESSAGE ];
extern Widget DrealMessageText [ DREAL_MAX_MESSAGE ];
extern Widget DrealMessageLabel [ DREAL_MAX_MESSAGE ];
extern Widget DrealMessageFrame [ DREAL_MAX_MESSAGE ];
/*------------------------------------------------------------\
| |
| Dreal Graphic Context |
| |
\------------------------------------------------------------*/
extern GC DrealLayerFillGC [ RDS_ALL_LAYER ];
extern GC DrealLayerDrawGC [ RDS_ALL_LAYER ];
extern GC DrealLayerAcceptGC [ RDS_ALL_LAYER ];
extern GC DrealLayerEquiGC [ RDS_ALL_LAYER ];
extern GC DrealAcceptDrawGC;
extern GC DrealEquiDrawGC;
extern GC DrealBackgroundGC;
extern GC DrealGridGC;
extern GC DrealXorGC;
extern GC DrealSmallTextGC;
extern GC DrealMediumTextGC;
extern GC DrealLargeTextGC;
extern XFontStruct *DrealSmallTextFont;
extern XFontStruct *DrealLargeTextFont;
extern XFontStruct *DrealMediumTextFont;
/*------------------------------------------------------------\
| |
| Dreal Graphic Pixmap |
| |
\------------------------------------------------------------*/
extern Pixmap DrealGraphicPixmap;
/*------------------------------------------------------------\
| |
| Dreal Colormap |
| |
\------------------------------------------------------------*/
extern Colormap DrealColorMap;
/*------------------------------------------------------------\
| |
| Dreal Graphic Size |
| |
\------------------------------------------------------------*/
extern Dimension DrealOldGraphicDx;
extern Dimension DrealOldGraphicDy;
extern Dimension DrealGraphicDx;
extern Dimension DrealGraphicDy;
/*------------------------------------------------------------\
| |
| Dreal Lambda Grid |
| |
\------------------------------------------------------------*/
extern float DrealLambdaGridStep;
extern long DrealLambdaGridX;
extern long DrealLambdaGridY;
extern long DrealLambdaGridDx;
extern long DrealLambdaGridDy;
extern long DrealPixelGridX;
extern long DrealPixelGridY;
/*------------------------------------------------------------\
| |
| User Lambda Grid |
| |
\------------------------------------------------------------*/
extern long DrealLambdaUserGridDx;
extern long DrealLambdaUserGridDy;
extern char DrealLambdaUserGrid;
/*------------------------------------------------------------\
| |
| Dreal Cursor |
| |
\------------------------------------------------------------*/
extern long DrealLambdaCursorX;
extern long DrealLambdaCursorY;
/*------------------------------------------------------------\
| |
| Dreal Change Title |
| |
\------------------------------------------------------------*/
extern void DrealChangeTopLevelTitle();
/*------------------------------------------------------------\
| |
| Dreal Event |
| |
\------------------------------------------------------------*/
extern char DrealCountEventZoom;
extern char DrealCountEventEdit;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealInitializeRessources |
| |
\------------------------------------------------------------*/
extern void DrealInitializeRessources();
/*------------------------------------------------------------\
| |
| Dreal Edit Mode |
| |
\------------------------------------------------------------*/
extern void DrealChangeEditMode();
extern void DrealContinueEditMode();
/*------------------------------------------------------------\
| |
| DrealDisplayMessage |
| |
\------------------------------------------------------------*/
extern void DrealDisplayMessage();
extern void DrealPromptEditMeasure();
/*------------------------------------------------------------\
| |
| Dreal Graphic Window |
| |
\------------------------------------------------------------*/
extern void DrealClearGraphicWindow();
extern void DrealResizeGraphicWindow();
extern void DrealRefreshGraphicWindow();
/*------------------------------------------------------------\
| |
| Dreal Lambda Grid |
| |
\------------------------------------------------------------*/
extern void DrealComputeLambdaGrid();
extern void DrealResizeLambdaGrid();
/*------------------------------------------------------------\
| |
| Dreal Display Figure |
| |
\------------------------------------------------------------*/
extern void DrealDisplayFigure();
extern void DrealDisplayRectangle();
/*------------------------------------------------------------\
| |
| Dreal Cursor |
| |
\------------------------------------------------------------*/
extern void DrealDisplayCursor();
extern void DrealUndisplayCursor();
# endif

View File

@ -0,0 +1,703 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Colors.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "rds.h"
# include "GSB.h"
# include "GMX.h"
# include "GMX_color.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
GC DrealLayerFillGC [ RDS_ALL_LAYER ];
GC DrealLayerDrawGC [ RDS_ALL_LAYER ];
GC DrealLayerAcceptGC [ RDS_ALL_LAYER ];
GC DrealAcceptDrawGC;
GC DrealBackgroundGC;
GC DrealGridGC;
GC DrealSmallTextGC;
GC DrealMediumTextGC;
GC DrealLargeTextGC;
GC DrealXorGCXor;
GC DrealXorGCInvert;
GC DrealXorGC;
XFontStruct *DrealLargeTextFont;
XFontStruct *DrealMediumTextFont;
XFontStruct *DrealSmallTextFont;
Colormap DrealColorMap;
/*------------------------------------------------------------\
| |
| Layer Color Define |
| |
\------------------------------------------------------------*/
static char DrealLayerPatternDefine[ RDS_ALL_LAYER ] =
{
0, /* RDS_NWELL */
0, /* RDS_PWELL */
0, /* RDS_NIMP */
0, /* RDS_PIMP */
0, /* RDS_ACTIV */
1, /* RDS_NDIF */
1, /* RDS_PDIF */
1, /* RDS_NTIE */
1, /* RDS_PTIE */
3, /* RDS_POLY */
2, /* RDS_GATE */
3, /* RDS_VPOLY */
12, /* RDS_TPOLY */
2, /* RDS_POLY2 */
5, /* RDS_CONT */
3, /* RDS_TPOLY2 */
5, /* RDS_TCONT */
5, /* RDS_CONT2 */
4, /* RDS_ALU1 */
4, /* RDS_VALU1 */
12, /* RDS_TALU1 */
5, /* RDS_VIA1 */
5, /* RDS_TVIA1 */
6, /* RDS_ALU2 */
6, /* RDS_VALU2 */
12, /* RDS_TALU2 */
5, /* RDS_VIA2 */
5, /* RDS_TVIA2 */
8, /* RDS_ALU3 */
8, /* RDS_VALU3 */
12, /* RDS_TALU3 */
5, /* RDS_VIA3 */
5, /* RDS_TVIA3 */
9, /* RDS_ALU4 */
9, /* RDS_VALU4 */
14, /* RDS_TALU4 */
5, /* RDS_VIA4 */
5, /* RDS_TVIA4 */
10, /* RDS_ALU5 */
10, /* RDS_VALU5 */
12, /* RDS_TALU5 */
13, /* RDS_VIA5 */
5, /* RDS_TVIA5 */
11, /* RDS_ALU6 */
11, /* RDS_VALU6 */
12, /* RDS_TALU6 */
5, /* RDS_VIA6 */
5, /* RDS_TVIA6 */
8, /* RDS_ALU7 */
8, /* RDS_VALU7 */
12, /* RDS_TALU7 */
5, /* RDS_VIA7 */
5, /* RDS_TVIA7 */
9, /* RDS_ALU8 */
9, /* RDS_VALU8 */
12, /* RDS_TALU8 */
5, /* RDS_VIA8 */
5, /* RDS_TVIA8 */
10, /* RDS_ALU9 */
7, /* RDS_CPAS */
7, /* RDS_REF */
0, /* RDS_USER0 */
0, /* RDS_USER1 */
0, /* RDS_USER2 */
0, /* RDS_USER3 */
0, /* RDS_USER4 */
0, /* RDS_USER5 */
0, /* RDS_USER6 */
0, /* RDS_USER7 */
0, /* RDS_USER8 */
0, /* RDS_USER9 */
0 /* RDS_ABOX */
};
static char DrealPatternBits[ DREAL_MAX_PATTERN ][ DREAL_PATTERN_SQUARE ] =
{ /* FOR SUBST 0 */
{
0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf7, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xf7, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
}
, /* FOR DIF & TIE 1 */
{
0x77, 0x77, 0xbb, 0xbb, 0xdd, 0xdd, 0xee, 0xee, 0x77, 0x77, 0xbb, 0xbb,
0xdd, 0xdd, 0xee, 0xee, 0x77, 0x77, 0xbb, 0xbb, 0xdd, 0xdd, 0xee, 0xee,
0x77, 0x77, 0xbb, 0xbb, 0xdd, 0xdd, 0xee, 0xee
}
, /* FOR GATE 2 */
{
0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55,
0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55,
0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55
}
, /* FOR POLY 3 */
{
0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa
}
, /* FOR ALU1 4 */
{
0x88, 0x88, 0x44, 0x44, 0x22, 0x22, 0x11, 0x11, 0x88, 0x88, 0x44, 0x44,
0x22, 0x22, 0x11, 0x11, 0x88, 0x88, 0x44, 0x44, 0x22, 0x22, 0x11, 0x11,
0x88, 0x88, 0x44, 0x44, 0x22, 0x22, 0x11, 0x11
}
, /* FOR CONT 5 */
{
0x55, 0x55, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff,
0x55, 0x55, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff,
0x55, 0x55, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff
}
, /* FOR ALU2 6 */
{
0x11, 0x11, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00,
0x44, 0x44, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00,
0x11, 0x11, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00
}
, /* FOR REF 7 */
{
0xaa, 0xaa, 0x11, 0x11, 0xaa, 0xaa, 0x44, 0x44, 0xaa, 0xaa, 0x11, 0x11,
0xaa, 0xaa, 0x44, 0x44, 0xaa, 0xaa, 0x11, 0x11, 0xaa, 0xaa, 0x44, 0x44,
0xaa, 0xaa, 0x11, 0x11, 0xaa, 0xaa, 0x44, 0x44
}
, /* FOR ALU3 8 */
{
0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11,
0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11,
0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11
}
, /* FOR ALU4 9 */
{
0x88, 0x88, 0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88, 0x22, 0x22,
0x88, 0x88, 0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88, 0x22, 0x22,
0x88, 0x88, 0x22, 0x22, 0x88, 0x88, 0x22, 0x22
}
, /* FOR ALU5 10 */
{
0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88,
0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88,
0x22, 0x22, 0x88, 0x88, 0x22, 0x22, 0x88, 0x88
}
, /* FOR ALU6 11 */
{
0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44,
0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44,
0x11, 0x11, 0x44, 0x44, 0x11, 0x11, 0x44, 0x44
}
, /* FOR TPOLY, TALU1 12 */
{
0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00
}
, /* FOR VIA 13 */
{
0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa,
0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa,
0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa
}
, /* FOR TALUx 14 */
{
0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00
}
, /* FOR USER 15 */
{
0x44, 0x44, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00,
0x11, 0x11, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00,
0x44, 0x44, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00
}
,
{
0xee, 0xee, 0x77, 0x77, 0xbb, 0xbb, 0xdd, 0xdd, 0xee, 0xee, 0x77, 0x77,
0xbb, 0xbb, 0xdd, 0xdd, 0xee, 0xee, 0x77, 0x77, 0xbb, 0xbb, 0xdd, 0xdd,
0xee, 0xee, 0x77, 0x77, 0xbb, 0xbb, 0xdd, 0xdd
}
,
{
0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa
}
,
{
0xdd, 0xdd, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0xd5, 0xd5, 0xaa, 0xaa,
0x55, 0x55, 0xaa, 0xaa, 0xdd, 0xdd, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
0xdd, 0xd5, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa
}
,
{
0x77, 0x77, 0xaa, 0xaa, 0xd5, 0xd5, 0xaa, 0xaa, 0x77, 0x77, 0xaa, 0xaa,
0xdd, 0x5d, 0xaa, 0xaa, 0x77, 0x77, 0xaa, 0xaa, 0xd5, 0xd5, 0xaa, 0xaa,
0x77, 0x77, 0xaa, 0xaa, 0x5d, 0xdd, 0xaa, 0xaa
}
,
{
0x55, 0x55, 0xbb, 0xbb, 0x55, 0x55, 0xfe, 0xfe, 0x55, 0x55, 0xbb, 0xbb,
0x55, 0x55, 0xee, 0xef, 0x55, 0x55, 0xbb, 0xbb, 0x55, 0x55, 0xfe, 0xfe,
0x55, 0x55, 0xbb, 0xbb, 0x55, 0x55, 0xef, 0xef
}
,
{
0xff, 0xff, 0xaa, 0xaa, 0x77, 0x77, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa,
0x77, 0x7f, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa, 0x77, 0x77, 0xaa, 0xaa,
0xff, 0xff, 0xaa, 0xaa, 0x7f, 0x7f, 0xaa, 0xaa
}
,
{
0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa,
0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa,
0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff, 0xaa, 0xaa
}
,
{
0x55, 0x55, 0xff, 0xff, 0xdd, 0xdd, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff,
0x5d, 0xdd, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff, 0xdd, 0xdd, 0xff, 0xff,
0x55, 0x55, 0xff, 0xff, 0x5d, 0x5d, 0xff, 0xff
}
,
{
0xee, 0xee, 0xff, 0xff, 0xbb, 0xba, 0xff, 0xff, 0xee, 0xee, 0xff, 0xff,
0xab, 0xbb, 0xff, 0xff, 0xee, 0xee, 0xff, 0xff, 0xbb, 0xba, 0xff, 0xff,
0xee, 0xee, 0xff, 0xff, 0xbb, 0xab, 0xff, 0xff
}
,
{
0xff, 0xff, 0xee, 0xee, 0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0xee, 0xee,
0xff, 0xff, 0xbf, 0xbb, 0xff, 0xff, 0xee, 0xee, 0xff, 0xff, 0xfb, 0xfb,
0xff, 0xff, 0xee, 0xee, 0xff, 0xff, 0xbf, 0xbf
}
,
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbb, 0xbb, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xfb, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbb, 0xbb,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfb
}
,
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08
}
,
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x77, 0x77, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xf7, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x77, 0x77,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf7
}
,
{
0x10, 0x10, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x01, 0x11, 0x00, 0x00,
0x44, 0x44, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00,
0x01, 0x01, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00
}
,
{
0x00, 0x00, 0x11, 0x51, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x15, 0x15,
0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x51, 0x11, 0x00, 0x00, 0x44, 0x44,
0x00, 0x00, 0x15, 0x15, 0x00, 0x00, 0x44, 0x44
}
,
{
0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x8a, 0x88, 0x00, 0x00, 0xaa, 0xaa,
0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x8a, 0x8a,
0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x88, 0x88
}
,
{
0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00
}
,
{
0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x88, 0x88, 0x55, 0x55, 0x00, 0x00,
0x55, 0x55, 0x80, 0x80, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x88, 0x88,
0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x88, 0x80
}
,
{
0x22, 0x22, 0x55, 0x55, 0x80, 0x80, 0x55, 0x55, 0x22, 0x22, 0x55, 0x55,
0x88, 0x08, 0x55, 0x55, 0x22, 0x22, 0x55, 0x55, 0x80, 0x80, 0x55, 0x55,
0x22, 0x22, 0x55, 0x55, 0x08, 0x08, 0x55, 0x55
}
,
{
0x88, 0x88, 0x55, 0x55, 0x22, 0xa2, 0x55, 0x55, 0x88, 0x88, 0x55, 0x55,
0x2a, 0x2a, 0x55, 0x55, 0x88, 0x88, 0x55, 0x55, 0xa2, 0x22, 0x55, 0x55,
0x88, 0x88, 0x55, 0x55, 0x2a, 0x2a, 0x55, 0x55
}
,
{
0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x54, 0x54, 0xaa, 0xaa, 0x55, 0x55,
0xaa, 0xaa, 0x44, 0x44, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x44, 0x54,
0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x44, 0x44
}
};
static Pixmap DrealPattern[ DREAL_MAX_PATTERN ];
static char *DrealColorName[ 5 ] =
{
DREAL_BLACK_COLOR,
DREAL_WHITE_COLOR,
DREAL_TEXT_COLOR ,
DREAL_ACCEPT_COLOR,
DREAL_CURSOR_COLOR
};
static int DrealColor[ DREAL_MAX_COLOR ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealSwitchColormap |
| |
\------------------------------------------------------------*/
void DrealInitializeColorMap()
{
Display *ADisplay;
Screen *AScreen;
ADisplay = XtDisplay( DrealTopLevel );
AScreen = XtScreen( DrealTopLevel );
DrealColorMap = DefaultColormapOfScreen( AScreen );
if ( DREAL_SWITCH_COLOR_MAP )
{
DrealColorMap = XCopyColormapAndFree( ADisplay, DrealColorMap );
XInstallColormap( ADisplay, DrealColorMap );
XtVaSetValues( DrealTopLevel, XmNcolormap, DrealColorMap, NULL );
}
}
/*------------------------------------------------------------\
| |
| DrealInitializeColors |
| |
\------------------------------------------------------------*/
void DrealInitializeColors()
{
XColor ForgetIt;
XColor GetIt;
Window Root;
int Counter;
char Error;
char *ColorName;
rdsbegin();
if ( DREAL_CURSOR_COLOR_NAME != (char *)NULL )
{
DrealColorName[ 4 ] = DREAL_CURSOR_COLOR_NAME;
}
Error = False;
for ( Counter = 0; Counter < DREAL_MAX_COLOR; Counter++ )
{
if ( Counter >= 5 )
{
ColorName = DREAL_RDS_LAYER_NAME_TABLE[ Counter - 5 ][ 1 ];
}
else
{
ColorName = DrealColorName[ Counter ];
}
if ( ColorName != (char *)NULL )
{
if ( ! XAllocNamedColor( DrealGraphicDisplay,
DrealColorMap, ColorName,
&GetIt, &ForgetIt ) )
{
fprintf( stderr, "\nGmx: Unable to allocate color '%s' !\n",
ColorName );
Error = True;
}
DrealColor[ Counter ] = GetIt.pixel;
}
else
{
DrealColor[ Counter ] = DrealColor[ 0 ];
}
}
if ( Error == True ) exit( 1 );
Root = RootWindowOfScreen ( XtScreen ( DrealGraphicWindow ) );
for ( Counter = 0; Counter < DREAL_MAX_PATTERN; Counter++ )
{
DrealPattern[ Counter ] =
XCreateBitmapFromData( DrealGraphicDisplay,
Root,
DrealPatternBits[ Counter ],
DREAL_PATTERN_WIDTH,
DREAL_PATTERN_HEIGHT );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealChangeCursorContext |
| |
\------------------------------------------------------------*/
void DrealChangeCursorContext()
{
XGCValues GraphicValue;
if ( DREAL_XOR_CURSOR == DREAL_TRUE )
{
DrealXorGC = DrealXorGCXor;
}
else
{
DrealXorGC = DrealXorGCInvert;
}
}
/*------------------------------------------------------------\
| |
| DrealInitializeGraphicContext |
| |
\------------------------------------------------------------*/
void DrealInitializeGraphicContext()
{
XGCValues GraphicValue;
int Counter;
Window Root;
char Pattern;
rdsbegin();
DrealLargeTextFont = XLoadQueryFont( DrealGraphicDisplay,
DREAL_LARGE_TEXT_FONT_NAME );
DrealMediumTextFont = XLoadQueryFont( DrealGraphicDisplay,
DREAL_MEDIUM_TEXT_FONT_NAME );
DrealSmallTextFont = XLoadQueryFont( DrealGraphicDisplay,
DREAL_SMALL_TEXT_FONT_NAME );
GraphicValue.foreground = DrealColor[ 0 ]; /* Black */
GraphicValue.background = DrealColor[ 0 ];
GraphicValue.plane_mask = AllPlanes;
Root = RootWindowOfScreen ( XtScreen ( DrealGraphicWindow ) ),
DrealBackgroundGC = XCreateGC ( DrealGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
GraphicValue.foreground = DrealColor[ 1 ]; /* White */
DrealGridGC = XCreateGC ( DrealGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
GraphicValue.foreground = DrealColor[ 3 ];
DrealAcceptDrawGC = XCreateGC ( DrealGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
GraphicValue.foreground = DrealColor[ 2 ]; /* Text */
DrealSmallTextGC = XCreateGC ( DrealGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
DrealMediumTextGC = XCreateGC ( DrealGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
DrealLargeTextGC = XCreateGC ( DrealGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
XSetFont( DrealGraphicDisplay,
DrealSmallTextGC, DrealSmallTextFont->fid );
XSetFont( DrealGraphicDisplay,
DrealMediumTextGC, DrealMediumTextFont->fid );
XSetFont( DrealGraphicDisplay,
DrealLargeTextGC, DrealLargeTextFont->fid );
GraphicValue.background = DrealColor[ 4 ]; /* Xor Color */
GraphicValue.foreground = DrealColor[ 4 ]; /* Xor Color */
GraphicValue.function = GXxor;
DrealXorGCXor = XCreateGC ( DrealGraphicDisplay,
Root,
( GCFunction |
GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
GraphicValue.function = GXinvert;
DrealXorGCInvert = XCreateGC ( DrealGraphicDisplay,
Root,
( GCFunction |
GCPlaneMask ),
&GraphicValue );
DrealChangeCursorContext();
GraphicValue.background = DrealColor[ 0 ]; /* Black */
GraphicValue.foreground = DrealColor[ 1 ]; /* White */
for ( Counter = 0; Counter < RDS_ALL_LAYER; Counter++ )
{
if ( DREAL_RDS_LAYER_NAME_TABLE[ Counter ][ 0 ] != (char *)NULL )
{
Pattern = DREAL_RDS_LAYER_PATTERN_TABLE[ Counter ];
if ( ( Pattern < 0 ) ||
( Pattern >= DREAL_MAX_PATTERN ) )
{
Pattern = DrealLayerPatternDefine[ Counter ];
}
GraphicValue.stipple = DrealPattern[ Pattern ];
GraphicValue.fill_style = FillStippled;
GraphicValue.foreground = DrealColor[ 3 ];
DrealLayerAcceptGC[ Counter ] =
XCreateGC ( DrealGraphicDisplay,
Root,
( GCStipple |
GCForeground |
GCBackground |
GCFillStyle |
GCPlaneMask ),
&GraphicValue );
GraphicValue.foreground = DrealColor[ Counter + 5 ];
DrealLayerFillGC[ Counter ] =
XCreateGC ( DrealGraphicDisplay,
Root,
( GCStipple |
GCForeground |
GCBackground |
GCFillStyle |
GCPlaneMask ),
&GraphicValue );
DrealLayerDrawGC[ Counter ] =
XCreateGC ( DrealGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
}
}
rdsend();
}

View File

@ -0,0 +1,92 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Color.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_COLOR
# define DREAL_COLOR
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Pattern |
| |
\------------------------------------------------------------*/
# define DREAL_PATTERN_WIDTH 16
# define DREAL_PATTERN_HEIGHT 16
# define DREAL_PATTERN_SQUARE 32
# define DREAL_MAX_PATTERN 38
# define DREAL_MAX_COLOR ( RDS_ALL_LAYER + 5 )
# define DREAL_LARGE_TEXT_FONT_NAME "9x15"
# define DREAL_MEDIUM_TEXT_FONT_NAME "7x13"
# define DREAL_SMALL_TEXT_FONT_NAME "5x8"
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealInitializeGraphicContext();
extern void DrealInitializeColors();
extern void DrealChangeCursorContext();
extern void DrealInitializeColorMap();
# endif

View File

@ -0,0 +1,538 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Cursor.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <X11/Intrinsic.h>
# include <X11/StringDefs.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GSB.h"
# include "GMX.h"
# include "GMX_view.h"
# include "GMX_grid.h"
# include "GMX_cursor.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Buffer |
| |
\------------------------------------------------------------*/
static char DrealCursorBuffer[ DREAL_MAX_CURSOR_BUFFER ];
/*------------------------------------------------------------\
| |
| Coordinates |
| |
\------------------------------------------------------------*/
Position DrealCursorX = 0;
Position DrealCursorY = 0;
Position DrealCursorSaveX = 0;
Position DrealCursorSaveY = 0;
char DrealCursorSaved = DREAL_FALSE;
char DrealCursorInside = DREAL_FALSE;
char DrealCursorType = DREAL_INPUT_HALF_BOX;
long DrealLambdaCursorX = 0;
long DrealLambdaCursorY = 0;
long DrealPixelCursorX = 0;
long DrealPixelCursorY = 0;
long DrealLambdaCursorSaveX[ 2 ] = { 0, 0 };
long DrealLambdaCursorSaveY[ 2 ] = { 0, 0 };
char DrealCursorIndex = 0;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealComputeCursor |
| |
\------------------------------------------------------------*/
void DrealComputeCursor( X, Y )
Position X;
Position Y;
{
rdsbegin();
Y = DrealGraphicDy - Y;
DrealLambdaCursorX = X + DrealPixelGridX;
DrealLambdaCursorY = Y + DrealPixelGridY;
if ( DrealLambdaCursorX < 0 )
{
DrealLambdaCursorX = ((float)(DrealLambdaCursorX) / DrealLambdaGridStep) - 0.5 ;
}
else
{
DrealLambdaCursorX = ((float)(DrealLambdaCursorX) / DrealLambdaGridStep) + 0.5 ;
}
if ( DrealLambdaCursorY < 0 )
{
DrealLambdaCursorY = ((float)(DrealLambdaCursorY) / DrealLambdaGridStep) - 0.5 ;
}
else
{
DrealLambdaCursorY = ((float)(DrealLambdaCursorY) / DrealLambdaGridStep) + 0.5 ;
}
DrealPixelCursorX = ((float)(DrealLambdaCursorX) * DrealLambdaGridStep);
DrealPixelCursorY = ((float)(DrealLambdaCursorY) * DrealLambdaGridStep);
DrealCursorX = DrealPixelCursorX - DrealPixelGridX;
DrealCursorY = DrealPixelCursorY - DrealPixelGridY;
DrealCursorY = DrealGraphicDy - DrealCursorY;
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealDisplayCoordinates |
| |
\------------------------------------------------------------*/
void DrealDisplayCoordinates()
{
rdsbegin();
sprintf( DrealCursorBuffer, "%.3f",
(float)( DrealLambdaCursorX ) * DREAL_PHYSICAL_GRID_TO_MICRON );
DrealDisplayMessage( DREAL_MESSAGE_X, DrealCursorBuffer );
sprintf( DrealCursorBuffer, "%.3f",
(float)( DrealLambdaCursorY ) * DREAL_PHYSICAL_GRID_TO_MICRON );
DrealDisplayMessage( DREAL_MESSAGE_Y, DrealCursorBuffer );
sprintf( DrealCursorBuffer, "%.3f",
(float)( DrealLambdaCursorX - DrealLambdaCursorSaveX[0] ) *
DREAL_PHYSICAL_GRID_TO_MICRON );
DrealDisplayMessage( DREAL_MESSAGE_DX, DrealCursorBuffer );
sprintf( DrealCursorBuffer, "%.3f",
(float)( DrealLambdaCursorY - DrealLambdaCursorSaveY[0] ) *
DREAL_PHYSICAL_GRID_TO_MICRON );
DrealDisplayMessage( DREAL_MESSAGE_DY, DrealCursorBuffer );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealPointCursor |
| |
\------------------------------------------------------------*/
void DrealPointCursor()
{
rdsbegin();
DrealUndisplayCursor();
DrealLambdaCursorSaveX[ DrealCursorIndex ] = DrealLambdaCursorX;
DrealLambdaCursorSaveY[ DrealCursorIndex ] = DrealLambdaCursorY;
DrealCursorIndex = DrealCursorIndex + 1;
DrealDisplayCursor();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealResetCursor |
| |
\------------------------------------------------------------*/
void DrealResetCursor()
{
rdsbegin();
DrealUndisplayCursor();
DrealCursorIndex = DrealCursorIndex - 1;
DrealDisplayCursor();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealChangeCursor |
| |
\------------------------------------------------------------*/
void DrealChangeCursorType( ArrayX, ArrayY, Index, Type )
long *ArrayX;
long *ArrayY;
char Index;
char Type;
{
rdsbegin();
DrealUndisplayCursor();
DrealCursorType = Type;
DrealCursorIndex = Index;
if ( Index != 0 )
{
DrealLambdaCursorSaveX[ 0 ] = ArrayX[0];
DrealLambdaCursorSaveY[ 0 ] = ArrayY[0];
DrealLambdaCursorSaveX[ 1 ] = ArrayX[1];
DrealLambdaCursorSaveY[ 1 ] = ArrayY[1];
}
DrealDisplayCursor();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealDrawCursor |
| |
\------------------------------------------------------------*/
void DrealDrawCursor()
{
long X1;
long Y1;
long X2;
long Y2;
long DeltaX;
long DeltaY;
long Swap;
char DrawLine;
rdsbegin();
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
DrealCursorSaveX - DREAL_CURSOR_SIZE,
DrealCursorSaveY - DREAL_CURSOR_SIZE,
DrealCursorSaveX + DREAL_CURSOR_SIZE,
DrealCursorSaveY + DREAL_CURSOR_SIZE );
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
DrealCursorSaveX - DREAL_CURSOR_SIZE,
DrealCursorSaveY + DREAL_CURSOR_SIZE,
DrealCursorSaveX + DREAL_CURSOR_SIZE,
DrealCursorSaveY - DREAL_CURSOR_SIZE );
if ( DrealCursorIndex > 0 )
{
X1 = (float)(DrealLambdaCursorSaveX[0]) * DrealLambdaGridStep;
Y1 = (float)(DrealLambdaCursorSaveY[0]) * DrealLambdaGridStep;
X1 = X1 - DrealPixelGridX;
Y1 = Y1 - DrealPixelGridY;
Y1 = DrealGraphicDy - Y1;
if ( DrealCursorIndex == 1 )
{
X2 = DrealCursorSaveX;
Y2 = DrealCursorSaveY;
}
else
{
X2 = (float)(DrealLambdaCursorSaveX[1]) * DrealLambdaGridStep;
Y2 = (float)(DrealLambdaCursorSaveY[1]) * DrealLambdaGridStep;
X2 = X2 - DrealPixelGridX;
Y2 = Y2 - DrealPixelGridY;
Y2 = DrealGraphicDy - Y2;
}
switch( DrealCursorType )
{
case DREAL_INPUT_POINT :
break;
case DREAL_INPUT_LINE :
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
X1, Y1, X2, Y2 );
break;
case DREAL_INPUT_HALF_BOX :
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
X1, Y1, X2, Y1 );
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
X2, Y1, X2, Y2 );
break;
case DREAL_INPUT_ORTHO :
case DREAL_INPUT_SORTHO :
case DREAL_INPUT_LSTRING :
DeltaX = X2 - X1; if ( DeltaX < 0 ) DeltaX = - DeltaX;
DeltaY = Y2 - Y1; if ( DeltaY < 0 ) DeltaY = - DeltaY;
if ( DeltaX > DeltaY )
{
Y2 = Y1;
if ( X1 > X2 ) { Swap = X1; X1 = X2; X2 = Swap; }
if ( X1 < 0 ) X1 = 0;
if ( X2 > DrealGraphicDx ) X2 = DrealGraphicDx;
if ( ( X1 < X2 ) &&
( Y1 >= 0 ) &&
( Y1 <= DrealGraphicDy ) )
{
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
X1, Y1, X2, Y2 );
}
}
else
{
X2 = X1;
if ( Y1 > Y2 ) { Swap = Y1; Y1 = Y2; Y2 = Swap; }
if ( Y1 < 0 ) Y1 = 0;
if ( Y2 > DrealGraphicDy ) Y2 = DrealGraphicDy;
if ( ( Y1 < Y2 ) &&
( X1 >= 0 ) &&
( X1 <= DrealGraphicDx ) )
{
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
X1, Y1, X2, Y2 );
}
}
break;
case DREAL_INPUT_BOX :
if ( X1 > X2 ) { Swap = X1; X1 = X2; X2 = Swap; }
if ( Y1 > Y2 ) { Swap = Y1; Y1 = Y2; Y2 = Swap; }
DrawLine = 0;
if ( X1 < 0 )
{
X1 = 0; DrawLine |= DREAL_WEST_MASK;
}
if ( X2 > DrealGraphicDx )
{
X2 = DrealGraphicDx; DrawLine |= DREAL_EAST_MASK;
}
if ( Y1 < 0 )
{
Y1 = 0; DrawLine |= DREAL_SOUTH_MASK;
}
if ( Y2 > DrealGraphicDy )
{
Y2 = DrealGraphicDy; DrawLine |= DREAL_NORTH_MASK;
}
if ( DrawLine == 0 )
{
XDrawRectangle( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
X1, Y1,
X2 - X1, Y2 - Y1 );
}
else
{
if ( ( DrawLine & DREAL_WEST_MASK ) == 0 )
{
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
X1, Y2,
X1, Y1 );
}
if ( ( DrawLine & DREAL_EAST_MASK ) == 0 )
{
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
X2, Y2,
X2, Y1 );
}
if ( ( DrawLine & DREAL_SOUTH_MASK ) == 0 )
{
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
X1, Y1,
X2, Y1 );
}
if ( ( DrawLine & DREAL_NORTH_MASK ) == 0 )
{
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealXorGC,
X1, Y2,
X2, Y2 );
}
}
break;
}
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealUndisplayCursor |
| |
\------------------------------------------------------------*/
void DrealUndisplayCursor()
{
rdsbegin();
if ( DrealCursorInside == DREAL_TRUE )
{
if ( DrealCursorSaved == DREAL_TRUE )
{
DrealDrawCursor();
}
DrealCursorSaved = DREAL_FALSE;
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealDisplayCursor |
| |
\------------------------------------------------------------*/
void DrealDisplayCursor()
{
rdsbegin();
if ( DrealCursorInside == DREAL_TRUE )
{
if ( DrealCursorSaved == DREAL_TRUE )
{
DrealDrawCursor();
DrealCursorSaved = DREAL_FALSE;
}
if ( ( DrealCursorY >= 0 ) &&
( DrealCursorX <= DrealGraphicDx ) )
{
DrealCursorSaveX = DrealCursorX;
DrealCursorSaveY = DrealCursorY;
DrealDrawCursor();
DrealCursorSaved = DREAL_TRUE;
}
}
rdsend();
}

View File

@ -0,0 +1,95 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Cursor.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_CURSOR
# define DREAL_CURSOR
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_MAX_CURSOR_BUFFER 128
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern Position DrealCursorX;
extern Position DrealCursorY;
extern Position DrealCursorSaveX;
extern Position DrealCursorSaveY;
extern char DrealCursorSaved;
extern char DrealCursorInside;
extern long DrealLambdaCursorX;
extern long DrealLambdaCursorY;
extern long DrealPixelCursorX;
extern long DrealPixelCursorY;
extern long DrealPixelCursorX1;
extern long DrealPixelCursorY1;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealComputeCursor();
extern void DrealChangeCursorType();
extern void DrealPointCursor();
extern void DrealResetCursor();
extern void DrealDisplayCoordinates();
# endif

View File

@ -0,0 +1,105 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushB.h>
# include <Xm/Form.h>
# include <Xm/Frame.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GSB.h"
# include "GTB.h"
# include "GMF.h"
# include "GMV.h"
# include "GMT.h"
# include "GMS.h"
# include "GMH.h"
# include "GMX.h"
# include "GMX_dialog.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealInitializeDialog |
| |
\------------------------------------------------------------*/
void DrealInitializeDialog()
{
rdsbegin();
DrealBuildFileDialog();
DrealBuildEditDialog();
DrealBuildViewDialog();
DrealBuildCreateDialog();
DrealBuildToolsDialog();
rdsend();
}

View File

@ -0,0 +1,72 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_DIALOG
# define DREAL_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealInitializeDialog();
# endif

View File

@ -0,0 +1,937 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Event.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <X11/Intrinsic.h>
# include <X11/StringDefs.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GSB.h"
# include "GRD.h"
# include "GMX.h"
# include "GTB.h"
# include "GMV.h"
# include "GMS.h"
# include "GMH.h"
# include "GMX_motif.h"
# include "GMX_grid.h"
# include "GMX_cursor.h"
# include "GMX_event.h"
# include "GMX_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Translation |
| |
\------------------------------------------------------------*/
static String DrealEventTranslation =
"<Btn1Down>: CallbackEvent( 0 )\n\
<Btn3Down>: CallbackEvent( 1 )\n\
<Motion>: CallbackEvent( 2 )\n\
<EnterWindow>: CallbackEvent( 3 )\n\
<LeaveWindow>: CallbackEvent( 4 )\n\
<Key>osfUp: CallbackEvent( 5 )\n\
<Key>osfDown: CallbackEvent( 6 )\n\
<Key>osfLeft: CallbackEvent( 7 )\n\
<Key>osfRight: CallbackEvent( 8 )\n\
<Key>Z: CallbackEvent( 9 )\n\
<Key>M: CallbackEvent( 10 )\n\
<Key>F: CallbackEvent( 11 )\n\
<Key>R: CallbackEvent( 12 )\n\
<Key>U: CallbackEvent( 13 )\n\
<Key>I: CallbackEvent( 14 )\n\
<Key>C: CallbackEvent( 15 )\n\
<Key>P: CallbackEvent( 16 )\n\
Shift<Key>Tab: CallbackEvent( 17 )\n\
<Key>Tab: CallbackEvent( 18 )";
/*------------------------------------------------------------\
| |
| Event Count |
| |
\------------------------------------------------------------*/
static char DrealMaxEventEditTable[] =
{
2, /* DREAL_EDIT_MEASURE */
2, /* DREAL_CREATE_RECTANGLE */
2, /* DREAL_CREATE_ABUTMENTBOX */
1, /* DREAL_SELECT_POINT_IDENTIFY */
1, /* DREAL_SELECT_POINT_COPY */
1, /* DREAL_SELECT_POINT_MOVE */
1, /* DREAL_SELECT_POINT_DELETE */
1, /* DREAL_SELECT_POINT_STRETCH */
1, /* DREAL_SELECT_POINT_MODIFY */
2, /* DREAL_SELECT_WINDOW_IDENTIFY */
2, /* DREAL_SELECT_WINDOW_COPY */
2, /* DREAL_SELECT_WINDOW_MOVE */
2, /* DREAL_SELECT_WINDOW_DELETE */
2, /* DREAL_SELECT_WINDOW_MODIFY */
2, /* DREAL_EDIT_COPY_POINT */
2, /* DREAL_EDIT_COPY_WINDOW */
2, /* DREAL_EDIT_MOVE_POINT */
2, /* DREAL_EDIT_MOVE_WINDOW */
2 /* DREAL_EDIT_STRETCH_POINT */
};
static char DrealInputEventEditTable[] =
{
DREAL_INPUT_HALF_BOX, /* DREAL_EDIT_MEASURE */
DREAL_INPUT_BOX, /* DREAL_CREATE_RECTANGLE */
DREAL_INPUT_BOX, /* DREAL_CREATE_ABUTMENTBOX */
DREAL_INPUT_POINT, /* DREAL_SELECT_POINT_IDENTIFY */
DREAL_INPUT_POINT, /* DREAL_SELECT_POINT_COPY */
DREAL_INPUT_POINT, /* DREAL_SELECT_POINT_MOVE */
DREAL_INPUT_POINT, /* DREAL_SELECT_POINT_DELETE */
DREAL_INPUT_POINT, /* DREAL_SELECT_POINT_STRETCH */
DREAL_INPUT_POINT, /* DREAL_SELECT_POINT_MODIFY */
DREAL_INPUT_BOX, /* DREAL_SELECT_WINDOW_IDENTIFY */
DREAL_INPUT_BOX, /* DREAL_SELECT_WINDOW_COPY */
DREAL_INPUT_BOX, /* DREAL_SELECT_WINDOW_MOVE */
DREAL_INPUT_BOX, /* DREAL_SELECT_WINDOW_DELETE */
DREAL_INPUT_BOX, /* DREAL_SELECT_WINDOW_MODIFY */
DREAL_INPUT_LINE, /* DREAL_EDIT_COPY_POINT */
DREAL_INPUT_LINE, /* DREAL_EDIT_COPY_WINDOW */
DREAL_INPUT_LINE, /* DREAL_EDIT_MOVE_POINT */
DREAL_INPUT_LINE, /* DREAL_EDIT_MOVE_WINDOW */
DREAL_INPUT_ORTHO /* DREAL_EDIT_STRETCH_POINT */
};
static char DrealMaxEventZoomTable[] =
{
1, /* DREAL_ZOOM_CENTER */
2, /* DREAL_ZOOM_IN */
2 /* DREAL_ZOOM_PAN */
};
static char DrealInputEventZoomTable[] =
{
DREAL_INPUT_POINT, /* DREAL_ZOOM_CENTER */
DREAL_INPUT_BOX, /* DREAL_ZOOM_IN */
DREAL_INPUT_LINE /* DREAL_ZOOM_PAN */
};
/*------------------------------------------------------------\
| |
| Translation |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Expose Edit Zoom |
| |
\------------------------------------------------------------*/
static long DrealLambdaEventZoomX[ 2 ] = { 0, 0 };
static long DrealLambdaEventZoomY[ 2 ] = { 0, 0 };
static char DrealMaxEventZoom = 0;
char DrealCountEventZoom = 0;
static long DrealLambdaEventEditX[ 2 ] = { 0, 0 };
static long DrealLambdaEventEditY[ 2 ] = { 0, 0 };
static char DrealMaxEventEdit = 2;
char DrealCountEventEdit = 0;
static char DrealFirstExpose = DREAL_TRUE;
/*------------------------------------------------------------\
| |
| Input |
| |
\------------------------------------------------------------*/
static char DrealInputMode = DREAL_INPUT_HALF_BOX;
static char DrealSaveInputMode = DREAL_INPUT_HALF_BOX;
static char DrealEditMode = DREAL_EDIT_MEASURE;
static char DrealSaveEditMode = DREAL_EDIT_MEASURE;
/*------------------------------------------------------------\
| |
| Edit Message |
| |
\------------------------------------------------------------*/
static void (*DrealPromptMessage)() = DrealPromptEditMeasure;
static void (*DrealSavePromptMessage)() = DrealPromptEditMeasure;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealChangeEditMode |
| |
\------------------------------------------------------------*/
void DrealChangeEditMode( EditMode , PromptMessage )
char EditMode;
void (*PromptMessage)();
{
rdsbegin();
if ( EditMode & DREAL_ZOOM_MARK )
{
EditMode = EditMode & ~DREAL_ZOOM_MARK;
DrealCountEventZoom = 0;
DrealMaxEventZoom = DrealMaxEventZoomTable[ EditMode ];
if ( ! ( DrealEditMode & DREAL_ZOOM_MARK ) )
{
DrealSaveEditMode = DrealEditMode;
DrealSaveInputMode = DrealInputMode;
DrealSavePromptMessage = DrealPromptMessage;
}
DrealInputMode = DrealInputEventZoomTable[ EditMode ];
DrealPromptMessage = PromptMessage;
DrealEditMode = EditMode | DREAL_ZOOM_MARK;
DrealChangeCursorType( NULL, NULL, 0, DrealInputMode );
}
else
{
if ( DrealEditMode & DREAL_ZOOM_MARK )
{
DrealSaveEditMode = EditMode;
DrealSaveInputMode = DrealInputEventEditTable[ EditMode ];
DrealSavePromptMessage = PromptMessage;
DrealCountEventEdit = 0;
DrealMaxEventEdit = DrealMaxEventEditTable[ EditMode ];
}
else
{
if ( DrealEditMode != EditMode )
{
DrealCountEventEdit = 0;
DrealMaxEventEdit = DrealMaxEventEditTable[ EditMode ];
DrealEditMode = EditMode;
DrealInputMode = DrealInputEventEditTable[ EditMode ];
DrealPromptMessage = PromptMessage;
DrealChangeCursorType( NULL, NULL, 0, DrealInputMode );
}
}
DrealEditUnselectAll();
}
DrealPromptMessage();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealContinueEditMode |
| |
\------------------------------------------------------------*/
void DrealContinueEditMode( EditMode , PromptMessage, CountEvent )
char EditMode;
void (*PromptMessage)();
char CountEvent;
{
rdsbegin();
if ( DrealEditMode & DREAL_ZOOM_MARK )
{
DrealSaveEditMode = EditMode;
DrealSaveInputMode = DrealInputEventEditTable[ EditMode ];
DrealSavePromptMessage = PromptMessage;
DrealCountEventEdit = CountEvent;
DrealMaxEventEdit = DrealMaxEventEditTable[ EditMode ];
}
else
{
DrealCountEventEdit = CountEvent;
DrealMaxEventEdit = DrealMaxEventEditTable[ EditMode ];
DrealEditMode = EditMode;
DrealInputMode = DrealInputEventEditTable[ EditMode ];
DrealPromptMessage = PromptMessage;
DrealChangeCursorType( DrealLambdaEventEditX,
DrealLambdaEventEditY,
DrealCountEventEdit,
DrealInputMode );
}
DrealPromptMessage();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealTreatEventZoom |
| |
\------------------------------------------------------------*/
void DrealTreatEventZoom()
{
rdsbegin();
switch ( DrealEditMode )
{
case DREAL_ZOOM_CENTER :
DrealZoomCenter( DrealLambdaEventZoomX[ 0 ],
DrealLambdaEventZoomY[ 0 ] );
break;
case DREAL_ZOOM_IN :
DrealZoomIn( DrealLambdaEventZoomX[ 0 ],
DrealLambdaEventZoomY[ 0 ],
DrealLambdaEventZoomX[ 1 ],
DrealLambdaEventZoomY[ 1 ] );
break;
case DREAL_ZOOM_PAN :
DrealZoomPan( DrealLambdaEventZoomX[ 0 ],
DrealLambdaEventZoomY[ 0 ],
DrealLambdaEventZoomX[ 1 ],
DrealLambdaEventZoomY[ 1 ] );
break;
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealTreatEventEdit |
| |
\------------------------------------------------------------*/
void DrealTreatEventEdit()
{
long DeltaX;
long DeltaY;
long X1;
long X2;
long Y1;
long Y2;
rdsend();
X1 = DrealLambdaEventEditX[0];
X2 = DrealLambdaEventEditX[1];
Y1 = DrealLambdaEventEditY[0];
Y2 = DrealLambdaEventEditY[1];
if ( ( DrealInputMode == DREAL_INPUT_LSTRING ) ||
( DrealInputMode == DREAL_INPUT_ORTHO ) ||
( DrealInputMode == DREAL_INPUT_SORTHO ) )
{
DeltaX = X1 - X2;
DeltaY = Y1 - Y2;
if ( DeltaX < 0 ) DeltaX = - DeltaX;
if ( DeltaY < 0 ) DeltaY = - DeltaY;
if ( DeltaX > DeltaY )
{
Y2 = Y1;
DrealLambdaEventEditX[0] = X2;
DrealLambdaEventEditY[0] = Y2;
}
else
{
X2 = X1;
DrealLambdaEventEditX[0] = X2;
DrealLambdaEventEditY[0] = Y2;
}
}
if ( DrealInputMode == DREAL_INPUT_LSTRING )
{
DrealChangeCursorType( DrealLambdaEventEditX,
DrealLambdaEventEditY,
1, DrealInputMode );
DrealCountEventEdit = 1;
}
else
{
DrealChangeCursorType( NULL, NULL, 0,
DrealInputMode );
DrealCountEventEdit = 0;
}
switch ( DrealEditMode )
{
case DREAL_EDIT_MEASURE :
break;
case DREAL_CREATE_RECTANGLE :
DrealCreateRectangleRds( X1, Y1, X2, Y2 );
break;
case DREAL_CREATE_ABUTMENTBOX :
DrealCreateAbutmentBoxRds( X1, Y1, X2, Y2 );
break;
case DREAL_SELECT_POINT_IDENTIFY :
DrealEditSelectPoint( X1, Y1 );
DrealEditIdentify();
break;
case DREAL_SELECT_WINDOW_IDENTIFY :
DrealEditSelectFence( X1, Y1, X2, Y2 );
DrealEditIdentify();
break;
case DREAL_SELECT_POINT_COPY :
DrealEditSelectPointCopy( X1, Y1 );
break;
case DREAL_SELECT_WINDOW_COPY :
DrealEditSelectWindowCopy( X1, Y1, X2, Y2 );
break;
case DREAL_EDIT_COPY_POINT :
DrealEditCopy( X1, Y1, X2, Y2, 0 );
break;
case DREAL_EDIT_COPY_WINDOW :
DrealEditCopy( X1, Y1, X2, Y2, 1 );
break;
case DREAL_SELECT_POINT_MOVE :
DrealEditSelectPointMove( X1, Y1 );
break;
case DREAL_SELECT_WINDOW_MOVE :
DrealEditSelectWindowMove( X1, Y1, X2, Y2 );
break;
case DREAL_EDIT_MOVE_POINT :
DrealEditMove( X1, Y1, X2, Y2, 0 );
break;
case DREAL_EDIT_MOVE_WINDOW :
DrealEditMove( X1, Y1, X2, Y2, 1 );
break;
case DREAL_SELECT_POINT_DELETE :
DrealEditSelectPointDelete( X1, Y1 );
break;
case DREAL_SELECT_WINDOW_DELETE :
DrealEditSelectWindowDelete( X1, Y1, X2, Y2 );
break;
case DREAL_SELECT_POINT_STRETCH :
DrealEditSelectPointStretch( X1, Y1 );
break;
case DREAL_EDIT_STRETCH_POINT :
DrealEditStretch( X1, Y1, X2, Y2 );
break;
case DREAL_SELECT_POINT_MODIFY :
DrealEditSelectPointModify( X1, Y1 );
break;
case DREAL_SELECT_WINDOW_MODIFY :
DrealEditSelectWindowModify( X1, Y1, X2, Y2 );
break;
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackEvent |
| |
\------------------------------------------------------------*/
void CallbackEvent ( MyWidget, Event, Args, Argc )
Widget MyWidget;
XButtonEvent *Event;
String *Args;
int *Argc;
{
Display *EventDisplay;
char MouseEvent;
int FlagUp;
Position OldLambdaCursorX;
Position OldLambdaCursorY;
rdsbegin();
EventDisplay = Event->display;
MouseEvent = atoi( Args[ 0 ] );
if ( MouseEvent == DREAL_LEAVE )
{
DrealUndisplayCursor();
DrealCursorInside = DREAL_FALSE;
}
else
{
OldLambdaCursorX = DrealLambdaCursorX;
OldLambdaCursorY = DrealLambdaCursorY;
DrealComputeCursor( Event->x, Event->y );
switch ( MouseEvent )
{
case DREAL_B1DN :
if ( DrealEditMode & DREAL_ZOOM_MARK )
{
if ( DrealCountEventZoom < DrealMaxEventZoom )
{
DrealLambdaEventZoomX[ DrealCountEventZoom ] = DrealLambdaCursorX;
DrealLambdaEventZoomY[ DrealCountEventZoom ] = DrealLambdaCursorY;
DrealCountEventZoom = DrealCountEventZoom + 1;
DrealPointCursor();
if ( DrealCountEventZoom == DrealMaxEventZoom )
{
DrealChangeCursorType( NULL, NULL, 0, DrealInputMode );
DrealTreatEventZoom();
DrealInputMode = DrealSaveInputMode;
DrealEditMode = DrealSaveEditMode;
DrealPromptMessage = DrealSavePromptMessage;
DrealSaveEditMode = DREAL_EDIT_MEASURE;
DrealSaveInputMode = DREAL_INPUT_HALF_BOX;
DrealCountEventZoom = 0;
DrealMaxEventZoom = 0;
DrealChangeCursorType( DrealLambdaEventEditX,
DrealLambdaEventEditY,
DrealCountEventEdit,
DrealInputMode );
DrealComputeCursor( Event->x, Event->y );
DrealDisplayCursor();
}
}
}
else
{
if ( DrealCountEventEdit < DrealMaxEventEdit )
{
DrealLambdaEventEditX[ DrealCountEventEdit ] = DrealLambdaCursorX;
DrealLambdaEventEditY[ DrealCountEventEdit ] = DrealLambdaCursorY;
DrealCountEventEdit = DrealCountEventEdit + 1;
DrealPointCursor();
if ( DrealCountEventEdit == DrealMaxEventEdit )
{
DrealTreatEventEdit();
DrealDisplayCursor();
}
}
}
DrealPromptMessage();
break;
case DREAL_B3DN :
if ( DrealEditMode & DREAL_ZOOM_MARK )
{
if ( DrealCountEventZoom != 0 )
{
DrealCountEventZoom = DrealCountEventZoom - 1;
DrealResetCursor();
}
else
{
DrealChangeCursorType( DrealLambdaEventEditX,
DrealLambdaEventEditY,
DrealCountEventEdit,
DrealSaveInputMode );
DrealInputMode = DrealSaveInputMode;
DrealEditMode = DrealSaveEditMode;
DrealPromptMessage = DrealSavePromptMessage;
DrealSaveEditMode = DREAL_EDIT_MEASURE;
DrealSaveInputMode = DREAL_INPUT_HALF_BOX;
DrealSavePromptMessage = DrealPromptEditMeasure;
DrealCountEventZoom = 0;
DrealMaxEventZoom = 0;
}
}
else
{
if ( DrealCountEventEdit != 0 )
{
DrealCountEventEdit = DrealCountEventEdit - 1;
DrealResetCursor();
}
else
{
DrealEditUnselectAll();
DrealChangeCursorType( NULL, NULL, 0,
DREAL_INPUT_HALF_BOX );
DrealInputMode = DREAL_INPUT_HALF_BOX;
DrealEditMode = DREAL_EDIT_MEASURE;
DrealPromptMessage = DrealPromptEditMeasure;
DrealCountEventEdit = 0;
DrealMaxEventEdit = 2;
}
}
DrealPromptMessage();
break;
case DREAL_MOTION :
break;
case DREAL_ENTER :
DrealCursorInside = DREAL_TRUE;
DrealDisplayCursor();
break;
case DREAL_KEY_UP : DrealZoomUp();
break;
case DREAL_KEY_DN : DrealZoomDown();
break;
case DREAL_KEY_LEFT : DrealZoomLeft();
break;
case DREAL_KEY_RIGHT : DrealZoomRight();
break;
case DREAL_KEY_MORE : DrealZoomMore();
break;
case DREAL_KEY_LESS : DrealZoomLess();
break;
case DREAL_KEY_FIT : DrealZoomFit();
break;
case DREAL_KEY_REFRESH : DrealZoomRefresh();
break;
case DREAL_KEY_UNZOOM : DrealZoomUndo();
break;
case DREAL_KEY_ZOOM_IN :
DrealChangeEditMode( DREAL_ZOOM_IN, DrealPromptZoomIn );
break;
case DREAL_KEY_CENTER :
DrealChangeEditMode( DREAL_ZOOM_CENTER, DrealPromptZoomCenter );
break;
case DREAL_KEY_PAN :
DrealChangeEditMode( DREAL_ZOOM_PAN, DrealPromptZoomPan );
break;
case DREAL_KEY_UP_LAYER :
case DREAL_KEY_DN_LAYER :
if ( ! ( DrealEditMode & DREAL_ZOOM_MARK ) )
{
FlagUp = ( MouseEvent == DREAL_KEY_UP_LAYER );
switch ( DrealEditMode )
{
case DREAL_CREATE_RECTANGLE : DrealChangeRectangleLayer( FlagUp );
break;
}
DrealPromptMessage();
}
break;
}
if ( MouseEvent >= DREAL_KEY_UP )
{
DrealComputeCursor( Event->x, Event->y );
DrealDisplayCursor();
}
if ( ( OldLambdaCursorX != DrealLambdaCursorX ) ||
( OldLambdaCursorY != DrealLambdaCursorY ) )
{
DrealDisplayCoordinates();
DrealDisplayCursor();
}
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackResize |
| |
\------------------------------------------------------------*/
void CallbackResize( MyWidget, ClientData, CallData )
Widget MyWidget;
XtPointer ClientData;
XmDrawingAreaCallbackStruct *CallData;
{
rdsbegin();
if ( DrealFirstExpose == DREAL_FALSE )
{
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealUndisplayCursor();
DrealResizeGraphicWindow();
DrealRefreshGraphicWindow( 0, 0,
DrealGraphicDx, DrealGraphicDy );
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
DrealDisplayCursor();
}
rdsend();
}
/*------------------------------------------------------------\
| |
| CallbackExpose |
| |
\------------------------------------------------------------*/
void CallbackExpose( MyWidget, ClientData, CallData )
Widget MyWidget;
XtPointer ClientData;
XmDrawingAreaCallbackStruct *CallData;
{
XExposeEvent *ExposeEvent;
rdsbegin();
ExposeEvent = (XExposeEvent *)CallData->event;
if ( DrealFirstExpose == DREAL_TRUE )
{
DrealFirstExpose = DREAL_FALSE;
DrealInitializeGraphicWindow();
DrealUndisplayCursor();
DrealLoadConfig( DREAL_FALSE );
if ( DrealFigureRds != (rdsfig_list *)NULL )
{
DrealSetMouseCursor( DrealGraphicWindow, DREAL_WATCH_CURSOR );
DrealChangeTopLevelTitle( DrealFigureRds->NAME );
DrealInitializeZoom();
DrealDisplayToolsMessage();
DrealDisplayFigure( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
}
else
{
DrealChangeTopLevelTitle( (char *)NULL );
}
DrealRefreshGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealDisplayCursor();
DrealEnterPresentPanel();
}
else
{
DrealUndisplayCursor();
DrealRefreshGraphicWindow( ExposeEvent->x, ExposeEvent->y,
ExposeEvent->width, ExposeEvent->height );
DrealDisplayCursor();
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealInitializeEvent |
| |
\------------------------------------------------------------*/
void DrealInitializeEvent()
{
XtActionsRec NewActions;
rdsbegin();
XtVaSetValues( DrealGraphicWindow,
XmNtranslations,
XtParseTranslationTable( DrealEventTranslation ),
NULL
);
NewActions.string = "CallbackEvent";
NewActions.proc = CallbackEvent;
XtAppAddActions( DrealApplication, &NewActions, 1 );
XtAddCallback( DrealGraphicWindow,
XmNresizeCallback,
CallbackResize, NULL );
XtAddCallback( DrealGraphicWindow,
XmNexposeCallback,
CallbackExpose, NULL );
rdsend();
}

View File

@ -0,0 +1,101 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Event.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_EVENT
# define DREAL_EVENT
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_B1DN 0
# define DREAL_B3DN 1
# define DREAL_MOTION 2
# define DREAL_ENTER 3
# define DREAL_LEAVE 4
# define DREAL_KEY_UP 5
# define DREAL_KEY_DN 6
# define DREAL_KEY_LEFT 7
# define DREAL_KEY_RIGHT 8
# define DREAL_KEY_MORE 9
# define DREAL_KEY_LESS 10
# define DREAL_KEY_FIT 11
# define DREAL_KEY_REFRESH 12
# define DREAL_KEY_UNZOOM 13
# define DREAL_KEY_ZOOM_IN 14
# define DREAL_KEY_CENTER 15
# define DREAL_KEY_PAN 16
# define DREAL_KEY_DN_LAYER 17
# define DREAL_KEY_UP_LAYER 18
# define DREAL_MAX_EVENT_BUFFER 128
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealInitializeEvent();
extern void DrealDisplayEditMeasure();
# endif

View File

@ -0,0 +1,316 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Graphic.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/Form.h>
# include <Xm/Frame.h>
# include <Xm/DrawingA.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GSB.h"
# include "GTB.h"
# include "GMX.h"
# include "GMX_graphic.h"
# include "GMX_view.h"
# include "GMX_grid.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
Widget DrealGraphicFrame;
Widget DrealGraphicWindow;
Display *DrealGraphicDisplay = (Display *)NULL;
Dimension DrealGraphicDx = 0;
Dimension DrealGraphicDy = 0;
Dimension DrealOldGraphicDx = 0;
Dimension DrealOldGraphicDy = 0;
Pixmap DrealGraphicPixmap = (Pixmap)NULL;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealInitializeGraphicWindow |
| |
\------------------------------------------------------------*/
void DrealInitializeGraphicWindow()
{
rdsbegin();
XtVaGetValues( DrealGraphicWindow,
XmNwidth, &DrealGraphicDx,
XmNheight, &DrealGraphicDy,
NULL
);
DrealOldGraphicDx = DrealGraphicDx;
DrealOldGraphicDy = DrealGraphicDy;
DrealGraphicPixmap =
XCreatePixmap ( DrealGraphicDisplay,
RootWindowOfScreen( XtScreen ( DrealGraphicWindow ) ),
DrealGraphicDx,
DrealGraphicDy,
DefaultDepthOfScreen ( XtScreen ( DrealGraphicWindow ) )
);
DrealClearGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealInitializeLambdaGrid();
DrealSetMouseCursor( DrealGraphicWindow, DREAL_NORMAL_CURSOR );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealClearGraphicWindow |
| |
\------------------------------------------------------------*/
void DrealClearGraphicWindow( GraphicX, GraphicY, GraphicDx, GraphicDy )
long GraphicX;
long GraphicY;
long GraphicDx;
long GraphicDy;
{
XFillRectangle( DrealGraphicDisplay,
DrealGraphicPixmap,
DrealBackgroundGC,
GraphicX, GraphicY,
GraphicDx,
GraphicDy );
}
/*------------------------------------------------------------\
| |
| DrealRefreshGraphicWindow |
| |
\------------------------------------------------------------*/
void DrealRefreshGraphicWindow( GraphicX, GraphicY, GraphicDx, GraphicDy )
Dimension GraphicX;
Dimension GraphicY;
Dimension GraphicDx;
Dimension GraphicDy;
{
rdsbegin();
DrealUndisplayCursor();
XCopyArea( DrealGraphicDisplay,
DrealGraphicPixmap,
XtWindow ( DrealGraphicWindow ),
DrealBackgroundGC,
GraphicX, GraphicY,
GraphicDx, GraphicDy,
GraphicX, GraphicY
);
DrealDisplayLambdaGrid( GraphicX, GraphicY,
GraphicX + GraphicDx,
GraphicY + GraphicDy );
DrealUndisplayCursor();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealResizeGraphicWindow |
| |
\------------------------------------------------------------*/
void DrealResizeGraphicWindow()
{
Pixmap OldPixmap;
Dimension SourceY;
Dimension TargetY;
Dimension TargetDx;
Dimension TargetDy;
rdsbegin();
DrealOldGraphicDx = DrealGraphicDx;
DrealOldGraphicDy = DrealGraphicDy;
XtVaGetValues( DrealGraphicWindow,
XmNwidth, &DrealGraphicDx,
XmNheight, &DrealGraphicDy,
NULL
);
if ( ( DrealOldGraphicDx != DrealGraphicDx ) ||
( DrealOldGraphicDy != DrealGraphicDy ) )
{
OldPixmap = DrealGraphicPixmap;
DrealGraphicPixmap =
XCreatePixmap ( DrealGraphicDisplay,
RootWindowOfScreen( XtScreen ( DrealGraphicWindow ) ),
DrealGraphicDx,
DrealGraphicDy,
DefaultDepthOfScreen ( XtScreen ( DrealGraphicWindow ) )
);
DrealClearGraphicWindow( 0, 0, DrealGraphicDx, DrealGraphicDy );
DrealResizeLambdaGrid();
if ( DrealOldGraphicDx < DrealGraphicDx )
{
TargetDx = DrealOldGraphicDx;
DrealDisplayFigure( TargetDx, 0,
DrealGraphicDx, DrealGraphicDy );
}
else
{
TargetDx = DrealGraphicDx;
}
if ( DrealOldGraphicDy < DrealGraphicDy )
{
SourceY = 0;
TargetDy = DrealOldGraphicDy;
TargetY = DrealGraphicDy - DrealOldGraphicDy;
DrealDisplayFigure( 0, TargetDy,
TargetDx, DrealGraphicDy );
}
else
{
TargetDy = DrealGraphicDy;
TargetY = 0;
SourceY = DrealOldGraphicDy - DrealGraphicDy;
}
XCopyArea( DrealGraphicDisplay,
OldPixmap,
DrealGraphicPixmap,
DrealBackgroundGC,
0, SourceY,
TargetDx, TargetDy,
0, TargetY
);
XFreePixmap( DrealGraphicDisplay, OldPixmap );
}
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealInitializeGraphic |
| |
\------------------------------------------------------------*/
void DrealInitializeGraphic()
{
rdsbegin();
DrealGraphicFrame = XtVaCreateManagedWidget( "DrealGraphicFrame",
xmFrameWidgetClass,
DrealMainForm,
XmNshadowType , XmSHADOW_ETCHED_IN,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 1,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 191,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 1,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 199,
NULL );
DrealGraphicWindow = XtVaCreateManagedWidget(
"DrealGraphicWindow",
xmDrawingAreaWidgetClass,
DrealGraphicFrame,
XmNtopAttachment, XmATTACH_FORM,
XmNrightAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,
XmNleftAttachment, XmATTACH_FORM,
XmNbackground, 1,
XmNforeground, 0,
NULL
);
DrealGraphicDisplay = XtDisplay( DrealGraphicWindow );
rdsend();
}

View File

@ -0,0 +1,72 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Graphic.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_GRAPHIC
# define DREAL_GRAPHIC
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealInitializeGraphic();
# endif

View File

@ -0,0 +1,316 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Grid.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GSB.h"
# include "GRD.h"
# include "GMX.h"
# include "GMX_grid.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Lambda Grid |
| |
\------------------------------------------------------------*/
float DrealLambdaGridStep;
long DrealLambdaGridX;
long DrealLambdaGridY;
long DrealLambdaGridDx;
long DrealLambdaGridDy;
long DrealPixelGridX;
long DrealPixelGridY;
/*------------------------------------------------------------\
| |
| User Lambda Grid |
| |
\------------------------------------------------------------*/
long DrealLambdaUserGridDx;
long DrealLambdaUserGridDy;
char DrealLambdaUserGrid;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealInitializeLambdaGrid |
| |
\------------------------------------------------------------*/
void DrealInitializeLambdaGrid()
{
rdsbegin();
DrealLambdaGridX = DREAL_DEFAULT_GRID_X;
DrealLambdaGridY = DREAL_DEFAULT_GRID_Y;
DrealLambdaGridDx = DREAL_DEFAULT_GRID_DX;
DrealLambdaGridDy = DREAL_DEFAULT_GRID_DY;
DrealLambdaUserGridDx = 4;
DrealLambdaUserGridDy = 4;
DrealLambdaUserGrid = DREAL_FALSE;
DrealComputeLambdaGrid();
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealComputeLambdaGrid |
| |
\------------------------------------------------------------*/
void DrealComputeLambdaGrid()
{
float StepX;
float StepY;
rdsbegin();
StepX = (float)(DrealGraphicDx) / (float)(DrealLambdaGridDx);
StepY = (float)(DrealGraphicDy) / (float)(DrealLambdaGridDy);
if ( StepX < StepY )
{
DrealLambdaGridStep = StepX;
DrealLambdaGridDy = 1 + ( DrealGraphicDy / StepX );
}
else
{
DrealLambdaGridStep = StepY;
DrealLambdaGridDx = 1 + ( DrealGraphicDx / StepY );
}
DrealPixelGridX = (float)(DrealLambdaGridX) * DrealLambdaGridStep;
DrealPixelGridY = (float)(DrealLambdaGridY) * DrealLambdaGridStep;
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealResizeLambdaGrid |
| |
\------------------------------------------------------------*/
void DrealResizeLambdaGrid()
{
rdsbegin();
DrealLambdaGridDx = 1 + ( DrealGraphicDx / DrealLambdaGridStep );
DrealLambdaGridDy = 1 + ( DrealGraphicDy / DrealLambdaGridStep );
rdsend();
}
/*------------------------------------------------------------\
| |
| DrealDisplayLambdaGrid |
| |
\------------------------------------------------------------*/
char DrealDisplayLambdaGrid( GraphicX1, GraphicY1, GraphicX2, GraphicY2 )
Dimension GraphicX1;
Dimension GraphicY1;
Dimension GraphicX2;
Dimension GraphicY2;
{
long X;
long Y;
long MaxGridX;
long MaxGridY;
long PixelX;
long PixelY;
long Xmin;
long Ymin;
char UserGrid;
char LambdaGrid;
char TraceCroix;
char TracePoint;
float Check;
rdsbegin();
if ( DrealLambdaGridStep < DREAL_LOWER_GRID_STEP )
{
LambdaGrid = 0;
}
else
{
LambdaGrid = 1;
}
if ( DrealLambdaUserGrid == 1 )
{
if ( DrealLambdaUserGridDx > DrealLambdaUserGridDy )
{
Check = ( DREAL_LOWER_GRID_STEP * 2 / DrealLambdaUserGridDy );
}
else
{
Check = ( DREAL_LOWER_GRID_STEP * 2 / DrealLambdaUserGridDy );
}
if ( DrealLambdaGridStep < Check ) UserGrid = 0;
else UserGrid = 1;
}
else
{
UserGrid = 0;
}
if ( ( UserGrid == 0 ) &&
( LambdaGrid == 0 ) )
{
rdsend();
return( DREAL_FALSE );
}
MaxGridX = DrealLambdaGridX + DrealLambdaGridDx;
MaxGridY = DrealLambdaGridY + DrealLambdaGridDy;
if ( LambdaGrid )
{
for ( X = DrealLambdaGridX; X < MaxGridX; X = X + 1 )
{
PixelX = ((float)(X) * DrealLambdaGridStep);
PixelX = PixelX - DrealPixelGridX;
if ( ( PixelX <= GraphicX2 ) &&
( PixelX >= GraphicX1 ) )
for ( Y = DrealLambdaGridY; Y < MaxGridY; Y = Y + 1 )
{
PixelY = ((float)(Y) * DrealLambdaGridStep);
PixelY = PixelY - DrealPixelGridY;
PixelY = DrealGraphicDy - PixelY;
if ( ( PixelY <= GraphicY2 ) &&
( PixelY >= GraphicY1 ) )
{
XDrawPoint( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealGridGC,
PixelX, PixelY );
}
}
}
}
if ( UserGrid )
{
Xmin = ( DrealLambdaGridX / DrealLambdaUserGridDx ) * DrealLambdaUserGridDx;
Ymin = ( DrealLambdaGridY / DrealLambdaUserGridDy ) * DrealLambdaUserGridDy;
for ( X = Xmin; X < MaxGridX ; X = X + DrealLambdaUserGridDx )
{
PixelX = ((float)(X) * DrealLambdaGridStep);
PixelX = PixelX - DrealPixelGridX;
if ( ( PixelX <= GraphicX2 ) &&
( PixelX >= GraphicX1 ) )
for ( Y = Ymin; Y < MaxGridY; Y = Y + DrealLambdaUserGridDy )
{
PixelY = ((float)(Y) * DrealLambdaGridStep);
PixelY = PixelY - DrealPixelGridY;
PixelY = DrealGraphicDy - PixelY;
if ( ( PixelY <= GraphicY2 ) &&
( PixelY >= GraphicY1 ) )
{
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealGridGC,
PixelX - 2, PixelY,
PixelX + 2, PixelY );
XDrawLine( DrealGraphicDisplay,
XtWindow( DrealGraphicWindow ),
DrealGridGC,
PixelX, PixelY + 2,
PixelX, PixelY - 2 );
}
}
}
}
rdsend();
return( DREAL_TRUE );
}

View File

@ -0,0 +1,76 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Grid.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_GRID
# define DREAL_GRID
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define DREAL_DEFAULT_GRID_X 0
# define DREAL_DEFAULT_GRID_Y 0
# define DREAL_DEFAULT_GRID_DX 40
# define DREAL_DEFAULT_GRID_DY 40
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,132 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Icon.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushB.h>
# include <Xm/Form.h>
# include <Xm/Frame.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GSB.h"
# include "GTB.h"
# include "GMX.h"
# include "GMX_icon.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
static char IconBits[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00,
0x78, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x18, 0x00,
0x00, 0x00, 0x40, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10,
0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x30, 0x00, 0x00, 0x00, 0x40,
0x00, 0x10, 0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0xa0, 0x33, 0x7c,
0xf0, 0x41, 0x00, 0x10, 0x20, 0x4a, 0xc6, 0x18, 0x42, 0x00, 0x10, 0x20,
0x46, 0x83, 0x09, 0x42, 0x00, 0x10, 0x20, 0x02, 0x01, 0x01, 0x42, 0x00,
0x10, 0x20, 0x02, 0x01, 0x01, 0x42, 0x00, 0x10, 0x20, 0x02, 0x01, 0xe1,
0x43, 0x00, 0x10, 0x20, 0x02, 0xff, 0x19, 0x42, 0x00, 0x10, 0x20, 0x02,
0x01, 0x04, 0x42, 0x00, 0x10, 0x20, 0x02, 0x01, 0x04, 0x42, 0x00, 0x10,
0x30, 0x02, 0x01, 0x05, 0x42, 0x00, 0x10, 0x18, 0x02, 0x83, 0x05, 0x42,
0x00, 0x10, 0x0c, 0x02, 0xc6, 0x04, 0x42, 0x00, 0xfe, 0x87, 0x0f, 0x7c,
0xf8, 0xf7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x20, 0x00, 0x00, 0x00, 0x80, 0x01, 0x10, 0x40, 0x00, 0x06, 0x00, 0x00,
0x02, 0x10, 0x40, 0x00, 0x01, 0x00, 0x00, 0x02, 0x10, 0x40, 0x00, 0x01,
0x00, 0x00, 0x06, 0x20, 0x20, 0x80, 0x01, 0x00, 0x00, 0x04, 0x20, 0x20,
0x80, 0x00, 0x00, 0x00, 0x0c, 0xc0, 0x18, 0xc0, 0x00, 0x00, 0x00, 0x78,
0x00, 0x07, 0x78, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00,
0x00, 0x80, 0x07, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x06, 0x00, 0x00, 0x00, 0xfe,
0xff, 0xff, 0xff, 0x01, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealInitializeIcon |
| |
\------------------------------------------------------------*/
void DrealInitializeIcon()
{
rdsbegin();
DrealSetIcon( DrealTopLevel,
IconBits, IconWidth, IconHeight );
rdsend();
}

View File

@ -0,0 +1,76 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Icon.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_ICON
# define DREAL_ICON
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define IconWidth 50
# define IconHeight 50
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealInitializeIcon();
# endif

View File

@ -0,0 +1,236 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include <Xm/RowColumn.h>
# include "mut.h"
# include "mph.h"
# include "rds.h"
# include "rpr.h"
# include "GTB.h"
# include "GSB.h"
# include "GMF.h"
# include "GME.h"
# include "GMC.h"
# include "GMV.h"
# include "GMT.h"
# include "GMS.h"
# include "GMH.h"
# include "GMX.h"
# include "GMX_menu.h"
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
Widget DrealMenuBar;
DrealMenuItem DrealMainMenu[] =
{
{
"File",
'F',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
DrealFileMenu
}
,
{
"Edit",
'E',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
DrealEditMenu
}
,
{
"Window",
'W',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
DrealWindowMenu
}
,
{
"Create",
'C',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
DrealCreateMenu
}
,
{
"View",
'V',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
DrealViewMenu
}
,
{
"Tools",
'T',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
DrealToolsMenu
}
,
{
"Setup",
'S',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
DrealSetupMenu
}
,
{
"Help",
'H',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
True,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
DrealHelpMenu
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| DrealInitializeMenu |
| |
\------------------------------------------------------------*/
void DrealInitializeMenu()
{
rdsbegin();
DrealMenuBar = XmCreateMenuBar( DrealMainWindow,
"DrealMenuBar", NULL, 0 );
DrealBuildMenus( DrealMenuBar, DrealMainMenu );
XtManageChild( DrealMenuBar );
rdsend();
}

View File

@ -0,0 +1,75 @@
/*------------------------------------------------------------\
| |
| This file is part of the Alliance CAD System Copyright |
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
| |
| Home page : http://www-asim.lip6.fr/alliance/ |
| E-mail support : mailto:alliance-support@asim.lip6.fr |
| |
| This progam is free software; you can redistribute it |
| and/or modify it under the terms of the GNU General Public |
| License as published by the Free Software Foundation; |
| either version 2 of the License, or (at your option) any |
| later version. |
| |
| Alliance VLSI CAD System is distributed in the hope that |
| it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or |
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| Public License for more details. |
| |
| You should have received a copy of the GNU General Public |
| License along with the GNU C Library; see the file COPYING. |
| If not, write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Tool : DREAL |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 28.03.95 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef DREAL_MENU
# define DREAL_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern DrealMenuItem DrealMainMenu[];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void DrealInitializeMenu();
# endif

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