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

  1. Newsgroups: comp.sources.x
  2. From: envbvs@epb9.lbl.gov (Brian V. Smith)
  3. Subject: v19i116:  xfig - Draw amd manipulate objects in an X-Window, Part04/27
  4. Message-ID: <1993May21.021259.5137@sparky.imd.sterling.com>
  5. X-Md4-Signature: 36b46015aca4f70e7654cadaebeb376e
  6. Sender: chris@sparky.imd.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Fri, 21 May 1993 02:12:59 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 116
  13. Archive-name: xfig/part04
  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 4 (of 27)."
  24. # Contents:  Examples/damper.fig.uu Examples/houseA.fig.uu
  25. #   Examples/houseB.fig.uu Examples/schemat.fig.uu Fig-color.ad
  26. #   d_line.c e_align.c f_xbitmap.c resources.h u_print.c w_msgpanel.c
  27. #   w_util.c
  28. # Wrapped by envbvs@epb9.lbl.gov.lbl.gov on Mon May  3 12:05:47 1993
  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'\" \(4835 characters\)
  34. sed "s/^X//" >'Examples/damper.fig.u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@,"`Q-B`P("TQ(#`@
  112. XM,"XP,#`@-"`Q-2`S,3(@,S@Q(#(R(%-C:&5M871I8R!O9B!4=V\M6F]N92!$
  113. X686UP97)E9"!);G-T86QL871I;VX!"E-C
  114. X`
  115. Xend
  116. END_OF_FILE
  117. if test 4835 -ne `wc -c <'Examples/damper.fig.uu'`; then
  118.     echo shar: \"'Examples/damper.fig.uu'\" unpacked with wrong size!
  119. fi
  120. # end of 'Examples/damper.fig.uu'
  121. fi
  122. if test -f 'Examples/houseA.fig.uu' -a "${1}" != "-c" ; then 
  123.   echo shar: Will not clobber existing file \"'Examples/houseA.fig.uu'\"
  124. else
  125. echo shar: Extracting \"'Examples/houseA.fig.uu'\" \(5917 characters\)
  126. sed "s/^X//" >'Examples/houseA.fig.uu' <<'END_OF_FILE'
  127. Xbegin 444 houseA.fig
  128. XM(T9)1R`R+C$*.#`@,@HU(#$@,"`Q("TQ(#`@,"`P(#`N,#`P(#`@,"`P(#(V
  129. XM,BXW-3`@-#$P+C(U,"`R-C0@,S4Y(#(Y.2`S-S0@,S$T(#0P.0HU(#$@,"`Q
  130. XM("TQ(#`@,"`P(#`N,#`P(#$@,"`P(#0W-2XR-3`@-#$P+C(U,"`T-S0@,S4Y
  131. XM(#0S.2`S-S0@-#(T(#0P.0HQ(#(@,"`Q("TQ(#`@,"`P(#`N,#`P(#$@,"XP
  132. XM,#`@,CDQ(#0X-R`Q,2`Q-2`R.#(@-#<P(#,P,B`U,#(*,2`Q(#`@,2`M,2`P
  133. XM(#`@,"`P+C`P,"`Q(#`N,#`P(#,V-"`T.3D@,3$@,38@,S8T(#0Y.2`S-S0@
  134. XM-3$T"C$@,2`P(#$@+3$@,"`P(#`@,"XP,#`@,2`P+C`P,"`S-C4@-#4T(#$Q
  135. XM(#$V(#,V-2`T-30@,S<U(#0V.0HR(#$@,"`Q("TQ(#`@,"`P(#`N,#`P(#`@
  136. XM,"`P"@D@,C@R(#0Y-"`R.#(@-3`U(#DY.3D@.3DY.0HR(#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212. XM(#`N,#`P(#`@,"`P"@D@,C(T(#<Y(#(R-"`Q,SD@.3DY.2`Y.3DY"C(@,2`P
  213. XM(#$@+3$@,"`P(#`@,"XP,#`@,"`P(#`*"2`Q.3D@,3,Y(#(R-"`Q,SD@.3DY
  214. XM.2`Y.3DY"C(@,2`P(#$@+3$@,"`P(#`@,"XP,#`@,"`P(#`*"2`Q.#D@,3,Y
  215. XM(#$R.2`W.2`Y.3DY(#DY.3D*,B`Q(#`@,2`M,2`P(#`@,"`P+C`P,"`P(#`@
  216. XM,`H)(#$V-"`W.2`Q.3D@,3,Y(#DY.3D@.3DY.0HR(#$@,"`Q("TQ(#`@,"`P
  217. XM(#`N,#`P(#`@,"`P"@D@,3@Y(#$T.2`Q,CD@,3$T(#DY.3D@.3DY.0HT(#$@
  218. XM,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#0V(#0U-"`T-S(@0TQ/4T54`0HT(#$@
  219. XM,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#,Y(#$U.2`Q.#$@1$]73@$*-"`Q(#`@
  220. XM,3(@,"`M,2`P(#`N,#`P(#0@.2`S,R`R.30@-#4T($)!5$@!"C0@,2`P(#$R
  221. XM(#`@+3$@,"`P+C`P,"`T(#D@,3$U(#,V-"`R.34@34%35$52($)%1%)/3TT!
  222. XK"C0@,2`P(#$R(#`@+3$@,"`P+C`P,"`T(#D@,3@@,C$Y(#,T-"!#3"X!"DT!
  223. X`
  224. Xend
  225. END_OF_FILE
  226. if test 5917 -ne `wc -c <'Examples/houseA.fig.uu'`; then
  227.     echo shar: \"'Examples/houseA.fig.uu'\" unpacked with wrong size!
  228. fi
  229. # end of 'Examples/houseA.fig.uu'
  230. fi
  231. if test -f 'Examples/houseB.fig.uu' -a "${1}" != "-c" ; then 
  232.   echo shar: Will not clobber existing file \"'Examples/houseB.fig.uu'\"
  233. else
  234. echo shar: Extracting \"'Examples/houseB.fig.uu'\" \(5851 characters\)
  235. sed "s/^X//" >'Examples/houseB.f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2`S.3D@:&]U<V5"+F9I9P$*-"`P(#`@,3(@
  327. XM,"`M,2`P(#`N,#`P(#0@.2`S,R`S-C0@,30Y($)!5$@!"C0@,"`P(#$R(#`@
  328. XM+3$@,"`P+C`P,"`T(#D@,SD@,C`P(#(Q,2!$3U=.`0HT(#`@,"`Q,B`P("TQ
  329. XM(#`@,"XP,#`@-"`Y(#$Q-2`R-C@@,S`U($U!4U1%4B!"14123T]-`0HT(#`@
  330. XH,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#0P(#8P-"`S,#0@4U151%D!"@HT
  331. X`
  332. Xend
  333. END_OF_FILE
  334. if test 5851 -ne `wc -c <'Examples/houseB.fig.uu'`; then
  335.     echo shar: \"'Examples/houseB.fig.uu'\" unpacked with wrong size!
  336. fi
  337. # end of 'Examples/houseB.fig.uu'
  338. fi
  339. if test -f 'Examples/schemat.fig.uu' -a "${1}" != "-c" ; then 
  340.   echo shar: Will not clobber existing file \"'Examples/schemat.fig.uu'\"
  341. else
  342. echo shar: Extracting \"'Examples/schemat.fig.uu'\" \(5506 characters\)
  343. sed "s/^X//" >'Examples/schemat.fig.uu' <<'END_OF_FILE'
  344. Xbegin 444 schemat.fig
  345. XM(T9)1R`R+C$*.#`@,@HU(#$@,"`Q("TQ(#`@,"`P(#`N,#`P(#`@,2`Q(#(U
  346. XM.2XP,#`@,3,Y+C`P,"`R-3D@,3$Y(#(W.2`Q,SD@,C4Y(#$U.0H),SDS,C$V
  347. XM(#4R-#(Y-B`P+C`P,"`P+C`P,"`P+C`P,`H)-#4X-S4R(#0U.#<V,"`P+C`P
  348. XM,"`P+C`P,"`P+C`P,`HU(#$@,"`Q("TQ(#`@,"`P(#`N,#`P(#`@,"`P(#(U
  349. XM.2XP,#`@-SDN,#`P(#(U.2`U.2`R-SD@-SD@,C4Y(#DY"C$@,R`P(#$@+3$@
  350. XM,"`P(#`@,"XP,#`@,2`P+C`P,"`S,SD@-#$Y(#0@-"`S,SD@-#$Y(#,T,R`T
  351. X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XP,#`*-"`P(#`@,3(@,"`M,2`P(#`N,#`P(#0@,2`X(#0R
  427. XM.2`S,3D@+0$*-"`P(#`@,3(@,"`M,2`P(#`N,#`P(#0@-2`W(#0R.2`R-SD@
  428. XM*P$*-"`P(#`@,3(@,"`M,2`P(#`N,#`P(#0@.2`W(#(T,2`R.3`@4P$*-"`P
  429. XM(#`@,3(@,"`M,2`P(#`N,#`P(#0@.2`X(#(T,2`S-38@4@$*-"`P(#`@,3(@
  430. XM,"`M,2`P(#`N,#`P(#0@,3$@.2`R-3D@,S4T(%$!"C0@,"`P(#$R(#`@+3$@
  431. XM,"`P+C`P,"`T(#$Q(#D@,C4Y(#(Y-"!1`0HT(#`@,"`Q,B`P("TQ(#`@,"XP
  432. XM,#`@-"`Y(#@@,C(T(#,U-"!+`0HT(#`@,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y
  433. X.(#0@,C(T(#(Y-"!*`0HU
  434. X`
  435. Xend
  436. END_OF_FILE
  437. if test 5506 -ne `wc -c <'Examples/schemat.fig.uu'`; then
  438.     echo shar: \"'Examples/schemat.fig.uu'\" unpacked with wrong size!
  439. fi
  440. # end of 'Examples/schemat.fig.uu'
  441. fi
  442. if test -f 'Fig-color.ad' -a "${1}" != "-c" ; then 
  443.   echo shar: Will not clobber existing file \"'Fig-color.ad'\"
  444. else
  445. echo shar: Extracting \"'Fig-color.ad'\" \(5024 characters\)
  446. sed "s/^X//" >'Fig-color.ad' <<'END_OF_FILE'
  447. X! Some interesting colors for the different parts of xfig
  448. X! if you are using a COLOR workstation.
  449. X
  450. X#include "Fig"
  451. X
  452. X#ifdef COLOR
  453. X! Top Ruler
  454. X    Fig*topruler.background:    grey95
  455. X    Fig*topruler.foreground:    black
  456. X! Side Ruler
  457. X    Fig*sideruler.background:    grey95
  458. X    Fig*sideruler.foreground:    black
  459. X! Message panel
  460. X    Fig*file_name.background:    lightskyblue
  461. X    Fig*file_name.foreground:    black
  462. X    Fig*message*background:        white
  463. X    Fig*message*foreground:        black
  464. X! Command (top) panel
  465. X    Fig*commands*background:    grey85
  466. X    Fig*commands*foreground:    black
  467. X! Indicator (lower) panel
  468. X    Fig*ind_panel.background: dodgerblue
  469. X    Fig*ind_panel.foreground: black
  470. X    Fig*ind_panel.button_form.button.background: dodgerblue
  471. X    Fig*ind_panel.button_form.button.foreground: black
  472. X    Fig*ind_panel.button_form.update.foreground: red
  473. X    Fig*ind_panel.button_form.update.background: white
  474. X! Mode (left-hand) panel
  475. X    Fig*mode_panel.background: lightskyblue
  476. X    Fig*mode_panel.foreground: black
  477. X    Fig*mode_panel.button.background: lightskyblue
  478. X    Fig*mode_panel.button.foreground: black
  479. X! Mouse indicator panel
  480. X    Fig*mouse_panel.background: yellow
  481. X    Fig*mouse_panel.foreground: black
  482. X! Edit popup
  483. X    Fig*xfig_edit_panel.form.done.background: green
  484. X    Fig*xfig_edit_panel.form.apply.background: yellow
  485. X    Fig*xfig_edit_panel.form.cancel.background: red
  486. X! make a light grey background so you can see the color "white" in the edit menu
  487. X    Fig*xfig_edit_panel.form.colors.menu.background: grey90
  488. X! File popup
  489. X    Fig*file_panel*background:        orchid
  490. X    Fig*file_panel*Text*background:        white
  491. X    Fig*file_panel*Text*foreground:        black
  492. X    Fig*file_panel*List*background:        white
  493. X    Fig*file_panel*List*foreground:        black
  494. X    Fig*file_panel*Scrollbar*background:    cornflowerblue
  495. X    Fig*file_panel*Scrollbar*foreground:    red
  496. X    Fig*file_panel*home.foreground:        black
  497. X    Fig*file_panel*home.background:        cornflowerblue
  498. X    Fig*file_panel.rescan.foreground:    black
  499. X    Fig*file_panel.rescan.background:    cornflowerblue
  500. X    Fig*file_panel.cancel.foreground:    black
  501. X    Fig*file_panel.cancel.background:    red
  502. X    Fig*file_panel.save.foreground:        black
  503. X    Fig*file_panel.save.background:        yellow
  504. X    Fig*file_panel.load.foreground:        black
  505. X    Fig*file_panel.load.background:        green
  506. X    Fig*file_panel.merge.foreground:    black
  507. X    Fig*file_panel.merge.background:    cornflowerblue
  508. X! Export popup
  509. X    Fig*export_panel*background:        orchid
  510. X    Fig*export_panel*Text*background:    white
  511. X    Fig*export_panel*Text*foreground:    black
  512. X    Fig*export_panel*List*background:    white
  513. X    Fig*export_panel*List*foreground:    black
  514. X    Fig*export_panel*Scrollbar*background:    cornflowerblue
  515. X    Fig*export_panel*Scrollbar*foreground:    red
  516. X    Fig*export_panel*MenuButton*background:    white
  517. X    Fig*export_panel*MenuButton*foreground:    black
  518. X    Fig*export_panel*landscape.menu.background: yellow
  519. X    Fig*export_panel*landscape.menu.foreground: black
  520. X    Fig*export_panel*home.foreground:    black
  521. X    Fig*export_panel*home.background:    cornflowerblue
  522. X    Fig*export_panel.rescan.foreground:    black
  523. X    Fig*export_panel.rescan.background:    cornflowerblue
  524. X    Fig*export_panel.cancel.foreground:    black
  525. X    Fig*export_panel.cancel.background:    red
  526. X    Fig*export_panel.export.foreground:    black
  527. X    Fig*export_panel.export.background:    green
  528. X! Print popup
  529. X    Fig*print_panel*Background:        orchid
  530. X    Fig*print_panel*Text*background:    white
  531. X    Fig*print_panel*Text*foreground:    black
  532. X    Fig*print_panel*MenuButton*background:    white
  533. X    Fig*print_panel*MenuButton*foreground:    black
  534. X    Fig*print_panel*printer_image*foreground: white
  535. X    Fig*print_panel*landscape.menu.background: yellow
  536. X    Fig*print_panel*landscape.menu.foreground: black
  537. X    Fig*print_panel*flush left.menu.background: orange
  538. X    Fig*print_panel*flush left.menu.foreground: black
  539. X    Fig*print_panel.dismiss.background:    red
  540. X    Fig*print_panel.dismiss.foreground:    black
  541. X    Fig*print_panel.print_batch.background:    cornflowerblue
  542. X    Fig*print_panel.print_batch.foreground:    black
  543. X    Fig*print_panel.clear_batch.background:    orange
  544. X    Fig*print_panel.clear_batch.foreground:    black
  545. X    Fig*print_panel.print.background:    green
  546. X    Fig*print_panel.print.foreground:    black
  547. X    Fig*print_panel.output_printer.background: yellow
  548. X    Fig*print_panel.output_printer.foreground: black
  549. X    Fig*print_panel.output_file.background:    yellow
  550. X    Fig*print_panel.output_file.foreground:    black
  551. X! File message popup
  552. X    Fig*file_msg_panel.background:        orchid
  553. X    Fig*file_msg_panel.file_msg_win*background: cornflowerblue
  554. X    Fig*file_msg_panel.file_msg_win*foreground: yellow
  555. X    Fig*file_msg_panel.dismiss.background:    green
  556. X    Fig*file_msg_panel.dismiss.foreground:    black
  557. X    Fig*file_msg_panel.clear.background:    red
  558. X    Fig*file_msg_panel.clear.foreground:    black
  559. X! Query popup
  560. X    Fig*query_popup.query_form.background: lightslateblue
  561. X    Fig*query_popup.query_form.foreground: black
  562. X    Fig*query_popup.query_form.message.background: lightgrey
  563. X    Fig*query_popup.query_form.message.foreground: black
  564. X    Fig*query_popup.query_form.yes.background: red
  565. X    Fig*query_popup.query_form.yes.foreground: black
  566. X    Fig*query_popup.query_form.no.background: orange
  567. X    Fig*query_popup.query_form.no.foreground: black
  568. X    Fig*query_popup.query_form.cancel.background: green
  569. X    Fig*query_popup.query_form.cancel.foreground: black
  570. X#endif
  571. END_OF_FILE
  572. if test 5024 -ne `wc -c <'Fig-color.ad'`; then
  573.     echo shar: \"'Fig-color.ad'\" unpacked with wrong size!
  574. fi
  575. # end of 'Fig-color.ad'
  576. fi
  577. if test -f 'd_line.c' -a "${1}" != "-c" ; then 
  578.   echo shar: Will not clobber existing file \"'d_line.c'\"
  579. else
  580. echo shar: Extracting \"'d_line.c'\" \(5317 characters\)
  581. sed "s/^X//" >'d_line.c' <<'END_OF_FILE'
  582. X/*
  583. X * FIG : Facility for Interactive Generation of figures
  584. X * Copyright (c) 1985 by Supoj Sutanthavibul
  585. X *
  586. X * "Permission to use, copy, modify, distribute, and sell this software and its
  587. X * documentation for any purpose is hereby granted without fee, provided that
  588. X * the above copyright notice appear in all copies and that both the copyright
  589. X * notice and this permission notice appear in supporting documentation. 
  590. X * No representations are made about the suitability of this software for 
  591. X * any purpose.  It is provided "as is" without express or implied warranty."
  592. X */
  593. X
  594. X#include "fig.h"
  595. X#include "resources.h"
  596. X#include "mode.h"
  597. X#include "object.h"
  598. X#include "paintop.h"
  599. X#include "u_create.h"
  600. X#include "u_elastic.h"
  601. X#include "u_list.h"
  602. X#include "w_canvas.h"
  603. X#include "w_mousefun.h"
  604. X
  605. Xextern int    latex_endpoint();
  606. X
  607. X/*************************** locally global variables *********************/
  608. X
  609. Xstatic int    init_line_drawing();
  610. X
  611. Xint        create_lineobject();
  612. Xint        get_intermediatepoint();
  613. X
  614. X/**********************     polyline and polygon section  **********************/
  615. X
  616. Xline_drawing_selected()
  617. X{
  618. X    canvas_kbd_proc = null_proc;
  619. X    canvas_locmove_proc = null_proc;
  620. X    canvas_leftbut_proc = init_line_drawing;
  621. X    canvas_rightbut_proc = null_proc;
  622. X    set_cursor(arrow_cursor);
  623. X    reset_action_on();
  624. X    if (cur_mode == F_POLYGON) {
  625. X    set_mousefun("first point", "", "");
  626. X    min_num_points = 3;
  627. X    canvas_middlebut_proc = null_proc;
  628. X    } else {
  629. X    set_mousefun("first point", "single point", "");
  630. X    min_num_points = 1;
  631. X    num_point = 0;
  632. X    fix_x = fix_y = -1;
  633. X    canvas_middlebut_proc = create_lineobject;
  634. X    }
  635. X}
  636. X
  637. Xstatic
  638. Xinit_line_drawing(x, y)
  639. X    int            x, y;
  640. X{
  641. X    init_trace_drawing(x, y);
  642. X}
  643. X
  644. Xcancel_line_drawing()
  645. X{
  646. X    elastic_line();
  647. X    cur_x = fix_x;
  648. X    cur_y = fix_y;
  649. X    if (cur_point != first_point)
  650. X    elastic_moveline(first_point);    /* erase control vector */
  651. X    free_points(first_point);
  652. X    return_proc();
  653. X    draw_mousefun_canvas();
  654. X}
  655. X
  656. Xinit_trace_drawing(x, y)
  657. X    int            x, y;
  658. X{
  659. X    if ((first_point = create_point()) == NULL)
  660. X    return;
  661. X
  662. X    cur_point = first_point;
  663. X    set_action_on();
  664. X    cur_point->x = fix_x = cur_x = x;
  665. X    cur_point->y = fix_y = cur_y = y;
  666. X    cur_point->next = NULL;
  667. X    length_msg(MSG_LENGTH);
  668. X    if (latexline_mode || latexarrow_mode) {
  669. X    canvas_locmove_proc = latex_line;
  670. X    } else if (manhattan_mode || mountain_mode) {
  671. X    canvas_locmove_proc = constrainedangle_line;
  672. X    } else {
  673. X    canvas_locmove_proc = freehand_line;
  674. X    }
  675. X    canvas_leftbut_proc = get_intermediatepoint;
  676. X    canvas_middlebut_save = create_lineobject;
  677. X    canvas_rightbut_proc = cancel_line_drawing;
  678. X    return_proc = line_drawing_selected;
  679. X    num_point = 1;
  680. X    set_mousefun("next point", "", "cancel");
  681. X    if (num_point >= min_num_points - 1) {
  682. X    set_mousefun("next point", "final point", "cancel");
  683. X    canvas_middlebut_proc = canvas_middlebut_save;
  684. X    }
  685. X    draw_mousefun_canvas();
  686. X    set_temp_cursor(null_cursor);
  687. X    cur_cursor = null_cursor;
  688. X    elastic_line();
  689. X}
  690. X
  691. Xget_intermediatepoint(x, y)
  692. X    int            x, y;
  693. X{
  694. X    (*canvas_locmove_proc) (x, y);
  695. X    num_point++;
  696. X    fix_x = cur_x;
  697. X    fix_y = cur_y;
  698. X    elastic_line();
  699. X    if (cur_cursor != null_cursor) {
  700. X    set_temp_cursor(null_cursor);
  701. X    cur_cursor = null_cursor;
  702. X    }
  703. X    win_setmouseposition(canvas_win, cur_x, cur_y);
  704. X    append_point(fix_x, fix_y, &cur_point);
  705. X    if (num_point == min_num_points - 1) {
  706. X    set_mousefun("next point", "final point", "cancel");
  707. X    draw_mousefun_canvas();
  708. X    canvas_middlebut_proc = canvas_middlebut_save;
  709. X    }
  710. X}
  711. X
  712. X/* come here upon pressing middle button (last point of lineobject) */
  713. X
  714. Xcreate_lineobject(x, y)
  715. X    int            x, y;
  716. X{
  717. X    F_line       *line;
  718. X    int            dot;
  719. X
  720. X    if (num_point == 0) {
  721. X    if ((first_point = create_point()) == NULL) {
  722. X        line_drawing_selected();
  723. X        draw_mousefun_canvas();
  724. X        return;
  725. X    }
  726. X    cur_point = first_point;
  727. X    first_point->x = fix_x = cur_x = x;
  728. X    first_point->y = fix_y = cur_y = y;
  729. X    first_point->next = NULL;
  730. X    num_point++;
  731. X    } else if (x != fix_x || y != fix_y) {
  732. X    get_intermediatepoint(x, y);
  733. X    }
  734. X    dot = (num_point == 1);
  735. X    elastic_line();
  736. X    if ((line = create_line()) == NULL) {
  737. X    line_drawing_selected();
  738. X    draw_mousefun_canvas();
  739. X    return;
  740. X    }
  741. X    line->type = T_POLYLINE;
  742. X    line->thickness = cur_linewidth;
  743. X    line->fill_style = cur_fillstyle;
  744. X    line->style = cur_linestyle;
  745. X    line->style_val = cur_styleval * (cur_linewidth + 1) / 2;
  746. X    line->color = cur_color;
  747. X    line->depth = cur_depth;
  748. X    line->pen = 0;
  749. X    line->points = first_point;
  750. X    if (!dot) {
  751. X    if (cur_mode == F_POLYGON) {    /* close off polygon */
  752. X        line->type = T_POLYGON;
  753. X        num_point++;
  754. X        append_point(first_point->x, first_point->y, &cur_point);
  755. X        elastic_line();
  756. X        fix_x = first_point->x;
  757. X        fix_y = first_point->y;
  758. X        elastic_line();    /* fix last elastic line */
  759. X    } else {        /* polyline; draw any arrows */
  760. X        if (autoforwardarrow_mode)
  761. X        line->for_arrow = forward_arrow();
  762. X        /* arrow will be drawn in draw_line below */
  763. X        if (autobackwardarrow_mode)
  764. X        line->back_arrow = backward_arrow();
  765. X        /* arrow will be drawn in draw_line below */
  766. X    }
  767. X    cur_x = fix_x;
  768. X    cur_y = fix_y;
  769. X    elastic_moveline(first_point);    /* erase temporary outline */
  770. X    }
  771. X    draw_line(line, PAINT);    /* draw final */
  772. X    add_line(line);
  773. X    line_drawing_selected();
  774. X    draw_mousefun_canvas();
  775. X}
  776. END_OF_FILE
  777. if test 5317 -ne `wc -c <'d_line.c'`; then
  778.     echo shar: \"'d_line.c'\" unpacked with wrong size!
  779. fi
  780. # end of 'd_line.c'
  781. fi
  782. if test -f 'e_align.c' -a "${1}" != "-c" ; then 
  783.   echo shar: Will not clobber existing file \"'e_align.c'\"
  784. else
  785. echo shar: Extracting \"'e_align.c'\" \(5020 characters\)
  786. sed "s/^X//" >'e_align.c' <<'END_OF_FILE'
  787. X/*
  788. X * FIG : Facility for Interactive Generation of figures
  789. X * Copyright (c) 1985 by Supoj Sutanthavibul
  790. X *
  791. X * "Permission to use, copy, modify, distribute, and sell this software and its
  792. X * documentation for any purpose is hereby granted without fee, provided that
  793. X * the above copyright notice appear in all copies and that both the copyright
  794. X * notice and this permission notice appear in supporting documentation. 
  795. X * No representations are made about the suitability of this software for 
  796. X * any purpose.  It is provided "as is" without express or implied warranty."
  797. X */
  798. X
  799. X#include "fig.h"
  800. X#include "resources.h"
  801. X#include "object.h"
  802. X#include "paintop.h"
  803. X#include "mode.h"
  804. X#include "u_create.h"
  805. X#include "u_draw.h"
  806. X#include "u_search.h"
  807. X#include "u_undo.h"
  808. X#include "w_canvas.h"
  809. X#include "w_mousefun.h"
  810. X#include "w_setup.h"
  811. X
  812. Xstatic int    init_align(), init_align_canvas();
  813. Xstatic int    llx, lly, urx, ury;
  814. Xstatic int    xcmin, ycmin, xcmax, ycmax;
  815. Xstatic int    dx, dy;
  816. Xstatic int    align_arc();
  817. Xstatic int    align_ellipse();
  818. Xstatic int    align_line();
  819. Xstatic int    align_spline();
  820. Xstatic int    align_text();
  821. Xstatic int    align_compound();
  822. Xstatic int    get_dx_dy();
  823. X
  824. Xalign_selected()
  825. X{
  826. X    set_mousefun("align compound", "align canvas", "");
  827. X    canvas_kbd_proc = null_proc;
  828. X    canvas_locmove_proc = null_proc;
  829. X    init_searchproc_left(init_align);
  830. X    canvas_leftbut_proc = object_search_left;
  831. X    canvas_middlebut_proc = init_align_canvas;
  832. X    canvas_rightbut_proc = null_proc;
  833. X    set_cursor(pick15_cursor);
  834. X}
  835. X
  836. X/* align objects to the whole canvas */
  837. X
  838. Xstatic
  839. Xinit_align_canvas(x, y, shift)
  840. X    int            x, y;
  841. X    unsigned int    shift;    /* Shift Key Status from XEvent */
  842. X{
  843. X    cur_c = &objects;
  844. X    toggle_all_compoundmarkers();
  845. X    draw_compoundelements(cur_c, ERASE);
  846. X    old_c = copy_compound(&objects);
  847. X    xcmin=ycmin=0;
  848. X    if (appres.INCHES)
  849. X    {
  850. X    xcmax=(appres.landscape? 11*PIX_PER_INCH : 8.5*PIX_PER_INCH);
  851. X    ycmax=(appres.landscape? 8.5*PIX_PER_INCH : 11*PIX_PER_INCH);
  852. X    }
  853. X    else
  854. X    {
  855. X    xcmax=(appres.landscape? 29.7*PIX_PER_CM : 21*PIX_PER_CM);
  856. X    ycmax=(appres.landscape? 21*PIX_PER_CM : 29.7*PIX_PER_CM);
  857. X    }
  858. X    align_ellipse();
  859. X    align_arc();
  860. X    align_line();
  861. X    align_spline();
  862. X    align_compound();
  863. X    align_text();
  864. X    draw_compoundelements(cur_c, PAINT);
  865. X    toggle_all_compoundmarkers();
  866. X    clean_up();
  867. X    set_latestobjects(old_c);
  868. X    set_action_object(F_CHANGE, O_ALL_OBJECT);
  869. X    set_modifiedflag();
  870. X}
  871. X
  872. Xstatic
  873. Xinit_align(p, type, x, y, px, py)
  874. X    char       *p;
  875. X    int            type;
  876. X    int            x, y;
  877. X    int            px, py;
  878. X{
  879. X    if (type != O_COMPOUND)
  880. X    return;
  881. X    cur_c = (F_compound *) p;
  882. X    toggle_compoundmarker(cur_c);
  883. X    draw_compoundelements(cur_c, ERASE);
  884. X    old_c = copy_compound(cur_c);
  885. X    compound_bound(cur_c, &xcmin, &ycmin, &xcmax, &ycmax);
  886. X    align_ellipse();
  887. X    align_arc();
  888. X    align_line();
  889. X    align_spline();
  890. X    align_compound();
  891. X    align_text();
  892. X    /*
  893. X     * recompute the compound's bounding box
  894. X     */
  895. X    compound_bound(cur_c, &cur_c->nwcorner.x, &cur_c->nwcorner.y,
  896. X           &cur_c->secorner.x, &cur_c->secorner.y);
  897. X    draw_compoundelements(cur_c, PAINT);
  898. X    toggle_compoundmarker(cur_c);
  899. X    clean_up();
  900. X    old_c->next = cur_c;
  901. X    set_latestcompound(old_c);
  902. X    set_action_object(F_CHANGE, O_COMPOUND);
  903. X    set_modifiedflag();
  904. X}
  905. X
  906. Xstatic int
  907. Xalign_ellipse()
  908. X{
  909. X    F_ellipse       *e;
  910. X
  911. X    for (e = cur_c->ellipses; e != NULL; e = e->next) {
  912. X    ellipse_bound(e, &llx, &lly, &urx, &ury);
  913. X    get_dx_dy();
  914. X    translate_ellipse(e, dx, dy);
  915. X    }
  916. X}
  917. X
  918. Xstatic int
  919. Xalign_arc()
  920. X{
  921. X    F_arc       *a;
  922. X
  923. X    for (a = cur_c->arcs; a != NULL; a = a->next) {
  924. X    arc_bound(a, &llx, &lly, &urx, &ury);
  925. X    get_dx_dy();
  926. X    translate_arc(a, dx, dy);
  927. X    }
  928. X}
  929. X
  930. Xstatic int
  931. Xalign_line()
  932. X{
  933. X    F_line       *l;
  934. X
  935. X    for (l = cur_c->lines; l != NULL; l = l->next) {
  936. X    line_bound(l, &llx, &lly, &urx, &ury);
  937. X    get_dx_dy();
  938. X    translate_line(l, dx, dy);
  939. X    }
  940. X}
  941. X
  942. Xstatic int
  943. Xalign_spline()
  944. X{
  945. X    F_spline       *s;
  946. X
  947. X    for (s = cur_c->splines; s != NULL; s = s->next) {
  948. X    spline_bound(s, &llx, &lly, &urx, &ury);
  949. X    get_dx_dy();
  950. X    translate_spline(s, dx, dy);
  951. X    }
  952. X}
  953. X
  954. Xstatic int
  955. Xalign_compound()
  956. X{
  957. X    F_compound       *c;
  958. X
  959. X    for (c = cur_c->compounds; c != NULL; c = c->next) {
  960. X    compound_bound(c, &llx, &lly, &urx, &ury);
  961. X    get_dx_dy();
  962. X    translate_compound(c, dx, dy);
  963. X    }
  964. X}
  965. X
  966. Xstatic int
  967. Xalign_text()
  968. X{
  969. X    F_text       *t;
  970. X
  971. X    for (t = cur_c->texts; t != NULL; t = t->next) {
  972. X    int   dum;
  973. X    text_bound_actual(t, t->angle, &llx, &lly, &urx, &ury,
  974. X           &dum,&dum,&dum,&dum,&dum,&dum,&dum,&dum);
  975. X    get_dx_dy();
  976. X    translate_text(t, dx, dy);
  977. X    }
  978. X}
  979. X
  980. Xstatic int
  981. Xget_dx_dy()
  982. X{
  983. X    switch (cur_valign) {
  984. X    case NONE:
  985. X    dy = 0;
  986. X    break;
  987. X    case TOP:
  988. X    dy = ycmin - lly;
  989. X    break;
  990. X    case BOTTOM:
  991. X    dy = ycmax - ury;
  992. X    break;
  993. X    case CENTER:
  994. X    dy = (ycmin - lly) + (abs(ycmin - lly) + abs(ycmax - ury)) / 2;
  995. X    break;
  996. X    }
  997. X    switch (cur_halign) {
  998. X    case NONE:
  999. X    dx = 0;
  1000. X    break;
  1001. X    case LEFT:
  1002. X    dx = xcmin - llx;
  1003. X    break;
  1004. X    case RIGHT:
  1005. X    dx = xcmax - urx;
  1006. X    break;
  1007. X    case CENTER:
  1008. X    dx = (xcmin - llx) + (abs(xcmin - llx) + abs(xcmax - urx)) / 2;
  1009. X    break;
  1010. X    }
  1011. X}
  1012. END_OF_FILE
  1013. if test 5020 -ne `wc -c <'e_align.c'`; then
  1014.     echo shar: \"'e_align.c'\" unpacked with wrong size!
  1015. fi
  1016. # end of 'e_align.c'
  1017. fi
  1018. if test -f 'f_xbitmap.c' -a "${1}" != "-c" ; then 
  1019.   echo shar: Will not clobber existing file \"'f_xbitmap.c'\"
  1020. else
  1021. echo shar: Extracting \"'f_xbitmap.c'\" \(5585 characters\)
  1022. sed "s/^X//" >'f_xbitmap.c' <<'END_OF_FILE'
  1023. X/*
  1024. X * FIG : Facility for Interactive Generation of figures
  1025. X * Copyright (c) 1992 by Brian V. Smith
  1026. X *
  1027. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1028. X * documentation for any purpose is hereby granted without fee, provided that
  1029. X * the above copyright notice appear in all copies and that both the copyright
  1030. X * notice and this permission notice appear in supporting documentation. 
  1031. X * No representations are made about the suitability of this software for 
  1032. X * any purpose.  It is provided "as is" without express or implied warranty."
  1033. X */
  1034. X
  1035. X#include "fig.h"
  1036. X#include "resources.h"
  1037. X#include "mode.h"
  1038. X#include "object.h"
  1039. X#include "paintop.h"
  1040. X#include "w_setup.h"
  1041. X#include "w_drawprim.h"
  1042. X
  1043. Xstatic int    create_n_write_bitmap();
  1044. X
  1045. Xint
  1046. Xwrite_bitmap(file_name)
  1047. X    char       *file_name;
  1048. X{
  1049. X    if (!ok_to_write(file_name, "EXPORT"))
  1050. X    return (1);
  1051. X
  1052. X    return (create_n_write_bitmap(file_name));    /* write the bitmap file */
  1053. X}
  1054. X
  1055. Xstatic Boolean    havegcs = False;
  1056. Xstatic GC    sav_fill_gc[NUMFILLPATS];
  1057. Xstatic GC    sav_un_fill_gc[NUMFILLPATS];
  1058. Xstatic unsigned long save_fg_color;
  1059. Xstatic unsigned long save_bg_color;
  1060. X
  1061. Xstatic int
  1062. Xcreate_n_write_bitmap(filename)
  1063. X    char       *filename;
  1064. X{
  1065. X    int            xmin, ymin, xmax, ymax;
  1066. X    int            width, height;
  1067. X    Window        sav_canvas;
  1068. X    int            sav_objmask;
  1069. X    Pixmap        largepm, bitmap;
  1070. X    extern F_compound objects;
  1071. X    int            i;
  1072. X    GC            xgc, gc_bitmap;
  1073. X
  1074. X    /* this may take a while */
  1075. X    set_temp_cursor(wait_cursor);
  1076. X    put_msg("Capturing canvas image...");
  1077. X    app_flush();
  1078. X
  1079. X    /* Assume that there is at least one object */
  1080. X    compound_bound(&objects, &xmin, &ymin, &xmax, &ymax);
  1081. X
  1082. X    if (appres.DEBUG) {
  1083. X    elastic_box(xmin, ymin, xmax, ymax);
  1084. X    }
  1085. X    /* provide a small margin */
  1086. X    if ((xmin -= 10) < 0)
  1087. X    xmin = 0;
  1088. X    if ((ymin -= 10) < 0)
  1089. X    ymin = 0;
  1090. X    if ((xmax += 10) > CANVAS_WD)
  1091. X    xmax = CANVAS_WD;
  1092. X    if ((ymax += 10) > CANVAS_HT)
  1093. X    ymax = CANVAS_HT;
  1094. X
  1095. X    width = xmax - xmin + 1;
  1096. X    height = ymax - ymin + 1;
  1097. X
  1098. X    /* choose foreground/background colors as 1 and 0 respectively */
  1099. X    /* that way we can just copy the lowest plane to make the bitmap */
  1100. X
  1101. X    XSetPlaneMask(tool_d, gccache[PAINT], (unsigned long) 1);
  1102. X    XSetForeground(tool_d, gccache[PAINT], (unsigned long) 1);
  1103. X    XSetBackground(tool_d, gccache[PAINT], (unsigned long) 0);
  1104. X    XSetPlaneMask(tool_d, gccache[ERASE], (unsigned long) 1);
  1105. X    XSetForeground(tool_d, gccache[ERASE], (unsigned long) 0);
  1106. X    XSetBackground(tool_d, gccache[ERASE], (unsigned long) 0);
  1107. X    save_fg_color = x_color(cur_color);    /* save current colors */
  1108. X    save_bg_color = x_bg_color.pixel;
  1109. X    x_fg_color.pixel = 1;        /* set fore=1, back=0 */
  1110. X    x_bg_color.pixel = 0;
  1111. X    writing_bitmap = True;        /* so the colors don't change */
  1112. X    if (!havegcs) {
  1113. X    havegcs = True;
  1114. X    for (i = 0; i < NUMFILLPATS; i++) {    /* save current fill gc's */
  1115. X        sav_fill_gc[i] = fill_gc[i];
  1116. X        sav_un_fill_gc[i] = un_fill_gc[i];
  1117. X    }
  1118. X    init_fill_gc();        /* make some with 0/1 for colors */
  1119. X    } else
  1120. X    for (i = 0; i < NUMFILLPATS; i++) {
  1121. X        xgc = sav_fill_gc[i];    /* swap our gc's with orig */
  1122. X        sav_fill_gc[i] = fill_gc[i];
  1123. X        fill_gc[i] = xgc;
  1124. X        xgc = sav_un_fill_gc[i];
  1125. X        sav_un_fill_gc[i] = un_fill_gc[i];
  1126. X        un_fill_gc[i] = xgc;
  1127. X    }
  1128. X
  1129. X    /* create pixmap from (0,0) to (xmax,ymax) */
  1130. X    largepm = XCreatePixmap(tool_d, canvas_win, xmax + 1, ymax + 1,
  1131. X                DefaultDepthOfScreen(tool_s));
  1132. X    /* clear it */
  1133. X    XFillRectangle(tool_d, largepm, gccache[ERASE], 0, 0, xmax+1, ymax+1);
  1134. X    sav_canvas = canvas_win;    /* save current canvas window id */
  1135. X    canvas_win = largepm;    /* make the canvas our pixmap */
  1136. X    sav_objmask = cur_objmask;    /* save the point marker */
  1137. X    cur_objmask = M_NONE;
  1138. X    redisplay_objects(&objects);/* draw the figure into the pixmap */
  1139. X    put_msg("Writing bitmap file...");
  1140. X    app_flush();
  1141. X
  1142. X    x_fg_color.pixel = save_fg_color;    /* put colors back to normal */
  1143. X    x_bg_color.pixel = save_bg_color;
  1144. X    XSetPlaneMask(tool_d, gccache[PAINT], (unsigned long) AllPlanes);
  1145. X    XSetForeground(tool_d, gccache[PAINT], x_fg_color.pixel);
  1146. X    XSetBackground(tool_d, gccache[PAINT], x_bg_color.pixel);
  1147. X    XSetPlaneMask(tool_d, gccache[ERASE], (unsigned long) AllPlanes);
  1148. X    XSetForeground(tool_d, gccache[ERASE], x_bg_color.pixel);
  1149. X    XSetBackground(tool_d, gccache[ERASE], x_bg_color.pixel);
  1150. X
  1151. X    writing_bitmap = False;
  1152. X    canvas_win = sav_canvas;    /* go back to the real canvas */
  1153. X    cur_objmask = sav_objmask;    /* restore point marker */
  1154. X    bitmap = XCreatePixmap(tool_d, canvas_win, width, height, 1);
  1155. X    gc_bitmap = XCreateGC(tool_d, bitmap, 0L, NULL);
  1156. X    /* set the foreground back to 1 */
  1157. X    XSetForeground(tool_d, gc_bitmap, 1);
  1158. X    /* and the background back to 0 */
  1159. X    XSetBackground(tool_d, gc_bitmap, 0);
  1160. X    /* now copy one plane of the pixmap to a bitmap of the correct size */
  1161. X    XCopyPlane(tool_d, largepm, bitmap, gc_bitmap,
  1162. X           xmin, ymin, width, height, 0, 0, 1);
  1163. X    for (i = 0; i < NUMFILLPATS; i++) { /* swap back the fill gc's */
  1164. X    xgc = sav_fill_gc[i];
  1165. X    sav_fill_gc[i] = fill_gc[i];
  1166. X    fill_gc[i] = xgc;
  1167. X    xgc = sav_un_fill_gc[i];
  1168. X    sav_un_fill_gc[i] = un_fill_gc[i];
  1169. X    un_fill_gc[i] = xgc;
  1170. X    }
  1171. X    if (XWriteBitmapFile(tool_d, filename, bitmap, width, height, -1, -1)
  1172. X    != BitmapSuccess) {
  1173. X    put_msg("Couldn't write bitmap file");
  1174. X    XFreePixmap(tool_d, largepm);
  1175. X    XFreePixmap(tool_d, bitmap);
  1176. X    /* all done */
  1177. X    reset_cursor();
  1178. X    return (1);
  1179. X    } else {
  1180. X    put_msg("Bitmap written to \"%s\"", filename);
  1181. X    XFreePixmap(tool_d, largepm);
  1182. X    XFreePixmap(tool_d, bitmap);
  1183. X    /* all done */
  1184. X    reset_cursor();
  1185. X    return (0);
  1186. X    }
  1187. X}
  1188. END_OF_FILE
  1189. if test 5585 -ne `wc -c <'f_xbitmap.c'`; then
  1190.     echo shar: \"'f_xbitmap.c'\" unpacked with wrong size!
  1191. fi
  1192. # end of 'f_xbitmap.c'
  1193. fi
  1194. if test -f 'resources.h' -a "${1}" != "-c" ; then 
  1195.   echo shar: Will not clobber existing file \"'resources.h'\"
  1196. else
  1197. echo shar: Extracting \"'resources.h'\" \(5553 characters\)
  1198. sed "s/^X//" >'resources.h' <<'END_OF_FILE'
  1199. X/*
  1200. X * FIG : Facility for Interactive Generation of figures
  1201. X * Copyright (c) 1985 by Supoj Sutanthavibul
  1202. X *
  1203. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1204. X * documentation for any purpose is hereby granted without fee, provided that
  1205. X * the above copyright notice appear in all copies and that both the copyright
  1206. X * notice and this permission notice appear in supporting documentation. 
  1207. X * No representations are made about the suitability of this software for 
  1208. X * any purpose.  It is provided "as is" without express or implied warranty."
  1209. X */
  1210. X
  1211. X#include "paintop.h"
  1212. X#include "w_rottext.h"
  1213. X
  1214. Xtypedef struct {
  1215. X    unsigned int    x, y, z;
  1216. X    caddr_t       *m;
  1217. X}        MprData;
  1218. X
  1219. X#define mpr_static(name,x,y,z,pix)    \
  1220. XXImage name    = \
  1221. X{ \
  1222. X(x),        /* width */ \
  1223. X(y),        /* height */ \
  1224. X0,        /* offset */ \
  1225. XXYBitmap,    /* format */ \
  1226. X(char *)(pix),    /* data pointer */ \
  1227. XMSBFirst,    /* data byte order LSB or MSB first */ \
  1228. X8,        /* quant of scanline */ \
  1229. XLSBFirst,    /* bitmap bit order LSB or MSBFirst */ \
  1230. X8,        /* bitmap pad */ \
  1231. X(z),        /* depth */ \
  1232. X(x+7)/8,    /* bytes-per-line */ \
  1233. X1,        /* bits per pizel */ \
  1234. X0,        /* red_mask */ \
  1235. X0,        /* z arrangement green_mask */ \
  1236. X0,        /* z arrangement blue_mask */ \
  1237. XNULL        /* object data pointer for extension */ \
  1238. X}
  1239. X
  1240. X#define NUMCOLORS 8
  1241. Xextern char    *colorNames[NUMCOLORS + 1];
  1242. Xextern Boolean    all_colors_available;
  1243. X
  1244. X/* resources structure */
  1245. X
  1246. Xtypedef struct _appres {
  1247. X    char       *iconGeometry;
  1248. X    Boolean        INCHES;
  1249. X    Boolean        DEBUG;
  1250. X    Boolean        RHS_PANEL;
  1251. X    Boolean        INVERSE;
  1252. X    Boolean        TRACKING;
  1253. X    Boolean        landscape;
  1254. X    Boolean        ShowAllButtons;
  1255. X    Boolean        latexfonts;
  1256. X    Boolean        specialtext;
  1257. X    Boolean        SCALABLEFONTS;    /* hns 5 Nov 91 */
  1258. X    char       *normalFont;
  1259. X    char       *boldFont;
  1260. X    char       *buttonFont;
  1261. X    char       *startpsFont;    /* bab 11 Jan 92 */
  1262. X    char       *startlatexFont;    /* bab 11 Jan 92 */
  1263. X    float        tmp_width;
  1264. X    float        tmp_height;
  1265. X    float        startfontsize;    /* ges 6 Feb 91 */
  1266. X    int            internalborderwidth;
  1267. X    Pixel        color[NUMCOLORS];
  1268. X    Boolean        monochrome;
  1269. X    char       *keyFile;
  1270. X    char       *exportLanguage;
  1271. X    Boolean        flushleft;        /* center/flush-left printing */
  1272. X    Boolean        textoutline;    /* draw text bounding box if true */
  1273. X    float        user_scale;        /* scale screen units to user units */
  1274. X    char       *user_unit;        /* user defined unit name */
  1275. X}        appresStruct, *appresPtr;
  1276. Xextern appresStruct appres;
  1277. X
  1278. Xtypedef struct {
  1279. X    int            x, y;
  1280. X}        pr_size;
  1281. X
  1282. Xtypedef struct {
  1283. X    unsigned int    r_width, r_height, r_left, r_top;
  1284. X}        RectRec;
  1285. X
  1286. Xtypedef struct {
  1287. X    int            type;
  1288. X    char       *label;
  1289. X    caddr_t        info;
  1290. X}        MenuItemRec;
  1291. X
  1292. Xstruct Menu {
  1293. X    int            m_imagetype;
  1294. X#define MENU_IMAGESTRING    0x00    /* imagedata is char * */
  1295. X#define MENU_GRAPHIC        0x01    /* imagedata is pixrect * */
  1296. X    caddr_t        m_imagedata;
  1297. X    int            m_itemcount;
  1298. X    MenuItemRec       *m_items;
  1299. X    struct Menu       *m_next;
  1300. X    caddr_t        m_data;
  1301. X};
  1302. X
  1303. Xtypedef struct Menu MenuRec;
  1304. X
  1305. Xtypedef XImage    PIXRECTREC;
  1306. Xtypedef XImage *PIXRECT;
  1307. Xtypedef XFontStruct *PIX_FONT;
  1308. Xtypedef XRotFontStruct *PIX_ROT_FONT;
  1309. Xtypedef MprData MPR_DATA;
  1310. Xtypedef Widget    TOOL;
  1311. Xtypedef Widget    TOOLSW;
  1312. Xtypedef pr_size PR_SIZE;
  1313. Xtypedef RectRec RECT;
  1314. X
  1315. Xextern Window    canvas_win, msg_win, sideruler_win, topruler_win;
  1316. X
  1317. Xextern Cursor    cur_cursor;
  1318. Xextern Cursor    arrow_cursor, bull_cursor, buster_cursor, crosshair_cursor,
  1319. X        null_cursor, pencil_cursor, pick15_cursor, pick9_cursor,
  1320. X        panel_cursor, l_arrow_cursor, lr_arrow_cursor, r_arrow_cursor,
  1321. X        u_arrow_cursor, ud_arrow_cursor, d_arrow_cursor, wait_cursor;
  1322. X
  1323. Xextern TOOL    tool;
  1324. Xextern XtAppContext tool_app;
  1325. X
  1326. Xextern TOOLSW    canvas_sw, ps_fontmenu, /* printer font menu tool */
  1327. X        latex_fontmenu, /* printer font menu tool */
  1328. X        msg_form, msg_panel, name_panel, cmd_panel, mode_panel, 
  1329. X        d_label, e_label, mousefun,
  1330. X        ind_viewp, ind_panel,    /* indicator panel */
  1331. X        unitbox_sw, sideruler_sw, topruler_sw;
  1332. X
  1333. Xextern Display *tool_d;
  1334. Xextern Screen  *tool_s;
  1335. Xextern int    tool_sn;
  1336. X
  1337. X#define NUMFILLPATS 21
  1338. X
  1339. Xextern GC    gc, bold_gc, button_gc, ind_button_gc, mouse_button_gc,
  1340. X        color_gc, blank_gc, ind_blank_gc, mouse_blank_gc, gccache[NUMOPS],
  1341. X        fillgc, fill_gc[NUMFILLPATS],    /* fill style gc's */
  1342. X        black_fill_gc[NUMFILLPATS],
  1343. X        un_fill_gc[NUMFILLPATS],    /* unfill gc's */
  1344. X        black_un_fill_gc[NUMFILLPATS],
  1345. X        tr_gc, tr_xor_gc, tr_erase_gc,    /* for the rulers */
  1346. X        sr_gc, sr_xor_gc, sr_erase_gc;
  1347. X
  1348. Xextern Pixmap    fill_pm[NUMFILLPATS];
  1349. Xextern XColor    x_fg_color, x_bg_color;
  1350. Xextern Boolean    writing_bitmap;
  1351. Xextern unsigned long but_fg, but_bg;
  1352. Xextern unsigned long ind_but_fg, ind_but_bg;
  1353. Xextern unsigned long mouse_but_fg, mouse_but_bg;
  1354. X
  1355. X/* will be filled in with environment variable XFIGTMPDIR */
  1356. Xextern char    *TMPDIR;
  1357. X
  1358. Xstruct icon {
  1359. X    short        ic_width, ic_height;    /* overall icon dimensions */
  1360. X    PIXRECT        ic_background;    /* background pattern (mem pixrect) */
  1361. X    RECT        ic_gfxrect; /* where the graphic goes */
  1362. X    PIXRECT        ic_mpr;    /* the graphic (a memory pixrect) */
  1363. X    RECT        ic_textrect;/* where text goes */
  1364. X    char       *ic_text;    /* the text */
  1365. X    PIX_FONT        ic_font;    /* Font with which to display text */
  1366. X    int            ic_flags;
  1367. X};
  1368. X
  1369. X/* flag values */
  1370. X#define ICON_BKGRDPAT    0x02    /* use ic_background to prepare image */
  1371. X#define ICON_BKGRDGRY    0x04    /* use std gray to prepare image */
  1372. X#define ICON_BKGRDCLR    0x08    /* clear to prepare image */
  1373. X#define ICON_BKGRDSET    0x10    /* set to prepare image */
  1374. X#define ICON_FIRSTPRIV    0x0100    /* start of private flags range */
  1375. X#define ICON_LASTPRIV    0x8000    /* end of private flags range */
  1376. END_OF_FILE
  1377. if test 5553 -ne `wc -c <'resources.h'`; then
  1378.     echo shar: \"'resources.h'\" unpacked with wrong size!
  1379. fi
  1380. # end of 'resources.h'
  1381. fi
  1382. if test -f 'u_print.c' -a "${1}" != "-c" ; then 
  1383.   echo shar: Will not clobber existing file \"'u_print.c'\"
  1384. else
  1385. echo shar: Extracting \"'u_print.c'\" \(4979 characters\)
  1386. sed "s/^X//" >'u_print.c' <<'END_OF_FILE'
  1387. X/*
  1388. X * FIG : Facility for Interactive Generation of figures
  1389. X * Copyright (c) 1985 by Supoj Sutanthavibul
  1390. X *
  1391. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1392. X * documentation for any purpose is hereby granted without fee, provided that
  1393. X * the above copyright notice appear in all copies and that both the copyright
  1394. X * notice and this permission notice appear in supporting documentation. 
  1395. X * No representations are made about the suitability of this software for 
  1396. X * any purpose.  It is provided "as is" without express or implied warranty."
  1397. X */
  1398. X
  1399. X#include "fig.h"
  1400. X#include "mode.h"
  1401. X#include "resources.h"
  1402. X
  1403. X/*
  1404. X * Beware!  The string returned by this function is static and is
  1405. X * reused the next time the function is called!
  1406. X */
  1407. X
  1408. Xchar *shell_protect_string(string)
  1409. X    char       *string;
  1410. X{
  1411. X    static char *buf = 0;
  1412. X    static int buflen = 0;
  1413. X    int len = 2 * strlen(string) + 1;
  1414. X    char *cp, *cp2;
  1415. X
  1416. X    if (! buf) {
  1417. X    buf = XtMalloc(len);
  1418. X    buflen = len;
  1419. X    }
  1420. X    else if (buflen < len) {
  1421. X    buf = XtRealloc(buf, len);
  1422. X    buflen = len;
  1423. X    }
  1424. X
  1425. X    for (cp = string, cp2 = buf; *cp; cp++) {
  1426. X    *cp2++ = '\\';
  1427. X    *cp2++ = *cp;
  1428. X    }
  1429. X
  1430. X    *cp2 = '\0';
  1431. X
  1432. X    return(buf);
  1433. X}
  1434. X
  1435. Xprint_to_printer(printer, mag, flushleft, params)
  1436. X    char        printer[];
  1437. X    Boolean        flushleft;
  1438. X    float        mag;
  1439. X    char        params[];
  1440. X{
  1441. X    char        prcmd[2*PATH_MAX+200], translator[60];
  1442. X    char        syspr[2*PATH_MAX+200];
  1443. X    char        tmpfile[32];
  1444. X
  1445. X    sprintf(tmpfile, "%s/%s%06d", TMPDIR, "xfig-print", getpid());
  1446. X    warnexist = False;
  1447. X    if (write_file(tmpfile))
  1448. X    return;
  1449. X
  1450. X    sprintf(translator, "fig2dev -Lps %s -P -m %f %s",
  1451. X        flushleft ? "" : "-c" ,
  1452. X        mag,
  1453. X        print_landscape ? "-l xxx" : " ");
  1454. X
  1455. X
  1456. X    if (emptyname(printer)) {    /* send to default printer */
  1457. X#if defined(SYSV) || defined(SVR4)
  1458. X    sprintf(syspr, "lp %s -oPS", params);
  1459. X#else
  1460. X    sprintf(syspr, "lpr %s -J %s", params, shell_protect_string(cur_filename));
  1461. X#endif
  1462. X    put_msg("Printing figure on default printer in %s mode ...     ",
  1463. X        print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1464. X    } else {
  1465. X#if defined(SYSV) || defined(SVR4)
  1466. X    sprintf(syspr, "lp %s -d%s -oPS", params, printer);
  1467. X#else
  1468. X    sprintf(syspr, "lpr %s -J %s -P%s", params, shell_protect_string(cur_filename),
  1469. X        printer);
  1470. X#endif
  1471. X    put_msg("Printing figure on printer %s in %s mode ...     ",
  1472. X        printer, print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1473. X    }
  1474. X    app_flush();        /* make sure message gets displayed */
  1475. X
  1476. X    /* make up the whole translate/print command */
  1477. X    sprintf(prcmd, "%s %s | %s", translator, tmpfile, syspr);
  1478. X    if (system(prcmd) != 0)
  1479. X    file_msg("Error during PRINT (check standard error output)");
  1480. X    else {
  1481. X    if (emptyname(printer))
  1482. X        put_msg("Printing figure on printer %s in %s mode ... done",
  1483. X            printer, print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1484. X    else
  1485. X        put_msg("Printing figure on printer %s in %s mode ... done",
  1486. X            printer, print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1487. X    }
  1488. X    unlink(tmpfile);
  1489. X}
  1490. X
  1491. Xprint_to_file(file, lang, mag, flushleft)
  1492. X    char       *file, *lang;
  1493. X    float        mag;
  1494. X    Boolean        flushleft;
  1495. X{
  1496. X    char        prcmd[2*PATH_MAX+200];
  1497. X    char        tmp_name[PATH_MAX];
  1498. X    char        tmp_fig_file[32];
  1499. X    char       *outfile;
  1500. X    int            tlen, status;
  1501. X
  1502. X    /* if file exists, ask if ok */
  1503. X    if (!ok_to_write(file, "EXPORT"))
  1504. X    return (1);
  1505. X
  1506. X    sprintf(tmp_fig_file, "%s/%s%06d", TMPDIR, "xfig-fig", getpid());
  1507. X    /* write the fig objects to a temporary file */
  1508. X    warnexist = False;
  1509. X    if (write_file(tmp_fig_file))
  1510. X    return (1);
  1511. X    outfile = shell_protect_string(file);
  1512. X
  1513. X    put_msg("Exporting figure to file \"%s\" in %s mode ...     ",
  1514. X        file, print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1515. X    app_flush();        /* make sure message gets displayed */
  1516. X
  1517. X    if (!strcmp(lang, "ps"))
  1518. X    sprintf(prcmd, "fig2dev -Lps %s -P -m %f %s %s %s", flushleft ? "" : "-c" ,
  1519. X        mag, print_landscape ? "-l xxx" : " ", tmp_fig_file,
  1520. X        outfile);
  1521. X    else if (!strcmp(lang, "eps"))
  1522. X    sprintf(prcmd, "fig2dev -Lps -m %f %s %s %s",
  1523. X        mag, print_landscape ? "-l xxx" : " ", tmp_fig_file,
  1524. X        outfile);
  1525. X    else if (!strcmp(lang, "ibmgl"))
  1526. X    sprintf(prcmd, "fig2dev -Libmgl -m %f %s %s %s",
  1527. X        mag, print_landscape ? " " : "-P", tmp_fig_file,
  1528. X        outfile);
  1529. X    else if (!strcmp(lang, "pstex_t")) {
  1530. X    /* make it automatically input the postscript part */
  1531. X    strcpy(tmp_name, file);
  1532. X    tlen = strlen(tmp_name);
  1533. X    if (tlen > 2) {
  1534. X        if (tmp_name[tlen-1] == 't' && tmp_name[tlen-2] == '_')
  1535. X        tmp_name[tlen-2] = '\0';
  1536. X        else
  1537. X        tmp_name[0] = '\0';
  1538. X    } else
  1539. X        tmp_name[0] = '\0';
  1540. X    sprintf(prcmd, "fig2dev -Lpstex_t -p %s -m %f %s %s",
  1541. X        tmp_name, mag, tmp_fig_file, outfile);
  1542. X    } else
  1543. X    sprintf(prcmd, "fig2dev -L%s -m %f %s %s", lang,
  1544. X        mag, tmp_fig_file, outfile);
  1545. X    if (system(prcmd) != 0)
  1546. X    file_msg("Error during EXPORT (check standard error output)");
  1547. X    else
  1548. X    put_msg("Exporting figure to file \"%s\" in %s mode ... done",
  1549. X        file, print_landscape ? "LANDSCAPE" : "PORTRAIT");
  1550. X
  1551. X    unlink(tmp_fig_file);
  1552. X    return (0);
  1553. X}
  1554. END_OF_FILE
  1555. if test 4979 -ne `wc -c <'u_print.c'`; then
  1556.     echo shar: \"'u_print.c'\" unpacked with wrong size!
  1557. fi
  1558. # end of 'u_print.c'
  1559. fi
  1560. if test -f 'w_msgpanel.c' -a "${1}" != "-c" ; then 
  1561.   echo shar: Will not clobber existing file \"'w_msgpanel.c'\"
  1562. else
  1563. echo shar: Extracting \"'w_msgpanel.c'\" \(5807 characters\)
  1564. sed "s/^X//" >'w_msgpanel.c' <<'END_OF_FILE'
  1565. X/*
  1566. X * FIG : Facility for Interactive Generation of figures
  1567. X * Copyright (c) 1985 by Supoj Sutanthavibul
  1568. X *
  1569. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1570. X * documentation for any purpose is hereby granted without fee, provided that
  1571. X * the above copyright notice appear in all copies and that both the copyright
  1572. X * notice and this permission notice appear in supporting documentation. 
  1573. X * No representations are made about the suitability of this software for 
  1574. X * any purpose.  It is provided "as is" without express or implied warranty."
  1575. X */
  1576. X
  1577. X#include "fig.h"
  1578. X#include "figx.h"
  1579. X#include "resources.h"
  1580. X#include "object.h"
  1581. X#include "mode.h"
  1582. X#include "paintop.h"
  1583. X#include "u_elastic.h"
  1584. X#include "w_canvas.h"
  1585. X#include "w_drawprim.h"
  1586. X#include "w_util.h"
  1587. X#include "w_setup.h"
  1588. X#include <varargs.h>
  1589. X
  1590. X/********************* EXPORTS *******************/
  1591. X
  1592. Xint        put_msg();
  1593. Xint        init_msgreceiving();
  1594. X
  1595. X/************************  LOCAL ******************/
  1596. X
  1597. X#define        BUF_SIZE        128
  1598. Xstatic char    prompt[BUF_SIZE];
  1599. X
  1600. XDeclareStaticArgs(12);
  1601. X
  1602. Xint
  1603. Xinit_msg(tool, filename)
  1604. X    TOOL        tool;
  1605. X    char       *filename;
  1606. X{
  1607. X    /* first make a form to put the two widgets in */
  1608. X    FirstArg(XtNwidth, MSGFORM_WD);
  1609. X    NextArg(XtNheight, MSGFORM_HT);
  1610. X    NextArg(XtNfromVert, cmd_panel);
  1611. X    NextArg(XtNvertDistance, -INTERNAL_BW);
  1612. X    NextArg(XtNdefaultDistance, 0);
  1613. X    NextArg(XtNborderWidth, 0);
  1614. X    msg_form = XtCreateManagedWidget("msg_form", formWidgetClass, tool,
  1615. X                      Args, ArgCount);
  1616. X    /* setup the file name widget first */
  1617. X    FirstArg(XtNresizable, True);
  1618. X    NextArg(XtNfont, bold_font);
  1619. X    NextArg(XtNlabel, (filename!=NULL? filename: DEF_NAME));
  1620. X    NextArg(XtNtop, XtChainTop);
  1621. X    NextArg(XtNbottom, XtChainTop);
  1622. X    NextArg(XtNborderWidth, INTERNAL_BW);
  1623. X    name_panel = XtCreateManagedWidget("file_name", labelWidgetClass, msg_form,
  1624. X                      Args, ArgCount);
  1625. X    /* now the message panel */
  1626. X    FirstArg(XtNfont, roman_font);
  1627. X    NextArg(XtNstring, "\0");
  1628. X    NextArg(XtNfromHoriz, name_panel);
  1629. X    NextArg(XtNhorizDistance, -INTERNAL_BW);
  1630. X    NextArg(XtNtop, XtChainTop);
  1631. X    NextArg(XtNbottom, XtChainTop);
  1632. X    NextArg(XtNborderWidth, INTERNAL_BW);
  1633. X    NextArg(XtNdisplayCaret, False);
  1634. X    msg_panel = XtCreateManagedWidget("message", asciiTextWidgetClass, msg_form,
  1635. X                      Args, ArgCount);
  1636. X}
  1637. X
  1638. Xsetup_msg()
  1639. X{
  1640. X    Dimension ht;
  1641. X
  1642. X    /* set the height of the message panel to the height of the file name panel */
  1643. X    XtUnmanageChild(msg_panel);
  1644. X    FirstArg(XtNheight, &ht);
  1645. X    GetValues(name_panel);
  1646. X    FirstArg(XtNheight, ht);
  1647. X    SetValues(msg_panel);
  1648. X    /* set the MSGFORM_HT variable so the mouse panel can be resized to fit */
  1649. X    MSGFORM_HT = ht;
  1650. X    XtManageChild(msg_panel);
  1651. X    if (msg_win == 0)
  1652. X    msg_win = XtWindow(msg_panel);
  1653. X    XDefineCursor(tool_d, msg_win, null_cursor);
  1654. X}
  1655. X
  1656. X/*
  1657. X * Update the current filename in the name_panel widget (it will resize
  1658. X * automatically) and resize the msg_panel widget to fit in the remaining 
  1659. X * space, by getting the width of the command panel and subtract the new 
  1660. X * width of the name_panel to get the new width of the message panel
  1661. X */
  1662. Xupdate_cur_filename(newname)
  1663. X    char    *newname;
  1664. X{
  1665. X    Dimension namwid;
  1666. X
  1667. X    XtUnmanageChild(msg_form);
  1668. X    XtUnmanageChild(msg_panel);
  1669. X    XtUnmanageChild(name_panel);
  1670. X    strcpy(cur_filename,newname);
  1671. X
  1672. X
  1673. X    FirstArg(XtNlabel, newname);
  1674. X    SetValues(name_panel);
  1675. X    /* get the new size of the name_panel */
  1676. X    FirstArg(XtNwidth, &namwid);
  1677. X    GetValues(name_panel);
  1678. X    MSGPANEL_WD = MSGFORM_WD-namwid;
  1679. X    /* resize the message panel to fit with the new width of the name panel */
  1680. X    FirstArg(XtNwidth, MSGPANEL_WD);
  1681. X    SetValues(msg_panel);
  1682. X    XtManageChild(msg_panel);
  1683. X    XtManageChild(name_panel);
  1684. X
  1685. X    /* now resize the whole form */
  1686. X    FirstArg(XtNwidth, MSGFORM_WD);
  1687. X    SetValues(msg_form);
  1688. X    XtManageChild(msg_form);
  1689. X}
  1690. X
  1691. X/* VARARGS1 */
  1692. Xint put_msg(va_alist) va_dcl
  1693. X{
  1694. X    va_list ap;
  1695. X    char *format;
  1696. X
  1697. X    va_start(ap);
  1698. X    format = va_arg(ap, char *);
  1699. X    vsprintf(prompt, format, ap );
  1700. X    va_end(ap);
  1701. X    FirstArg(XtNstring, prompt);
  1702. X    SetValues(msg_panel);
  1703. X}
  1704. X
  1705. Xclear_message()
  1706. X{
  1707. X    FirstArg(XtNstring, "\0");
  1708. X    SetValues(msg_panel);
  1709. X}
  1710. X
  1711. Xboxsize_msg()
  1712. X{
  1713. X    float dx, dy;
  1714. X
  1715. X    dx = (float) abs(cur_x - fix_x) /
  1716. X        (float)(appres.INCHES? PIX_PER_INCH: PIX_PER_CM);
  1717. X    dy = (float) abs(cur_y - fix_y) /
  1718. X        (float)(appres.INCHES? PIX_PER_INCH: PIX_PER_CM);
  1719. X    put_msg("Width = %.2f, Length = %.2f %s",
  1720. X        dx*appres.user_scale, dy*appres.user_scale, cur_fig_units);
  1721. X}
  1722. X
  1723. Xlength_msg(type)
  1724. Xint type;
  1725. X{
  1726. X    altlength_msg(type, fix_x, fix_y);
  1727. X}
  1728. X
  1729. X/*
  1730. X** In typical usage, point fx,fy is the fixed point.
  1731. X** Distance will be measured from it to cur_x,cur_y.
  1732. X*/
  1733. X
  1734. Xaltlength_msg(type, fx, fy)
  1735. Xint type;
  1736. X{
  1737. X    float len,dx,dy;
  1738. X
  1739. X    dx = cur_x - fx;
  1740. X    dy = cur_y - fy;
  1741. X    len = (float)(sqrt((double)dx*(double)dx + (double)dy*(double)dy)/
  1742. X        (double)(appres.INCHES? PIX_PER_INCH: PIX_PER_CM));
  1743. X    put_msg("%s = %.2f %s", (type==MSG_RADIUS? "Radius":
  1744. X                (type==MSG_DIAM? "Diameter": "Length")),
  1745. X        len*appres.user_scale, cur_fig_units);
  1746. X}
  1747. X
  1748. X/*
  1749. X** In typical usage, point x3,y3 is the one that is moving,
  1750. X** the other two are fixed.  Distances will be measured from
  1751. X** points 1 -> 3 and 2 -> 3.
  1752. X*/
  1753. X
  1754. Xlength_msg2(x1,y1,x2,y2,x3,y3)
  1755. Xint x1,y1,x2,y2,x3,y3;
  1756. X{
  1757. X    float len1,len2,dx1,dy1,dx2,dy2;
  1758. X
  1759. X    len1=len2=0.0;
  1760. X    if (x1 != -999) {
  1761. X        dx1 = x3 - x1;
  1762. X        dy1 = y3 - y1;
  1763. X        len1 = (float)(sqrt((double)dx1*(double)dx1 + (double)dy1*(double)dy1)/
  1764. X        (double)(appres.INCHES? PIX_PER_INCH: PIX_PER_CM));
  1765. X    }
  1766. X    if (x2 != -999) {
  1767. X        dx2 = x3 - x2;
  1768. X        dy2 = y3 - y2;
  1769. X        len2 = (float)(sqrt((double)dx2*(double)dx2 + (double)dy2*(double)dy2)/
  1770. X        (double)(appres.INCHES? PIX_PER_INCH: PIX_PER_CM));
  1771. X    }
  1772. X    put_msg("Length 1 = %.2f, Length 2 = %.2f %s",
  1773. X        len1*appres.user_scale, len2*appres.user_scale, cur_fig_units);
  1774. X}
  1775. X
  1776. END_OF_FILE
  1777. if test 5807 -ne `wc -c <'w_msgpanel.c'`; then
  1778.     echo shar: \"'w_msgpanel.c'\" unpacked with wrong size!
  1779. fi
  1780. # end of 'w_msgpanel.c'
  1781. fi
  1782. if test -f 'w_util.c' -a "${1}" != "-c" ; then 
  1783.   echo shar: Will not clobber existing file \"'w_util.c'\"
  1784. else
  1785. echo shar: Extracting \"'w_util.c'\" \(5742 characters\)
  1786. sed "s/^X//" >'w_util.c' <<'END_OF_FILE'
  1787. X/*
  1788. X * FIG : Facility for Interactive Generation of figures
  1789. X * Copyright (c) 1985 by Supoj Sutanthavibul
  1790. X *
  1791. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1792. X * documentation for any purpose is hereby granted without fee, provided that
  1793. X * the above copyright notice appear in all copies and that both the copyright
  1794. X * notice and this permission notice appear in supporting documentation. 
  1795. X * No representations are made about the suitability of this software for 
  1796. X * any purpose.  It is provided "as is" without express or implied warranty."
  1797. X */
  1798. X
  1799. X#include "fig.h"
  1800. X#include "figx.h"
  1801. X#include "resources.h"
  1802. X#include "w_drawprim.h"
  1803. X#include "w_util.h"
  1804. X#include "w_setup.h"
  1805. X
  1806. X/*
  1807. X * The next routine is easy to implement, but I haven't missed it yet.
  1808. X * Generally it is a bad idea to warp the mouse without the users consent.
  1809. X */
  1810. X
  1811. Xwin_setmouseposition(w, x, y)
  1812. X    Window        w;
  1813. X    int            x, y;
  1814. X{
  1815. X}
  1816. X
  1817. X/* manually flush out X events */
  1818. X
  1819. Xapp_flush()
  1820. X{
  1821. X    while (XtAppPending(tool_app)) {
  1822. X    XEvent        event;
  1823. X
  1824. X    /* pass events to ensure we are completely initialised */
  1825. X    XtAppNextEvent(tool_app, &event);
  1826. X    XtDispatchEvent(&event);
  1827. X    }
  1828. X}
  1829. X
  1830. X/* popup a confirmation window */
  1831. X
  1832. Xstatic        query_result, query_done;
  1833. Xstatic String   query_translations =
  1834. X        "<Message>WM_PROTOCOLS: DismissQuery()\n";
  1835. Xstatic void     accept_cancel();
  1836. Xstatic XtActionsRec     query_actions[] =
  1837. X{
  1838. X    {"DismissQuery", (XtActionProc) accept_cancel},
  1839. X};
  1840. X
  1841. X
  1842. Xstatic void
  1843. Xaccept_yes()
  1844. X{
  1845. X    query_done = 1;
  1846. X    query_result = RESULT_YES;
  1847. X}
  1848. X
  1849. Xstatic void
  1850. Xaccept_no()
  1851. X{
  1852. X    query_done = 1;
  1853. X    query_result = RESULT_NO;
  1854. X}
  1855. X
  1856. Xstatic void
  1857. Xaccept_cancel()
  1858. X{
  1859. X    query_done = 1;
  1860. X    query_result = RESULT_CANCEL;
  1861. X}
  1862. X
  1863. Xint
  1864. Xpopup_query(query_type, message)
  1865. X    int            query_type;
  1866. X    char       *message;
  1867. X{
  1868. X    TOOL        query_popup, query_form, query_message;
  1869. X    TOOL        query_yes, query_no, query_cancel;
  1870. X    int            xposn, yposn;
  1871. X    Window        win;
  1872. X    XEvent        event;
  1873. X    static int      actions_added=0;
  1874. X    extern Atom        wm_delete_window;
  1875. X
  1876. X    DeclareArgs(7);
  1877. X
  1878. X    XTranslateCoordinates(tool_d, canvas_win, XDefaultRootWindow(tool_d),
  1879. X              150, 200, &xposn, &yposn, &win);
  1880. X    FirstArg(XtNallowShellResize, True);
  1881. X    NextArg(XtNx, xposn);
  1882. X    NextArg(XtNy, yposn);
  1883. X    NextArg(XtNborderWidth, POPUP_BW);
  1884. X    NextArg(XtNtitle, "Xfig: Query");
  1885. X    query_popup = XtCreatePopupShell("query_popup", transientShellWidgetClass,
  1886. X                     tool, Args, ArgCount);
  1887. X    XtOverrideTranslations(query_popup,
  1888. X                       XtParseTranslationTable(query_translations));
  1889. X    if (!actions_added) {
  1890. X        XtAppAddActions(tool_app, query_actions, XtNumber(query_actions));
  1891. X    actions_added = 1;
  1892. X    }
  1893. X
  1894. X    FirstArg(XtNdefaultDistance, 10);
  1895. X    query_form = XtCreateManagedWidget("query_form", formWidgetClass,
  1896. X                       query_popup, Args, ArgCount);
  1897. X
  1898. X    FirstArg(XtNfont, bold_font);
  1899. X    NextArg(XtNborderWidth, 0);
  1900. X    NextArg(XtNlabel, message);
  1901. X    query_message = XtCreateManagedWidget("message", labelWidgetClass,
  1902. X                      query_form, Args, ArgCount);
  1903. X
  1904. X    FirstArg(XtNheight, 25);
  1905. X    NextArg(XtNvertDistance, 15);
  1906. X    NextArg(XtNfromVert, query_message);
  1907. X    NextArg(XtNborderWidth, INTERNAL_BW);
  1908. X    NextArg(XtNlabel, " Yes  ");
  1909. X    NextArg(XtNhorizDistance, 55);
  1910. X    query_yes = XtCreateManagedWidget("yes", commandWidgetClass,
  1911. X                      query_form, Args, ArgCount);
  1912. X    XtAddEventHandler(query_yes, ButtonReleaseMask, (Boolean) 0,
  1913. X              (XtEventHandler)accept_yes, (XtPointer) NULL);
  1914. X
  1915. X    if (query_type == QUERY_YESNO) {
  1916. X    ArgCount = 4;
  1917. X    NextArg(XtNhorizDistance, 25);
  1918. X    NextArg(XtNlabel, "  No  ");
  1919. X    NextArg(XtNfromHoriz, query_yes);
  1920. X    query_no = XtCreateManagedWidget("no", commandWidgetClass,
  1921. X                     query_form, Args, ArgCount);
  1922. X    XtAddEventHandler(query_no, ButtonReleaseMask, (Boolean) 0,
  1923. X              (XtEventHandler)accept_no, (XtPointer) NULL);
  1924. X
  1925. X    ArgCount = 5;
  1926. X    NextArg(XtNfromHoriz, query_no);
  1927. X    } else {
  1928. X    ArgCount = 4;
  1929. X    NextArg(XtNhorizDistance, 25);
  1930. X    NextArg(XtNfromHoriz, query_yes);
  1931. X    }
  1932. X
  1933. X    NextArg(XtNlabel, "Cancel");
  1934. X    query_cancel = XtCreateManagedWidget("cancel", commandWidgetClass,
  1935. X                     query_form, Args, ArgCount);
  1936. X    XtAddEventHandler(query_cancel, ButtonReleaseMask, (Boolean) 0,
  1937. X              (XtEventHandler)accept_cancel, (XtPointer) NULL);
  1938. X
  1939. X    XtPopup(query_popup, XtGrabExclusive);
  1940. X    (void) XSetWMProtocols(XtDisplay(query_popup), XtWindow(query_popup),
  1941. X                           &wm_delete_window, 1);
  1942. X    XDefineCursor(tool_d, XtWindow(query_popup), arrow_cursor);
  1943. X
  1944. X    query_done = 0;
  1945. X    while (!query_done) {
  1946. X    /* pass events */
  1947. X    XNextEvent(tool_d, &event);
  1948. X    XtDispatchEvent(&event);
  1949. X    }
  1950. X
  1951. X    XtPopdown(query_popup);
  1952. X    XtDestroyWidget(query_popup);
  1953. X
  1954. X    return (query_result);
  1955. X}
  1956. X
  1957. Xstatic void
  1958. XCvtStringToFloat(args, num_args, fromVal, toVal)
  1959. X    XrmValuePtr        args;
  1960. X    Cardinal       *num_args;
  1961. X    XrmValuePtr        fromVal;
  1962. X    XrmValuePtr        toVal;
  1963. X{
  1964. X    static float    f;
  1965. X
  1966. X    if (*num_args != 0)
  1967. X    XtWarning("String to Float conversion needs no extra arguments");
  1968. X    if (sscanf((char *) fromVal->addr, "%f", &f) == 1) {
  1969. X    (*toVal).size = sizeof(float);
  1970. X    (*toVal).addr = (caddr_t) & f;
  1971. X    } else
  1972. X    XtStringConversionWarning((char *) fromVal->addr, "Float");
  1973. X}
  1974. X
  1975. Xstatic void
  1976. XCvtIntToFloat(args, num_args, fromVal, toVal)
  1977. X    XrmValuePtr        args;
  1978. X    Cardinal       *num_args;
  1979. X    XrmValuePtr        fromVal;
  1980. X    XrmValuePtr        toVal;
  1981. X{
  1982. X    static float    f;
  1983. X
  1984. X    if (*num_args != 0)
  1985. X    XtWarning("Int to Float conversion needs no extra arguments");
  1986. X    f = *(int *) fromVal->addr;
  1987. X    (*toVal).size = sizeof(float);
  1988. X    (*toVal).addr = (caddr_t) & f;
  1989. X}
  1990. X
  1991. Xfix_converters()
  1992. X{
  1993. X    XtAppAddConverter(tool_app, "String", "Float", CvtStringToFloat, NULL, 0);
  1994. X    XtAppAddConverter(tool_app, "Int", "Float", CvtIntToFloat, NULL, 0);
  1995. X}
  1996. END_OF_FILE
  1997. if test 5742 -ne `wc -c <'w_util.c'`; then
  1998.     echo shar: \"'w_util.c'\" unpacked with wrong size!
  1999. fi
  2000. # end of 'w_util.c'
  2001. fi
  2002. echo shar: End of archive 4 \(of 27\).
  2003. cp /dev/null ark4isdone
  2004. MISSING=""
  2005. 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
  2006.     if test ! -f ark${I}isdone ; then
  2007.     MISSING="${MISSING} ${I}"
  2008.     fi
  2009. done
  2010. if test "${MISSING}" = "" ; then
  2011.     echo You have unpacked all 27 archives.
  2012.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2013. else
  2014.     echo You still need to unpack the following archives:
  2015.     echo "        " ${MISSING}
  2016. fi
  2017. ##  End of shell archive.
  2018. exit 0
  2019.  
  2020. exit 0 # Just in case...
  2021. -- 
  2022.   // chris@IMD.Sterling.COM       | Send comp.sources.x submissions to:
  2023. \X/  Amiga - The only way to fly! |    sources-x@imd.sterling.com
  2024.  "It's intuitively obvious to the |
  2025.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  2026.