- add xgraph (usefull to display graph)

This commit is contained in:
Ludovic Jacomme 2007-11-27 20:41:46 +00:00
parent 8411f44336
commit 2ef9896528
129 changed files with 24340 additions and 0 deletions

View File

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

View File

@ -0,0 +1,185 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/xgra.c)
XGRA_MAJOR_VERSION=1
XGRA_MINOR_VERSION=5
XGRA_VERSION=$XGRA_MAJOR_VERSION.$XGRA_MINOR_VERSION
AC_SUBST(XGRA_MAJOR_VERSION)
AC_SUBST(XGRA_MINOR_VERSION)
AC_SUBST(XGRA_VERSION)
# For automake.
VERSION=$XGRA_VERSION
PACKAGE=xgra
dnl Initialize automake stuff
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
dnl Checks for programs.
AC_PROG_CC
AM_PROG_LEX
AC_PROG_YACC
AM_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_CHECK_LIB(m, sqrt)
AC_CHECK_PROGS(SED, gsed sed)
AC_PATH_XTRA
dnl
dnl Check for X stuff
dnl
dnl
dnl Check X options
dnl
if test "$with_x" = no; then
AC_MSG_ERROR([requires the X window system to compile and run.
Please do not use the configure option '--without-x'.])
fi
if test "$with_motif" = no; then
AC_MSG_ERROR([requires Motif to compile and run.
Please do not use the configure option '--without-motif'.])
fi
dnl
dnl
dnl Check for X libraries
dnl
if test "$with_x" != no; then
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CXXFLAGS="$CXXFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
dnl
dnl
AC_FIND_MOTIF
dnl
dnl
dnl
LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
dnl
dnl Check for X library
dnl
X11_LIBS=""
AC_CHECK_LIB(X11, XOpenDisplay, X11_LIBS="-lX11",,${X_PRE_LIBS} ${X_EXTRA_LIBS})
if test "$X11_LIBS" = ""; then
dnl Not having X is fatal. Let the user fix this.
AC_MSG_ERROR([The X11 library '-lX11' could not be found.
Please use the configure options '--x-includes=DIR'
and '--x-libraries=DIR' to specify the X location.])
fi
AC_SUBST(X_LIBS)
AC_SUBST(X11_LIBS)
AC_SUBST(X_PRE_LIBS)
dnl
dnl
dnl Check for -lXintl library. Lutz Kittler <kittler@sse-erfurt.de> says
dnl that DLD-Linux with CDE wants `-lXintl' to refine `Xlcmbcurmax'.
dnl Guenther Roehrich <guenther@studbox.uni-stuttgart.de> says that
dnl we must check for `_Xlcmbcurmax' instead of `Xlcmbcurmax'.
dnl
AC_CHECK_LIB(Xintl, _Xlcmbcurmax, X11_LIBS="${X11_LIBS} -lXintl",,
${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
dnl
dnl Check for -lipc library. SCO unix is said to want that.
dnl
AC_CHECK_LIB(ipc, shmap, X11_LIBS="${X11_LIBS} -lipc",,
${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
dnl
dnl Check for X toolkit libraries
dnl
XT_LIBS=""
AC_CHECK_LIB(Xt, XtToolkitInitialize, XT_LIBS="-lXt",,
${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
if test "$XT_LIBS" = ""; then
dnl Not having Xt is fatal. Let the user fix this.
AC_MSG_ERROR([The X toolkit library '-lXt' could not be found.
Please use the configure options '--x-includes=DIR'
and '--x-libraries=DIR' to specify the X location.
See the files 'config.log' and 'ddd/config.log'
for further diagnostics.])
fi
AC_SUBST(XT_LIBS)
dnl
dnl
dnl Check for X extension libraries
dnl
dnl
XEXT_LIBS=""
AC_CHECK_LIB(Xext, XShapeQueryVersion, XEXT_LIBS="-lXext",,
${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
AC_SUBST(XEXT_LIBS)
dnl Check for Motif widget libraries
dnl
XM_LIBS=""
XP_LIBS=""
if test "$motif_includes" != "no" && test "$motif_libraries" != "no"
then
dnl Motif 2.1 wants `-lXp' (X11R6.3 print server)
AC_CHECK_LIB(Xp, XpSelectInput,
XP_LIBS="-lXp"
AC_DEFINE(HAVE_XP),,
${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
AC_CHECK_LIB(Xm, XmCreateOptionMenu,
XM_LIBS="-lXm"
AC_DEFINE(HAVE_MOTIF),,
${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
AC_CHECK_LIB(Xm, xmUseVersion,
AC_DEFINE(HAVE_XMUSEVERSION),,
${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
AC_CHECK_LIB(Xm, XmInstallImage,
AC_DEFINE(HAVE_XMINSTALLIMAGE),,
${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
AC_CHECK_LIB(Xm, Xm21InstallImage,
AC_DEFINE(HAVE_XM21INSTALLIMAGE),,
${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
fi
if test "$XM_LIBS" = ""; then
dnl Without Motif, we won't get far. Let the user fix this.
AC_MSG_ERROR([The Motif library '-lXm' could not be found.
Please use the configure options '--with-motif-includes=DIR'
and '--with-motif-libraries=DIR' to specify the Xm location.
See the files 'config.log'
for further diagnostics.])
fi
AC_SUBST(XP_LIBS)
AC_SUBST(XM_LIBS)
LIBS="$LIBS ${XM_LIBS} ${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS}"
LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS"
CXXFLAGS="$ice_save_CXXFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS"
fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AM_ALLIANCE
AC_OUTPUT([
Makefile
src/Makefile
etc/Makefile
])

View File

@ -0,0 +1,8 @@
# $Id: Makefile.am,v 1.1 2007/11/27 20:41:31 ludo Exp $
etcdir=$(prefix)/etc
etc_DATA=xgra.par
EXTRA_DIST=$(etc_DATA)

View File

@ -0,0 +1,63 @@
# /*------------------------------------------------------------\
# | |
# | Title : Parameters File for Xvpn |
# | |
# | Date : 01.01.95 |
# | |
# \------------------------------------------------------------*/
# /*------------------------------------------------------------\
# | |
# | Unit |
# | |
# \------------------------------------------------------------*/
DEFINE XGRA_UNIT 32
# /*------------------------------------------------------------\
# | |
# | Lower Grid Step in pixel by unit |
# | |
# \------------------------------------------------------------*/
DEFINE XGRA_LOWER_GRID_STEP 50
# /*------------------------------------------------------------\
# | |
# | Xvpn Cursor Color Name |
# | |
# \------------------------------------------------------------*/
DEFINE XGRA_CURSOR_COLOR_NAME Black
DEFINE XGRA_BACKGROUND_COLOR_NAME Black
DEFINE XGRA_FOREGROUND_COLOR_NAME White
DEFINE XGRA_ACCEPT_COLOR_NAME magenta
DEFINE XGRA_CONNECT_COLOR_NAME pink
# /*------------------------------------------------------------\
# | |
# | Xvpn Cursor Size in pixel |
# | |
# \------------------------------------------------------------*/
DEFINE XGRA_CURSOR_SIZE 10
# /*------------------------------------------------------------\
# | |
# | Xvpn Layer Color |
# | |
# \------------------------------------------------------------*/
TABLE XGRA_LAYER_NAME
0 Process Cyan Black
1 Function sky_blue Black
2 Wait pink Black
3 Assign lawn_green Black
4 Guard red Black
5 Asg-Guard yellow Black
6 Token magenta Black
7 Unused_7 gray Black
8 Unused_8 gray Black
9 Unused_9 gray Black
END

View File

@ -0,0 +1,62 @@
## Process this file with automake to produce Makefile.in
bin_PROGRAMS = xgra
AM_CFLAGS = @ALLIANCE_CFLAGS@ @X_CFLAGS@ \
-DXGRA_DEFAULT_PARAM_NAME=\"${ALLIANCE_TOP}/etc/xgra.par\" \
-DXMS_FILE_NAME=\".xgra.cfg\"
# -----------------------------------------------------------------------------
# X Libraries.
# -----------------------------------------------------------------------------
# Special flags for linking with X. (-L/usr/X11R5/lib)
X_LDFLAGS = @X_LIBS@
# Motif library. (-lXm)
LIBXM = @XM_LIBS@
# Use this alternative for building `semistatic' executables
# where Motif libraries are statically linked in.
# LIBXM = -Wl,-Bstatic @XM_LIBS@ -Wl,-Bdynamic
# X extension library; needed for Athena and Motif >= 2.0. (-lXext)
LIBXEXT = @XEXT_LIBS@
# Xp library; sometimes needed for Motif >= 2.1. (-lXp)
LIBXP = @XP_LIBS@
# X toolkit library. (-lXt)
LIBXT = @XT_LIBS@
# X library. (-lX11 -lSM -lICE -lnsl -lsocket)
LIBX11 = @X_PRE_LIBS@ @X11_LIBS@ @X_EXTRA_LIBS@
# All libraries shown above
ALL_X_LIBS = $(X_LDFLAGS) $(LIBXM) $(LIBXT) \
$(LIBXP) $(LIBXEXT) $(LIBX11)
xgra_LDADD = @ALLIANCE_LIBS@ $(ALL_X_LIBS) \
-lAut -lMut
xgra_SOURCES = \
LIP6bw.h XME_dialog.c XME_dialog.h XME_edit.c XME_edit.h XME.h XME_menu.c \
XME_menu.h XME_message.c XME_message.h XME_panel.c XME_panel.h XME_search.c \
XME_search.h XME_select.c XME_select.h XMF_dialog.c XMF_dialog.h XMF_file.c \
XMF_file.h XMF.h XMF_menu.c XMF_menu.h XMF_panel.c XMF_panel.h XMH.h XMH_help.c \
XMH_help.h XMH_menu.c XMH_menu.h XMH_panel.c XMH_panel.h XMS_dialog.c \
XMS_dialog.h XMS.h XMS_menu.c XMS_menu.h XMS_panel.c XMS_panel.h XMS_setup.c \
XMS_setup.h XMT_dialog.c XMT_dialog.h XMT.h XMT_menu.c XMT_menu.h XMT_message.c \
XMT_message.h XMT_panel.c XMT_panel.h XMT_tools.c XMT_tools.h XMV_dialog.c \
XMV_dialog.h XMV.h XMV_map.c XMV_map.h XMV_menu.c XMV_menu.h XMV_message.c \
XMV_message.h XMV_panel.c XMV_panel.h XMV_view.c XMV_view.h XMX_color.c \
XMX_color.h XMX_cursor.c XMX_cursor.h XMX_dialog.c XMX_dialog.h XMX_event.c \
XMX_event.h XMX_graphic.c XMX_graphic.h XMX_grid.c XMX_grid.h XMX.h XMX_icon.c \
XMX_icon.h XMX_menu.c XMX_menu.h XMX_message.c XMX_message.h XMX_motif.c \
XMX_motif.h XMX_panel.c XMX_panel.h XMX_view.c XMX_view.h XSB_error.c \
XSB_error.h XSB.h XSB_parse.c XSB_parse.h XSB_share.c XSB_share.h XTB_cursor.c \
XTB_cursor.h XTB_dialog.c XTB_dialog.h XTB.h XTB_icon.c XTB_icon.h XTB_menu.c \
XTB_menu.h XTB_panel.c XTB_panel.h XTB_pixmap.c XTB_pixmap.h \
XGR_bound.c XGR_bound.h XGR_error.c XGR_error.h XGR_graph.c XGR_graph.h \
XGR_object.c XGR_object.h XGR_place.c XGR_place.h XGR_select.c XGR_select.h xgra.c

291
alliance/src/xgra/src/XGR.h Normal file
View File

@ -0,0 +1,291 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : XFS.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
# ifndef XGRA_XFS
# define XGRA_XFS
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_OBJECT_CIRCLE 0x0000
# define XGRA_OBJECT_LINE 0x0001
# define XGRA_OBJECT_RECTANGLE 0x0002
# define XGRA_OBJECT_ARROW 0x0003
# define XGRA_OBJECT_TEXT 0x0004
# define XGRA_OBJECT_TYPE 0x000F
# define XGRA_OBJECT_NODE 0x0010
# define XGRA_OBJECT_ARC 0x0020
# define XGRA_OBJECT_LINE_DOWN 0x0100
# define XGRA_OBJECT_LINE_LEFT 0x0200
# define XGRA_OBJECT_SELECT 0x0400
# define XGRA_OBJECT_ACCEPT 0x0800
# define XGRA_OBJECT_CONNECT 0x1000
/*------------------------------------------------------------\
| |
| Macros |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Object |
| |
\------------------------------------------------------------*/
# define GetXgraObjectType( X ) ( ( X )->TYPE & XGRA_OBJECT_TYPE )
# define IsXgraLineDown( X ) ( ( X )->TYPE & XGRA_OBJECT_LINE_DOWN )
# define IsXgraLineLeft( X ) ( ( X )->TYPE & XGRA_OBJECT_LINE_LEFT )
# define IsXgraNode( X ) ( ( X )->TYPE & XGRA_OBJECT_NODE )
# define IsXgraArc( X ) ( ( X )->TYPE & XGRA_OBJECT_ARC )
# define SetXgraLineDown( X ) ( ( X )->TYPE |= XGRA_OBJECT_LINE_DOWN )
# define SetXgraLineLeft( X ) ( ( X )->TYPE |= XGRA_OBJECT_LINE_LEFT )
# define SetXgraNode( X ) ( ( X )->TYPE |= XGRA_OBJECT_NODE )
# define SetXgraArc( X ) ( ( X )->TYPE |= XGRA_OBJECT_ARC )
# define ClearXgraLineDown( X ) ( ( X )->TYPE &= ~XGRA_OBJECT_LINE_DOWN )
# define ClearXgraLineLeft( X ) ( ( X )->TYPE &= ~XGRA_OBJECT_LINE_LEFT )
# define ClearXgraNode( X ) ( ( X )->TYPE &= ~XGRA_OBJECT_NODE )
# define ClearXgraArc( X ) ( ( X )->TYPE &= ~XGRA_OBJECT_ARC )
/*------------------------------------------------------------\
| |
| Select |
| |
\------------------------------------------------------------*/
# define IsXgraSelect( X ) ( ( X )->TYPE & XGRA_OBJECT_SELECT )
# define SetXgraSelect( X ) ( ( X )->TYPE |= XGRA_OBJECT_SELECT )
# define ClearXgraSelect( X ) ( ( X )->TYPE &= ~XGRA_OBJECT_SELECT )
/*------------------------------------------------------------\
| |
| Accept |
| |
\------------------------------------------------------------*/
# define IsXgraAccept( X ) ( ( X )->TYPE & XGRA_OBJECT_ACCEPT )
# define SetXgraAccept( X ) ( ( X )->TYPE |= XGRA_OBJECT_ACCEPT )
# define ClearXgraAccept( X ) ( ( X )->TYPE &= ~XGRA_OBJECT_ACCEPT )
/*------------------------------------------------------------\
| |
| Connect |
| |
\------------------------------------------------------------*/
# define IsXgraConnect( X ) ( ( X )->TYPE & XGRA_OBJECT_CONNECT )
# define SetXgraConnect( X ) ( ( X )->TYPE |= XGRA_OBJECT_CONNECT )
# define ClearXgraConnect( X ) ( ( X )->TYPE &= ~XGRA_OBJECT_CONNECT )
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Point |
| |
\------------------------------------------------------------*/
typedef struct xgrapoint
{
long X;
long Y;
} xgrapoint;
/*------------------------------------------------------------\
| |
| Object |
| |
\------------------------------------------------------------*/
typedef struct xgraobj_list
{
struct xgraobj_list *NEXT;
struct xgraobj_list *LINK;
char *NAME;
short LAYER;
long TYPE;
long X;
long Y;
long DX;
long DY;
void *USER;
} xgraobj_list;
typedef struct xautgraph
{
struct xautgraph *NEXT;
char *NAME;
xgraobj_list *OBJECT [ XGRA_MAX_LAYER ];
xgraobj_list *TEXT [ XGRA_MAX_LAYER ];
} xautgraph;
/*------------------------------------------------------------\
| |
| Select |
| |
\------------------------------------------------------------*/
typedef struct xgraselect_list
{
struct xgraselect_list *NEXT;
xgraobj_list *OBJECT;
} xgraselect_list;
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern long XgraBoundXmin;
extern long XgraBoundYmin;
extern long XgraBoundXmax;
extern long XgraBoundYmax;
extern char XgraRecomputeBound;
extern xautgraph *XgraFigure;
extern autgraph *XgraFigureGra;
extern xgraselect_list *XgraHeadSelect;
extern xgraselect_list *XgraHeadConnect;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Add Functions |
| |
\------------------------------------------------------------*/
extern xautgraph *XgraAddFigure();
extern xgraobj_list *XgraAddCircle();
extern xgraobj_list *XgraAddLine();
extern xgraobj_list *XgraAddText();
/*------------------------------------------------------------\
| |
| Del Functions |
| |
\------------------------------------------------------------*/
extern void XgraDelFigure();
/*------------------------------------------------------------\
| |
| Flag Set & Clear Functions |
| |
\------------------------------------------------------------*/
extern void XgraSelectObject();
extern void XgraUnselectObject();
extern void XgraAcceptObject();
extern void XgraRejectObject();
extern void XgraConnectObject();
extern void XgraDisconnectObject();
/*------------------------------------------------------------\
| |
| Select Functions |
| |
\------------------------------------------------------------*/
extern void XgraAddSelect();
extern void XgraDelSelect();
extern void XgraPurgeSelect();
/*------------------------------------------------------------\
| |
| Connect Functions |
| |
\------------------------------------------------------------*/
extern void XgraAddConnect();
extern void XgraDelConnect();
/*------------------------------------------------------------\
| |
| Bound Compute |
| |
\------------------------------------------------------------*/
extern char XgraComputeBound();
/*------------------------------------------------------------\
| |
| Load Functions |
| |
\------------------------------------------------------------*/
extern void XgraLoadFigure();
/*------------------------------------------------------------\
| |
| Error Message Functions |
| |
\------------------------------------------------------------*/
extern char *XgraGetErrorMessage();
/*------------------------------------------------------------\
| |
| Informations Functions |
| |
\------------------------------------------------------------*/
extern char *XgraGetInformations();
# endif

View File

@ -0,0 +1,146 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Bound.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <stdlib.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XGR_bound.h"
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
long XgraBoundXmin = 0;
long XgraBoundYmin = 0;
long XgraBoundXmax = 0;
long XgraBoundYmax = 0;
char XgraRecomputeBound = XGRA_TRUE;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraComputeBound |
| |
\------------------------------------------------------------*/
char XgraComputeBound()
{
xgraobj_list *Obj;
short Layer;
short FirstBound;
if ( XgraFigure == (xautgraph *)NULL )
{
return( XGRA_FALSE );
}
if ( XgraRecomputeBound == XGRA_FALSE )
{
return( XGRA_TRUE );
}
autbegin();
FirstBound = 1;
for ( Layer = 0; Layer < XGRA_MAX_LAYER; Layer++ )
{
for ( Obj = XgraFigure->OBJECT[ Layer ];
Obj != (xgraobj_list *)NULL;
Obj = Obj->NEXT )
{
if ( FirstBound )
{
XgraBoundXmin = Obj->X;
XgraBoundYmin = Obj->Y;
XgraBoundXmax = Obj->X + Obj->DX;
XgraBoundYmax = Obj->Y + Obj->DY;
FirstBound = 0;
}
else
{
if ( Obj->X < XgraBoundXmin )
{
XgraBoundXmin = Obj->X;
}
if ( Obj->Y < XgraBoundYmin )
{
XgraBoundYmin = Obj->Y;
}
if ( ( Obj->X + Obj->DX ) > XgraBoundXmax )
{
XgraBoundXmax = Obj->X + Obj->DX;
}
if ( ( Obj->Y + Obj->DY ) > XgraBoundYmax )
{
XgraBoundYmax = Obj->Y + Obj->DY;
}
}
}
}
XgraBoundXmin = XgraBoundXmin - ( XGRA_UNIT << 1 );
XgraBoundYmin = XgraBoundYmin - ( XGRA_UNIT << 1 );
XgraBoundXmax = XgraBoundXmax + ( XGRA_UNIT << 1 );
XgraBoundYmax = XgraBoundYmax + ( XGRA_UNIT << 1 );
XgraRecomputeBound = XGRA_FALSE;
autend();
return( XGRA_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 : XGRA |
| |
| File : Bound.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGR_BOUND
# define XGR_BOUND
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_DEFAULT_BOUND_XMIN 0
# define XGRA_DEFAULT_BOUND_YMIN 0
# define XGRA_DEFAULT_BOUND_XMAX 100
# define XGRA_DEFAULT_BOUND_YMAX 100
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,295 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Error.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <stdlib.h>
# include <signal.h>
# include <setjmp.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XGR_error.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
static FILE *XgraStreamErr;
static FILE *XgraStreamOut;
static FILE *XgraStreamAll;
static char XgraErrFileName[ 40 ];
static char XgraOutFileName[ 40 ];
static char XgraAllFileName[ 40 ];
static char XgraNormalMode = 1;
/*------------------------------------------------------------\
| |
| Xgra Error Message |
| |
\------------------------------------------------------------*/
static char *XgraErrorBuffer = (char *)NULL;
/*------------------------------------------------------------\
| |
| Xgra Informations |
| |
\------------------------------------------------------------*/
static char XgraInformationsBuffer[ XGRA_INFORMATIONS_BUFFER_SIZE ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Xgra Error Message Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraInitializeErrorMessage |
| |
\------------------------------------------------------------*/
void XgraInitializeErrorMessage( Debug )
char Debug;
{
autbegin();
XgraNormalMode = ! Debug;
if ( XgraNormalMode )
{
sprintf( XgraOutFileName, "/usr/tmp/out_%d",getpid() );
}
sprintf( XgraErrFileName, "/usr/tmp/err_%d",getpid() );
sprintf( XgraAllFileName, "/usr/tmp/all_%d",getpid() );
XgraStreamErr = freopen( XgraErrFileName, "w+", stderr);
XgraStreamAll = fopen ( XgraAllFileName, "w+" );
if ( XgraNormalMode )
{
XgraStreamOut = freopen( XgraOutFileName, "w+", stdout);
}
else
{
XgraStreamOut = XgraStreamErr;
}
if ( ( XgraStreamAll == (FILE *)NULL ) ||
( XgraStreamOut == (FILE *)NULL ) ||
( XgraStreamErr == (FILE *)NULL ) )
{
fprintf( stdout, "Grm: Unable to open trace window !\n");
exit( 1 );
}
if ( XgraNormalMode )
{
unlink( XgraOutFileName );
}
unlink( XgraErrFileName );
autend();
}
/*------------------------------------------------------------\
| |
| XgraFlushErrorMessage |
| |
\------------------------------------------------------------*/
void XgraFlushErrorMessage()
{
int Data;
autbegin();
fflush( XgraStreamErr );
fseek( XgraStreamErr, 0L, 0 );
while( ( Data = fgetc( XgraStreamErr ) ) != EOF )
{
fputc( Data, XgraStreamAll );
}
fclose( XgraStreamErr );
XgraStreamErr = freopen( XgraErrFileName, "w+", stderr );
if ( XgraNormalMode )
{
fflush( XgraStreamOut );
fseek( XgraStreamOut, 0L, 0 );
while( ( Data = fgetc( XgraStreamOut ) ) != EOF )
{
fputc( Data, XgraStreamAll );
}
fclose( XgraStreamOut );
XgraStreamOut = freopen( XgraOutFileName, "w+", stdout );
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraGetErrorMessage |
| |
\------------------------------------------------------------*/
char *XgraGetErrorMessage()
{
char *Message;
long Length;
long Index;
int Data;
autbegin();
XgraFlushErrorMessage();
fflush( XgraStreamAll );
Length = ftell( XgraStreamAll );
if ( XgraErrorBuffer != (char *)NULL )
{
autfreeblock( XgraErrorBuffer );
}
XgraErrorBuffer = autallocblock( Length + 1 );
Index = 0;
while ( ( ( Data = fgetc( XgraStreamAll ) ) != EOF ) &&
( Index < Length ) )
{
XgraErrorBuffer[ Index++ ] = (char)Data;
}
rewind( XgraStreamAll );
XgraErrorBuffer[ Index ] = '\0';
if ( Index == 0 )
{
Message = (char *)NULL;
}
else
{
Message = XgraErrorBuffer;
}
autend();
return( Message );
}
/*------------------------------------------------------------\
| |
| XgraGetInformations |
| |
\------------------------------------------------------------*/
char *XgraGetInformations()
{
char *Scan;
autbegin();
XgraComputeBound();
Scan = XgraInformationsBuffer;
if ( XgraFigureGra != (autgraph *)NULL )
{
sprintf( Scan, " FIGURE : %s\n\n NODES : %d\n ARCS : %d\n\n",
XgraFigure->NAME,
XgraFigureGra->NUMBER_NODE,
XgraFigureGra->NUMBER_ARC );
}
else
{
sprintf( Scan, " FIGURE : No current figure !\n\n" );
}
Scan = Scan + strlen( Scan );
sprintf( Scan, " BOUNDING BOX : \n\n XMIN : %d\n YMIN : %d\n XMAX : %d\n YMAX : %d\n\n",
XgraBoundXmin / XGRA_UNIT, XgraBoundYmin / XGRA_UNIT,
XgraBoundXmax / XGRA_UNIT, XgraBoundYmax / XGRA_UNIT );
Scan = Scan + strlen( Scan );
sprintf( Scan, " XGRA PARAM : %s\n\n", XGRA_PARAM_NAME );
autend();
return( XgraInformationsBuffer );
}

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 : XGRA |
| |
| File : Error.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGR_ERROR
# define XGR_ERROR
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_INFORMATIONS_BUFFER_SIZE 1024
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraFlushErrorMessage();
# endif

View File

@ -0,0 +1,169 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Gra.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <stdlib.h>
# include <signal.h>
# include <string.h>
# include <setjmp.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XGR_graph.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
autgraph *XgraFigureGra = (autgraph *)NULL;
/*------------------------------------------------------------\
| |
| For Set Long Jump |
| |
\------------------------------------------------------------*/
static jmp_buf XgraJumpBuffer;
static void (*OldExitHandler)() = NULL;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Xgra Exit Handler Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraExitHandler |
| |
\------------------------------------------------------------*/
void XgraExitHandler()
{
XgraFlushErrorMessage();
signal( SIGTERM, OldExitHandler );
longjmp( XgraJumpBuffer, 1);
}
/*------------------------------------------------------------\
| |
| XgraActiveExitHandler |
| |
\------------------------------------------------------------*/
void XgraActiveExitHandler()
{
OldExitHandler = signal( SIGTERM, XgraExitHandler );
}
/*------------------------------------------------------------\
| |
| XgraResetExitHandler |
| |
\------------------------------------------------------------*/
void XgraResetExitHandler()
{
signal( SIGTERM, OldExitHandler );
}
/*------------------------------------------------------------\
| |
| Get Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Xgragetgrafig |
| |
\------------------------------------------------------------*/
autgraph *Xgragetgrafig( FileName )
char *FileName;
{
autgraph *FigureGra;
autbegin();
FigureGra = (autgraph *)NULL;
XgraActiveExitHandler();
if ( setjmp( XgraJumpBuffer ) == 0 )
{
FigureGra = loadautgraph( FileName );
XgraResetExitHandler();
autend();
return( FigureGra );
}
if ( FigureGra != (autgraph *)NULL )
{
destroyautgraph( FigureGra );
}
autend();
return( (autgraph *)NULL );
}

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 : XGRA |
| |
| File : Gra.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
# ifndef XGRA_H
# define XGRA_H
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern autgraph *Xgragetgrafig();
# endif

View File

@ -0,0 +1,543 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Object.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <stdlib.h>
# include <math.h>
# include <signal.h>
# include <string.h>
# include <setjmp.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XGR_place.h"
# include "XGR_object.h"
# include "XGR_graph.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
xautgraph *XgraFigure = (xautgraph *)NULL;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Alloc Functions |
| |
\------------------------------------------------------------*/
xautgraph *XgraAllocFigure()
{
return( (xautgraph *)autallocblock( sizeof( xautgraph ) ) );
}
xgraobj_list *XgraAllocObject()
{
return( (xgraobj_list *)autallocheap( sizeof( xgraobj_list ) ) );
}
/*------------------------------------------------------------\
| |
| Free Functions |
| |
\------------------------------------------------------------*/
void XgraFreeFigure( Figure )
xautgraph *Figure;
{
autfreeblock( Figure );
}
void XgraFreeObject( Object )
xgraobj_list *Object;
{
autfreeheap( Object, sizeof( xgraobj_list ) );
}
/*------------------------------------------------------------\
| |
| Add Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraAddCircle |
| |
\------------------------------------------------------------*/
xgraobj_list *XgraAddCircle( X, Y, R, Layer )
long X;
long Y;
long R;
short Layer;
{
xgraobj_list *Object;
autbegin();
Object = XgraAllocObject();
Object->TYPE = XGRA_OBJECT_CIRCLE;
Object->LAYER = Layer;
Object->NEXT = XgraFigure->OBJECT[ Layer ];
Object->X = X - R;
Object->Y = Y - R;
Object->DX = ( R << 1 );
Object->DY = ( R << 1 );
XgraFigure->OBJECT[ Layer ] = Object;
autend();
return( Object );
}
/*------------------------------------------------------------\
| |
| XgraAddLine |
| |
\------------------------------------------------------------*/
xgraobj_list *XgraAddLine( X1, Y1, X2, Y2, LayerFrom, LayerTo )
long X1;
long Y1;
long X2;
long Y2;
short LayerFrom;
short LayerTo;
{
xgraobj_list *Object;
autbegin();
Object = XgraAllocObject();
Object->LAYER = LayerFrom;
Object->TYPE = XGRA_OBJECT_LINE;
Object->NEXT = XgraFigure->OBJECT[ LayerTo ];
if ( X1 > X2 )
{
SetXgraLineLeft( Object );
Object->X = X2;
Object->DX = X1 - X2;
}
else
{
Object->X = X1;
Object->DX = X2 - X1;
}
if ( Y1 > Y2 )
{
SetXgraLineDown( Object );
Object->Y = Y2;
Object->DY = Y1 - Y2;
}
else
{
Object->Y = Y1;
Object->DY = Y2 - Y1;
}
XgraFigure->OBJECT[ LayerTo ] = Object;
autend();
return( Object );
}
/*------------------------------------------------------------\
| |
| XgraAddArrow |
| |
\------------------------------------------------------------*/
xgraobj_list *XgraAddArrow( X1, Y1, X2, Y2, LayerFrom, LayerTo )
long X1;
long Y1;
long X2;
long Y2;
short LayerFrom;
short LayerTo;
{
xgraobj_list *Object;
autbegin();
Object = XgraAllocObject();
Object->LAYER = LayerFrom;
Object->TYPE = XGRA_OBJECT_ARROW;
Object->NEXT = XgraFigure->OBJECT[ LayerTo ];
if ( X1 > X2 )
{
SetXgraLineLeft( Object );
Object->X = X2;
Object->DX = X1 - X2;
}
else
{
Object->X = X1;
Object->DX = X2 - X1;
}
if ( Y1 > Y2 )
{
SetXgraLineDown( Object );
Object->Y = Y2;
Object->DY = Y1 - Y2;
}
else
{
Object->Y = Y1;
Object->DY = Y2 - Y1;
}
XgraFigure->OBJECT[ LayerTo ] = Object;
autend();
return( Object );
}
/*------------------------------------------------------------\
| |
| XgraAddRectangle |
| |
\------------------------------------------------------------*/
xgraobj_list *XgraAddRectangle( X, Y, DX, DY, Layer )
long X;
long Y;
long DX;
long DY;
short Layer;
{
xgraobj_list *Object;
autbegin();
Object = XgraAllocObject();
Object->TYPE = XGRA_OBJECT_RECTANGLE;
Object->LAYER = Layer;
Object->NEXT = XgraFigure->OBJECT[ Layer ];
Object->X = X;
Object->Y = Y;
Object->DX = DX;
Object->DY = DY;
XgraFigure->OBJECT[ Layer ] = Object;
autend();
return( Object );
}
/*------------------------------------------------------------\
| |
| XgraAddText |
| |
\------------------------------------------------------------*/
xgraobj_list *XgraAddText( X, Y, Name, Layer )
long X;
long Y;
char *Name;
short Layer;
{
xgraobj_list *Object;
autbegin();
Object = XgraAllocObject();
Object->LAYER = Layer;
Object->TYPE = XGRA_OBJECT_TEXT;
Object->NEXT = XgraFigure->TEXT[ Layer ];
Object->NAME = namealloc( Name );
Object->X = X;
Object->Y = Y;
XgraFigure->TEXT[ Layer ] = Object;
autend();
return( Object );
}
/*------------------------------------------------------------\
| |
| XgraAddNode |
| |
\------------------------------------------------------------*/
xgraobj_list *XgraAddNode( Node, X, Y, Layer )
autnode_list *Node;
long X;
long Y;
short Layer;
{
xgraobj_list *Circle;
xgraobj_list *Text;
X *= XGRA_UNIT;
Y *= XGRA_UNIT;
Circle = XgraAddCircle( X, Y, XGRA_UNIT, Layer );
Text = XgraAddText( X, Y - ( ( 3 * XGRA_UNIT ) >> 1 ),
Node->NAME, Layer );
Text->LINK = Circle;
Circle->LINK = Text;
SetXgraNode( Circle );
SetXgraNode( Text );
Circle->USER = (void *)Node;
Text->USER = (void *)Node;
Node->USER = (void *)Circle;
autend();
return( Circle );
}
/*------------------------------------------------------------\
| |
| XgraAddArc |
| |
\------------------------------------------------------------*/
xgraobj_list *XgraAddArc( Arc )
autarc_list *Arc;
{
xgraobj_list *Arrow;
xgraobj_list *ObjFrom;
xgraobj_list *ObjTo;
long X1;
long Y1;
long X2;
long Y2;
unsigned long Layer;
double Distance;
ObjFrom = (xgraobj_list *)(Arc->NODE_FROM->USER);
ObjTo = (xgraobj_list *)(Arc->NODE_TO->USER);
Layer = ((unsigned long)Arc->FLAGS) % XGRA_MAX_LAYER;
if ( ObjFrom != ObjTo )
{
X1 = ObjTo->X + ( ObjTo->DX >> 1 );
Y1 = ObjTo->Y + ( ObjTo->DX >> 1 );
X2 = ObjFrom->X + ( ObjFrom->DX >> 1 );
Y2 = ObjFrom->Y + ( ObjFrom->DY >> 1 );
}
else
{
X1 = ObjFrom->X + ( ObjFrom->DX >> 1 );
Y1 = ObjFrom->Y + ( ObjFrom->DY >> 1 );
Distance = sqrt( (double)( X1 * X1 ) + (double)( Y1 * Y1 ) );
X2 = X1 + (long)( (double)( X1 * ( XGRA_UNIT << 2 ) ) / Distance );
Y2 = Y1 + (long)( (double)( Y1 * ( XGRA_UNIT << 2 ) ) / Distance );
}
Arrow = XgraAddArrow( X1, Y1, X2, Y2, (short)Layer, (short)Layer );
Arrow->LINK = Arrow;
SetXgraArc( Arrow );
Arrow->USER = (void *)Arc;
Arc->USER = (void *)Arrow;
autend();
return( Arrow );
}
/*------------------------------------------------------------\
| |
| XgraAddFigure |
| |
\------------------------------------------------------------*/
xautgraph *XgraAddFigure()
{
autnode_list *ScanNode;
autarc_list *ScanArc;
xgrapoint *Point;
unsigned long Layer;
autbegin();
XgraFigure = XgraAllocFigure();
XgraFigure->NAME = namealloc( "graph" );
XgraPlaceFigure();
for ( ScanNode = XgraFigureGra->NODE;
ScanNode != (autnode_list *)NULL;
ScanNode = ScanNode->NEXT )
{
Point = (xgrapoint *)( ScanNode->USER );
Layer = ((unsigned long)ScanNode->FLAGS) % XGRA_MAX_LAYER;
XgraAddNode( ScanNode, Point->X, Point->Y, (short)Layer );
}
for ( ScanArc = XgraFigureGra->ARC;
ScanArc != (autarc_list *)NULL;
ScanArc = ScanArc->NEXT )
{
XgraAddArc( ScanArc );
}
autend();
return( XgraFigure );
}
/*------------------------------------------------------------\
| |
| Load Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraLoadFigure |
| |
\------------------------------------------------------------*/
void XgraLoadFigure( FileName )
char *FileName;
{
autbegin();
XgraFigureGra = Xgragetgrafig( FileName );
if ( XgraFigureGra != (autgraph *)NULL )
{
XgraAddFigure();
}
autend();
}
/*------------------------------------------------------------\
| |
| Del Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraDelFigure |
| |
\------------------------------------------------------------*/
void XgraDelFigure()
{
xgraobj_list *ScanObject;
xgraobj_list *DelObject;
short Layer;
if ( XgraFigure == (xautgraph *)NULL ) return;
autbegin();
for ( Layer = 0; Layer < XGRA_MAX_LAYER; Layer++ )
{
ScanObject = XgraFigure->OBJECT[ Layer ];
while ( ScanObject != (xgraobj_list *)NULL )
{
DelObject = ScanObject;
ScanObject = ScanObject->NEXT;
XgraFreeObject( DelObject );
}
ScanObject = XgraFigure->TEXT[ Layer ];
while ( ScanObject != (xgraobj_list *)NULL )
{
DelObject = ScanObject;
ScanObject = ScanObject->NEXT;
XgraFreeObject( DelObject );
}
}
XgraFreeFigure( XgraFigure );
destroyautgraph( XgraFigureGra );
XgraFigure = (xautgraph *)NULL;
XgraFigureGra = (autgraph *)NULL;
autend();
}

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 : XGRA |
| |
| File : Object.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGR_OBJECT_H
# define XGR_OBJECT_H
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,141 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Place.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <stdlib.h>
# include <math.h>
# include <signal.h>
# include <string.h>
# include <setjmp.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XGR_place.h"
# include "XGR_graph.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
static xgrapoint *XgraPointArray = (xgrapoint *)NULL;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraPlaceFigure |
| |
\------------------------------------------------------------*/
void XgraPlaceFigure()
{
autnode_list *ScanNode;
autnode_list *NodeTo;
autnode_list *NodeFrom;
autarc_list *ScanArc;
chain_list *ScanChain;
int NumberNode;
int PointIndex;
float X;
float Y;
float VectorX;
float VectorY;
float Alpha;
float CosAlpha;
float SinAlpha;
autbegin();
if ( XgraPointArray != (xgrapoint *)NULL )
{
autfreeblock( (char *)XgraPointArray );
XgraPointArray = (xgrapoint *)NULL;
}
NumberNode = XgraFigureGra->NUMBER_NODE;
XgraPointArray = (xgrapoint *)autallocblock( sizeof( xgrapoint ) * NumberNode );
Alpha = ( M_PI * 2.0 ) / (float)( NumberNode );
CosAlpha = cos( Alpha );
SinAlpha = sin( Alpha );
VectorX = (float)( NumberNode << 1 );
VectorY = 0.0;
PointIndex = 0;
for ( ScanNode = XgraFigureGra->NODE;
ScanNode != (autnode_list *)NULL;
ScanNode = ScanNode->NEXT )
{
X = VectorX;
Y = VectorY;
ScanNode->USER = (void *)( &XgraPointArray[ PointIndex ] );
XgraPointArray[ PointIndex ].X = (long)X;
XgraPointArray[ PointIndex++ ].Y = (long)Y;
VectorX = ( X * CosAlpha ) - ( Y * SinAlpha );
VectorY = ( X * SinAlpha ) + ( Y * CosAlpha );
}
autend();
}

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 : XGRA |
| |
| File : Place.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGR_PLACE_H
# define XGR_PLACE_H
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Mask |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Macro |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraPlaceFigure();
# endif

View File

@ -0,0 +1,422 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Select.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <stdlib.h>
# include <signal.h>
# include <string.h>
# include <setjmp.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XGR_select.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
xgraselect_list *XgraHeadSelect = (xgraselect_list *)NULL;
xgraselect_list *XgraHeadConnect = (xgraselect_list *)NULL;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Alloc Functions |
| |
\------------------------------------------------------------*/
xgraselect_list *XgraAllocSelect()
{
return( (xgraselect_list *)autallocheap( sizeof( xgraselect_list ) ) );
}
/*------------------------------------------------------------\
| |
| Free Functions |
| |
\------------------------------------------------------------*/
void XgraFreeSelect( Select )
xgraselect_list *Select;
{
autfreeheap( Select, sizeof( xgraselect_list ) );
}
/*------------------------------------------------------------\
| |
| Select Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraSelectObject |
| |
\------------------------------------------------------------*/
void XgraSelectObject( Object )
xgraobj_list *Object;
{
xgraobj_list *Scan;
autbegin();
Scan = Object;
do
{
SetXgraSelect( Scan );
Scan = Scan->LINK;
}
while ( Scan != Object );
autend();
}
/*------------------------------------------------------------\
| |
| XgraUnselectObject |
| |
\------------------------------------------------------------*/
void XgraUnselectObject( Object )
xgraobj_list *Object;
{
xgraobj_list *Scan;
autbegin();
Scan = Object;
do
{
ClearXgraSelect( Scan );
Scan = Scan->LINK;
}
while ( Scan != Object );
autend();
}
/*------------------------------------------------------------\
| |
| XgraAcceptObject |
| |
\------------------------------------------------------------*/
void XgraAcceptObject( Object )
xgraobj_list *Object;
{
xgraobj_list *Scan;
autbegin();
Scan = Object;
do
{
SetXgraAccept( Scan );
Scan = Scan->LINK;
}
while ( Scan != Object );
autend();
}
/*------------------------------------------------------------\
| |
| XgraRejectObject |
| |
\------------------------------------------------------------*/
void XgraRejectObject( Object )
xgraobj_list *Object;
{
xgraobj_list *Scan;
autbegin();
Scan = Object;
do
{
ClearXgraAccept( Scan );
Scan = Scan->LINK;
}
while ( Scan != Object );
autend();
}
/*------------------------------------------------------------\
| |
| XgraConnectObject |
| |
\------------------------------------------------------------*/
void XgraConnectObject( Object )
xgraobj_list *Object;
{
xgraobj_list *Scan;
autbegin();
Scan = Object;
do
{
SetXgraConnect( Scan );
Scan = Scan->LINK;
}
while ( Scan != Object );
autend();
}
/*------------------------------------------------------------\
| |
| XgraDisconnectObject |
| |
\------------------------------------------------------------*/
void XgraDisconnectObject( Object )
xgraobj_list *Object;
{
xgraobj_list *Scan;
autbegin();
Scan = Object;
do
{
ClearXgraConnect( Scan );
Scan = Scan->LINK;
}
while ( Scan != Object );
autend();
}
/*------------------------------------------------------------\
| |
| Add Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraAddSelect |
| |
\------------------------------------------------------------*/
void XgraAddSelect( Object )
xgraobj_list *Object;
{
xgraselect_list *Select;
autbegin();
Select = XgraAllocSelect();
Select->NEXT = XgraHeadSelect;
Select->OBJECT = Object;
XgraHeadSelect = Select;
XgraSelectObject( Object );
autend();
}
/*------------------------------------------------------------\
| |
| XgraAddConnect |
| |
\------------------------------------------------------------*/
void XgraAddConnect( Object )
xgraobj_list *Object;
{
xgraselect_list *Connect;
autbegin();
Connect = XgraAllocSelect();
Connect->NEXT = XgraHeadConnect;
Connect->OBJECT = Object;
XgraHeadConnect = Connect;
XgraConnectObject( Object );
autend();
}
/*------------------------------------------------------------\
| |
| Del Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraDelSelect |
| |
\------------------------------------------------------------*/
void XgraDelSelect()
{
xgraselect_list *Select;
xgraselect_list *DelSelect;
autbegin();
Select = XgraHeadSelect;
XgraHeadSelect = (xgraselect_list *)NULL;
while ( Select != (xgraselect_list *)NULL )
{
XgraRejectObject( Select->OBJECT );
DelSelect = Select;
Select = Select->NEXT;
XgraFreeSelect( DelSelect );
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraPurgeSelect |
| |
\------------------------------------------------------------*/
void XgraPurgeSelect()
{
xgraselect_list *DelSelect;
xgraselect_list *Select;
xgraselect_list **Previous;
autbegin();
Previous = &XgraHeadSelect;
Select = XgraHeadSelect;
while( Select != (xgraselect_list *)NULL )
{
if ( ! IsXgraAccept( Select->OBJECT ) )
{
DelSelect = Select;
Select = Select->NEXT;
*Previous = Select;
XgraFreeSelect( DelSelect );
}
else
{
Previous = &Select->NEXT;
Select = Select->NEXT;
}
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraDelConnect |
| |
\------------------------------------------------------------*/
void XgraDelConnect()
{
xgraselect_list *Connect;
xgraselect_list *DelConnect;
autbegin();
Connect = XgraHeadConnect;
XgraHeadConnect = (xgraselect_list *)NULL;
while ( Connect != (xgraselect_list *)NULL )
{
XgraDisconnectObject( Connect->OBJECT );
DelConnect = Connect;
Connect = Connect->NEXT;
XgraFreeSelect( DelConnect );
}
autend();
}

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 : XGRA |
| |
| File : Select.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGR_SELECT_H
# define XGR_SELECT_H
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

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 : XGRA |
| |
| File : XME.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef XGRA_XME
# define XGRA_XME
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern XgraMenuItem XgraEditMenu[];
extern XgraPanelItem XgraEditSearchViewPanel;
extern XgraPanelItem XgraEditSelectPanel;
extern XgraPanelItem XgraEditIdentifyPanel;
extern int XgraEditSearchViewDefaultValues[ 5 ];
extern int XgraEditIdentifyDefaultValues[ 5 ];
extern int XgraEditSelectDefaultValues[ 5 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraBuildEditDialog();
extern void XgraEditSearch();
extern void XgraEditIdentify();
extern void XgraEditConnected();
extern void XgraEditUnselectAll();
extern void XgraDisplayEditIdentify();
# endif

View File

@ -0,0 +1,182 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XTB.h"
# include "XME.h"
# include "XME_dialog.h"
# include "XME_edit.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Search Dialog |
| |
\------------------------------------------------------------*/
XgraDialogItem XgraSearchObjectDialog =
{
"Object name",
XGRA_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackSearchObjectOk,
(XtPointer)NULL,
(void *)CallbackSearchObjectCancel,
(XtPointer)NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraBuildEditDialog |
| |
\------------------------------------------------------------*/
void XgraBuildEditDialog()
{
autbegin();
XgraBuildDialog( XgraMainWindow, &XgraSearchObjectDialog );
autend();
}
/*------------------------------------------------------------\
| |
| Search Callback |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback For Object |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackSearchObjectOk |
| |
\------------------------------------------------------------*/
void CallbackSearchObjectOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *NameSet;
autbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&NameSet );
XtUnmanageChild( XgraSearchObjectDialog.WIDGET );
XgraExitDialog();
NameSet = XgraPostTreatString( NameSet );
if ( NameSet != (char *)NULL )
{
NameSet = namealloc( NameSet );
XgraEditSearchObject( NameSet );
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackSearchObjectCancel |
| |
\------------------------------------------------------------*/
void CallbackSearchObjectCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
autbegin();
XtUnmanageChild( XgraSearchObjectDialog.WIDGET );
XgraExitDialog();
autend();
}

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 : XGRA |
| |
| File : Dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_EDIT_DIALOG
# define XGRA_EDIT_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern XgraDialogItem XgraSearchObjectDialog;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackSearchObjectOk();
extern void CallbackSearchObjectCancel();
# endif

View File

@ -0,0 +1,257 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Edit.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <math.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XGR.h"
# include "XMV.h"
# include "XME.h"
# include "XME_edit.h"
# include "XME_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Identify Buffer |
| |
\------------------------------------------------------------*/
static char XgraIdentifyMessage[ XGRA_IDENTIFY_MESSAGE_SIZE ];
static char XgraIdentifyBuffer [ XGRA_IDENTIFY_BUFFER_SIZE ];
static char XgraIdentifyLocout [ XGRA_IDENTIFY_LOCOUT_SIZE ];
static char *XgraScanIdentify;
static long XgraIdentifyLength;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraAddIdentify |
| |
\------------------------------------------------------------*/
short XgraAddIdentify( Obj )
xgraobj_list *Obj;
{
autnode_list *Node;
autarc_list *Arc;
char *ScanString;
long Length;
autbegin();
XgraIdentifyBuffer[0] = '\0';
if ( IsXgraNode( Obj ) )
{
Node = (autnode_list *)( Obj->USER );
sprintf( XgraIdentifyBuffer, "NODE :\n\n NAME : %s\n FLAGS : %ld\n\n",
Node->NAME, Node->FLAGS );
}
else
if ( IsXgraArc( Obj ) )
{
Arc = (autarc_list *)( Obj->USER );
sprintf( XgraIdentifyBuffer,
"ARC :\n\n FROM : %s TO : %s\n FLAGS : %ld\n\n",
Arc->NODE_FROM->NAME, Arc->NODE_TO->NAME, Arc->FLAGS );
}
Length = strlen( XgraIdentifyBuffer );
if ( ( XgraIdentifyLength + Length ) < ( XGRA_IDENTIFY_MESSAGE_SIZE - 1 ) )
{
strcpy( XgraScanIdentify, XgraIdentifyBuffer );
XgraScanIdentify += Length;
XgraIdentifyLength += Length;
autend();
return( XGRA_TRUE );
}
strcpy( XgraScanIdentify, "#" );
autend();
return( XGRA_FALSE );
}
/*------------------------------------------------------------\
| |
| XgraEditIdentify |
| |
\------------------------------------------------------------*/
void XgraEditIdentify( X1, Y1 )
long X1;
long Y1;
{
xgraselect_list *Select;
xgraobj_list *Obj;
strcpy( XgraIdentifyMessage, "No element found !" );
XgraScanIdentify = XgraIdentifyMessage;
XgraIdentifyLength = 0;
XgraEditSelectPoint( X1, Y1 );
for ( Select = XgraHeadSelect;
Select != (xgraselect_list *)NULL;
Select = Select->NEXT )
{
if ( ! XgraAddIdentify( Select->OBJECT ) ) break;
}
XgraDelSelect();
XgraDisplayEditIdentify( XgraIdentifyMessage );
XgraEnterPanel( &XgraEditIdentifyPanel );
}
/*------------------------------------------------------------\
| |
| XgraEditConnected |
| |
\------------------------------------------------------------*/
void XgraEditConnected( X1, Y1 )
long X1;
long Y1;
{
xgraselect_list *Select;
xgraselect_list **PrevSelect;
xgraobj_list *Obj;
if ( XgraHeadConnect != (xgraselect_list *)NULL )
{
XgraDelConnect();
XgraZoomRefresh();
}
XgraEditSelectPoint( X1, Y1 );
XgraDisplaySelectList( (char *)NULL );
for ( Select = XgraHeadSelect;
Select != (xgraselect_list *)NULL;
Select = Select->NEXT )
{
XgraAddSelectList( Select->OBJECT );
}
if ( XgraHeadSelect == (xgraselect_list *)NULL )
{
XgraWarningMessage( XgraMainWindow, "No element found !" );
}
else
{
if ( XgraHeadSelect->NEXT != (xgraselect_list *)NULL )
{
XgraEnterPanel( &XgraEditSelectPanel );
XgraLimitedLoop( XgraEditSelectPanel.PANEL );
}
else
{
XgraAcceptObject( XgraHeadSelect->OBJECT );
XgraDisplayObject( XgraHeadSelect->OBJECT );
}
}
XgraPurgeSelect();
for ( Select = XgraHeadSelect;
Select != (xgraselect_list *)NULL;
Select = Select->NEXT )
{
XgraAddConnect( Select->OBJECT );
}
if ( XgraHeadSelect != (xgraselect_list *)NULL )
{
if ( XgraHeadSelect->NEXT == (xgraselect_list *)NULL )
{
Obj = XgraHeadSelect->OBJECT;
XgraDelSelect();
XgraDisplayObject( Obj );
}
else
{
XgraDelSelect();
XgraZoomRefresh();
}
}
}

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 : XGRA |
| |
| File : Edit.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_EDIT
# define XGRA_EDIT
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_IDENTIFY_BUFFER_SIZE 64000
# define XGRA_IDENTIFY_LOCOUT_SIZE 64000
# define XGRA_IDENTIFY_MESSAGE_SIZE 64000
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,193 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMV.h"
# include "XME.h"
# include "XMX.h"
# include "XME_menu.h"
# include "XME_dialog.h"
# include "XME_edit.h"
# include "XME_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
XgraMenuItem XgraEditMenu[] =
{
{
"Identify",
'I',
"Ctrl<Key>I",
"Ctrl I",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditIdentify,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
{
"Connected",
'C',
"Ctrl<Key>C",
"Ctrl C",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditConnected,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
{
"Search ",
'S',
"Ctrl<Key>S",
"Ctrl S",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackEditSearch,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackEditIdentify |
| |
\------------------------------------------------------------*/
void CallbackEditIdentify( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraChangeEditMode( XGRA_EDIT_IDENTIFY,
XgraPromptEditIdentify );
autend();
}
/*------------------------------------------------------------\
| |
| CallbackEditConnected |
| |
\------------------------------------------------------------*/
void CallbackEditConnected( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraChangeEditMode( XGRA_EDIT_CONNECTED,
XgraPromptEditConnected );
autend();
}
/*------------------------------------------------------------\
| |
| CallbackEditSearch |
| |
\------------------------------------------------------------*/
void CallbackEditSearch( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraEnterDialog( &XgraSearchObjectDialog );
autend();
}

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 : XGRA |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_MENU
# define XGRA_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackEditIdentify();
extern void CallbackEditConnected();
extern void CallbackEditSearch();
# endif

View File

@ -0,0 +1,113 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Message.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XTB.h"
# include "XME.h"
# include "XME_edit.h"
# include "XME_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraPromptEditIdentify |
| |
\------------------------------------------------------------*/
void XgraPromptEditIdentify()
{
autbegin();
XgraDisplayMessage( XGRA_MESSAGE_MODE , "Identify" );
XgraDisplayMessage( XGRA_MESSAGE_INFO , "Select object" );
XgraDisplayMessage( XGRA_MESSAGE_PROMPT, "Enter select point" );
autend();
}
/*------------------------------------------------------------\
| |
| XgraPromptEditConnected |
| |
\------------------------------------------------------------*/
void XgraPromptEditConnected()
{
autbegin();
XgraDisplayMessage( XGRA_MESSAGE_MODE , "Connected" );
XgraDisplayMessage( XGRA_MESSAGE_INFO , "Select object" );
XgraDisplayMessage( XGRA_MESSAGE_PROMPT, "Enter select point" );
autend();
}

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 : XGRA |
| |
| File : Message.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_MESSAGE
# define XGRA_MESSAGE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraPromptEditIdentify();
extern void XgraPromptEditConnected();
# endif

View File

@ -0,0 +1,493 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Panel.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XTB.h"
# include "XME.h"
# include "XME_panel.h"
# include "XME_message.h"
# include "XME_dialog.h"
# include "XME_edit.h"
# include "XME_search.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Search View Panel |
| |
\------------------------------------------------------------*/
static char *XgraEditSearchViewButtonName[] =
{
"Continue",
"Abort"
};
static XgraPanelButtonItem XgraEditSearchViewButton[] =
{
{
&XgraEditSearchViewButtonName[0],
NULL, NULL, 0, 0,
NULL,
NULL,
0, 0,
1, 1,
CallbackEditSearchViewContinue,
(XtPointer)NULL,
(Widget)NULL
}
,
{
&XgraEditSearchViewButtonName[1],
NULL, NULL, 0, 0,
NULL,
NULL,
0, 1,
1, 1,
CallbackEditSearchViewAbort,
(XtPointer)NULL,
(Widget)NULL
}
,
NULL
};
XgraPanelItem XgraEditSearchViewPanel =
{
"View search",
1,
0,
XGRA_EDIT_VIEW_SEARCH_X,
XGRA_EDIT_VIEW_SEARCH_Y,
100,
50,
1,
2,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
XgraEditSearchViewButton
};
int XgraEditSearchViewDefaultValues[ 5 ] =
{
XGRA_EDIT_VIEW_SEARCH_X,
XGRA_EDIT_VIEW_SEARCH_Y,
100, 50, 0
};
/*------------------------------------------------------------\
| |
| Panel Identify |
| |
\------------------------------------------------------------*/
static char *XgraPanelIdentifyButtonName[] =
{
"Text",
"Close"
};
XgraPanelButtonItem XgraEditIdentifyButton[] =
{
{
&XgraPanelIdentifyButtonName[0],
"Nothing", NULL, 0, 0,
NULL,
NULL,
0, 0,
8, 9,
NULL,
(XtPointer)NULL,
(Widget)NULL
}
,
{
&XgraPanelIdentifyButtonName[1],
NULL, NULL, 0, 0,
NULL,
NULL,
3, 9,
2, 1,
CallbackEditCloseIdentify,
(XtPointer)NULL,
(Widget)NULL
}
,
NULL
};
XgraPanelItem XgraEditIdentifyPanel =
{
"Identify",
1,
0,
XGRA_EDIT_IDENTIFY_X,
XGRA_EDIT_IDENTIFY_Y,
360,
250,
8,
10,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
XgraEditIdentifyButton
};
int XgraEditIdentifyDefaultValues[ 5 ] =
{
XGRA_EDIT_IDENTIFY_X,
XGRA_EDIT_IDENTIFY_Y,
360, 250, 0
};
/*------------------------------------------------------------\
| |
| Select Panel |
| |
\------------------------------------------------------------*/
static char *XgraEditSelectButtonName[] =
{
"Select",
"Accept",
"Cancel"
};
XgraPanelButtonItem XgraEditSelectButton[] =
{
{
&XgraEditSelectButtonName[0],
"List",
"List", 0, 0,
NULL,
NULL,
0, 0,
8, 9,
CallbackEditSelectList,
(XtPointer)1,
(Widget)NULL
}
,
{
&XgraEditSelectButtonName[1],
NULL, NULL, 0, 0,
NULL,
NULL,
1, 9,
2, 1,
CallbackEditSelectAccept,
(XtPointer)NULL,
(Widget)NULL
}
,
{
&XgraEditSelectButtonName[2],
NULL, NULL, 0, 0,
NULL,
NULL,
5, 9,
2, 1,
CallbackEditSelectCancel,
(XtPointer)NULL,
(Widget)NULL
}
,
NULL
};
XgraPanelItem XgraEditSelectPanel =
{
"Select",
1,
0,
XGRA_EDIT_SELECT_X,
XGRA_EDIT_SELECT_Y,
360,
250,
8,
10,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
XgraEditSelectButton
};
int XgraEditSelectDefaultValues[ 5 ] =
{
XGRA_EDIT_SELECT_X,
XGRA_EDIT_SELECT_Y,
360, 250, 0
};
/*------------------------------------------------------------\
| |
| Callback For View Search |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackEditSearchViewContinue |
| |
\------------------------------------------------------------*/
void CallbackEditSearchViewContinue( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraExitDialog();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackEditSearchViewAbort |
| |
\------------------------------------------------------------*/
void CallbackEditSearchViewAbort( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraSearchAbort = XGRA_TRUE;
XgraExitDialog();
autbegin();
}
/*------------------------------------------------------------\
| |
| Callback For Identify |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackEditCloseIdentify |
| |
\------------------------------------------------------------*/
void CallbackEditCloseIdentify( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraExitPanel( &XgraEditIdentifyPanel );
autend();
}
/*------------------------------------------------------------\
| |
| XgraDisplayEditIdentify |
| |
\------------------------------------------------------------*/
void XgraDisplayEditIdentify( Message )
char *Message;
{
autbegin();
XmTextSetString( XgraEditIdentifyButton[0].BUTTON, Message );
autend();
}
/*------------------------------------------------------------\
| |
| Callback For Select |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackEditSelectList |
| |
\------------------------------------------------------------*/
void CallbackEditSelectList( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmListCallbackStruct *CallData;
{
autbegin();
if ( ClientData == (caddr_t)NULL )
{
CallbackEditSelectAccept( MyWidget, (caddr_t)NULL, (caddr_t)NULL );
}
else
{
XgraEditSelectObject( CallData->item_position - 1 );
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackEditSelectAccept |
| |
\------------------------------------------------------------*/
void CallbackEditSelectAccept( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraExitPanel( &XgraEditSelectPanel );
XgraExitDialog();
XgraEditSelectAccept();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackEditSelectCancel |
| |
\------------------------------------------------------------*/
void CallbackEditSelectCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraExitPanel( &XgraEditSelectPanel );
XgraExitDialog();
XgraEditSelectCancel();
autend();
}
/*------------------------------------------------------------\
| |
| XgraDisplaySelectList |
| |
\------------------------------------------------------------*/
void XgraDisplaySelectList( Message )
char *Message;
{
XmString Label;
autbegin();
if ( Message == (char *)NULL )
{
XmListDeleteAllItems( XgraEditSelectButton[ 0 ].BUTTON );
}
else
{
Label = XmStringCreateSimple( Message );
XmListAddItem( XgraEditSelectButton[ 0 ].BUTTON , Label , NULL );
XmStringFree( Label );
}
autend();
}

View File

@ -0,0 +1,90 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Panel.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_EDIT_PANEL
# define XGRA_EDIT_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_EDIT_VIEW_SEARCH_X 790
# define XGRA_EDIT_VIEW_SEARCH_Y 450
# define XGRA_EDIT_IDENTIFY_X 330
# define XGRA_EDIT_IDENTIFY_Y 280
# define XGRA_EDIT_SELECT_X 330
# define XGRA_EDIT_SELECT_Y 280
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackEditSearchViewContinue();
extern void CallbackEditSearchViewAbort();
extern void CallbackEditCloseIdentify();
extern void CallbackEditSelectList();
extern void CallbackEditSelectAccept();
extern void CallbackEditSelectCancel();
extern void XgraDisplaySelectList();
# endif

View File

@ -0,0 +1,228 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Search.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <math.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XGR.h"
# include "XME.h"
# include "XMV.h"
# include "XME_search.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
char XgraSearchAbort;
int XgraSearchNumber;
char *XgraSearchString;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraEditInitializeSearch |
| |
\------------------------------------------------------------*/
void XgraEditInitializeSearch( Name )
char *Name;
{
char *Star;
autbegin();
Star = strrchr( Name, '*' );
if ( Star != (char *)NULL )
{
XgraSearchNumber = (int)(Star - Name);
}
else
{
XgraSearchNumber = 0;
}
XgraSearchString = Name;
autend();
}
/*------------------------------------------------------------\
| |
| XgraEditSearchCompare |
| |
\------------------------------------------------------------*/
int XgraEditSearchCompare( Name )
char *Name;
{
if ( Name != (char *)NULL )
{
if ( XgraSearchNumber )
{
return( ! strncmp( XgraSearchString, Name, XgraSearchNumber ) );
}
else
{
return( Name == XgraSearchString );
}
}
return( 0 );
}
/*------------------------------------------------------------\
| |
| XgraEditSearchObject |
| |
\------------------------------------------------------------*/
void XgraEditSearchObject( ObjectName )
char *ObjectName;
{
xgraobj_list *Obj;
xgraselect_list *Search;
short Layer;
long X1;
long Y1;
autbegin();
if ( XgraHeadConnect != (xgraselect_list *)NULL )
{
XgraDelConnect();
XgraZoomRefresh();
}
XgraEditInitializeSearch( ObjectName );
for ( Layer = 0; Layer < XGRA_MAX_LAYER; Layer++ )
{
if ( XGRA_ACTIVE_LAYER_TABLE[ Layer ] == 0 ) continue;
for ( Obj = XgraFigure->TEXT[ Layer ];
Obj != (xgraobj_list *)NULL;
Obj = Obj->NEXT )
{
if ( ! IsXgraSelect( Obj ) )
{
if ( XgraEditSearchCompare( Obj->NAME ) )
{
XgraAddSelect( Obj );
}
}
}
}
for ( Search = XgraHeadSelect;
Search != (xgraselect_list *)NULL;
Search = Search->NEXT )
{
XgraUnselectObject( Search->OBJECT );
}
if ( XgraHeadSelect == (xgraselect_list *)NULL )
{
XgraWarningMessage( XgraMainWindow, "No object found !" );
}
else
{
XgraSearchAbort = XGRA_FALSE;
for ( Search = XgraHeadSelect;
Search != (xgraselect_list *)NULL;
Search = Search->NEXT )
{
Obj = Search->OBJECT;
XgraAddConnect( Obj );
if ( XgraSearchAbort ) continue;
X1 = ( Obj->X + ( Obj->DX >> 1 ) ) / XGRA_UNIT;
Y1 = ( Obj->Y + ( Obj->DY >> 1 ) ) / XGRA_UNIT;
XgraZoomCenter( X1, Y1 );
if ( Search->NEXT != (xgraselect_list *)NULL )
{
XgraEnterPanel( &XgraEditSearchViewPanel );
XgraLimitedLoop( XgraEditSearchViewPanel.PANEL );
}
}
XgraDelSelect();
XgraExitPanel( &XgraEditSearchViewPanel );
}
autend();
}

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 : XGRA |
| |
| File : Search.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_SEARCH
# define XGRA_SEARCH
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern char XgraSearchAbort;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraEditSearchObject();
# endif

View File

@ -0,0 +1,366 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Edit.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <math.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XGR.h"
# include "XME.h"
# include "XMV.h"
# include "XME_select.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Select Buffer |
| |
\------------------------------------------------------------*/
static char XgraSelectBuffer [ XGRA_SELECT_BUFFER_SIZE ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraAddSelectList |
| |
\------------------------------------------------------------*/
void XgraAddSelectList( Obj )
xgraobj_list *Obj;
{
autnode_list *Node;
autarc_list *Arc;
autbegin();
XgraSelectBuffer[0] = '\0';
if ( IsXgraNode( Obj ) )
{
Node = (autnode_list *)( Obj->USER );
sprintf( XgraSelectBuffer, " NODE %s", Node->NAME );
}
else
if ( IsXgraArc( Obj ) )
{
Arc = (autarc_list *)( Obj->USER );
sprintf( XgraSelectBuffer, " ARC %s -> %s",
Arc->NODE_FROM->NAME, Arc->NODE_TO->NAME );
}
XgraDisplaySelectList( XgraSelectBuffer );
autend();
}
/*------------------------------------------------------------\
| |
| XgraEditSelectObject |
| |
\------------------------------------------------------------*/
void XgraEditSelectObject( Number )
int Number;
{
xgraselect_list *Select;
int Counter;
autbegin();
Select = XgraHeadSelect;
for ( Counter = 0; Counter < Number; Counter++ )
{
Select = Select->NEXT;
}
if ( IsXgraAccept( Select->OBJECT ) )
{
XgraRejectObject( Select->OBJECT );
}
else
{
XgraAcceptObject( Select->OBJECT );
}
XgraDisplayObject( Select->OBJECT );
autend();
}
/*------------------------------------------------------------\
| |
| XgraEditSelectAccept |
| |
\------------------------------------------------------------*/
void XgraEditSelectAccept()
{
autbegin();
XgraPurgeSelect();
autend();
}
/*------------------------------------------------------------\
| |
| XgraEditSelectCancel |
| |
\------------------------------------------------------------*/
void XgraEditSelectCancel()
{
autbegin();
XgraEditUnselectAll();
autend();
}
/*------------------------------------------------------------\
| |
| Select Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraEditUnselectAll |
| |
\------------------------------------------------------------*/
void XgraEditUnselectAll()
{
xgraobj_list *Obj;
autbegin();
if ( XgraHeadSelect != (xgraselect_list *)NULL )
{
if ( XgraHeadSelect->NEXT == (xgraselect_list *)NULL )
{
Obj = XgraHeadSelect->OBJECT;
XgraDelSelect();
XgraDisplayObject( Obj );
}
else
{
XgraDelSelect();
XgraZoomRefresh();
}
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraEditObjectNearPoint |
| |
\------------------------------------------------------------*/
char XgraEditObjectNearPoint( Obj, X1, Y1 )
xgraobj_list *Obj;
long X1;
long Y1;
{
short Type;
long X1r;
long Y1r;
long X2r;
long Y2r;
float VectorX;
float VectorY;
float LineX;
float LineY;
float Norm;
float Distance;
Type = GetXgraObjectType( Obj );
if ( ( Obj->X <= X1 ) &&
( Obj->Y <= Y1 ) &&
( Obj->X + Obj->DX >= X1 ) &&
( Obj->Y + Obj->DY >= Y1 ) )
{
if ( ( Type == XGRA_OBJECT_LINE ) ||
( Type == XGRA_OBJECT_ARROW ) )
{
if ( ( Obj->DX == 0 ) &&
( Obj->DY == 0 ) )
{
if ( ( Obj->X == X1 ) &&
( Obj->Y == Y1 ) )
{
return( XGRA_TRUE );
}
}
else
{
if ( IsXgraLineLeft( Obj ) )
{
X1r = Obj->X + Obj->DX;
X2r = Obj->X;
}
else
{
X1r = Obj->X;
X2r = Obj->X + Obj->DX;
}
if ( IsXgraLineDown( Obj ) )
{
Y1r = Obj->Y + Obj->DY;
Y2r = Obj->Y;
}
else
{
Y1r = Obj->Y;
Y2r = Obj->Y + Obj->DY;
}
LineX = (float)( X2r - X1r );
LineY = (float)( Y2r - Y1r );
Norm = sqrt( ( LineX * LineX ) + ( LineY * LineY ) );
LineX /= Norm;
LineY /= Norm;
VectorX = (float)( X2r - X1 );
VectorY = (float)( Y2r - Y1 );
Distance = fabs( ( VectorX * LineY ) - ( VectorY * LineX ) );
if ( Distance < (float) XGRA_UNIT )
{
return( XGRA_TRUE );
}
}
}
else
{
return( XGRA_TRUE );
}
}
return( XGRA_FALSE );
}
/*------------------------------------------------------------\
| |
| XgraEditSelectPoint |
| |
\------------------------------------------------------------*/
void XgraEditSelectPoint( X1, Y1 )
long X1;
long Y1;
{
xgraobj_list *Obj;
xgraselect_list *Select;
int Layer;
X1 = X1 * XGRA_UNIT;
Y1 = Y1 * XGRA_UNIT;
for ( Layer = 0; Layer < XGRA_MAX_LAYER; Layer++ )
{
if ( XGRA_ACTIVE_LAYER_TABLE[ Layer ] == 0 ) continue;
for ( Obj = XgraFigure->OBJECT[ Layer ];
Obj != (xgraobj_list *)NULL;
Obj = Obj->NEXT )
{
if ( XGRA_ACTIVE_LAYER_TABLE[ Obj->LAYER ] == 0 ) continue;
if ( ! IsXgraSelect( Obj ) )
{
if ( XgraEditObjectNearPoint( Obj, X1, Y1 ) )
{
XgraAddSelect( Obj );
}
}
}
}
for ( Select = XgraHeadSelect;
Select != (xgraselect_list *)NULL;
Select = Select->NEXT )
{
XgraUnselectObject( Select->OBJECT );
}
}

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 : XGRA |
| |
| File : Select.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
# ifndef XGRA_SELECT
# define XGRA_SELECT
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_SELECT_BUFFER_SIZE 256
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraEditSelectObject();
# endif

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 : XGRA |
| |
| File : XMF.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include files |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef XGRA_XMF
# define XGRA_XMF
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern XgraMenuItem XgraFileMenu [];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraBuildFileDialog();
extern void XgraBuildPanelLibrary();
# endif

View File

@ -0,0 +1,235 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XTB.h"
# include "XMF.h"
# include "XMF_dialog.h"
# include "XMF_file.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| File Dialog |
| |
\------------------------------------------------------------*/
XgraDialogItem XgraFileOpenDialog =
{
"Open File",
XGRA_DIALOG_FILE,
(Widget)NULL,
(void *)CallbackFileOpenOk,
(XtPointer)NULL,
(void *)CallbackFileOpenCancel,
(XtPointer)NULL
};
XgraDialogItem XgraFileQuitDialog =
{
"Do you really want to quit Xgra ?",
XGRA_DIALOG_WARNING,
(Widget)NULL,
(void *)CallbackFileQuitOk,
(XtPointer)NULL,
(void *)CallbackFileQuitCancel,
(XtPointer)NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraBuildFileDialog |
| |
\------------------------------------------------------------*/
void XgraBuildFileDialog()
{
autbegin();
XgraBuildDialog( XgraMainWindow, &XgraFileOpenDialog );
XgraBuildDialog( XgraMainWindow, &XgraFileQuitDialog );
autend();
}
/*------------------------------------------------------------\
| |
| CallbackFileQuitOk |
| |
\------------------------------------------------------------*/
void CallbackFileQuitOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraExitDialog();
XtCloseDisplay( XtDisplay( XtParent( MyWidget ) ) );
autend();
exit( 0 );
}
/*------------------------------------------------------------\
| |
| CallbackFileQuitCancel |
| |
\------------------------------------------------------------*/
void CallbackFileQuitCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraExitDialog();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackFileOpenOk |
| |
\------------------------------------------------------------*/
void CallbackFileOpenOk( MyWidget, ClientData, FileStruct )
Widget MyWidget;
caddr_t ClientData;
XmFileSelectionBoxCallbackStruct *FileStruct;
{
char *FileName;
autbegin();
XtUnmanageChild( XgraFileOpenDialog.WIDGET );
XgraExitDialog();
if ( FileStruct->value != NULL )
{
XmStringGetLtoR( FileStruct->value,
XmSTRING_DEFAULT_CHARSET,
&FileName
);
FileName = XgraPostTreatString( FileName );
if ( FileName != (char *)NULL )
{
XgraFileOpen( FileName );
XgraChangeEditMode( XGRA_EDIT_MEASURE,
XgraPromptEditMeasure );
}
else
{
XgraErrorMessage( XgraMainWindow, "Unable to load this file !" );
}
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackFileOpenCancel |
| |
\------------------------------------------------------------*/
void CallbackFileOpenCancel( MyWidget, ClientData, FileStruct )
Widget MyWidget;
caddr_t ClientData;
XmFileSelectionBoxCallbackStruct *FileStruct;
{
autbegin();
XtUnmanageChild( XgraFileOpenDialog.WIDGET );
XgraExitDialog();
autend();
}

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 : XGRA |
| |
| File : Dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_FILE_DIALOG
# define XGRA_FILE_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern XgraDialogItem XgraFileOpenDialog;
extern XgraDialogItem XgraFileQuitDialog;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackFileQuitOk();
extern void CallbackFileQuitCancel();
extern void CallbackFileOpenOk();
extern void CallbackFileOpenCancel();
# endif

View File

@ -0,0 +1,185 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : File.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
# include <Xm/SelectioB.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XMX.h"
# include "XTB.h"
# include "XMF.h"
# include "XME.h"
# include "XMT.h"
# include "XMV.h"
# include "XMF_file.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
char XgraFileFilter[ 10 ] = "*.";
char XgraFileExtention[ 10 ] = ".";
char XgraFileBuffer[ 128 ];
char XgraDirectoryBuffer[ 512 ];
char *XGRA_WORK_LIB = (char *)NULL;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraFileOpen |
| |
\------------------------------------------------------------*/
void XgraFileOpen( FileName )
char *FileName;
{
int Index;
char *SWAP_WORK_LIB = WORK_LIB;
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
XgraUndisplayCursor();
XgraDelConnect();
XgraDelFigure();
XgraRecomputeBound = XGRA_TRUE;
if ( XGRA_WORK_LIB == (char *)NULL )
{
XGRA_WORK_LIB = WORK_LIB;
}
if ( XgraFileFilter[2] == '\0' )
{
strcat( XgraFileFilter, "gr" );
strcat( XgraFileExtention, "gr" );
}
for ( Index = strlen( FileName ); Index >= 0; Index-- )
{
if ( FileName[ Index ] == '/' ) break;
}
if ( Index >= 0 )
{
strcpy( XgraDirectoryBuffer, FileName );
strcpy( XgraFileBuffer, FileName + Index + 1);
XgraDirectoryBuffer[ Index + 1 ] = '\0';
WORK_LIB = XgraDirectoryBuffer;
}
else
{
strcpy( XgraFileBuffer, FileName );
WORK_LIB = XGRA_WORK_LIB;
}
Index = strlen( XgraFileBuffer ) - strlen( XgraFileExtention );
if ( Index >= 0 )
{
if ( ! strcmp( XgraFileBuffer + Index, XgraFileExtention ) )
{
XgraFileBuffer[ Index ] = '\0';
}
}
XgraLoadFigure( XgraFileBuffer );
if ( XgraFigure != (xautgraph *)NULL )
{
XgraChangeTopLevelTitle( XgraFileBuffer );
}
else
{
XgraChangeTopLevelTitle( (char *)NULL );
}
XgraDisplayToolsMessage();
XgraInitializeZoom();
XgraDisplayFigure( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0,
XgraGraphicDx, XgraGraphicDy );
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
XgraDisplayCursor();
WORK_LIB = SWAP_WORK_LIB;
autend();
}

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 : XGRA |
| |
| File : File.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_FILE
# define XGRA_FILE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern char XgraFileFilter[ 10 ];
extern char XgraFileExtention[ 10 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraFileOpen();
# endif

View File

@ -0,0 +1,187 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XMX.h"
# include "XTB.h"
# include "XMF.h"
# include "XMF_menu.h"
# include "XMF_dialog.h"
# include "XMF_file.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
static XgraFirstFileOpen = 1;
/*------------------------------------------------------------\
| |
| Menu |
| |
\------------------------------------------------------------*/
XgraMenuItem XgraFileMenu[] =
{
{
"Open",
'O',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackFileOpen,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
{
"Quit ",
'Q',
"Ctrl<Key>Q",
"Ctrl Q",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackFileQuit,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackFileOpen |
| |
\------------------------------------------------------------*/
void CallbackFileOpen( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
XmString Filter;
autbegin();
if ( XgraFirstFileOpen )
{
XgraFirstFileOpen = 0;
if ( XgraFileFilter[2] == '\0' )
{
strcat( XgraFileFilter, "gr" );
strcat( XgraFileExtention, "gr" );
}
Filter = XmStringCreateSimple( XgraFileFilter );
XtVaSetValues( XgraFileOpenDialog.WIDGET,
XmNpattern, Filter, NULL);
XmStringFree( Filter );
}
XgraEnterDialog( &XgraFileOpenDialog );
autend();
}
/*------------------------------------------------------------\
| |
| CallbackFileQuit |
| |
\------------------------------------------------------------*/
void CallbackFileQuit( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraEnterDialog( &XgraFileQuitDialog );
autend();
}

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 : XGRA |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_FILE_MENU
# define XGRA_FILE_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackFileOpen();
extern void CallbackFileQuit();
# endif

View File

@ -0,0 +1,822 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Panel.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XTB.h"
# include "XMF.h"
# include "XMF_panel.h"
# include "XMF_dialog.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
XgraPanelItem XgraLibraryPanel =
{
"Library",
1,
0,
XGRA_LIBRARY_X,
XGRA_LIBRARY_Y,
250,
375,
0,
0,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraPanelButtonItem *)NULL
};
int XgraLibraryDefaultValues[ 5 ] =
{
XGRA_LIBRARY_X,
XGRA_LIBRARY_Y,
250, 375, 0
};
static char **XGRA_CATA_LIB = (char **)NULL;
static char *XGRA_WORK_LIB = (char *)NULL;
static char *XGRA_DEFAULT_LIB = (char *)NULL;
static char XgraFirstLibrary = 1;
/*------------------------------------------------------------\
| |
| Buffer |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Widget For Library Panel |
| |
\------------------------------------------------------------*/
Widget XgraLibraryListLabel;
Widget XgraLibraryList;
Widget XgraLibraryButtonOk;
Widget XgraLibraryButtonUpdate;
Widget XgraLibraryButtonCancel;
Widget XgraLibraryCataLabel;
Widget XgraLibraryCata;
Widget XgraLibraryWorkLabel;
Widget XgraLibraryWork;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraIsDirectory |
| |
\------------------------------------------------------------*/
char XgraIsDirectory( FileName )
char *FileName;
{
struct stat Buffer;
autbegin();
if ( stat( FileName, &Buffer ) != -1 )
{
if ( ( Buffer.st_mode & S_IFMT ) == S_IFDIR )
{
autend();
return( 1 );
}
}
autend();
return( 0 );
}
/*------------------------------------------------------------\
| |
| XgraSetLibraryList |
| |
\------------------------------------------------------------*/
void XgraSetLibraryList()
{
int Index;
XmString Label;
autbegin();
XmListDeleteAllItems( XgraLibraryList );
for ( Index = 0;
XGRA_CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
Label = XmStringCreateSimple( XGRA_CATA_LIB[ Index ] );
XmListAddItem( XgraLibraryList , Label , NULL );
XmStringFree( Label );
}
Label = XmStringCreateSimple( XGRA_WORK_LIB );
XmListAddItem( XgraLibraryList , Label , NULL );
XmStringFree( Label );
XGRA_DEFAULT_LIB = (char *)NULL;
autend();
}
/*------------------------------------------------------------\
| |
| XgraSetWorkLibrary |
| |
\------------------------------------------------------------*/
void XgraSetWorkLibrary()
{
autbegin();
XmTextSetString( XgraLibraryWork, XGRA_WORK_LIB );
autend();
}
/*------------------------------------------------------------\
| |
| XgraSetCataLibrary |
| |
\------------------------------------------------------------*/
void XgraSetCataLibrary()
{
int Index;
long Length;
char *Buffer;
char *Scan;
autbegin();
for ( Index = 0, Length = 0;
XGRA_CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
Length = Length + strlen( XGRA_CATA_LIB[ Index ] ) + 1;
}
Buffer = (char *)autallocblock( Length + 1 );
Buffer[ 0 ] = '\0';
Scan = Buffer;
for ( Index = 0;
XGRA_CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
strcpy( Scan, XGRA_CATA_LIB[ Index ] );
strcat( Scan, "\n" );
Scan = Scan + strlen( Scan );
}
XmTextSetString( XgraLibraryCata, Buffer );
autfreeblock( Buffer );
autend();
}
/*------------------------------------------------------------\
| |
| XgraInitializeLibrary |
| |
\------------------------------------------------------------*/
void XgraInitializeLibrary()
{
int Index;
autbegin();
for ( Index = 0; CATA_LIB[ Index ] != (char *)NULL; Index++ );
XGRA_CATA_LIB = (char **)autallocblock( sizeof(char *) * ( Index + 1 ));
for ( Index = 0;
CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
XGRA_CATA_LIB[ Index ] = autallocblock( strlen( CATA_LIB[ Index ] ) + 1 );
strcpy( XGRA_CATA_LIB[ Index ], CATA_LIB[ Index ] );
}
XGRA_CATA_LIB[ Index ] = (char *)NULL;
XGRA_WORK_LIB = autallocblock( strlen( WORK_LIB ) + 1 );
strcpy( XGRA_WORK_LIB, WORK_LIB );
XgraSetCataLibrary();
XgraSetWorkLibrary();
XgraSetLibraryList();
autend();
}
/*------------------------------------------------------------\
| |
| XgraGetCataLibrary |
| |
\------------------------------------------------------------*/
void XgraGetCataLibrary()
{
char *NewCata;
char *Scan;
int Index;
int Count;
int Length;
autbegin();
for ( Index = 0;
XGRA_CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
autfreeblock( XGRA_CATA_LIB[ Index ] );
}
autfreeblock( XGRA_CATA_LIB );
NewCata = XmTextGetString( XgraLibraryCata );
Count = 1;
for ( Index = 0; NewCata[ Index ] != '\0'; Index++ )
{
if ( NewCata[ Index ] == '\n' )
{
Count = Count + 1;
}
}
XGRA_CATA_LIB = (char **)autallocblock( 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 ) &&
( XgraIsDirectory( Scan ) ) )
{
XGRA_CATA_LIB[ Count ] = autallocblock( Length + 1 );
strcpy( XGRA_CATA_LIB[ Count ], Scan );
Count = Count + 1;
}
Scan = NewCata + Index + 1;
}
else
if ( NewCata[ Index ] == ' ' )
{
NewCata[ Index ] = '\0';
}
}
Length = strlen( Scan );
if ( Length > 0 )
{
XGRA_CATA_LIB[ Count ] = autallocblock( Length + 1 );
strcpy( XGRA_CATA_LIB[ Count ], Scan );
Count = Count + 1;
}
XGRA_CATA_LIB[ Count ] = (char *)NULL;
autend();
}
/*------------------------------------------------------------\
| |
| XgraGetWorkLibrary |
| |
\------------------------------------------------------------*/
void XgraGetWorkLibrary()
{
char *NewWork;
autbegin();
autfreeblock( XGRA_WORK_LIB );
NewWork = XmTextGetString( XgraLibraryWork );
if ( XgraIsDirectory( NewWork ) )
{
XGRA_WORK_LIB = autallocblock( strlen( NewWork ) + 1 );
strcpy( XGRA_WORK_LIB, NewWork );
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackLibraryList |
| |
\------------------------------------------------------------*/
void CallbackLibraryList( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmListCallbackStruct *CallData;
{
autbegin();
XGRA_DEFAULT_LIB = XGRA_CATA_LIB[ CallData->item_position - 1 ];
if ( XGRA_DEFAULT_LIB == (char *)NULL )
{
XGRA_DEFAULT_LIB = XGRA_WORK_LIB;
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackLibraryOk |
| |
\------------------------------------------------------------*/
void CallbackLibraryOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
XmString Label;
int Index;
autbegin();
XgraExitPanel( &XgraLibraryPanel );
XgraExitDialog();
if ( XgraFirstLibrary == 0 )
{
for ( Index = 0;
CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
autfreeblock( CATA_LIB[ Index ] );
}
autfreeblock( CATA_LIB );
autfreeblock( WORK_LIB );
}
XgraFirstLibrary = 0;
CATA_LIB = XGRA_CATA_LIB;
WORK_LIB = XGRA_WORK_LIB;
if ( XGRA_DEFAULT_LIB != (char *)NULL )
{
Label = XmStringCreateSimple( XGRA_DEFAULT_LIB );
XtVaSetValues( XgraFileOpenDialog.WIDGET,
XmNdirectory, Label, NULL );
XmStringFree( Label );
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackLibraryUpdate |
| |
\------------------------------------------------------------*/
void CallbackLibraryUpdate( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraGetCataLibrary();
XgraGetWorkLibrary();
XgraSetLibraryList();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackLibraryCancel |
| |
\------------------------------------------------------------*/
void CallbackLibraryCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
int Index;
autbegin();
for ( Index = 0;
XGRA_CATA_LIB[ Index ] != (char *)NULL;
Index++ )
{
autfreeblock( XGRA_CATA_LIB[ Index ] );
}
autfreeblock( XGRA_CATA_LIB );
autfreeblock( XGRA_WORK_LIB );
XgraExitPanel( &XgraLibraryPanel );
XgraExitDialog();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackEnterLibrary |
| |
\------------------------------------------------------------*/
void CallbackEnterLibrary( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraInitializeLibrary();
XgraEnterPanel( &XgraLibraryPanel );
XgraLimitedLoop( XgraLibraryPanel.PANEL );
XgraReEnterDialog();
autend();
}
/*------------------------------------------------------------\
| |
| XgraBuildPanelLibrary |
| |
\------------------------------------------------------------*/
void XgraBuildPanelLibrary()
{
Arg Args[15];
XmString Label;
autbegin();
XtSetArg( Args[0], XmNshadowType , XmSHADOW_ETCHED_IN );
XtSetArg( Args[1], XmNdeleteResponse, XmDESTROY );
XtSetArg( Args[2], XmNtitle , XgraLibraryPanel.TITLE );
XgraLibraryPanel.PANEL =
XmCreateFormDialog( XgraMainWindow, "XgraLibraryPanel", Args, 3);
XtAddCallback( XgraLibraryPanel.PANEL, XmNdestroyCallback,
XgraDestroyDialogCallback, NULL );
XgraLibraryPanel.PANEL_FORM =
XtVaCreateManagedWidget( "XgraLibraryPanelForm",
xmFormWidgetClass,
XgraLibraryPanel.PANEL,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
XmNfractionBase , 10,
NULL
);
XgraLibraryPanel.FRAME =
XtVaCreateManagedWidget( "XgraLibraryFrame",
xmFrameWidgetClass,
XgraLibraryPanel.PANEL_FORM,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
NULL
);
XgraLibraryPanel.FORM =
XtVaCreateManagedWidget( "XgraLibraryForm",
xmFormWidgetClass,
XgraLibraryPanel.FRAME,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
XmNfractionBase , 120,
NULL
);
XgraLibraryButtonUpdate =
XtVaCreateManagedWidget( "Update",
xmPushButtonWidgetClass,
XgraLibraryPanel.FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 10,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 40,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 105,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 115,
NULL
);
XgraLibraryButtonOk =
XtVaCreateManagedWidget( "Ok",
xmPushButtonWidgetClass,
XgraLibraryPanel.FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 50,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 70,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 105,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 115,
NULL
);
XgraLibraryButtonCancel =
XtVaCreateManagedWidget( "Cancel",
xmPushButtonWidgetClass,
XgraLibraryPanel.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" );
XgraLibraryListLabel =
XtVaCreateManagedWidget( "XgraLibraryListLabel",
xmLabelGadgetClass ,
XgraLibraryPanel.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 );
XgraLibraryList =
XmCreateScrolledList( XgraLibraryPanel.FORM,
"XgraLibraryList", Args, 12 );
Label = XmStringCreateSimple( "Catalog libraries" );
XgraLibraryCataLabel =
XtVaCreateManagedWidget( "XgraLibraryCataLabel",
xmLabelGadgetClass ,
XgraLibraryPanel.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 );
XgraLibraryCata =
XmCreateScrolledText( XgraLibraryPanel.FORM,
"XgraLibraryCata", Args, 14 );
Label = XmStringCreateSimple( "Work library" );
XgraLibraryWorkLabel =
XtVaCreateManagedWidget( "XgraLibraryWorkLabel",
xmLabelGadgetClass ,
XgraLibraryPanel.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 );
XgraLibraryWork =
XmCreateText( XgraLibraryPanel.FORM,
"XgraLibraryWork", Args, 14 );
XtManageChild( XgraLibraryWork );
XtManageChild( XgraLibraryList );
XtManageChild( XgraLibraryCata );
XtAddCallback( XgraLibraryList,
XmNdefaultActionCallback,
CallbackLibraryList, NULL );
XtAddCallback( XgraLibraryButtonOk,
XmNactivateCallback,
CallbackLibraryOk, NULL );
XtAddCallback( XgraLibraryButtonCancel,
XmNactivateCallback,
CallbackLibraryCancel, NULL );
XtAddCallback( XgraLibraryButtonUpdate,
XmNactivateCallback,
CallbackLibraryUpdate, NULL );
XtVaSetValues( XgraLibraryPanel.PANEL,
XmNheight, XgraLibraryPanel.HEIGHT,
XmNwidth , XgraLibraryPanel.WIDTH,
XmNx , XgraLibraryPanel.X,
XmNy , XgraLibraryPanel.Y,
NULL );
Label = XmStringCreateSimple( "Library" );
XtVaSetValues( XmFileSelectionBoxGetChild( XgraFileOpenDialog.WIDGET,
XmDIALOG_HELP_BUTTON ),
XmNlabelString, Label, NULL );
XmStringFree( Label );
XtAddCallback( XmFileSelectionBoxGetChild( XgraFileOpenDialog.WIDGET,
XmDIALOG_HELP_BUTTON ),
XmNactivateCallback,
CallbackEnterLibrary, NULL );
autend();
}

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 : XGRA |
| |
| File : Panel.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_FILE_PANEL
# define XGRA_FILE_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_LIBRARY_X 100
# define XGRA_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 : XGRA |
| |
| File : XMH101.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef XGRA_XMH
# define XGRA_XMH
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern XgraMenuItem XgraHelpMenu[];
extern XgraPanelItem XgraHelpPresentPanel;
extern int XgraHelpPresentDefaultValues[5];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraBuildPresentPanel();
extern void XgraEnterPresentPanel();
# 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 : XGRA |
| |
| File : Help.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "aut.h"
# include "XTB.h"
# include "XSB.h"
# include "XMH.h"
# include "XMX.h"
# include "XMH_help.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/

View File

@ -0,0 +1,71 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Help.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
# ifndef XMH_HELP_H
# define XMH_HELP_H
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,124 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "aut.h"
# include "XTB.h"
# include "XSB.h"
# include "XMH.h"
# include "XMX.h"
# include "XMH_menu.h"
# include "XMH_panel.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Help Menu |
| |
\------------------------------------------------------------*/
XgraMenuItem XgraHelpMenu[] =
{
{
"About Xgra",
'G',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackHelpAbout,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackHelpAbout |
| |
\------------------------------------------------------------*/
void CallbackHelpAbout( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraEnterPresentPanel();
autend();
}

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 : XGRA |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
# ifndef XMH_MENU_H
# define XMH_MENU_H
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackHelpAbout();
# endif

View File

@ -0,0 +1,588 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Panel.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XMH.h"
# include "XMH_panel.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
XgraPanelItem XgraHelpPresentPanel =
{
"Xgra present",
1,
0,
XGRA_HELP_PRESENT_X,
XGRA_HELP_PRESENT_Y,
700,
360,
0,
0,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraPanelButtonItem *)NULL
};
int XgraHelpPresentDefaultValues[ 5 ] =
{
XGRA_HELP_PRESENT_X,
XGRA_HELP_PRESENT_Y,
700, 360, 0
};
static char XgraHelpPresentPixmap[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x15,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x22, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x68, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x94, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x85,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0xa5, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x59, 0x52, 0x02, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x46, 0x95, 0x02, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0xa4,
0x04, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x40, 0x25, 0x29, 0x01, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xfe, 0x00, 0x40, 0x29, 0x45, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xd7, 0x00,
0x28, 0xc5, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xef, 0x7b, 0x00, 0x40, 0x92, 0x52,
0x05, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x42, 0xef, 0xdd, 0x7f, 0x00, 0x94, 0x54, 0x15, 0x52, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xe0, 0xf5,
0xf7, 0x3d, 0x00, 0x50, 0x49, 0xc5, 0x44, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf7, 0xbf, 0x0e, 0x00,
0x05, 0x51, 0x10, 0x90, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x0f, 0x00, 0x68, 0x75, 0x4d,
0x55, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xb8, 0xdb, 0xff, 0x05, 0x80, 0x4a, 0x6c, 0x42, 0x26, 0x01, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x7c, 0xf7,
0x1d, 0x00, 0x00, 0x24, 0xfb, 0x28, 0x8d, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xee, 0xff, 0x06, 0x00, 0x40,
0x91, 0xf4, 0x51, 0x12, 0x02, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x6b, 0xdf, 0x05, 0x00, 0x00, 0x48, 0xfd, 0x8a,
0xa4, 0x04, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x80, 0xb5, 0xb5, 0x0f, 0x00, 0x90, 0x12, 0xaf, 0x53, 0x04, 0x08, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0xbf, 0xea,
0x1d, 0x00, 0x00, 0xa0, 0xfe, 0x25, 0x59, 0x01, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xc4, 0xeb, 0x78, 0x1f, 0x00, 0xa0,
0x2a, 0x7f, 0x0b, 0x81, 0x10, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xe0, 0xbd, 0xa6, 0x1d, 0x00, 0x08, 0x40, 0xdc, 0xa7,
0x14, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0xf0, 0x6f, 0x71, 0x0d, 0x00, 0x80, 0x54, 0xb8, 0x0e, 0x41, 0x01, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xa8, 0x9b, 0xca,
0x05, 0x00, 0x41, 0x20, 0xd0, 0x1d, 0x12, 0x40, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x80, 0x42, 0xec, 0xaf, 0x5a, 0x07, 0x00, 0x08,
0x10, 0xb0, 0xa2, 0x00, 0x10, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x20, 0xbc, 0xa7, 0x84, 0x01, 0x00, 0x00, 0x02, 0x60, 0x3d,
0x14, 0x09, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
0xd6, 0x2b, 0xb5, 0x00, 0x00, 0x00, 0x04, 0x20, 0x25, 0x01, 0x60, 0x01,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x11, 0xff, 0x55, 0x44,
0x01, 0x00, 0x24, 0x00, 0x40, 0x49, 0x20, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x08, 0x84, 0xee, 0x4c, 0xa9, 0x00, 0x20, 0x01,
0x03, 0x40, 0x92, 0x08, 0x03, 0x02, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0xa4, 0x40, 0x57, 0x50, 0x53, 0x00, 0x00, 0x00, 0x00, 0x80, 0x12,
0x01, 0x90, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x02, 0xe4,
0x37, 0x90, 0x2c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x45, 0x82, 0x80, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x20, 0xa1, 0x1a, 0xa0, 0x12,
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x08, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x09, 0xb0, 0x1e, 0xa0, 0x0a, 0x00, 0x00, 0x20,
0x00, 0x00, 0x8a, 0x02, 0x00, 0x02, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x80, 0x00, 0xe9, 0x0b, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44,
0x14, 0x00, 0x10, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x40, 0x22, 0xa8,
0x06, 0x80, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x48, 0xde, 0x03, 0x80, 0x00,
0x00, 0x00, 0x08, 0x00, 0x00, 0x88, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x90, 0x02, 0x35, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02,
0x00, 0x00, 0x90, 0x52, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x90, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20,
0x11, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xa8, 0x84, 0xd6,
0x00, 0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x20, 0xa4, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x04, 0xc4, 0x3a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x09, 0x00, 0x00, 0x01, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x84, 0xa0, 0x57, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a,
0x00, 0x00, 0x80, 0x52, 0x01, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x22, 0x71, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x40, 0x19, 0x00, 0x00, 0x80,
0x44, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x09, 0xd4, 0x0b,
0x00, 0x00, 0x00, 0x00, 0x60, 0x02, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x80, 0x24, 0x38, 0x05, 0x00, 0x00, 0x00,
0x00, 0x90, 0x28, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x40, 0x00, 0xed, 0x07, 0x00, 0x00, 0x00, 0x00, 0x28, 0x45,
0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x08, 0x00, 0xf0, 0x00, 0x00, 0x20,
0x15, 0x9a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0xa2, 0x00, 0x00, 0x00,
0xa4, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x20, 0x48, 0xf7, 0x01,
0x00, 0x00, 0x00, 0x00, 0xa2, 0x08, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x10, 0x81, 0xad, 0x00, 0x20, 0x00, 0x00,
0x00, 0x0a, 0x45, 0x00, 0x00, 0x00, 0x48, 0x08, 0x00, 0x20, 0x00, 0xf0,
0x00, 0x00, 0x48, 0x4a, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x10,
0x01, 0x00, 0x00, 0x90, 0x12, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x04,
0xd1, 0x37, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x55, 0x02, 0x00, 0x00,
0x20, 0x40, 0x00, 0x40, 0x00, 0xf0, 0x00, 0x00, 0x8a, 0xe4, 0x2f, 0x10,
0x00, 0x00, 0x00, 0x40, 0x15, 0x04, 0x04, 0x00, 0x00, 0x00, 0x0a, 0x00,
0x80, 0x00, 0xf0, 0x00, 0x00, 0x26, 0xb1, 0x2f, 0x00, 0x00, 0x00, 0x00,
0x20, 0x25, 0x51, 0x09, 0x00, 0x00, 0x80, 0xa4, 0x00, 0x08, 0x00, 0xf0,
0x00, 0x00, 0x91, 0x7c, 0x01, 0x85, 0x00, 0x00, 0x00, 0x50, 0xa1, 0x04,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x80, 0x24,
0x01, 0x54, 0x00, 0x00, 0x00, 0x00, 0x10, 0x4a, 0xa8, 0x12, 0x00, 0x00,
0x00, 0x48, 0x4a, 0x40, 0x02, 0xf0, 0x00, 0x40, 0x49, 0x54, 0x81, 0x08,
0x00, 0x00, 0x00, 0x50, 0x12, 0x02, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00,
0x28, 0x00, 0xf0, 0x00, 0x20, 0xca, 0x12, 0x4a, 0x42, 0x00, 0x00, 0x00,
0x40, 0x44, 0xa8, 0x02, 0x00, 0x00, 0x00, 0xa2, 0x02, 0x02, 0x05, 0xf0,
0x00, 0x40, 0x92, 0xa4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, 0x92, 0x02,
0x04, 0x00, 0x00, 0x00, 0x08, 0x42, 0x20, 0x00, 0xf0, 0x00, 0x90, 0x11,
0x49, 0x85, 0x10, 0x04, 0x00, 0x00, 0x00, 0x24, 0xa4, 0x48, 0x00, 0x00,
0x00, 0x04, 0x8d, 0x08, 0x04, 0xf0, 0x00, 0xa8, 0x24, 0x22, 0x08, 0x00,
0x00, 0x01, 0x00, 0x80, 0x42, 0x01, 0x01, 0x01, 0x00, 0x00, 0x08, 0x18,
0x10, 0x09, 0xf0, 0x00, 0x24, 0x95, 0x08, 0xa1, 0x00, 0x00, 0x00, 0x40,
0x00, 0x28, 0x24, 0x09, 0x01, 0x00, 0x00, 0x50, 0x0b, 0xa1, 0x10, 0xf0,
0x00, 0x4a, 0x08, 0xa1, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x42,
0x20, 0x02, 0x00, 0x00, 0x10, 0x40, 0x0a, 0x22, 0xf0, 0x00, 0x12, 0x29,
0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x09, 0x0a, 0x00, 0x00,
0x80, 0x00, 0x12, 0x50, 0x04, 0xf0, 0x00, 0x51, 0x92, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x01, 0x48, 0x24, 0x80, 0x04, 0x00, 0x08, 0x00, 0x81,
0x24, 0x51, 0xf0, 0x80, 0x0c, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x00, 0x90, 0x08, 0x25, 0x01, 0x10, 0x01, 0x00, 0x90, 0x20, 0x82, 0xf0,
0x40, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xa0, 0x22,
0x00, 0x10, 0x01, 0x00, 0x08, 0x40, 0x8a, 0x24, 0xf0, 0x20, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x49, 0x48, 0x00, 0x00,
0x00, 0x00, 0x8a, 0x20, 0x08, 0xf1, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x22, 0x00, 0x20, 0x4a, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
0x04, 0x40, 0x11, 0x28, 0x02, 0x01, 0x00, 0x00, 0x10, 0x42, 0x22, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x80, 0xa4,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x30, 0x00, 0x20, 0x01, 0x00, 0x4a, 0x13, 0x48, 0x00,
0x00, 0x00, 0x80, 0x04, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x48, 0x00, 0xa5, 0x40, 0x01, 0x00, 0x00, 0x00, 0x04,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02,
0x00, 0x00, 0xa8, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x41, 0x00, 0x10, 0x01, 0x56,
0x4b, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x45, 0x00, 0xa8, 0x1a, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,
0x00, 0x00, 0x02, 0x20, 0x00, 0x58, 0x15, 0x01, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x80, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x20,
0x04, 0x05, 0xa0, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0xc0, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x04, 0x28, 0x08, 0xf0,
0x35, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0xfa, 0x01, 0x00, 0x00, 0x00, 0x40, 0x80, 0x12, 0xa0, 0xda, 0x48, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xdf, 0x02, 0x00,
0x00, 0x10, 0x12, 0x11, 0x01, 0x40, 0xab, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x08, 0x00, 0xf6, 0x02, 0x00, 0x00, 0x00, 0x80,
0xa0, 0x4c, 0xa0, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x7a, 0x07, 0x00, 0x00, 0x00, 0x00, 0x02, 0x22, 0x50,
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0xdc, 0x0e, 0x00, 0x00, 0x00, 0xa0, 0xa4, 0x48, 0x88, 0x16, 0x00, 0x00,
0x00, 0x80, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x58, 0x15, 0x00,
0x00, 0x80, 0x04, 0x25, 0xa5, 0xa0, 0x01, 0x00, 0x00, 0x00, 0xb4, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xb0, 0x0b, 0x00, 0x00, 0x00, 0x20,
0x0d, 0x21, 0x55, 0x0d, 0x00, 0x00, 0xc0, 0x29, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x60, 0x2e, 0x00, 0x00, 0x00, 0x80, 0x42, 0xa4, 0x29,
0x02, 0x00, 0x40, 0x41, 0x1a, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x40, 0x53, 0x00, 0x00, 0x00, 0x92, 0x14, 0x4a, 0x4a, 0x01, 0x00, 0x18,
0xa0, 0x16, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xa0, 0x94, 0x00,
0x00, 0x00, 0x04, 0x6d, 0xa4, 0x5a, 0x00, 0x40, 0x01, 0x90, 0x0a, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x80, 0x52, 0x00, 0x00, 0x00, 0x40,
0x52, 0x51, 0x49, 0x00, 0x10, 0x00, 0x38, 0x0d, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x80, 0x54, 0x01, 0x00, 0x00, 0x88, 0xbc, 0x34, 0x95,
0x00, 0x00, 0x00, 0xd4, 0x02, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x25, 0x02, 0x00, 0x00, 0x10, 0xab, 0x90, 0x34, 0x00, 0x04, 0x00,
0xaa, 0x01, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x05,
0x00, 0x00, 0x40, 0x6b, 0x6d, 0x05, 0x00, 0x02, 0x00, 0x55, 0x01, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x08, 0x00, 0x00, 0xc0,
0xda, 0x2a, 0x19, 0x00, 0x01, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0xa4, 0x0a, 0x00, 0x00, 0x00, 0xb6, 0x4b, 0x05,
0x80, 0x00, 0xc0, 0x5a, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x90, 0x00, 0x00, 0x00, 0x80, 0xed, 0xd5, 0x02, 0x40, 0x00, 0x80,
0x2d, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x2a,
0x00, 0x00, 0x00, 0xf5, 0x54, 0x00, 0x00, 0x00, 0x70, 0x1b, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x24, 0x00, 0x00, 0x00,
0x3d, 0xab, 0x01, 0x20, 0x00, 0x40, 0x05, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x80, 0x41, 0x00, 0x00, 0x00, 0x56, 0xa5, 0x00,
0x10, 0x00, 0xd8, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x40, 0x94, 0x00, 0x00, 0x00, 0x5c, 0x52, 0x00, 0x08, 0x00, 0x54,
0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a,
0x00, 0x00, 0x00, 0x90, 0x2a, 0x00, 0x15, 0x00, 0xaa, 0x08, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x02, 0x80, 0xa0, 0x02, 0x00, 0x00,
0x28, 0x16, 0x00, 0x1a, 0x00, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x00, 0xc8, 0x01, 0x00,
0x2e, 0x80, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0xa0, 0x0c, 0x00, 0x3f, 0x40, 0x59,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x08, 0x00, 0x00, 0x2a, 0x01, 0x80, 0x5b, 0x40, 0x17, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x28, 0x11, 0x00, 0x00,
0x48, 0x01, 0xc0, 0xee, 0xa0, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 0x80, 0x22, 0x00, 0xe0,
0xff, 0xd9, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x22, 0x00, 0x00, 0x94, 0x00, 0xd0, 0xff, 0x55, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x40, 0x00, 0x80, 0x22, 0x00, 0xb8, 0xff, 0xab, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x96, 0x00, 0x20,
0x08, 0x00, 0xb4, 0xf6, 0x75, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x15, 0x00, 0xec,
0xff, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x28, 0x00, 0xa4, 0x40, 0x20, 0xbe, 0xfe, 0x4b, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
0x81, 0x02, 0x00, 0x0a, 0x0a, 0xab, 0x7a, 0x35, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x05, 0xa1,
0x00, 0x80, 0xef, 0xf5, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0x10, 0x12, 0xc1, 0x7a,
0xbb, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x04, 0x82, 0x44, 0x21, 0xa0, 0xee, 0xdf, 0x05, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x40, 0x19, 0x00, 0x00, 0x90, 0xfd, 0x7f, 0x05, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x49,
0x48, 0x08, 0x7f, 0xaf, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x15, 0x00, 0x02, 0xec, 0xdf,
0xff, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x40, 0x00, 0x40, 0x4b, 0x14, 0x28, 0xf6, 0xfb, 0x55, 0x00, 0x10,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x40, 0x04, 0x80, 0x00, 0xff, 0xff, 0x0b, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x24,
0x84, 0xff, 0x3f, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x82, 0xd0, 0x7f, 0x01,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x50, 0xe2, 0x5f, 0x20, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x80, 0xf0, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0x6a,
0x04, 0x22, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x11, 0x08, 0x12,
0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xa4, 0x40, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
0x00, 0x84, 0x24, 0x00, 0x14, 0x0a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91,
0x14, 0x41, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x41, 0x8a, 0x00,
0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x51, 0x94, 0x20, 0xea, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x08, 0x84, 0x20, 0x8a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x90, 0x10,
0x8a, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x85, 0x78, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x60, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0x0a, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraBuildPresentPanel |
| |
\------------------------------------------------------------*/
void XgraBuildPresentPanel()
{
Widget PanelLabel;
Widget PanelButton;
Pixmap PanelPixmap;
XmString PanelString;
XmString PanelString1;
XmString PanelString2;
XmFontList PanelFontList;
XFontStruct *PanelFont;
Display *PanelDisplay;
char Buffer[ 64 ];
Arg Args[3];
autbegin();
PanelDisplay = XtDisplay( XgraMainWindow );
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, XmDESTROY );
XtSetArg( Args[2], XmNtitle , "Xgra present" );
XgraHelpPresentPanel.PANEL =
XmCreateFormDialog( XgraMainWindow, XgraHelpPresentPanel.TITLE, Args, 3);
XtAddCallback( XgraHelpPresentPanel.PANEL, XmNdestroyCallback,
XgraDestroyDialogCallback, NULL );
XgraHelpPresentPanel.PANEL_FORM =
XtVaCreateManagedWidget( "",
xmFormWidgetClass,
XgraHelpPresentPanel.PANEL,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
NULL
);
XgraHelpPresentPanel.FRAME =
XtVaCreateManagedWidget( "",
xmFrameWidgetClass,
XgraHelpPresentPanel.PANEL_FORM,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 05,
XmNbottomAttachment, XmATTACH_POSITION,
XmNbottomPosition , 95,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 05,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 95,
NULL
);
XgraHelpPresentPanel.FORM =
XtVaCreateManagedWidget( "",
xmFormWidgetClass,
XgraHelpPresentPanel.FRAME,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 05,
XmNbottomAttachment, XmATTACH_POSITION,
XmNbottomPosition , 95,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 05,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 95,
NULL
);
PanelPixmap = XgraCreatePixmap( XgraMainWindow,
XgraHelpPresentPixmap,
XGRA_PRESENT_PIXMAP_WIDTH,
XGRA_PRESENT_PIXMAP_HEIGHT );
PanelLabel = XtVaCreateManagedWidget( "",
xmLabelGadgetClass,
XgraHelpPresentPanel.FORM,
XmNlabelType , XmPIXMAP,
XmNlabelPixmap , PanelPixmap,
NULL
);
sprintf( Buffer, "ALLIANCE CAD SYSTEM %s\n", ALLIANCE_VERSION );
PanelString = XmStringCreateLtoR( Buffer, "Panel_charset2" );
PanelLabel = XtVaCreateManagedWidget( "",
xmLabelWidgetClass,
XgraHelpPresentPanel.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( "Xgra" , "Panel_charset1" );
PanelString2 = XmStringCreateLtoR( "\n( Touch Me )", "Panel_charset4" );
PanelString = XmStringConcat( PanelString1, PanelString2 );
PanelButton = XtVaCreateManagedWidget( "",
xmPushButtonWidgetClass,
XgraHelpPresentPanel.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,
XgraExitDialogCallback, NULL );
sprintf( Buffer, "\nGraphic GRA Viewer\nVersion %s", ALLIANCE_VERSION );
PanelString = XmStringCreateLtoR( Buffer, "Panel_charset2" );
PanelLabel = XtVaCreateManagedWidget( "",
xmLabelWidgetClass,
XgraHelpPresentPanel.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 MASI, \
CAO-VLSI Team\nE-mail support: cao-vlsi@masi.ibp.fr", "Panel_charset4" );
PanelLabel = XtVaCreateManagedWidget( "",
xmLabelWidgetClass,
XgraHelpPresentPanel.FORM,
XmNfontList , PanelFontList,
XmNlabelString , PanelString,
XmNtopAttachment , XmATTACH_WIDGET,
XmNtopWidget , PanelLabel,
XmNtopOffset , 5,
XmNrightAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
NULL
);
XmStringFree( PanelString );
autend();
}
/*------------------------------------------------------------\
| |
| XgraEnterPresentPanel |
| |
\------------------------------------------------------------*/
void XgraEnterPresentPanel()
{
autbegin();
XgraEnterPanel( &XgraHelpPresentPanel );
XgraLimitedLoop( XgraHelpPresentPanel.PANEL );
XgraExitPanel( &XgraHelpPresentPanel );
autend();
}

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 : XGRA |
| |
| File : Panel.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
# ifndef XMH_HELP_PANEL
# define XMH_HELP_PANEL
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_PRESENT_PIXMAP_WIDTH 164
# define XGRA_PRESENT_PIXMAP_HEIGHT 150
# define XGRA_HELP_PRESENT_X 180
# define XGRA_HELP_PRESENT_Y 200
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# 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 : XGRA |
| |
| File : XMS.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef XGRA_XMS
# define XGRA_XMS
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern XgraMenuItem XgraSetupMenu[];
extern XgraPanelItem XgraSetupInformationsPanel;
extern int XgraSetupInformationsDefaultValues[ 5 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackSetupLoadConfig();
extern void CallbackSetupSaveConfig();
extern void CallbackSetupDefaultConfig();
extern void CallbackSetupInformations();
extern void XgraLoadConfig();
extern void XgraLoadTopLevelConfig();
# 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 : XGRA |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XTB.h"
# include "XMS.h"
# include "XMS_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 : XGRA |
| |
| File : Dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_SETUP_DIALOG
# define XGRA_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 : XGRA |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMS.h"
# include "XMS_menu.h"
# include "XMS_panel.h"
# include "XMS_setup.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
XgraMenuItem XgraSetupMenu[] =
{
{
"Default Config",
'D',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackSetupDefaultConfig,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
{
"Load Config",
'L',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackSetupLoadConfig,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
{
"Save Config",
'S',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackSetupSaveConfig,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
{
"Informations",
'I',
NULL,
NULL,
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackSetupInformations,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackSetupLoadConfig |
| |
\------------------------------------------------------------*/
void CallbackSetupLoadConfig( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraLoadConfig( XGRA_TRUE );
autend();
}
/*------------------------------------------------------------\
| |
| CallbackSetupSaveConfig |
| |
\------------------------------------------------------------*/
void CallbackSetupSaveConfig( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraSaveConfig();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackSetupDefaultConfig |
| |
\------------------------------------------------------------*/
void CallbackSetupDefaultConfig( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraDefaultConfig();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackSetupInformations |
| |
\------------------------------------------------------------*/
void CallbackSetupInformations( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraDisplayInformations();
autend();
}

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 : XGRA |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_SETUP_MENU
# define XGRA_SETUP_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,180 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Panel.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XTB.h"
# include "XMS.h"
# include "XMS_panel.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Panel |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Panel Informations |
| |
\------------------------------------------------------------*/
static char *XgraPanelInformationsButtonName[] =
{
"Text",
"Close"
};
XgraPanelButtonItem XgraSetupInformationsButton[] =
{
{
&XgraPanelInformationsButtonName[0],
"Nothing", NULL, 0, 0,
NULL,
NULL,
0, 0,
8, 9,
NULL,
(XtPointer)NULL,
(Widget)NULL
}
,
{
&XgraPanelInformationsButtonName[1],
NULL, NULL, 0, 0,
NULL,
NULL,
3, 9,
2, 1,
XgraExitDialogCallback,
(XtPointer)NULL,
(Widget)NULL
}
,
NULL
};
XgraPanelItem XgraSetupInformationsPanel =
{
"Informations",
1,
0,
XGRA_SETUP_INFORMATIONS_X,
XGRA_SETUP_INFORMATIONS_Y,
360,
250,
8,
10,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
XgraSetupInformationsButton
};
int XgraSetupInformationsDefaultValues[ 5 ] =
{
XGRA_SETUP_INFORMATIONS_X,
XGRA_SETUP_INFORMATIONS_Y,
360, 250, 0
};
/*------------------------------------------------------------\
| |
| Callback For Informations |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraDisplayInformations |
| |
\------------------------------------------------------------*/
void XgraDisplayInformations()
{
char *Message;
autbegin();
Message = XgraGetInformations();
XmTextSetString( XgraSetupInformationsButton[0].BUTTON, Message );
XgraEnterPanel( &XgraSetupInformationsPanel );
XgraLimitedLoop( XgraSetupInformationsPanel.PANEL );
XgraExitPanel( &XgraSetupInformationsPanel );
autend();
}

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 : XGRA |
| |
| File : Panel.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_SETUP_PANEL
# define XGRA_SETUP_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_SETUP_INFORMATIONS_X 330
# define XGRA_SETUP_INFORMATIONS_Y 280
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraDisplayInformations();
# endif

View File

@ -0,0 +1,517 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Setup.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XMF.h"
# include "XME.h"
# include "XMV.h"
# include "XMT.h"
# include "XMS.h"
# include "XMH.h"
# include "XMS_setup.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
static FILE *FileConfig;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Set Panel New Values |
| |
\------------------------------------------------------------*/
void XgraSetPanelValues( Panel, Values )
XgraPanelItem *Panel;
int *Values;
{
autbegin();
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 )
{
XgraEnterPanel( Panel );
}
else
{
XtUnmanageChild( Panel->PANEL );
}
autend();
}
/*------------------------------------------------------------\
| |
| Write TopLevel Values |
| |
\------------------------------------------------------------*/
void XgraWriteTopLevelValues()
{
Dimension Values[5];
autbegin();
XtVaGetValues( XgraTopLevel,
XmNx , &Values[0],
XmNy , &Values[1],
XmNwidth , &Values[2],
XmNheight , &Values[3],
NULL );
Values[0] = Values[0] - XGRA_TOPLEVEL_ARCLATE_X;
Values[1] = Values[1] - XGRA_TOPLEVEL_ARCLATE_Y;
Values[4] = 1;
fprintf( FileConfig, "VERSION: %s\n", ALLIANCE_VERSION );
fprintf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n",
Values[0], Values[1], Values[2], Values[3], Values[4] );
autend();
}
/*------------------------------------------------------------\
| |
| Write Panel Values |
| |
\------------------------------------------------------------*/
void XgraWritePanelValues( Panel )
XgraPanelItem *Panel;
{
Dimension Values[5];
autbegin();
if ( Panel->COMPUTE == 0 )
{
XtVaGetValues( Panel->PANEL,
XmNx , &Values[0],
XmNy , &Values[1],
XmNwidth , &Values[2],
XmNheight , &Values[3],
NULL );
Values[0] = Values[0] - XGRA_PANEL_ARCLATE_X;
Values[1] = Values[1] - XGRA_PANEL_ARCLATE_Y;
}
else
{
Values[0] = Panel->X;
Values[1] = Panel->Y;
Values[2] = Panel->WIDTH;
Values[3] = Panel->HEIGHT;
}
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] );
autend();
}
/*------------------------------------------------------------\
| |
| Read Panel Values |
| |
\------------------------------------------------------------*/
void XgraReadPanelValues( Panel )
XgraPanelItem *Panel;
{
int Values[5];
autbegin();
fscanf( FileConfig, "X: %d, Y: %d, WIDTH: %d, HEIGHT: %d, MANAGED: %d\n",
&Values[0], &Values[1], &Values[2], &Values[3], &Values[4] );
XgraSetPanelValues( Panel, Values );
autend();
}
/*------------------------------------------------------------\
| |
| Read Panel Values |
| |
\------------------------------------------------------------*/
char XgraReadTopLevelValues()
{
int Values[5];
char Version[64];
autbegin();
fscanf( FileConfig, "VERSION: %s\n", Version );
if ( strcmp( Version, ALLIANCE_VERSION ) )
{
autend();
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( XgraTopLevel,
XmNx , Values[0],
XmNy , Values[1],
XmNwidth , Values[2],
XmNheight , Values[3],
NULL );
autend();
return( 1 );
}
/*------------------------------------------------------------\
| |
| ReadActiveLayers |
| |
\------------------------------------------------------------*/
void XgraReadActiveLayers()
{
short Layer;
int Value;
autbegin();
for ( Layer = 0; Layer < XGRA_MAX_LAYER; Layer++ )
{
fscanf( FileConfig, "ACTIVE: %d\n", &Value );
XGRA_ACTIVE_LAYER_TABLE[ Layer ] = Value;
}
for ( Layer = 0; Layer < XGRA_MAX_ACTIVE_NAME; Layer++ )
{
fscanf( FileConfig, "ACTIVE: %d\n", &Value );
XGRA_ACTIVE_NAME_TABLE[ Layer ] = Value;
}
autend();
}
/*------------------------------------------------------------\
| |
| WriteActiveLayers |
| |
\------------------------------------------------------------*/
void XgraWriteActiveLayers()
{
char Layer;
autbegin();
for ( Layer = 0; Layer < XGRA_MAX_LAYER; Layer++ )
{
fprintf( FileConfig, "ACTIVE: %d\n",
XGRA_ACTIVE_LAYER_TABLE[ Layer ] );
}
for ( Layer = 0; Layer < XGRA_MAX_ACTIVE_NAME; Layer++ )
{
fprintf( FileConfig, "ACTIVE: %d\n",
XGRA_ACTIVE_NAME_TABLE[ Layer ] );
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraDefaultTopLevelValues |
| |
\------------------------------------------------------------*/
void XgraDefaultTopLevelValues()
{
autbegin();
XtVaSetValues( XgraTopLevel,
XmNheight , XGRA_TOPLEVEL_HEIGHT,
XmNwidth , XGRA_TOPLEVEL_WIDTH,
XmNx , XGRA_TOPLEVEL_X,
XmNy , XGRA_TOPLEVEL_Y,
NULL
);
autend();
}
/*------------------------------------------------------------\
| |
| XgraDefaultConfig |
| |
\------------------------------------------------------------*/
void XgraDefaultConfig()
{
short Layer;
autbegin();
XgraDefaultTopLevelValues();
XgraSetPanelValues( &XgraViewArrowsPanel,
XgraViewArrowsDefaultValues );
XgraSetPanelValues( &XgraViewZoomPanel,
XgraViewZoomDefaultValues );
XgraSetPanelValues( &XgraViewGridPanel,
XgraViewGridDefaultValues );
XgraSetPanelValues( &XgraViewLayerPanel,
XgraViewLayerDefaultValues );
XgraSetPanelValues( &XgraViewMapPanel,
XgraViewMapDefaultValues );
XgraSetPanelValues( &XgraEditSearchViewPanel,
XgraEditSearchViewDefaultValues );
XgraSetPanelValues( &XgraEditSelectPanel,
XgraEditSelectDefaultValues );
XgraSetPanelValues( &XgraEditIdentifyPanel,
XgraEditIdentifyDefaultValues );
XgraSetPanelValues( &XgraToolsMessagePanel,
XgraToolsMessageDefaultValues );
XgraSetPanelValues( &XgraSetupInformationsPanel,
XgraSetupInformationsDefaultValues );
XgraSetPanelValues( &XgraHelpPresentPanel,
XgraHelpPresentDefaultValues );
for ( Layer = 0; Layer < XGRA_MAX_LAYER; Layer++ )
{
XGRA_ACTIVE_LAYER_TABLE[ Layer ] = 1;
}
for ( Layer = 0; Layer < XGRA_MAX_ACTIVE_NAME; Layer++ )
{
XGRA_ACTIVE_NAME_TABLE[ Layer ] = 1;
}
XgraInitializeLayer();
autend();
}
/*------------------------------------------------------------\
| |
| XgraLoadTopLevelConfig |
| |
\------------------------------------------------------------*/
void XgraLoadTopLevelConfig()
{
autbegin();
FileConfig = fopen( XGRA_XMS_FILE_NAME, "r" );
if ( FileConfig == (FILE *)NULL )
{
XgraDefaultTopLevelValues();
}
else
{
if ( ! XgraReadTopLevelValues() )
{
XgraDefaultTopLevelValues();
}
fclose( FileConfig );
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraLoadConfig |
| |
\------------------------------------------------------------*/
void XgraLoadConfig( Message )
char Message;
{
autbegin();
FileConfig = fopen( XGRA_XMS_FILE_NAME, "r" );
if ( FileConfig == (FILE *)NULL )
{
if ( Message )
{
XgraErrorMessage( XgraMainWindow,
"Unable to open config file !" );
}
else
{
XgraDefaultConfig();
}
}
else
{
if ( XgraReadTopLevelValues() )
{
XgraReadPanelValues( &XgraViewArrowsPanel );
XgraReadPanelValues( &XgraViewZoomPanel );
XgraReadPanelValues( &XgraViewGridPanel );
XgraReadPanelValues( &XgraViewLayerPanel );
XgraReadPanelValues( &XgraViewMapPanel );
XgraReadPanelValues( &XgraEditSearchViewPanel );
XgraReadPanelValues( &XgraEditSelectPanel );
XgraReadPanelValues( &XgraEditIdentifyPanel );
XgraReadPanelValues( &XgraToolsMessagePanel );
XgraReadPanelValues( &XgraSetupInformationsPanel );
XgraReadPanelValues( &XgraHelpPresentPanel );
XgraReadActiveLayers();
XgraInitializeLayer();
}
else
if ( Message )
{
XgraErrorMessage( XgraMainWindow,
"Bad version, unable to open config file !" );
}
fclose( FileConfig );
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraSaveConfig |
| |
\------------------------------------------------------------*/
void XgraSaveConfig()
{
autbegin();
FileConfig = fopen( XGRA_XMS_FILE_NAME, "w" );
if ( FileConfig == (FILE *)NULL )
{
XgraErrorMessage( XgraMainWindow,
"Unable to open config file !" );
}
else
{
XgraWriteTopLevelValues();
XgraWritePanelValues( &XgraViewArrowsPanel );
XgraWritePanelValues( &XgraViewZoomPanel );
XgraWritePanelValues( &XgraViewGridPanel );
XgraWritePanelValues( &XgraViewLayerPanel );
XgraWritePanelValues( &XgraViewMapPanel );
XgraWritePanelValues( &XgraEditSearchViewPanel );
XgraWritePanelValues( &XgraEditSelectPanel );
XgraWritePanelValues( &XgraEditIdentifyPanel );
XgraWritePanelValues( &XgraToolsMessagePanel );
XgraWritePanelValues( &XgraSetupInformationsPanel );
XgraWritePanelValues( &XgraHelpPresentPanel );
XgraWriteActiveLayers();
fclose( FileConfig );
}
autend();
}

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 : XGRA |
| |
| File : Setup.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_SETUP
# define XGRA_SETUP
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_TOPLEVEL_ARCLATE_X 8
# define XGRA_TOPLEVEL_ARCLATE_Y 25
# define XGRA_PANEL_ARCLATE_X 0
# define XGRA_PANEL_ARCLATE_Y 0
# define XGRA_TOPLEVEL_X 10
# define XGRA_TOPLEVEL_Y 10
# define XGRA_TOPLEVEL_WIDTH 1024
# define XGRA_TOPLEVEL_HEIGHT 768
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraDefaultConfig();
extern void XgraSaveConfig();
extern void XgraLoadConfig();
# 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 : XGRA |
| |
| File : XMT.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef XGRA_XMT
# define XGRA_XMT
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern XgraMenuItem XgraToolsMenu[];
extern XgraPanelItem XgraToolsMessagePanel;
extern int XgraToolsMessageDefaultValues[ 5 ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraDisplayToolsMessage();
# endif

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 : XGRA |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XTB.h"
# include "XMT.h"
# include "XMT_dialog.h"
# include "XMT_tools.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/

View File

@ -0,0 +1,71 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_TOOLS_DIALOG
# define XGRA_TOOLS_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,122 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMV.h"
# include "XMT.h"
# include "XMX.h"
# include "XMT_menu.h"
# include "XMT_tools.h"
# include "XMT_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
XgraMenuItem XgraToolsMenu[] =
{
{
"Message",
'M',
"Ctrl<Key>M",
"Ctrl M",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackToolsMessage,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackToolsMessage |
| |
\------------------------------------------------------------*/
void CallbackToolsMessage( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraEnterPanel( &XgraToolsMessagePanel );
autend();
}

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 : XGRA |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_MENU
# define XGRA_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackToolsMessage();
# endif

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 : XGRA |
| |
| File : Message.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XTB.h"
# include "XMT.h"
# include "XMT_tools.h"
# include "XMT_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 : XGRA |
| |
| File : Message.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_MESSAGE
# define XGRA_MESSAGE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,200 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Panel.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XMX.h"
# include "XTB.h"
# include "XMT.h"
# include "XMT_panel.h"
# include "XMT_message.h"
# include "XMT_dialog.h"
# include "XMT_tools.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Panel Message |
| |
\------------------------------------------------------------*/
static char *XgraPanelMessageButtonName[] =
{
"Text",
"Close"
};
XgraPanelButtonItem XgraToolsMessageButton[] =
{
{
&XgraPanelMessageButtonName[0],
"Nothing", NULL, 0, 0,
NULL,
NULL,
0, 0,
8, 9,
NULL,
(XtPointer)NULL,
(Widget)NULL
}
,
{
&XgraPanelMessageButtonName[1],
NULL, NULL, 0, 0,
NULL,
NULL,
3, 9,
2, 1,
CallbackToolsCloseMessage,
(XtPointer)NULL,
(Widget)NULL
}
,
NULL
};
XgraPanelItem XgraToolsMessagePanel =
{
"Message",
1,
0,
XGRA_TOOLS_MESSAGE_X,
XGRA_TOOLS_MESSAGE_Y,
360,
250,
8,
10,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
XgraToolsMessageButton
};
int XgraToolsMessageDefaultValues[ 5 ] =
{
XGRA_TOOLS_MESSAGE_X,
XGRA_TOOLS_MESSAGE_Y,
360, 250, 0
};
/*------------------------------------------------------------\
| |
| Callback For Message |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackToolsCloseMessage |
| |
\------------------------------------------------------------*/
void CallbackToolsCloseMessage( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraExitPanel( &XgraToolsMessagePanel );
autend();
}
/*------------------------------------------------------------\
| |
| XgraDisplayToolsMessage |
| |
\------------------------------------------------------------*/
void XgraDisplayToolsMessage()
{
char *Message;
autbegin();
Message = XgraGetErrorMessage();
if ( Message != (char *)NULL )
{
XmTextSetString( XgraToolsMessageButton[0].BUTTON, Message );
XgraEnterPanel( &XgraToolsMessagePanel );
}
else
{
XmTextSetString( XgraToolsMessageButton[0].BUTTON, "" );
}
autend();
}

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 : XGRA |
| |
| File : Panel.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_TOOLS_PANEL
# define XGRA_TOOLS_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_TOOLS_MESSAGE_X 330
# define XGRA_TOOLS_MESSAGE_Y 280
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void CallbackToolsCloseMessage();
# 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 : XGRA |
| |
| File : Tools.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XGR.h"
# include "XMV.h"
# include "XMT.h"
# include "XMT_tools.h"
# include "XMT_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 : XGRA |
| |
| File : Tools.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_TOOLS
# define XGRA_TOOLS
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

121
alliance/src/xgra/src/XMV.h Normal file
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 : XGRA |
| |
| File : XMV.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef XGRA_XMV
# define XGRA_XMV
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern char XgraFirstViewLayer;
/*------------------------------------------------------------\
| |
| Panel And Menu |
| |
\------------------------------------------------------------*/
extern XgraMenuItem XgraViewMenu[];
extern XgraPanelItem XgraViewArrowsPanel;
extern XgraPanelItem XgraViewZoomPanel;
extern XgraPanelItem XgraViewGridPanel;
extern XgraPanelItem XgraViewLayerPanel;
extern XgraPanelItem XgraViewMapPanel;
extern int XgraPercentZoom;
extern int XgraPercentMoveX;
extern int XgraPercentMoveY;
extern int XgraViewArrowsDefaultValues[5];
extern int XgraViewZoomDefaultValues[5];
extern int XgraViewLayerDefaultValues[5];
extern int XgraViewGridDefaultValues[5];
extern int XgraViewMapDefaultValues[5];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Values |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Zoom |
| |
\------------------------------------------------------------*/
extern void XgraComputeAndDisplayMap();
extern void XgraInitializeZoom();
extern void XgraBuildViewDialog();
extern void XgraBuildPanelMap();
extern void XgraInitializeMapEvent();
extern void XgraZoomCenter();
extern void XgraZoomRefresh();
extern void XgraZoomIn();
extern void XgraZoomPan();
extern void XgraPromptZoomIn();
extern void XgraPromptZoomPan();
extern void XgraPromptZoomCenter();
# 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 : XGRA |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XMV.h"
# include "XMV_dialog.h"
# include "XMV_view.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Dialog Box |
| |
\------------------------------------------------------------*/
XgraDialogItem XgraViewZoomSetDialog =
{
"Zoom set",
XGRA_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackViewZoomSetOk,
(XtPointer)NULL,
(void *)CallbackViewZoomSetCancel,
(XtPointer)NULL
};
XgraDialogItem XgraViewZoomGotoDialog =
{
"Goto X,Y",
XGRA_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackViewZoomGotoOk,
(XtPointer)NULL,
(void *)CallbackViewZoomGotoCancel,
(XtPointer)NULL
};
XgraDialogItem XgraViewMoveSetDialog =
{
"Move set dx,dy",
XGRA_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackViewMoveSetOk,
(XtPointer)NULL,
(void *)CallbackViewMoveSetCancel,
(XtPointer)NULL
};
XgraDialogItem XgraViewGridXDialog =
{
"Grid X",
XGRA_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackViewGridXOk,
(XtPointer)NULL,
(void *)CallbackViewGridXCancel,
(XtPointer)NULL
};
XgraDialogItem XgraViewGridYDialog =
{
"Grid Y",
XGRA_DIALOG_PROMPT,
(Widget)NULL,
(void *)CallbackViewGridYOk,
(XtPointer)NULL,
(void *)CallbackViewGridYCancel,
(XtPointer)NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Build Dialog Box |
| |
\------------------------------------------------------------*/
void XgraBuildViewDialog()
{
autbegin();
XgraBuildDialog( XgraMainWindow, &XgraViewZoomSetDialog );
XgraBuildDialog( XgraMainWindow, &XgraViewZoomGotoDialog );
XgraBuildDialog( XgraMainWindow, &XgraViewMoveSetDialog );
XgraBuildDialog( XgraMainWindow, &XgraViewGridXDialog );
XgraBuildDialog( XgraMainWindow, &XgraViewGridYDialog );
autend();
}
/*------------------------------------------------------------\
| |
| Callback For Dialog |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackViewZoomSetOk |
| |
\------------------------------------------------------------*/
void CallbackViewZoomSetOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *ZoomSet;
int ZoomPercent;
autbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&ZoomSet );
XtUnmanageChild( XgraViewZoomSetDialog.WIDGET );
XgraExitDialog();
if ( ZoomSet != (char *)NULL )
{
ZoomPercent = atoi( ZoomSet );
if ( ( ZoomPercent < XGRA_PERCENT_ZOOM_MIN ) ||
( ZoomPercent > XGRA_PERCENT_ZOOM_MAX ) )
{
XgraErrorMessage( XgraMainWindow, "The value must be between 5% and 95% !" );
}
else
{
XgraPercentZoom = ZoomPercent;
}
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewZoomSetCancel |
| |
\------------------------------------------------------------*/
void CallbackViewZoomSetCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
autbegin();
XtUnmanageChild( XgraViewZoomSetDialog.WIDGET );
XgraExitDialog();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewZoomGotoOk |
| |
\------------------------------------------------------------*/
void CallbackViewZoomGotoOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *ZoomGoto;
int Index;
long GotoX;
long GotoY;
autbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&ZoomGoto );
XtUnmanageChild( XgraViewZoomGotoDialog.WIDGET );
XgraExitDialog();
if ( ZoomGoto != (char *)NULL )
{
for ( Index = 0; ZoomGoto[ Index ]; Index++ )
{
if ( ZoomGoto[ Index ] == ',' )
{
ZoomGoto[ Index ] = '\0';
if ( Index == 0 )
{
GotoX = XgraUnitGridX + ( XgraUnitGridDx >> 1 );
}
else
{
GotoX = atoi( ZoomGoto );
}
if ( ZoomGoto[ Index + 1 ] == '\0' )
{
GotoY = XgraUnitGridY + ( XgraUnitGridDy >> 1 );
}
else
{
GotoY = atoi( ZoomGoto + Index + 1 );
}
ZoomGoto = (char *)NULL;
XgraZoomCenter( GotoX, GotoY );
break;
}
}
if ( ZoomGoto != (char *)NULL )
{
XgraErrorMessage( XgraMainWindow, "A coordinate must be specified !" );
}
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewZoomGotoCancel |
| |
\------------------------------------------------------------*/
void CallbackViewZoomGotoCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
autbegin();
XtUnmanageChild( XgraViewZoomGotoDialog.WIDGET );
XgraExitDialog();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewMoveSetOk |
| |
\------------------------------------------------------------*/
void CallbackViewMoveSetOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *MoveSet;
int MovePercentX;
int MovePercentY;
int Index;
autbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&MoveSet );
XtUnmanageChild( XgraViewMoveSetDialog.WIDGET );
XgraExitDialog();
if ( MoveSet != (char *)NULL )
{
for ( Index = 0; MoveSet[ Index ]; Index++ )
{
if ( MoveSet[ Index ] == ',' )
{
MoveSet[ Index ] = '\0';
MovePercentX = atoi( MoveSet );
MovePercentY = atoi( MoveSet + Index + 1 );
MoveSet = (char *)NULL;
break;
}
}
if ( MoveSet != (char *)NULL )
{
MovePercentY = MovePercentX = atoi( MoveSet );
}
if ( ( MovePercentX < XGRA_PERCENT_MOVE_MIN ) ||
( MovePercentX > XGRA_PERCENT_MOVE_MAX ) ||
( MovePercentY < XGRA_PERCENT_MOVE_MIN ) ||
( MovePercentY > XGRA_PERCENT_MOVE_MAX ) )
{
XgraErrorMessage( XgraMainWindow, "The values must be between 5% and 95% !" );
}
else
{
XgraPercentMoveX = MovePercentX;
XgraPercentMoveY = MovePercentY;
}
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewMoveSetCancel |
| |
\------------------------------------------------------------*/
void CallbackViewMoveSetCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
autbegin();
XtUnmanageChild( XgraViewMoveSetDialog.WIDGET );
XgraExitDialog();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewGridXOk |
| |
\------------------------------------------------------------*/
void CallbackViewGridXOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *GridSet;
int GridPercent;
autbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&GridSet );
XtUnmanageChild( XgraViewGridXDialog.WIDGET );
XgraExitDialog();
if ( GridSet != (char *)NULL )
{
GridPercent = atoi( GridSet );
if ( GridPercent < 2 )
{
XgraErrorMessage( XgraMainWindow, "The value must be greater than one !" );
}
else
{
XgraUnitUserGridDx = GridPercent;
XgraZoomRefresh();
}
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewGridXCancel |
| |
\------------------------------------------------------------*/
void CallbackViewGridXCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
autbegin();
XtUnmanageChild( XgraViewGridXDialog.WIDGET );
XgraExitDialog();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewGridYOk |
| |
\------------------------------------------------------------*/
void CallbackViewGridYOk( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
char *GridSet;
int GridPercent;
autbegin();
XmStringGetLtoR( CallData->value,
XmSTRING_DEFAULT_CHARSET,
&GridSet );
XtUnmanageChild( XgraViewGridYDialog.WIDGET );
XgraExitDialog();
if ( GridSet != (char *)NULL )
{
GridPercent = atoi( GridSet );
if ( GridPercent < 2 )
{
XgraErrorMessage( XgraMainWindow, "The value must be greater than one !" );
}
else
{
XgraUnitUserGridDy = GridPercent;
XgraZoomRefresh();
}
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewGridYCancel |
| |
\------------------------------------------------------------*/
void CallbackViewGridYCancel( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
XmSelectionBoxCallbackStruct *CallData;
{
autbegin();
XtUnmanageChild( XgraViewGridYDialog.WIDGET );
XgraExitDialog();
autend();
}

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 : XGRA |
| |
| File : Dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_VIEW_DIALOG
# define XGRA_VIEW_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern XgraDialogItem XgraViewZoomSetDialog;
extern XgraDialogItem XgraViewZoomGotoDialog;
extern XgraDialogItem XgraViewMoveSetDialog;
extern XgraDialogItem XgraViewGridXDialog;
extern XgraDialogItem XgraViewGridYDialog;
/*------------------------------------------------------------\
| |
| 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,754 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Map.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XGR.h"
# include "XTB.h"
# include "XMX.h"
# include "XMV.h"
# include "XMV_map.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
XgraPanelItem XgraViewMapPanel =
{
"Map",
1,
0,
XGRA_VIEW_MAP_X,
XGRA_VIEW_MAP_Y,
190,
200,
0,
0,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraPanelButtonItem *)NULL
};
int XgraViewMapDefaultValues[ 5 ] =
{
XGRA_VIEW_MAP_X,
XGRA_VIEW_MAP_Y,
190, 200, 0
};
/*------------------------------------------------------------\
| |
| Graphic Map Window |
| |
\------------------------------------------------------------*/
Widget XgraMapWindow;
Widget XgraMapButtonCompute;
Widget XgraMapButtonClose;
Dimension XgraMapDx = 0;
Dimension XgraMapDy = 0;
static char XgraFirstEnterMap = XGRA_TRUE;
static char XgraFirstExpose = XGRA_TRUE;
/*------------------------------------------------------------\
| |
| Unit Map |
| |
\------------------------------------------------------------*/
float XgraUnitMapStep;
long XgraUnitMapX;
long XgraUnitMapY;
long XgraUnitMapDx;
long XgraUnitMapDy;
long XgraBoundMapX;
long XgraBoundMapY;
long XgraBoundMapDx;
long XgraBoundMapDy;
long XgraPixelMapX;
long XgraPixelMapY;
/*------------------------------------------------------------\
| |
| Expose |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Arclation |
| |
\------------------------------------------------------------*/
static String XgraMapEventArclation =
"<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;
{
autbegin();
XgraExitPanel( &XgraViewMapPanel );
autend();
}
/*------------------------------------------------------------\
| |
| CallbackMapCompute |
| |
\------------------------------------------------------------*/
void CallbackMapCompute( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraComputeAndDisplayMap();
autend();
}
/*------------------------------------------------------------\
| |
| CallbackMapEvent |
| |
\------------------------------------------------------------*/
void CallbackMapEvent ( MyWidget, Event, Args, Argc )
Widget MyWidget;
XButtonEvent *Event;
String *Args;
int *Argc;
{
Display *EventDisplay;
char MouseEvent;
long X;
long Y;
autbegin();
EventDisplay = Event->display;
MouseEvent = Args[ 0 ][ 0 ] - '0';
X = Event->x;
Y = XgraMapDy - Event->y;
X = X + XgraPixelMapX;
Y = Y + XgraPixelMapY;
if ( X < 0 )
{
X = ((float)(X) / XgraUnitMapStep) - 0.5 ;
}
else
{
X = ((float)(X) / XgraUnitMapStep) + 0.5 ;
}
if ( Y < 0 )
{
Y = ((float)(Y) / XgraUnitMapStep) - 0.5 ;
}
else
{
Y = ((float)(Y) / XgraUnitMapStep) + 0.5 ;
}
switch ( MouseEvent )
{
case XGRA_B1UP :
case XGRA_B2UP :
case XGRA_B3UP :
XgraZoomCenter( X, Y );
break;
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackMapResize |
| |
\------------------------------------------------------------*/
void CallbackMapResize( MyWidget, ClientData, CallData )
Widget MyWidget;
XtPointer ClientData;
XmDrawingAreaCallbackStruct *CallData;
{
if ( ! XgraFirstExpose )
{
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
XgraResizeMapWindow();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
}
/*------------------------------------------------------------\
| |
| CallbackMapExpose |
| |
\------------------------------------------------------------*/
void CallbackMapExpose( MyWidget, ClientData, CallData )
Widget MyWidget;
XtPointer ClientData;
XmDrawingAreaCallbackStruct *CallData;
{
XExposeEvent *ExposeEvent;
autbegin();
ExposeEvent = (XExposeEvent *)CallData->event;
if ( XgraFirstExpose )
{
XgraFirstExpose = XGRA_FALSE;
XgraInitializeMapWindow();
}
XgraRefreshMapWindow();
autend();
}
/*------------------------------------------------------------\
| |
| Initialize Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgrasnitializeMapWindow |
| |
\------------------------------------------------------------*/
void XgraInitializeMapWindow()
{
autbegin();
XtVaGetValues( XgraMapWindow,
XmNwidth , &XgraMapDx,
XmNheight, &XgraMapDy,
NULL
);
XgraInitializeUnitMap();
autend();
}
/*------------------------------------------------------------\
| |
| Graphic Window Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraRefreshMapWindow |
| |
\------------------------------------------------------------*/
void XgraRefreshMapWindow()
{
autbegin();
XgraClearMapWindow();
XgraDisplayUnitMap();
autend();
}
/*------------------------------------------------------------\
| |
| XgraClearMapWindow |
| |
\------------------------------------------------------------*/
void XgraClearMapWindow()
{
XFillRectangle( XtDisplay( XgraMapWindow ),
XtWindow( XgraMapWindow ),
XgraBackgroundGC,
0, 0, XgraMapDx, XgraMapDy );
}
/*------------------------------------------------------------\
| |
| XgraResizeMapWindow |
| |
\------------------------------------------------------------*/
void XgraResizeMapWindow()
{
autbegin();
XtVaGetValues( XgraMapWindow,
XmNwidth, &XgraMapDx,
XmNheight, &XgraMapDy,
NULL
);
XgraComputeAndDisplayMap();
autend();
}
/*------------------------------------------------------------\
| |
| XgraInitializeMapEvent |
| |
\------------------------------------------------------------*/
void XgraInitializeMapEvent()
{
XtActionsRec NewActions;
autbegin();
XtVaSetValues( XgraMapWindow,
XmNtranslations,
XtParseTranslationTable( XgraMapEventArclation ),
NULL
);
NewActions.string = "CallbackMapEvent";
NewActions.proc = CallbackMapEvent;
XtAppAddActions( XgraApplication, &NewActions, 1 );
XtAddCallback( XgraMapWindow,
XmNresizeCallback,
CallbackMapResize, NULL );
XtAddCallback( XgraMapWindow,
XmNexposeCallback,
CallbackMapExpose, NULL );
autend();
}
/*------------------------------------------------------------\
| |
| Unit Map Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraInitializeUnitMap |
| |
\------------------------------------------------------------*/
void XgraInitializeUnitMap()
{
autbegin();
if ( ! XgraComputeBound() )
{
XgraBoundMapX = XGRA_DEFAULT_MAP_X;
XgraBoundMapY = XGRA_DEFAULT_MAP_Y;
XgraBoundMapDx = XGRA_DEFAULT_MAP_DX;
XgraBoundMapDy = XGRA_DEFAULT_MAP_DY;
}
else
{
XgraBoundMapX = XgraBoundXmin / XGRA_UNIT;
XgraBoundMapY = XgraBoundYmin / XGRA_UNIT;
XgraBoundMapDx = XgraBoundXmax / XGRA_UNIT;
XgraBoundMapDy = XgraBoundYmax / XGRA_UNIT;
XgraBoundMapDx = XgraBoundMapDx - XgraBoundMapX;
XgraBoundMapDy = XgraBoundMapDy - XgraBoundMapY;
}
XgraUnitMapX = XgraBoundMapX - 2;
XgraUnitMapY = XgraBoundMapY - 2;
XgraUnitMapDx = XgraBoundMapDx + 4;
XgraUnitMapDy = XgraBoundMapDy + 4;
XgraComputeUnitMap();
autend();
}
/*------------------------------------------------------------\
| |
| XgraComputeUnitMap |
| |
\------------------------------------------------------------*/
void XgraComputeUnitMap()
{
long Delta;
float StepX;
float StepY;
autbegin();
StepX = (float)(XgraMapDx) / (float)(XgraUnitMapDx);
StepY = (float)(XgraMapDy) / (float)(XgraUnitMapDy);
if ( StepX < StepY )
{
XgraUnitMapStep = StepX;
Delta = XgraUnitMapDy;
XgraUnitMapDy = 1 + ( XgraMapDy / StepX );
Delta = ( XgraUnitMapDy - Delta ) >> 1;
XgraUnitMapY = XgraUnitMapY - Delta;
}
else
{
XgraUnitMapStep = StepY;
Delta = XgraUnitMapDx;
XgraUnitMapDx = 1 + ( XgraMapDx / StepY );
Delta = ( XgraUnitMapDx - Delta ) >> 1;
XgraUnitMapX = XgraUnitMapX - Delta;
}
XgraPixelMapX = (float)(XgraUnitMapX) * XgraUnitMapStep;
XgraPixelMapY = (float)(XgraUnitMapY) * XgraUnitMapStep;
autend();
}
/*------------------------------------------------------------\
| |
| XgraDisplayUnitMap |
| |
\------------------------------------------------------------*/
void XgraDisplayUnitMap()
{
long X1;
long Y1;
long X2;
long Y2;
autbegin();
X1 = (float)( XgraBoundMapX ) * XgraUnitMapStep;
Y1 = (float)( XgraBoundMapY ) * XgraUnitMapStep;
X2 = (float)( XgraBoundMapX + XgraBoundMapDx ) * XgraUnitMapStep;
Y2 = (float)( XgraBoundMapY + XgraBoundMapDy ) * XgraUnitMapStep;
X1 = X1 - XgraPixelMapX;
X2 = X2 - XgraPixelMapX;
Y1 = Y1 - XgraPixelMapY;
Y2 = Y2 - XgraPixelMapY;
XDrawRectangle( XtDisplay( XgraMapWindow ),
XtWindow( XgraMapWindow ),
XgraLargeTextGC,
X1, XgraMapDy - Y2,
X2 - X1, Y2 - Y1 );
X1 = XgraUnitGridX + ( XgraUnitGridDx >> 1 );
Y1 = XgraUnitGridY + ( XgraUnitGridDy >> 1 );
X1 = (float)( X1 ) * XgraUnitMapStep;
Y1 = (float)( Y1 ) * XgraUnitMapStep;
X1 = X1 - XgraPixelMapX;
Y1 = Y1 - XgraPixelMapY;
Y1 = XgraMapDy - Y1;
if ( ( X1 > 0 ) &&
( Y1 > 0 ) &&
( X1 < XgraMapDx ) &&
( Y1 < XgraMapDy ) )
{
XDrawLine( XtDisplay( XgraMapWindow ),
XtWindow( XgraMapWindow ),
XgraLargeTextGC,
X1 - 2, Y1,
X1 + 2, Y1 );
XDrawLine( XtDisplay( XgraMapWindow ),
XtWindow( XgraMapWindow ),
XgraLargeTextGC,
X1, Y1 - 2,
X1, Y1 + 2 );
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraBuildPanelMap |
| |
\------------------------------------------------------------*/
void XgraBuildPanelMap()
{
Arg Args[3];
autbegin();
XtSetArg( Args[0], XmNshadowType , XmSHADOW_ETCHED_IN );
XtSetArg( Args[1], XmNdeleteResponse, XmDESTROY );
XtSetArg( Args[2], XmNtitle , XgraViewMapPanel.TITLE );
XgraViewMapPanel.PANEL =
XmCreateFormDialog( XgraMainWindow, "XgraViewMapPanel", Args, 3);
XtAddCallback( XgraViewMapPanel.PANEL, XmNdestroyCallback,
XgraDestroyDialogCallback, NULL );
XgraViewMapPanel.PANEL_FORM =
XtVaCreateManagedWidget( "XgraViewMapPanelForm",
xmFormWidgetClass,
XgraViewMapPanel.PANEL,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
XmNfractionBase , 100,
NULL
);
XgraViewMapPanel.FRAME =
XtVaCreateManagedWidget( "XgraViewMapFrame",
xmFrameWidgetClass,
XgraViewMapPanel.PANEL_FORM,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
NULL
);
XgraViewMapPanel.FORM =
XtVaCreateManagedWidget( "XgraViewMapForm",
xmFormWidgetClass,
XgraViewMapPanel.FRAME,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
XmNfractionBase , 100,
NULL
);
XgraMapButtonCompute =
XtVaCreateManagedWidget( "Compute",
xmPushButtonWidgetClass,
XgraViewMapPanel.FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 1,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 44,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 89,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 99,
NULL
);
XgraMapButtonClose =
XtVaCreateManagedWidget( "Close",
xmPushButtonWidgetClass,
XgraViewMapPanel.FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 45,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 99,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 89,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 99,
NULL
);
XgraMapWindow =
XtVaCreateManagedWidget( "XgraMapWindow",
xmDrawingAreaWidgetClass,
XgraViewMapPanel.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( XgraMapButtonCompute,
XmNactivateCallback,
CallbackMapCompute, NULL );
XtAddCallback( XgraMapButtonClose,
XmNactivateCallback,
CallbackCloseMap, NULL );
XtVaSetValues( XgraViewMapPanel.PANEL,
XmNheight, XgraViewMapPanel.HEIGHT,
XmNwidth , XgraViewMapPanel.WIDTH,
XmNx , XgraViewMapPanel.X,
XmNy , XgraViewMapPanel.Y,
NULL );
autend();
}
/*------------------------------------------------------------\
| |
| XgraEnterMapPanel |
| |
\------------------------------------------------------------*/
void XgraEnterMapPanel()
{
autbegin();
XgraFirstEnterMap = XGRA_FALSE;
XgraEnterPanel( &XgraViewMapPanel );
autend();
}
/*------------------------------------------------------------\
| |
| XgraComputeAndDisplayMap |
| |
\------------------------------------------------------------*/
void XgraComputeAndDisplayMap()
{
if ( ! XgraFirstEnterMap )
{
autbegin();
XgraInitializeUnitMap();
XgraClearMapWindow();
XgraDisplayUnitMap();
autend();
}
}

View File

@ -0,0 +1,102 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Map.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_MAP
# define XGRA_MAP
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_B1UP 0
# define XGRA_B2UP 1
# define XGRA_B3UP 2
# define XGRA_VIEW_MAP_X 25
# define XGRA_VIEW_MAP_Y 520
# define XGRA_DEFAULT_MAP_X 0
# define XGRA_DEFAULT_MAP_Y 0
# define XGRA_DEFAULT_MAP_DX 40
# define XGRA_DEFAULT_MAP_DY 40
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern Widget XgraMapPanel;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraComputeUnitMap();
extern void XgraInitializeUnitMap();
extern void XgraDisplayUnitMap();
extern void XgraEnterMapPanel();
extern void XgraClearMapWindow();
extern void XgraResizeMapWindow();
extern void XgraRefreshMapWindow();
extern void XgraInitializeMapWindow();
extern void CallbackCloseMap();
extern void CallbackMapCompute();
extern void CallbackMapResize();
extern void CallbackMapExpose();
extern void CallbackMapEvent();
# endif

View File

@ -0,0 +1,282 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XMV.h"
# include "XMV_menu.h"
# include "XMV_dialog.h"
# include "XMV_view.h"
# include "XMV_map.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
char XgraFirstViewLayer = 1;
/*------------------------------------------------------------\
| |
| Menu |
| |
\------------------------------------------------------------*/
XgraMenuItem XgraViewMenu[] =
{
{
"Zoom",
'Z',
"Meta<Key>Z",
"Meta Z",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackViewZoom,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
{
"Layers ",
'L',
"Meta<Key>L",
"Meta L",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackViewLayer,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
{
"Map",
'M',
"Meta<Key>P",
"Meta P",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackViewMap,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
{
"Arrows ",
'A',
"Meta<Key>A",
"Meta A",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackViewArrows,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
{
"Grid ",
'G',
"Meta<Key>G",
"Meta G",
&xmPushButtonGadgetClass,
False,
False,
False,
CallbackViewGrid,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
(XgraMenuItem *)NULL
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback For Menu |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| CallbackViewLayer |
| |
\------------------------------------------------------------*/
void CallbackViewLayer( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
if ( XgraFirstViewLayer )
{
XgraFirstViewLayer = 0;
XgraInitializeLayer();
}
XgraEnterPanel( &XgraViewLayerPanel );
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewGrid |
| |
\------------------------------------------------------------*/
void CallbackViewGrid( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraEnterPanel( &XgraViewGridPanel );
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewArrows |
| |
\------------------------------------------------------------*/
void CallbackViewArrows( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraEnterPanel( &XgraViewArrowsPanel );
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewZoom |
| |
\------------------------------------------------------------*/
void CallbackViewZoom( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraEnterPanel( &XgraViewZoomPanel );
autend();
}
/*------------------------------------------------------------\
| |
| CallbackViewMap |
| |
\------------------------------------------------------------*/
void CallbackViewMap( MyWidget, ClientData, CallData )
Widget MyWidget;
caddr_t ClientData;
caddr_t CallData;
{
autbegin();
XgraEnterMapPanel();
autend();
}

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 : XGRA |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_VIEW_MENU
# define XGRA_VIEW_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Callback View Menu |
| |
\------------------------------------------------------------*/
extern void CallbackViewZoom();
extern void CallbackViewGrid();
extern void CallbackViewLayer();
extern void CallbackViewMap();
extern void CallbackViewArrows();
# endif

View File

@ -0,0 +1,155 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Message.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/PushBG.h>
# include <Xm/CascadeBG.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XTB.h"
# include "XMV.h"
# include "XMV_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraPromptZoomIn |
| |
\------------------------------------------------------------*/
void XgraPromptZoomIn()
{
autbegin();
XgraDisplayMessage( XGRA_MESSAGE_MODE, "Zoom In" );
XgraDisplayMessage( XGRA_MESSAGE_INFO, "Select window" );
switch ( XgraCountEventZoom )
{
case 0 :
XgraDisplayMessage( XGRA_MESSAGE_PROMPT, "Enter first corner" );
break;
case 1 :
XgraDisplayMessage( XGRA_MESSAGE_PROMPT, "Enter second corner" );
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraPromptZoomPan |
| |
\------------------------------------------------------------*/
void XgraPromptZoomPan()
{
autbegin();
XgraDisplayMessage( XGRA_MESSAGE_MODE, "Zoom Pan" );
XgraDisplayMessage( XGRA_MESSAGE_INFO, "Select line" );
switch ( XgraCountEventZoom )
{
case 0 :
XgraDisplayMessage( XGRA_MESSAGE_PROMPT, "Enter source point" );
break;
case 1 :
XgraDisplayMessage( XGRA_MESSAGE_PROMPT, "Enter target point" );
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraPromptZoomCenter |
| |
\------------------------------------------------------------*/
void XgraPromptZoomCenter()
{
autbegin();
XgraDisplayMessage( XGRA_MESSAGE_MODE, "Zoom Center" );
XgraDisplayMessage( XGRA_MESSAGE_INFO, "Select point" );
XgraDisplayMessage( XGRA_MESSAGE_PROMPT, "Enter center point" );
autend();
}

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 : XGRA |
| |
| File : Message.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_MESSAGE
# define XGRA_MESSAGE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraPromptZoomIn();
extern void XgraPromptZoomCenter();
extern void XgraPromptZoomPan();
# endif

File diff suppressed because it is too large Load Diff

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 : XGRA |
| |
| File : Panel.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_VIEW_PANEL
# define XGRA_VIEW_PANEL
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_VIEW_ARROWS_X 990
# define XGRA_VIEW_ARROWS_Y 80
# define XGRA_VIEW_ZOOM_X 990
# define XGRA_VIEW_ZOOM_Y 230
# define XGRA_VIEW_GRID_X 470
# define XGRA_VIEW_GRID_Y 330
# define XGRA_VIEW_LAYER_X 430
# define XGRA_VIEW_LAYER_Y 190
/*------------------------------------------------------------\
| |
| 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 CallbackSetGridX();
extern void CallbackSetGridY();
extern void CallbackGridOnOff();
extern void CallbackCloseGrid();
extern void CallbackLayerAllVisible();
extern void CallbackLayerAllInvisible();
extern void CallbackLayerVisible();
extern void CallbackLayerInvisible();
extern void CallbackNameVisible();
extern void CallbackNameInvisible();
extern void CallbackLayerApply();
extern void CallbackCloseLayer();
extern void XgraSetLayerVisible();
extern void XgraSetLayerInvisible();
extern void XgraSetNameVisible();
extern void XgraSetNameInvisible();
extern void XgraLayerAllVisible();
extern void XgraLayerAllInvisible();
# endif

View File

@ -0,0 +1,670 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : View.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XGR.h"
# include "XMX.h"
# include "XMV.h"
# include "XMV_view.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
xgrazoom *XgraHeadZoom = (xgrazoom *)NULL;
int XgraPercentZoom = XGRA_PERCENT_ZOOM;
int XgraPercentMoveX = XGRA_PERCENT_MOVE;
int XgraPercentMoveY = XGRA_PERCENT_MOVE;
/*------------------------------------------------------------\
| |
| Menu |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraAllocZoom |
| |
\------------------------------------------------------------*/
xgrazoom *XgraAllocZoom ()
{
return ( (xgrazoom *) autalloc( sizeof ( xgrazoom ), 1));
}
/*------------------------------------------------------------\
| |
| XgraFreeZoom |
| |
\------------------------------------------------------------*/
void XgraFreeZoom ( FreeZoom )
xgrazoom *FreeZoom;
{
autfree( (char *)FreeZoom, sizeof(FreeZoom) );
}
/*------------------------------------------------------------\
| |
| XgraAddZoom |
| |
\------------------------------------------------------------*/
void XgraAddZoom ()
{
xgrazoom *XgraZoom;
autbegin();
XgraZoom = XgraAllocZoom ();
XgraZoom->X = XgraUnitGridX;
XgraZoom->Y = XgraUnitGridY;
XgraZoom->DX = XgraUnitGridDx;
XgraZoom->DY = XgraUnitGridDy;
XgraZoom->NEXT = XgraHeadZoom;
XgraHeadZoom = XgraZoom;
autend();
}
/*------------------------------------------------------------\
| |
| XgraDelZoom |
| |
\------------------------------------------------------------*/
char XgraDelZoom()
{
xgrazoom *XgraZoom;
if ( XgraHeadZoom != (xgrazoom *) NULL )
{
autbegin();
XgraZoom = XgraHeadZoom;
XgraHeadZoom = XgraHeadZoom->NEXT;
XgraFreeZoom( XgraZoom );
autend();
return( XGRA_TRUE );
}
return( XGRA_FALSE );
}
/*------------------------------------------------------------\
| |
| XgraInitializeZoom |
| |
\------------------------------------------------------------*/
void XgraInitializeZoom()
{
autbegin();
while( XgraDelZoom() != XGRA_FALSE );
if ( XgraComputeBound() == XGRA_FALSE )
{
XgraInitializeUnitGrid();
}
else
{
XgraUnitGridX = ( XgraBoundXmin / XGRA_UNIT ) - 1;
XgraUnitGridY = ( XgraBoundYmin / XGRA_UNIT ) - 1;
XgraUnitGridDx = ( XgraBoundXmax / XGRA_UNIT );
XgraUnitGridDy = ( XgraBoundYmax / XGRA_UNIT );
XgraUnitGridDx = XgraUnitGridDx - XgraUnitGridX + 1;
XgraUnitGridDy = XgraUnitGridDy - XgraUnitGridY + 1;
XgraComputeUnitGrid();
}
XgraComputeAndDisplayMap();
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomUndo |
| |
\------------------------------------------------------------*/
void XgraZoomUndo()
{
autbegin();
if ( XgraHeadZoom == (xgrazoom *)NULL )
{
XgraErrorMessage( XgraMainWindow, "No previous zoom !" );
}
else
{
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
XgraUnitGridX = XgraHeadZoom->X;
XgraUnitGridY = XgraHeadZoom->Y;
XgraUnitGridDx = XgraHeadZoom->DX;
XgraUnitGridDy = XgraHeadZoom->DY;
XgraComputeUnitGrid();
XgraComputeAndDisplayMap();
XgraDisplayFigure( 0, 0,
XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0,
XgraGraphicDx, XgraGraphicDy);
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
XgraDelZoom();
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomRight |
| |
\------------------------------------------------------------*/
void XgraZoomRight()
{
long Delta;
long Offset;
long XgraOldPixelGridX;
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
Delta = ( XgraPercentMoveX * XgraUnitGridDx ) / 100;
if ( Delta == 0 ) Delta = 1;
XgraUnitGridX = XgraUnitGridX + Delta;
XgraOldPixelGridX = XgraPixelGridX;
XgraPixelGridX = (float)(XgraUnitGridX) * XgraUnitGridStep;
Offset = XgraPixelGridX - XgraOldPixelGridX;
XCopyArea( XgraGraphicDisplay,
XgraGraphicPixmap,
XgraGraphicPixmap,
XgraBackgroundGC,
Offset, 0,
XgraGraphicDx - Offset,
XgraGraphicDy,
0, 0
);
XgraComputeAndDisplayMap();
XgraDisplayFigure( XgraGraphicDx - Offset, 0,
XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0,
XgraGraphicDx, XgraGraphicDy);
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomLeft |
| |
\------------------------------------------------------------*/
void XgraZoomLeft()
{
long Delta;
long Offset;
long XgraOldPixelGridX;
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
Delta = ( XgraPercentMoveX * XgraUnitGridDx ) / 100;
if ( Delta == 0 ) Delta = 1;
XgraUnitGridX = XgraUnitGridX - Delta;
XgraOldPixelGridX = XgraPixelGridX;
XgraPixelGridX = (float)(XgraUnitGridX) * XgraUnitGridStep;
Offset = XgraOldPixelGridX - XgraPixelGridX;
XCopyArea( XgraGraphicDisplay,
XgraGraphicPixmap,
XgraGraphicPixmap,
XgraBackgroundGC,
0, 0,
XgraGraphicDx - Offset,
XgraGraphicDy,
Offset, 0
);
XgraComputeAndDisplayMap();
XgraDisplayFigure( 0, 0, Offset, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy);
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomDown |
| |
\------------------------------------------------------------*/
void XgraZoomDown()
{
long Delta;
long Offset;
long XgraOldPixelGridY;
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
Delta = ( XgraPercentMoveY * XgraUnitGridDy ) / 100;
if ( Delta == 0 ) Delta = 1;
XgraUnitGridY = XgraUnitGridY - Delta;
XgraOldPixelGridY = XgraPixelGridY;
XgraPixelGridY = (float)(XgraUnitGridY) * XgraUnitGridStep;
Offset = XgraOldPixelGridY - XgraPixelGridY;
XCopyArea( XgraGraphicDisplay,
XgraGraphicPixmap,
XgraGraphicPixmap,
XgraBackgroundGC,
0, Offset,
XgraGraphicDx,
XgraGraphicDy - Offset,
0, 0
);
XgraComputeAndDisplayMap();
XgraDisplayFigure( 0, 0, XgraGraphicDx, Offset );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy);
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomUp |
| |
\------------------------------------------------------------*/
void XgraZoomUp()
{
long Delta;
long Offset;
long XgraOldPixelGridY;
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
Delta = ( XgraPercentMoveY * XgraUnitGridDy ) / 100;
if ( Delta == 0 ) Delta = 1;
XgraUnitGridY = XgraUnitGridY + Delta;
XgraOldPixelGridY = XgraPixelGridY;
XgraPixelGridY = (float)(XgraUnitGridY) * XgraUnitGridStep;
Offset = XgraPixelGridY - XgraOldPixelGridY;
XCopyArea( XgraGraphicDisplay,
XgraGraphicPixmap,
XgraGraphicPixmap,
XgraBackgroundGC,
0, 0,
XgraGraphicDx,
XgraGraphicDy - Offset,
0, Offset
);
XgraComputeAndDisplayMap();
XgraDisplayFigure( 0, XgraGraphicDy - Offset,
XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy);
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomMore |
| |
\------------------------------------------------------------*/
void XgraZoomMore()
{
long DeltaX;
long DeltaY;
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
DeltaX = ( XgraPercentZoom * XgraUnitGridDx ) / 100;
DeltaY = ( XgraPercentZoom * XgraUnitGridDy ) / 100;
if ( ( DeltaX >= 2 ) &&
( DeltaY >= 2 ) )
{
XgraAddZoom();
XgraUnitGridX = XgraUnitGridX + (DeltaX >> 1);
XgraUnitGridY = XgraUnitGridY + (DeltaY >> 1);
XgraUnitGridDx = XgraUnitGridDx - DeltaX;
XgraUnitGridDy = XgraUnitGridDy - DeltaY;
XgraComputeUnitGrid();
XgraComputeAndDisplayMap();
XgraDisplayFigure( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy );
}
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomLess |
| |
\------------------------------------------------------------*/
void XgraZoomLess()
{
long DeltaX;
long DeltaY;
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
DeltaX = 100 * XgraUnitGridDx / ( 100 - XgraPercentZoom );
DeltaY = 100 * XgraUnitGridDy / ( 100 - XgraPercentZoom );
XgraAddZoom();
XgraUnitGridX = XgraUnitGridX - ((DeltaX - XgraUnitGridDx) >> 1);
XgraUnitGridY = XgraUnitGridY - ((DeltaY - XgraUnitGridDy) >> 1);
XgraUnitGridDx = DeltaX;
XgraUnitGridDy = DeltaY;
XgraComputeUnitGrid();
XgraComputeAndDisplayMap();
XgraDisplayFigure( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomFit |
| |
\------------------------------------------------------------*/
void XgraZoomFit()
{
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
if ( XgraComputeBound() == XGRA_FALSE )
{
XgraErrorMessage( XgraMainWindow, "No element to display !" );
}
else
{
XgraAddZoom();
XgraUnitGridX = ( XgraBoundXmin / XGRA_UNIT ) - 1;
XgraUnitGridY = ( XgraBoundYmin / XGRA_UNIT ) - 1;
XgraUnitGridDx = XgraBoundXmax / XGRA_UNIT;
XgraUnitGridDy = XgraBoundYmax / XGRA_UNIT;
XgraUnitGridDx = XgraUnitGridDx - XgraUnitGridX + 1;
XgraUnitGridDy = XgraUnitGridDy - XgraUnitGridY + 1;
XgraComputeUnitGrid();
XgraComputeAndDisplayMap();
XgraDisplayFigure( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy );
}
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomCenter |
| |
\------------------------------------------------------------*/
void XgraZoomCenter( UnitX, UnitY )
long UnitX;
long UnitY;
{
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
XgraUnitGridX = UnitX - ( XgraUnitGridDx >> 1 );
XgraUnitGridY = UnitY - ( XgraUnitGridDy >> 1 );
XgraComputeUnitGrid();
XgraComputeAndDisplayMap();
XgraDisplayFigure( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomIn |
| |
\------------------------------------------------------------*/
void XgraZoomIn( UnitX1, UnitY1, UnitX2, UnitY2 )
long UnitX1;
long UnitY1;
long UnitX2;
long UnitY2;
{
long Swap;
autbegin();
if ( ( UnitX1 != UnitX2 ) &&
( UnitY1 != UnitY2 ) )
{
if ( UnitX1 > UnitX2 )
{
Swap = UnitX1; UnitX1 = UnitX2; UnitX2 = Swap;
}
if ( UnitY1 > UnitY2 )
{
Swap = UnitY1; UnitY1 = UnitY2; UnitY2 = Swap;
}
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
XgraAddZoom();
XgraUnitGridX = UnitX1;
XgraUnitGridY = UnitY1;
XgraUnitGridDx = UnitX2 - UnitX1;
XgraUnitGridDy = UnitY2 - UnitY1;
XgraComputeUnitGrid();
XgraComputeAndDisplayMap();
XgraDisplayFigure( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraZoomPan |
| |
\------------------------------------------------------------*/
void XgraZoomPan( UnitX1, UnitY1, UnitX2, UnitY2 )
long UnitX1;
long UnitY1;
long UnitX2;
long UnitY2;
{
if ( ( UnitX1 != UnitX2 ) ||
( UnitY1 != UnitY2 ) )
{
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
XgraUnitGridX = XgraUnitGridX + ( UnitX1 - UnitX2 );
XgraUnitGridY = XgraUnitGridY + ( UnitY1 - UnitY2 );
XgraComputeUnitGrid();
XgraComputeAndDisplayMap();
XgraDisplayFigure( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
}
/*------------------------------------------------------------\
| |
| XgraZoomRefresh |
| |
\------------------------------------------------------------*/
void XgraZoomRefresh()
{
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
XgraDisplayFigure( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}

View File

@ -0,0 +1,108 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : View.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_VIEW
# define XGRA_VIEW
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_PERCENT_ZOOM 30
# define XGRA_PERCENT_ZOOM_MIN 5
# define XGRA_PERCENT_ZOOM_MAX 95
# define XGRA_PERCENT_MOVE 30
# define XGRA_PERCENT_MOVE_MIN 5
# define XGRA_PERCENT_MOVE_MAX 95
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
typedef struct xgrazoom
{
struct xgrazoom *NEXT;
long X;
long Y;
long DX;
long DY;
} xgrazoom;
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern int XgraPercentZoom;
extern int XgraPercentMove;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraZoomUndo();
extern void XgraZoomRefresh();
extern void XgraZoomLeft();
extern void XgraZoomRight();
extern void XgraZoomUp();
extern void XgraZoomDown();
extern void XgraZoomMore();
extern void XgraZoomLess();
extern void XgraZoomFit();
# endif

274
alliance/src/xgra/src/XMX.h Normal file
View File

@ -0,0 +1,274 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : XMX.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# ifndef XGRA_XMX
# define XGRA_XMX
/*------------------------------------------------------------\
| |
| Graphic Context |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Colors Define |
| |
\------------------------------------------------------------*/
# define XGRA_BLACK_COLOR_NAME "Black"
/*------------------------------------------------------------\
| |
| Xgra Message |
| |
\------------------------------------------------------------*/
# define XGRA_MAX_MESSAGE 7
# define XGRA_MESSAGE_X 0
# define XGRA_MESSAGE_Y 1
# define XGRA_MESSAGE_DX 2
# define XGRA_MESSAGE_DY 3
# define XGRA_MESSAGE_MODE 4
# define XGRA_MESSAGE_INFO 5
# define XGRA_MESSAGE_PROMPT 6
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Xgra Widget |
| |
\------------------------------------------------------------*/
extern XtAppContext XgraApplication;
extern Widget XgraTopLevel;
extern Widget XgraMainWindow;
extern Widget XgraMainForm;
extern Widget XgraMenuBar;
extern Widget XgraGraphicFrame;
extern Widget XgraGraphicWindow;
extern Display *XgraGraphicDisplay;
extern Widget XgraMessageMainPaned;
extern Widget XgraMessageMainForm;
extern Widget XgraMessageForm [ XGRA_MAX_MESSAGE ];
extern Widget XgraMessageText [ XGRA_MAX_MESSAGE ];
extern Widget XgraMessageLabel [ XGRA_MAX_MESSAGE ];
extern Widget XgraMessageFrame [ XGRA_MAX_MESSAGE ];
/*------------------------------------------------------------\
| |
| Xgra Graphic Context |
| |
\------------------------------------------------------------*/
extern GC XgraBackgroundGC;
extern GC XgraGridGC;
extern GC XgraXorGC;
extern GC XgraAcceptDrawGC;
extern GC XgraConnectDrawGC;
extern GC XgraLayerDrawGC[ XGRA_MAX_LAYER ];
extern GC XgraSmallTextGC;
extern GC XgraMediumTextGC;
extern GC XgraLargeTextGC;
extern XFontStruct *XgraSmallTextFont;
extern XFontStruct *XgraLargeTextFont;
extern XFontStruct *XgraMediumTextFont;
/*------------------------------------------------------------\
| |
| Xgra Graphic Pixmap |
| |
\------------------------------------------------------------*/
extern Pixmap XgraGraphicPixmap;
/*------------------------------------------------------------\
| |
| Xgra Graphic Size |
| |
\------------------------------------------------------------*/
extern Dimension XgraOldGraphicDx;
extern Dimension XgraOldGraphicDy;
extern Dimension XgraGraphicDx;
extern Dimension XgraGraphicDy;
/*------------------------------------------------------------\
| |
| Xgra Unit Grid |
| |
\------------------------------------------------------------*/
extern float XgraUnitGridStep;
extern long XgraUnitGridX;
extern long XgraUnitGridY;
extern long XgraUnitGridDx;
extern long XgraUnitGridDy;
extern long XgraPixelGridX;
extern long XgraPixelGridY;
/*------------------------------------------------------------\
| |
| User Unit Grid |
| |
\------------------------------------------------------------*/
extern long XgraUnitUserGridDx;
extern long XgraUnitUserGridDy;
extern char XgraUnitUserGrid;
/*------------------------------------------------------------\
| |
| Xgra Cursor |
| |
\------------------------------------------------------------*/
extern long XgraUnitCursorX;
extern long XgraUnitCursorY;
/*------------------------------------------------------------\
| |
| Xgra Event |
| |
\------------------------------------------------------------*/
extern char XgraCountEventZoom;
extern char XgraCountEventEdit;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraInitializeRessources |
| |
\------------------------------------------------------------*/
extern void XgraInitializeRessources();
/*------------------------------------------------------------\
| |
| Xgra Change Title |
| |
\------------------------------------------------------------*/
extern void XgraChangeTopLevelTitle();
/*------------------------------------------------------------\
| |
| Xgra Edit Mode |
| |
\------------------------------------------------------------*/
extern void XgraChangeEditMode();
extern void XgraContinueEditMode();
/*------------------------------------------------------------\
| |
| XgraDisplayMessage |
| |
\------------------------------------------------------------*/
extern void XgraDisplayMessage();
extern void XgraPromptEditMeasure();
/*------------------------------------------------------------\
| |
| Xgra Graphic Window |
| |
\------------------------------------------------------------*/
extern void XgraClearGraphicWindow();
extern void XgraResizeGraphicWindow();
extern void XgraRefreshGraphicWindow();
/*------------------------------------------------------------\
| |
| Xgra Unit Grid |
| |
\------------------------------------------------------------*/
extern void XgraComputeUnitGrid();
extern void XgraResizeUnitGrid();
/*------------------------------------------------------------\
| |
| Xgra Display Figure |
| |
\------------------------------------------------------------*/
extern void XgraDisplayFigure();
extern void XgraDisplayObject();
/*------------------------------------------------------------\
| |
| Xgra Cursor |
| |
\------------------------------------------------------------*/
extern void XgraDisplayCursor();
extern void XgraUndisplayCursor();
# endif

View File

@ -0,0 +1,291 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Colors.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XMX_color.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
GC XgraBackgroundGC;
GC XgraGridGC;
GC XgraAcceptDrawGC;
GC XgraConnectDrawGC;
GC XgraLayerDrawGC[ XGRA_MAX_LAYER ];
GC XgraSmallTextGC;
GC XgraMediumTextGC;
GC XgraLargeTextGC;
GC XgraXorGC;
XFontStruct *XgraLargeTextFont;
XFontStruct *XgraMediumTextFont;
XFontStruct *XgraSmallTextFont;
/*------------------------------------------------------------\
| |
| Layer Color Define |
| |
\------------------------------------------------------------*/
static char **XgraColorName[ 5 ] =
{
&XGRA_BACKGROUND_COLOR_NAME,
&XGRA_FOREGROUND_COLOR_NAME,
&XGRA_CURSOR_COLOR_NAME,
&XGRA_ACCEPT_COLOR_NAME,
&XGRA_CONNECT_COLOR_NAME
};
static int XgraColor[ XGRA_MAX_COLOR ];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraInitializeColors |
| |
\------------------------------------------------------------*/
void XgraInitializeColors()
{
XColor ForgetIt;
XColor GetIt;
Window Root;
int Counter;
Colormap ColorMap;
char Error;
char *ColorName;
autbegin();
ColorMap = DefaultColormapOfScreen ( XtScreen ( XgraGraphicWindow ) );
Error = False;
for ( Counter = 0; Counter < XGRA_MAX_COLOR; Counter++ )
{
if ( Counter < 5 )
{
ColorName = *XgraColorName[ Counter ];
}
else
{
ColorName = XGRA_LAYER_NAME_TABLE[ Counter - 5 ][ 1 ];
}
if ( ColorName != (char *)NULL )
{
if ( ! XAllocNamedColor( XgraGraphicDisplay,
ColorMap, ColorName,
&GetIt, &ForgetIt ) )
{
fprintf ( stderr, "\nXmx100: Color name '%s' is not in X11 database !\n",
ColorName );
Error = True;
}
XgraColor[ Counter ] = GetIt.pixel;
}
else
{
XgraColor[ Counter ] = XgraColor[ 0 ];
}
}
if ( Error == True ) exit( 1 );
autend();
}
/*------------------------------------------------------------\
| |
| XgraInitializeGraphicContext |
| |
\------------------------------------------------------------*/
void XgraInitializeGraphicContext()
{
XGCValues GraphicValue;
int Counter;
Window Root;
autbegin();
XgraLargeTextFont = XLoadQueryFont( XgraGraphicDisplay,
XGRA_LARGE_TEXT_FONT_NAME );
XgraMediumTextFont = XLoadQueryFont( XgraGraphicDisplay,
XGRA_MEDIUM_TEXT_FONT_NAME );
XgraSmallTextFont = XLoadQueryFont( XgraGraphicDisplay,
XGRA_SMALL_TEXT_FONT_NAME );
GraphicValue.foreground = XgraColor[ 0 ]; /* Black */
GraphicValue.background = XgraColor[ 0 ];
GraphicValue.plane_mask = AllPlanes;
Root = RootWindowOfScreen ( XtScreen ( XgraGraphicWindow ) ),
XgraBackgroundGC = XCreateGC ( XgraGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
GraphicValue.foreground = XgraColor[ 1 ]; /* White */
XgraGridGC = XCreateGC ( XgraGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
GraphicValue.foreground = XgraColor[ 1 ]; /* Text */
XgraSmallTextGC = XCreateGC ( XgraGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
XgraMediumTextGC = XCreateGC ( XgraGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
XgraLargeTextGC = XCreateGC ( XgraGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
XSetFont( XgraGraphicDisplay,
XgraSmallTextGC, XgraSmallTextFont->fid );
XSetFont( XgraGraphicDisplay,
XgraMediumTextGC, XgraMediumTextFont->fid );
XSetFont( XgraGraphicDisplay,
XgraLargeTextGC, XgraLargeTextFont->fid );
GraphicValue.background = XgraColor[ 2 ]; /* Xor Color */
GraphicValue.foreground = XgraColor[ 2 ]; /* Xor Color */
GraphicValue.function = GXxor;
XgraXorGC = XCreateGC ( XgraGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCFunction |
GCPlaneMask ),
&GraphicValue );
GraphicValue.background = XgraColor[ 0 ]; /* Black */
GraphicValue.foreground = XgraColor[ 3 ]; /* Accept Color */
XgraAcceptDrawGC = XCreateGC ( XgraGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
GraphicValue.foreground = XgraColor[ 4 ]; /* Connect Color */
XgraConnectDrawGC = XCreateGC ( XgraGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
for ( Counter = 0; Counter < XGRA_MAX_LAYER; Counter++ )
{
GraphicValue.foreground = XgraColor[ Counter + 5 ];
XgraLayerDrawGC[ Counter ] =
XCreateGC ( XgraGraphicDisplay,
Root,
( GCForeground |
GCBackground |
GCPlaneMask ),
&GraphicValue );
}
autend();
}

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 : XGRA |
| |
| File : Color.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_COLOR
# define XGRA_COLOR
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Pattern |
| |
\------------------------------------------------------------*/
# define XGRA_MAX_COLOR ( 5 + XGRA_MAX_LAYER )
# define XGRA_LARGE_TEXT_FONT_NAME "9x15"
# define XGRA_MEDIUM_TEXT_FONT_NAME "7x13"
# define XGRA_SMALL_TEXT_FONT_NAME "5x8"
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraInitializeGraphicContext();
extern void XgraInitializeColors();
# endif

View File

@ -0,0 +1,514 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Cursor.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <X11/Intrinsic.h>
# include <X11/StringDefs.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XMX_grid.h"
# include "XMX_cursor.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Buffer |
| |
\------------------------------------------------------------*/
static char XgraCursorBuffer[ XGRA_MAX_CURSOR_BUFFER ];
/*------------------------------------------------------------\
| |
| Coordinates |
| |
\------------------------------------------------------------*/
Position XgraCursorX = 0;
Position XgraCursorY = 0;
Position XgraCursorSaveX = 0;
Position XgraCursorSaveY = 0;
char XgraCursorSaved = XGRA_FALSE;
char XgraCursorInside = XGRA_FALSE;
char XgraCursorType = XGRA_INPUT_HALF_BOX;
long XgraUnitCursorX = 0;
long XgraUnitCursorY = 0;
long XgraPixelCursorX = 0;
long XgraPixelCursorY = 0;
long XgraUnitCursorSaveX[ 2 ] = { 0, 0 };
long XgraUnitCursorSaveY[ 2 ] = { 0, 0 };
char XgraCursorIndex = 0;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraComputeCursor |
| |
\------------------------------------------------------------*/
void XgraComputeCursor( X, Y )
Position X;
Position Y;
{
autbegin();
Y = XgraGraphicDy - Y;
XgraUnitCursorX = X + XgraPixelGridX;
XgraUnitCursorY = Y + XgraPixelGridY;
if ( XgraUnitCursorX < 0 )
{
XgraUnitCursorX = ((float)(XgraUnitCursorX) / XgraUnitGridStep) - 0.5 ;
}
else
{
XgraUnitCursorX = ((float)(XgraUnitCursorX) / XgraUnitGridStep) + 0.5 ;
}
if ( XgraUnitCursorY < 0 )
{
XgraUnitCursorY = ((float)(XgraUnitCursorY) / XgraUnitGridStep) - 0.5 ;
}
else
{
XgraUnitCursorY = ((float)(XgraUnitCursorY) / XgraUnitGridStep) + 0.5 ;
}
XgraPixelCursorX = ((float)(XgraUnitCursorX) * XgraUnitGridStep);
XgraPixelCursorY = ((float)(XgraUnitCursorY) * XgraUnitGridStep);
XgraCursorX = XgraPixelCursorX - XgraPixelGridX;
XgraCursorY = XgraPixelCursorY - XgraPixelGridY;
XgraCursorY = XgraGraphicDy - XgraCursorY;
autend();
}
/*------------------------------------------------------------\
| |
| XgraDisplayCoordinates |
| |
\------------------------------------------------------------*/
void XgraDisplayCoordinates()
{
autbegin();
sprintf( XgraCursorBuffer, "%d", XgraUnitCursorX );
XgraDisplayMessage( XGRA_MESSAGE_X, XgraCursorBuffer );
sprintf( XgraCursorBuffer, "%d", XgraUnitCursorY );
XgraDisplayMessage( XGRA_MESSAGE_Y, XgraCursorBuffer );
sprintf( XgraCursorBuffer, "%d", XgraUnitCursorX - XgraUnitCursorSaveX[0] );
XgraDisplayMessage( XGRA_MESSAGE_DX, XgraCursorBuffer );
sprintf( XgraCursorBuffer, "%d", XgraUnitCursorY - XgraUnitCursorSaveY[0] );
XgraDisplayMessage( XGRA_MESSAGE_DY, XgraCursorBuffer );
autend();
}
/*------------------------------------------------------------\
| |
| XgraPointCursor |
| |
\------------------------------------------------------------*/
void XgraPointCursor()
{
autbegin();
XgraUndisplayCursor();
XgraUnitCursorSaveX[ XgraCursorIndex ] = XgraUnitCursorX;
XgraUnitCursorSaveY[ XgraCursorIndex ] = XgraUnitCursorY;
XgraCursorIndex = XgraCursorIndex + 1;
XgraDisplayCursor();
autend();
}
/*------------------------------------------------------------\
| |
| XgraResetCursor |
| |
\------------------------------------------------------------*/
void XgraResetCursor()
{
autbegin();
XgraUndisplayCursor();
XgraCursorIndex = XgraCursorIndex - 1;
XgraDisplayCursor();
autend();
}
/*------------------------------------------------------------\
| |
| XgraChangeCursor |
| |
\------------------------------------------------------------*/
void XgraChangeCursorType( ArrayX, ArrayY, Index, Type )
long *ArrayX;
long *ArrayY;
char Index;
char Type;
{
autbegin();
XgraUndisplayCursor();
XgraCursorType = Type;
XgraCursorIndex = Index;
if ( Index != 0 )
{
XgraUnitCursorSaveX[ 0 ] = ArrayX[0];
XgraUnitCursorSaveY[ 0 ] = ArrayY[0];
XgraUnitCursorSaveX[ 1 ] = ArrayX[1];
XgraUnitCursorSaveY[ 1 ] = ArrayY[1];
}
XgraDisplayCursor();
autend();
}
/*------------------------------------------------------------\
| |
| XgraDrawCursor |
| |
\------------------------------------------------------------*/
void XgraDrawCursor()
{
long X1;
long Y1;
long X2;
long Y2;
long DeltaX;
long DeltaY;
long Swap;
char DrawLine;
autbegin();
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
XgraCursorSaveX - XGRA_CURSOR_SIZE,
XgraCursorSaveY - XGRA_CURSOR_SIZE,
XgraCursorSaveX + XGRA_CURSOR_SIZE,
XgraCursorSaveY + XGRA_CURSOR_SIZE );
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
XgraCursorSaveX - XGRA_CURSOR_SIZE,
XgraCursorSaveY + XGRA_CURSOR_SIZE,
XgraCursorSaveX + XGRA_CURSOR_SIZE,
XgraCursorSaveY - XGRA_CURSOR_SIZE );
if ( XgraCursorIndex > 0 )
{
X1 = (float)(XgraUnitCursorSaveX[0]) * XgraUnitGridStep;
Y1 = (float)(XgraUnitCursorSaveY[0]) * XgraUnitGridStep;
X1 = X1 - XgraPixelGridX;
Y1 = Y1 - XgraPixelGridY;
Y1 = XgraGraphicDy - Y1;
if ( XgraCursorIndex == 1 )
{
X2 = XgraCursorSaveX;
Y2 = XgraCursorSaveY;
}
else
{
X2 = (float)(XgraUnitCursorSaveX[1]) * XgraUnitGridStep;
Y2 = (float)(XgraUnitCursorSaveY[1]) * XgraUnitGridStep;
X2 = X2 - XgraPixelGridX;
Y2 = Y2 - XgraPixelGridY;
Y2 = XgraGraphicDy - Y2;
}
switch( XgraCursorType )
{
case XGRA_INPUT_POINT :
break;
case XGRA_INPUT_LINE :
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
X1, Y1, X2, Y2 );
break;
case XGRA_INPUT_HALF_BOX :
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
X1, Y1, X2, Y1 );
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
X2, Y1, X2, Y2 );
break;
case XGRA_INPUT_ORTHO :
case XGRA_INPUT_SORTHO :
case XGRA_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 > XgraGraphicDx ) X2 = XgraGraphicDx;
if ( ( X1 < X2 ) &&
( Y1 >= 0 ) &&
( Y1 <= XgraGraphicDy ) )
{
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
X1, Y1, X2, Y2 );
}
}
else
{
X2 = X1;
if ( Y1 > Y2 ) { Swap = Y1; Y1 = Y2; Y2 = Swap; }
if ( Y1 < 0 ) Y1 = 0;
if ( Y2 > XgraGraphicDy ) Y2 = XgraGraphicDy;
if ( ( Y1 < Y2 ) &&
( X1 >= 0 ) &&
( X1 <= XgraGraphicDx ) )
{
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
X1, Y1, X2, Y2 );
}
}
break;
case XGRA_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 |= XGRA_WEST; }
if ( X2 > XgraGraphicDx ) { X2 = XgraGraphicDx; DrawLine |= XGRA_EAST; }
if ( Y1 < 0 ) { Y1 = 0; DrawLine |= XGRA_SOUTH; }
if ( Y2 > XgraGraphicDy ) { Y2 = XgraGraphicDy; DrawLine |= XGRA_NORTH; }
if ( DrawLine == 0 )
{
XDrawRectangle( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
X1, Y1,
X2 - X1, Y2 - Y1 );
}
else
{
if ( ( DrawLine & XGRA_WEST ) == 0 )
{
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
X1, Y2,
X1, Y1 );
}
if ( ( DrawLine & XGRA_EAST ) == 0 )
{
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
X2, Y2,
X2, Y1 );
}
if ( ( DrawLine & XGRA_SOUTH ) == 0 )
{
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
X1, Y1,
X2, Y1 );
}
if ( ( DrawLine & XGRA_NORTH ) == 0 )
{
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraXorGC,
X1, Y2,
X2, Y2 );
}
}
break;
}
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraUndisplayCursor |
| |
\------------------------------------------------------------*/
void XgraUndisplayCursor()
{
autbegin();
if ( XgraCursorInside == XGRA_TRUE )
{
if ( XgraCursorSaved == XGRA_TRUE )
{
XgraDrawCursor();
}
XgraCursorSaved = XGRA_FALSE;
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraDisplayCursor |
| |
\------------------------------------------------------------*/
void XgraDisplayCursor()
{
autbegin();
if ( XgraCursorInside == XGRA_TRUE )
{
if ( XgraCursorSaved == XGRA_TRUE )
{
XgraDrawCursor();
XgraCursorSaved = XGRA_FALSE;
}
if ( ( XgraCursorY >= 0 ) &&
( XgraCursorX <= XgraGraphicDx ) )
{
XgraCursorSaveX = XgraCursorX;
XgraCursorSaveY = XgraCursorY;
XgraDrawCursor();
XgraCursorSaved = XGRA_TRUE;
}
}
autend();
}

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 : XGRA |
| |
| File : Cursor.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_CURSOR
# define XGRA_CURSOR
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_MAX_CURSOR_BUFFER 128
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern Position XgraCursorX;
extern Position XgraCursorY;
extern Position XgraCursorSaveX;
extern Position XgraCursorSaveY;
extern char XgraCursorSaved;
extern char XgraCursorInside;
extern long XgraLambdaCursorX;
extern long XgraLambdaCursorY;
extern long XgraPixelCursorX;
extern long XgraPixelCursorY;
extern long XgraPixelCursorX1;
extern long XgraPixelCursorY1;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraComputeCursor();
extern void XgraChangeCursorType();
extern void XgraPointCursor();
extern void XgraResetCursor();
extern void XgraDisplayCoordinates();
# endif

View File

@ -0,0 +1,102 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Dialog.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMF.h"
# include "XMV.h"
# include "XMT.h"
# include "XME.h"
# include "XMS.h"
# include "XMH.h"
# include "XMX.h"
# include "XMX_dialog.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraInitializeDialog |
| |
\------------------------------------------------------------*/
void XgraInitializeDialog()
{
autbegin();
XgraBuildFileDialog();
XgraBuildEditDialog();
XgraBuildViewDialog();
autend();
}

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 : XGRA |
| |
| File : dialog.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_DIALOG
# define XGRA_DIALOG
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraInitializeDialog();
# endif

View File

@ -0,0 +1,780 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Event.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <X11/Intrinsic.h>
# include <X11/StringDefs.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XTB.h"
# include "XME.h"
# include "XMV.h"
# include "XMF.h"
# include "XMS.h"
# include "XMH.h"
# include "XMX_motif.h"
# include "XMX_grid.h"
# include "XMX_cursor.h"
# include "XMX_event.h"
# include "XMX_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Arclation |
| |
\------------------------------------------------------------*/
static String XgraEventArclation =
"<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";
/*------------------------------------------------------------\
| |
| Event Count |
| |
\------------------------------------------------------------*/
static char XgraMaxEventEditTable[] =
{
2, /* XGRA_EDIT_MEASURE */
1, /* XGRA_EDIT_IDENTIFY */
1 /* XGRA_EDIT_CONNECTED */
};
static char XgraInputEventEditTable[] =
{
XGRA_INPUT_HALF_BOX, /* XGRA_EDIT_MEASURE */
XGRA_INPUT_POINT, /* XGRA_EDIT_IDENTIFY */
XGRA_INPUT_POINT /* XGRA_EDIT_CONNECTED */
};
static char XgraMaxEventZoomTable[] =
{
1, /* XGRA_ZOOM_CENTER */
2, /* XGRA_ZOOM_IN */
2 /* XGRA_ZOOM_PAN */
};
static char XgraInputEventZoomTable[] =
{
XGRA_INPUT_POINT, /* XGRA_ZOOM_CENTER */
XGRA_INPUT_BOX, /* XGRA_ZOOM_IN */
XGRA_INPUT_LINE /* XGRA_ZOOM_PAN */
};
/*------------------------------------------------------------\
| |
| Arclation |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Expose Edit Zoom |
| |
\------------------------------------------------------------*/
static long XgraUnitEventZoomX[ 2 ] = { 0, 0 };
static long XgraUnitEventZoomY[ 2 ] = { 0, 0 };
static char XgraMaxEventZoom = 0;
char XgraCountEventZoom = 0;
static long XgraUnitEventEditX[ 2 ] = { 0, 0 };
static long XgraUnitEventEditY[ 2 ] = { 0, 0 };
static char XgraMaxEventEdit = 2;
char XgraCountEventEdit = 0;
static char XgraFirstExpose = XGRA_TRUE;
/*------------------------------------------------------------\
| |
| Input |
| |
\------------------------------------------------------------*/
static char XgraInputMode = XGRA_INPUT_HALF_BOX;
static char XgraSaveInputMode = XGRA_INPUT_HALF_BOX;
static char XgraEditMode = XGRA_EDIT_MEASURE;
static char XgraSaveEditMode = XGRA_EDIT_MEASURE;
/*------------------------------------------------------------\
| |
| Edit Message |
| |
\------------------------------------------------------------*/
static void (*XgraPromptMessage)() = XgraPromptEditMeasure;
static void (*XgraSavePromptMessage)() = XgraPromptEditMeasure;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraChangeEditMode |
| |
\------------------------------------------------------------*/
void XgraChangeEditMode( EditMode , PromptMessage )
char EditMode;
void (*PromptMessage)();
{
autbegin();
if ( EditMode & XGRA_ZOOM_MARK )
{
EditMode = EditMode & ~XGRA_ZOOM_MARK;
XgraCountEventZoom = 0;
XgraMaxEventZoom = XgraMaxEventZoomTable[ EditMode ];
if ( ! ( XgraEditMode & XGRA_ZOOM_MARK ) )
{
XgraSaveEditMode = XgraEditMode;
XgraSaveInputMode = XgraInputMode;
XgraSavePromptMessage = XgraPromptMessage;
}
XgraInputMode = XgraInputEventZoomTable[ EditMode ];
XgraPromptMessage = PromptMessage;
XgraEditMode = EditMode | XGRA_ZOOM_MARK;
XgraChangeCursorType( NULL, NULL, 0, XgraInputMode );
}
else
{
if ( XgraEditMode & XGRA_ZOOM_MARK )
{
XgraSaveEditMode = EditMode;
XgraSaveInputMode = XgraInputEventEditTable[ EditMode ];
XgraSavePromptMessage = PromptMessage;
XgraCountEventEdit = 0;
XgraMaxEventEdit = XgraMaxEventEditTable[ EditMode ];
}
else
{
if ( XgraEditMode != EditMode )
{
XgraCountEventEdit = 0;
XgraMaxEventEdit = XgraMaxEventEditTable[ EditMode ];
XgraEditMode = EditMode;
XgraInputMode = XgraInputEventEditTable[ EditMode ];
XgraPromptMessage = PromptMessage;
XgraChangeCursorType( NULL, NULL, 0, XgraInputMode );
}
}
XgraEditUnselectAll();
}
XgraPromptMessage();
autend();
}
/*------------------------------------------------------------\
| |
| XgraContinueEditMode |
| |
\------------------------------------------------------------*/
void XgraContinueEditMode( EditMode , PromptMessage, CountEvent )
char EditMode;
void (*PromptMessage)();
char CountEvent;
{
autbegin();
if ( XgraEditMode & XGRA_ZOOM_MARK )
{
XgraSaveEditMode = EditMode;
XgraSaveInputMode = XgraInputEventEditTable[ EditMode ];
XgraSavePromptMessage = PromptMessage;
XgraCountEventEdit = CountEvent;
XgraMaxEventEdit = XgraMaxEventEditTable[ EditMode ];
}
else
{
XgraCountEventEdit = CountEvent;
XgraMaxEventEdit = XgraMaxEventEditTable[ EditMode ];
XgraEditMode = EditMode;
XgraInputMode = XgraInputEventEditTable[ EditMode ];
XgraPromptMessage = PromptMessage;
XgraChangeCursorType( XgraUnitEventEditX,
XgraUnitEventEditY,
XgraCountEventEdit,
XgraInputMode );
}
XgraPromptMessage();
autend();
}
/*------------------------------------------------------------\
| |
| XgraTreatEventZoom |
| |
\------------------------------------------------------------*/
void XgraTreatEventZoom()
{
autbegin();
XgraChangeCursorType( XgraUnitEventEditX,
XgraUnitEventEditY,
XgraCountEventEdit,
XgraSaveInputMode );
switch ( XgraEditMode )
{
case XGRA_ZOOM_CENTER :
XgraZoomCenter( XgraUnitEventZoomX[ 0 ],
XgraUnitEventZoomY[ 0 ] );
break;
case XGRA_ZOOM_IN :
XgraZoomIn( XgraUnitEventZoomX[ 0 ],
XgraUnitEventZoomY[ 0 ],
XgraUnitEventZoomX[ 1 ],
XgraUnitEventZoomY[ 1 ] );
break;
case XGRA_ZOOM_PAN :
XgraZoomPan( XgraUnitEventZoomX[ 0 ],
XgraUnitEventZoomY[ 0 ],
XgraUnitEventZoomX[ 1 ],
XgraUnitEventZoomY[ 1 ] );
break;
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraTreatEventEdit |
| |
\------------------------------------------------------------*/
void XgraTreatEventEdit()
{
long DeltaX;
long DeltaY;
long X1;
long X2;
long Y1;
long Y2;
autbegin();
X1 = XgraUnitEventEditX[0];
X2 = XgraUnitEventEditX[1];
Y1 = XgraUnitEventEditY[0];
Y2 = XgraUnitEventEditY[1];
if ( ( XgraInputMode == XGRA_INPUT_LSTRING ) ||
( XgraInputMode == XGRA_INPUT_ORTHO ) ||
( XgraInputMode == XGRA_INPUT_SORTHO ) )
{
DeltaX = X1 - X2;
DeltaY = Y1 - Y2;
if ( DeltaX < 0 ) DeltaX = - DeltaX;
if ( DeltaY < 0 ) DeltaY = - DeltaY;
if ( DeltaX > DeltaY )
{
Y2 = Y1;
XgraUnitEventEditX[0] = X2;
XgraUnitEventEditY[0] = Y2;
}
else
{
X2 = X1;
XgraUnitEventEditX[0] = X2;
XgraUnitEventEditY[0] = Y2;
}
}
if ( XgraInputMode == XGRA_INPUT_LSTRING )
{
XgraChangeCursorType( XgraUnitEventEditX,
XgraUnitEventEditY,
1, XgraInputMode );
XgraCountEventEdit = 1;
}
else
{
XgraChangeCursorType( NULL, NULL, 0,
XgraInputMode );
XgraCountEventEdit = 0;
}
switch ( XgraEditMode )
{
case XGRA_EDIT_MEASURE :
break;
case XGRA_EDIT_IDENTIFY :
XgraEditIdentify( X1, Y1 );
break;
case XGRA_EDIT_CONNECTED :
XgraEditConnected( X1, Y1 );
break;
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackEvent |
| |
\------------------------------------------------------------*/
void CallbackEvent ( MyWidget, Event, Args, Argc )
Widget MyWidget;
XButtonEvent *Event;
String *Args;
int *Argc;
{
Display *EventDisplay;
char MouseEvent;
Position OldUnitCursorX;
Position OldUnitCursorY;
autbegin();
EventDisplay = Event->display;
MouseEvent = atoi( Args[ 0 ] );
if ( MouseEvent == XGRA_LEAVE )
{
XgraUndisplayCursor();
XgraCursorInside = XGRA_FALSE;
}
else
{
OldUnitCursorX = XgraUnitCursorX;
OldUnitCursorY = XgraUnitCursorY;
XgraComputeCursor( Event->x, Event->y );
switch ( MouseEvent )
{
case XGRA_B1DN :
if ( XgraEditMode & XGRA_ZOOM_MARK )
{
if ( XgraCountEventZoom < XgraMaxEventZoom )
{
XgraUnitEventZoomX[ XgraCountEventZoom ] = XgraUnitCursorX;
XgraUnitEventZoomY[ XgraCountEventZoom ] = XgraUnitCursorY;
XgraCountEventZoom = XgraCountEventZoom + 1;
XgraPointCursor();
if ( XgraCountEventZoom == XgraMaxEventZoom )
{
XgraChangeCursorType( NULL, NULL, 0, XgraInputMode );
XgraTreatEventZoom();
XgraInputMode = XgraSaveInputMode;
XgraEditMode = XgraSaveEditMode;
XgraPromptMessage = XgraSavePromptMessage;
XgraSaveEditMode = XGRA_EDIT_MEASURE;
XgraSaveInputMode = XGRA_INPUT_HALF_BOX;
XgraCountEventZoom = 0;
XgraMaxEventZoom = 0;
XgraChangeCursorType( XgraUnitEventEditX,
XgraUnitEventEditY,
XgraCountEventEdit,
XgraInputMode );
XgraComputeCursor( Event->x, Event->y );
XgraDisplayCursor();
}
}
}
else
{
if ( XgraCountEventEdit < XgraMaxEventEdit )
{
XgraUnitEventEditX[ XgraCountEventEdit ] = XgraUnitCursorX;
XgraUnitEventEditY[ XgraCountEventEdit ] = XgraUnitCursorY;
XgraCountEventEdit = XgraCountEventEdit + 1;
XgraPointCursor();
if ( XgraCountEventEdit == XgraMaxEventEdit )
{
XgraTreatEventEdit();
XgraDisplayCursor();
}
}
}
XgraPromptMessage();
break;
case XGRA_B3DN :
if ( XgraEditMode & XGRA_ZOOM_MARK )
{
if ( XgraCountEventZoom != 0 )
{
XgraCountEventZoom = XgraCountEventZoom - 1;
XgraResetCursor();
}
else
{
XgraChangeCursorType( XgraUnitEventEditX,
XgraUnitEventEditY,
XgraCountEventEdit,
XgraSaveInputMode );
XgraInputMode = XgraSaveInputMode;
XgraEditMode = XgraSaveEditMode;
XgraPromptMessage = XgraSavePromptMessage;
XgraSaveEditMode = XGRA_EDIT_MEASURE;
XgraSaveInputMode = XGRA_INPUT_HALF_BOX;
XgraSavePromptMessage = XgraPromptEditMeasure;
XgraCountEventZoom = 0;
XgraMaxEventZoom = 0;
}
}
else
{
if ( XgraCountEventEdit != 0 )
{
XgraCountEventEdit = XgraCountEventEdit - 1;
XgraResetCursor();
}
else
{
XgraEditUnselectAll();
XgraChangeCursorType( NULL, NULL, 0,
XGRA_INPUT_HALF_BOX );
XgraInputMode = XGRA_INPUT_HALF_BOX;
XgraEditMode = XGRA_EDIT_MEASURE;
XgraPromptMessage = XgraPromptEditMeasure;
XgraCountEventEdit = 0;
XgraMaxEventEdit = 2;
}
}
XgraPromptMessage();
break;
case XGRA_MOTION :
break;
case XGRA_ENTER : XgraCursorInside = XGRA_TRUE;
XgraDisplayCursor();
break;
case XGRA_KEY_UP : XgraZoomUp();
break;
case XGRA_KEY_DN : XgraZoomDown();
break;
case XGRA_KEY_LEFT : XgraZoomLeft();
break;
case XGRA_KEY_RIGHT : XgraZoomRight();
break;
case XGRA_KEY_MORE : XgraZoomMore();
break;
case XGRA_KEY_LESS : XgraZoomLess();
break;
case XGRA_KEY_FIT : XgraZoomFit();
break;
case XGRA_KEY_REFRESH : XgraZoomRefresh();
break;
case XGRA_KEY_UNZOOM : XgraZoomUndo();
break;
case XGRA_KEY_ZOOM_IN :
XgraChangeEditMode( XGRA_ZOOM_IN, XgraPromptZoomIn );
break;
case XGRA_KEY_CENTER :
XgraChangeEditMode( XGRA_ZOOM_CENTER, XgraPromptZoomCenter );
break;
case XGRA_KEY_PAN :
XgraChangeEditMode( XGRA_ZOOM_PAN, XgraPromptZoomPan );
break;
}
if ( ( OldUnitCursorX != XgraUnitCursorX ) ||
( OldUnitCursorY != XgraUnitCursorY ) )
{
XgraDisplayCoordinates();
XgraDisplayCursor();
}
}
autend();
}
/*------------------------------------------------------------\
| |
| CallbackResize |
| |
\------------------------------------------------------------*/
void CallbackResize( MyWidget, ClientData, CallData )
Widget MyWidget;
XtPointer ClientData;
XmDrawingAreaCallbackStruct *CallData;
{
if ( XgraFirstExpose == XGRA_FALSE )
{
autbegin();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_WATCH_CURSOR );
XgraUndisplayCursor();
XgraResizeGraphicWindow();
XgraRefreshGraphicWindow( 0, 0,
XgraGraphicDx, XgraGraphicDy );
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
XgraDisplayCursor();
autend();
}
}
/*------------------------------------------------------------\
| |
| CallbackExpose |
| |
\------------------------------------------------------------*/
void CallbackExpose( MyWidget, ClientData, CallData )
Widget MyWidget;
XtPointer ClientData;
XmDrawingAreaCallbackStruct *CallData;
{
XExposeEvent *ExposeEvent;
ExposeEvent = (XExposeEvent *)CallData->event;
autbegin();
if ( XgraFirstExpose == XGRA_TRUE )
{
XgraFirstExpose = XGRA_FALSE;
XgraInitializeGraphicWindow();
XgraUndisplayCursor();
XgraLoadConfig( XGRA_FALSE );
if ( XgraFirstFileName != (char *)NULL )
{
XgraDisplayCursor();
XgraFileOpen( XgraFirstFileName );
XgraFirstFileName = (char *)NULL;
}
else
{
XgraChangeTopLevelTitle( (char *)NULL );
XgraRefreshGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraDisplayCursor();
}
XgraEnterPresentPanel();
}
else
{
XgraUndisplayCursor();
XgraRefreshGraphicWindow( ExposeEvent->x, ExposeEvent->y,
ExposeEvent->width, ExposeEvent->height );
XgraDisplayCursor();
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraInitializeEvent |
| |
\------------------------------------------------------------*/
void XgraInitializeEvent()
{
XtActionsRec NewActions;
autbegin();
XtVaSetValues( XgraGraphicWindow,
XmNtranslations,
XtParseTranslationTable( XgraEventArclation ),
NULL
);
NewActions.string = "CallbackEvent";
NewActions.proc = CallbackEvent;
XtAppAddActions( XgraApplication, &NewActions, 1 );
XtAddCallback( XgraGraphicWindow,
XmNresizeCallback,
CallbackResize, NULL );
XtAddCallback( XgraGraphicWindow,
XmNexposeCallback,
CallbackExpose, NULL );
autend();
}

View File

@ -0,0 +1,98 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Event.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_EVENT
# define XGRA_EVENT
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_B1DN 0
# define XGRA_B3DN 1
# define XGRA_MOTION 2
# define XGRA_ENTER 3
# define XGRA_LEAVE 4
# define XGRA_KEY_UP 5
# define XGRA_KEY_DN 6
# define XGRA_KEY_LEFT 7
# define XGRA_KEY_RIGHT 8
# define XGRA_KEY_MORE 9
# define XGRA_KEY_LESS 10
# define XGRA_KEY_FIT 11
# define XGRA_KEY_REFRESH 12
# define XGRA_KEY_UNZOOM 13
# define XGRA_KEY_ZOOM_IN 14
# define XGRA_KEY_CENTER 15
# define XGRA_KEY_PAN 16
# define XGRA_MAX_EVENT_BUFFER 128
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraInitializeEvent();
extern void XgraDisplayEditMeasure();
# endif

View File

@ -0,0 +1,314 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Graphic.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XMX_graphic.h"
# include "XMX_grid.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
Widget XgraGraphicFrame;
Widget XgraGraphicWindow;
Display *XgraGraphicDisplay = (Display *)NULL;
Dimension XgraGraphicDx = 0;
Dimension XgraGraphicDy = 0;
Dimension XgraOldGraphicDx = 0;
Dimension XgraOldGraphicDy = 0;
Pixmap XgraGraphicPixmap = (Pixmap)NULL;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraInitializeGraphicWindow |
| |
\------------------------------------------------------------*/
void XgraInitializeGraphicWindow()
{
autbegin();
XtVaGetValues( XgraGraphicWindow,
XmNwidth, &XgraGraphicDx,
XmNheight, &XgraGraphicDy,
NULL
);
XgraOldGraphicDx = XgraGraphicDx;
XgraOldGraphicDy = XgraGraphicDy;
XgraGraphicPixmap =
XCreatePixmap ( XgraGraphicDisplay,
RootWindowOfScreen( XtScreen ( XgraGraphicWindow ) ),
XgraGraphicDx,
XgraGraphicDy,
DefaultDepthOfScreen ( XtScreen ( XgraGraphicWindow ) )
);
XgraClearGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraInitializeUnitGrid();
XgraSetMouseCursor( XgraGraphicWindow, XGRA_NORMAL_CURSOR );
autend();
}
/*------------------------------------------------------------\
| |
| XgraClearGraphicWindow |
| |
\------------------------------------------------------------*/
void XgraClearGraphicWindow( GraphicX, GraphicY, GraphicDx, GraphicDy )
long GraphicX;
long GraphicY;
long GraphicDx;
long GraphicDy;
{
XFillRectangle( XgraGraphicDisplay,
XgraGraphicPixmap,
XgraBackgroundGC,
GraphicX, GraphicY,
GraphicDx,
GraphicDy );
}
/*------------------------------------------------------------\
| |
| XgraRefreshGraphicWindow |
| |
\------------------------------------------------------------*/
void XgraRefreshGraphicWindow( GraphicX, GraphicY, GraphicDx, GraphicDy )
Dimension GraphicX;
Dimension GraphicY;
Dimension GraphicDx;
Dimension GraphicDy;
{
autbegin();
XgraUndisplayCursor();
XCopyArea( XgraGraphicDisplay,
XgraGraphicPixmap,
XtWindow ( XgraGraphicWindow ),
XgraBackgroundGC,
GraphicX, GraphicY,
GraphicDx, GraphicDy,
GraphicX, GraphicY
);
XgraDisplayUnitGrid( GraphicX, GraphicY,
GraphicX + GraphicDx,
GraphicY + GraphicDy );
XgraUndisplayCursor();
autend();
}
/*------------------------------------------------------------\
| |
| XgraResizeGraphicWindow |
| |
\------------------------------------------------------------*/
void XgraResizeGraphicWindow()
{
Pixmap OldPixmap;
Dimension SourceY;
Dimension TargetY;
Dimension TargetDx;
Dimension TargetDy;
autbegin();
XgraOldGraphicDx = XgraGraphicDx;
XgraOldGraphicDy = XgraGraphicDy;
XtVaGetValues( XgraGraphicWindow,
XmNwidth, &XgraGraphicDx,
XmNheight, &XgraGraphicDy,
NULL
);
if ( ( XgraOldGraphicDx != XgraGraphicDx ) ||
( XgraOldGraphicDy != XgraGraphicDy ) )
{
OldPixmap = XgraGraphicPixmap;
XgraGraphicPixmap =
XCreatePixmap ( XgraGraphicDisplay,
RootWindowOfScreen( XtScreen ( XgraGraphicWindow ) ),
XgraGraphicDx,
XgraGraphicDy,
DefaultDepthOfScreen ( XtScreen ( XgraGraphicWindow ) )
);
XgraClearGraphicWindow( 0, 0, XgraGraphicDx, XgraGraphicDy );
XgraResizeUnitGrid();
if ( XgraOldGraphicDx < XgraGraphicDx )
{
TargetDx = XgraOldGraphicDx;
XgraDisplayFigure( TargetDx, 0,
XgraGraphicDx, XgraGraphicDy );
}
else
{
TargetDx = XgraGraphicDx;
}
if ( XgraOldGraphicDy < XgraGraphicDy )
{
SourceY = 0;
TargetDy = XgraOldGraphicDy;
TargetY = XgraGraphicDy - XgraOldGraphicDy;
XgraDisplayFigure( 0, TargetDy,
TargetDx, XgraGraphicDy );
}
else
{
TargetDy = XgraGraphicDy;
TargetY = 0;
SourceY = XgraOldGraphicDy - XgraGraphicDy;
}
XCopyArea( XgraGraphicDisplay,
OldPixmap,
XgraGraphicPixmap,
XgraBackgroundGC,
0, SourceY,
TargetDx, TargetDy,
0, TargetY
);
XFreePixmap( XgraGraphicDisplay, OldPixmap );
}
autend();
}
/*------------------------------------------------------------\
| |
| XgraInitializeGraphic |
| |
\------------------------------------------------------------*/
void XgraInitializeGraphic()
{
autbegin();
XgraGraphicFrame = XtVaCreateManagedWidget( "XgraGraphicFrame",
xmFrameWidgetClass,
XgraMainForm,
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 );
XgraGraphicWindow = XtVaCreateManagedWidget(
"XgraGraphicWindow",
xmDrawingAreaWidgetClass,
XgraGraphicFrame,
XmNtopAttachment, XmATTACH_FORM,
XmNrightAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,
XmNleftAttachment, XmATTACH_FORM,
XmNbackground, 1,
XmNforeground, 0,
NULL
);
XgraGraphicDisplay = XtDisplay( XgraGraphicWindow );
autend();
}

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 : XGRA |
| |
| File : Graphic.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_GRAPHIC
# define XGRA_GRAPHIC
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraInitializeGraphic();
# endif

View File

@ -0,0 +1,310 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Grid.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XMX.h"
# include "XMX_grid.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Unit Grid |
| |
\------------------------------------------------------------*/
float XgraUnitGridStep;
long XgraUnitGridX;
long XgraUnitGridY;
long XgraUnitGridDx;
long XgraUnitGridDy;
long XgraPixelGridX;
long XgraPixelGridY;
/*------------------------------------------------------------\
| |
| User Unit Grid |
| |
\------------------------------------------------------------*/
long XgraUnitUserGridDx;
long XgraUnitUserGridDy;
char XgraUnitUserGrid;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraInitializeUnitGrid |
| |
\------------------------------------------------------------*/
void XgraInitializeUnitGrid()
{
autbegin();
XgraUnitGridX = XGRA_DEFAULT_GRID_X;
XgraUnitGridY = XGRA_DEFAULT_GRID_Y;
XgraUnitGridDx = XGRA_DEFAULT_GRID_DX;
XgraUnitGridDy = XGRA_DEFAULT_GRID_DY;
XgraUnitUserGridDx = 4;
XgraUnitUserGridDy = 4;
XgraUnitUserGrid = XGRA_FALSE;
XgraComputeUnitGrid();
autend();
}
/*------------------------------------------------------------\
| |
| XgraComputeUnitGrid |
| |
\------------------------------------------------------------*/
void XgraComputeUnitGrid()
{
float StepX;
float StepY;
autbegin();
StepX = (float)(XgraGraphicDx) / (float)(XgraUnitGridDx);
StepY = (float)(XgraGraphicDy) / (float)(XgraUnitGridDy);
if ( StepX < StepY )
{
XgraUnitGridStep = StepX;
XgraUnitGridDy = 1 + ( XgraGraphicDy / StepX );
}
else
{
XgraUnitGridStep = StepY;
XgraUnitGridDx = 1 + ( XgraGraphicDx / StepY );
}
XgraPixelGridX = (float)(XgraUnitGridX) * XgraUnitGridStep;
XgraPixelGridY = (float)(XgraUnitGridY) * XgraUnitGridStep;
autend();
}
/*------------------------------------------------------------\
| |
| XgraResizeUnitGrid |
| |
\------------------------------------------------------------*/
void XgraResizeUnitGrid()
{
autbegin();
XgraUnitGridDx = 1 + ( XgraGraphicDx / XgraUnitGridStep );
XgraUnitGridDy = 1 + ( XgraGraphicDy / XgraUnitGridStep );
autend();
}
/*------------------------------------------------------------\
| |
| XgraDisplayUnitGrid |
| |
\------------------------------------------------------------*/
char XgraDisplayUnitGrid( 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 UnitGrid;
float Check;
autbegin();
if ( XgraUnitGridStep < XGRA_LOWER_GRID_STEP )
{
UnitGrid = 0;
}
else
{
UnitGrid = 1;
}
if ( XgraUnitUserGrid == 1 )
{
if ( XgraUnitUserGridDx > XgraUnitUserGridDy )
{
Check = ( XGRA_LOWER_GRID_STEP * 2 / XgraUnitUserGridDy );
}
else
{
Check = ( XGRA_LOWER_GRID_STEP * 2 / XgraUnitUserGridDy );
}
if ( XgraUnitGridStep < Check ) UserGrid = 0;
else UserGrid = 1;
}
else
{
UserGrid = 0;
}
if ( ( UserGrid == 0 ) &&
( UnitGrid == 0 ) )
{
autend();
return( XGRA_FALSE );
}
MaxGridX = XgraUnitGridX + XgraUnitGridDx;
MaxGridY = XgraUnitGridY + XgraUnitGridDy;
if ( UnitGrid )
{
for ( X = XgraUnitGridX; X < MaxGridX; X = X + 1 )
{
PixelX = ((float)(X) * XgraUnitGridStep);
PixelX = PixelX - XgraPixelGridX;
if ( ( PixelX <= GraphicX2 ) &&
( PixelX >= GraphicX1 ) )
for ( Y = XgraUnitGridY; Y < MaxGridY; Y = Y + 1 )
{
PixelY = ((float)(Y) * XgraUnitGridStep);
PixelY = PixelY - XgraPixelGridY;
PixelY = XgraGraphicDy - PixelY;
if ( ( PixelY <= GraphicY2 ) &&
( PixelY >= GraphicY1 ) )
{
XDrawPoint( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraGridGC,
PixelX, PixelY );
}
}
}
}
if ( UserGrid )
{
Xmin = ( XgraUnitGridX / XgraUnitUserGridDx ) * XgraUnitUserGridDx;
Ymin = ( XgraUnitGridY / XgraUnitUserGridDy ) * XgraUnitUserGridDy;
for ( X = Xmin; X < MaxGridX ; X = X + XgraUnitUserGridDx )
{
PixelX = ((float)(X) * XgraUnitGridStep);
PixelX = PixelX - XgraPixelGridX;
if ( ( PixelX <= GraphicX2 ) &&
( PixelX >= GraphicX1 ) )
for ( Y = Ymin; Y < MaxGridY; Y = Y + XgraUnitUserGridDy )
{
PixelY = ((float)(Y) * XgraUnitGridStep);
PixelY = PixelY - XgraPixelGridY;
PixelY = XgraGraphicDy - PixelY;
if ( ( PixelY <= GraphicY2 ) &&
( PixelY >= GraphicY1 ) )
{
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraGridGC,
PixelX - 2, PixelY,
PixelX + 2, PixelY );
XDrawLine( XgraGraphicDisplay,
XtWindow( XgraGraphicWindow ),
XgraGridGC,
PixelX, PixelY + 2,
PixelX, PixelY - 2 );
}
}
}
}
autend();
return( XGRA_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 : XGRA |
| |
| File : Grid.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_GRID
# define XGRA_GRID
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define XGRA_DEFAULT_GRID_X 0
# define XGRA_DEFAULT_GRID_Y 0
# define XGRA_DEFAULT_GRID_DX 40
# define XGRA_DEFAULT_GRID_DY 40
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,131 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Icon.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XMX_icon.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
static char IconBits[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00, 0x00,
0x00, 0x08, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x87, 0x00, 0x00,
0x00, 0x00, 0x00, 0x88, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x87,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
0x00, 0x00, 0x00, 0x12, 0x40, 0x02, 0x00, 0x00, 0x00, 0x1f, 0x0e, 0x80,
0xc3, 0x07, 0x00, 0xc0, 0x60, 0x0e, 0x80, 0x33, 0x18, 0x00, 0x20, 0x80,
0x1e, 0xc0, 0x0b, 0x20, 0x00, 0x20, 0x80, 0x00, 0x00, 0x08, 0x20, 0x00,
0x10, 0x00, 0x01, 0x00, 0x04, 0x40, 0x00, 0x10, 0x00, 0x01, 0x00, 0x04,
0x40, 0x00, 0x10, 0x00, 0x01, 0x00, 0x04, 0x40, 0x00, 0x10, 0x00, 0x01,
0x00, 0x04, 0x40, 0x00, 0x10, 0x00, 0x01, 0x00, 0x04, 0x40, 0x00, 0x20,
0x80, 0x00, 0x00, 0x08, 0x20, 0x00, 0x20, 0x80, 0x00, 0x00, 0x08, 0x20,
0x00, 0xc0, 0x60, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x1f, 0x00, 0x00,
0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraInitializeIcon |
| |
\------------------------------------------------------------*/
void XgraInitializeIcon()
{
autbegin();
XgraSetIcon( XgraTopLevel,
IconBits, IconWidth, IconHeight );
autend();
}

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 : XGRA |
| |
| File : Icon.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_ICON
# define XGRA_ICON
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
# define IconWidth 50
# define IconHeight 50
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraInitializeIcon();
# endif

View File

@ -0,0 +1,201 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Menu.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| 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 "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMF.h"
# include "XME.h"
# include "XMV.h"
# include "XMT.h"
# include "XMS.h"
# include "XMH.h"
# include "XMX.h"
# include "XMX_menu.h"
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
Widget XgraMenuBar;
XgraMenuItem XgraMainMenu[] =
{
{
"File",
'F',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
XgraFileMenu
}
,
{
"Edit",
'E',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
XgraEditMenu
}
,
{
"View",
'V',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
XgraViewMenu
}
,
{
"Tools",
'T',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
XgraToolsMenu
}
,
{
"Setup",
'S',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
False,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
XgraSetupMenu
}
,
{
"Help",
'H',
NULL,
NULL,
&xmCascadeButtonGadgetClass,
False,
False,
True,
NULL,
(XtPointer)NULL,
(Widget)NULL,
(Widget)NULL,
XgraHelpMenu
}
,
NULL
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraInitializeMenu |
| |
\------------------------------------------------------------*/
void XgraInitializeMenu()
{
autbegin();
XgraMenuBar = XmCreateMenuBar( XgraMainWindow,
"XgraMenuBar", NULL, 0 );
XgraBuildMenus( XgraMenuBar, XgraMainMenu );
XtManageChild( XgraMenuBar );
autend();
}

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 : XGRA |
| |
| File : Menu.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# ifndef XGRA_MENU
# define XGRA_MENU
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern XgraMenuItem XgraMainMenu[];
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern void XgraInitializeMenu();
# endif

View File

@ -0,0 +1,288 @@
/*------------------------------------------------------------\
| |
| 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 : XGRA |
| |
| File : Message.c |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 04.12.96 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <Xm/Xm.h>
# include <Xm/Form.h>
# include <Xm/Frame.h>
# include <Xm/Label.h>
# include <Xm/LabelG.h>
# include <Xm/TextF.h>
# include <Xm/Text.h>
# include "mut.h"
# include "aut.h"
# include "XSB.h"
# include "XTB.h"
# include "XMX.h"
# include "XMX_message.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
Widget XgraMessageMainForm;
Widget XgraMessageText [ XGRA_MAX_MESSAGE ];
Widget XgraMessageLabel [ XGRA_MAX_MESSAGE ];
Widget XgraMessageFrame [ XGRA_MAX_MESSAGE ];
Widget XgraMessageForm [ XGRA_MAX_MESSAGE ];
static char *XgraMessageLabelName [ XGRA_MAX_MESSAGE ] =
{
"X :",
"Y :",
"Dx :",
"Dy :",
NULL,
NULL,
NULL
};
static char *XgraMessageTextName [ XGRA_MAX_MESSAGE ] =
{
"0",
"0",
"0",
"0",
"Measure",
"Select point",
"Enter base point"
};
static char *XgraMessageFormName [ XGRA_MAX_MESSAGE ] =
{
"XgraMessageFormX",
"XgraMessageFormY",
"XgraMessageFormDx",
"XgraMessageFormDy",
"XgraMessageFormMode",
"XgraMessageFormInfo",
"XgraMessageFormPrompt"
};
static char *XgraMessageFrameName [ XGRA_MAX_MESSAGE ] =
{
"XgraMessageFrameX",
"XgraMessageFrameY",
"XgraMessageFrameDx",
"XgraMessageFrameDy",
"XgraMessageFrameMode",
"XgraMessageFrameInfo",
"XgraMessageFramePrompt"
};
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| XgraDisplayMessage |
| |
\------------------------------------------------------------*/
void XgraDisplayMessage( Where, Text )
char Where;
char *Text;
{
XmString TextString;
autbegin();
TextString = XmStringCreateSimple( Text );
XtVaSetValues( XgraMessageText[ Where ], XmNlabelString, TextString, NULL );
XmStringFree( TextString );
autend();
}
/*------------------------------------------------------------\
| |
| XgraPromptEditMeasure |
| |
\------------------------------------------------------------*/
void XgraPromptEditMeasure()
{
autbegin();
XgraDisplayMessage( XGRA_MESSAGE_MODE , "Measure" );
XgraDisplayMessage( XGRA_MESSAGE_PROMPT, "Enter base point" );
XgraDisplayMessage( XGRA_MESSAGE_INFO , "Select point" );
autend();
}
/*------------------------------------------------------------\
| |
| XgraInitializeMessage |
| |
\------------------------------------------------------------*/
void XgraInitializeMessage()
{
int Counter;
int Column;
int Left;
int Width;
autbegin();
XgraMessageMainForm =
XtVaCreateManagedWidget( "XgraMessageMainForm",
xmFormWidgetClass ,
XgraMainForm ,
XmNtopAttachment , XmATTACH_POSITION,
XmNtopPosition , 193,
XmNbottomAttachment , XmATTACH_POSITION,
XmNbottomPosition , 199,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , 0,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 200,
XmNfractionBase , 200,
NULL );
Column = 1;
Width = 17;
for ( Counter = 0; Counter < XGRA_MAX_MESSAGE; Counter++ )
{
if ( Counter == 4 ) Width = 22;
if ( Counter == 5 ) Width = 68;
if ( Counter == 6 ) Width = 40;
XgraMessageFrame[ Counter ] =
XtVaCreateManagedWidget( XgraMessageFrameName[ Counter ],
xmFrameWidgetClass,
XgraMessageMainForm,
XmNshadowType , XmSHADOW_ETCHED_IN,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , Column,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , Column + Width,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
NULL
);
XgraMessageForm[ Counter ] =
XtVaCreateManagedWidget( XgraMessageFormName[ Counter ],
xmFormWidgetClass ,
XgraMessageFrame[ Counter ],
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNfractionBase , 18,
NULL
);
if ( XgraMessageLabelName[ Counter ] != (char *)NULL )
{
XgraMessageLabel [ Counter ] =
XtVaCreateManagedWidget( XgraMessageLabelName[ Counter ],
xmLabelWidgetClass,
XgraMessageForm [ Counter ],
XmNleftAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_POSITION,
XmNrightPosition , 6,
XmNbottomAttachment , XmATTACH_FORM,
XmNtopAttachment , XmATTACH_FORM,
XmNrecomputeSize , False,
NULL
);
Left = 6;
}
else
{
Left = 0;
}
XgraMessageText [ Counter ] =
XtVaCreateManagedWidget( XgraMessageTextName[ Counter ],
xmLabelWidgetClass,
XgraMessageForm [ Counter ],
XmNtopAttachment , XmATTACH_FORM,
XmNbottomAttachment , XmATTACH_FORM,
XmNrightAttachment , XmATTACH_FORM,
XmNleftAttachment , XmATTACH_POSITION,
XmNleftPosition , Left,
XmNrecomputeSize , False,
NULL
);
Column = Column + Width;
}
autend();
}

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