- Timestamp:
- 11/10/11 09:12:43 (8 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
AWT/AWT_canio.cxx (modified) (6 diffs)
-
lib/pictures/awt/export.fig (modified) (1 diff)
-
lib/pictures/awt/secExport.fig (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/AWT/AWT_canio.cxx
r7768 r8056 542 542 // -------------------------------------------------------------------------------- 543 543 544 static GB_ERROR canvas_to_xfig(AWT_canvas *ntw, const char *xfig_name, bool add_invisibles) { 545 // if 'add_invisibles' is true => print 2 invisible dots to make fig2dev center correctly 546 547 GB_transaction ta(ntw->gb_main); 548 549 AW_root *awr = ntw->awr; 550 bool draw_all = awr->awar(AWAR_CANIO_CLIP)->read_int(); 551 bool handles = awr->awar(AWAR_CANIO_HANDLES)->read_int(); 552 bool use_color = awr->awar(AWAR_CANIO_COLOR)->read_int(); 553 double border = awr->awar(AWAR_CANIO_BORDERSIZE)->read_float(); 544 static GB_ERROR canvas_to_xfig(AWT_canvas *ntw, const char *xfig_name, bool add_invisibles, double border) { 545 // if 'add_invisibles' is true => print 2 invisible dots to make fig2dev center correctly 546 547 GB_transaction ta(ntw->gb_main); 548 AW_root *awr = ntw->awr; 549 550 bool draw_all = awr->awar(AWAR_CANIO_CLIP)->read_int(); 551 bool handles = awr->awar(AWAR_CANIO_HANDLES)->read_int(); 552 bool use_color = awr->awar(AWAR_CANIO_COLOR)->read_int(); 554 553 555 554 AW_device_print *device = ntw->aww->get_print_device(AW_MIDDLE_AREA); … … 632 631 } 633 632 else { 634 error = canvas_to_xfig(ntw, xfig, true );633 error = canvas_to_xfig(ntw, xfig, true, 0.0); 635 634 if (!error) { 636 635 awr->awar(AWAR_CANIO_FILE_DIR)->touch(); // reload dir to show created xfig … … 680 679 681 680 if (!xfig) error = GB_await_error(); 682 if (!error) error = canvas_to_xfig(ntw, xfig, true); 681 if (!error) { 682 double border = awr->awar(AWAR_CANIO_BORDERSIZE)->read_float(); 683 error = canvas_to_xfig(ntw, xfig, true, border); 684 } 683 685 684 686 if (!error) { … … 798 800 aws->create_toggle(AWAR_CANIO_COLOR); 799 801 800 801 802 aws->at("xfig"); aws->callback(canvas_to_xfig_and_run_xfig, cl_canvas); 802 aws->create_button("START_XFIG", "EXPORT to XFIG", "X"); 803 804 aws->at("cancel"); aws->callback((AW_CB0)AW_POPDOWN); 805 aws->create_button("CLOSE", "CANCEL", "C"); 803 aws->create_autosize_button("START_XFIG", "EXPORT to XFIG", "X"); 806 804 } 807 805 … … 820 818 aws->init(awr, "EXPORT_TREE_AS_XFIG", "EXPORT STRUCTURE TO XFIG"); 821 819 aws->load_xfig("awt/secExport.fig"); 820 821 aws->at("close"); aws->callback((AW_CB0)AW_POPDOWN); 822 aws->create_button("CLOSE", "CLOSE", "C"); 822 823 823 824 aws->at("help"); aws->callback(AW_POPUP_HELP, (AW_CL)"tree2file.hlp"); … … 839 840 840 841 aws->at("xfig"); aws->callback(canvas_to_xfig_and_run_xfig, cl_canvas); 841 aws->create_button("START_XFIG", "EXPORT to XFIG", "X"); 842 843 aws->at("close"); aws->callback((AW_CB0)AW_POPDOWN); 844 aws->create_button("CLOSE", "CLOSE", "C"); 845 846 aws->at("cancel"); aws->callback((AW_CB0)AW_POPDOWN); 847 aws->create_button("CLOSE", "CANCEL", "C"); 842 aws->create_autosize_button("START_XFIG", "EXPORT to XFIG", "X"); 848 843 } 849 844 -
trunk/lib/pictures/awt/export.fig
r4087 r8056 1 #FIG 2.1 2 80 2 3 6 84 169 474 539 4 2 1 0 1 -1 0 0 0 0.000 -1 0 0 5 239 204 84 204 84 574 474 574 474 204 319 204 9999 9999 1 #FIG 3.2 Produced by xfig version 3.2.5b 2 Landscape 3 Center 4 Metric 5 A4 6 100.00 7 Single 8 -2 9 1200 2 10 6 1275 2550 7125 8100 11 2 1 0 1 -1 -1 0 0 -1 0.000 0 0 -1 0 0 6 12 3600 3075 1275 3075 1275 8625 7125 8625 7125 3075 4800 3075 6 13 -6 7 6 89 159 469 2298 4 0 18 12 0 -1 0 0.00000 4 15 28 89 264 $box9 4 2 18 12 0 -1 0 0.00000 4 15 33 469 233 $filter10 4 2 18 12 0 -1 0 0.00000 4 15 33 409 229 Suffix11 4 0 18 12 0 -1 0 0.00000 4 15 153 94 229 Directories (D) and Files (f)12 4 1 18 12 0 -1 0 0.00000 4 15 52 279 209 Filename14 6 1350 2400 7050 3450 15 4 0 -1 0 0 18 12 0.0000 4 210 495 1350 3975 $box\001 16 4 2 -1 0 0 18 12 0.0000 4 210 585 7050 3510 $filter\001 17 4 2 -1 0 0 18 12 0.0000 4 165 570 6150 3450 Suffix\001 18 4 0 -1 0 0 18 12 0.0000 4 210 2805 1425 3450 Directories (D) and Files (f)\001 19 4 1 -1 0 0 18 12 0.0000 4 165 930 4200 3150 Filename\001 13 20 -6 14 2 2 0 1 -1 0 0 0 0.000 0 0 0 15 479 624 479 34 74 34 74 624 479 624 9999 9999 16 4 0 18 12 0 -1 0 0.00000 4 15 38 89 64 $close 17 4 2 18 12 0 -1 0 0.00000 4 15 31 469 64 $help 18 4 2 18 12 0 -1 0 0.00000 4 15 78 469 564 $to:file_name 19 4 0 18 12 0 -1 0 0.00000 4 15 63 89 564 $file_name 20 4 2 18 12 0 -1 0 0.00000 4 15 43 469 514 $to:box 21 4 0 18 12 0 -1 0 0.00000 4 15 57 89 534 File Name 22 4 0 18 12 0 -1 0 0.00000 4 15 34 89 99 $what 23 4 0 18 12 0 -1 0 0.00000 4 15 81 89 134 $remove_root 24 4 0 18 12 0 -1 0 0.00000 4 15 81 89 179 $color 25 4 0 18 12 0 -1 0 0.00000 4 15 28 89 609 $xfig 26 4 2 18 12 0 -1 0 0.00000 4 15 43 184 609 $to:xfig 27 4 0 18 12 0 -1 0 0.00000 4 15 45 339 609 $cancel 28 4 2 18 12 0 -1 0 0.00000 4 15 60 454 609 $to:cancel 21 2 2 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 5 22 7200 9375 7200 525 1125 525 1125 9375 7200 9375 23 4 0 -1 0 0 18 12 0.0000 4 210 675 1350 975 $close\001 24 4 2 -1 0 0 18 12 0.0000 4 225 570 7050 975 $help\001 25 4 2 -1 0 0 18 12 0.0000 4 225 1380 7050 8475 $to:file_name\001 26 4 0 -1 0 0 18 12 0.0000 4 225 1095 1350 8475 $file_name\001 27 4 2 -1 0 0 18 12 0.0000 4 210 780 7050 7725 $to:box\001 28 4 0 -1 0 0 18 12 0.0000 4 165 1020 1350 8025 File Name\001 29 4 0 -1 0 0 18 12 0.0000 4 210 600 1350 1500 $what\001 30 4 0 -1 0 0 18 12 0.0000 4 225 1440 1350 2025 $remove_root\001 31 4 0 -1 0 0 18 12 0.0000 4 210 660 1350 2700 $color\001 32 4 0 -1 0 0 18 12 0.0000 4 225 480 1350 9150 $xfig\001 -
trunk/lib/pictures/awt/secExport.fig
r4750 r8056 1 #FIG 3.2 1 #FIG 3.2 Produced by xfig version 3.2.5b 2 2 Landscape 3 3 Center … … 12 12 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 1 13 13 7155 8865 14 4 0 -1 0 0 18 12 0.0000 4 165 450 1440 8595 $xfig\001 15 4 0 -1 0 0 18 12 0.0000 4 150 900 1305 7155 $file_name\001 16 4 2 -1 0 0 2 12 0.0000 4 150 720 5895 2250 X:Suffix\001 17 4 0 -1 0 0 18 12 0.0000 4 135 360 1350 2745 $box\001 18 4 0 -1 0 0 2 14 0.0000 4 135 810 1350 6750 File Name\001 19 4 2 -1 0 0 18 12 0.0000 4 165 720 3375 8595 $to:xfig\001 20 4 0 -1 0 0 18 12 0.0000 4 135 540 1710 8100 $color\001 21 4 2 -1 0 0 18 12 0.0000 4 150 1350 7065 7290 $to:X:file_name\001 22 4 0 -1 0 0 18 12 0.0000 4 135 450 1710 7695 $what\001 23 4 0 -1 0 0 2 14 0.0000 4 165 3150 1350 1935 Select Path to export the STRUCTURE\001 24 4 0 -1 0 0 2 13 0.0000 4 165 2610 1350 2295 Directories (D) and Files (f)\001 25 4 2 -1 0 0 18 12 0.0000 4 150 810 7065 6390 $to:X:box\001 26 4 2 -1 0 0 18 12 0.0000 4 150 810 7065 2340 $X:filter\001 27 4 2 -1 0 0 18 12 0.0000 4 150 810 7065 8595 $X:cancel\001 28 4 0 -1 0 0 18 12 0.0000 4 135 540 1350 1575 $close\001 29 4 2 -1 0 0 18 12 0.0000 4 165 630 7065 1620 $X:help\001 14 4 0 -1 0 0 18 12 0.0000 4 225 480 1440 8595 $xfig\001 15 4 0 -1 0 0 18 12 0.0000 4 225 1095 1305 7155 $file_name\001 16 4 2 -1 0 0 2 12 0.0000 4 150 750 5895 2250 X:Suffix\001 17 4 0 -1 0 0 18 12 0.0000 4 210 495 1350 2745 $box\001 18 4 0 -1 0 0 2 14 0.0000 4 165 1080 1350 6750 File Name\001 19 4 0 -1 0 0 18 12 0.0000 4 210 660 1710 8100 $color\001 20 4 2 -1 0 0 18 12 0.0000 4 225 1590 7065 7290 $to:X:file_name\001 21 4 0 -1 0 0 18 12 0.0000 4 210 600 1710 7695 $what\001 22 4 0 -1 0 0 2 14 0.0000 4 225 4200 1350 1935 Select Path to export the STRUCTURE\001 23 4 0 -1 0 0 2 13 0.0000 4 195 2445 1350 2295 Directories (D) and Files (f)\001 24 4 2 -1 0 0 18 12 0.0000 4 210 990 7065 6390 $to:X:box\001 25 4 2 -1 0 0 18 12 0.0000 4 210 795 7065 2340 $X:filter\001 26 4 0 -1 0 0 18 12 0.0000 4 210 675 1350 1575 $close\001 27 4 2 -1 0 0 18 12 0.0000 4 225 780 7065 1620 $X:help\001
