home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / x / volume16 / xfig-2.1.3 / part22 < prev    next >
Internet Message Format  |  1992-02-04  |  57KB

  1. Path: uunet!zaphod.mps.ohio-state.edu!mips!msi!dcmartin
  2. From: envbvs@bea.lbl.gov (Brian V. Smith)
  3. Newsgroups: comp.sources.x
  4. Subject: v16i027: Xfig 2.1.3, Part22/25
  5. Message-ID: <1992Feb4.150322.1497@msi.com>
  6. Date: 4 Feb 92 15:03:22 GMT
  7. References: <csx-16i006-xfig-2.1.3@uunet.UU.NET>
  8. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  9. Organization: Molecular Simulations, Inc.
  10. Lines: 1643
  11. Approved: dcmartin@msi.com
  12. Originator: dcmartin@fascet
  13.  
  14. Submitted-by: envbvs@bea.lbl.gov (Brian V. Smith)
  15. Posting-number: Volume 16, Issue 27
  16. Archive-name: xfig-2.1.3/part22
  17.  
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  22. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  23. # If this archive is complete, you will see the following message at the end:
  24. #        "End of archive 22 (of 25)."
  25. # Contents:  Examples/damper.fig.uu Examples/filenames.fig.uu
  26. #   Examples/flowchart.fig.uu Examples/gold.fig.uu d_arc.c e_align.c
  27. #   f_util.c u_fonts.c u_print.c w_cursor.c w_grid.c w_zoom.c
  28. # Wrapped by dcmartin@fascet on Tue Feb  4 06:42:33 1992
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f 'Examples/damper.fig.uu' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'Examples/damper.fig.uu'\"
  32. else
  33. echo shar: Extracting \"'Examples/damper.fig.uu'\" \(4773 characters\)
  34. sed "s/^X//" >'Examples/damper.fig.uu' <<'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92!$
  112. X686UP97)E9"!);G-T86QL871I;VX!"E-C
  113. X`
  114. Xend
  115. END_OF_FILE
  116. if test 4773 -ne `wc -c <'Examples/damper.fig.uu'`; then
  117.     echo shar: \"'Examples/damper.fig.uu'\" unpacked with wrong size!
  118. fi
  119. # end of 'Examples/damper.fig.uu'
  120. fi
  121. if test -f 'Examples/filenames.fig.uu' -a "${1}" != "-c" ; then 
  122.   echo shar: Will not clobber existing file \"'Examples/filenames.fig.uu'\"
  123. else
  124. echo shar: Extracting \"'Examples/filenames.fig.uu'\" \(4194 characters\)
  125. sed "s/^X//" >'Examples/filenames.fig.uu' <<'END_OF_FILE'
  126. Xbegin 664 filenames.fig
  127. XM(T9)1R`R+C`*.#`@,@HR(#$@,"`Q(#`@,"`P(#`@,"XP,#`@,"`P"@D@,3,Y
  128. XM(#$W.2`Q,SD@,3$T(#DY.3D@.3DY.0HR(#$@,"`Q(#`@,"`P(#`@,"XP,#`@
  129. XM,"`P"@D@,3DY(#$W.2`Q.3D@,34Y(#DY.3D@.3DY.0HR(#$@,"`Q(#`@,"`P
  130. XM(#`@,"XP,#`@,"`P"@D@,CDY(#$X.2`S,30@,C`T(#,Q-"`R,30@-#$T(#(Q
  131. XM-"`T,30@,C,T(#DY.3D@.3DY.0HR(#$@,"`Q(#`@,"`P(#`@,"XP,#`@,"`P
  132. XM"@D@,S(Y(#$X.2`S,30@,C`T(#DY.3D@.3DY.0HR(#$@,"`Q(#`@,"`P(#`@
  133. XM,"XP,#`@,"`P"@D@,C8Y(#$X.2`R-30@,C`T(#DY.3D@.3DY.0HR(#$@,"`Q
  134. XM(#`@,"`P(#`@,"XP,#`@,"`P"@D@,C,Y(#$X.2`R-30@,C`T(#(U-"`R,C0@
  135. XM,CDT(#(R-"`R.30@,C4T(#DY.3D@.3DY.0HR(#$@,"`Q(#`@,"`P(#`@,"XP
  136. XM,#`@,"`P"@D@,38Y(#$X.2`Q-CD@,C,Y(#(V-"`R,SD@,C8T(#,Q-"`R,30@
  137.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#`P(#$@,3(@,3$U(#$Y.2`Q,S0@,"`]($]H;F4@16YT
  184. XM9F5U8VAT=6YG`0HT(#`@,B`Q-"`P(#`@,"`P+C`P,"`Q(#$P(#,S(#@T(#,S
  185. XM-"!3=&%D=`$*-"`P(#`@,3(@,"`P(#`@,"XP,#`@,2`Y(#8X(#@T(#0U-"!H
  186. XM(#T@2&%N;F]V97(!"C0@,"`P(#$R(#`@,"`P(#`N,#`P(#$@,3(@-C8@.#0@
  187. XM-#,Y(&<@/2!&<F%N:V9U<G0!"C0@,"`P(#$R(#`@,"`P(#`N,#`P(#$@.2`U
  188. XM.2`X-"`T,C0@9B`@/2!0:&]E;FEX`0HT(#`@,"`Q,B`P(#`@,"`P+C`P,"`Q
  189. XM(#$R(#<Q(#@T(#0P.2!E(#T@4V%N($1I96=O`0HT(#`@,"`Q,B`P(#`@,"`P
  190. XM+C`P,"`Q(#D@-C4@.#0@,SDT(&0@/2!2960@0FQU9F8!"C0@,"`P(#$R(#`@
  191. XM,"`P(#`N,#`P(#$@,3(@-S<@.#0@,S<Y(&,@/2!,;VYG($)E86-H`0HT(#`@
  192. XM,"`Q,B`P(#`@,"`P+C`P,"`Q(#D@.#8@.#0@,S8T(&(@/2!,86ME($-H87)L
  193. XM97,!"C0@,"`P(#$R(#`@,"`P(#`N,#`P(#$@.2`U,R`X-"`S-#D@82`]($%R
  194. X&8V%T80$*
  195. X`
  196. Xend
  197. END_OF_FILE
  198. if test 4194 -ne `wc -c <'Examples/filenames.fig.uu'`; then
  199.     echo shar: \"'Examples/filenames.fig.uu'\" unpacked with wrong size!
  200. fi
  201. # end of 'Examples/filenames.fig.uu'
  202. fi
  203. if test -f 'Examples/flowchart.fig.uu' -a "${1}" != "-c" ; then 
  204.   echo shar: Will not clobber existing file \"'Examples/flowchart.fig.uu'\"
  205. else
  206. echo shar: Extracting \"'Examples/flowchart.fig.uu'\" \(4164 characters\)
  207. sed "s/^X//" >'Examples/flowchart.fig.uu' <<'END_OF_FILE'
  208.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(#`@,"XP,#`@,2`R,"`Q,S<@-#<Y(#4T.2!!;&P@4&%R
  271. XM86UE=&5R<P$*-"`P(#`@,30@,"`P(#`@,"XP,#`@,2`R,"`U-2`S-3D@-S0@
  272. XM-"XR+C`@`0HT(#`@,"`Q-"`P(#`@,"`P+C`P,"`Q(#(P(#$S-R`Q,SD@-30@
  273. XM06QL(%!A<F%M971E<G,!"C0@,"`P(#$T(#`@,"`P(#`N,#`P(#$@,C`@,3(Y
  274. XM(#0Q.2`W-"!396QE8W0@36]D=6QE`0HT(#`@,"`Q-"`P(#`@,"`P+C`P,"`Q
  275. X>(#(P(#$Q.2`T,3D@.3D@9F]R($QI;FL@5'EP90$*
  276. X`
  277. Xend
  278. END_OF_FILE
  279. if test 4164 -ne `wc -c <'Examples/flowchart.fig.uu'`; then
  280.     echo shar: \"'Examples/flowchart.fig.uu'\" unpacked with wrong size!
  281. fi
  282. # end of 'Examples/flowchart.fig.uu'
  283. fi
  284. if test -f 'Examples/gold.fig.uu' -a "${1}" != "-c" ; then 
  285.   echo shar: Will not clobber existing file \"'Examples/gold.fig.uu'\"
  286. else
  287. echo shar: Extracting \"'Examples/gold.fig.uu'\" \(3829 characters\)
  288. sed "s/^X//" >'Examples/gold.fig.uu' <<'END_OF_FILE'
  289. Xbegin 664 gold.fig
  290. XM(T9)1R`R+C`*.#`@,@HR(#(@,"`Q(#`@,"`P(#`@,"XP,#`@,"`P"@D@-34T
  291. XM(#0S.2`U-30@-#,Q(#4V,B`T,S$@-38R(#0S.2`U-30@-#,Y(#DY.3D@.3DY
  292. XM.0HR(#(@,"`Q(#`@,"`P(#`@,"XP,#`@,"`P"@D@,34T(#0S.2`Q-30@-#,Q
  293. XM(#$V,2`T,S$@,38Q(#0S.2`Q-30@-#,Y(#DY.3D@.3DY.0HR(#(@,"`Q(#`@
  294. XM,"`P(#`@,"XP,#`@,"`P"@D@-SD@,C(T(#(S.2`R,C0@,C,Y(#,X-"`W.2`S
  295. XM.#0@-SD@,C(T(#D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`@,"`P(#`@,"XP
  341. XM,#`@,"`P"@D@-3<Y(#(T-"`V,3D@,C$T(#DY.3D@.3DY.0HR(#$@,"`Q(#`@
  342. XM,"`P(#`@,"XP,#`@,"`P"@D@,C,Y(#(X-"`R-SD@,C4T(#DY.3D@.3DY.0HT
  343. XM(#`@,"`Q,B`P(#`@,"`P+C`P,"`Q(#D@,S8@-3,Y(#0S.2`V-2`@("`B`0HT
  344. XM(#`@,"`Q,B`P(#`@,"`P+C`P,"`Q(#D@,S8@,3,Y(#0S.2`V-"`@("`B`0HT
  345. XM(#`@,"`Q,B`P(#`@,"`P+C`P,"`Q(#D@,3(@-3D@,C4Y(#,B`0HT(#`@,"`Q
  346. XM,B`P(#`@,"`P+C`P,"`Q(#D@,3(@-3D@,S,Y(#4B`0HT(#`@,"`Q,B`P(#`@
  347. XM,"`P+C`P,"`Q(#D@,3@@-3<Y(#(P-"`Q,R(!"C0@,"`P(#$R(#`@,"`P(#`N
  348. XM,#`P(#$@.2`Q,B`S.3D@,CDY(#4B`0HT(#`@,"`Q,B`P(#`@,"`P+C`P,"`Q
  349. XM(#D@,3(@,3@Y(#$X-"`X(@$*-"`Q(#`@,3@@,"`P(#`@,"XP,#`@,2`Q-R`S
  350. XM-3@@,S0Y(#$R-"!(;W<@=&\@8W)E871E(&UA='1E<B`H=7-I;F<@9V]L9"!A
  351. X/<R!A;B!E>&%M<&QE*0$*
  352. X`
  353. Xend
  354. END_OF_FILE
  355. if test 3829 -ne `wc -c <'Examples/gold.fig.uu'`; then
  356.     echo shar: \"'Examples/gold.fig.uu'\" unpacked with wrong size!
  357. fi
  358. # end of 'Examples/gold.fig.uu'
  359. fi
  360. if test -f 'd_arc.c' -a "${1}" != "-c" ; then 
  361.   echo shar: Will not clobber existing file \"'d_arc.c'\"
  362. else
  363. echo shar: Extracting \"'d_arc.c'\" \(4526 characters\)
  364. sed "s/^X//" >'d_arc.c' <<'END_OF_FILE'
  365. X/*
  366. X * FIG : Facility for Interactive Generation of figures
  367. X * Copyright (c) 1985 by Supoj Sutanthavibul
  368. X *
  369. X * "Permission to use, copy, modify, distribute, and sell this software and its
  370. X * documentation for any purpose is hereby granted without fee, provided that
  371. X * the above copyright notice appear in all copies and that both that
  372. X * copyright notice and this permission notice appear in supporting
  373. X * documentation, and that the name of M.I.T. not be used in advertising or
  374. X * publicity pertaining to distribution of the software without specific,
  375. X * written prior permission.  M.I.T. makes no representations about the
  376. X * suitability of this software for any purpose.  It is provided "as is"
  377. X * without express or implied warranty."
  378. X *
  379. X */
  380. X
  381. X/********************** DECLARATIONS ********************/
  382. X
  383. X/* IMPORTS */
  384. X
  385. X#include "fig.h"
  386. X#include "resources.h"
  387. X#include "mode.h"
  388. X#include "object.h"
  389. X#include "paintop.h"
  390. X#include "u_create.h"
  391. X#include "u_elastic.h"
  392. X#include "u_list.h"
  393. X#include "w_canvas.h"
  394. X#include "w_mousefun.h"
  395. X
  396. X/* LOCAL */
  397. X
  398. XF_pos        point[3];
  399. X
  400. Xstatic int    create_arcobject();
  401. Xstatic int    get_arcpoint();
  402. Xstatic int    init_arc_drawing();
  403. Xstatic int    cancel_arc();
  404. X
  405. Xarc_drawing_selected()
  406. X{
  407. X    set_mousefun("first point", "", "");
  408. X    canvas_kbd_proc = null_proc;
  409. X    canvas_locmove_proc = null_proc;
  410. X    canvas_leftbut_proc = init_arc_drawing;
  411. X    canvas_middlebut_proc = null_proc;
  412. X    canvas_rightbut_proc = null_proc;
  413. X    set_cursor(arrow_cursor);
  414. X    reset_action_on();
  415. X}
  416. X
  417. Xstatic
  418. Xinit_arc_drawing(x, y)
  419. X    int            x, y;
  420. X{
  421. X    set_mousefun("mid point", "", "cancel");
  422. X    draw_mousefun_canvas();
  423. X    canvas_rightbut_proc = cancel_arc;
  424. X    num_point = 0;
  425. X    point[num_point].x = fix_x = cur_x = x;
  426. X    point[num_point++].y = fix_y = cur_y = y;
  427. X    canvas_locmove_proc = freehand_line;
  428. X    canvas_leftbut_proc = get_arcpoint;
  429. X    canvas_middlebut_proc = null_proc;
  430. X    elastic_line();
  431. X    set_temp_cursor(null_cursor);
  432. X    set_action_on();
  433. X}
  434. X
  435. Xstatic
  436. Xcancel_arc()
  437. X{
  438. X    elastic_line();
  439. X    if (num_point == 2) {
  440. X    /* erase initial part of line */
  441. X    cur_x = point[0].x;
  442. X    cur_y = point[0].y;
  443. X    elastic_line();
  444. X    }
  445. X    arc_drawing_selected();
  446. X    draw_mousefun_canvas();
  447. X}
  448. X
  449. Xstatic
  450. Xget_arcpoint(x, y)
  451. X    int            x, y;
  452. X{
  453. X    if (x == fix_x && y == fix_y)
  454. X    return;
  455. X
  456. X    if (num_point == 1) {
  457. X    set_mousefun("final point", "", "cancel");
  458. X    draw_mousefun_canvas();
  459. X    }
  460. X    if (num_point == 2) {
  461. X    create_arcobject(x, y);
  462. X    return;
  463. X    }
  464. X    elastic_line();
  465. X    cur_x = x;
  466. X    cur_y = y;
  467. X    elastic_line();
  468. X    point[num_point].x = fix_x = x;
  469. X    point[num_point++].y = fix_y = y;
  470. X    elastic_line();
  471. X}
  472. X
  473. Xstatic
  474. Xcreate_arcobject(lx, ly)
  475. X    int            lx, ly;
  476. X{
  477. X    F_arc       *arc;
  478. X    int            x, y, i;
  479. X    float        xx, yy;
  480. X
  481. X    elastic_line();
  482. X    cur_x = lx;
  483. X    cur_y = ly;
  484. X    elastic_line();
  485. X    point[num_point].x = lx;
  486. X    point[num_point++].y = ly;
  487. X    x = point[0].x;
  488. X    y = point[0].y;
  489. X    /* erase previous line segment(s) if necessary */
  490. X    for (i = 1; i < num_point; i++) {
  491. X    pw_vector(canvas_win, x, y, point[i].x, point[i].y, INV_PAINT,
  492. X          1, RUBBER_LINE, 0.0, DEFAULT_COLOR);
  493. X    x = point[i].x;
  494. X    y = point[i].y;
  495. X    }
  496. X    if (!compute_arccenter(point[0], point[1], point[2], &xx, &yy)) {
  497. X    put_msg("Invalid ARC geometry");
  498. X    arc_drawing_selected();
  499. X    draw_mousefun_canvas();
  500. X    return;
  501. X    }
  502. X    if ((arc = create_arc()) == NULL) {
  503. X    arc_drawing_selected();
  504. X    draw_mousefun_canvas();
  505. X    return;
  506. X    }
  507. X    arc->type = T_3_POINTS_ARC;
  508. X    arc->style = cur_linestyle;
  509. X    arc->thickness = cur_linewidth;
  510. X    /* scale dash length according to linethickness */
  511. X    arc->style_val = cur_styleval * (cur_linewidth + 1) / 2;
  512. X    arc->pen = 0;
  513. X    arc->fill_style = cur_fillstyle;
  514. X    arc->color = cur_color;
  515. X    arc->depth = 0;
  516. X    arc->direction = compute_direction(point[0], point[1], point[2]);
  517. X    if (autoforwardarrow_mode)
  518. X    arc->for_arrow = forward_arrow();
  519. X    else
  520. X    arc->for_arrow = NULL;
  521. X    if (autobackwardarrow_mode)
  522. X    arc->back_arrow = backward_arrow();
  523. X    else
  524. X    arc->back_arrow = NULL;
  525. X    arc->center.x = xx;
  526. X    arc->center.y = yy;
  527. X    arc->point[0].x = point[0].x;
  528. X    arc->point[0].y = point[0].y;
  529. X    arc->point[1].x = point[1].x;
  530. X    arc->point[1].y = point[1].y;
  531. X    arc->point[2].x = point[2].x;
  532. X    arc->point[2].y = point[2].y;
  533. X    arc->next = NULL;
  534. X    draw_arc(arc, PAINT);
  535. X    if (appres.DEBUG) {
  536. X    int        xmin, ymin, xmax, ymax;
  537. X
  538. X    arc_bound(arc, &xmin, &ymin, &xmax, &ymax);
  539. X    elastic_box(xmin, ymin, xmax, ymax);
  540. X    }
  541. X    add_arc(arc);
  542. X    arc_drawing_selected();
  543. X    draw_mousefun_canvas();
  544. X}
  545. END_OF_FILE
  546. if test 4526 -ne `wc -c <'d_arc.c'`; then
  547.     echo shar: \"'d_arc.c'\" unpacked with wrong size!
  548. fi
  549. # end of 'd_arc.c'
  550. fi
  551. if test -f 'e_align.c' -a "${1}" != "-c" ; then 
  552.   echo shar: Will not clobber existing file \"'e_align.c'\"
  553. else
  554. echo shar: Extracting \"'e_align.c'\" \(4138 characters\)
  555. sed "s/^X//" >'e_align.c' <<'END_OF_FILE'
  556. X/*
  557. X * FIG : Facility for Interactive Generation of figures
  558. X * Copyright (c) 1985 by Supoj Sutanthavibul
  559. X *
  560. X * "Permission to use, copy, modify, distribute, and sell this software and its
  561. X * documentation for any purpose is hereby granted without fee, provided that
  562. X * the above copyright notice appear in all copies and that both that
  563. X * copyright notice and this permission notice appear in supporting
  564. X * documentation, and that the name of M.I.T. not be used in advertising or
  565. X * publicity pertaining to distribution of the software without specific,
  566. X * written prior permission.  M.I.T. makes no representations about the
  567. X * suitability of this software for any purpose.  It is provided "as is"
  568. X * without express or implied warranty."
  569. X *
  570. X */
  571. X
  572. X#include "fig.h"
  573. X#include "resources.h"
  574. X#include "object.h"
  575. X#include "paintop.h"
  576. X#include "mode.h"
  577. X#include "u_create.h"
  578. X#include "u_draw.h"
  579. X#include "u_search.h"
  580. X#include "u_undo.h"
  581. X#include "w_canvas.h"
  582. X#include "w_mousefun.h"
  583. X
  584. Xstatic int    init_align();
  585. Xstatic int    llx, lly, urx, ury;
  586. Xstatic int    xcmin, ycmin, xcmax, ycmax;
  587. Xstatic int    dx, dy;
  588. Xstatic int    align_arc();
  589. Xstatic int    align_ellipse();
  590. Xstatic int    align_line();
  591. Xstatic int    align_spline();
  592. Xstatic int    align_text();
  593. Xstatic int    align_compound();
  594. Xstatic int    get_dx_dy();
  595. X
  596. Xalign_selected()
  597. X{
  598. X    set_mousefun("align compound", "", "");
  599. X    canvas_kbd_proc = null_proc;
  600. X    canvas_locmove_proc = null_proc;
  601. X    init_searchproc_left(init_align);
  602. X    canvas_leftbut_proc = object_search_left;
  603. X    canvas_middlebut_proc = null_proc;
  604. X    canvas_rightbut_proc = null_proc;
  605. X    set_cursor(pick15_cursor);
  606. X}
  607. X
  608. Xstatic
  609. Xinit_align(p, type, x, y, px, py)
  610. X    char       *p;
  611. X    int            type;
  612. X    int            x, y;
  613. X    int            px, py;
  614. X{
  615. X    if (type != O_COMPOUND)
  616. X    return;
  617. X    cur_c = (F_compound *) p;
  618. X    toggle_compoundmarker(cur_c);
  619. X    draw_compoundelements(cur_c, ERASE);
  620. X    old_c = copy_compound(cur_c);
  621. X    compound_bound(cur_c, &xcmin, &ycmin, &xcmax, &ycmax);
  622. X    align_ellipse();
  623. X    align_arc();
  624. X    align_line();
  625. X    align_spline();
  626. X    align_compound();
  627. X    align_text();
  628. X    /*
  629. X     * recompute the compound's bounding box
  630. X     */
  631. X    compound_bound(cur_c, &cur_c->nwcorner.x, &cur_c->nwcorner.y,
  632. X           &cur_c->secorner.x, &cur_c->secorner.y);
  633. X    draw_compoundelements(cur_c, PAINT);
  634. X    toggle_compoundmarker(cur_c);
  635. X    clean_up();
  636. X    old_c->next = cur_c;
  637. X    set_latestcompound(old_c);
  638. X    set_action_object(F_CHANGE, O_COMPOUND);
  639. X    set_modifiedflag();
  640. X}
  641. X
  642. Xstatic int
  643. Xalign_ellipse()
  644. X{
  645. X    F_ellipse       *e;
  646. X
  647. X    for (e = cur_c->ellipses; e != NULL; e = e->next) {
  648. X    ellipse_bound(e, &llx, &lly, &urx, &ury);
  649. X    get_dx_dy();
  650. X    translate_ellipse(e, dx, dy);
  651. X    }
  652. X}
  653. X
  654. Xstatic int
  655. Xalign_arc()
  656. X{
  657. X    F_arc       *a;
  658. X
  659. X    for (a = cur_c->arcs; a != NULL; a = a->next) {
  660. X    arc_bound(a, &llx, &lly, &urx, &ury);
  661. X    get_dx_dy();
  662. X    translate_arc(a, dx, dy);
  663. X    }
  664. X}
  665. X
  666. Xstatic int
  667. Xalign_line()
  668. X{
  669. X    F_line       *l;
  670. X
  671. X    for (l = cur_c->lines; l != NULL; l = l->next) {
  672. X    line_bound(l, &llx, &lly, &urx, &ury);
  673. X    get_dx_dy();
  674. X    translate_line(l, dx, dy);
  675. X    }
  676. X}
  677. X
  678. Xstatic int
  679. Xalign_spline()
  680. X{
  681. X    F_spline       *s;
  682. X
  683. X    for (s = cur_c->splines; s != NULL; s = s->next) {
  684. X    spline_bound(s, &llx, &lly, &urx, &ury);
  685. X    get_dx_dy();
  686. X    translate_spline(s, dx, dy);
  687. X    }
  688. X}
  689. X
  690. Xstatic int
  691. Xalign_compound()
  692. X{
  693. X    F_compound       *c;
  694. X
  695. X    for (c = cur_c->compounds; c != NULL; c = c->next) {
  696. X    compound_bound(c, &llx, &lly, &urx, &ury);
  697. X    get_dx_dy();
  698. X    translate_compound(c, dx, dy);
  699. X    }
  700. X}
  701. X
  702. Xstatic int
  703. Xalign_text()
  704. X{
  705. X    F_text       *t;
  706. X
  707. X    for (t = cur_c->texts; t != NULL; t = t->next) {
  708. X    text_bound(t, &llx, &lly, &urx, &ury);
  709. X    get_dx_dy();
  710. X    translate_text(t, dx, dy);
  711. X    }
  712. X}
  713. X
  714. Xstatic int
  715. Xget_dx_dy()
  716. X{
  717. X    switch (cur_valign) {
  718. X    case NONE:
  719. X    dy = 0;
  720. X    break;
  721. X    case TOP:
  722. X    dy = ycmin - lly;
  723. X    break;
  724. X    case BOTTOM:
  725. X    dy = ycmax - ury;
  726. X    break;
  727. X    case CENTER:
  728. X    dy = (ycmin - lly) + (abs(ycmin - lly) + abs(ycmax - ury)) / 2;
  729. X    break;
  730. X    }
  731. X    switch (cur_halign) {
  732. X    case NONE:
  733. X    dx = 0;
  734. X    break;
  735. X    case LEFT:
  736. X    dx = xcmin - llx;
  737. X    break;
  738. X    case RIGHT:
  739. X    dx = xcmax - urx;
  740. X    break;
  741. X    case CENTER:
  742. X    dx = (xcmin - llx) + (abs(xcmin - llx) + abs(xcmax - urx)) / 2;
  743. X    break;
  744. X    }
  745. X}
  746. END_OF_FILE
  747. if test 4138 -ne `wc -c <'e_align.c'`; then
  748.     echo shar: \"'e_align.c'\" unpacked with wrong size!
  749. fi
  750. # end of 'e_align.c'
  751. fi
  752. if test -f 'f_util.c' -a "${1}" != "-c" ; then 
  753.   echo shar: Will not clobber existing file \"'f_util.c'\"
  754. else
  755. echo shar: Extracting \"'f_util.c'\" \(3768 characters\)
  756. sed "s/^X//" >'f_util.c' <<'END_OF_FILE'
  757. X/*
  758. X * FIG : Facility for Interactive Generation of figures
  759. X * Copyright (c) 1985 by Supoj Sutanthavibul
  760. X *
  761. X * "Permission to use, copy, modify, distribute, and sell this software and its
  762. X * documentation for any purpose is hereby granted without fee, provided that
  763. X * the above copyright notice appear in all copies and that both that
  764. X * copyright notice and this permission notice appear in supporting
  765. X * documentation, and that the name of M.I.T. not be used in advertising or
  766. X * publicity pertaining to distribution of the software without specific,
  767. X * written prior permission.  M.I.T. makes no representations about the
  768. X * suitability of this software for any purpose.  It is provided "as is"
  769. X * without express or implied warranty."
  770. X *
  771. X */
  772. X
  773. X#include "fig.h"
  774. X#include "object.h"
  775. X#include "mode.h"
  776. X#include "resources.h"
  777. X#include "w_util.h"
  778. X
  779. Xint
  780. Xemptyname(name)
  781. X    char        name[];
  782. X
  783. X{
  784. X    if (*name == '\0') {
  785. X    return (1);
  786. X    } else {
  787. X    return (0);
  788. X    }
  789. X}
  790. X
  791. Xint
  792. Xemptyname_msg(name, msg)
  793. X    char        name[], msg[];
  794. X
  795. X{
  796. X    int            returnval;
  797. X
  798. X    if (returnval = emptyname(name))
  799. X    put_msg("No file name specified, %s command ignored", msg);
  800. X    return (returnval);
  801. X}
  802. X
  803. Xint
  804. Xemptyfigure()
  805. X{
  806. X    if (objects.texts != NULL)
  807. X    return (0);
  808. X    if (objects.lines != NULL)
  809. X    return (0);
  810. X    if (objects.ellipses != NULL)
  811. X    return (0);
  812. X    if (objects.splines != NULL)
  813. X    return (0);
  814. X    if (objects.arcs != NULL)
  815. X    return (0);
  816. X    if (objects.compounds != NULL)
  817. X    return (0);
  818. X    return (1);
  819. X}
  820. X
  821. Xint
  822. Xemptyfigure_msg(msg)
  823. X    char        msg[];
  824. X
  825. X{
  826. X    int            returnval;
  827. X
  828. X    if (returnval = emptyfigure())
  829. X    put_msg("Empty figure, %s command ignored", msg);
  830. X    return (returnval);
  831. X}
  832. X
  833. Xint
  834. Xchange_directory(path)
  835. X    char       *path;
  836. X{
  837. X    if (path == NULL) {
  838. X    *cur_dir = '\0';
  839. X    return (0);
  840. X    }
  841. X    if (chdir(path) == -1) {
  842. X    put_msg("Can't go to directory %s, : %s", path, sys_errlist[errno]);
  843. X    return (1);
  844. X    }
  845. X    if (get_directory(cur_dir) != NULL) /* get cwd */
  846. X    return (0);
  847. X    else
  848. X    return (1);
  849. X}
  850. X
  851. Xget_directory(direct)
  852. X    char       *direct;
  853. X{
  854. X#if defined(SYSV) || defined(SVR4)
  855. X    extern char       *getcwd();
  856. X
  857. X#else
  858. X    extern char       *getwd();
  859. X
  860. X#endif
  861. X
  862. X#if defined(SYSV) || defined(SVR4)
  863. X    if (getcwd(direct, 1024) == NULL) {    /* get current working dir */
  864. X    put_msg("%s", "Can't get current directory");
  865. X#else
  866. X    if (getwd(direct) == NULL) {/* get current working dir */
  867. X    put_msg("%s", direct);    /* err msg is in directory */
  868. X#endif
  869. X    *direct = '\0';
  870. X    return NULL;
  871. X    }
  872. X    return 1;
  873. X}
  874. X
  875. X#ifndef S_IWUSR
  876. X#define S_IWUSR 0000200
  877. X#endif
  878. X#ifndef S_IWGRP
  879. X#define S_IWGRP 0000020
  880. X#endif
  881. X#ifndef S_IWOTH
  882. X#define S_IWOTH 0000002
  883. X#endif
  884. X
  885. Xint
  886. Xok_to_write(file_name, op_name)
  887. X    char       *file_name, *op_name;
  888. X{
  889. X    struct stat        file_status;
  890. X    char        string[180];
  891. X
  892. X    if (stat(file_name, &file_status) == 0) {    /* file exists */
  893. X    if (file_status.st_mode & S_IFDIR) {
  894. X        put_msg("\"%s\" is a directory", file_name);
  895. X        return (0);
  896. X    }
  897. X    if (file_status.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) {
  898. X        /* writing is permitted by SOMEONE */
  899. X        if (!((file_status.st_mode & S_IWUSR) &&    /* user writable */
  900. X          (file_status.st_uid == geteuid()))
  901. X        &&
  902. X        !((file_status.st_mode & S_IWGRP) &&    /* group writable */
  903. X          (file_status.st_gid == getegid()))
  904. X        &&
  905. X        !(file_status.st_mode & S_IWOTH)) {    /* world writable */
  906. X        put_msg("Write permission for \"%s\" is denied", file_name);
  907. X        return (0);
  908. X        } else {
  909. X        sprintf(string, "\"%s\" already exists.\nDo you want to overwrite it?", file_name);
  910. X        if (!popup_query(QUERY_YES, string)) {
  911. X            put_msg("%s cancelled", op_name);
  912. X            return (0);
  913. X        }
  914. X        }
  915. X    } else {
  916. X        put_msg("\"%s\" is read only", file_name);
  917. X        return (0);
  918. X    }
  919. X    } else if (errno != ENOENT)
  920. X    return (0);        /* file does exist but stat fails */
  921. X
  922. X    return (1);
  923. X}
  924. END_OF_FILE
  925. if test 3768 -ne `wc -c <'f_util.c'`; then
  926.     echo shar: \"'f_util.c'\" unpacked with wrong size!
  927. fi
  928. # end of 'f_util.c'
  929. fi
  930. if test -f 'u_fonts.c' -a "${1}" != "-c" ; then 
  931.   echo shar: Will not clobber existing file \"'u_fonts.c'\"
  932. else
  933. echo shar: Extracting \"'u_fonts.c'\" \(4046 characters\)
  934. sed "s/^X//" >'u_fonts.c' <<'END_OF_FILE'
  935. X/*
  936. X * FIG : Facility for Interactive Generation of figures
  937. X * Copyright (c) 1985 by Supoj Sutanthavibul
  938. X *
  939. X * "Permission to use, copy, modify, distribute, and sell this software and its
  940. X * documentation for any purpose is hereby granted without fee, provided that
  941. X * the above copyright notice appear in all copies and that both that
  942. X * copyright notice and this permission notice appear in supporting
  943. X * documentation, and that the name of M.I.T. not be used in advertising or
  944. X * publicity pertaining to distribution of the software without specific,
  945. X * written prior permission.  M.I.T. makes no representations about the
  946. X * suitability of this software for any purpose.  It is provided "as is"
  947. X * without express or implied warranty."
  948. X *
  949. X */
  950. X
  951. X#include <X11/Xlib.h>
  952. X#include "u_fonts.h"
  953. X#include "object.h"
  954. X
  955. X#define NULL 0
  956. X
  957. X/* printer font names for indicator window */
  958. X
  959. Xstruct _xfstruct x_fontinfo[NUM_X_FONTS] = {
  960. X    {"-adobe-times-medium-r-*--*", NULL},
  961. X    {"-adobe-times-medium-i-*--*", NULL},
  962. X    {"-adobe-times-bold-r-*--*", NULL},
  963. X    {"-adobe-times-bold-i-*--*", NULL},
  964. X    {"-schumacher-clean-medium-r-*--*", NULL},
  965. X    {"-schumacher-clean-medium-i-*--*", NULL},
  966. X    {"-schumacher-clean-bold-r-*--*", NULL},
  967. X    {"-schumacher-clean-bold-i-*--*", NULL},
  968. X    {"-adobe-courier-medium-r-*--*", NULL},
  969. X    {"-adobe-courier-medium-o-*--*", NULL},
  970. X    {"-adobe-courier-bold-r-*--*", NULL},
  971. X    {"-adobe-courier-bold-o-*--*", NULL},
  972. X    {"-adobe-helvetica-medium-r-*--*", NULL},
  973. X    {"-adobe-helvetica-medium-o-*--*", NULL},
  974. X    {"-adobe-helvetica-bold-r-*--*", NULL},
  975. X    {"-adobe-helvetica-bold-o-*--*", NULL},
  976. X    {"-adobe-new century schoolbook-medium-r-*--*", NULL},
  977. X    {"-adobe-new century schoolbook-medium-i-*--*", NULL},
  978. X    {"-adobe-new century schoolbook-bold-r-*--*", NULL},
  979. X    {"-adobe-new century schoolbook-bold-i-*--*", NULL},
  980. X    {"-*-lucidabright-medium-r-*--*", NULL},
  981. X    {"-*-lucidabright-medium-i-*--*", NULL},
  982. X    {"-*-lucidabright-demibold-r-*--*", NULL},
  983. X    {"-*-lucidabright-demibold-i-*--*", NULL},
  984. X    {"*-symbol-medium-r-*--*", NULL},
  985. X    {"-*-zapfchancery-medium-i-*--*", NULL},
  986. X    {"-*-zapfdingbats-*-*-*--*", NULL},
  987. X};
  988. X
  989. Xstruct _fstruct ps_fontinfo[NUM_PS_FONTS + 1] = {
  990. X    {"Default", -1},
  991. X    {"Times-Roman", 0},
  992. X    {"Times-Italic", 1},
  993. X    {"Times-Bold", 2},
  994. X    {"Times-BoldItalic", 3},
  995. X    {"AvantGarde-Book", 4},
  996. X    {"AvantGarde-BookOblique", 5},
  997. X    {"AvantGarde-Demi", 6},
  998. X    {"AvantGarde-DemiOblique", 7},
  999. X    {"Bookman-Light", 0},
  1000. X    {"Bookman-LightItalic", 0},
  1001. X    {"Bookman-Demi", 0},
  1002. X    {"Bookman-DemiItalic", 0},
  1003. X    {"Courier", 8},
  1004. X    {"Courier-Oblique", 9},
  1005. X    {"Courier-Bold", 10},
  1006. X    {"Courier-BoldOblique", 11},
  1007. X    {"Helvetica", 12},
  1008. X    {"Helvetica-Oblique", 13},
  1009. X    {"Helvetica-Bold", 14},
  1010. X    {"Helvetica-BoldOblique", 15},
  1011. X    {"Helvetica-Narrow", 0},
  1012. X    {"Helvetica-Narrow-Oblique", 0},
  1013. X    {"Helvetica-Narrow-Bold", 0},
  1014. X    {"Helvetica-Narrow-BoldOblique", 0},
  1015. X    {"NewCenturySchlbk-Roman", 16},
  1016. X    {"NewCenturySchlbk-Italic", 17},
  1017. X    {"NewCenturySchlbk-Bold", 18},
  1018. X    {"NewCenturySchlbk-BoldItalic", 19},
  1019. X    {"Palatino-Roman", 20},
  1020. X    {"Palatino-Italic", 21},
  1021. X    {"Palatino-Bold", 22},
  1022. X    {"Palatino-BoldItalic", 23},
  1023. X    {"Symbol", 24},
  1024. X    {"ZapfChancery-MediumItalic", 25},
  1025. X    {"ZapfDingbats", 26},
  1026. X};
  1027. X
  1028. Xstruct _fstruct latex_fontinfo[NUM_LATEX_FONTS] = {
  1029. X    {"Default", 0},
  1030. X    {"Roman", 0},
  1031. X    {"Bold", 2},
  1032. X    {"Italic", 1},
  1033. X    {"Modern", 12},
  1034. X    {"Typewriter", 8},
  1035. X};
  1036. X
  1037. Xx_fontnum(psflag, fnum)
  1038. X    int            psflag, fnum;
  1039. X{
  1040. X    return (psflag ? ps_fontinfo[fnum + 1].xfontnum :
  1041. X        latex_fontinfo[fnum].xfontnum);
  1042. X}
  1043. X
  1044. Xpsfontnum(font)
  1045. Xchar *font;
  1046. X{
  1047. X    int i;
  1048. X
  1049. X    if (font == NULL)
  1050. X    return(DEF_PS_FONT);
  1051. X    for (i=0; i<NUM_PS_FONTS; i++)
  1052. X    if (strcmp(ps_fontinfo[i].name, font) == 0)
  1053. X        return (i-1);
  1054. X    return(DEF_PS_FONT);
  1055. X}
  1056. X
  1057. Xlatexfontnum(font)
  1058. Xchar *font;
  1059. X{
  1060. X    int i;
  1061. X
  1062. X    if (font == NULL)
  1063. X    return(DEF_LATEX_FONT);
  1064. X    for (i=0; i<NUM_LATEX_FONTS; i++)
  1065. X    if (strcmp(latex_fontinfo[i].name, font) == 0)
  1066. X        return (i);
  1067. X    return(DEF_LATEX_FONT);
  1068. X}
  1069. END_OF_FILE
  1070. if test 4046 -ne `wc -c <'u_fonts.c'`; then
  1071.     echo shar: \"'u_fonts.c'\" unpacked with wrong size!
  1072. fi
  1073. # end of 'u_fonts.c'
  1074. fi
  1075. if test -f 'u_print.c' -a "${1}" != "-c" ; then 
  1076.   echo shar: Will not clobber existing file \"'u_print.c'\"
  1077. else
  1078. echo shar: Extracting \"'u_print.c'\" \(3648 characters\)
  1079. sed "s/^X//" >'u_print.c' <<'END_OF_FILE'
  1080. X/*
  1081. X * FIG : Facility for Interactive Generation of figures
  1082. X * Copyright (c) 1985 by Supoj Sutanthavibul
  1083. X *
  1084. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1085. X * documentation for any purpose is hereby granted without fee, provided that
  1086. X * the above copyright notice appear in all copies and that both that
  1087. X * copyright notice and this permission notice appear in supporting
  1088. X * documentation, and that the name of M.I.T. not be used in advertising or
  1089. X * publicity pertaining to distribution of the software without specific,
  1090. X * written prior permission.  M.I.T. makes no representations about the
  1091. X * suitability of this software for any purpose.  It is provided "as is"
  1092. X * without express or implied warranty."
  1093. X *
  1094. X */
  1095. X
  1096. X#include "fig.h"
  1097. X#include "mode.h"
  1098. X#include "resources.h"
  1099. X
  1100. Xprint_to_printer(printer, center, mag)
  1101. X    char        printer[];
  1102. X    int            center;
  1103. X    float        mag;
  1104. X{
  1105. X    char        prcmd[200], translator[60], syspr[60];
  1106. X    char        tmpfile[32];
  1107. X
  1108. X    sprintf(tmpfile, "%s%06d", "/tmp/xfig-print", getpid());
  1109. X    if (write_file(tmpfile))
  1110. X    return;
  1111. X
  1112. X    sprintf(translator, "fig2dev -Lps %s -P -m %f %s",
  1113. X        center ? "-c" : "",
  1114. X        mag,
  1115. X        print_landscape ? "-l xxx" : " ");
  1116. X
  1117. X    if (emptyname(printer)) {    /* send to default printer */
  1118. X#if defined(SYSV) || defined(SVR4)
  1119. X    sprintf(syspr, "lp -oPS");
  1120. X#else
  1121. X    sprintf(syspr, "lpr -J %s", cur_filename);
  1122. X#endif
  1123. X    put_msg("Printing figure on default printer in %s mode ...     ",
  1124. X        print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1125. X    } else {
  1126. X#if defined(SYSV) || defined(SVR4)
  1127. X    sprintf(syspr, "lp -d%s -oPS", printer);
  1128. X#else
  1129. X    sprintf(syspr, "lpr -J %s -P%s", cur_filename, printer);
  1130. X#endif
  1131. X    put_msg("Printing figure on printer %s in %s mode ...     ",
  1132. X        printer, print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1133. X    }
  1134. X
  1135. X    app_flush();        /* make sure message gets displayed */
  1136. X
  1137. X    /* make up the whole translate/print command */
  1138. X    sprintf(prcmd, "%s %s | %s", translator, tmpfile, syspr);
  1139. X    if (system(prcmd) == 127)
  1140. X    put_msg("Error during PRINT (unable to find fig2dev?)");
  1141. X    else {
  1142. X    if (emptyname(printer))
  1143. X        put_msg("Printing figure on printer %s in %s mode ... done",
  1144. X            printer, print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1145. X    else
  1146. X        put_msg("Printing figure on printer %s in %s mode ... done",
  1147. X            printer, print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1148. X    }
  1149. X    unlink(tmpfile);
  1150. X}
  1151. X
  1152. Xprint_to_file(file, lang, mag, center)
  1153. X    char       *file, *lang;
  1154. X    float        mag;
  1155. X{
  1156. X    char        prcmd[200];
  1157. X    char        tmpfile[32];
  1158. X
  1159. X    if (!ok_to_write(file, "EXPORT"))
  1160. X    return (1);
  1161. X
  1162. X    sprintf(tmpfile, "%s%06d", "/tmp/xfig-export", getpid());
  1163. X    if (write_file(tmpfile))
  1164. X    return (1);
  1165. X
  1166. X    put_msg("Exporting figure to file \"%s\" in %s mode ...     ",
  1167. X        file, print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1168. X    app_flush();        /* make sure message gets displayed */
  1169. X
  1170. X    if (!strncmp(lang, "ps", 2))
  1171. X    sprintf(prcmd, "fig2dev -Lps %s -P -m %f %s %s %s", center ? "-c" : "",
  1172. X        mag, print_landscape ? "-l xxx" : " ", tmpfile, file);
  1173. X    else if (!strncmp(lang, "eps", 3))
  1174. X    sprintf(prcmd, "fig2dev -Lps -m %f %s %s %s",
  1175. X        mag, print_landscape ? "-l xxx" : " ", tmpfile, file);
  1176. X    else if (!strncmp(lang, "ibmgl", 5))
  1177. X    sprintf(prcmd, "fig2dev -Libmgl -m %f %s %s %s",
  1178. X        mag, print_landscape ? " " : "-P", tmpfile, file);
  1179. X    else
  1180. X    sprintf(prcmd, "fig2dev -L%s -m %f %s %s", lang,
  1181. X        mag, tmpfile, file);
  1182. X    if (system(prcmd) == 127)
  1183. X    put_msg("Error during EXPORT (unable to find fig2dev?)");
  1184. X    else
  1185. X    put_msg("Exporting figure to file \"%s\" in %s mode ... done",
  1186. X        file, print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1187. X
  1188. X    unlink(tmpfile);
  1189. X    return (0);
  1190. X}
  1191. END_OF_FILE
  1192. if test 3648 -ne `wc -c <'u_print.c'`; then
  1193.     echo shar: \"'u_print.c'\" unpacked with wrong size!
  1194. fi
  1195. # end of 'u_print.c'
  1196. fi
  1197. if test -f 'w_cursor.c' -a "${1}" != "-c" ; then 
  1198.   echo shar: Will not clobber existing file \"'w_cursor.c'\"
  1199. else
  1200. echo shar: Extracting \"'w_cursor.c'\" \(4054 characters\)
  1201. sed "s/^X//" >'w_cursor.c' <<'END_OF_FILE'
  1202. X/*
  1203. X * FIG : Facility for Interactive Generation of figures
  1204. X * Copyright (c) 1985 by Supoj Sutanthavibul
  1205. X *
  1206. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1207. X * documentation for any purpose is hereby granted without fee, provided that
  1208. X * the above copyright notice appear in all copies and that both that
  1209. X * copyright notice and this permission notice appear in supporting
  1210. X * documentation, and that the name of M.I.T. not be used in advertising or
  1211. X * publicity pertaining to distribution of the software without specific,
  1212. X * written prior permission.  M.I.T. makes no representations about the
  1213. X * suitability of this software for any purpose.  It is provided "as is"
  1214. X * without express or implied warranty."
  1215. X *
  1216. X */
  1217. X
  1218. X#include "fig.h"
  1219. X#include "resources.h"
  1220. X#include "paintop.h"
  1221. X
  1222. XCursor    null_cursor;
  1223. XCursor    arrow_cursor;
  1224. XCursor    bull_cursor;
  1225. XCursor    buster_cursor;
  1226. XCursor    char_cursor;
  1227. XCursor    crosshair_cursor;
  1228. XCursor    magnifier_cursor;
  1229. XCursor    pencil_cursor;
  1230. XCursor    pick15_cursor;
  1231. XCursor    pick9_cursor;
  1232. XCursor    vbar_cursor;
  1233. XCursor    wait_cursor;
  1234. XCursor    panel_cursor;
  1235. XCursor    l_arrow_cursor;
  1236. XCursor    r_arrow_cursor;
  1237. XCursor    lr_arrow_cursor;
  1238. XCursor    u_arrow_cursor;
  1239. XCursor    d_arrow_cursor;
  1240. XCursor    ud_arrow_cursor;
  1241. XCursor    cur_cursor;
  1242. X
  1243. Xinit_cursor()
  1244. X{
  1245. X    register Display *d = tool_d;
  1246. X    cur_cursor        = arrow_cursor;  /* current cursor */
  1247. X
  1248. X    arrow_cursor    = XCreateFontCursor(d, XC_left_ptr);
  1249. X    bull_cursor        = XCreateFontCursor(d, XC_circle);
  1250. X    buster_cursor    = XCreateFontCursor(d, XC_pirate);
  1251. X    char_cursor        = XCreateFontCursor(d, XC_question_arrow);
  1252. X    crosshair_cursor    = XCreateFontCursor(d, XC_crosshair);
  1253. X    null_cursor        = XCreateFontCursor(d, XC_tcross);
  1254. X    magnifier_cursor    = XCreateFontCursor(d, XC_question_arrow);
  1255. X    pencil_cursor    = XCreateFontCursor(d, XC_pencil);
  1256. X    pick15_cursor    = XCreateFontCursor(d, XC_dotbox);
  1257. X    pick9_cursor    = XCreateFontCursor(d, XC_hand1);
  1258. X    vbar_cursor        = XCreateFontCursor(d, XC_xterm);
  1259. X    wait_cursor        = XCreateFontCursor(d, XC_watch);
  1260. X    panel_cursor    = XCreateFontCursor(d, XC_icon);
  1261. X    lr_arrow_cursor    = XCreateFontCursor(d, XC_sb_h_double_arrow);
  1262. X    l_arrow_cursor    = XCreateFontCursor(d, XC_sb_left_arrow);
  1263. X    r_arrow_cursor    = XCreateFontCursor(d, XC_sb_right_arrow);
  1264. X    ud_arrow_cursor    = XCreateFontCursor(d, XC_sb_v_double_arrow);
  1265. X    u_arrow_cursor    = XCreateFontCursor(d, XC_sb_up_arrow);
  1266. X    d_arrow_cursor    = XCreateFontCursor(d, XC_sb_down_arrow);
  1267. X}
  1268. X
  1269. Xrecolor_cursors()
  1270. X{
  1271. X    register Display *d = tool_d;
  1272. X
  1273. X    XRecolorCursor(d, arrow_cursor,     &x_fg_color, &x_bg_color);
  1274. X    XRecolorCursor(d, bull_cursor,      &x_fg_color, &x_bg_color);
  1275. X    XRecolorCursor(d, buster_cursor,    &x_fg_color, &x_bg_color);
  1276. X    XRecolorCursor(d, char_cursor,      &x_fg_color, &x_bg_color);
  1277. X    XRecolorCursor(d, crosshair_cursor, &x_fg_color, &x_bg_color);
  1278. X    XRecolorCursor(d, null_cursor,      &x_fg_color, &x_bg_color);
  1279. X    XRecolorCursor(d, magnifier_cursor, &x_fg_color, &x_bg_color);
  1280. X    XRecolorCursor(d, pencil_cursor,    &x_fg_color, &x_bg_color);
  1281. X    XRecolorCursor(d, pick15_cursor,    &x_fg_color, &x_bg_color);
  1282. X    XRecolorCursor(d, pick9_cursor,     &x_fg_color, &x_bg_color);
  1283. X    XRecolorCursor(d, vbar_cursor,      &x_fg_color, &x_bg_color);
  1284. X    XRecolorCursor(d, wait_cursor,      &x_fg_color, &x_bg_color);
  1285. X    XRecolorCursor(d, panel_cursor,     &x_fg_color, &x_bg_color);
  1286. X    XRecolorCursor(d, l_arrow_cursor,   &x_fg_color, &x_bg_color);
  1287. X    XRecolorCursor(d, r_arrow_cursor,   &x_fg_color, &x_bg_color);
  1288. X    XRecolorCursor(d, lr_arrow_cursor,  &x_fg_color, &x_bg_color);
  1289. X    XRecolorCursor(d, u_arrow_cursor,   &x_fg_color, &x_bg_color);
  1290. X    XRecolorCursor(d, d_arrow_cursor,   &x_fg_color, &x_bg_color);
  1291. X    XRecolorCursor(d, ud_arrow_cursor,  &x_fg_color, &x_bg_color);
  1292. X}
  1293. X
  1294. Xreset_cursor()
  1295. X{
  1296. X    XDefineCursor(tool_d, canvas_win, cur_cursor);
  1297. X}
  1298. X
  1299. Xset_temp_cursor(cursor)
  1300. X    Cursor        cursor;
  1301. X{
  1302. X    XDefineCursor(tool_d, canvas_win, cursor);
  1303. X}
  1304. X
  1305. Xset_cursor(cursor)
  1306. X    Cursor        cursor;
  1307. X{
  1308. X    cur_cursor = cursor;
  1309. X    XDefineCursor(tool_d, canvas_win, cursor);
  1310. X}
  1311. X
  1312. END_OF_FILE
  1313. if test 4054 -ne `wc -c <'w_cursor.c'`; then
  1314.     echo shar: \"'w_cursor.c'\" unpacked with wrong size!
  1315. fi
  1316. # end of 'w_cursor.c'
  1317. fi
  1318. if test -f 'w_grid.c' -a "${1}" != "-c" ; then 
  1319.   echo shar: Will not clobber existing file \"'w_grid.c'\"
  1320. else
  1321. echo shar: Extracting \"'w_grid.c'\" \(4267 characters\)
  1322. sed "s/^X//" >'w_grid.c' <<'END_OF_FILE'
  1323. X/*
  1324. X * FIG : Facility for Interactive Generation of figures
  1325. X * Copyright (c) 1985 by Supoj Sutanthavibul
  1326. X *
  1327. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1328. X * documentation for any purpose is hereby granted without fee, provided that
  1329. X * the above copyright notice appear in all copies and that both that
  1330. X * copyright notice and this permission notice appear in supporting
  1331. X * documentation, and that the name of M.I.T. not be used in advertising or
  1332. X * publicity pertaining to distribution of the software without specific,
  1333. X * written prior permission.  M.I.T. makes no representations about the
  1334. X * suitability of this software for any purpose.  It is provided "as is"
  1335. X * without express or implied warranty."
  1336. X *
  1337. X */
  1338. X
  1339. X#include "fig.h"
  1340. X#include "resources.h"
  1341. X#include "mode.h"
  1342. X#include "paintop.h"
  1343. X#include "object.h"
  1344. X#include "w_setup.h"
  1345. X#include "w_util.h"
  1346. X#include "w_zoom.h"
  1347. X
  1348. X#define null_width 32
  1349. X#define null_height 32
  1350. X
  1351. X#define MMTOPIX 3
  1352. X#define IN16TOPIX 5
  1353. X
  1354. Xstatic char    null_bits[null_width * null_height / 8] = {0};
  1355. X
  1356. Xstatic Pixmap    null_pm, grid_pm = 0;
  1357. Xstatic unsigned long bg, fg;
  1358. X
  1359. Xinit_grid()
  1360. X{
  1361. X    DeclareArgs(2);
  1362. X
  1363. X    FirstArg(XtNbackground, &bg);
  1364. X    NextArg(XtNforeground, &fg);
  1365. X    GetValues(canvas_sw);
  1366. X
  1367. X    null_pm = XCreatePixmapFromBitmapData(tool_d, canvas_win,
  1368. X                      null_bits, null_width, null_height,
  1369. X                      fg, bg, DefaultDepthOfScreen(tool_s));
  1370. X
  1371. X    if (appres.INCHES) {
  1372. X    posn_rnd[P_MAGNET] = 5; /* 1 x 1/8" */
  1373. X    posn_hlf[P_MAGNET] = 3;
  1374. X    posn_rnd[P_GRID1] = 20; /* 4 x 1/8" */
  1375. X    posn_hlf[P_GRID1] = 10;
  1376. X    posn_rnd[P_GRID2] = 40; /* 8 x 1/8" */
  1377. X    posn_hlf[P_GRID2] = 20;
  1378. X    grid_name[P_MAGNET] = "1/16 in";
  1379. X    grid_name[P_GRID1] = "1/4 in";
  1380. X    grid_name[P_GRID2] = "1/2 in";
  1381. X    grid_fine[P_GRID1] = 1 * IN16TOPIX;    /* 1 x 1/16" */
  1382. X    grid_coarse[P_GRID1] = 4 * IN16TOPIX;    /* 4 x 1/16" */
  1383. X    grid_fine[P_GRID2] = 1 * IN16TOPIX;    /* 1 x 1/16" */
  1384. X    grid_coarse[P_GRID2] = 8 * IN16TOPIX;    /* 8 x 1/16" */
  1385. X    } else {
  1386. X    posn_rnd[P_MAGNET] = 3; /* 1 mm */
  1387. X    posn_hlf[P_MAGNET] = 2;
  1388. X    posn_rnd[P_GRID1] = 15; /* 5 mm */
  1389. X    posn_hlf[P_GRID1] = 7;
  1390. X    posn_rnd[P_GRID2] = 30; /* 10 mm */
  1391. X    posn_hlf[P_GRID2] = 15;
  1392. X    grid_name[P_MAGNET] = "1 mm";
  1393. X    grid_name[P_GRID1] = "5 mm";
  1394. X    grid_name[P_GRID2] = "10 mm";
  1395. X    grid_fine[P_GRID1] = 1 * MMTOPIX;    /* 1 mm */
  1396. X    grid_coarse[P_GRID1] = 5 * MMTOPIX;    /* 5 mm */
  1397. X    grid_fine[P_GRID2] = 2 * MMTOPIX;    /* 2 mm */
  1398. X    grid_coarse[P_GRID2] = 10 * MMTOPIX;    /* 10 mm */
  1399. X    }
  1400. X}
  1401. X
  1402. X/* grid in X11 is simply the background of the canvas */
  1403. X
  1404. Xsetup_grid(grid)
  1405. X    int            grid;
  1406. X{
  1407. X    int            coarse, fine, dim, x, x0c, x0f, y, y0c, y0f;
  1408. X    static        prev_grid = -1;
  1409. X
  1410. X    DeclareArgs(1);
  1411. X
  1412. X    if (grid == GRID_0) {
  1413. X    FirstArg(XtNbackgroundPixmap, null_pm);
  1414. X    } else {
  1415. X    if (grid == GRID_1) {
  1416. X        coarse = (int) (grid_coarse[P_GRID1] * zoomscale);
  1417. X        fine = (int) (grid_fine[P_GRID1] * zoomscale);
  1418. X    } else {
  1419. X        coarse = (int) (grid_coarse[P_GRID2] * zoomscale);
  1420. X        fine = (int) (grid_fine[P_GRID2] * zoomscale);
  1421. X    }
  1422. X
  1423. X    if (!coarse && !fine) { /* grid values both zero */
  1424. X        FirstArg(XtNbackgroundPixmap, null_pm);
  1425. X    }
  1426. X    if (coarse == 0) {    /* coarse must be <> 0 */
  1427. X        coarse = fine;
  1428. X        fine = 0;
  1429. X    }
  1430. X    dim = (coarse > 64) ? coarse : (64 / coarse + 1) * coarse;
  1431. X
  1432. X    if (grid_pm)
  1433. X        XFreePixmap(tool_d, grid_pm);
  1434. X    grid_pm = XCreatePixmap(tool_d, canvas_win, dim, dim,
  1435. X                DefaultDepthOfScreen(tool_s));
  1436. X    XSetForeground(tool_d, gc, bg);
  1437. X    XFillRectangle(tool_d, grid_pm, gc, 0, 0, dim, dim);
  1438. X    XSetForeground(tool_d, gc, fg);
  1439. X    x0c = -(zoomscale * zoomxoff) % coarse - zoomscale;
  1440. X    y0c = -(zoomscale * zoomyoff) % coarse - zoomscale;
  1441. X    if (fine) {
  1442. X        x0f = -(zoomscale * zoomxoff) % fine - zoomscale;
  1443. X        y0f = -(zoomscale * zoomyoff) % fine - zoomscale;
  1444. X        for (x = x0c; x < dim; x += coarse)
  1445. X        for (y = y0f; y < dim; y += fine)
  1446. X            XDrawPoint(tool_d, grid_pm, gc, x, y);
  1447. X        for (y = y0c; y < dim; y += coarse)
  1448. X        for (x = x0f; x < dim; x += fine)
  1449. X            XDrawPoint(tool_d, grid_pm, gc, x, y);
  1450. X    } else {
  1451. X        for (x = x0c; x < dim; x += coarse)
  1452. X        for (y = y0c; y < dim; y += coarse)
  1453. X            XDrawPoint(tool_d, grid_pm, gc, x, y);
  1454. X    }
  1455. X
  1456. X    FirstArg(XtNbackgroundPixmap, grid_pm);
  1457. X    }
  1458. X    SetValues(canvas_sw);
  1459. X    if (prev_grid == GRID_0 && grid == GRID_0)
  1460. X    redisplay_canvas();
  1461. X    prev_grid = grid;
  1462. X}
  1463. X
  1464. Xredisplay_grid()
  1465. X{
  1466. X}
  1467. END_OF_FILE
  1468. if test 4267 -ne `wc -c <'w_grid.c'`; then
  1469.     echo shar: \"'w_grid.c'\" unpacked with wrong size!
  1470. fi
  1471. # end of 'w_grid.c'
  1472. fi
  1473. if test -f 'w_zoom.c' -a "${1}" != "-c" ; then 
  1474.   echo shar: Will not clobber existing file \"'w_zoom.c'\"
  1475. else
  1476. echo shar: Extracting \"'w_zoom.c'\" \(4003 characters\)
  1477. sed "s/^X//" >'w_zoom.c' <<'END_OF_FILE'
  1478. X/*
  1479. X * FIG : Facility for Interactive Generation of figures
  1480. X * Copyright (c) 1991 by Henning Spruth (hns@regent.e-technik.tu-muenchen.de)
  1481. X *
  1482. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1483. X * documentation for any purpose is hereby granted without fee, provided that
  1484. X * the above copyright notice appear in all copies and that both that
  1485. X * copyright notice and this permission notice appear in supporting
  1486. X * documentation, and that the name of M.I.T. not be used in advertising or
  1487. X * publicity pertaining to distribution of the software without specific,
  1488. X * written prior permission.  M.I.T. makes no representations about the
  1489. X * suitability of this software for any purpose.  It is provided "as is"
  1490. X * without express or implied warranty."
  1491. X *
  1492. X */
  1493. X
  1494. X#include <X11/keysym.h>
  1495. X#include "fig.h"
  1496. X#include "mode.h"
  1497. X#include "object.h"
  1498. X#include "paintop.h"
  1499. X#include "resources.h"
  1500. X#include "u_create.h"
  1501. X#include "u_elastic.h"
  1502. X#include "w_canvas.h"
  1503. X#include "w_setup.h"
  1504. X#include "w_zoom.h"
  1505. X#include "w_indpanel.h"
  1506. X
  1507. Xextern        elastic_box();
  1508. Xextern        show_zoom();
  1509. Xextern        pan_origin();
  1510. X
  1511. X/* extern int           gc_thickness[NUMOPS]; */
  1512. X
  1513. Xstatic        do_zoom();
  1514. Xstatic        zoom_up();
  1515. Xstatic        init_zoombox_drawing();
  1516. X
  1517. Xstatic int    (*save_kbd_proc) ();
  1518. Xstatic int    (*save_locmove_proc) ();
  1519. Xstatic int    (*save_leftbut_proc) ();
  1520. Xstatic int    (*save_middlebut_proc) ();
  1521. Xstatic int    (*save_middlebut_save) ();
  1522. Xstatic int    (*save_rightbut_proc) ();
  1523. Xstatic Cursor    save_cur_cursor;
  1524. Xstatic int    save_action_on;
  1525. X
  1526. Xint        zoomscale = 1;
  1527. Xint        zoomxoff = 0;
  1528. Xint        zoomyoff = 0;
  1529. X
  1530. Xstatic Boolean    zoom_in_progress = False;
  1531. X
  1532. X/* used for private box drawing functions */
  1533. Xstatic int    my_fix_x, my_fix_y;
  1534. Xstatic int    my_cur_x, my_cur_y;
  1535. X
  1536. Xzoom_selected(x, y, button)
  1537. X    int            x, y;
  1538. X    unsigned int    button;
  1539. X{
  1540. X    if (!zoom_in_progress) {
  1541. X    switch (button) {
  1542. X    case Button1:
  1543. X        init_zoombox_drawing(x, y);
  1544. X        break;
  1545. X    case Button2:
  1546. X        pan_origin();
  1547. X        break;
  1548. X    case Button3:
  1549. X        zoomscale = 1;
  1550. X        show_zoom(&ind_switches[ZOOM_SWITCH_INDEX]);
  1551. X        break;
  1552. X    }
  1553. X    } else if (button == Button1)
  1554. X    do_zoom(x, y);
  1555. X}
  1556. X
  1557. X
  1558. Xstatic
  1559. Xmy_box(x, y)
  1560. X    int            x, y;
  1561. X{
  1562. X    elastic_box(my_fix_x, my_fix_y, my_cur_x, my_cur_y);
  1563. X    my_cur_x = x;
  1564. X    my_cur_y = y;
  1565. X    elastic_box(my_fix_x, my_fix_y, my_cur_x, my_cur_y);
  1566. X}
  1567. X
  1568. X
  1569. X
  1570. Xstatic
  1571. Xinit_zoombox_drawing(x, y)
  1572. X    int            x, y;
  1573. X{
  1574. X    save_kbd_proc = canvas_kbd_proc;
  1575. X    save_locmove_proc = canvas_locmove_proc;
  1576. X    save_leftbut_proc = canvas_leftbut_proc;
  1577. X    save_middlebut_proc = canvas_middlebut_proc;
  1578. X    save_rightbut_proc = canvas_rightbut_proc;
  1579. X    save_kbd_proc = canvas_kbd_proc;
  1580. X    save_cur_cursor = cur_cursor;
  1581. X
  1582. X    my_cur_x = my_fix_x = x;
  1583. X    my_cur_y = my_fix_y = y;
  1584. X    canvas_locmove_proc = moving_box;
  1585. X
  1586. X    canvas_locmove_proc = my_box;
  1587. X    canvas_leftbut_proc = do_zoom;
  1588. X    canvas_middlebut_proc = canvas_rightbut_proc = null_proc;
  1589. X    elastic_box(my_fix_x, my_fix_y, my_cur_x, my_cur_y);
  1590. X    set_temp_cursor(null_cursor);
  1591. X    set_action_on();
  1592. X    zoom_in_progress = True;
  1593. X}
  1594. X
  1595. Xstatic
  1596. Xdo_zoom(x, y)
  1597. X    int            x, y;
  1598. X{
  1599. X    int            dimx, dimy;
  1600. X    int            t;        /* loop counter */
  1601. X    float        scalex, scaley;
  1602. X
  1603. X    elastic_box(my_fix_x, my_fix_y, my_cur_x, my_cur_y);
  1604. X    zoomxoff = my_fix_x < x ? my_fix_x : x;
  1605. X    zoomyoff = my_fix_y < y ? my_fix_y : y;
  1606. X    dimx = abs(x - my_fix_x);
  1607. X    dimy = abs(y - my_fix_y);
  1608. X    if (zoomxoff < 0)
  1609. X    zoomxoff = 0;
  1610. X    if (zoomyoff < 0)
  1611. X    zoomyoff = 0;
  1612. X    if (dimx && dimy) {
  1613. X    scalex = CANVAS_WD / (float) dimx;
  1614. X    scaley = CANVAS_HT / (float) dimy;
  1615. X    zoomscale = (int) scalex > scaley ? scaley : scalex;
  1616. X
  1617. X    show_zoom(&ind_switches[ZOOM_SWITCH_INDEX]);
  1618. X    }
  1619. X    /* restore state */
  1620. X    canvas_kbd_proc = save_kbd_proc;
  1621. X    canvas_locmove_proc = save_locmove_proc;
  1622. X    canvas_leftbut_proc = save_leftbut_proc;
  1623. X    canvas_middlebut_proc = save_middlebut_proc;
  1624. X    canvas_rightbut_proc = save_rightbut_proc;
  1625. X    canvas_kbd_proc = save_kbd_proc;
  1626. X    set_cursor(save_cur_cursor);
  1627. X    action_on = save_action_on;
  1628. X    zoom_in_progress = False;
  1629. X}
  1630. END_OF_FILE
  1631. if test 4003 -ne `wc -c <'w_zoom.c'`; then
  1632.     echo shar: \"'w_zoom.c'\" unpacked with wrong size!
  1633. fi
  1634. # end of 'w_zoom.c'
  1635. fi
  1636. echo shar: End of archive 22 \(of 25\).
  1637. cp /dev/null ark22isdone
  1638. MISSING=""
  1639. 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 ; do
  1640.     if test ! -f ark${I}isdone ; then
  1641.     MISSING="${MISSING} ${I}"
  1642.     fi
  1643. done
  1644. if test "${MISSING}" = "" ; then
  1645.     echo You have unpacked all 25 archives.
  1646.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1647. else
  1648.     echo You still need to unpack the following archives:
  1649.     echo "        " ${MISSING}
  1650. fi
  1651. ##  End of shell archive.
  1652. exit 0
  1653. -- 
  1654. Molecular Simulations, Inc.             mail: dcmartin@msi.com
  1655. 796 N. Pastoria Avenue                  uucp: uunet!dcmartin
  1656. Sunnyvale, California 94086             at&t: 408/522-9236
  1657.