home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume19 / xfig / part10 < prev    next >
Encoding:
Text File  |  1993-05-26  |  67.0 KB  |  1,962 lines

  1. Newsgroups: comp.sources.x
  2. From: envbvs@epb9.lbl.gov (Brian V. Smith)
  3. Subject: v19i122:  xfig - Draw amd manipulate objects in an X-Window, Part10/27
  4. Message-ID: <1993May21.021410.5721@sparky.imd.sterling.com>
  5. X-Md4-Signature: 8668f40929a940a8696cb1a1ff29d102
  6. Sender: chris@sparky.imd.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Fri, 21 May 1993 02:14:10 GMT
  9. Approved: chris@sparky.imd.sterling.com
  10.  
  11. Submitted-by: envbvs@epb9.lbl.gov (Brian V. Smith)
  12. Posting-number: Volume 19, Issue 122
  13. Archive-name: xfig/part10
  14. Environment: X11
  15. Supersedes: xfig: Volume 16, Issue 6-30,39
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then unpack
  19. # it by saving it into a file and typing "sh file".  To overwrite existing
  20. # files, type "sh file -c".  You can also feed this as standard input via
  21. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  22. # will see the following message at the end:
  23. #        "End of archive 10 (of 27)."
  24. # Contents:  Examples/house_elev.fig.uu Examples/office.fig.uu
  25. #   e_rotate.c e_update.c w_canvas.c
  26. # Wrapped by envbvs@epb9.lbl.gov.lbl.gov on Mon May  3 12:05:53 1993
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'Examples/house_elev.fig.uu' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'Examples/house_elev.fig.uu'\"
  30. else
  31. echo shar: Extracting \"'Examples/house_elev.fig.uu'\" \(13167 characters\)
  32. sed "s/^X//" >'Examples/house_elev.fig.uu' <<'END_OF_FILE'
  33. Xbegin 444 house_elev.fig
  34. XM(T9)1R`R+C$*.#`@,@HQ(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Q-SD@-#8T(#$W.2`Y.3DY(#DY.3D*
  246. X`
  247. Xend
  248. END_OF_FILE
  249. if test 13167 -ne `wc -c <'Examples/house_elev.fig.uu'`; then
  250.     echo shar: \"'Examples/house_elev.fig.uu'\" unpacked with wrong size!
  251. fi
  252. # end of 'Examples/house_elev.fig.uu'
  253. fi
  254. if test -f 'Examples/office.fig.uu' -a "${1}" != "-c" ; then 
  255.   echo shar: Will not clobber existing file \"'Examples/office.fig.uu'\"
  256. else
  257. echo shar: Extracting \"'Examples/office.fig.uu'\" \(13043 characters\)
  258. sed "s/^X//" >'Examples/office.fig.uu' <<'END_OF_FILE'
  259. Xbegin 444 office.fig
  260. XM(T9)1R`R+C$*.#`@,@HR(#,@,"`Q("TQ(#`@,"`Y(#`N,#`P(#`@,"`P"@D@
  261. XM-C0V(#$P-2`V-#$@,3`X(#8S-B`Q,#4@-C,V(#DS(#8T,2`Y,"`V-#8@.3,@
  262. XM-C0V(#$P-2`Y.3DY(#DY.3D*,B`S(#`@,2`M,2`P(#`@.2`P+C`P,"`P(#`@
  263. XM,`H)(#,W.2`U,#$@,S<T(#4P-"`S-CD@-3`Q(#,V.2`T.#D@,S<T(#0X-B`S
  264. XM-SD@-#@Y(#,W.2`U,#$@.3DY.2`Y.3DY"C(@,R`P(#$@+3$@,"`P(#D@,"XP
  265. XM,#`@,"`P(#`*"2`S,3,@-3`R(#,P."`U,#4@,S`S(#4P,B`S,#,@-#DP(#,P
  266. XM."`T.#<@,S$S(#0Y,"`S,3,@-3`R(#DY.3D@.3DY.0HR(#,@,"`Q("TQ(#`@
  267. XM,"`Y(#`N,#`P(#`@,"`P"@D@,C<W(#$P-B`R-S(@,3`Y(#(V-R`Q,#8@,C8W
  268. XM(#DT(#(W,B`Y,2`R-S<@.30@,C<W(#$P-B`Y.3DY(#DY.3D*,B`S(#`@,2`M
  269. XM,2`P(#`@.2`P+C`P,"`P(#`@,`H)(#<Q,"`X,"`W,#4@.#,@-S`P(#@P(#<P
  270. XM,"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@-"`Y(#@S(#<X(#,X."!687AS=&%T:6]N(#(P,#`!"B`P
  470. X`
  471. Xend
  472. END_OF_FILE
  473. if test 13043 -ne `wc -c <'Examples/office.fig.uu'`; then
  474.     echo shar: \"'Examples/office.fig.uu'\" unpacked with wrong size!
  475. fi
  476. # end of 'Examples/office.fig.uu'
  477. fi
  478. if test -f 'e_rotate.c' -a "${1}" != "-c" ; then 
  479.   echo shar: Will not clobber existing file \"'e_rotate.c'\"
  480. else
  481. echo shar: Extracting \"'e_rotate.c'\" \(11790 characters\)
  482. sed "s/^X//" >'e_rotate.c' <<'END_OF_FILE'
  483. X/*
  484. X * FIG : Facility for Interactive Generation of figures
  485. X * Copyright (c) 1985 by Supoj Sutanthavibul
  486. X *
  487. X * "Permission to use, copy, modify, distribute, and sell this software and its
  488. X * documentation for any purpose is hereby granted without fee, provided that
  489. X * the above copyright notice appear in all copies and that both the copyright
  490. X * notice and this permission notice appear in supporting documentation. 
  491. X * No representations are made about the suitability of this software for 
  492. X * any purpose.  It is provided "as is" without express or implied warranty."
  493. X */
  494. X
  495. X#include "fig.h"
  496. X#include "resources.h"
  497. X#include "mode.h"
  498. X#include "object.h"
  499. X#include "paintop.h"
  500. X#include "u_draw.h"
  501. X#include "u_search.h"
  502. X#include "u_create.h"
  503. X#include "u_list.h"
  504. X#include "w_canvas.h"
  505. X#include "w_mousefun.h"
  506. X
  507. Xextern float    compute_angle();
  508. X
  509. Xstatic int    copy;
  510. Xstatic int    rotn_dirn;
  511. Xstatic int    init_rotate();
  512. Xstatic int    init_copynrotate();
  513. Xstatic int    rotate_selected();
  514. Xstatic int    rotate_search();
  515. Xstatic int    init_rotateline();
  516. Xstatic int    init_rotatetext();
  517. X
  518. Xrotate_cw_selected()
  519. X{
  520. X    rotn_dirn = 1;
  521. X    rotate_selected();
  522. X}
  523. X
  524. Xrotate_ccw_selected()
  525. X{
  526. X    rotn_dirn = -1;
  527. X    rotate_selected();
  528. X}
  529. X
  530. Xstatic
  531. Xrotate_selected()
  532. X{
  533. X    set_mousefun("rotate object", "copy & rotate", "");
  534. X    canvas_kbd_proc = null_proc;
  535. X    canvas_locmove_proc = null_proc;
  536. X    init_searchproc_left(init_rotate);
  537. X    init_searchproc_middle(init_copynrotate);
  538. X    canvas_leftbut_proc = object_search_left;
  539. X    canvas_middlebut_proc = object_search_middle;
  540. X    canvas_rightbut_proc = null_proc;
  541. X    set_cursor(pick15_cursor);
  542. X}
  543. X
  544. Xstatic
  545. Xinit_rotate(p, type, x, y, px, py)
  546. X    char       *p;
  547. X    int            type;
  548. X    int            x, y;
  549. X    int            px, py;
  550. X{
  551. X    copy = 0;
  552. X    rotate_search(p, type, x, y, px, py);
  553. X}
  554. X
  555. Xstatic
  556. Xinit_copynrotate(p, type, x, y, px, py)
  557. X    char       *p;
  558. X    int            type;
  559. X    int            x, y;
  560. X    int            px, py;
  561. X{
  562. X    copy = 1;
  563. X    rotate_search(p, type, x, y, px, py);
  564. X}
  565. X
  566. Xstatic
  567. Xrotate_search(p, type, x, y, px, py)
  568. X    char       *p;
  569. X    int            type;
  570. X    int            x, y;
  571. X    int            px, py;
  572. X{
  573. X    switch (type) {
  574. X    case O_POLYLINE:
  575. X    cur_l = (F_line *) p;
  576. X    init_rotateline(cur_l, px, py);
  577. X    break;
  578. X    case O_ARC:
  579. X    cur_a = (F_arc *) p;
  580. X    init_rotatearc(cur_a, px, py);
  581. X    break;
  582. X    case O_ELLIPSE:
  583. X    cur_e = (F_ellipse *) p;
  584. X    init_rotateellipse(cur_e, px, py);
  585. X    break;
  586. X    case O_SPLINE:
  587. X    cur_s = (F_spline *) p;
  588. X    init_rotatespline(cur_s, px, py);
  589. X    break;
  590. X    case O_TEXT:
  591. X    cur_t = (F_text *) p;
  592. X    init_rotatetext(cur_t, px, py);
  593. X    break;
  594. X    case O_COMPOUND:
  595. X    cur_c = (F_compound *) p;
  596. X    init_rotatecompound(cur_c, px, py);
  597. X    break;
  598. X    default:
  599. X    return;
  600. X    }
  601. X}
  602. X
  603. Xstatic
  604. Xinit_rotateline(l, px, py)
  605. X    F_line       *l;
  606. X    int            px, py;
  607. X{
  608. X    F_line       *line;
  609. X
  610. X    set_temp_cursor(wait_cursor);
  611. X    line = copy_line(l);
  612. X    rotate_line(line, px, py, rotn_dirn);
  613. X    if (copy) {
  614. X    add_line(line);
  615. X    } else {
  616. X    toggle_linemarker(l);
  617. X    draw_line(l, ERASE);
  618. X    change_line(l, line);
  619. X    }
  620. X    draw_line(line, PAINT);
  621. X    toggle_linemarker(line);
  622. X    reset_cursor();
  623. X}
  624. X
  625. Xstatic
  626. Xinit_rotatetext(t, px, py)
  627. X    F_text       *t;
  628. X    int            px, py;
  629. X{
  630. X    F_text       *text;
  631. X
  632. X    set_temp_cursor(wait_cursor);
  633. X    text = copy_text(t);
  634. X    rotate_text(text, px, py, rotn_dirn);
  635. X    if (copy) {
  636. X    add_text(text);
  637. X    } else {
  638. X    toggle_textmarker(t);
  639. X    draw_text(t, ERASE);
  640. X    change_text(t, text);
  641. X    }
  642. X    draw_text(text, PAINT);
  643. X    toggle_textmarker(text);
  644. X    reset_cursor();
  645. X}
  646. X
  647. Xinit_rotateellipse(e, px, py)
  648. X    F_ellipse       *e;
  649. X    int            px, py;
  650. X{
  651. X    F_ellipse       *ellipse;
  652. X
  653. X    set_temp_cursor(wait_cursor);
  654. X    ellipse = copy_ellipse(e);
  655. X    rotate_ellipse(ellipse, px, py, rotn_dirn);
  656. X    if (copy) {
  657. X    add_ellipse(ellipse);
  658. X    } else {
  659. X    toggle_ellipsemarker(e);
  660. X    draw_ellipse(e, ERASE);
  661. X    change_ellipse(e, ellipse);
  662. X    }
  663. X    draw_ellipse(ellipse, PAINT);
  664. X    toggle_ellipsemarker(ellipse);
  665. X    reset_cursor();
  666. X}
  667. X
  668. Xinit_rotatearc(a, px, py)
  669. X    F_arc       *a;
  670. X    int            px, py;
  671. X{
  672. X    F_arc       *arc;
  673. X
  674. X    set_temp_cursor(wait_cursor);
  675. X    arc = copy_arc(a);
  676. X    rotate_arc(arc, px, py, rotn_dirn);
  677. X    if (copy) {
  678. X    add_arc(arc);
  679. X    } else {
  680. X    toggle_arcmarker(a);
  681. X    draw_arc(a, ERASE);
  682. X    change_arc(a, arc);
  683. X    }
  684. X    draw_arc(arc, PAINT);
  685. X    toggle_arcmarker(arc);
  686. X    reset_cursor();
  687. X}
  688. X
  689. Xinit_rotatespline(s, px, py)
  690. X    F_spline       *s;
  691. X    int            px, py;
  692. X{
  693. X    F_spline       *spline;
  694. X
  695. X    set_temp_cursor(wait_cursor);
  696. X    spline = copy_spline(s);
  697. X    rotate_spline(spline, px, py, rotn_dirn);
  698. X    if (copy) {
  699. X    add_spline(spline);
  700. X    } else {
  701. X    toggle_splinemarker(s);
  702. X    draw_spline(s, ERASE);
  703. X    change_spline(s, spline);
  704. X    }
  705. X    draw_spline(spline, PAINT);
  706. X    toggle_splinemarker(spline);
  707. X    reset_cursor();
  708. X}
  709. X
  710. Xinit_rotatecompound(c, px, py)
  711. X    F_compound       *c;
  712. X    int            px, py;
  713. X{
  714. X    F_compound       *compound;
  715. X
  716. X    if (!valid_rot_angle(c)) {
  717. X    put_msg("Invalid rotation angle for this compound object");
  718. X    return;
  719. X    }
  720. X
  721. X    set_temp_cursor(wait_cursor);
  722. X    compound = copy_compound(c);
  723. X    rotate_compound(compound, px, py, rotn_dirn);
  724. X    if (copy) {
  725. X    add_compound(compound);
  726. X    } else {
  727. X    toggle_compoundmarker(c);
  728. X    draw_compoundelements(c, ERASE);
  729. X    change_compound(c, compound);
  730. X    }
  731. X    draw_compoundelements(compound, PAINT);
  732. X    toggle_compoundmarker(compound);
  733. X    reset_cursor();
  734. X}
  735. X
  736. Xrotate_line(l, x, y, rotn_dirn)
  737. X    F_line       *l;
  738. X    int            x, y, rotn_dirn;
  739. X{
  740. X    F_point       *p;
  741. X    int            dx;
  742. X
  743. X    /* for speed we treat 90 degrees as a special case */
  744. X    if (cur_rotnangle == 90) {
  745. X    for (p = l->points; p != NULL; p = p->next) {
  746. X        dx = p->x - x;
  747. X        p->x = x + rotn_dirn * (y - p->y);
  748. X        p->y = y + rotn_dirn * dx;
  749. X    }
  750. X    } else {
  751. X    for (p = l->points; p != NULL; p = p->next)
  752. X        rotate_point(p, x, y, rotn_dirn);
  753. X    }
  754. X}
  755. X
  756. Xrotate_spline(s, x, y, rotn_dirn)
  757. X    F_spline       *s;
  758. X    int            x, y, rotn_dirn;
  759. X{
  760. X    F_point       *p;
  761. X    F_control       *cp;
  762. X    int            dx;
  763. X
  764. X    /* for speed we treat 90 degrees as a special case */
  765. X    if (cur_rotnangle == 90) {
  766. X    for (p = s->points; p != NULL; p = p->next) {
  767. X        dx = p->x - x;
  768. X        p->x = x + rotn_dirn * (y - p->y);
  769. X        p->y = y + rotn_dirn * dx;
  770. X    }
  771. X    for (cp = s->controls; cp != NULL; cp = cp->next) {
  772. X        dx = cp->lx - x;
  773. X        cp->lx = x + rotn_dirn * (y - cp->ly);
  774. X        cp->ly = y + rotn_dirn * dx;
  775. X        dx = cp->rx - x;
  776. X        cp->rx = x + rotn_dirn * (y - cp->ry);
  777. X        cp->ry = y + rotn_dirn * dx;
  778. X    }
  779. X    } else {
  780. X    for (p = s->points; p != NULL; p = p->next)
  781. X        rotate_point(p, x, y, rotn_dirn);
  782. X    if (int_spline(s))
  783. X        remake_control_points(s);
  784. X    }
  785. X}
  786. X
  787. Xrotate_text(t, x, y, rotn_dirn)
  788. X    F_text       *t;
  789. X    int            x, y, rotn_dirn;
  790. X{
  791. X    int            dx;
  792. X
  793. X    if (cur_rotnangle == 90) { /* treat 90 degs as special case for speed */
  794. X    dx = t->base_x - x;
  795. X    t->base_x = x + rotn_dirn * (y - t->base_y);
  796. X    t->base_y = y + rotn_dirn * dx;
  797. X    } else {
  798. X    rotate_xy(&t->base_x, &t->base_y, x, y, rotn_dirn);
  799. X    }
  800. X    t->angle -= (float) (rotn_dirn * cur_rotnangle * M_PI / 180.0);
  801. X    if (t->angle < 0.0)
  802. X    t->angle += M_2PI;
  803. X    else if (t->angle >= M_2PI - 0.001)
  804. X    t->angle -= M_2PI;
  805. X    reload_text_fstruct(t);
  806. X}
  807. X
  808. Xrotate_ellipse(e, x, y, rotn_dirn)
  809. X    F_ellipse       *e;
  810. X    int            x, y, rotn_dirn;
  811. X{
  812. X    int            dxc,dxs,dxe;
  813. X
  814. X    if (cur_rotnangle == 90) { /* treat 90 degs as special case for speed */
  815. X    dxc = e->center.x - x;
  816. X    dxs = e->start.x - x;
  817. X    dxe = e->end.x - x;
  818. X    e->center.x = x + rotn_dirn * (y - e->center.y);
  819. X    e->center.y = y + rotn_dirn * dxc;
  820. X    e->start.x = x + rotn_dirn * (y - e->start.y);
  821. X    e->start.y = y + rotn_dirn * dxs;
  822. X    e->end.x = x + rotn_dirn * (y - e->end.y);
  823. X    e->end.y = y + rotn_dirn * dxe;
  824. X    } else {
  825. X    rotate_point(&e->center, x, y, rotn_dirn);
  826. X    rotate_point(&e->start, x, y, rotn_dirn);
  827. X    rotate_point(&e->end, x, y, rotn_dirn);
  828. X    }
  829. X    e->angle -= (float) (rotn_dirn * cur_rotnangle * M_PI / 180);
  830. X    if (e->angle < 0.0)
  831. X    e->angle += M_2PI;
  832. X    else if (e->angle >= M_2PI - 0.001)
  833. X    e->angle -= M_2PI;
  834. X}
  835. X
  836. Xrotate_arc(a, x, y, rotn_dirn)
  837. X    F_arc       *a;
  838. X    int            x, y, rotn_dirn;
  839. X{
  840. X    int            dx;
  841. X    F_pos        p[3];
  842. X    float        xx, yy;
  843. X
  844. X    /* for speed we treat 90 degrees as a special case */
  845. X    if (cur_rotnangle == 90) {
  846. X    dx = a->center.x - x;
  847. X    a->center.x = x + rotn_dirn * (y - a->center.y);
  848. X    a->center.y = y + rotn_dirn * dx;
  849. X    dx = a->point[0].x - x;
  850. X    a->point[0].x = x + rotn_dirn * (y - a->point[0].y);
  851. X    a->point[0].y = y + rotn_dirn * dx;
  852. X    dx = a->point[1].x - x;
  853. X    a->point[1].x = x + rotn_dirn * (y - a->point[1].y);
  854. X    a->point[1].y = y + rotn_dirn * dx;
  855. X    dx = a->point[2].x - x;
  856. X    a->point[2].x = x + rotn_dirn * (y - a->point[2].y);
  857. X    a->point[2].y = y + rotn_dirn * dx;
  858. X    } else {
  859. X    p[0] = a->point[0];
  860. X    p[1] = a->point[1];
  861. X    p[2] = a->point[2];
  862. X    rotate_point(&p[0], x, y, rotn_dirn);
  863. X    rotate_point(&p[1], x, y, rotn_dirn);
  864. X    rotate_point(&p[2], x, y, rotn_dirn);
  865. X    if (compute_arccenter(p[0], p[1], p[2], &xx, &yy)) {
  866. X        a->point[0].x = p[0].x;
  867. X        a->point[0].y = p[0].y;
  868. X        a->point[1].x = p[1].x;
  869. X        a->point[1].y = p[1].y;
  870. X        a->point[2].x = p[2].x;
  871. X        a->point[2].y = p[2].y;
  872. X        a->center.x = xx;
  873. X        a->center.y = yy;
  874. X        a->direction = compute_direction(p[0], p[1], p[2]);
  875. X    }
  876. X    }
  877. X}
  878. X
  879. X/* checks to see if the objects within c can be rotated by cur_rotnangle */
  880. X
  881. Xvalid_rot_angle(c)
  882. X    F_compound     *c;
  883. X{
  884. X    F_line         *l;
  885. X    F_compound     *c1;
  886. X
  887. X    if (cur_rotnangle == 90)
  888. X    return 1; /* always valid */
  889. X    for (l = c->lines; l != NULL; l = l->next)
  890. X    if (l->type == T_ARC_BOX || l->type == T_BOX)
  891. X        return 0;
  892. X    for (c1 = c->compounds; c1 != NULL; c1 = c1->next)
  893. X    if (!valid_rot_angle(c1))
  894. X        return 0;
  895. X    return 1;
  896. X}
  897. X
  898. Xrotate_compound(c, x, y, rotn_dirn)
  899. X    F_compound       *c;
  900. X    int            x, y, rotn_dirn;
  901. X{
  902. X    F_line       *l;
  903. X    F_arc       *a;
  904. X    F_ellipse       *e;
  905. X    F_spline       *s;
  906. X    F_text       *t;
  907. X    F_compound       *c1;
  908. X
  909. X    for (l = c->lines; l != NULL; l = l->next)
  910. X    rotate_line(l, x, y, rotn_dirn);
  911. X    for (a = c->arcs; a != NULL; a = a->next)
  912. X    rotate_arc(a, x, y, rotn_dirn);
  913. X    for (e = c->ellipses; e != NULL; e = e->next)
  914. X    rotate_ellipse(e, x, y, rotn_dirn);
  915. X    for (s = c->splines; s != NULL; s = s->next)
  916. X    rotate_spline(s, x, y, rotn_dirn);
  917. X    for (t = c->texts; t != NULL; t = t->next)
  918. X    rotate_text(t, x, y, rotn_dirn);
  919. X    for (c1 = c->compounds; c1 != NULL; c1 = c1->next)
  920. X    rotate_compound(c1, x, y, rotn_dirn);
  921. X
  922. X    /*
  923. X     * Make the bounding box exactly match the dimensions of the compound.
  924. X     */
  925. X    compound_bound(c, &c->nwcorner.x, &c->nwcorner.y,
  926. X           &c->secorner.x, &c->secorner.y);
  927. X}
  928. X
  929. Xrotate_point(p, x, y, rotn)
  930. X    F_point       *p;
  931. X    int            x, y, rotn;
  932. X{
  933. X    /* rotate point p about coordinate (x, y) */
  934. X    int            dx, dy;
  935. X    float        cosa, sina, mag, theta;
  936. X
  937. X    dx = p->x - x;
  938. X    dy = y - p->y;
  939. X    if (dx == 0 && dy == 0)
  940. X    return;
  941. X
  942. X    theta = compute_angle((float) dx, (float) dy);
  943. X    theta -= (float) (rotn_dirn * cur_rotnangle * M_PI / 180.0);
  944. X    if (theta < 0.0)
  945. X    theta += M_2PI;
  946. X    else if (theta >= M_2PI - 0.001)
  947. X    theta -= M_2PI;
  948. X    mag = sqrt((double) (dx * dx + dy * dy));
  949. X    cosa = mag * cos((double) theta);
  950. X    sina = mag * sin((double) theta);
  951. X    p->x = x + cosa;
  952. X    p->y = y - sina;
  953. X}
  954. X
  955. Xrotate_xy(orig_x, orig_y, x, y, rotn)
  956. X    int             *orig_x, *orig_y, x, y, rotn;
  957. X{
  958. X    /* rotate coord (orig_x, orig_y) about coordinate (x, y) */
  959. X    int             dx, dy;
  960. X    float           cosa, sina, mag, theta;
  961. X
  962. X    dx = *orig_x - x;
  963. X    dy = y - *orig_y;
  964. X    if (dx == 0 && dy == 0)
  965. X    return;
  966. X
  967. X    theta = compute_angle((float) dx, (float) dy);
  968. X    theta -= (float) (rotn_dirn * cur_rotnangle * M_PI / 180.0);
  969. X    if (theta < 0.0)
  970. X    theta += M_2PI;
  971. X    else if (theta >= M_2PI - 0.001)
  972. X    theta -= M_2PI;
  973. X    mag = sqrt((double) (dx * dx + dy * dy));
  974. X    cosa = mag * cos((double) theta);
  975. X    sina = mag * sin((double) theta);
  976. X    *orig_x = x + cosa;
  977. X    *orig_y = y - sina;
  978. X}
  979. END_OF_FILE
  980. if test 11790 -ne `wc -c <'e_rotate.c'`; then
  981.     echo shar: \"'e_rotate.c'\" unpacked with wrong size!
  982. fi
  983. # end of 'e_rotate.c'
  984. fi
  985. if test -f 'e_update.c' -a "${1}" != "-c" ; then 
  986.   echo shar: Will not clobber existing file \"'e_update.c'\"
  987. else
  988. echo shar: Extracting \"'e_update.c'\" \(12320 characters\)
  989. sed "s/^X//" >'e_update.c' <<'END_OF_FILE'
  990. X/*
  991. X * FIG : Facility for Interactive Generation of figures
  992. X * Copyright (c) 1985 by Supoj Sutanthavibul
  993. X *
  994. X * "Permission to use, copy, modify, distribute, and sell this software and its
  995. X * documentation for any purpose is hereby granted without fee, provided that
  996. X * the above copyright notice appear in all copies and that both the copyright
  997. X * notice and this permission notice appear in supporting documentation. 
  998. X * No representations are made about the suitability of this software for 
  999. X * any purpose.  It is provided "as is" without express or implied warranty."
  1000. X */
  1001. X
  1002. X#include "fig.h"
  1003. X#include "resources.h"
  1004. X#include "object.h"
  1005. X#include "mode.h"
  1006. X#include "paintop.h"
  1007. X#include "u_create.h"
  1008. X#include "u_list.h"
  1009. X#include "u_search.h"
  1010. X#include "w_canvas.h"
  1011. X#include "w_drawprim.h"
  1012. X#include "w_indpanel.h"
  1013. X#include "w_mousefun.h"
  1014. X
  1015. Xextern        update_current_settings();
  1016. Xstatic int    init_update_object();
  1017. Xstatic int    init_update_settings();
  1018. X
  1019. X#define    up_part(lv,rv,mask) \
  1020. X        if (cur_updatemask & (mask)) \
  1021. X            (lv) = (rv)
  1022. X
  1023. Xupdate_selected()
  1024. X{
  1025. X    set_mousefun("update object", "update settings", "");
  1026. X    canvas_kbd_proc = null_proc;
  1027. X    canvas_locmove_proc = null_proc;
  1028. X    init_searchproc_left(init_update_object);
  1029. X    init_searchproc_middle(init_update_settings);
  1030. X    canvas_leftbut_proc = object_search_left;
  1031. X    canvas_middlebut_proc = object_search_middle;
  1032. X    canvas_rightbut_proc = null_proc;
  1033. X    set_cursor(pick9_cursor);
  1034. X    /* manage on the update buttons */
  1035. X    manage_update_buts();
  1036. X}
  1037. X
  1038. Xstatic
  1039. Xget_arrow_mode(object)
  1040. X    F_line       *object;
  1041. X{
  1042. X    if (!object->for_arrow && !object->back_arrow)
  1043. X    return L_NOARROWS;
  1044. X    else if (object->for_arrow && !object->back_arrow)
  1045. X    return L_FARROWS;
  1046. X    else if (!object->for_arrow && object->back_arrow)
  1047. X    return L_BARROWS;
  1048. X    else
  1049. X    return L_FBARROWS;
  1050. X}
  1051. X    
  1052. Xstatic
  1053. Xinit_update_settings(p, type, x, y, px, py)
  1054. X    char       *p;
  1055. X    int            type;
  1056. X    int            x, y;
  1057. X    int            px, py;
  1058. X{
  1059. X    int        old_psfont_flag, new_psfont_flag;
  1060. X
  1061. X    switch (type) {
  1062. X    case O_COMPOUND:
  1063. X    put_msg("There is no support for updating settings from a compound object");
  1064. X    return;
  1065. X    case O_POLYLINE:
  1066. X    cur_l = (F_line *) p;
  1067. X    if (cur_l->type != T_EPS_BOX) {
  1068. X        up_part(cur_linewidth, cur_l->thickness, I_LINEWIDTH);
  1069. X        up_part(cur_fillstyle, cur_l->fill_style, I_FILLSTYLE);
  1070. X        up_part(cur_color, cur_l->color, I_COLOR);
  1071. X        up_part(cur_linestyle, cur_l->style, I_LINESTYLE);
  1072. X        up_part(cur_styleval, cur_l->style_val, I_LINESTYLE);
  1073. X        up_part(cur_arrowmode, get_arrow_mode(cur_l), I_ARROWMODE);
  1074. X        }
  1075. X    up_part(cur_depth, cur_l->depth, I_DEPTH);
  1076. X    if (cur_l->type == T_ARC_BOX)
  1077. X        up_part(cur_boxradius, cur_l->radius, I_BOXRADIUS);
  1078. X    break;
  1079. X    case O_TEXT:
  1080. X    cur_t = (F_text *) p;
  1081. X    up_part(cur_textjust, cur_t->type, I_TEXTJUST);
  1082. X    up_part(cur_color, cur_t->color, I_COLOR);
  1083. X    up_part(cur_depth, cur_t->depth, I_DEPTH);
  1084. X    up_part(cur_elltextangle, cur_t->angle/M_PI*180.0, I_ELLTEXTANGLE);
  1085. X    old_psfont_flag = (cur_t->flags & PSFONT_TEXT);
  1086. X    new_psfont_flag = (cur_textflags & PSFONT_TEXT);
  1087. X    up_part(cur_textflags, cur_t->flags & ~PSFONT_TEXT, I_TEXTFLAGS);
  1088. X    if (cur_updatemask & I_FONT)
  1089. X        cur_textflags |= new_psfont_flag;
  1090. X    else
  1091. X        cur_textflags |= old_psfont_flag;
  1092. X    if (using_ps)
  1093. X        {    /* must use {} because macro has 'if' */
  1094. X        up_part(cur_ps_font, cur_t->font, I_FONT);
  1095. X        }
  1096. X    else
  1097. X        {    /* must use {} because macro has 'if' */
  1098. X        up_part(cur_latex_font, cur_t->font, I_FONT);
  1099. X        }
  1100. X    up_part(cur_fontsize, cur_t->size, I_FONTSIZE);
  1101. X    break;
  1102. X    case O_ELLIPSE:
  1103. X    cur_e = (F_ellipse *) p;
  1104. X    up_part(cur_linewidth, cur_e->thickness, I_LINEWIDTH);
  1105. X    up_part(cur_elltextangle, cur_e->angle/M_PI*180.0, I_ELLTEXTANGLE);
  1106. X    up_part(cur_fillstyle, cur_e->fill_style, I_FILLSTYLE);
  1107. X    up_part(cur_color, cur_e->color, I_COLOR);
  1108. X    up_part(cur_linestyle, cur_e->style, I_LINESTYLE);
  1109. X    up_part(cur_styleval, cur_e->style_val, I_LINESTYLE);
  1110. X    up_part(cur_depth, cur_e->depth, I_DEPTH);
  1111. X    break;
  1112. X    case O_ARC:
  1113. X    cur_a = (F_arc *) p;
  1114. X    up_part(cur_linewidth, cur_a->thickness, I_LINEWIDTH);
  1115. X    up_part(cur_fillstyle, cur_a->fill_style, I_FILLSTYLE);
  1116. X    up_part(cur_color, cur_a->color, I_COLOR);
  1117. X    up_part(cur_linestyle, cur_a->style, I_LINESTYLE);
  1118. X    up_part(cur_styleval, cur_a->style_val, I_LINESTYLE);
  1119. X    up_part(cur_depth, cur_a->depth, I_DEPTH);
  1120. X    up_part(cur_arrowmode, get_arrow_mode(cur_a), I_ARROWMODE);
  1121. X    break;
  1122. X    case O_SPLINE:
  1123. X    cur_s = (F_spline *) p;
  1124. X    up_part(cur_linewidth, cur_s->thickness, I_LINEWIDTH);
  1125. X    up_part(cur_fillstyle, cur_s->fill_style, I_FILLSTYLE);
  1126. X    up_part(cur_color, cur_s->color, I_COLOR);
  1127. X    up_part(cur_linestyle, cur_s->style, I_LINESTYLE);
  1128. X    up_part(cur_styleval, cur_s->style_val, I_LINESTYLE);
  1129. X    up_part(cur_depth, cur_s->depth, I_DEPTH);
  1130. X    up_part(cur_arrowmode, get_arrow_mode(cur_s), I_ARROWMODE);
  1131. X    break;
  1132. X    default:
  1133. X    return;
  1134. X    }
  1135. X    update_current_settings();
  1136. X    put_msg("Settings UPDATED");
  1137. X}
  1138. X
  1139. Xstatic
  1140. Xinit_update_object(p, type, x, y, px, py)
  1141. X    char       *p;
  1142. X    int            type;
  1143. X    int            x, y;
  1144. X    int            px, py;
  1145. X{
  1146. X    switch (type) {
  1147. X    case O_COMPOUND:
  1148. X    set_temp_cursor(wait_cursor);
  1149. X    cur_c = (F_compound *) p;
  1150. X    toggle_compoundmarker(cur_c);
  1151. X    new_c = copy_compound(cur_c);
  1152. X    update_compound(new_c);
  1153. X    change_compound(cur_c, new_c);
  1154. X    toggle_compoundmarker(new_c);
  1155. X    break;
  1156. X    case O_POLYLINE:
  1157. X    set_temp_cursor(wait_cursor);
  1158. X    cur_l = (F_line *) p;
  1159. X    toggle_linemarker(cur_l);
  1160. X    new_l = copy_line(cur_l);
  1161. X    update_line(new_l);
  1162. X    change_line(cur_l, new_l);
  1163. X    toggle_linemarker(new_l);
  1164. X    break;
  1165. X    case O_TEXT:
  1166. X    set_temp_cursor(wait_cursor);
  1167. X    cur_t = (F_text *) p;
  1168. X    toggle_textmarker(cur_t);
  1169. X    new_t = copy_text(cur_t);
  1170. X    update_text(new_t);
  1171. X    change_text(cur_t, new_t);
  1172. X    toggle_textmarker(new_t);
  1173. X    break;
  1174. X    case O_ELLIPSE:
  1175. X    set_temp_cursor(wait_cursor);
  1176. X    cur_e = (F_ellipse *) p;
  1177. X    toggle_ellipsemarker(cur_e);
  1178. X    new_e = copy_ellipse(cur_e);
  1179. X    update_ellipse(new_e);
  1180. X    change_ellipse(cur_e, new_e);
  1181. X    toggle_ellipsemarker(new_e);
  1182. X    break;
  1183. X    case O_ARC:
  1184. X    set_temp_cursor(wait_cursor);
  1185. X    cur_a = (F_arc *) p;
  1186. X    toggle_arcmarker(cur_a);
  1187. X    new_a = copy_arc(cur_a);
  1188. X    update_arc(new_a);
  1189. X    change_arc(cur_a, new_a);
  1190. X    toggle_arcmarker(new_a);
  1191. X    break;
  1192. X    case O_SPLINE:
  1193. X    set_temp_cursor(wait_cursor);
  1194. X    cur_s = (F_spline *) p;
  1195. X    toggle_splinemarker(cur_s);
  1196. X    new_s = copy_spline(cur_s);
  1197. X    update_spline(new_s);
  1198. X    change_spline(cur_s, new_s);
  1199. X    toggle_splinemarker(new_s);
  1200. X    break;
  1201. X    default:
  1202. X    return;
  1203. X    }
  1204. X    reset_cursor();
  1205. X    put_msg("Object(s) UPDATED");
  1206. X}
  1207. X
  1208. Xupdate_ellipse(ellipse)
  1209. X    F_ellipse       *ellipse;
  1210. X{
  1211. X    draw_ellipse(ellipse, ERASE);
  1212. X    up_part(ellipse->thickness, cur_linewidth, I_LINEWIDTH);
  1213. X    up_part(ellipse->angle, cur_elltextangle*M_PI/180.0, I_ELLTEXTANGLE);
  1214. X    up_part(ellipse->style, cur_linestyle, I_LINESTYLE);
  1215. X    up_part(ellipse->style_val, cur_styleval * (cur_linewidth + 1) / 2, 
  1216. X        I_LINESTYLE);
  1217. X    up_part(ellipse->fill_style, cur_fillstyle, I_FILLSTYLE);
  1218. X    up_part(ellipse->color, cur_color, I_COLOR);
  1219. X    up_part(ellipse->depth, cur_depth, I_DEPTH);
  1220. X    draw_ellipse(ellipse, PAINT);
  1221. X}
  1222. X
  1223. Xupdate_arc(arc)
  1224. X    F_arc       *arc;
  1225. X{
  1226. X    draw_arc(arc, ERASE);
  1227. X    up_part(arc->thickness, cur_linewidth, I_LINEWIDTH);
  1228. X    up_part(arc->style, cur_linestyle, I_LINESTYLE);
  1229. X    up_part(arc->style_val, cur_styleval * (cur_linewidth + 1) / 2, 
  1230. X        I_LINESTYLE);
  1231. X    up_part(arc->fill_style, cur_fillstyle, I_FILLSTYLE);
  1232. X    up_part(arc->color, cur_color, I_COLOR);
  1233. X    up_part(arc->depth, cur_depth, I_DEPTH);
  1234. X    if (autoforwardarrow_mode)
  1235. X    {    /* must use {} because macro has 'if' */
  1236. X    up_part(arc->for_arrow, forward_arrow(), I_ARROWMODE);
  1237. X    }
  1238. X    else
  1239. X    {    /* must use {} because macro has 'if' */
  1240. X    up_part(arc->for_arrow, NULL, I_ARROWMODE);
  1241. X    }
  1242. X    if (autobackwardarrow_mode)
  1243. X    {    /* must use {} because macro has 'if' */
  1244. X    up_part(arc->back_arrow, backward_arrow(), I_ARROWMODE);
  1245. X    }
  1246. X    else
  1247. X    {    /* must use {} because macro has 'if' */
  1248. X    up_part(arc->back_arrow, NULL, I_ARROWMODE);
  1249. X    }
  1250. X    draw_arc(arc, PAINT);
  1251. X}
  1252. X
  1253. Xupdate_line(line)
  1254. X    F_line       *line;
  1255. X{
  1256. X    draw_line(line, ERASE);
  1257. X    if (line->type != T_EPS_BOX) {
  1258. X    up_part(line->thickness, cur_linewidth, I_LINEWIDTH);
  1259. X    up_part(line->style, cur_linestyle, I_LINESTYLE);
  1260. X    up_part(line->style_val, cur_styleval * (cur_linewidth + 1) / 2, 
  1261. X        I_LINESTYLE);
  1262. X    up_part(line->color, cur_color, I_COLOR);
  1263. X    up_part(line->radius, cur_boxradius, I_BOXRADIUS);
  1264. X    up_part(line->fill_style, cur_fillstyle, I_FILLSTYLE);
  1265. X    }
  1266. X    up_part(line->depth, cur_depth, I_DEPTH);
  1267. X    if (line->type == T_POLYLINE && line->points->next != NULL) {
  1268. X    if (autoforwardarrow_mode)
  1269. X        {    /* must use {} because macro has 'if' */
  1270. X        up_part(line->for_arrow, forward_arrow(), I_ARROWMODE);
  1271. X        }
  1272. X    else
  1273. X        {    /* must use {} because macro has 'if' */
  1274. X        up_part(line->for_arrow, NULL, I_ARROWMODE);
  1275. X        }
  1276. X    if (autobackwardarrow_mode)
  1277. X        {    /* must use {} because macro has 'if' */
  1278. X        up_part(line->back_arrow, backward_arrow(), I_ARROWMODE);
  1279. X        }
  1280. X    else
  1281. X        {    /* must use {} because macro has 'if' */
  1282. X        up_part(line->back_arrow, NULL, I_ARROWMODE);
  1283. X        }
  1284. X    }
  1285. X    draw_line(line, PAINT);
  1286. X}
  1287. X
  1288. Xupdate_text(text)
  1289. X    F_text       *text;
  1290. X{
  1291. X    PR_SIZE        size;
  1292. X    int        old_psfont_flag, new_psfont_flag;
  1293. X
  1294. X    draw_text(text, ERASE);
  1295. X    up_part(text->type, cur_textjust, I_TEXTJUST);
  1296. X    up_part(text->font, using_ps ? cur_ps_font : cur_latex_font, I_FONT);
  1297. X    old_psfont_flag = (text->flags & PSFONT_TEXT);
  1298. X    new_psfont_flag = (cur_textflags & PSFONT_TEXT);
  1299. X    up_part(text->flags, cur_textflags & ~PSFONT_TEXT, I_TEXTFLAGS);
  1300. X    if (cur_updatemask & I_FONT)
  1301. X    text->flags |= new_psfont_flag;
  1302. X    else
  1303. X    text->flags |= old_psfont_flag;
  1304. X    up_part(text->size, cur_fontsize, I_FONTSIZE);
  1305. X    up_part(text->angle, cur_elltextangle*M_PI/180.0, I_ELLTEXTANGLE);
  1306. X    up_part(text->color, cur_color, I_COLOR);
  1307. X    up_part(text->depth, cur_depth, I_DEPTH);
  1308. X    size = pf_textwidth(lookfont(x_fontnum(text->flags, text->font), text->size,
  1309. X            cur_elltextangle), strlen(text->cstring), text->cstring);
  1310. X    text->length = size.x;    /* in pixels */
  1311. X    text->height = size.y;    /* in pixels */
  1312. X    reload_text_fstruct(text);    /* make sure fontstruct is current */
  1313. X    draw_text(text, PAINT);
  1314. X}
  1315. X
  1316. Xupdate_spline(spline)
  1317. X    F_spline       *spline;
  1318. X{
  1319. X    draw_spline(spline, ERASE);
  1320. X    up_part(spline->thickness, cur_linewidth, I_LINEWIDTH);
  1321. X    up_part(spline->style, cur_linestyle, I_LINESTYLE);
  1322. X    up_part(spline->style_val, cur_styleval * (cur_linewidth + 1) / 2, 
  1323. X        I_LINESTYLE);
  1324. X    up_part(spline->fill_style, cur_fillstyle, I_FILLSTYLE);
  1325. X    up_part(spline->color, cur_color, I_COLOR);
  1326. X    up_part(spline->depth, cur_depth, I_DEPTH);
  1327. X    if (open_spline(spline)) {
  1328. X    if (autoforwardarrow_mode)
  1329. X        {    /* must use {} because macro has 'if' */
  1330. X        up_part(spline->for_arrow, forward_arrow(), I_ARROWMODE);
  1331. X        }
  1332. X    else
  1333. X        {    /* must use {} because macro has 'if' */
  1334. X        up_part(spline->for_arrow, NULL, I_ARROWMODE);
  1335. X        }
  1336. X    if (autobackwardarrow_mode)
  1337. X        {    /* must use {} because macro has 'if' */
  1338. X        up_part(spline->back_arrow, backward_arrow(), I_ARROWMODE);
  1339. X        }
  1340. X    else
  1341. X        {    /* must use {} because macro has 'if' */
  1342. X        up_part(spline->back_arrow, NULL, I_ARROWMODE);
  1343. X        }
  1344. X    }
  1345. X    draw_spline(spline, PAINT);
  1346. X}
  1347. X
  1348. Xupdate_compound(compound)
  1349. X    F_compound       *compound;
  1350. X{
  1351. X    update_lines(compound->lines);
  1352. X    update_splines(compound->splines);
  1353. X    update_ellipses(compound->ellipses);
  1354. X    update_arcs(compound->arcs);
  1355. X    update_texts(compound->texts);
  1356. X    update_compounds(compound->compounds);
  1357. X    compound_bound(compound, &compound->nwcorner.x, &compound->nwcorner.y,
  1358. X           &compound->secorner.x, &compound->secorner.y);
  1359. X}
  1360. X
  1361. Xupdate_arcs(arcs)
  1362. X    F_arc       *arcs;
  1363. X{
  1364. X    F_arc       *a;
  1365. X
  1366. X    for (a = arcs; a != NULL; a = a->next)
  1367. X    update_arc(a);
  1368. X}
  1369. X
  1370. Xupdate_compounds(compounds)
  1371. X    F_compound       *compounds;
  1372. X{
  1373. X    F_compound       *c;
  1374. X
  1375. X    for (c = compounds; c != NULL; c = c->next)
  1376. X    update_compound(c);
  1377. X}
  1378. X
  1379. Xupdate_ellipses(ellipses)
  1380. X    F_ellipse       *ellipses;
  1381. X{
  1382. X    F_ellipse       *e;
  1383. X
  1384. X    for (e = ellipses; e != NULL; e = e->next)
  1385. X    update_ellipse(e);
  1386. X}
  1387. X
  1388. Xupdate_lines(lines)
  1389. X    F_line       *lines;
  1390. X{
  1391. X    F_line       *l;
  1392. X
  1393. X    for (l = lines; l != NULL; l = l->next)
  1394. X    update_line(l);
  1395. X}
  1396. X
  1397. Xupdate_splines(splines)
  1398. X    F_spline       *splines;
  1399. X{
  1400. X    F_spline       *s;
  1401. X
  1402. X    for (s = splines; s != NULL; s = s->next)
  1403. X    update_spline(s);
  1404. X}
  1405. X
  1406. Xupdate_texts(texts)
  1407. X    F_text       *texts;
  1408. X{
  1409. X    F_text       *t;
  1410. X
  1411. X    for (t = texts; t != NULL; t = t->next)
  1412. X    update_text(t);
  1413. X}
  1414. END_OF_FILE
  1415. if test 12320 -ne `wc -c <'e_update.c'`; then
  1416.     echo shar: \"'e_update.c'\" unpacked with wrong size!
  1417. fi
  1418. # end of 'e_update.c'
  1419. fi
  1420. if test -f 'w_canvas.c' -a "${1}" != "-c" ; then 
  1421.   echo shar: Will not clobber existing file \"'w_canvas.c'\"
  1422. else
  1423. echo shar: Extracting \"'w_canvas.c'\" \(12414 characters\)
  1424. sed "s/^X//" >'w_canvas.c' <<'END_OF_FILE'
  1425. X/*
  1426. X * FIG : Facility for Interactive Generation of figures
  1427. X * Copyright (c) 1985 by Supoj Sutanthavibul
  1428. X *
  1429. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1430. X * documentation for any purpose is hereby granted without fee, provided that
  1431. X * the above copyright notice appear in all copies and that both the copyright
  1432. X * notice and this permission notice appear in supporting documentation. 
  1433. X * No representations are made about the suitability of this software for 
  1434. X * any purpose.  It is provided "as is" without express or implied warranty."
  1435. X */
  1436. X
  1437. X/*********************** IMPORTS ************************/
  1438. X
  1439. X#include "fig.h"
  1440. X#include "figx.h"
  1441. X#include "resources.h"
  1442. X#include "mode.h"
  1443. X#include "paintop.h"
  1444. X#include <X11/keysym.h>
  1445. X#include "u_bound.h"
  1446. X#include "w_canvas.h"
  1447. X#include "w_mousefun.h"
  1448. X#include "w_setup.h"
  1449. X#include "w_util.h"
  1450. X#include "w_zoom.h"
  1451. X#ifndef SYSV
  1452. X#include "sys/time.h"
  1453. X#endif
  1454. X#include <X11/Xatom.h>
  1455. X
  1456. Xextern        erase_rulermark();
  1457. Xextern        erase_objecthighlight();
  1458. Xextern        char_handler();
  1459. X
  1460. X/************** LOCAL STRUCTURE ***************/
  1461. X
  1462. Xtypedef struct _CompKey CompKey;
  1463. X
  1464. Xstruct _CompKey {
  1465. X    unsigned char   key;
  1466. X    unsigned char   first;
  1467. X    unsigned char   second;
  1468. X    CompKey       *next;
  1469. X};
  1470. X
  1471. X/*********************** EXPORTS ************************/
  1472. X
  1473. Xint        (*canvas_kbd_proc) ();
  1474. Xint        (*canvas_locmove_proc) ();
  1475. Xint        (*canvas_leftbut_proc) ();
  1476. Xint        (*canvas_middlebut_proc) ();
  1477. Xint        (*canvas_middlebut_save) ();
  1478. Xint        (*canvas_rightbut_proc) ();
  1479. Xint        (*return_proc) ();
  1480. Xint        null_proc();
  1481. Xint        clip_xmin, clip_ymin, clip_xmax, clip_ymax;
  1482. Xint        clip_width, clip_height;
  1483. Xint        cur_x, cur_y;
  1484. X
  1485. XString        local_translations = "";
  1486. X
  1487. X/*********************** LOCAL ************************/
  1488. X
  1489. Xstatic CompKey *allCompKey = NULL;
  1490. Xstatic        canvas_selected();
  1491. Xstatic unsigned char getComposeKey();
  1492. Xstatic        readComposeKey();
  1493. X
  1494. Xint        ignore_exp_cnt = 2;    /* we get 2 expose events at startup */
  1495. X
  1496. Xnull_proc()
  1497. X{
  1498. X    /* almost does nothing */
  1499. X    if (highlighting)
  1500. X    erase_objecthighlight();
  1501. X}
  1502. X
  1503. Xstatic void
  1504. Xcanvas_exposed(tool, event, params, nparams)
  1505. X    TOOL        tool;
  1506. X    XButtonEvent   *event;
  1507. X    String       *params;
  1508. X    Cardinal       *nparams;
  1509. X{
  1510. X    static        xmin = 9999, xmax = -9999, ymin = 9999, ymax = -9999;
  1511. X    XExposeEvent   *xe = (XExposeEvent *) event;
  1512. X    register int    tmp;
  1513. X
  1514. X    if (xe->x < xmin)
  1515. X    xmin = xe->x;
  1516. X    if (xe->y < ymin)
  1517. X    ymin = xe->y;
  1518. X    if ((tmp = xe->x + xe->width) > xmax)
  1519. X    xmax = tmp;
  1520. X    if ((tmp = xe->y + xe->height) > ymax)
  1521. X    ymax = tmp;
  1522. X    if (xe->count > 0)
  1523. X    return;
  1524. X
  1525. X    /* kludge to stop getting extra redraws at start up */
  1526. X    if (ignore_exp_cnt)
  1527. X    ignore_exp_cnt--;
  1528. X    else
  1529. X    redisplay_region(xmin, ymin, xmax, ymax);
  1530. X    xmin = 9999, xmax = -9999, ymin = 9999, ymax = -9999;
  1531. X}
  1532. X
  1533. Xstatic void canvas_paste();
  1534. X
  1535. XXtActionsRec    canvas_actions[] =
  1536. X{
  1537. X    {"EventCanv", (XtActionProc) canvas_selected},
  1538. X    {"ExposeCanv", (XtActionProc) canvas_exposed},
  1539. X    {"EnterCanv", (XtActionProc) draw_mousefun_canvas},
  1540. X    {"PasteCanv", (XtActionProc) canvas_paste},
  1541. X    {"LeaveCanv", (XtActionProc) clear_mousefun},
  1542. X    {"EraseRulerMark", (XtActionProc) erase_rulermark},
  1543. X};
  1544. X
  1545. X/* need the ~Meta for the EventCanv action so that the accelerators still work */
  1546. Xstatic String    canvas_translations =
  1547. X"<Motion>:EventCanv()\n\
  1548. X    Any<BtnDown>:EventCanv()\n\
  1549. X    <Key>F18: PasteCanv()\n\
  1550. X    <EnterWindow>:EnterCanv()\n\
  1551. X    <LeaveWindow>:LeaveCanv()EraseRulerMark()\n\
  1552. X    ~Meta<Key>:EventCanv()\n\
  1553. X    <Expose>:ExposeCanv()\n";
  1554. X
  1555. Xinit_canvas(tool)
  1556. X    TOOL       tool;
  1557. X{
  1558. X    XColor       fixcolors[2];
  1559. X
  1560. X    DeclareArgs(10);
  1561. X
  1562. X    FirstArg(XtNlabel, "");
  1563. X    NextArg(XtNwidth, CANVAS_WD);
  1564. X    NextArg(XtNheight, CANVAS_HT);
  1565. X    NextArg(XtNfromHoriz, mode_panel);
  1566. X    NextArg(XtNhorizDistance, -INTERNAL_BW);
  1567. X    NextArg(XtNfromVert, topruler_sw);
  1568. X    NextArg(XtNvertDistance, -INTERNAL_BW);
  1569. X    NextArg(XtNtop, XtChainTop);
  1570. X    NextArg(XtNleft, XtChainLeft);
  1571. X    NextArg(XtNborderWidth, INTERNAL_BW);
  1572. X
  1573. X    canvas_sw = XtCreateWidget("canvas", labelWidgetClass, tool,
  1574. X                   Args, ArgCount);
  1575. X
  1576. X    FirstArg(XtNforeground, &x_fg_color.pixel);
  1577. X    NextArg(XtNbackground, &x_bg_color.pixel);
  1578. X    GetValues(canvas_sw);
  1579. X
  1580. X    /*
  1581. X     * get the RGB values for recolor cursor use -- may want to have cursor
  1582. X     * color resource
  1583. X     */
  1584. X    fixcolors[0] = x_fg_color;
  1585. X    fixcolors[1] = x_bg_color;
  1586. X    XQueryColors(tool_d, DefaultColormapOfScreen(tool_s), fixcolors, 2);
  1587. X    x_fg_color = fixcolors[0];
  1588. X    x_bg_color = fixcolors[1];
  1589. X
  1590. X    /* now fix the global GC */
  1591. X    XSetState(tool_d, gc, x_fg_color.pixel, x_bg_color.pixel, GXcopy,
  1592. X          AllPlanes);
  1593. X
  1594. X    /* and recolor the cursors */
  1595. X    recolor_cursors();
  1596. X
  1597. X    canvas_leftbut_proc = null_proc;
  1598. X    canvas_middlebut_proc = null_proc;
  1599. X    canvas_rightbut_proc = null_proc;
  1600. X    canvas_kbd_proc = canvas_locmove_proc = null_proc;
  1601. X    XtAppAddActions(tool_app, canvas_actions, XtNumber(canvas_actions));
  1602. X    XtAugmentTranslations(canvas_sw,
  1603. X               XtParseTranslationTable(canvas_translations));
  1604. X
  1605. X    readComposeKey();
  1606. X
  1607. X    return (1);
  1608. X}
  1609. X
  1610. Xsetup_canvas()
  1611. X{
  1612. X    canvas_win = XtWindow(canvas_sw);
  1613. X    init_grid();
  1614. X    reset_clip_window();
  1615. X}
  1616. X
  1617. Xstatic
  1618. Xcanvas_selected(tool, event, params, nparams)
  1619. X    TOOL        tool;
  1620. X    XButtonEvent   *event;
  1621. X    String       *params;
  1622. X    Cardinal       *nparams;
  1623. X{
  1624. X    register int    x, y;
  1625. X    KeySym        key;
  1626. X    static int        sx = -10000, sy = -10000;
  1627. X    char        buf[1];
  1628. X    XButtonPressedEvent *be = (XButtonPressedEvent *) event;
  1629. X    XKeyPressedEvent *ke = (XKeyPressedEvent *) event;
  1630. X
  1631. X    static char        compose_buf[2];
  1632. X    static char        compose_key = 0;
  1633. X    unsigned char   c;
  1634. X
  1635. X    switch (event->type) {
  1636. X    case MotionNotify:
  1637. X#if defined(SMOOTHMOTION) || defined(OPENWIN)
  1638. X    /* translate from zoomed coords to object coords */
  1639. X    x = BACKX(event->x);
  1640. X    y = BACKY(event->y);
  1641. X
  1642. X    /* perform appropriate rounding if necessary */
  1643. X    round_coords(x, y);
  1644. X
  1645. X    if (x == sx && y == sy)
  1646. X        return;
  1647. X    sx = x;
  1648. X    sy = y;
  1649. X#else
  1650. X    {
  1651. X        Window        rw, cw;
  1652. X        int            rx, ry, cx, cy;
  1653. X        unsigned int    mask;
  1654. X
  1655. X        XQueryPointer(event->display, event->window,
  1656. X              &rw, &cw,
  1657. X              &rx, &ry,
  1658. X              &cx, &cy,
  1659. X              &mask);
  1660. X        cx = BACKX(cx);
  1661. X        cy = BACKY(cy);
  1662. X
  1663. X        /* perform appropriate rounding if necessary */
  1664. X        round_coords(cx, cy);
  1665. X
  1666. X        if (cx == sx && cy == sy)
  1667. X        break;
  1668. X        x = sx = cx;    /* these are zoomed */
  1669. X        y = sy = cy;    /* coordinates!        */
  1670. X    }
  1671. X#endif /* SMOOTHMOTION || OPENWIN */
  1672. X    set_rulermark(x, y);
  1673. X    (*canvas_locmove_proc) (x, y);
  1674. X    break;
  1675. X    case ButtonPress:
  1676. X    /* translate from zoomed coords to object coords */
  1677. X    x = BACKX(event->x);
  1678. X    y = BACKY(event->y);
  1679. X
  1680. X    /* Convert Alt-Button3 to Button2 */
  1681. X    if (be->button == Button3 && be->state & Mod1Mask) {
  1682. X        be->button = Button2;
  1683. X        be->state &= ~Mod1Mask;
  1684. X    }
  1685. X
  1686. X    /* call interactive zoom function if control key is pressed */
  1687. X    if (be->state & ControlMask) {
  1688. X        zoom_selected(x, y, be->button);
  1689. X        break;
  1690. X    }
  1691. X    /* perform appropriate rounding if necessary */
  1692. X    round_coords(x, y);
  1693. X
  1694. X    if (be->button == Button1)
  1695. X        (*canvas_leftbut_proc) (x, y, be->state & ShiftMask);
  1696. X    else if (be->button == Button2)
  1697. X        (*canvas_middlebut_proc) (x, y, be->state & ShiftMask);
  1698. X    else if (be->button == Button3)
  1699. X        (*canvas_rightbut_proc) (x, y, be->state & ShiftMask);
  1700. X    break;
  1701. X    case KeyPress:
  1702. X    /* we might want to check action_on */
  1703. X    /* if arrow keys are pressed, pan */
  1704. X    key = XLookupKeysym(ke, 0);
  1705. X    if (key == XK_Left ||
  1706. X        key == XK_Right ||
  1707. X        key == XK_Up ||
  1708. X        key == XK_Down ||
  1709. X        key == XK_Home ||
  1710. X        key == XK_Multi_key ||
  1711. X        key == XK_Alt_L ) {
  1712. X        switch (key) {
  1713. X        case XK_Left:
  1714. X        pan_left();
  1715. X        break;
  1716. X        case XK_Right:
  1717. X        pan_right();
  1718. X        break;
  1719. X        case XK_Up:
  1720. X        pan_up();
  1721. X        break;
  1722. X        case XK_Down:
  1723. X        pan_down();
  1724. X        break;
  1725. X        case XK_Home:
  1726. X        pan_origin();
  1727. X        break;
  1728. X        case XK_Multi_key:
  1729. X        case XK_Alt_L:
  1730. X        compose_key = 1;
  1731. X        break;
  1732. X        }
  1733. X    } else {
  1734. X        switch (compose_key) {
  1735. X        case 0:
  1736. X        if (XLookupString(ke, buf, sizeof(buf), NULL, NULL) > 0)
  1737. X            (*canvas_kbd_proc) ((unsigned char) buf[0]);
  1738. X        break;
  1739. X        case 1:
  1740. X        if (XLookupString(ke, &compose_buf[0], 1, NULL, NULL)
  1741. X            > 0)
  1742. X            compose_key = 2;
  1743. X        break;
  1744. X        case 2:
  1745. X        if (XLookupString(ke, &compose_buf[1], 1, NULL, NULL)
  1746. X            > 0) {
  1747. X            if ((c = getComposeKey(compose_buf)) != '\0')
  1748. X            (*canvas_kbd_proc) (c);
  1749. X            else {
  1750. X            (*canvas_kbd_proc) ((unsigned char) compose_buf[0]);
  1751. X            (*canvas_kbd_proc) ((unsigned char) compose_buf[1]);
  1752. X            }
  1753. X            compose_key = 0;
  1754. X        }
  1755. X        break;
  1756. X        }
  1757. X    }
  1758. X    break;
  1759. X    }
  1760. X}
  1761. X
  1762. Xclear_canvas()
  1763. X{
  1764. X    XClearArea(tool_d, canvas_win, clip_xmin, clip_ymin,
  1765. X           clip_width, clip_height, False);
  1766. X}
  1767. X
  1768. Xclear_region(xmin, ymin, xmax, ymax)
  1769. X    int            xmin, ymin, xmax, ymax;
  1770. X{
  1771. X    XClearArea(tool_d, canvas_win, xmin, ymin,
  1772. X           xmax - xmin + 1, ymax - ymin + 1, False);
  1773. X}
  1774. X
  1775. Xstatic void get_canvas_clipboard();
  1776. X
  1777. Xstatic void canvas_paste(w, paste_event)
  1778. XWidget w;
  1779. XXKeyEvent *paste_event;
  1780. X{
  1781. X    Time event_time;
  1782. X
  1783. X    if (canvas_kbd_proc != char_handler)
  1784. X        return;
  1785. X
  1786. X    if (paste_event != NULL)
  1787. X        event_time = paste_event->time;
  1788. X       else
  1789. X        time((time_t *) &event_time);
  1790. X    /***
  1791. X    This doesn't seem to work:
  1792. X    XtGetSelectionValue(w, XInternAtom(XtDisplay(w), "XA_PRIMARY", False),
  1793. X        XA_STRING, get_canvas_clipboard, NULL, event_time);
  1794. X    ***/
  1795. X    XtGetSelectionValue(w, XA_PRIMARY,
  1796. X        XA_STRING, get_canvas_clipboard, NULL, event_time);
  1797. X}
  1798. X
  1799. Xstatic void
  1800. Xget_canvas_clipboard(w, client_data, selection, type, buf, length, format)
  1801. XWidget w;
  1802. XXtPointer client_data;
  1803. XAtom *selection;
  1804. XAtom *type;
  1805. XXtPointer buf;
  1806. Xunsigned long *length;
  1807. Xint *format;
  1808. X{
  1809. X    char *c;
  1810. X    int i;
  1811. X
  1812. X    c = buf;
  1813. X    for (i=0; i<*length; i++) {
  1814. X           canvas_kbd_proc(*c);
  1815. X           c++;
  1816. X    }
  1817. X    XtFree(buf);
  1818. X}
  1819. X
  1820. Xstatic unsigned char
  1821. XgetComposeKey(buf)
  1822. X    char       *buf;
  1823. X{
  1824. X    CompKey       *compKeyPtr = allCompKey;
  1825. X
  1826. X    while (compKeyPtr != NULL) {
  1827. X    if (compKeyPtr->first == (unsigned char) (buf[0]) &&
  1828. X        compKeyPtr->second == (unsigned char) (buf[1]))
  1829. X        return (compKeyPtr->key);
  1830. X    else
  1831. X        compKeyPtr = compKeyPtr->next;
  1832. X    }
  1833. X    return ('\0');
  1834. X}
  1835. X
  1836. Xstatic
  1837. XreadComposeKey()
  1838. X{
  1839. X    FILE       *st;
  1840. X    CompKey       *compKeyPtr;
  1841. X    char        line[255];
  1842. X    char       *p;
  1843. X    char       *p1;
  1844. X    char       *p2;
  1845. X    char       *p3;
  1846. X    long        size;
  1847. X    int            charfrom;
  1848. X    int            charinto;
  1849. X
  1850. X
  1851. X/* Treat the compose key DB a different way.  In this order:
  1852. X *
  1853. X *  1.    If the resource contains no "/", prefix it with the name of
  1854. X *    the wired-in directory and use that.
  1855. X *
  1856. X *  2.    Otherwise see if it begins with "~/", and if so use that,
  1857. X *    with the leading "~" replaced by the name of this user's
  1858. X *    $HOME directory.
  1859. X *
  1860. X * This way a user can have private compose key settings even when running
  1861. X * xfig privately.
  1862. X *
  1863. X * Pete Kaiser
  1864. X * 24 April 1992
  1865. X */
  1866. X
  1867. X     /* no / in name, make relative to XFIGLIBDIR */
  1868. X     if (strchr(appres.keyFile, '/') == NULL) {
  1869. X     strcpy(line, XFIGLIBDIR);
  1870. X     strcat(line, "/");
  1871. X     strcat(line, appres.keyFile);
  1872. X     }
  1873. X
  1874. X     /* expand the ~ to the user's home directory */
  1875. X     else if (! strncmp(appres.keyFile, "~/", 2)) {
  1876. X     strcpy(line, getenv("HOME"));
  1877. X     for (charinto = strlen(line), charfrom = 1;
  1878. X          line[charinto++] = appres.keyFile[charfrom++]; );
  1879. X       }
  1880. X    else
  1881. X    strcpy(line, appres.keyFile);
  1882. X
  1883. X    if ((st = fopen(line, "r")) == NULL) {
  1884. X    allCompKey = NULL;
  1885. X    fprintf(stderr,"%cCan't open compose key file '%s',\n",007,line);
  1886. X    fprintf(stderr,"\tno multi-key sequences available\n");
  1887. X    return;
  1888. X    }
  1889. X    fseek(st, 0, 2);
  1890. X    size = ftell(st);
  1891. X    fseek(st, 0, 0);
  1892. X
  1893. X    local_translations = (String) malloc(size + 1);
  1894. X
  1895. X    strcpy(local_translations, "");
  1896. X    while (fgets(line, 250, st) != NULL) {
  1897. X    if (line[0] != '#') {
  1898. X        strcat(local_translations, line);
  1899. X        if ((p = strstr(line, "Multi_key")) != NULL) {
  1900. X        if (allCompKey == NULL) {
  1901. X            allCompKey = (CompKey *) malloc(sizeof(CompKey));
  1902. X            compKeyPtr = allCompKey;
  1903. X        } else {
  1904. X            compKeyPtr->next = (CompKey *) malloc(sizeof(CompKey));
  1905. X            compKeyPtr = compKeyPtr->next;
  1906. X        }
  1907. X
  1908. X        p1 = strstr(p, "<Key>") + strlen("<Key>");
  1909. X        p = strstr(p1, ",");
  1910. X        *p++ = '\0';
  1911. X        p2 = strstr(p, "<Key>") + strlen("<Key>");
  1912. X        p = strstr(p2, ":");
  1913. X        *p++ = '\0';
  1914. X        p3 = strstr(p, "insert-string(") + strlen("insert-string(");
  1915. X        p = strstr(p3, ")");
  1916. X        *p++ = '\0';
  1917. X
  1918. X        if (strlen(p3) == 1)
  1919. X            compKeyPtr->key = *p3;
  1920. X        else
  1921. X            compKeyPtr->key = strtol(p3, NULL, 16);
  1922. X        compKeyPtr->first = XStringToKeysym(p1);
  1923. X        compKeyPtr->second = XStringToKeysym(p2);
  1924. X        compKeyPtr->next = NULL;
  1925. X        }
  1926. X    }
  1927. X    }
  1928. X
  1929. X    fclose(st);
  1930. X
  1931. X}
  1932. END_OF_FILE
  1933. if test 12414 -ne `wc -c <'w_canvas.c'`; then
  1934.     echo shar: \"'w_canvas.c'\" unpacked with wrong size!
  1935. fi
  1936. # end of 'w_canvas.c'
  1937. fi
  1938. echo shar: End of archive 10 \(of 27\).
  1939. cp /dev/null ark10isdone
  1940. MISSING=""
  1941. 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
  1942.     if test ! -f ark${I}isdone ; then
  1943.     MISSING="${MISSING} ${I}"
  1944.     fi
  1945. done
  1946. if test "${MISSING}" = "" ; then
  1947.     echo You have unpacked all 27 archives.
  1948.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1949. else
  1950.     echo You still need to unpack the following archives:
  1951.     echo "        " ${MISSING}
  1952. fi
  1953. ##  End of shell archive.
  1954. exit 0
  1955.  
  1956. exit 0 # Just in case...
  1957. -- 
  1958.   // chris@IMD.Sterling.COM       | Send comp.sources.x submissions to:
  1959. \X/  Amiga - The only way to fly! |    sources-x@imd.sterling.com
  1960.  "It's intuitively obvious to the |
  1961.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  1962.