home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-05-26 | 73.8 KB | 2,290 lines |
- Newsgroups: comp.sources.x
- From: envbvs@epb9.lbl.gov (Brian V. Smith)
- Subject: v19i114: xfig - Draw amd manipulate objects in an X-Window, Part02/27
- Message-ID: <1993May21.021225.4829@sparky.imd.sterling.com>
- X-Md4-Signature: e623c7e44416a99c655c9aa7ee78712f
- Sender: chris@sparky.imd.sterling.com (Chris Olson)
- Organization: Sterling Software
- Date: Fri, 21 May 1993 02:12:25 GMT
- Approved: chris@sparky.imd.sterling.com
-
- Submitted-by: envbvs@epb9.lbl.gov (Brian V. Smith)
- Posting-number: Volume 19, Issue 114
- Archive-name: xfig/part02
- Environment: X11
- Supersedes: xfig: Volume 16, Issue 6-30,39
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 2 (of 27)."
- # Contents: Examples/dresser.fig.uu Examples/roundboxes.fig.uu
- # Examples/shades.fig.uu Examples/thermal.fig.uu Imakefile
- # d_arcbox.c d_box.c d_epsobj.c d_regpoly.c d_spline.c e_move.c
- # f_load.c f_util.c fig.icon.X mode.c u_error.c u_translate.c
- # w_cursor.c w_icons.h w_indpanel.h w_setup.c
- # Wrapped by envbvs@epb9.lbl.gov.lbl.gov on Mon May 3 12:05:44 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'Examples/dresser.fig.uu' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Examples/dresser.fig.uu'\"
- else
- echo shar: Extracting \"'Examples/dresser.fig.uu'\" \(2522 characters\)
- sed "s/^X//" >'Examples/dresser.fig.uu' <<'END_OF_FILE'
- Xbegin 444 dresser.fig
- XM(T9)1R`R+C$*.#`@,@HR(#0@,"`Q("TQ(#`@,"`R(#`N,#`P(#,@,"`P"@D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`R,C0@,S0@,S@Y(#,T(#,X.2`W-"`Y.3DY(#DY.3D*
- XM,B`T(#`@,2`M,2`Q(#`@-2`P+C`P,"`S(#`@,`H)(#,X.2`Q,38@,C(T(#$Q
- XM-B`R,C0@-S8@,S@Y(#<V(#,X.2`Q,38@.3DY.2`Y.3DY"C(@-"`P(#$@+3$@
- XM,2`P(#4@,"XP,#`@,R`P(#`*"2`S.#D@,34X(#(R-"`Q-3@@,C(T(#$Q."`S
- XM.#D@,3$X(#,X.2`Q-3@@.3DY.2`Y.3DY"C(@-"`P(#$@+3$@,2`P(#4@,"XP
- XM,#`@,R`P(#`*"2`S.#D@,C`P(#(R-"`R,#`@,C(T(#$V,"`S.#D@,38P(#,X
- XM.2`R,#`@.3DY.2`Y.3DY"C(@-"`P(#$@+3$@,2`P(#4@,"XP,#`@,R`P(#`*
- XM"2`S.#D@,C0R(#(R-"`R-#(@,C(T(#(P,B`S.#D@,C`R(#,X.2`R-#(@.3DY
- X'.2`Y.3DY"C0R
- X`
- Xend
- END_OF_FILE
- if test 2522 -ne `wc -c <'Examples/dresser.fig.uu'`; then
- echo shar: \"'Examples/dresser.fig.uu'\" unpacked with wrong size!
- fi
- # end of 'Examples/dresser.fig.uu'
- fi
- if test -f 'Examples/roundboxes.fig.uu' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Examples/roundboxes.fig.uu'\"
- else
- echo shar: Extracting \"'Examples/roundboxes.fig.uu'\" \(3397 characters\)
- sed "s/^X//" >'Examples/roundboxes.fig.uu' <<'END_OF_FILE'
- Xbegin 444 roundboxes.fig
- XM(T9)1R`R+C$*.#`@,@HR(#0@,"`Q("TQ(#`@,"`R,2`P+C`P,"`R,R`P(#`*
- XM"2`S.2`T-"`S.2`R-3D@-S$Y(#(U.2`W,3D@-#0@,SD@-#0@.3DY.2`Y.3DY
- XM"C(@-"`P(#$@+3$@,"`P(#(P(#`N,#`P(#(R(#`@,`H)(#0Y(#4T(#0Y(#(U
- XM.2`W,#D@,C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`*"2`S-C0@,CDY(#,V-"`T,#D@,SDT(#0P
- XM.2`S.30@,CDY(#,V-"`R.3D@.3DY.2`Y.3DY"C(@-"`P(#$@+3$@,"`P(#`@
- XM,"XP,#`@,3`@,"`P"@D@-#`Y(#0R-"`T,#D@-#4T(#4Q.2`T-30@-3$Y(#0R
- XM-"`T,#D@-#(T(#DY.3D@.3DY.0HR(#0@,"`Q("TQ(#`@,"`P(#`N,#`P(#$P
- XM(#`@,`H)(#,V-"`T-CD@,S8T(#4W.2`S.30@-3<Y(#,Y-"`T-CD@,S8T(#0V
- X,.2`Y.3DY(#DY.3D*
- X`
- Xend
- END_OF_FILE
- if test 3397 -ne `wc -c <'Examples/roundboxes.fig.uu'`; then
- echo shar: \"'Examples/roundboxes.fig.uu'\" unpacked with wrong size!
- fi
- # end of 'Examples/roundboxes.fig.uu'
- fi
- if test -f 'Examples/shades.fig.uu' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Examples/shades.fig.uu'\"
- else
- echo shar: Extracting \"'Examples/shades.fig.uu'\" \(2425 characters\)
- sed "s/^X//" >'Examples/shades.fig.uu' <<'END_OF_FILE'
- Xbegin 444 shades.fig
- XM(T9)1R`R+C$*.#`@,@HR(#(@,"`Q("TQ(#`@,"`R,2`P+C`P,"`P(#`@,`H)
- XM(#$P-R`W.2`W.2`W.2`W.2`R,SD@,3`W(#(S.2`Q,#<@-SD@.3DY.2`Y.3DY
- XM"C(@,B`P(#$@+3$@,"`P(#(P(#`N,#`P(#`@,"`P"@D@,3`W(#<Y(#$S-2`W
- XM.2`Q,S4@,C,Y(#$P-R`R,SD@,3`W(#<Y(#DY.3D@.3DY.0HR(#(@,"`Q("TQ
- XM(#`@,"`Q.2`P+C`P,"`P(#`@,`H)(#$V,B`W.2`Q,S4@-SD@,3,U(#(S.2`Q
- XM-C(@,C,Y(#$V,B`W.2`Y.3DY(#DY.3D*,B`R(#`@,2`M,2`P(#`@,3@@,"XP
- XM,#`@,"`P(#`*"2`Q-C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`@,`H)(#8U,B`W.2`V-SD@-SD@-C<Y
- X>(#(S.2`V-3(@,C,Y(#8U,B`W.2`Y.3DY(#DY.3D*
- X`
- Xend
- END_OF_FILE
- if test 2425 -ne `wc -c <'Examples/shades.fig.uu'`; then
- echo shar: \"'Examples/shades.fig.uu'\" unpacked with wrong size!
- fi
- # end of 'Examples/shades.fig.uu'
- fi
- if test -f 'Examples/thermal.fig.uu' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Examples/thermal.fig.uu'\"
- else
- echo shar: Extracting \"'Examples/thermal.fig.uu'\" \(3088 characters\)
- sed "s/^X//" >'Examples/thermal.fig.uu' <<'END_OF_FILE'
- Xbegin 444 thermal.fig
- XM(T9)1R`R+C$*.#`@,@HQ(#,@,"`Q("TQ(#`@,"`R,2`P+C`P,"`Q(#`N,#`P
- XM(#,T-"`Q-CD@-2`U(#,T-"`Q-CD@,S0Y(#$V.0HQ(#,@,"`Q("TQ(#`@,"`R
- XM,2`P+C`P,"`Q(#`N,#`P(#$P-"`Q-CD@-2`U(#$P-"`Q-CD@,3`Y(#$V.0HQ
- XM(#,@,"`Q("TQ(#`@,"`R,2`P+C`P,"`Q(#`N,#`P(#(V-"`X.2`U(#4@,C8T
- XM(#@Y(#(V.2`X.0HQ(#,@,"`Q("TQ(#`@,"`R,2`P+C`P,"`Q(#`N,#`P(#$X
- XM-"`X.2`U(#4@,3@T(#@Y(#$X.2`X.0HQ(#,@,"`Q("TQ(#`@,"`P(#`N,#`P
- XM(#$@,"XP,#`@,C8T(#$V.2`U(#4@,C8T(#$V.2`R-CD@,38Y"C$@,R`P(#$@
- XM+3$@,"`P(#`@,"XP,#`@,2`P+C`P,"`Q.#0@,38Y(#4@-2`Q.#0@,38Y(#$X
- XM.2`Q-CD*,B`Q(#$@,2`M,2`P(#`@,"`P+C`P,"`P(#`@,`H)(#(R-"`Q,CD@
- XM,S`T(#$R.2`S,#0@,C`Y(#DY.3D@.3DY.0HR(#$@,"`Q("TQ(#`@,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*-"`P(#`@,3(@,"`M
- XM,2`P(#`N,#`P(#0@.2`W(#$W.2`V.2!0`0HT(#`@,"`Q,B`P("TQ(#`@,"XP
- XM,#`@-"`Y(#8@,3@T(#<T(#(!"C0@,"`P(#$R(#`@+3$@,"`P+C`P,"`T(#D@
- XM-B`R-C0@-S0@-`$*-"`P(#`@,3(@,"`M,2`P(#`N,#`P(#0@.2`W(#(U.2`V
- XM.2!0`0HT(#`@,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#8@,S0T(#$U-"`U`0HT
- XM(#`@,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#<@,S,Y(#$T.2!0`0HT(#`@,"`Q
- XM,B`P("TQ(#`@,"XP,#`@-"`Y(#8@,C8V(#$Y-2!B`0HT(#`@,"`Q,B`P("TQ
- XM(#`@,"XP,#`@-"`Y(#<@,C4Y(#$X.2!0`0HT(#`@,"`Q,B`P("TQ(#`@,"XP
- XM,#`@-"`V(#8@,3@U(#$Y-2!A`0HT(#`@,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y
- X.(#<@,3<Y(#$X.2!0`0HY
- X`
- Xend
- END_OF_FILE
- if test 3088 -ne `wc -c <'Examples/thermal.fig.uu'`; then
- echo shar: \"'Examples/thermal.fig.uu'\" unpacked with wrong size!
- fi
- # end of 'Examples/thermal.fig.uu'
- fi
- if test -f 'Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Imakefile'\"
- else
- echo shar: Extracting \"'Imakefile'\" \(3259 characters\)
- sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
- X#ifdef InstallManPage
- X#undef InstallManPage
- X#endif
- X#define InstallManPage(file,dest) @@\
- XInstallManPageLong(Doc/file,dest,file)
- X
- X# Uncomment the following if needed for DECstations running older X11R4
- X#INCROOT=/usr/include/mit
- X
- XSYS_LIBRARIES= -lm
- XDEPLIBS = XawClientDepLibs
- X# use the following if NOT using DPS
- XLOCAL_LIBRARIES = XawClientLibs
- X# use the following if using DPS, *** and add -DDPS to the DEFINES line ***
- X#LOCAL_LIBRARIES = -ldps XawClientLibs
- X# use (and change) the following if you want the multi-key data base file
- X# somewhere other than the standard X11 library directory
- X#XFIGLIBDIR = /usr/local/lib/X11/xfig
- X# use this if you want the multi-key data base file in the standard X11 tree
- XXFIGLIBDIR = $(LIBDIR)/xfig
- XDIR_DEFS= -DXFIGLIBDIR=\"$(XFIGLIBDIR)\"
- X#if (defined(VaxArchitecture) && !defined(UltrixArchitecture)) || \
- X (defined(RtArchitecture) && !defined(AIXArchitecture)) || \
- X defined(titan) || \
- X (defined(SunOSPlatform) && (OSMinorVersion==0))
- XSTRSTRDEFINES = -DNOSTRSTR
- X#endif
- X# remove -DGSBIT from the DEFINES if you DON'T want to have gs (ghostscript)
- X# generate a preview bitmap. If you do use ghostscript you will need
- X# version 2.4 or later.
- XDEFINES = $(STRSTRDEFINES) -DGSBIT
- X
- XXFIGSRC = d_arc.c d_arcbox.c d_box.c d_ellipse.c d_epsobj.c \
- X d_intspline.c d_line.c d_regpoly.c d_spline.c d_text.c \
- X e_addpt.c e_align.c e_arrow.c e_break.c \
- X e_convert.c e_copy.c e_delete.c e_deletept.c \
- X e_edit.c e_flip.c e_glue.c e_move.c \
- X e_movept.c e_rotate.c e_scale.c e_update.c \
- X f_load.c f_read.c f_epsobj.c \
- X f_readold.c f_save.c f_util.c f_xbitmap.c \
- X main.c mode.c object.c resources.c \
- X u_bound.c u_create.c u_drag.c u_draw.c \
- X u_elastic.c u_error.c u_fonts.c u_free.c u_geom.c \
- X u_list.c u_markers.c u_pan.c u_print.c \
- X u_redraw.c u_search.c u_translate.c u_undo.c \
- X w_canvas.c w_cmdpanel.c w_cursor.c w_dir.c w_drawprim.c \
- X w_export.c w_file.c w_fontbits.c w_fontpanel.c w_grid.c \
- X w_icons.c w_indpanel.c w_modepanel.c w_mousefun.c w_msgpanel.c \
- X w_print.c w_rottext.c w_rulers.c w_setup.c w_util.c w_zoom.c
- X
- XXFIGOBJ = d_arc.o d_arcbox.o d_box.o d_ellipse.o d_epsobj.o \
- X d_intspline.o d_line.o d_regpoly.o d_spline.o d_text.o \
- X e_addpt.o e_align.o e_arrow.o e_break.o \
- X e_convert.o e_copy.o e_delete.o e_deletept.o \
- X e_edit.o e_flip.o e_glue.o e_move.o \
- X e_movept.o e_rotate.o e_scale.o e_update.o \
- X f_load.o f_read.o f_epsobj.o \
- X f_readold.o f_save.o f_util.o f_xbitmap.o \
- X main.o mode.o object.o resources.o \
- X u_bound.o u_create.o u_drag.o u_draw.o \
- X u_elastic.o u_error.o u_fonts.o u_free.o u_geom.o \
- X u_list.o u_markers.o u_pan.o u_print.o \
- X u_redraw.o u_search.o u_translate.o u_undo.o \
- X w_canvas.o w_cmdpanel.o w_cursor.o w_dir.o w_drawprim.o \
- X w_export.o w_file.o w_fontbits.o w_fontpanel.o w_grid.o \
- X w_icons.o w_indpanel.o w_modepanel.o w_mousefun.o w_msgpanel.o \
- X w_print.o w_rottext.o w_rulers.o w_setup.o w_util.o w_zoom.o
- X
- XSRCS = $(XFIGSRC)
- XOBJS = $(XFIGOBJ)
- X
- XComplexProgramTarget(xfig)
- XMakeDirectories(install,$(XFIGLIBDIR))
- XInstallNonExec(CompKeyDB,$(XFIGLIBDIR))
- XInstallAppDefaults(Fig)
- XInstallAppDefaults(Fig-color)
- XSpecialObjectRule(w_canvas.o, $(ICONFIGFILES), $(DIR_DEFS))
- END_OF_FILE
- if test 3259 -ne `wc -c <'Imakefile'`; then
- echo shar: \"'Imakefile'\" unpacked with wrong size!
- fi
- # end of 'Imakefile'
- fi
- if test -f 'd_arcbox.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'d_arcbox.c'\"
- else
- echo shar: Extracting \"'d_arcbox.c'\" \(2849 characters\)
- sed "s/^X//" >'d_arcbox.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "resources.h"
- X#include "mode.h"
- X#include "object.h"
- X#include "paintop.h"
- X#include "u_create.h"
- X#include "u_elastic.h"
- X#include "u_list.h"
- X#include "w_canvas.h"
- X#include "w_mousefun.h"
- X
- X/*************************** local procedures *********************/
- X
- Xstatic int create_arc_boxobject(), cancel_arc_boxobject();
- Xstatic int init_arc_box_drawing();
- X
- Xarcbox_drawing_selected()
- X{
- X set_mousefun("corner point", "", "");
- X canvas_kbd_proc = null_proc;
- X canvas_locmove_proc = null_proc;
- X canvas_leftbut_proc = init_arc_box_drawing;
- X canvas_middlebut_proc = null_proc;
- X canvas_rightbut_proc = null_proc;
- X set_cursor(arrow_cursor);
- X reset_action_on();
- X}
- X
- Xstatic
- Xinit_arc_box_drawing(x, y)
- X int x, y;
- X{
- X cur_x = fix_x = x;
- X cur_y = fix_y = y;
- X set_mousefun("final point", "", "cancel");
- X draw_mousefun_canvas();
- X canvas_locmove_proc = resizing_box;
- X canvas_leftbut_proc = create_arc_boxobject;
- X canvas_middlebut_proc = null_proc;
- X canvas_rightbut_proc = cancel_arc_boxobject;
- X elastic_box(fix_x, fix_y, cur_x, cur_y);
- X set_temp_cursor(null_cursor);
- X set_action_on();
- X}
- X
- Xstatic
- Xcancel_arc_boxobject()
- X{
- X elastic_box(fix_x, fix_y, cur_x, cur_y);
- X arcbox_drawing_selected();
- X draw_mousefun_canvas();
- X}
- X
- Xstatic
- Xcreate_arc_boxobject(x, y)
- X int x, y;
- X{
- X F_line *box;
- X F_point *point;
- X
- X elastic_box(fix_x, fix_y, cur_x, cur_y);
- X
- X if ((point = create_point()) == NULL)
- X return;
- X
- X point->x = x;
- X point->y = y;
- X point->next = NULL;
- X
- X if ((box = create_line()) == NULL) {
- X free((char *) point);
- X return;
- X }
- X box->type = T_ARC_BOX;
- X box->style = cur_linestyle;
- X box->thickness = cur_linewidth;
- X box->color = cur_color;
- X box->depth = cur_depth;
- X box->pen = 0;
- X box->fill_style = cur_fillstyle;
- X /* multiply dash length by line thickness */
- X box->style_val = cur_styleval * (cur_linewidth + 1) / 2;
- X box->radius = cur_boxradius;/* corner radius */
- X box->points = point;
- X append_point(x, fix_y, &point);
- X append_point(fix_x, fix_y, &point);
- X append_point(fix_x, y, &point);
- X append_point(x, y, &point);
- X draw_line(box, PAINT);
- X add_line(box);
- X arcbox_drawing_selected();
- X draw_mousefun_canvas();
- X}
- END_OF_FILE
- if test 2849 -ne `wc -c <'d_arcbox.c'`; then
- echo shar: \"'d_arcbox.c'\" unpacked with wrong size!
- fi
- # end of 'd_arcbox.c'
- fi
- if test -f 'd_box.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'d_box.c'\"
- else
- echo shar: Extracting \"'d_box.c'\" \(2733 characters\)
- sed "s/^X//" >'d_box.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "resources.h"
- X#include "mode.h"
- X#include "object.h"
- X#include "paintop.h"
- X#include "u_create.h"
- X#include "u_elastic.h"
- X#include "u_list.h"
- X#include "w_canvas.h"
- X#include "w_mousefun.h"
- X
- X/*************************** local declarations *********************/
- X
- Xint init_box_drawing();
- Xstatic create_boxobject(), cancel_box();
- X
- Xbox_drawing_selected()
- X{
- X set_mousefun("corner point", "", "");
- X canvas_kbd_proc = null_proc;
- X canvas_locmove_proc = null_proc;
- X canvas_leftbut_proc = init_box_drawing;
- X canvas_middlebut_proc = null_proc;
- X canvas_rightbut_proc = null_proc;
- X set_cursor(arrow_cursor);
- X reset_action_on();
- X}
- X
- Xinit_box_drawing(x, y)
- X int x, y;
- X{
- X cur_x = fix_x = x;
- X cur_y = fix_y = y;
- X set_mousefun("final point", "", "cancel");
- X draw_mousefun_canvas();
- X canvas_locmove_proc = resizing_box;
- X canvas_leftbut_proc = create_boxobject;
- X canvas_middlebut_proc = null_proc;
- X canvas_rightbut_proc = cancel_box;
- X elastic_box(fix_x, fix_y, cur_x, cur_y);
- X set_temp_cursor(null_cursor);
- X set_action_on();
- X}
- X
- Xstatic
- Xcancel_box()
- X{
- X elastic_box(fix_x, fix_y, cur_x, cur_y);
- X box_drawing_selected();
- X draw_mousefun_canvas();
- X}
- X
- Xstatic
- Xcreate_boxobject(x, y)
- X int x, y;
- X{
- X F_line *box;
- X F_point *point;
- X
- X elastic_box(fix_x, fix_y, cur_x, cur_y);
- X
- X if ((point = create_point()) == NULL)
- X return;
- X
- X point->x = x;
- X point->y = y;
- X point->next = NULL;
- X
- X if ((box = create_line()) == NULL) {
- X free((char *) point);
- X return;
- X }
- X box->type = T_BOX;
- X box->style = cur_linestyle;
- X box->thickness = cur_linewidth;
- X box->color = cur_color;
- X box->depth = cur_depth;
- X box->pen = 0;
- X box->fill_style = cur_fillstyle;
- X /* scale dash length by line thickness */
- X box->style_val = cur_styleval * (cur_linewidth + 1) / 2;
- X box->radius = 0;
- X box->points = point;
- X append_point(x, fix_y, &point);
- X append_point(fix_x, fix_y, &point);
- X append_point(fix_x, y, &point);
- X append_point(x, y, &point);
- X draw_line(box, PAINT);
- X add_line(box);
- X box_drawing_selected();
- X draw_mousefun_canvas();
- X}
- END_OF_FILE
- if test 2733 -ne `wc -c <'d_box.c'`; then
- echo shar: \"'d_box.c'\" unpacked with wrong size!
- fi
- # end of 'd_box.c'
- fi
- if test -f 'd_epsobj.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'d_epsobj.c'\"
- else
- echo shar: Extracting \"'d_epsobj.c'\" \(2918 characters\)
- sed "s/^X//" >'d_epsobj.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "resources.h"
- X#include "mode.h"
- X#include "object.h"
- X#include "paintop.h"
- X#include "u_create.h"
- X#include "u_elastic.h"
- X#include "u_list.h"
- X#include "w_canvas.h"
- X#include "w_mousefun.h"
- X
- X/*************************** local declarations *********************/
- X
- Xstatic
- X init_epsobj_drawing(), create_epsobj(),
- X cancel_epsobj();
- X
- Xepsobj_drawing_selected()
- X{
- X set_mousefun("corner point", "", "");
- X canvas_kbd_proc = null_proc;
- X canvas_locmove_proc = null_proc;
- X canvas_leftbut_proc = init_epsobj_drawing;
- X canvas_middlebut_proc = null_proc;
- X canvas_rightbut_proc = null_proc;
- X set_cursor(arrow_cursor);
- X reset_action_on();
- X}
- X
- Xstatic
- Xinit_epsobj_drawing(x, y)
- X int x, y;
- X{
- X init_box_drawing(x, y);
- X canvas_leftbut_proc = create_epsobj;
- X canvas_rightbut_proc = cancel_epsobj;
- X}
- X
- Xstatic
- Xcancel_epsobj()
- X{
- X elastic_box(fix_x, fix_y, cur_x, cur_y);
- X epsobj_drawing_selected();
- X draw_mousefun_canvas();
- X}
- X
- Xstatic
- Xcreate_epsobj(x, y)
- X int x, y;
- X{
- X F_line *box;
- X F_point *point;
- X
- X elastic_box(fix_x, fix_y, cur_x, cur_y);
- X
- X if ((point = create_point()) == NULL)
- X return;
- X
- X point->x = fix_x;
- X point->y = fix_y;
- X point->next = NULL;
- X
- X if ((box = create_line()) == NULL) {
- X free((char *) point);
- X return;
- X }
- X box->type = T_EPS_BOX;
- X box->style = SOLID_LINE;
- X box->thickness = 1;
- X box->color = cur_color;
- X box->depth = cur_depth;
- X box->pen = 0;
- X box->fill_style = 0;
- X box->style_val = 0;
- X box->radius = 0;
- X
- X if ((box->eps = create_eps()) == NULL) {
- X free((char *) point);
- X free((char *) box);
- X return;
- X }
- X box->eps->file[0] = '\0';
- X box->eps->bitmap = NULL;
- X box->eps->bit_size.x = 0;
- X box->eps->bit_size.y = 0;
- X box->eps->flipped = 0;
- X box->eps->hw_ratio = 0.0;
- X box->eps->pixmap = 0;
- X box->eps->pix_width = 0;
- X box->eps->pix_height = 0;
- X box->eps->pix_rotation = 0;
- X box->eps->pix_flipped = 0;
- X
- X box->points = point;
- X append_point(fix_x, y, &point);
- X append_point(x, y, &point);
- X append_point(x, fix_y, &point);
- X append_point(fix_x, fix_y, &point);
- X draw_line(box, PAINT);
- X add_line(box);
- X put_msg("Please enter name of EPS file in EDIT window");
- X edit_item((char *) box, O_POLYLINE);
- X epsobj_drawing_selected();
- X draw_mousefun_canvas();
- X}
- END_OF_FILE
- if test 2918 -ne `wc -c <'d_epsobj.c'`; then
- echo shar: \"'d_epsobj.c'\" unpacked with wrong size!
- fi
- # end of 'd_epsobj.c'
- fi
- if test -f 'd_regpoly.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'d_regpoly.c'\"
- else
- echo shar: Extracting \"'d_regpoly.c'\" \(3401 characters\)
- sed "s/^X//" >'d_regpoly.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "resources.h"
- X#include "mode.h"
- X#include "object.h"
- X#include "paintop.h"
- X#include "u_create.h"
- X#include "u_elastic.h"
- X#include "u_list.h"
- X#include "w_canvas.h"
- X#include "w_mousefun.h"
- X
- Xextern float compute_angle();
- X
- X/*************************** local declarations *********************/
- X
- Xstatic init_regpoly_drawing(), create_regpoly(), cancel_regpoly();
- X
- Xregpoly_drawing_selected()
- X{
- X set_mousefun("center point", "", "");
- X canvas_kbd_proc = null_proc;
- X canvas_locmove_proc = null_proc;
- X canvas_leftbut_proc = init_regpoly_drawing;
- X canvas_middlebut_proc = null_proc;
- X canvas_rightbut_proc = null_proc;
- X set_cursor(arrow_cursor);
- X reset_action_on();
- X}
- X
- Xstatic
- Xinit_regpoly_drawing(x, y)
- X int x, y;
- X{
- X cur_x = fix_x = x;
- X cur_y = fix_y = y;
- X work_numsides = cur_numsides;
- X set_mousefun("final point", "", "cancel");
- X draw_mousefun_canvas();
- X canvas_locmove_proc = resizing_poly;
- X canvas_leftbut_proc = create_regpoly;
- X canvas_middlebut_proc = null_proc;
- X canvas_rightbut_proc = cancel_regpoly;
- X elastic_poly(fix_x, fix_y, cur_x, cur_y, work_numsides);
- X set_temp_cursor(null_cursor);
- X set_action_on();
- X}
- X
- Xstatic
- Xcancel_regpoly()
- X{
- X elastic_poly(fix_x, fix_y, cur_x, cur_y, work_numsides);
- X regpoly_drawing_selected();
- X draw_mousefun_canvas();
- X}
- X
- Xstatic
- Xcreate_regpoly(x, y)
- X int x, y;
- X{
- X register float angle;
- X register int nx, ny, dx, dy, i;
- X float init_angle, mag;
- X F_line *poly;
- X F_point *point;
- X
- X elastic_poly(fix_x, fix_y, cur_x, cur_y, work_numsides);
- X if (fix_x == x && fix_y == y)
- X return; /* 0 size */
- X
- X if ((point = create_point()) == NULL)
- X return;
- X
- X point->x = x;
- X point->y = y;
- X point->next = NULL;
- X
- X if ((poly = create_line()) == NULL) {
- X free((char *) point);
- X return;
- X }
- X poly->type = T_POLYGON;
- X poly->style = cur_linestyle;
- X poly->thickness = cur_linewidth;
- X poly->color = cur_color;
- X poly->depth = cur_depth;
- X poly->pen = 0;
- X poly->fill_style = cur_fillstyle;
- X /* scale dash length by line thickness */
- X poly->style_val = cur_styleval * (cur_linewidth + 1) / 2;
- X poly->radius = 0;
- X poly->points = point;
- X
- X dx = x - fix_x;
- X dy = y - fix_y;
- X mag = sqrt((double) (dx * dx + dy * dy));
- X init_angle = compute_angle((float) dx, (float) dy);
- X
- X /* now append cur_numsides points */
- X for (i = 1; i < cur_numsides; i++) {
- X angle = init_angle - M_2PI * (float) i / (float) cur_numsides;
- X if (angle < 0)
- X angle += M_2PI;
- X nx = fix_x + round(mag * cos((double) angle));
- X ny = fix_y + round(mag * sin((double) angle));
- X append_point(nx, ny, &point);
- X }
- X append_point(x, y, &point);
- X
- X draw_line(poly, PAINT);
- X add_line(poly);
- X regpoly_drawing_selected();
- X draw_mousefun_canvas();
- X}
- END_OF_FILE
- if test 3401 -ne `wc -c <'d_regpoly.c'`; then
- echo shar: \"'d_regpoly.c'\" unpacked with wrong size!
- fi
- # end of 'd_regpoly.c'
- fi
- if test -f 'd_spline.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'d_spline.c'\"
- else
- echo shar: Extracting \"'d_spline.c'\" \(3213 characters\)
- sed "s/^X//" >'d_spline.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "resources.h"
- X#include "mode.h"
- X#include "object.h"
- X#include "paintop.h"
- X#include "u_create.h"
- X#include "u_elastic.h"
- X#include "u_list.h"
- X#include "w_canvas.h"
- X#include "w_mousefun.h"
- X
- Xstatic int create_splineobject();
- Xstatic int init_spline_drawing();
- X
- Xspline_drawing_selected()
- X{
- X set_mousefun("first point", "", "");
- X canvas_kbd_proc = null_proc;
- X canvas_locmove_proc = null_proc;
- X canvas_leftbut_proc = init_spline_drawing;
- X canvas_middlebut_proc = null_proc;
- X canvas_rightbut_proc = null_proc;
- X set_cursor(arrow_cursor);
- X reset_action_on();
- X}
- X
- Xstatic
- Xinit_spline_drawing(x, y)
- X int x, y;
- X{
- X if (cur_mode == F_CLOSED_SPLINE) {
- X min_num_points = 3;
- X init_trace_drawing(x, y);
- X canvas_middlebut_save = create_splineobject;
- X } else {
- X min_num_points = 2;
- X init_trace_drawing(x, y);
- X canvas_middlebut_proc = create_splineobject;
- X }
- X return_proc = spline_drawing_selected;
- X}
- X
- Xstatic
- Xcreate_splineobject(x, y)
- X int x, y;
- X{
- X F_spline *spline;
- X
- X if (x != fix_x || y != fix_y || num_point < min_num_points) {
- X get_intermediatepoint(x, y);
- X }
- X elastic_line();
- X if ((spline = create_spline()) == NULL)
- X return;
- X
- X spline->style = cur_linestyle;
- X spline->thickness = cur_linewidth;
- X spline->style_val = cur_styleval * (cur_linewidth + 1) / 2;
- X spline->color = cur_color;
- X spline->depth = cur_depth;
- X spline->pen = 0;
- X spline->fill_style = cur_fillstyle;
- X /*
- X * The current fill style is saved in all spline objects (but support for
- X * filling may not be available in all fig2dev languages).
- X */
- X spline->points = first_point;
- X spline->controls = NULL;
- X spline->next = NULL;
- X /* initialise for no arrows - updated below if necessary */
- X spline->for_arrow = NULL;
- X spline->back_arrow = NULL;
- X cur_x = cur_y = fix_x = fix_y = 0; /* used in elastic_moveline */
- X elastic_moveline(spline->points); /* erase control vector */
- X if (cur_mode == F_CLOSED_SPLINE) {
- X spline->type = T_CLOSED_NORMAL;
- X num_point++;
- X append_point(first_point->x, first_point->y, &cur_point);
- X draw_closed_spline(spline, PAINT);
- X } else { /* It must be F_SPLINE */
- X if (autoforwardarrow_mode)
- X spline->for_arrow = forward_arrow();
- X if (autobackwardarrow_mode)
- X spline->back_arrow = backward_arrow();
- X spline->type = T_OPEN_NORMAL;
- X draw_open_spline(spline, PAINT);
- X }
- X if (appres.DEBUG) {
- X int xmin, ymin, xmax, ymax;
- X
- X spline_bound(spline, &xmin, &ymin, &xmax, &ymax);
- X elastic_box(xmin, ymin, xmax, ymax);
- X }
- X add_spline(spline);
- X spline_drawing_selected();
- X draw_mousefun_canvas();
- X}
- END_OF_FILE
- if test 3213 -ne `wc -c <'d_spline.c'`; then
- echo shar: \"'d_spline.c'\" unpacked with wrong size!
- fi
- # end of 'd_spline.c'
- fi
- if test -f 'e_move.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'e_move.c'\"
- else
- echo shar: Extracting \"'e_move.c'\" \(3428 characters\)
- sed "s/^X//" >'e_move.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "resources.h"
- X#include "object.h"
- X#include "paintop.h"
- X#include "u_draw.h"
- X#include "u_elastic.h"
- X#include "u_list.h"
- X#include "u_search.h"
- X#include "w_canvas.h"
- X#include "w_mousefun.h"
- X
- Xstatic init_move(), init_arb_move(), init_constrained_move();
- X
- Xmove_selected()
- X{
- X set_mousefun("move object", "horiz/vert move", "");
- X canvas_kbd_proc = null_proc;
- X canvas_locmove_proc = null_proc;
- X init_searchproc_left(init_arb_move);
- X init_searchproc_middle(init_constrained_move);
- X canvas_leftbut_proc = object_search_left;
- X canvas_middlebut_proc = object_search_middle;
- X canvas_rightbut_proc = null_proc;
- X return_proc = move_selected;
- X set_cursor(pick9_cursor);
- X reset_action_on();
- X}
- X
- Xstatic
- Xinit_arb_move(p, type, x, y, px, py)
- X char *p;
- X int type;
- X int x, y, px, py;
- X{
- X constrained = MOVE_ARB;
- X init_move(p, type, x, y, px, py);
- X canvas_middlebut_proc = null_proc;
- X set_mousefun("place object", "", "cancel");
- X draw_mousefun_canvas();
- X}
- X
- Xstatic
- Xinit_constrained_move(p, type, x, y, px, py)
- X char *p;
- X int type;
- X int x, y, px, py;
- X{
- X constrained = MOVE_HORIZ_VERT;
- X init_move(p, type, x, y, px, py);
- X canvas_middlebut_proc = canvas_leftbut_proc;
- X canvas_leftbut_proc = null_proc;
- X set_mousefun("", "place object", "cancel");
- X draw_mousefun_canvas();
- X}
- X
- Xstatic
- Xinit_move(p, type, x, y, px, py)
- X char *p;
- X int type;
- X int x, y, px, py;
- X{
- X switch (type) {
- X case O_COMPOUND:
- X set_temp_cursor(wait_cursor);
- X cur_c = (F_compound *) p;
- X list_delete_compound(&objects.compounds, cur_c);
- X redisplay_compound(cur_c);
- X set_temp_cursor(null_cursor);
- X init_compounddragging(cur_c, px, py);
- X break;
- X case O_POLYLINE:
- X set_temp_cursor(wait_cursor);
- X cur_l = (F_line *) p;
- X list_delete_line(&objects.lines, cur_l);
- X redisplay_line(cur_l);
- X set_temp_cursor(null_cursor);
- X init_linedragging(cur_l, px, py);
- X break;
- X case O_TEXT:
- X set_temp_cursor(wait_cursor);
- X cur_t = (F_text *) p;
- X list_delete_text(&objects.texts, cur_t);
- X redisplay_text(cur_t);
- X set_temp_cursor(null_cursor);
- X init_textdragging(cur_t, x, y);
- X break;
- X case O_ELLIPSE:
- X set_temp_cursor(wait_cursor);
- X cur_e = (F_ellipse *) p;
- X list_delete_ellipse(&objects.ellipses, cur_e);
- X redisplay_ellipse(cur_e);
- X set_temp_cursor(null_cursor);
- X init_ellipsedragging(cur_e, px, py);
- X break;
- X case O_ARC:
- X set_temp_cursor(wait_cursor);
- X cur_a = (F_arc *) p;
- X list_delete_arc(&objects.arcs, cur_a);
- X redisplay_arc(cur_a);
- X set_temp_cursor(null_cursor);
- X init_arcdragging(cur_a, px, py);
- X break;
- X case O_SPLINE:
- X set_temp_cursor(wait_cursor);
- X cur_s = (F_spline *) p;
- X list_delete_spline(&objects.splines, cur_s);
- X redisplay_spline(cur_s);
- X set_temp_cursor(null_cursor);
- X init_splinedragging(cur_s, px, py);
- X break;
- X default:
- X return;
- X }
- X}
- END_OF_FILE
- if test 3428 -ne `wc -c <'e_move.c'`; then
- echo shar: \"'e_move.c'\" unpacked with wrong size!
- fi
- # end of 'e_move.c'
- fi
- if test -f 'f_load.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'f_load.c'\"
- else
- echo shar: Extracting \"'f_load.c'\" \(2557 characters\)
- sed "s/^X//" >'f_load.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "resources.h"
- X#include "mode.h"
- X#include "object.h"
- X#include "u_undo.h"
- X#include "w_setup.h"
- X
- Xextern int num_object;
- X
- Xint
- Xload_file(file)
- X char *file;
- X{
- X int s;
- X F_compound c;
- X
- X c.arcs = NULL;
- X c.compounds = NULL;
- X c.ellipses = NULL;
- X c.lines = NULL;
- X c.splines = NULL;
- X c.texts = NULL;
- X c.next = NULL;
- X set_temp_cursor(wait_cursor);
- X s = read_fig(file, &c);
- X if (s == 0) { /* Successful read */
- X clean_up();
- X (void) strcpy(save_filename, cur_filename);
- X update_cur_filename(file);
- X saved_objects = objects;
- X objects = c;
- X redisplay_canvas();
- X put_msg("Current figure \"%s\" (%d objects)", file, num_object);
- X set_action(F_LOAD);
- X reset_cursor();
- X reset_modifiedflag();
- X return (0);
- X } else if (s == ENOENT) {
- X clean_up();
- X saved_objects = objects;
- X objects = c;
- X redisplay_canvas();
- X put_msg("Current figure \"%s\" (new file)", file);
- X (void) strcpy(save_filename, cur_filename);
- X update_cur_filename(file);
- X set_action(F_LOAD);
- X reset_cursor();
- X reset_modifiedflag();
- X return (0);
- X }
- X read_fail_message(file, s);
- X reset_modifiedflag();
- X reset_cursor();
- X return (1);
- X}
- X
- Xint
- Xmerge_file(file)
- X char *file;
- X{
- X F_compound c;
- X int s;
- X
- X c.arcs = NULL;
- X c.compounds = NULL;
- X c.ellipses = NULL;
- X c.lines = NULL;
- X c.splines = NULL;
- X c.texts = NULL;
- X c.next = NULL;
- X set_temp_cursor(wait_cursor);
- X
- X s = read_fig(file, &c);
- X if (s == 0) { /* Successful read */
- X int xmin, ymin, xmax, ymax;
- X
- X compound_bound(&c, &xmin, &ymin, &xmax, &ymax);
- X clean_up();
- X saved_objects = c;
- X tail(&objects, &object_tails);
- X append_objects(&objects, &saved_objects, &object_tails);
- X redisplay_zoomed_region(xmin, ymin, xmax, ymax);
- X put_msg("%d object(s) read from \"%s\"", num_object, file);
- X set_action_object(F_ADD, O_ALL_OBJECT);
- X reset_cursor();
- X set_modifiedflag();
- X return (0);
- X }
- X read_fail_message(file, s);
- X reset_cursor();
- X return (1);
- X}
- END_OF_FILE
- if test 2557 -ne `wc -c <'f_load.c'`; then
- echo shar: \"'f_load.c'\" unpacked with wrong size!
- fi
- # end of 'f_load.c'
- fi
- if test -f 'f_util.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'f_util.c'\"
- else
- echo shar: Extracting \"'f_util.c'\" \(3434 characters\)
- sed "s/^X//" >'f_util.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "resources.h"
- X#include "object.h"
- X#include "mode.h"
- X#include "w_util.h"
- X
- Xint
- Xemptyname(name)
- X char name[];
- X
- X{
- X if (*name == '\0') {
- X return (1);
- X } else {
- X return (0);
- X }
- X}
- X
- Xint
- Xemptyname_msg(name, msg)
- X char name[], msg[];
- X
- X{
- X int returnval;
- X
- X if (returnval = emptyname(name))
- X put_msg("No file name specified, %s command ignored", msg);
- X return (returnval);
- X}
- X
- Xint
- Xemptyfigure()
- X{
- X if (objects.texts != NULL)
- X return (0);
- X if (objects.lines != NULL)
- X return (0);
- X if (objects.ellipses != NULL)
- X return (0);
- X if (objects.splines != NULL)
- X return (0);
- X if (objects.arcs != NULL)
- X return (0);
- X if (objects.compounds != NULL)
- X return (0);
- X return (1);
- X}
- X
- Xint
- Xemptyfigure_msg(msg)
- X char msg[];
- X
- X{
- X int returnval;
- X
- X if (returnval = emptyfigure())
- X put_msg("Empty figure, %s command ignored", msg);
- X return (returnval);
- X}
- X
- Xint
- Xchange_directory(path)
- X char *path;
- X{
- X if (path == NULL) {
- X *cur_dir = '\0';
- X return (0);
- X }
- X if (chdir(path) == -1) {
- X put_msg("Can't go to directory %s, : %s", path, sys_errlist[errno]);
- X return (1);
- X }
- X if (get_directory(cur_dir)) /* get cwd */
- X return (0);
- X else
- X return (1);
- X}
- X
- Xget_directory(direct)
- X char *direct;
- X{
- X#if defined(SYSV) || defined(SVR4)
- X extern char *getcwd();
- X
- X#else
- X extern char *getwd();
- X
- X#endif
- X
- X#if defined(SYSV) || defined(SVR4)
- X if (getcwd(direct, 1024) == NULL) { /* get current working dir */
- X put_msg("Can't get current directory");
- X#else
- X if (getwd(direct) == NULL) {/* get current working dir */
- X put_msg("%s", direct); /* err msg is in directory */
- X#endif
- X *direct = '\0';
- X return NULL;
- X }
- X return 1;
- X}
- X
- X#ifndef S_IWUSR
- X#define S_IWUSR 0000200
- X#endif
- X#ifndef S_IWGRP
- X#define S_IWGRP 0000020
- X#endif
- X#ifndef S_IWOTH
- X#define S_IWOTH 0000002
- X#endif
- X
- Xint
- Xok_to_write(file_name, op_name)
- X char *file_name, *op_name;
- X{
- X struct stat file_status;
- X char string[180];
- X
- X if (stat(file_name, &file_status) == 0) { /* file exists */
- X if (file_status.st_mode & S_IFDIR) {
- X put_msg("\"%s\" is a directory", file_name);
- X return (0);
- X }
- X if (file_status.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) {
- X /* writing is permitted by SOMEONE */
- X if (access(file_name, W_OK)) {
- X put_msg("Write permission for \"%s\" is denied", file_name);
- X return (0);
- X } else {
- X if (warnexist) {
- X sprintf(string, "\"%s\" already exists.\nDo you want to overwrite it?", file_name);
- X if (!popup_query(QUERY_YES, string)) {
- X put_msg("%s cancelled", op_name);
- X return (0);
- X }
- X }
- X /* !warnexist */
- X else {
- X return(1);
- X }
- X }
- X } else {
- X put_msg("\"%s\" is read only", file_name);
- X return (0);
- X }
- X } else {
- X if (errno != ENOENT)
- X return (0); /* file does exist but stat fails */
- X }
- X
- X return (1);
- X}
- END_OF_FILE
- if test 3434 -ne `wc -c <'f_util.c'`; then
- echo shar: \"'f_util.c'\" unpacked with wrong size!
- fi
- # end of 'f_util.c'
- fi
- if test -f 'fig.icon.X' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig.icon.X'\"
- else
- echo shar: Extracting \"'fig.icon.X'\" \(3323 characters\)
- sed "s/^X//" >'fig.icon.X' <<'END_OF_FILE'
- X#define fig_width 64
- X#define fig_height 64
- X#define fig_x_hot -1
- X#define fig_y_hot -1
- Xstatic unsigned char fig_bits[] = {
- X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x80,
- X 0x01, 0x7f, 0x8e, 0x0f, 0x00, 0x60, 0x03, 0x80, 0x01, 0x42, 0x44, 0x08,
- X 0x00, 0x10, 0x04, 0x80, 0x01, 0x12, 0x44, 0x00, 0x00, 0x18, 0x08, 0x80,
- X 0x01, 0x1e, 0x44, 0x1e, 0x00, 0x04, 0x08, 0x80, 0x01, 0x12, 0x44, 0x08,
- X 0x00, 0x04, 0x10, 0x80, 0x01, 0x02, 0x44, 0x08, 0x00, 0x03, 0x10, 0x80,
- X 0x01, 0x02, 0x44, 0x0c, 0x00, 0x01, 0x10, 0x80, 0x01, 0x07, 0x8e, 0x0b,
- X 0x80, 0x00, 0x10, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x08, 0x83,
- X 0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x88, 0x8c, 0x61, 0x00, 0x00, 0x00,
- X 0x40, 0x00, 0x48, 0xf0, 0x81, 0x07, 0x00, 0x00, 0x40, 0x40, 0x38, 0xc0,
- X 0x01, 0x78, 0x00, 0x00, 0x38, 0x20, 0x00, 0x80, 0x01, 0x80, 0x07, 0xfc,
- X 0x47, 0x20, 0x00, 0x80, 0xe1, 0x00, 0xf8, 0x03, 0x40, 0x10, 0x00, 0x81,
- X 0x01, 0x0f, 0x00, 0x00, 0x0e, 0x0c, 0xd0, 0x80, 0x01, 0xf0, 0xe0, 0xe0,
- X 0x87, 0x00, 0x06, 0x80, 0x01, 0x00, 0xbf, 0xff, 0x40, 0xf1, 0x00, 0x80,
- X 0x01, 0x00, 0x90, 0x38, 0xa0, 0x06, 0x00, 0x80, 0x01, 0x00, 0x58, 0x08,
- X 0x80, 0x08, 0x00, 0x80, 0x01, 0x00, 0x48, 0x08, 0x18, 0x11, 0x00, 0x80,
- X 0x01, 0x00, 0x4c, 0x08, 0x04, 0x21, 0xe0, 0x83, 0x01, 0x00, 0x22, 0x04,
- X 0x03, 0x41, 0x10, 0x82, 0x01, 0x00, 0x21, 0x02, 0x00, 0x01, 0x10, 0x84,
- X 0x01, 0x00, 0x11, 0x01, 0x00, 0x81, 0xe1, 0xe4, 0x01, 0x80, 0x90, 0x00,
- X 0x1c, 0x00, 0x01, 0x99, 0x01, 0x80, 0x90, 0x80, 0x23, 0x01, 0x02, 0x82,
- X 0x01, 0x40, 0x90, 0x81, 0x38, 0x01, 0x02, 0x82, 0x01, 0x20, 0x10, 0x7f,
- X 0x04, 0x01, 0x04, 0x84, 0x01, 0x10, 0x20, 0x00, 0x82, 0x00, 0x04, 0x84,
- X 0x01, 0x08, 0x20, 0x80, 0x81, 0x00, 0x00, 0x88, 0x01, 0x08, 0x40, 0x40,
- X 0x80, 0x00, 0x08, 0x90, 0x01, 0x04, 0x40, 0x40, 0x40, 0x00, 0x00, 0x90,
- X 0x01, 0x02, 0x80, 0x40, 0x20, 0x0c, 0x10, 0x90, 0x01, 0x01, 0x80, 0x20,
- X 0x10, 0x12, 0x10, 0xa0, 0x01, 0x01, 0x00, 0x21, 0x00, 0x11, 0x10, 0xa0,
- X 0x81, 0x20, 0x00, 0x31, 0x00, 0x09, 0x10, 0xa0, 0x81, 0x10, 0x00, 0x12,
- X 0x00, 0x09, 0x00, 0xa0, 0x41, 0x00, 0x00, 0x12, 0x00, 0x05, 0x20, 0xa0,
- X 0x41, 0x08, 0x00, 0x12, 0x80, 0x04, 0x00, 0xa0, 0x21, 0x00, 0x00, 0x12,
- X 0x40, 0x04, 0x20, 0xa0, 0x21, 0x04, 0x00, 0x14, 0x20, 0x04, 0x20, 0xa0,
- X 0x11, 0x00, 0x00, 0x24, 0x18, 0x04, 0x00, 0xa0, 0x11, 0x04, 0x00, 0xc4,
- X 0x07, 0x04, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x90,
- X 0x09, 0x04, 0x00, 0x08, 0x00, 0x04, 0x00, 0x90, 0x09, 0x00, 0x00, 0x08,
- X 0x00, 0x04, 0x00, 0x98, 0x09, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x88,
- X 0x11, 0x00, 0x00, 0x08, 0x00, 0x18, 0x00, 0x88, 0x11, 0x00, 0x00, 0x08,
- X 0x00, 0x10, 0x00, 0x84, 0x11, 0x00, 0x00, 0x04, 0x00, 0x20, 0x00, 0x86,
- X 0x11, 0xe0, 0x00, 0x04, 0x00, 0x60, 0x00, 0x81, 0x21, 0x20, 0x01, 0x02,
- X 0x00, 0x80, 0x81, 0x80, 0x21, 0xc0, 0x00, 0x01, 0x00, 0x00, 0xc1, 0x80,
- X 0x41, 0x00, 0x80, 0x00, 0x00, 0x00, 0x62, 0x80, 0x81, 0x00, 0xc0, 0x00,
- X 0x00, 0x00, 0x1c, 0x80, 0x01, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x80,
- X 0x01, 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xf8, 0x01, 0x00,
- X 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- END_OF_FILE
- if test 3323 -ne `wc -c <'fig.icon.X'`; then
- echo shar: \"'fig.icon.X'\" unpacked with wrong size!
- fi
- # end of 'fig.icon.X'
- fi
- if test -f 'mode.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mode.c'\"
- else
- echo shar: Extracting \"'mode.c'\" \(3545 characters\)
- sed "s/^X//" >'mode.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "mode.h"
- X#include "resources.h"
- X#include "object.h"
- X#include "w_indpanel.h"
- X
- Xint cur_mode = F_NULL;
- Xint cur_halign = NONE;
- Xint cur_valign = NONE;
- Xint manhattan_mode = 0;
- Xint mountain_mode = 0;
- Xint latexline_mode = 0;
- Xint latexarrow_mode = 0;
- Xint autoforwardarrow_mode = 0;
- Xint autobackwardarrow_mode = 0;
- Xint cur_gridmode = GRID_0;
- Xint cur_pointposn = P_MAGNET;
- Xint posn_rnd[P_GRID2 + 1];
- Xint posn_hlf[P_GRID2 + 1];
- Xint grid_fine[P_GRID2 + 1];
- Xint grid_coarse[P_GRID2 + 1];
- Xchar *grid_name[P_GRID2 + 1];
- Xint cur_rotnangle = 90;
- Xint cur_linkmode = 0;
- Xint cur_numsides = 6;
- Xint action_on = 0;
- Xint highlighting = 0;
- Xint aborting = 0;
- Xint anypointposn = 0;
- Xint figure_modified = 0;
- Xchar cur_fig_units[32];
- XBoolean warnexist = True;
- X
- X/********************** global mode variables ************************/
- X
- Xint num_point;
- Xint min_num_points;
- X
- X/*************************** Export Settings ****************************/
- X
- XBoolean export_flushleft; /* flush left (true) or center (false) */
- X
- X/*************************** Print Settings ****************************/
- X
- Xint print_landscape = 0; /* def. orientation for printer */
- XBoolean print_flushleft; /* flush left (true) or center (false) */
- Xint cur_exp_lang = LANG_EPS; /* actually gets set up in main.c */
- XBoolean batch_exists = False;
- Xchar batch_file[32];
- X
- Xchar *lang_items[] = {
- X "box", "latex", "epic", "eepic", "eepicemu",
- X "pictex", "ibmgl", "eps", "ps", "pstex",
- X "pstex_t", "textyl", "tpic", "pic", "xbm"};
- X
- Xchar *lang_texts[] = {
- X "LaTeX box (figure boundary) ",
- X "LaTeX picture ",
- X "LaTeX picture + epic macros ",
- X "LaTeX picture + eepic macros ",
- X "LaTeX picture + eepicemu macros",
- X "PiCTeX macros ",
- X "IBMGL (or HPGL) ",
- X "Encapsulated Postscript ",
- X "Postscript ",
- X "Combined PS/LaTeX (PS part) ",
- X "Combined PS/LaTeX (LaTeX part) ",
- X "Textyl \\special commands ",
- X "TPIC ",
- X "PIC ",
- X "X11 Bitmap "};
- X
- X/*************************** Mode Settings ****************************/
- X
- Xint cur_objmask = M_NONE;
- Xint cur_updatemask = I_UPDATEMASK;
- Xint cur_depth = 0;
- X
- X/*************************** Text Settings ****************************/
- X
- Xint hidden_text_length;
- Xfloat cur_textstep = 1.2;
- X
- X/*************************** File Settings ****************************/
- X
- Xchar cur_dir[1024];
- Xchar cur_filename[200] = "";
- Xchar save_filename[200] = ""; /* to undo load */
- Xchar cut_buf_name[100];
- Xchar file_header[32] = "#FIG ";
- X
- X/*************************** routines ***********************/
- X
- Xvoid
- Xreset_modifiedflag()
- X{
- X figure_modified = 0;
- X}
- X
- Xvoid
- Xset_modifiedflag()
- X{
- X figure_modified = 1;
- X}
- X
- Xvoid
- Xset_action_on()
- X{
- X action_on = 1;
- X}
- X
- Xvoid
- Xreset_action_on()
- X{
- X action_on = 0;
- X}
- END_OF_FILE
- if test 3545 -ne `wc -c <'mode.c'`; then
- echo shar: \"'mode.c'\" unpacked with wrong size!
- fi
- # end of 'mode.c'
- fi
- if test -f 'u_error.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'u_error.c'\"
- else
- echo shar: Extracting \"'u_error.c'\" \(2761 characters\)
- sed "s/^X//" >'u_error.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "mode.h"
- X#include "resources.h"
- X
- X#define MAXERRORS 6
- X#define MAXERRMSGLEN 512
- X
- Xstatic int error_cnt = 0;
- X
- X/* VARARGS1 */
- Xput_err(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
- X char *format, *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7,
- X *arg8;
- X{
- X fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5,
- X arg6, arg7, arg8);
- X put_msg(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
- X}
- X
- Xerror_handler(err_sig)
- X int err_sig;
- X{
- X switch (err_sig) {
- X case SIGHUP:
- X fprintf(stderr, "\nxfig: SIGHUP signal trapped\n");
- X break;
- X case SIGFPE:
- X fprintf(stderr, "\nxfig: SIGFPE signal trapped\n");
- X break;
- X#ifndef NO_SIBGUS
- X case SIGBUS:
- X fprintf(stderr, "\nxfig: SIGBUS signal trapped\n");
- X break;
- X#endif
- X case SIGSEGV:
- X fprintf(stderr, "\nxfig: SIGSEGV signal trapped\n");
- X break;
- X }
- X emergency_quit();
- X}
- X
- XX_error_handler(d, err_ev)
- X Display *d;
- X XErrorEvent *err_ev;
- X{
- X char err_msg[MAXERRMSGLEN];
- X
- X XGetErrorText(tool_d, (int) (err_ev->error_code), err_msg, MAXERRMSGLEN - 1);
- X (void) fprintf(stderr,
- X "xfig: X error trapped - error message follows:\n%s\n", err_msg);
- X emergency_quit();
- X}
- X
- Xemergency_quit()
- X{
- X if (++error_cnt > MAXERRORS) {
- X fprintf(stderr, "xfig: too many errors - giving up.\n");
- X exit(-1);
- X }
- X signal(SIGHUP, SIG_DFL);
- X signal(SIGFPE, SIG_DFL);
- X#ifndef NO_SIBGUS
- X signal(SIGBUS, SIG_DFL);
- X#endif
- X signal(SIGSEGV, SIG_DFL);
- X
- X aborting = 1;
- X if (figure_modified && !emptyfigure()) {
- X fprintf(stderr, "xfig: attempting to save figure\n");
- X if (emergency_save("xfig.SAVE") == -1)
- X if (emergency_save(strcat(TMPDIR,"/xfig.SAVE")) == -1)
- X fprintf(stderr, "xfig: unable to save figure\n");
- X } else
- X fprintf(stderr, "xfig: figure empty or not modified - exiting\n");
- X
- X quit();
- X}
- X
- X/* ARGSUSED */
- Xvoid my_quit(w, event, params, num_params)
- XWidget w;
- XXEvent *event;
- XString *params;
- XCardinal *num_params;
- X{
- X extern Atom wm_delete_window;
- X if (event && event->type == ClientMessage &&
- X event->xclient.data.l[0] != wm_delete_window)
- X {
- X return;
- X }
- X /* free all the GC's */
- X free_GCs();
- X emergency_quit();
- X}
- END_OF_FILE
- if test 2761 -ne `wc -c <'u_error.c'`; then
- echo shar: \"'u_error.c'\" unpacked with wrong size!
- fi
- # end of 'u_error.c'
- fi
- if test -f 'u_translate.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'u_translate.c'\"
- else
- echo shar: Extracting \"'u_translate.c'\" \(3480 characters\)
- sed "s/^X//" >'u_translate.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "resources.h"
- X#include "object.h"
- X
- Xtranslate_ellipse(ellipse, dx, dy)
- X F_ellipse *ellipse;
- X int dx, dy;
- X{
- X ellipse->center.x += dx;
- X ellipse->center.y += dy;
- X ellipse->start.x += dx;
- X ellipse->start.y += dy;
- X ellipse->end.x += dx;
- X ellipse->end.y += dy;
- X}
- X
- Xtranslate_arc(arc, dx, dy)
- X F_arc *arc;
- X int dx, dy;
- X{
- X arc->center.x += (float) dx;
- X arc->center.y += (float) dy;
- X arc->point[0].x += dx;
- X arc->point[0].y += dy;
- X arc->point[1].x += dx;
- X arc->point[1].y += dy;
- X arc->point[2].x += dx;
- X arc->point[2].y += dy;
- X}
- X
- Xtranslate_line(line, dx, dy)
- X F_line *line;
- X int dx, dy;
- X{
- X F_point *point;
- X
- X for (point = line->points; point != NULL; point = point->next) {
- X point->x += dx;
- X point->y += dy;
- X }
- X}
- X
- Xtranslate_text(text, dx, dy)
- X F_text *text;
- X int dx, dy;
- X{
- X text->base_x += dx;
- X text->base_y += dy;
- X}
- X
- Xtranslate_spline(spline, dx, dy)
- X F_spline *spline;
- X int dx, dy;
- X{
- X F_point *point;
- X F_control *cp;
- X
- X for (point = spline->points; point != NULL; point = point->next) {
- X point->x += dx;
- X point->y += dy;
- X }
- X for (cp = spline->controls; cp != NULL; cp = cp->next) {
- X cp->lx += dx;
- X cp->ly += dy;
- X cp->rx += dx;
- X cp->ry += dy;
- X }
- X}
- X
- Xtranslate_compound(compound, dx, dy)
- X F_compound *compound;
- X int dx, dy;
- X{
- X compound->nwcorner.x += dx;
- X compound->nwcorner.y += dy;
- X compound->secorner.x += dx;
- X compound->secorner.y += dy;
- X
- X translate_lines(compound->lines, dx, dy);
- X translate_splines(compound->splines, dx, dy);
- X translate_ellipses(compound->ellipses, dx, dy);
- X translate_arcs(compound->arcs, dx, dy);
- X translate_texts(compound->texts, dx, dy);
- X translate_compounds(compound->compounds, dx, dy);
- X}
- X
- Xtranslate_arcs(arcs, dx, dy)
- X F_arc *arcs;
- X int dx, dy;
- X{
- X F_arc *a;
- X
- X for (a = arcs; a != NULL; a = a->next)
- X translate_arc(a, dx, dy);
- X}
- X
- Xtranslate_compounds(compounds, dx, dy)
- X F_compound *compounds;
- X int dx, dy;
- X{
- X F_compound *c;
- X
- X for (c = compounds; c != NULL; c = c->next)
- X translate_compound(c, dx, dy);
- X}
- X
- Xtranslate_ellipses(ellipses, dx, dy)
- X F_ellipse *ellipses;
- X int dx, dy;
- X{
- X F_ellipse *e;
- X
- X for (e = ellipses; e != NULL; e = e->next)
- X translate_ellipse(e, dx, dy);
- X}
- X
- Xtranslate_lines(lines, dx, dy)
- X F_line *lines;
- X int dx, dy;
- X{
- X F_line *l;
- X
- X for (l = lines; l != NULL; l = l->next)
- X translate_line(l, dx, dy);
- X}
- X
- Xtranslate_splines(splines, dx, dy)
- X F_spline *splines;
- X int dx, dy;
- X{
- X F_spline *s;
- X
- X for (s = splines; s != NULL; s = s->next)
- X translate_spline(s, dx, dy);
- X}
- X
- Xtranslate_texts(texts, dx, dy)
- X F_text *texts;
- X int dx, dy;
- X{
- X F_text *t;
- X
- X for (t = texts; t != NULL; t = t->next)
- X translate_text(t, dx, dy);
- X}
- END_OF_FILE
- if test 3480 -ne `wc -c <'u_translate.c'`; then
- echo shar: \"'u_translate.c'\" unpacked with wrong size!
- fi
- # end of 'u_translate.c'
- fi
- if test -f 'w_cursor.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'w_cursor.c'\"
- else
- echo shar: Extracting \"'w_cursor.c'\" \(3086 characters\)
- sed "s/^X//" >'w_cursor.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "figx.h"
- X#include "resources.h"
- X#include "paintop.h"
- X
- Xinit_cursor()
- X{
- X register Display *d = tool_d;
- X cur_cursor = arrow_cursor; /* current cursor */
- X
- X arrow_cursor = XCreateFontCursor(d, XC_left_ptr);
- X bull_cursor = XCreateFontCursor(d, XC_circle);
- X buster_cursor = XCreateFontCursor(d, XC_pirate);
- X crosshair_cursor = XCreateFontCursor(d, XC_crosshair);
- X null_cursor = XCreateFontCursor(d, XC_tcross);
- X pencil_cursor = XCreateFontCursor(d, XC_pencil);
- X pick15_cursor = XCreateFontCursor(d, XC_dotbox);
- X pick9_cursor = XCreateFontCursor(d, XC_hand1);
- X wait_cursor = XCreateFontCursor(d, XC_watch);
- X panel_cursor = XCreateFontCursor(d, XC_icon);
- X lr_arrow_cursor = XCreateFontCursor(d, XC_sb_h_double_arrow);
- X l_arrow_cursor = XCreateFontCursor(d, XC_sb_left_arrow);
- X r_arrow_cursor = XCreateFontCursor(d, XC_sb_right_arrow);
- X ud_arrow_cursor = XCreateFontCursor(d, XC_sb_v_double_arrow);
- X u_arrow_cursor = XCreateFontCursor(d, XC_sb_up_arrow);
- X d_arrow_cursor = XCreateFontCursor(d, XC_sb_down_arrow);
- X}
- X
- Xrecolor_cursors()
- X{
- X register Display *d = tool_d;
- X
- X XRecolorCursor(d, arrow_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, bull_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, buster_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, crosshair_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, null_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, pencil_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, pick15_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, pick9_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, wait_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, panel_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, l_arrow_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, r_arrow_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, lr_arrow_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, u_arrow_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, d_arrow_cursor, &x_fg_color, &x_bg_color);
- X XRecolorCursor(d, ud_arrow_cursor, &x_fg_color, &x_bg_color);
- X}
- X
- Xreset_cursor()
- X{
- X XDefineCursor(tool_d, canvas_win, cur_cursor);
- X}
- X
- Xset_temp_cursor(cursor)
- X Cursor cursor;
- X{
- X XDefineCursor(tool_d, canvas_win, cursor);
- X}
- X
- Xset_cursor(cursor)
- X Cursor cursor;
- X{
- X cur_cursor = cursor;
- X XDefineCursor(tool_d, canvas_win, cursor);
- X}
- X
- END_OF_FILE
- if test 3086 -ne `wc -c <'w_cursor.c'`; then
- echo shar: \"'w_cursor.c'\" unpacked with wrong size!
- fi
- # end of 'w_cursor.c'
- fi
- if test -f 'w_icons.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'w_icons.h'\"
- else
- echo shar: Extracting \"'w_icons.h'\" \(2427 characters\)
- sed "s/^X//" >'w_icons.h' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- Xextern XImage addpt_ic;
- X
- X#ifdef notdef /* not used yet */
- Xextern XImage raise_ic;
- Xextern XImage kbd_ic;
- X
- X#endif
- Xextern XImage smartoff_ic;
- Xextern XImage smartmove_ic;
- Xextern XImage smartslide_ic;
- Xextern XImage arc_ic;
- Xextern XImage autoarrow_ic;
- Xextern XImage backarrow_ic;
- Xextern XImage box_ic;
- Xextern XImage regpoly_ic;
- Xextern XImage epsobj_ic;
- Xextern XImage arc_box_ic;
- Xextern XImage break_ic;
- Xextern XImage cirrad_ic;
- Xextern XImage cirdia_ic;
- Xextern XImage c_spl_ic;
- Xextern XImage copy_ic;
- Xextern XImage glue_ic;
- Xextern XImage solidline_ic;
- Xextern XImage dashline_ic;
- Xextern XImage dottedline_ic;
- Xextern XImage deletept_ic;
- Xextern XImage ellrad_ic;
- Xextern XImage elldia_ic;
- Xextern XImage flip_x_ic;
- Xextern XImage flip_y_ic;
- Xextern XImage forarrow_ic;
- Xextern XImage grid1_ic;
- Xextern XImage grid2_ic;
- Xextern XImage intspl_ic;
- Xextern XImage c_intspl_ic;
- Xextern XImage line_ic;
- Xextern XImage fine_grid_ic;
- Xextern XImage unconstrained_ic;
- Xextern XImage latexline_ic;
- Xextern XImage latexarrow_ic;
- Xextern XImage mounthattan_ic;
- Xextern XImage manhattan_ic;
- Xextern XImage mountain_ic;
- Xextern XImage move_ic;
- Xextern XImage movept_ic;
- Xextern XImage polygon_ic;
- Xextern XImage delete_ic;
- Xextern XImage rotCW_ic;
- Xextern XImage rotCCW_ic;
- Xextern XImage scale_ic;
- Xextern XImage convert_ic;
- Xextern XImage spl_ic;
- Xextern XImage text_ic;
- Xextern XImage update_ic;
- Xextern XImage change_ic;
- Xextern XImage halignl_ic;
- Xextern XImage halignr_ic;
- Xextern XImage halignc_ic;
- Xextern XImage valignt_ic;
- Xextern XImage valignb_ic;
- Xextern XImage valignc_ic;
- Xextern XImage align_ic;
- Xextern XImage any_ic;
- Xextern XImage none_ic;
- Xextern XImage fill_ic;
- Xextern XImage blank_ic;
- Xextern XImage textL_ic;
- Xextern XImage textC_ic;
- Xextern XImage textR_ic;
- Xextern XImage printer_ic;
- Xextern XImage noarrows_ic;
- Xextern XImage farrows_ic;
- Xextern XImage barrows_ic;
- Xextern XImage fbarrows_ic;
- END_OF_FILE
- if test 2427 -ne `wc -c <'w_icons.h'`; then
- echo shar: \"'w_icons.h'\" unpacked with wrong size!
- fi
- # end of 'w_icons.h'
- fi
- if test -f 'w_indpanel.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'w_indpanel.h'\"
- else
- echo shar: Extracting \"'w_indpanel.h'\" \(3123 characters\)
- sed "s/^X//" >'w_indpanel.h' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1991 by Paul King
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X/* indicator button selection */
- X
- X#define I_ANGLEGEOM 0x000001
- X#define I_VALIGN 0x000002
- X#define I_HALIGN 0x000004
- X#define I_GRIDMODE 0x000008
- X#define I_POINTPOSN 0x000010
- X#define I_FILLSTYLE 0x000020
- X#define I_BOXRADIUS 0x000040
- X#define I_LINEWIDTH 0x000080
- X#define I_LINESTYLE 0x000100
- X#define I_ARROWMODE 0x000200
- X#define I_TEXTJUST 0x000400
- X#define I_FONTSIZE 0x000800
- X#define I_FONT 0x001000
- X#define I_TEXTSTEP 0x002000
- X#define I_ZOOM 0x004000
- X#define I_ROTNANGLE 0x008000
- X#define I_NUMSIDES 0x010000
- X#define I_COLOR 0x020000
- X#define I_LINKMODE 0x040000
- X#define I_DEPTH 0x080000
- X#define I_ELLTEXTANGLE 0x100000
- X#define I_TEXTFLAGS 0x200000
- X
- X#define I_NONE 0x000000
- X#define I_ALL 0x3fffff
- X#define I_MIN1 (I_GRIDMODE | I_ZOOM)
- X#define I_MIN2 (I_MIN1 | I_POINTPOSN)
- X#define I_MIN3 (I_MIN2 | I_LINKMODE)
- X#define I_ADDMOVPT (I_MIN2 | I_ANGLEGEOM)
- X#define I_TEXT0 (I_TEXTJUST | I_FONT | I_FONTSIZE | I_COLOR | \
- X I_DEPTH | I_ELLTEXTANGLE | I_TEXTFLAGS)
- X#define I_TEXT (I_MIN2 | I_TEXTSTEP | I_TEXT0)
- X#define I_LINE0 (I_FILLSTYLE | I_LINESTYLE | I_LINEWIDTH | \
- X I_COLOR | I_DEPTH)
- X#define I_BOX (I_MIN2 | I_LINE0 | I_DEPTH)
- X#define I_ELLIPSE (I_MIN2 | I_LINE0 | I_DEPTH | I_ELLTEXTANGLE)
- X#define I_ARC (I_BOX | I_ARROWMODE)
- X#define I_REGPOLY (I_BOX | I_NUMSIDES)
- X#define I_CLOSED (I_BOX | I_ANGLEGEOM)
- X#define I_OPEN (I_CLOSED | I_ARROWMODE)
- X#define I_ARCBOX (I_BOX | I_BOXRADIUS)
- X#define I_EPSOBJ (I_MIN2 | I_DEPTH)
- X#define I_OBJECT (I_MIN1 | I_TEXT0 | I_LINE0 | I_ARROWMODE | \
- X I_BOXRADIUS | I_DEPTH)
- X#define I_ALIGN (I_MIN1 | I_HALIGN | I_VALIGN)
- X#define I_ROTATE (I_MIN1 | I_ROTNANGLE)
- X/* for checking which parts to update */
- X#define I_UPDATEMASK (I_OBJECT & ~I_GRIDMODE & ~I_ZOOM)
- X
- Xtypedef struct choice_struct {
- X int value;
- X PIXRECT icon;
- X Pixmap normalPM,blackPM;
- X} choice_info;
- X
- Xtypedef struct ind_sw_struct {
- X int type; /* one of I_CHOICE .. I_FVAL */
- X int func;
- X char line1[14], line2[6];
- X int sw_width;
- X int *i_varadr;
- X float *f_varadr;
- X int (*inc_func) ();
- X int (*dec_func) ();
- X int (*show_func) ();
- X choice_info *choices; /* specific to I_CHOICE */
- X int numchoices; /* specific to I_CHOICE */
- X int sw_per_row; /* specific to I_CHOICE */
- X Bool update; /* whether this object component is updated by update */
- X TOOL button;
- X TOOL formw;
- X TOOL updbut;
- X Pixmap normalPM;
- X} ind_sw_info;
- X
- X#define ZOOM_SWITCH_INDEX 0 /* used by w_zoom.c */
- Xextern ind_sw_info ind_switches[];
- END_OF_FILE
- if test 3123 -ne `wc -c <'w_indpanel.h'`; then
- echo shar: \"'w_indpanel.h'\" unpacked with wrong size!
- fi
- # end of 'w_indpanel.h'
- fi
- if test -f 'w_setup.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'w_setup.c'\"
- else
- echo shar: Extracting \"'w_setup.c'\" \(2592 characters\)
- sed "s/^X//" >'w_setup.c' <<'END_OF_FILE'
- X/*
- X * FIG : Facility for Interactive Generation of figures
- X * Copyright (c) 1985 by Supoj Sutanthavibul
- X *
- X * "Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both the copyright
- X * notice and this permission notice appear in supporting documentation.
- X * No representations are made about the suitability of this software for
- X * any purpose. It is provided "as is" without express or implied warranty."
- X */
- X
- X#include "fig.h"
- X#include "resources.h"
- X#include "w_setup.h"
- X#include "w_util.h"
- X
- Xint TOOL_WD, TOOL_HT;
- Xint CMDPANEL_WD, CMDPANEL_HT = 22;
- Xint MODEPANEL_WD, MODEPANEL_HT;
- Xint MODEPANEL_SPACE;
- Xint MSGFORM_WD, MSGFORM_HT = 18;
- Xint MSGPANEL_WD = 600;
- Xint MOUSEFUN_WD, MOUSEFUN_HT;
- Xint INDPANEL_WD;
- Xint CANVAS_WD, CANVAS_HT;
- Xint INTERNAL_BW;
- Xint TOPRULER_WD, TOPRULER_HT;
- Xint SIDERULER_WD, SIDERULER_HT;
- Xint SW_PER_ROW, SW_PER_COL;
- X
- Xsetup_sizes(new_canv_wd, new_canv_ht)
- X int new_canv_wd, new_canv_ht;
- X{
- X int NUM_CMD_SW;
- X
- X /*
- X * make the width of the mousefun panel about 1/3 of the size of the
- X * canvas width and the cmdpanel the remaining width. Be sure to set it
- X * up so that cmdpanel buttons can be allocated a size which divides
- X * evenly into the remaining space.
- X */
- X CANVAS_WD = new_canv_wd;
- X if (CANVAS_WD < 10)
- X CANVAS_WD = 10;
- X CANVAS_HT = new_canv_ht;
- X if (CANVAS_HT < 10)
- X CANVAS_HT = 10;
- X
- X SIDERULER_WD = RULER_WD + 8; /* allow for 100's numbers */
- X TOPRULER_HT = RULER_WD;
- X TOPRULER_WD = CANVAS_WD;
- X SIDERULER_HT = CANVAS_HT;
- X if (TOPRULER_WD > MAX_TOPRULER_WD)
- X TOPRULER_WD = MAX_TOPRULER_WD;
- X if (SIDERULER_HT > MAX_SIDERULER_HT)
- X SIDERULER_HT = MAX_SIDERULER_HT;
- X
- X MODEPANEL_WD = (MODE_SW_WD + INTERNAL_BW) * SW_PER_ROW + INTERNAL_BW;
- X NUM_CMD_SW = num_cmd_sw(); /* kludge - NUM_CMD_SW local to w_cmdpanel.c */
- X CMDPANEL_WD = (((2 * CANVAS_WD) / 3 + MODEPANEL_WD +
- X SIDERULER_WD) / NUM_CMD_SW) * NUM_CMD_SW;
- X MOUSEFUN_WD = (MODEPANEL_WD + CANVAS_WD + SIDERULER_WD - CMDPANEL_WD);
- X while (MOUSEFUN_WD < MIN_MOUSEFUN_WD) {
- X MOUSEFUN_WD += NUM_CMD_SW;
- X CMDPANEL_WD -= NUM_CMD_SW;
- X }
- X if (CMDPANEL_WD < 5 * NUM_CMD_SW)
- X CMDPANEL_WD = 5 * NUM_CMD_SW;
- X MSGFORM_WD = CMDPANEL_WD;
- X
- X MODEPANEL_SPACE = CANVAS_HT + RULER_WD -
- X SW_PER_COL * (MODE_SW_HT + INTERNAL_BW);
- X if (MODEPANEL_SPACE < 2)
- X MODEPANEL_SPACE = 2;
- X INDPANEL_WD = MODEPANEL_WD + CANVAS_WD + SIDERULER_WD + INTERNAL_BW*2;
- X}
- END_OF_FILE
- if test 2592 -ne `wc -c <'w_setup.c'`; then
- echo shar: \"'w_setup.c'\" unpacked with wrong size!
- fi
- # end of 'w_setup.c'
- fi
- echo shar: End of archive 2 \(of 27\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 27 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- exit 0 # Just in case...
- --
- // chris@IMD.Sterling.COM | Send comp.sources.x submissions to:
- \X/ Amiga - The only way to fly! | sources-x@imd.sterling.com
- "It's intuitively obvious to the |
- most casual observer..." | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
-