Changeset 8056 for trunk

Show
Ignore:
Timestamp:
11/10/11 09:12:43 (8 months ago)
Author:
westram
Message:
  • fixed undefined AWAR_CANIO_BORDERSIZE in canvas_to_xfig
    • instead pass value from caller, print dialog uses awar value, xfig-export uses 0.0
  • removed 'CANCEL'-buttons from export dialogs
  • fixed size of export buttons
Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/AWT/AWT_canio.cxx

    r7768 r8056  
    542542// -------------------------------------------------------------------------------- 
    543543 
    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(); 
     544static 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(); 
    554553 
    555554    AW_device_print *device = ntw->aww->get_print_device(AW_MIDDLE_AREA); 
     
    632631    } 
    633632    else { 
    634         error = canvas_to_xfig(ntw, xfig, true); 
     633        error = canvas_to_xfig(ntw, xfig, true, 0.0); 
    635634        if (!error) { 
    636635            awr->awar(AWAR_CANIO_FILE_DIR)->touch(); // reload dir to show created xfig 
     
    680679 
    681680        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        } 
    683685 
    684686        if (!error) { 
     
    798800        aws->create_toggle(AWAR_CANIO_COLOR); 
    799801 
    800  
    801802        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"); 
    806804    } 
    807805 
     
    820818        aws->init(awr, "EXPORT_TREE_AS_XFIG", "EXPORT STRUCTURE TO XFIG"); 
    821819        aws->load_xfig("awt/secExport.fig"); 
     820 
     821        aws->at("close"); aws->callback((AW_CB0)AW_POPDOWN); 
     822        aws->create_button("CLOSE", "CLOSE", "C"); 
    822823 
    823824        aws->at("help"); aws->callback(AW_POPUP_HELP, (AW_CL)"tree2file.hlp"); 
     
    839840 
    840841        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"); 
    848843    } 
    849844 
  • 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 
     2Landscape 
     3Center 
     4Metric 
     5A4       
     6100.00 
     7Single 
     8-2 
     91200 2 
     106 1275 2550 7125 8100 
     112 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 
    613-6 
    7 6 89 159 469 229 
    8 4 0 18 12 0 -1 0 0.00000 4 15 28 89 264 $box 
    9 4 2 18 12 0 -1 0 0.00000 4 15 33 469 233 $filter 
    10 4 2 18 12 0 -1 0 0.00000 4 15 33 409 229 Suffix 
    11 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 Filename 
     146 1350 2400 7050 3450 
     154 0 -1 0 0 18 12 0.0000 4 210 495 1350 3975 $box\001 
     164 2 -1 0 0 18 12 0.0000 4 210 585 7050 3510 $filter\001 
     174 2 -1 0 0 18 12 0.0000 4 165 570 6150 3450 Suffix\001 
     184 0 -1 0 0 18 12 0.0000 4 210 2805 1425 3450 Directories (D) and Files (f)\001 
     194 1 -1 0 0 18 12 0.0000 4 165 930 4200 3150 Filename\001 
    1320-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 
     212 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 
     234 0 -1 0 0 18 12 0.0000 4 210 675 1350 975 $close\001 
     244 2 -1 0 0 18 12 0.0000 4 225 570 7050 975 $help\001 
     254 2 -1 0 0 18 12 0.0000 4 225 1380 7050 8475 $to:file_name\001 
     264 0 -1 0 0 18 12 0.0000 4 225 1095 1350 8475 $file_name\001 
     274 2 -1 0 0 18 12 0.0000 4 210 780 7050 7725 $to:box\001 
     284 0 -1 0 0 18 12 0.0000 4 165 1020 1350 8025 File Name\001 
     294 0 -1 0 0 18 12 0.0000 4 210 600 1350 1500 $what\001 
     304 0 -1 0 0 18 12 0.0000 4 225 1440 1350 2025 $remove_root\001 
     314 0 -1 0 0 18 12 0.0000 4 210 660 1350 2700 $color\001 
     324 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 
    22Landscape 
    33Center 
     
    12122 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 1 
    1313         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 
     144 0 -1 0 0 18 12 0.0000 4 225 480 1440 8595 $xfig\001 
     154 0 -1 0 0 18 12 0.0000 4 225 1095 1305 7155 $file_name\001 
     164 2 -1 0 0 2 12 0.0000 4 150 750 5895 2250 X:Suffix\001 
     174 0 -1 0 0 18 12 0.0000 4 210 495 1350 2745 $box\001 
     184 0 -1 0 0 2 14 0.0000 4 165 1080 1350 6750 File Name\001 
     194 0 -1 0 0 18 12 0.0000 4 210 660 1710 8100 $color\001 
     204 2 -1 0 0 18 12 0.0000 4 225 1590 7065 7290 $to:X:file_name\001 
     214 0 -1 0 0 18 12 0.0000 4 210 600 1710 7695 $what\001 
     224 0 -1 0 0 2 14 0.0000 4 225 4200 1350 1935 Select Path to export the STRUCTURE\001 
     234 0 -1 0 0 2 13 0.0000 4 195 2445 1350 2295 Directories (D) and Files (f)\001 
     244 2 -1 0 0 18 12 0.0000 4 210 990 7065 6390 $to:X:box\001 
     254 2 -1 0 0 18 12 0.0000 4 210 795 7065 2340 $X:filter\001 
     264 0 -1 0 0 18 12 0.0000 4 210 675 1350 1575 $close\001 
     274 2 -1 0 0 18 12 0.0000 4 225 780 7065 1620 $X:help\001