From d1a8285f818eb7e5c3d6a05709ea21a808490b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 19 Mar 2018 19:55:58 +0100 Subject: New upstream version 5.1.0 --- CMake/FindCMocka.cmake | 4 + CMake/FindGTKUnixPrint.cmake | 49 + CMake/FindPandoc.cmake | 18 + CMakeLists.txt | 78 +- app/CMakeLists.txt | 2 + app/FindPkgConfig.cmake | 360 - app/bin/CMakeLists.txt | 30 +- app/bin/ChangeLog | 495 - app/bin/acclkeys.h | 3 + app/bin/appdefaults.c | 435 + app/bin/bdf2xtp.c | 10 +- app/bin/bitmaps/bezier.xpm | 23 + app/bin/bitmaps/dbezier.xpm | 22 + app/bin/bitmaps/ecornu.xpm | 23 + app/bin/bitmaps/eltsharp.xpm | 21 + app/bin/bitmaps/helix.xpm | 21 - app/bin/bitmaps/map.xpm | 22 + app/bin/bitmaps/pan.xpm | 22 + app/bin/cbezier.c | 1153 + app/bin/cbezier.h | 53 + app/bin/cblock.c | 31 +- app/bin/ccontrol.c | 25 +- app/bin/ccornu.c | 1240 + app/bin/ccornu.h | 23 + app/bin/ccurve.c | 241 +- app/bin/ccurve.h | 18 +- app/bin/cdraw.c | 204 +- app/bin/celev.c | 18 +- app/bin/cgroup.c | 52 +- app/bin/chndldto.c | 18 +- app/bin/chotbar.c | 47 +- app/bin/cjoin.c | 105 +- app/bin/cjoin.h | 15 +- app/bin/cmisc.c | 774 +- app/bin/cmodify.c | 153 +- app/bin/cnote.c | 638 +- app/bin/common.h | 23 +- app/bin/compound.c | 253 +- app/bin/compound.h | 10 +- app/bin/cparalle.c | 15 +- app/bin/cprint.c | 101 +- app/bin/cprofile.c | 18 +- app/bin/cpull.c | 102 +- app/bin/cruler.c | 7 +- app/bin/cselect.c | 261 +- app/bin/cselect.h | 12 +- app/bin/csensor.c | 27 +- app/bin/csignal.c | 38 +- app/bin/csnap.c | 16 +- app/bin/csplit.c | 22 +- app/bin/cstraigh.c | 80 +- app/bin/cstraigh.h | 12 +- app/bin/cstruct.c | 28 +- app/bin/cswitchmotor.c | 23 +- app/bin/ctext.c | 94 +- app/bin/ctodesgn.c | 20 +- app/bin/ctrain.c | 4680 ++-- app/bin/ctrain.h | 10 +- app/bin/cturnout.c | 168 +- app/bin/cturntbl.c | 64 +- app/bin/cundo.c | 17 +- app/bin/cundo.h | 12 +- app/bin/custom.c | 16 +- app/bin/custom.h | 18 +- app/bin/dbench.c | 9 +- app/bin/dbitmap.c | 29 +- app/bin/dcar.c | 45 +- app/bin/dcmpnd.c | 14 +- app/bin/dcontmgm.c | 13 +- app/bin/dcustmgm.c | 25 +- app/bin/dease.c | 110 +- app/bin/denum.c | 31 +- app/bin/dlayer.c | 1538 +- app/bin/doption.c | 221 +- app/bin/dpricels.c | 21 +- app/bin/dprmfile.c | 65 +- app/bin/draw.c | 684 +- app/bin/draw.h | 14 +- app/bin/drawgeom.c | 306 +- app/bin/drawgeom.h | 20 +- app/bin/dxfformat.c | 2 +- app/bin/dxfformat.h | 24 + app/bin/dxfoutput.c | 16 +- app/bin/elev.c | 15 +- app/bin/fileio.c | 229 +- app/bin/fileio.h | 19 +- app/bin/i18n.c | 7 +- app/bin/layout.c | 375 + app/bin/layout.h | 56 + app/bin/lprintf.c | 16 +- app/bin/macro.c | 123 +- app/bin/misc.c | 375 +- app/bin/misc.h | 30 +- app/bin/misc2.c | 98 +- app/bin/misc2.h | 30 +- app/bin/param.c | 391 +- app/bin/param.h | 13 +- app/bin/paths.c | 220 + app/bin/paths.h | 32 + app/bin/shrtpath.c | 4 +- app/bin/shrtpath.h | 10 +- app/bin/smalldlg.c | 32 +- app/bin/smalldlg.h | 4 +- app/bin/tbezier.c | 1629 ++ app/bin/tbezier.h | 57 + app/bin/tcornu.c | 1321 + app/bin/tcornu.h | 66 + app/bin/tcurve.c | 170 +- app/bin/tease.c | 36 +- app/bin/track.c | 270 +- app/bin/track.h | 161 +- app/bin/trackx.h | 9 +- app/bin/trkseg.c | 599 +- app/bin/tstraigh.c | 55 +- app/bin/unittest/CMakeLists.txt | 21 +- app/bin/unittest/defaultstest.c | 110 + app/bin/unittest/pathstest.c | 121 + app/bin/uthash.h | 960 + app/bin/utility.c | 16 + app/bin/utility.h | 8 +- app/bin/version.h | 7 +- app/cornu/CMakeLists.txt | 27 + app/cornu/bezctx.c | 48 + app/cornu/bezctx.h | 13 + app/cornu/bezctx_intf.h | 23 + app/cornu/bezctx_xtrkcad.c | 217 + app/cornu/bezctx_xtrkcad.h | 4 + app/cornu/ppedit_gtk1.c | 930 + app/cornu/spiro.c | 1099 + app/cornu/spiro.h | 22 + app/cornu/spiroentrypoints.c | 60 + app/cornu/spiroentrypoints.h | 31 + app/cornu/zmisc.h | 12 + app/doc/CMakeLists.txt | 2 +- app/doc/ChangeLog | 24 - app/doc/addm.but | 31 +- app/doc/changem.but | 293 +- app/doc/doc.vcproj | 154 - app/doc/drawm.but | 36 +- app/doc/filem.but | 6 +- app/doc/intro.but.in | 8 +- app/doc/managem.but | 4 +- app/doc/navigation.but | 6 +- app/doc/optionm.but | 24 +- app/doc/osxconf.but | 4 +- app/doc/png.d/bezier.png | Bin 0 -> 3866 bytes app/doc/png.d/bmap.png | Bin 0 -> 353 bytes app/doc/png.d/cmdopt.png | Bin 8213 -> 19624 bytes app/doc/png.d/dbezier.png | Bin 0 -> 3776 bytes app/doc/png.d/displayopt.png | Bin 37583 -> 68298 bytes app/doc/png.d/dproperties.png | Bin 9213 -> 43970 bytes app/doc/png.d/easew.png | Bin 5361 -> 12509 bytes app/doc/png.d/joincornu1.png | Bin 0 -> 4784 bytes app/doc/png.d/joincornu2.png | Bin 0 -> 5997 bytes app/doc/png.d/joincornu3.png | Bin 0 -> 7406 bytes app/doc/png.d/joincornu4.png | Bin 0 -> 11409 bytes app/doc/png.d/joincornu5.png | Bin 0 -> 7154 bytes app/doc/png.d/layout.png | Bin 7843 -> 13213 bytes app/doc/png.d/mchange.png | Bin 6461 -> 23214 bytes app/doc/png.d/mdraw.png | Bin 2585 -> 10174 bytes app/doc/png.d/mrotatealign.png | Bin 2552 -> 12893 bytes app/doc/png.d/mrotatefixed.png | Bin 2727 -> 12910 bytes app/doc/png.d/mrotatemove.png | Bin 2590 -> 12872 bytes app/doc/png.d/mview.png | Bin 6712 -> 15591 bytes app/doc/png.d/pan.png | Bin 0 -> 3929 bytes app/doc/png.d/toolbar.png | Bin 12627 -> 13676 bytes app/doc/view_winm.but | 2 +- app/doxfileversionfilter.sh | 12 - app/dynstring/dynstring.c | 10 +- app/dynstring/dynstring.h | 26 +- app/help/ChangeLog | 63 - app/help/fixbmp.c | 227 - app/help/genhelp.in | 32 +- app/help/genmessages.c | 559 +- app/help/messages.in | 40 +- app/help/mkpngbutt | 21 - app/help/mkpngs | 88 - app/help/mkshg.c | 455 - app/help/mkshgs | 348 - app/help/mkxpmbutt.c | 303 - app/help/pageorder.c | 48 - app/help/prochelp.c | 2178 -- app/help/readpng.c | 275 - app/help/readpng.h | 64 - app/help/xtrkcad.info | 10 +- app/help/xtrkcad.tip | 3 + app/help/xvfontsel.hlpsrc | 25 - app/help/xvprintsel.hlpsrc | 73 - app/i18n/ChangeLog | 22 - app/i18n/de_DE.po | 25391 ++++++++++--------- app/i18n/fi.po | 18540 +++++++------- app/i18n/pt_BR.po | 9289 ++++--- app/lib/CHANGELOG.md | 199 + app/lib/CMakeLists.txt | 54 +- app/lib/Readme.md | 269 +- app/lib/Readme.txt | 559 - .../DVRR v3.0 E Stroudsburg - Pt Jervis.xtc | 34 +- app/lib/mdtotxt.bat | 3 - app/lib/params/Any-CTC_panel.xtp | 88 +- app/lib/params/AtlasTrueTrk.xtp | 12 +- app/lib/params/BachmannEZ-HO.xtp | 42 +- app/lib/params/BachmannEZ-N.xtp | 56 +- app/lib/params/ChangeLog | 87 - app/lib/params/F-NMRA-RP12-21.xtp | 592 + app/lib/params/G-NMRA-RP12-23.xtp | 592 + app/lib/params/HO-Frateschi.xtp | 390 +- app/lib/params/HO-LifeLike-Power-Loc.xtp | 8 +- app/lib/params/HO-MicroEngineering.xtp | 160 + app/lib/params/HO-Peco-Code100Setrack.xtp | 170 + app/lib/params/HO-Peco-Code100Streamline.xtp | 288 + app/lib/params/HO-Peco-Code75Finescale.xtp | 288 + app/lib/params/HO-Peco-Code83.xtp | 236 + app/lib/params/HO-WalthCornerstone 1.xtp | 4385 ++++ app/lib/params/HO-atl100ho.xtp | 970 +- app/lib/params/HOn3-BlackStoneProTraxx.xtp | 42 +- app/lib/params/HOn30_Minitrains.xtp | 148 +- app/lib/params/LifeLike-N.xtp | 4 +- app/lib/params/Lionel-O-O27.xtp | 38 +- app/lib/params/Lionel-O.xtp | 25 +- app/lib/params/Lionel27.xtp | 22 +- app/lib/params/LionelFasttrack.xtp | 40 +- app/lib/params/N-AtlasTrueTrack.xtp | 14 +- app/lib/params/N-LifeLike Power-Loc.xtp | 4 +- app/lib/params/N-NScaleArchitect.xtp | 2 +- app/lib/params/N-PecoCode55Finescale.xtp | 388 + app/lib/params/N-PecoCode80Setrack.xtp | 158 + app/lib/params/N-PecoCode80Streamline.xtp | 326 + app/lib/params/N-fl.xtp | 299 + app/lib/params/N-kato-n-gl-trk.xtp | 38 +- app/lib/params/N-kato-turntable.xtp | 38 +- app/lib/params/N-kato.xtp | 3395 +-- app/lib/params/N-walth-n.xtp | 3050 +++ app/lib/params/O-ETS TramTrack.xtp | 194 +- app/lib/params/O-ETS.xtp | 466 +- app/lib/params/O-Lehnhardt Tramrails.xtp | 360 +- app/lib/params/O-Lenz.xtp | 366 +- app/lib/params/O-RealTrax.xtp | 8 +- app/lib/params/O-Ross.xtp | 262 +- app/lib/params/On14mm KBScale.xtp | 31 +- app/lib/params/On30-FastTrack.xtp | 2 +- app/lib/params/On30.xtp | 100 +- app/lib/params/Piko-A.xtp | 32 +- app/lib/params/Piko-g.xtp | 12 +- app/lib/params/ProZ-Track.xtp | 4 +- app/lib/params/RocoGeoLineHO.xtp | 12 +- app/lib/params/S-SHelper S-Trax.xtp | 2 +- app/lib/params/S-Trax.xtp | 3 +- app/lib/params/T-Eishindo.xtp | 658 +- app/lib/params/TT-Roco-Turntable.xtp | 24 +- app/lib/params/TT-TilligAdvBeddingTrack.xtp | 514 +- app/lib/params/TTi-AuhagenNG.xtp | 80 +- app/lib/params/TilligAdvTT.xtp | 647 +- app/lib/params/TilligH0EliteCode83.xtp | 1586 +- app/lib/params/TilligH0e.xtp | 148 +- app/lib/params/TilligH0m.xtp | 148 +- app/lib/params/TilligTTModellGS.xtp | 1662 +- app/lib/params/Z-Atlas55.xtp | 39 +- app/lib/params/Z-Rokuhan.xtp | 2207 +- app/lib/params/arnold.xtp | 34 +- app/lib/params/atl83ho.xtp | 145 +- app/lib/params/atlascho.cars | 20 +- app/lib/params/atlascn.xtp | 16 +- app/lib/params/atlaseho.cars | 12 +- app/lib/params/atlasen.xtp | 60 +- app/lib/params/atlaso2rail.xtp | 25 +- app/lib/params/ctlpanel.xtp | 16 +- app/lib/params/fl-model.xtp | 24 +- app/lib/params/fl-profi.xtp | 28 +- app/lib/params/flnpicco.xtp | 104 +- app/lib/params/gargrv-o.xtp | 22 +- app/lib/params/ho-amb.xtp | 2 +- app/lib/params/hubner1.xtp | 44 +- app/lib/params/kato-ho.xtp | 1039 +- app/lib/params/kato-n-DblTrk.xtp | 28 +- app/lib/params/kato-n.xtp | 3278 +-- app/lib/params/lgb.xtp | 82 +- app/lib/params/minitrix.xtp | 4 +- app/lib/params/mkcarpart.c | 26 +- app/lib/params/mrkholde.xtp | 52 +- app/lib/params/mrkhomde.xtp | 108 +- app/lib/params/mrklnhom.xtp | 66 +- app/lib/params/mrklnz.xtp | 112 +- app/lib/params/mtl-z.xtp | 506 +- app/lib/params/peco turntable wo routes.xtp | 36 +- app/lib/params/pecoho.xtp | 217 - app/lib/params/pecoho83.xtp | 145 - app/lib/params/pecohom.xtp | 2 +- app/lib/params/pecohost.xtp | 170 - app/lib/params/pecon55.xtp | 316 - app/lib/params/pecon80.xtp | 237 - app/lib/params/peconst.xtp | 189 - app/lib/params/rocho83.xtp | 38 +- app/lib/params/rocon.xtp | 297 - app/lib/params/tomix-n.xtp | 3376 +-- app/lib/xdg-open | 972 + app/lib/xtrkcad.xtq | 16 + app/tools/CMakeLists.txt | 19 +- app/tools/addcrlf.c | 242 - app/tools/bin2c.c | 126 - app/tools/halibut/bk_html.c | 2 + app/tools/listxtp.c | 7 +- app/tools/oldscripts/README | 4 - app/tools/oldscripts/checkall | 10 - app/tools/oldscripts/diffall | 37 - app/tools/oldscripts/fetchall | 46 - app/tools/oldscripts/makeall | 23 - app/tools/oldscripts/markall | 17 - app/tools/oldscripts/mkwinrlse | 34 - app/tools/oldscripts/roall | 22 - app/wlib/gtklib/CMakeLists.txt | 68 +- app/wlib/gtklib/ChangeLog | 250 - app/wlib/gtklib/FindGTKUnixPrint.cmake | 49 - app/wlib/gtklib/bitmap.c | 1 + app/wlib/gtklib/boxes.c | 1 + app/wlib/gtklib/browserhelp.c | 137 + app/wlib/gtklib/button.c | 4 +- app/wlib/gtklib/control.c | 22 +- app/wlib/gtklib/droplist.c | 2 +- app/wlib/gtklib/font.c | 11 +- app/wlib/gtklib/gtkdraw-cairo.c | 47 +- app/wlib/gtklib/gtkint.h | 8 +- app/wlib/gtklib/ixhelp.c | 14 - app/wlib/gtklib/list.c | 2 + app/wlib/gtklib/liststore.c | 20 +- app/wlib/gtklib/main.c | 1 + app/wlib/gtklib/menu.c | 21 +- app/wlib/gtklib/message.c | 76 +- app/wlib/gtklib/notice.c | 3 +- app/wlib/gtklib/png.c | 1 + app/wlib/gtklib/print.c | 65 +- app/wlib/gtklib/statusbar.c | 211 + app/wlib/gtklib/text.c | 4 +- app/wlib/gtklib/tooltip.c | 31 +- app/wlib/gtklib/treeview.c | 1 + app/wlib/gtklib/util.c | 235 +- app/wlib/gtklib/window.c | 268 +- app/wlib/gtklib/wpref.c | 10 +- app/wlib/include/wcolors.h | 80 +- app/wlib/include/wlib.h | 57 +- app/wlib/mswlib/CMakeLists.txt | 1 + app/wlib/mswlib/ChangeLog | 146 - app/wlib/mswlib/mswbitmap.c | 26 +- app/wlib/mswlib/mswbutt.c | 22 + app/wlib/mswlib/mswdraw.c | 8 +- app/wlib/mswlib/mswedit.c | 2 +- app/wlib/mswlib/mswlist.c | 6 +- app/wlib/mswlib/mswmenu.c | 8 +- app/wlib/mswlib/mswmisc.c | 4811 ++-- app/wlib/mswlib/mswmsg.c | 4 + app/wlib/mswlib/mswpref.c | 10 +- app/wlib/mswlib/mswsplash.c | 9 +- app/wlib/mswlib/mswstatus.c | 110 + app/wlib/mswlib/mswtext.c | 636 +- distribution/CMakeLists.txt | 2 + distribution/downloadpage.wiki.in | 46 + distribution/osx/gtk-bundle/CMakeLists.txt | 2 +- distribution/osx/gtk-bundle/gtk-bundle.README | 21 +- distribution/posix/CMakeLists.txt | 45 +- distribution/posix/xtrkcad.spec | 5 +- distribution/win32/nsis/install.nsh | 6 +- 360 files changed, 77226 insertions(+), 54590 deletions(-) create mode 100644 CMake/FindGTKUnixPrint.cmake create mode 100644 CMake/FindPandoc.cmake delete mode 100644 app/FindPkgConfig.cmake delete mode 100644 app/bin/ChangeLog create mode 100644 app/bin/appdefaults.c create mode 100644 app/bin/bitmaps/bezier.xpm create mode 100644 app/bin/bitmaps/dbezier.xpm create mode 100644 app/bin/bitmaps/ecornu.xpm create mode 100644 app/bin/bitmaps/eltsharp.xpm delete mode 100644 app/bin/bitmaps/helix.xpm create mode 100644 app/bin/bitmaps/map.xpm create mode 100644 app/bin/bitmaps/pan.xpm create mode 100644 app/bin/cbezier.c create mode 100644 app/bin/cbezier.h create mode 100644 app/bin/ccornu.c create mode 100644 app/bin/ccornu.h create mode 100644 app/bin/layout.c create mode 100644 app/bin/layout.h create mode 100644 app/bin/paths.c create mode 100644 app/bin/paths.h create mode 100644 app/bin/tbezier.c create mode 100644 app/bin/tbezier.h create mode 100644 app/bin/tcornu.c create mode 100644 app/bin/tcornu.h create mode 100644 app/bin/unittest/defaultstest.c create mode 100644 app/bin/unittest/pathstest.c create mode 100644 app/bin/uthash.h create mode 100644 app/cornu/CMakeLists.txt create mode 100644 app/cornu/bezctx.c create mode 100644 app/cornu/bezctx.h create mode 100644 app/cornu/bezctx_intf.h create mode 100644 app/cornu/bezctx_xtrkcad.c create mode 100644 app/cornu/bezctx_xtrkcad.h create mode 100644 app/cornu/ppedit_gtk1.c create mode 100644 app/cornu/spiro.c create mode 100644 app/cornu/spiro.h create mode 100644 app/cornu/spiroentrypoints.c create mode 100644 app/cornu/spiroentrypoints.h create mode 100644 app/cornu/zmisc.h delete mode 100644 app/doc/ChangeLog delete mode 100644 app/doc/doc.vcproj create mode 100644 app/doc/png.d/bezier.png create mode 100644 app/doc/png.d/bmap.png create mode 100644 app/doc/png.d/dbezier.png create mode 100644 app/doc/png.d/joincornu1.png create mode 100644 app/doc/png.d/joincornu2.png create mode 100644 app/doc/png.d/joincornu3.png create mode 100644 app/doc/png.d/joincornu4.png create mode 100644 app/doc/png.d/joincornu5.png create mode 100644 app/doc/png.d/pan.png delete mode 100644 app/doxfileversionfilter.sh delete mode 100644 app/help/ChangeLog delete mode 100644 app/help/fixbmp.c delete mode 100755 app/help/mkpngbutt delete mode 100755 app/help/mkpngs delete mode 100644 app/help/mkshg.c delete mode 100755 app/help/mkshgs delete mode 100644 app/help/mkxpmbutt.c delete mode 100644 app/help/pageorder.c delete mode 100644 app/help/prochelp.c delete mode 100644 app/help/readpng.c delete mode 100644 app/help/readpng.h delete mode 100644 app/help/xvfontsel.hlpsrc delete mode 100644 app/help/xvprintsel.hlpsrc delete mode 100644 app/i18n/ChangeLog create mode 100644 app/lib/CHANGELOG.md delete mode 100644 app/lib/Readme.txt delete mode 100644 app/lib/mdtotxt.bat delete mode 100644 app/lib/params/ChangeLog create mode 100644 app/lib/params/F-NMRA-RP12-21.xtp create mode 100644 app/lib/params/G-NMRA-RP12-23.xtp create mode 100644 app/lib/params/HO-MicroEngineering.xtp create mode 100644 app/lib/params/HO-Peco-Code100Setrack.xtp create mode 100644 app/lib/params/HO-Peco-Code100Streamline.xtp create mode 100644 app/lib/params/HO-Peco-Code75Finescale.xtp create mode 100644 app/lib/params/HO-Peco-Code83.xtp create mode 100644 app/lib/params/HO-WalthCornerstone 1.xtp create mode 100644 app/lib/params/N-PecoCode55Finescale.xtp create mode 100644 app/lib/params/N-PecoCode80Setrack.xtp create mode 100644 app/lib/params/N-PecoCode80Streamline.xtp create mode 100644 app/lib/params/N-fl.xtp create mode 100644 app/lib/params/N-walth-n.xtp delete mode 100644 app/lib/params/pecoho.xtp delete mode 100644 app/lib/params/pecoho83.xtp delete mode 100644 app/lib/params/pecohost.xtp delete mode 100644 app/lib/params/pecon55.xtp delete mode 100644 app/lib/params/pecon80.xtp delete mode 100644 app/lib/params/peconst.xtp delete mode 100644 app/lib/params/rocon.xtp create mode 100755 app/lib/xdg-open delete mode 100644 app/tools/addcrlf.c delete mode 100644 app/tools/bin2c.c delete mode 100644 app/tools/oldscripts/README delete mode 100644 app/tools/oldscripts/checkall delete mode 100644 app/tools/oldscripts/diffall delete mode 100644 app/tools/oldscripts/fetchall delete mode 100644 app/tools/oldscripts/makeall delete mode 100644 app/tools/oldscripts/markall delete mode 100644 app/tools/oldscripts/mkwinrlse delete mode 100644 app/tools/oldscripts/roall delete mode 100644 app/wlib/gtklib/ChangeLog delete mode 100644 app/wlib/gtklib/FindGTKUnixPrint.cmake create mode 100644 app/wlib/gtklib/browserhelp.c create mode 100644 app/wlib/gtklib/statusbar.c delete mode 100644 app/wlib/mswlib/ChangeLog create mode 100644 app/wlib/mswlib/mswstatus.c create mode 100644 distribution/downloadpage.wiki.in diff --git a/CMake/FindCMocka.cmake b/CMake/FindCMocka.cmake index e8a4e92..bec2905 100644 --- a/CMake/FindCMocka.cmake +++ b/CMake/FindCMocka.cmake @@ -21,6 +21,10 @@ #============================================================================= # + +set (CMOCKA_ROOT_DIR + "C:/Users/Martin/Documents/CMocka") + find_path(CMOCKA_INCLUDE_DIR NAMES cmocka.h diff --git a/CMake/FindGTKUnixPrint.cmake b/CMake/FindGTKUnixPrint.cmake new file mode 100644 index 0000000..06bc548 --- /dev/null +++ b/CMake/FindGTKUnixPrint.cmake @@ -0,0 +1,49 @@ +# - Try to find gtk-unix-print +# Once done, this will define +# +# GTK_UNIX_PRINT_FOUND - system has gtk-unix-print +# GTK_UNIX_PRINT_INCLUDE_DIRS - the gtk-unix-print include directories +# GTK_UNIX_PRINT_LIBRARIES - link these to use gtk-unix-print +# +# Copyright (C) 2012 Raphael Kubo da Costa +# Copyright (C) 2014 Igalia S.L. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS +# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +find_package(PkgConfig) +pkg_check_modules(GTK_UNIX_PRINT gtk+-unix-print-2.0) +set(VERSION_OK TRUE) + +if (GTK_UNIX_PRINT_VERSION) + if (GTK_UNIX_PRINT_FIND_VERSION_EXACT) + if (NOT("${GTK_UNIX_PRINT_FIND_VERSION}" VERSION_EQUAL "${GTK_UNIX_PRINT_VERSION}")) + set(VERSION_OK FALSE) + endif () + else () + if ("${GTK_UNIX_PRINT_VERSION}" VERSION_LESS "${GTK_UNIX_PRINT_FIND_VERSION}") + set(VERSION_OK FALSE) + endif () + endif () +endif () + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK_UNIX_PRINT DEFAULT_MSG GTK_UNIX_PRINT_INCLUDE_DIRS GTK_UNIX_PRINT_LIBRARIES VERSION_OK) diff --git a/CMake/FindPandoc.cmake b/CMake/FindPandoc.cmake new file mode 100644 index 0000000..1a076ff --- /dev/null +++ b/CMake/FindPandoc.cmake @@ -0,0 +1,18 @@ +# This module looks for Pandoc, and sets PANDOC_EXECUTABLE to the +# location of its binary. +# +# It respects the variable Pandoc_FIND_QUIETLY + +include(FindPackageHandleStandardArgs) + +if(DEFINED PANDOC_EXECUTABLE) + set(Pandoc_FIND_QUIETLY TRUE) +endif() + +find_program(PANDOC_EXECUTABLE + NAMES pandoc + DOC "Pandoc - a universal document converter") + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pandoc REQUIRED_VARS PANDOC_EXECUTABLE) + +mark_as_advanced(PANDOC_EXECUTABLE) \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f0a9a9..0ec8908 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,27 +1,33 @@ PROJECT(XTrkCAD) enable_testing() +cmake_minimum_required(VERSION 3.0) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked -SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/app) + # additional CMake modules can be found here -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/") +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMake") # Setup high-level build options ... -IF(UNIX AND NOT APPLE) - SET(XTRKCAD_USE_GTK_DEFAULT ON) - SET(XTRKCAD_USE_GETTEXT_DEFAULT ON) -ENDIF(UNIX AND NOT APPLE) - -IF(APPLE) - SET(XTRKCAD_USE_GTK_DEFAULT ON) +if(UNIX) + include(FindPkgConfig) + set(XTRKCAD_USE_GTK_DEFAULT ON) + if(APPLE) SET(XTRKCAD_USE_GETTEXT_DEFAULT OFF) -ENDIF(APPLE) + else() + set(XTRKCAD_USE_GETTEXT_DEFAULT ON) + add_compile_options("-std=gnu99") + PKG_CHECK_MODULES(GTK_WEBKIT "webkit-1.0") + if(GTK_WEBKIT_FOUND) + set(XTRKCAD_USE_BROWSER_DEFAULT OFF) + else() + set(XTRKCAD_USE_BROWSER_DEFAULT ON) + endif() + endif(APPLE) +endif(UNIX) IF(WIN32) - CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR) - SET(XTRKCAD_USE_GTK_DEFAULT OFF) - SET(XTRKCAD_USE_GETTEXT_DEFAULT OFF) + SET(XTRKCAD_USE_GETTEXT_DEFAULT ON) SET(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the compiler during debug builds" FORCE) SET(CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release minumum size builds" FORCE) @@ -40,9 +46,17 @@ if(COMMAND cmake_policy) endif(COMMAND cmake_policy) SET(XTRKCAD_USE_DOXYGEN_DEFAULT OFF) + OPTION(XTRKCAD_USE_GTK "Use GTK for the graphical user interface back-end" ${XTRKCAD_USE_GTK_DEFAULT}) OPTION(XTRKCAD_USE_GETTEXT "Use gettext for internationalization" ${XTRKCAD_USE_GETTEXT_DEFAULT}) OPTION(XTRKCAD_USE_DOXYGEN "Generate internals documentation using doxygen" ${XTRKCAD_USE_DOXYGEN_DEFAULT}) +if(UNIX AND NOT APPLE) + option(XTRKCAD_USE_BROWSER "Show help in default browser" ${XTRKCAD_USE_BROWSER_DEFAULT}) +endif() + +IF(UNIX) + PKG_CHECK_MODULES(GTK REQUIRED "gtk+-2.0") +ENDIF() IF(APPLE) OPTION(XTRKCAD_USE_PACKAGEMAKER "Generate an OSX PackageMaker package for distribution." OFF) @@ -62,12 +76,6 @@ IF(WIN32 AND NOT XTRKCAD_USE_GTK) FIND_PACKAGE(HTMLHelp REQUIRED) ENDIF(WIN32 AND NOT XTRKCAD_USE_GTK) -IF(XTRKCAD_USE_GTK) - INCLUDE(FindPkgConfig) - PKG_CHECK_MODULES(GTK REQUIRED "gtk+-2.0") - PKG_CHECK_MODULES(GTK_WEBKIT REQUIRED "webkit-1.0") -ENDIF(XTRKCAD_USE_GTK) - IF(XTRKCAD_USE_PACKAGEMAKER) IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr") MESSAGE(SEND_ERROR "XTRKCAD_USE_PACKAGEMAKER requires CMAKE_INSTALL_PREFIX set to /usr.") @@ -76,20 +84,23 @@ ENDIF(XTRKCAD_USE_PACKAGEMAKER) # Find unit testing framework find_package(CMocka) -if( CMOCKA_FOUND) +if(CMOCKA_FOUND) include_directories(${CMOCKA_INCLUDE_DIR}) set(LIBS ${LIBS} ${CMOCKA_LIBRARIES}) option( XTRKCAD_TESTING "Build unittests" ON) endif() +# Find document conversion tool +find_package(Pandoc) + # Test for headers and libraries for portability ... INCLUDE (CheckIncludeFiles) CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H) # Setup some global options for installation ... -SET(XTRKCAD_MAJOR_VERSION "4") -SET(XTRKCAD_MINOR_VERSION "3") +SET(XTRKCAD_MAJOR_VERSION "5") +SET(XTRKCAD_MINOR_VERSION "1") SET(XTRKCAD_RELEASE_VERSION "0") SET(XTRKCAD_VERSION_MODIFIER "") SET(XTRKCAD_VERSION "${XTRKCAD_MAJOR_VERSION}.${XTRKCAD_MINOR_VERSION}.${XTRKCAD_RELEASE_VERSION}${XTRKCAD_VERSION_MODIFIER}") @@ -106,6 +117,29 @@ SET(XTRKCAD_SHARE_INSTALL_DIR "share/xtrkcad") ADD_DEFINITIONS(-DXTRKCAD_CMAKE_BUILD) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/xtrkcad-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/xtrkcad-config.h) +IF(XTRKCAD_USE_GETTEXT) + SET(GENHELP_OPTS "-bhi") + # + # Find the GnuWin32 installation directory, the gettext include should be located in subdir include + # + IF(WIN32) + if(MSVC) + # use supplied gettext library for Visual Studio + message( STATUS "Use simple_gettext module included with XTrackCAD" ) + ADD_DEFINITIONS(-DUSE_SIMPLE_GETTEXT ) + else() + # for mingw & co. find libintl.h and use it + find_path ( INTL_PATH libintl.h ) + if(INTL_PATH) + message( STATUS "Use installed gettext module" ) + INCLUDE_DIRECTORIES(${INTL_PATH}) + endif(INTL_PATH) + endif() + ENDIF(WIN32) +ELSE(XTRKCAD_USE_GETTEXT) + SET(GENHELP_OPTS "-bh") +ENDIF(XTRKCAD_USE_GETTEXT) + # Setup the rest of the build ... ADD_SUBDIRECTORY(app) ADD_SUBDIRECTORY(distribution) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 9a47f95..5791fa2 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -1,6 +1,7 @@ # "bin/i18n.h" is widely used INCLUDE_DIRECTORIES(bin) include_directories(dynstring) +include_directories(cornu) # Setup the rest of the build ... add_subdirectory(dynstring) @@ -10,6 +11,7 @@ ADD_SUBDIRECTORY(help) ADD_SUBDIRECTORY(doc) ADD_SUBDIRECTORY(bin) ADD_SUBDIRECTORY(lib) +ADD_SUBDIRECTORY(cornu) IF(XTRKCAD_USE_GETTEXT) ADD_SUBDIRECTORY(i18n) diff --git a/app/FindPkgConfig.cmake b/app/FindPkgConfig.cmake deleted file mode 100644 index 4a894cb..0000000 --- a/app/FindPkgConfig.cmake +++ /dev/null @@ -1,360 +0,0 @@ -# - a pkg-config module for CMake -# -# Usage: -# pkg_check_modules( [REQUIRED] []*) -# checks for all the given modules -# -# pkg_search_module( [REQUIRED] []*) -# checks for given modules and uses the first working one -# -# When the 'REQUIRED' argument was set, macros will fail with an error -# when module(s) could not be found -# -# It sets the following variables: -# PKG_CONFIG_FOUND ... true iff pkg-config works on the system -# PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program -# _FOUND ... set to 1 iff module(s) exist -# -# For the following variables two sets of values exist; first one is the -# common one and has the given PREFIX. The second set contains flags -# which are given out when pkgconfig was called with the '--static' -# option. -# _LIBRARIES ... only the libraries (w/o the '-l') -# _LIBRARY_DIRS ... the paths of the libraries (w/o the '-L') -# _LDFLAGS ... all required linker flags -# _LDFLAGS_OTHERS ... all other linker flags -# _INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I') -# _CFLAGS ... all required cflags -# _CFLAGS_OTHERS ... the other compiler flags -# -# = for common case -# = _STATIC for static linking -# -# There are some special variables whose prefix depends on the count -# of given modules. When there is only one module, stays -# unchanged. When there are multiple modules, the prefix will be -# changed to _: -# _VERSION ... version of the module -# _PREFIX ... prefix-directory of the module -# _INCLUDEDIR ... include-dir of the module -# _LIBDIR ... lib-dir of the module -# -# = when |MODULES| == 1, else -# = _ -# -# A parameter can have the following formats: -# {MODNAME} ... matches any version -# {MODNAME}>={VERSION} ... at least version is required -# {MODNAME}={VERSION} ... exactly version is required -# {MODNAME}<={VERSION} ... modules must not be newer than -# -# Examples -# pkg_check_modules (GLIB2 glib-2.0) -# -# pkg_check_modules (GLIB2 glib-2.0>=2.10) -# requires at least version 2.10 of glib2 and defines e.g. -# GLIB2_VERSION=2.10.3 -# -# pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0) -# requires both glib2 and gtk2, and defines e.g. -# FOO_glib-2.0_VERSION=2.10.3 -# FOO_gtk+-2.0_VERSION=2.8.20 -# -# pkg_check_modules (XRENDER REQUIRED xrender) -# defines e.g.: -# XRENDER_LIBRARIES=Xrender;X11 -# XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp -# -# pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2) - - -# Copyright (C) 2006 Enrico Scholz -# -# Redistribution and use, with or without modification, are permitted -# provided that the following conditions are met: -# -# 1. Redistributions must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# 2. The name of the author may not be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -### Common stuff #### -set(PKG_CONFIG_VERSION 1) -set(PKG_CONFIG_FOUND 0) - -find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable") -mark_as_advanced(PKG_CONFIG_EXECUTABLE) - -if(PKG_CONFIG_EXECUTABLE) - set(PKG_CONFIG_FOUND 1) -endif(PKG_CONFIG_EXECUTABLE) - - -# Unsets the given variables -macro(_pkgconfig_unset var) - set(${var} "" CACHE INTERNAL "") -endmacro(_pkgconfig_unset) - -macro(_pkgconfig_set var value) - set(${var} ${value} CACHE INTERNAL "") -endmacro(_pkgconfig_set) - -# Invokes pkgconfig, cleans up the result and sets variables -macro(_pkgconfig_invoke _pkglist _prefix _varname _regexp) - set(_pkgconfig_invoke_result) - - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} ${ARGN} ${_pkglist} - OUTPUT_VARIABLE _pkgconfig_invoke_result - RESULT_VARIABLE _pkgconfig_failed) - - if (_pkgconfig_failed) - set(_pkgconfig_${_varname} "") - _pkgconfig_unset(${_prefix}_${_varname}) - else(_pkgconfig_failed) - string(REGEX REPLACE "[\r\n]" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") - string(REGEX REPLACE " +$" "" _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") - - if (NOT ${_regexp} STREQUAL "") - string(REGEX REPLACE "${_regexp}" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") - endif(NOT ${_regexp} STREQUAL "") - - separate_arguments(_pkgconfig_invoke_result) - - #message(STATUS " ${_varname} ... ${_pkgconfig_invoke_result}") - set(_pkgconfig_${_varname} ${_pkgconfig_invoke_result}) - _pkgconfig_set(${_prefix}_${_varname} "${_pkgconfig_invoke_result}") - endif(_pkgconfig_failed) -endmacro(_pkgconfig_invoke) - -# Invokes pkgconfig two times; once without '--static' and once with -# '--static' -macro(_pkgconfig_invoke_dyn _pkglist _prefix _varname cleanup_regexp) - _pkgconfig_invoke("${_pkglist}" ${_prefix} ${_varname} "${cleanup_regexp}" ${ARGN}) - _pkgconfig_invoke("${_pkglist}" ${_prefix} STATIC_${_varname} "${cleanup_regexp}" --static ${ARGN}) -endmacro(_pkgconfig_invoke_dyn) - -# Splits given arguments into options and a package list -macro(_pkgconfig_parse_options _result _is_req) - set(${_is_req} 0) - - foreach(_pkg ${ARGN}) - if (_pkg STREQUAL "REQUIRED") - set(${_is_req} 1) - endif (_pkg STREQUAL "REQUIRED") - endforeach(_pkg ${ARGN}) - - set(${_result} ${ARGN}) - list(REMOVE_ITEM ${_result} "REQUIRED") -endmacro(_pkgconfig_parse_options) - -### -macro(_pkg_check_modules_internal _is_required _is_silent _prefix) - _pkgconfig_unset(${_prefix}_FOUND) - _pkgconfig_unset(${_prefix}_VERSION) - _pkgconfig_unset(${_prefix}_PREFIX) - _pkgconfig_unset(${_prefix}_INCLUDEDIR) - _pkgconfig_unset(${_prefix}_LIBDIR) - _pkgconfig_unset(${_prefix}_LIBS) - _pkgconfig_unset(${_prefix}_LIBS_L) - _pkgconfig_unset(${_prefix}_LIBS_PATHS) - _pkgconfig_unset(${_prefix}_LIBS_OTHER) - _pkgconfig_unset(${_prefix}_CFLAGS) - _pkgconfig_unset(${_prefix}_CFLAGS_I) - _pkgconfig_unset(${_prefix}_CFLAGS_OTHER) - _pkgconfig_unset(${_prefix}_STATIC_LIBDIR) - _pkgconfig_unset(${_prefix}_STATIC_LIBS) - _pkgconfig_unset(${_prefix}_STATIC_LIBS_L) - _pkgconfig_unset(${_prefix}_STATIC_LIBS_PATHS) - _pkgconfig_unset(${_prefix}_STATIC_LIBS_OTHER) - _pkgconfig_unset(${_prefix}_STATIC_CFLAGS) - _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_I) - _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_OTHER) - - # create a better addressable variable of the modules and calculate its size - set(_pkg_check_modules_list ${ARGN}) - list(LENGTH _pkg_check_modules_list _pkg_check_modules_cnt) - - if(PKG_CONFIG_EXECUTABLE) - # give out status message telling checked module - if (NOT ${_is_silent}) - if (_pkg_check_modules_cnt EQUAL 1) - message(STATUS "checking for module '${_pkg_check_modules_list}'") - else(_pkg_check_modules_cnt EQUAL 1) - message(STATUS "checking for modules '${_pkg_check_modules_list}'") - endif(_pkg_check_modules_cnt EQUAL 1) - endif(NOT ${_is_silent}) - - set(_pkg_check_modules_packages) - set(_pkg_check_modules_failed) - - # iterate through module list and check whether they exist and match the required version - foreach (_pkg_check_modules_pkg ${_pkg_check_modules_list}) - set(_pkg_check_modules_exist_query) - - # check whether version is given - if (_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") - string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\1" _pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}") - string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\2" _pkg_check_modules_pkg_op "${_pkg_check_modules_pkg}") - string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\3" _pkg_check_modules_pkg_ver "${_pkg_check_modules_pkg}") - else(_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") - set(_pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}") - set(_pkg_check_modules_pkg_op) - set(_pkg_check_modules_pkg_ver) - endif(_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") - - # handle the operands - if (_pkg_check_modules_pkg_op STREQUAL ">=") - list(APPEND _pkg_check_modules_exist_query --atleast-version) - endif(_pkg_check_modules_pkg_op STREQUAL ">=") - - if (_pkg_check_modules_pkg_op STREQUAL "=") - list(APPEND _pkg_check_modules_exist_query --exact-version) - endif(_pkg_check_modules_pkg_op STREQUAL "=") - - if (_pkg_check_modules_pkg_op STREQUAL "<=") - list(APPEND _pkg_check_modules_exist_query --max-version) - endif(_pkg_check_modules_pkg_op STREQUAL "<=") - - # create the final query which is of the format: - # * --atleast-version - # * --exact-version - # * --max-version - # * --exists - if (_pkg_check_modules_pkg_op) - list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_ver}") - else(_pkg_check_modules_pkg_op) - list(APPEND _pkg_check_modules_exist_query --exists) - endif(_pkg_check_modules_pkg_op) - - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_VERSION) - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_PREFIX) - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_INCLUDEDIR) - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_LIBDIR) - - list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_name}") - list(APPEND _pkg_check_modules_packages "${_pkg_check_modules_pkg_name}") - - # execute the query - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} ${_pkg_check_modules_exist_query} - RESULT_VARIABLE _pkgconfig_retval) - - # evaluate result and tell failures - if (_pkgconfig_retval) - if(NOT ${_is_silent}) - message(STATUS " package '${_pkg_check_modules_pkg}' not found") - endif(NOT ${_is_silent}) - - set(_pkg_check_modules_failed 1) - endif(_pkgconfig_retval) - endforeach(_pkg_check_modules_pkg) - - if(_pkg_check_modules_failed) - # fail when requested - if (${_is_required}) - message(SEND_ERROR "A required package was not found") - endif (${_is_required}) - else(_pkg_check_modules_failed) - # when we are here, we checked whether requested modules - # exist. Now, go through them and set variables - - _pkgconfig_set(${_prefix}_FOUND 1) - list(LENGTH _pkg_check_modules_packages pkg_count) - - # iterate through all modules again and set individual variables - foreach (_pkg_check_modules_pkg ${_pkg_check_modules_packages}) - # handle case when there is only one package required - if (pkg_count EQUAL 1) - set(_pkg_check_prefix "${_prefix}") - else(pkg_count EQUAL 1) - set(_pkg_check_prefix "${_prefix}_${_pkg_check_modules_pkg}") - endif(pkg_count EQUAL 1) - - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" VERSION "" --modversion ) - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" PREFIX "" --variable=prefix ) - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" INCLUDEDIR "" --variable=includedir ) - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" LIBDIR "" --variable=libdir ) - - message(STATUS " found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}") - endforeach(_pkg_check_modules_pkg) - - # set variables which are combined for multiple modules - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARIES "(^| )-l" --libs-only-l ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARY_DIRS "(^| )-L" --libs-only-L ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS "" --libs ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS_OTHER "" --libs-only-other ) - - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" INCLUDE_DIRS "(^| )-I" --cflags-only-I ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS "" --cflags ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS_OTHER "" --cflags-only-other ) - endif(_pkg_check_modules_failed) - else(PKG_CONFIG_EXECUTABLE) - if (${_is_required}) - message(SEND_ERROR "pkg-config tool not found") - endif (${_is_required}) - endif(PKG_CONFIG_EXECUTABLE) -endmacro(_pkg_check_modules_internal) - -### -### User visible macros start here -### - -### -macro(pkg_check_modules _prefix _module0) - # check cached value -# if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) - _pkgconfig_parse_options (_pkg_modules _pkg_is_required "${_module0}" ${ARGN}) - _pkg_check_modules_internal("${_pkg_is_required}" 0 "${_prefix}" ${_pkg_modules}) - -# _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) -# endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) -endmacro(pkg_check_modules) - -### -macro(pkg_search_module _prefix _module0) - # check cached value -# if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) - set(_pkg_modules_found 0) - _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required "${_module0}" ${ARGN}) - - message(STATUS "checking for one of the modules '${_pkg_modules_alt}'") - - # iterate through all modules and stop at the first working one. - foreach(_pkg_alt ${_pkg_modules_alt}) - if(NOT _pkg_modules_found) - _pkg_check_modules_internal(0 1 "${_prefix}" "${_pkg_alt}") - endif(NOT _pkg_modules_found) - - if (${_prefix}_FOUND) - set(_pkg_modules_found 1) - endif(${_prefix}_FOUND) - endforeach(_pkg_alt) - - if (NOT ${_prefix}_FOUND) - if(${_pkg_is_required}) - message(SEND_ERROR "None of the required '${_pkg_modules_alt}' found") - endif(${_pkg_is_required}) - endif(NOT ${_prefix}_FOUND) - -# _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) -# endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) -endmacro(pkg_search_module) - -### Local Variables: -### mode: cmake -### End: diff --git a/app/bin/CMakeLists.txt b/app/bin/CMakeLists.txt index ee0886d..74b1bc8 100644 --- a/app/bin/CMakeLists.txt +++ b/app/bin/CMakeLists.txt @@ -42,18 +42,6 @@ SET(LIN_SOURCES GET_TARGET_PROPERTY(genhelp_EXE genhelp LOCATION) -IF(XTRKCAD_USE_GETTEXT) - SET(GENHELP_OPTS "-bhi") - # - # Find the GnuWin32 installation directory, the gettext include should be located in subdir include - # - IF(WIN32) - ADD_DEFINITIONS(-DUSE_SIMPLE_GETTEXT ) - ENDIF(WIN32) -ELSE(XTRKCAD_USE_GETTEXT) - SET(GENHELP_OPTS "-bh") -ENDIF(XTRKCAD_USE_GETTEXT) - ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/bllnhlp.c DEPENDS genhelp ${help_SOURCE_DIR}/genhelp.in @@ -62,8 +50,11 @@ ADD_CUSTOM_COMMAND( SET(SOURCES ${LIN_SOURCES} + appdefaults.c bllnhlp.c + cbezier.c cblock.c + ccornu.c ccurve.c ccontrol.c cdraw.c @@ -115,12 +106,16 @@ SET(SOURCES elev.c fileio.c i18n.c + layout.c lprintf.c macro.c misc2.c param.c + paths.c shrtpath.c smalldlg.c + tbezier.c + tcornu.c tcurve.c tease.c track.c @@ -134,12 +129,6 @@ INCLUDE_DIRECTORIES(${XTrkCAD_BINARY_DIR}) INCLUDE_DIRECTORIES(${help_BINARY_DIR}) INCLUDE_DIRECTORIES(${wlib_SOURCE_DIR}/include) -# find libintl.h and use it -find_path ( INTL_PATH libintl.h ) -if(INTL_PATH) - INCLUDE_DIRECTORIES(${INTL_PATH}) -endif(INTL_PATH) - LINK_DIRECTORIES(${GTK_LIBRARY_DIRS}) LINK_DIRECTORIES(${GTK_WEBKIT_LIBRARY_DIRS}) @@ -149,12 +138,13 @@ ADD_LIBRARY(xtrkcad-lib ${SOURCES}) ADD_DEPENDENCIES(xtrkcad-lib Help) ADD_EXECUTABLE(xtrkcad WIN32 - misc.c + misc.c xtrkcad.rc ) TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-lib) TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-wlib) -target_link_libraries(xtrkcad dynstring) +TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-cornu) +TARGET_LINK_LIBRARIES(xtrkcad dynstring) ADD_EXECUTABLE(mkturnout ${LIN_SOURCES} diff --git a/app/bin/ChangeLog b/app/bin/ChangeLog deleted file mode 100644 index 034812e..0000000 --- a/app/bin/ChangeLog +++ /dev/null @@ -1,495 +0,0 @@ -Apr 28, 2010 - FIX: Daniel Spagnol - i18n.c, misc.c: replaced hard-coded XTRKCAD_LOCALE_DIR path with - 'locale' based on application library directory (XTRKCAD_LOCALE_DIR is - defined at makefiles generation time and does not reflect the place - where the application is actually installed) - -Jan 01, 2010 - FIX: Martin Fischer - custom.c, custom.h: fix compile warnings - -Dec 30, 2009 - FIX: Martin Fischer - misc.c: make load last layout option work - -Dec 29, 2009 - FIX: Martin Fischer - denum.c: remove signed / unsigned mismatch - -Dec 19, 2009 - FIX: Robert Heller - cswitchmotor.c: Patch to fix Visual C++ compile error - -Dec 12, 2009 - FIX: Martin Fischer - draw.c, custom.c: refactoring, move some functionality from the lowlevel - library to the more appropriate core application modules - -Oct 14, 2009 - ENH: Daniel Spagnol - chotbar.c: undone Oct 03, 2009 changes due to gtk+-2.18 fixed it for us. - Actually gtk+-2.18 fixed all surface drawing performance issues for - quartz. - -Oct 09, 2009 - FIX: Daniel Spagnol - denum.c: application crash due to a double value used as a "%*" sprintf - argument. scenario is "Manage" -> "Parts List..." -> "Price" (checkbox). - denum.c: added a character counter function for utf-8 strings - -Oct 04, 2009 - FIX: Martin Fischer - misc2.c: minimum radius is correctly changed - -Oct 03, 2009 - FIX: Daniel Spagnol - chotbar.c: hotbar redraw too slow under gtk-quartz - -Sep 21, 2009 - ENH: Martin Fischer - custom.c, misc.c, param.c, param.h, smalldlg.c smalldlg.h: - New 'About' dialog - -Sep 16, 2009 - FIX: Martin Fischer - cblock.c, cswitchmotor.c: remove some unused locals - -Aug 16, 2009 - FIX: Martin Fischer - CMakeLists.txt cprint.c denum.c i18n.c i18n.h misc.c - Improve internationalization support, use simple gettext on Win32 - -Aug 16, 2009 - FIX: Martin Fischer - custom.c cturnout.c: Code cleanup - -Jul 30, 2009 - FIX: Martin Fischer - dcustmgm.c: set locale when exporting to parameter - -Jul 24, 2009 - ENH: Martin Fischer - misc.c: add command line option for configuration - file selection - -Jul 10, 2009 - ENH: Martin Fischer - misc.c: use getopt() for access to command line arguments - -Jul 09, 2009 - FIX: Martin Fischer - custom.c, misc.c, denum.c, doption.c: remove some - obsolete flags - -Jul 08, 2009 - FIX: Martin Fischer - cblock.c, cswitchmotor.c: make compile under MSVC - -Jul 08, 2009 - ENH: Robert Heller - cblock.c, cswitchmotor.c: new functionality for layout - control: blocks and switchmotors - -Version 4.0.3a -============== - -Jul 05, 2009 - FIX: Martin Fischer - track.c: Bug fix #2816663: Block gaps are not printed - -Jul 01, 2009 - FIX: Martin Fischer - CMakeList.txt: remove dependency from unneeded cmisc2.c - -Jun 26, 2009 - FIX: Martin Fischer - custom.c: correct handling of export file extensions - -Jun 20, 2009 - FIX: Martin Fischer - ctodesgn.c: convert roadbed width as necessary - (Robert Myers) - -Jun 15, 2009 - FIX: Martin Fischer - tcurve.c, drawgeom.c: fix variable initialization - problems. - -Jun 14, 2009 - FIX: Martin Fischer - macro.c: make demos work again with new dialogs - -Jun 13, 2009 - FIX: Martin Fischer - dlayer.c: "changed" state of layout is updated with - layer changes. (DonDASA) - -Version 4.0.3 -============= - -Jun 10, 2009 - FIX: Martin Fischer - ctodesgn.c: remove unneeded local variables - -Jun 08, 2009 - FIX: Martin Fischer - draw.c: no tooltip for the main drawing area - -Jun 06, 2009 - FIX: Martin Fischer - draw.c: fix compiler warning - -May 26, 2009 - ENH: Martin Fischer - ctrain.c: update icons - -May 25, 2009 - ENH: Martin Fischer - ctrain.c: change default for train running to 'Go' - beautify throttle slider - -May 25, 2009 - ENH: Martin Fischer - cturnout.c, track.c, track.h,utility.c, cparalle.c - parallel command also works for straight pieces of - sectional track - -May 15, 2009 - ENH: Martin Fischer - macro.c, misc.c: more message boxes with icon - -May 08, 2009 - ENH: Martin Fischer - fileio.c, misc.c: use new message box with icon - - -Oct 11, 2008 - FIX: Martin Fischer - draw.h: fixed prototype for DoZoom as suggested by - Stefan Gruenendahl - -Sep 05, 2008 - ENH: Martin Fischer - misc.c, cselect.c, track.c: create full partlist - when no track is selected - -Sep 01, 2008 - ENH: Martin Fischer - misc.c, common.h: add new toolbar icons for file ops - -Aug 29, 2008 - FIX: Martin Fischer - draw.c: fixed bug #1821257: no zoom larger than 1:1 - -Jul 11, 2008 - FIX: Martin Fischer - misc.c: update map on loading initial layout - -Jul 10, 2008 - ENH: Martin Fischer - misc.c, misc.h, draw.c: allow user to cancel close request - -Jun 04, 2008 - FIX: Martin Fischer - cselect.c: Rescale dialog wasn't updated correctly - misc2.c: fixed bug when rescale same piece several times - -Jun 03. 2008 - FIX: Martin Fischer - CMakeLists.txt: find getext on Win32 - -Jun 03, 2008 - FIX: Martin Fischer - cselect.c: fixed bug when rescale same piece several times - csnap.c: initialize grid spacing value - -Apr 13, 2008 - ENH: Bob Blackwell - ctrain.c: updated label text - -Mar 27, 2008 - FIX: Martin Fischer - csnap.c: working default value for grid spacing - -Mar 21, 2008 - FIX: Bob Blackwell - doption.c: uppdated labels in option dialogs - -Mar 18, 2008 - FIX: Bob Blackwell - doption.c: rearrange option settings in display / command / preferences - dialog - -Feb 04, 2008 - FIX: Martin Fischer - CMakeLists.txt: Fix missing icon problem for Windows exe - -Feb 04, 2008 - FIX: Mikko Nissinen - misc.c: Fixed an internationalization bug in MenuPlayback. - -Feb 04, 2008 - FIX: Mikko Nissinen - cnote.c: Minor fix to internationalization. - -Feb 03, 2008 - ENH: Martin Fischer - cprint.c: printout of date is correctly localized now. - -Feb 03, 2008 - ENH: Martin Fischer - misc.c, misc.h doption.c: on startup last file can now be loaded automatically. - This behavior is controled by an option in the preferences dialog. - -Jan 28, 2008 - FIX: Mikko Nissinen - misc.c: Product name changed in font selection dialog. - -Jan 28, 2008 - FIX: Mikko Nissinen - common.c: Dynamically allocate and form some global translatable - strings. - -Jan 27, 2008 - FIX: Mikko Nissinen - macro.c: String XTrkCad changed to XTrackCAD. - -Jan 27, 2008 - FIX: Martin Fischer - misc.c, fileio.c: fixed product name - -Jan 27, 2008 - FIX: Martin Fischer - dcar.c: corrected problem in CarPartWrite() - -Jan 25, 2008 - FIX: Martin Fischer - custom.c, version.h: Changed product name to XTrackCAD and version - to 4.1.0b1 - -Jan 23, 2008 - FIX: Mikko Nissinen - ctodesgn.c: Removed '_()' around turnout label from InitNewTurn() - and ShowTurnoutDesigner(). - dcustmgm.c: Saving custom stuff in demo mode changed the locale - to "C" without restoring it back to original. - -Jan 23, 2008 - FIX: Martin Fischer - fileio.c: increase precision for roomsize to 6 digits . - -Jan 23, 2008 - FIX: Mikko Nissinen - param.c: ParamPlayback(): If parameter type is PD_FLOAT, then use the - locale "C" during atof(). - -Jan 22, 2008 - ENH: Mikko Nissinen - misc.c: Save user locale when program initializes. - macro.c: Gettext support added. - -Jan 21, 2008 - ENH: Mikko Nissinen - Gettext support added. The following 48 files were modified: - ccurve.c, cdraw.c, celev.c, cgroup.c, chndldto.c, cjoin.c, cmisc.c, - cmisc2.c, cmodify.c, cnote.c, compound.c, cparalle.c, cpull.c, - cruler.c, cselect.c, csnap.c, csplit.c, cstraigh.c, cstruct.c, - ctext.c, ctodesgn.c, ctrain.c, cturnout.c, cturntbl.c, cundo.c, - custom.c, dbench.c, dbitmap.c, dcar.c, dcmpnd.c, dcustmgm.c, dease.c, - denum.c, dlayer.c, doption.c, dpricels.c, dprmfile.c, draw.c, - drawgeom.c, misc2.c, param.c, smalldlg.c, tcurve.c, tease.c, track.c, - tstraigh.c - -Jan 18, 2008 - FIX: Mikko Nissinen - dcar.c: CarInvSaveText() Car list text file is now created to - selected path instead of current working directory. - -Jan 15, 2008 - IMPROVEMENT: Mikko Nissinen - Basic gettext support added. Gettext is initialized in misc.c:wMain(). - The initialization routine is defined in i18n.[ch] along with all - other gettext definitions. - CMakeLists.txt - fileio.[ch] - i18n.[ch] - misc.c - Also the following CMakeLists were modified for gettext: - xtrkcad/CMakeLists.txt - xtrkcad/app/CMakeLists.txt - xtrkcad/app/help/CMakeLists.txt - xtrkcad/app/i18n/CMakeLists.txt (Initial import) - xtrkcad/app/wlib/gtklib/CMakeLists.txt - -Dec 13, 2007 - FIX: Martin Fischer - fileio.c: fixed segfault when locale is saved - -Dec. 12. 2007 - FIX: Martin Fischer - dlayer.c: layers lists are updated properly after file is loaded - fileio.c: fixed segfault when locale is saved - Makefile: updated dependencies for dlayer.c - -Dec 08, 2007 - FIX: Martin Fischer - xtrkcad.ico: create a new color icon - -Dec. 01, 2007 - BUGFIX: Martin Fischer - acclkeys.h: removed non-working accelerator key for deselect all - -Nov. 30, 2007 - FIX: Timothy M. Shead - misc.c: make sure that font initialization is run first - -Oct 29, 2007 - BUGFIX: Martin Fischer - dlayer.c: Shortened button text to 'Defaults' - -Oct 10, 2007 - BUGFIX: Martin Fischer - csnap.c cprint.c, misc.c: Accelerator keys for Print and - Snap Grid Dialog work again. - -Oct 10, 2007 - BUGFIX: Martin Fischer - acclkeys.h: Revert and Redo used the same accelerator key. - Fixed, Revert doesn't have an acclerator now. - -Sep 28, 2007 - IMPROVEMENT: Martin Fischer - misc.c, smalldlg.c: Use large message for tip of the day - teaser line. Changed to a more generous spacing in dialogs. - -Sep 23, 2007 - IMPROVEMENT: Martin Fischer - misc.c, smalldlg.c: separated tip window code into new - source file. Slightly improved the "tip of the day" dialog - (jump to next and prev tip). - -Sep 15, 2007 - IMPROVEMENT: Martin Fischer - misc.c: XTrkCad now has a real splash window during startup - -Jul 22, 2007 - IMPROVEMENT: Martin Fischer - draw.c: the mouse wheel can be used for zooming in and out - -Jun 27, 2007 - IMPROVEMENT: Martin Fischer - dlayer.c: some cleanup and modified layer buttons. Also all - layer buttons where moved to the bitmaps directory. - -Jun 16, 2007 - IMPROVEMENT: Martin Fischer - fileio.c: default directory for storing files is the user's - home directory now. - -Jun 15, 2007 - BUGFIX: Martin Fischer - dlayer.c: fixed function prototype for Windows compile - -Jun 15, 2007 - IMPROVEMENT: Martin Fischer - dlayer.c: layer buttons now are push buttons that are in - 'pressed' state when layer is visible. - -Jun 15, 2007 - IMPROVEMENT: Martin Fischer - dlayer.c, fileio.c, misc.c: settings for the layers can now - be saved in the preferences. On opening a new layout or upon - startup of XTrkCad these settings are automatically loaded. - -May 18, 2007 - - IMPROVEMENT: Martin Fischer - draw.c misc.c: disable zoom up and zoom down buttons when - end of list is reached - -Apr 30, 2007 - - IMPROVEMENT: Martin Fischer - draw.c, misc.c, draw.h: use radio buttons for selecting zoom factor - zoom in and out goes through all available zoom factors step by step - setting zoom is available from the pulldown menu as well - -Apr 11, 2007 - - IMPROVEMENT: Martin Fischer - draw.c: changed layout of status bar to include labels. - Part count is no longer shown. - -Feb 23, 2007 - BUGFIX: Martin Fischer - cmisc.c, cselect.c rescale / resize works again. UI change to - allow changing scale and gauge independently - -Feb 16, 2007 - - IMPROVEMENT: Martin Fischer - Recently used files list is only updated after successful load - - -Version 4.0.1 -============= - -May 26th, 2006 - - IMPROVEMENT: Martin Fischer - Visual Studio C++ 2005 Express is now supported under Windows - -Mar 26th, 2006 - - IMPROVEMENT: Martin Fischer - misc.c, fileio,c, draw.c If the application crashed the user can decide - to resume work at the last state saved in a checkpoint file - checkpoint files (ckp and ck1) are removed on normal exit - -Mar 25th, 2006 - - BUGFIX: Martin Fischer - misc2.c prevent warning in DoSetScaleDesc - -Mar 02nd, 2006 - - IMPROVEMENT: Martin Fischer - cturnout.c Improvements to the select turnout dialog, new turnout is drawn - blue - -Feb. 26th, 2006 - - NEW FEATURE: Martin Fischer - misc.c, cselect.c, 'Select orphaned track' command added to set all - unconnected track pieces. - -Feb, 22nd, 2006 - - NEW FEATURE: Martin Fischer - misc.c, misc2.c, doption.c Scale and gauge are two independant seetings - now. - - NEW FEATURE: Martin Fischer - misc.c, cselect.c Add new function 'Invert Selection' which inverts - the selection state of all visible objects on the layout - - NEW FEATURE: Martin Fischer - misc.c Add new function 'Revert' to main menu, implemented in ChkRevert - acclkeys.h Added Ctrl-r as accelerator for 'Revert' - - IMPROVEMENT: Martin Fischer - cselect.c Optimized performance for 'Select Connected' operation - - IMPROVEMENT: Martin Fischer - bllnhelp.c: removed inconsistencies in usage of 'track' and 'object' - - IMPROVEMENT: Martin Fischer - misc.c: moved 'Join' command to 'Change' menu - - BUGFIX: Martin Fischer - fileio.c Setting locale to portable 'C' before reading/writing parameters - and trackplans to prevent problems with locales that use comma as decimal - separator ( eg. Germany ) - - BUGFIX: diff --git a/app/bin/acclkeys.h b/app/bin/acclkeys.h index 09bd9bb..1cbdf00 100644 --- a/app/bin/acclkeys.h +++ b/app/bin/acclkeys.h @@ -30,6 +30,7 @@ /* commands */ #define ACCL_DESCRIBE (WCTL+'?') #define ACCL_SELECT (WCTL+'e') +#define ACCL_PAN (WCTL+'/') #define ACCL_STRAIGHT (WCTL+'g') #define ACCL_CURVE1 (WCTL+'4') #define ACCL_CURVE2 (WCTL+'5') @@ -38,6 +39,7 @@ #define ACCL_CIRCLE1 (WCTL+'8') #define ACCL_CIRCLE2 (WCTL+'9') #define ACCL_CIRCLE3 (WCTL+'0') +#define ACCL_BEZIER (0) #define ACCL_TURNOUT (WCTL+'t') #define ACCL_TURNTABLE (WCTL+WSHIFT+'n') #define ACCL_PARALLEL (WCTL+WSHIFT+'p') @@ -70,6 +72,7 @@ #define ACCL_DRAWFILLCIRCLE1 (WALT+WCTL+'8') #define ACCL_DRAWFILLCIRCLE2 (WALT+WCTL+'9') #define ACCL_DRAWFILLCIRCLE3 (WALT+WCTL+'0') +#define ACCL_DRAWBEZLINE (0) #define ACCL_DRAWBOX (WCTL+WSHIFT+'[') #define ACCL_DRAWFILLBOX (WALT+WCTL+'[') #define ACCL_DRAWPOLYLINE (WCTL+WSHIFT+'2') diff --git a/app/bin/appdefaults.c b/app/bin/appdefaults.c new file mode 100644 index 0000000..a2dd885 --- /dev/null +++ b/app/bin/appdefaults.c @@ -0,0 +1,435 @@ +/** \file appdefaults.c +* Provide defaults, mostly for first run of the program. +*/ + +/* XTrkCad - Model Railroad CAD +* Copyright (C) 2017 Martin Fischer +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include +#include +#include +#include +#include + +#ifdef WINDOWS +#include +#include +#endif + +#include "common.h" +#include "custom.h" +#include "fileio.h" +#include "paths.h" +#include "wlib.h" + +enum defaultTypes { + INTEGERCONSTANT, + FLOATCONSTANT, + STRINGCONSTANT, + INTEGERFUNCTION, + FLOATFUNCTION, + STRINGFUNCTION +}; + +struct appDefault { + char *defaultKey; /**< the key used to access the value */ + bool wasUsed; /**< value has already been used on this run */ + enum defaultTypes + valueType; /**< type of default, constant or pointer to a function */ + union { + int intValue; + double floatValue; + char *stringValue; + int (*intFunction)(struct appDefault *, void *); + double (*floatFunction)(struct appDefault *, void *); + char *(*stringFunction)(struct appDefault *, void *); + } defaultValue; + void *additionalData; +}; + +static int GetLocalMeasureSystem(struct appDefault *ptrDefault, + void *additionalData); +static int GetLocalDistanceFormat(struct appDefault *ptrDefault, + void *additionalData); +static char *GetLocalPopularScale(struct appDefault *ptrDefault, + void *additionalData); +static double GetLocalRoomSize(struct appDefault *ptrDefault, + void *additionalData); +static char *GetParamFullPath(struct appDefault *ptrDefault, + void *additionalData); +static char *GetParamPrototype(struct appDefault *ptrDefault, + void *additionalData); + +/** + * List of application default settings. As this is searched by binary search, the list has to be kept sorted + * alphabetically for the key, the first element + * Also the search is case sensitive on this field. + */ + +struct appDefault xtcDefaults[] = { + { "DialogItem.cmdopt-preselect", 0, INTEGERCONSTANT,{ .intValue = 1 } }, /**< default command is select */ + { "DialogItem.grid-horzenable", 0, INTEGERCONSTANT, { .intValue = 0 }}, + { "DialogItem.grid-vertenable", 0, INTEGERCONSTANT,{ .intValue = 0 } }, + { "DialogItem.pref-dstfmt", 0, INTEGERFUNCTION,{ .intFunction = GetLocalDistanceFormat } }, /**< number format for distances */ + { "DialogItem.pref-units", 0, INTEGERFUNCTION,{ .intFunction = GetLocalMeasureSystem } }, /**< default unit depends on region */ + { "DialogItem.rgbcolor-exception", 0, INTEGERCONSTANT, { .intValue = 15923462 }}, /**< rich yellow as exception color */ + { "Parameter File Map.British stock", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "br.xtp" }, + { "Parameter File Map.European stock", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "eu.xtp" }, + { "Parameter File Map.NMRA RP12-25 Feb 2015 O scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-o.xtp" }, + { "Parameter File Map.NMRA RP12-27 Feb 2015 S Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-s.xtp" }, + { "Parameter File Map.NMRA RP12-31 Feb 2015 HO Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-ho.xtp" }, + { "Parameter File Map.NMRA RP12-33 Feb 2015 TT Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-tt.xtp" }, + { "Parameter File Map.NMRA RP12-35 Feb 2015 N Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-n.xtp" }, + { "Parameter File Map.NMRA RP12-37 Feb 2015 Z scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-z.xtp" }, + { "Parameter File Map.North American Prototypes", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "protoam.xtp" }, + { "Parameter File Map.Trees", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath } , "trees.xtp" }, + { "Parameter File Names.File1", 0, STRINGFUNCTION,{ .stringFunction = GetParamPrototype }}, + { "Parameter File Names.File2", 0, STRINGCONSTANT,{ .stringValue = "Trees" } }, + { "Parameter File Names.File3", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-37 Feb 2015 Z scale Turnouts" } }, + { "Parameter File Names.File4", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-35 Feb 2015 N Scale Turnouts" } }, + { "Parameter File Names.File5", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-33 Feb 2015 TT Scale Turnouts" } }, + { "Parameter File Names.File6", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-31 Feb 2015 HO Scale Turnouts" } }, + { "Parameter File Names.File7", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-27 Feb 2015 S Scale Turnouts" } }, + { "Parameter File Names.File8", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-25 Feb 2015 O scale Turnouts" } }, + { "draw.roomsizeX", 0, FLOATFUNCTION, {.floatFunction = GetLocalRoomSize }}, /**< layout width */ + { "draw.roomsizeY", 0, FLOATFUNCTION,{ .floatFunction = GetLocalRoomSize } }, /**< layout depth */ + { "misc.scale", 0, STRINGFUNCTION, { .stringFunction = GetLocalPopularScale}}, /**< the (probably) most popular scale for a region */ +}; + +#define DEFAULTCOUNT (sizeof(xtcDefaults)/sizeof(xtcDefaults[0])) + + +static long bFirstRun; /**< TRUE if appl is run the first time */ +static char regionCode[3]; /**< will be initialized to the locale's region code */ + +static wBool_t(*GetIntegerPref)(const char *, const char *, long *, long) = wPrefGetIntegerExt; /**< pointer to active integer pref getter */ +static wBool_t(*GetFloatPref)(const char *, const char *, double *, double) = wPrefGetFloatExt; /**< pointer to active float pref getter */ +static char *(*GetStringPref)(const char *, const char *) = wPrefGetStringExt; /**< pointer to active string pref getter */ + +/** + * A recursive binary search function. It returns location of x in + * given array arr[l..r] is present, otherwise -1 + * Taken from http://www.geeksforgeeks.org/binary-search/ and modified + * + * \param arr IN array to search + * \param l IN starting index + * \param r IN highest index in array + * \param key IN key to search + * \return index if found, -1 otherwise + */ + +static int binarySearch(struct appDefault arr[], int l, int r, char *key) +{ + if (r >= l) { + int mid = l + (r - l) / 2; + int res = strcmp(key, arr[mid].defaultKey); + + // If the element is present at the middle itself + if (!res) { + return mid; + } + + // If the array size is 1 + if (r == 0) { + return -1; + } + + // If element is smaller than mid, then it can only be present + // in left subarray + if (res < 0) { + return binarySearch(arr, l, mid - 1, key); + } + + // Else the element can only be present in right subarray + return binarySearch(arr, mid + 1, r, key); + } + + // We reach here when element is not present in array + return -1; +} + +/** + * Lookup default for a value + * + * \param defaultValues IN array of all default values + * \param section IN default's section + * \param name IN default's name + * \return pointer to default if found, NULL otherwise + */ +struct appDefault * +FindDefault(struct appDefault *defaultValues, const char *section, + const char *name) +{ + char *searchString = malloc(strlen(section) + strlen(name) + + 2); //includes separator and terminating \0 + int res; + sprintf(searchString, "%s.%s", section, name); + + res = binarySearch(defaultValues, 0, DEFAULTCOUNT-1, searchString); + free(searchString); + + if (res != -1 && defaultValues[res].wasUsed == FALSE) { + defaultValues[res].wasUsed = TRUE; + return (defaultValues + res); + } else { + return (NULL); + } +} +/** + * Get the application's default region code. On Windows, the system's API is used. + * On *ix the environment variable LANG is supposed to contain a value in the + * format ll_RR* where rr is the two character region code. + */ +static void +InitializeRegionCode(void) +{ + strcpy(regionCode, "US"); + +#ifdef WINDOWS + { + LCID lcid; + char iso3166[10]; + + lcid = GetThreadLocale(); + GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, iso3166, sizeof(iso3166)); + strncpy(regionCode, iso3166, 2); + } +#else + { + char *pLang; + pLang = getenv("LANG"); + + if (pLang) { + char *ptr; + ptr = strpbrk(pLang, "_-"); + + if (ptr) { + strncpy(regionCode, ptr + 1, 2); + } + } + } +#endif +} + +/** + * For the US the classical 4x8 sheet is used as default size. in the metric world 1,25x2,0m is used. + */ + +static double +GetLocalRoomSize(struct appDefault *ptrDefault, void *data) +{ + if (!strcmp(ptrDefault->defaultKey, "draw.roomsizeY")) { + return (strcmp(regionCode, "US") ? 125.0/2.54 : 48); + } + + if (!strcmp(ptrDefault->defaultKey, "draw.roomsizeX")) { + return (strcmp(regionCode, "US") ? 200.0 / 2.54 : 96); + } + + return (0.0); // should never get here +} + +/** + * The most popular scale is supposed to be HO except for UK where OO is assumed. + */ + +static char * +GetLocalPopularScale(struct appDefault *ptrDefault, void *data) +{ + return (strcmp(regionCode, "GB") ? "HO" : "OO"); +} + +/** + * The measurement system is english for the US and metric elsewhere + */ +static int +GetLocalMeasureSystem(struct appDefault *ptrDefault, void *data) +{ + return (strcmp(regionCode, "US") ? 1 : 0); +} + +/** +* The distance format is 999.9 cm for metric and ?? for english +*/ +static int +GetLocalDistanceFormat(struct appDefault *ptrDefault, void *data) +{ + return (strcmp(regionCode, "US") ? 8 : 5); +} + +/** +* Prototype definitions currently only exist for US and British. So US +* is assumed to be the default. +*/ + +static char* +GetParamPrototype(struct appDefault *ptrDefault, void *additionalData) +{ + return (strcmp(regionCode, "GB") ? "North American Prototypes" : "British stock"); +} + +/** + * The full path to the applications parameter directory + */ +static char * +GetParamFullPath(struct appDefault *ptrDefault, void *additionalData) +{ + char *str; + MakeFullpath(&str, libDir, PARAM_SUBDIR, (char*)additionalData, (void *)0); + return str; +} + + +/** + * The following are three jump points for the correct implementation. Changing the funtion pointer + * allows to switch from the extended default version to the basic implementation. + */ + +wBool_t +wPrefGetInteger(const char *section, const char *name, long *result, long defaultValue) +{ + return GetIntegerPref(section, name, result, defaultValue); +} + +wBool_t +wPrefGetFloat(const char *section, const char *name, double *result, double defaultValue) +{ + return GetFloatPref(section, name, result, defaultValue); +} + +char * +wPrefGetString(const char *section, const char *name) +{ + return GetStringPref(section, name); +} + +/** + * Get an integer value from the configuration file. The is a wrapper for the real + * file access and adds a region specific default value. + * + * \param section IN section in config file + * \param name IN name in config file + * \param result OUT pointer to result + * \param defaultValue IN the default value to use if config is not found + * \return returncode of wPrefGetIntegerBasic() + */ +wBool_t +wPrefGetIntegerExt(const char *section, const char *name, long *result, + long defaultValue) +{ + struct appDefault *thisDefault; + + thisDefault = FindDefault(xtcDefaults, section, name); + + if (thisDefault) { + if (thisDefault->valueType == INTEGERCONSTANT) { + defaultValue = thisDefault->defaultValue.intValue; + } else { + defaultValue = (thisDefault->defaultValue.intFunction)(thisDefault, + thisDefault->additionalData); + } + } + + return (wPrefGetIntegerBasic(section, name, result, defaultValue)); +} + +/** + * Get a float value from the configuration file. The is a wrapper for the real + * file access and adds a region specific default value. + * + * \param section IN section in config file + * \param name IN name in config file + * \param result OUT pointer to result + * \param defaultValue IN the default value to use if config is not found + * \return returncode of wPrefGetFloatBasic() + */ + +wBool_t +wPrefGetFloatExt(const char *section, const char *name, double *result, + double defaultValue) +{ + struct appDefault *thisDefault; + + thisDefault = FindDefault(xtcDefaults, section, name); + + if (thisDefault) { + if (thisDefault->valueType == FLOATCONSTANT) { + defaultValue = thisDefault->defaultValue.floatValue; + } else { + defaultValue = (thisDefault->defaultValue.floatFunction)(thisDefault, + thisDefault->additionalData); + } + } + + return (wPrefGetFloatBasic(section, name, result, defaultValue)); +} + +/** + * Get a string from the configuration file. The is a wrapper for the real + * file access and adds a region specific default value. + * + * \param section IN section in config file + * \param name IN name in config file + * \return returncode of wPrefGetStringBasic() + */ +char * +wPrefGetStringExt(const char *section, const char *name) +{ + struct appDefault *thisDefault; + + thisDefault = FindDefault(xtcDefaults, section, name); + + if (thisDefault) { + char *prefString; + char *defaultValue; + + if (thisDefault->valueType == STRINGCONSTANT) { + defaultValue = thisDefault->defaultValue.stringValue; + } else { + defaultValue = (thisDefault->defaultValue.stringFunction)(thisDefault, + thisDefault->additionalData); + } + + prefString = (char *)wPrefGetStringBasic(section, name); + return (prefString ? prefString : defaultValue); + } else { + return ((char *)wPrefGetStringBasic(section, name)); + } +} + +/** + * Initialize the application default system. The flag firstrun is used to find + * out whether the application was run before. This is accomplished by trying + * to read it from the configuration file. As it is only written after this + * test, it can never be found on the first run of the application ie. when the + * configuration file does not exist yet. + */ + +void +InitAppDefaults(void) +{ + wPrefGetIntegerBasic( "misc", "firstrun", &bFirstRun, TRUE); + if (bFirstRun) { + wPrefSetInteger("misc", "firstrun", FALSE); + InitializeRegionCode(); + } else { + GetIntegerPref = wPrefGetIntegerBasic; + GetFloatPref = wPrefGetFloatBasic; + GetStringPref = wPrefGetStringBasic; + } +} diff --git a/app/bin/bdf2xtp.c b/app/bin/bdf2xtp.c index adc2b04..76fb31a 100644 --- a/app/bin/bdf2xtp.c +++ b/app/bin/bdf2xtp.c @@ -134,21 +134,17 @@ double findDistance( coOrd p0, coOrd p1 ) int small(double v ) /* is close to 0.0 */ { - return (fabs(v) < 0.0001); + return (fabs(v) < 0.000000000001); } double findAngle( coOrd p0, coOrd p1 ) /* find angle between two points */ { double dx = p1.x-p0.x, dy = p1.y-p0.y; - if (small(dx)) { - if (dy >=0) return 0.0; + if (small(dx) && small(dy)) { + if (dy >=0.0) return 0.0; else return 180.0; } - if (small(dy)) { - if (dx >=0) return 90.0; - else return 270.0; - } return R2D(atan2( dx,dy )); } diff --git a/app/bin/bitmaps/bezier.xpm b/app/bin/bitmaps/bezier.xpm new file mode 100644 index 0000000..6c592ed --- /dev/null +++ b/app/bin/bitmaps/bezier.xpm @@ -0,0 +1,23 @@ +/* XPM */ +static char * bezier_xpm[] = { +"16 16 4 1", +" c None", +"! c #000000000000", +"# c #FFFF00000000", +"$ c #808080000000", +" ### !!!!", +" # #########", +" ### !! !", +" $!! $!!!", +" !!$$ !! !", +" !! $!$ !", +" $$ !! !! $ ", +" !!!!!!! ", +" !! ! $$ ", +" $!! !! ", +"! !$$!! ", +"! ! $! ", +"!!!$ !!$ ", +"! !! ### ", +"######### # ", +"!!!! ### "}; \ No newline at end of file diff --git a/app/bin/bitmaps/dbezier.xpm b/app/bin/bitmaps/dbezier.xpm new file mode 100644 index 0000000..1bf366f --- /dev/null +++ b/app/bin/bitmaps/dbezier.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static char * dbezier_xpm[] = { +"16 16 3 1", +" c None", +"! c #000000000000", +"# c #FFFF00000000", +" ### ", +" # ########", +" ### !!!!", +" !!!! ", +" !!!! ", +" !!! ", +" !!! ", +" !! ", +" !!! ", +" !! ", +" !!! ", +" !!! ", +" !!! ", +"!!!! ### ", +"######## # ", +" ### "}; \ No newline at end of file diff --git a/app/bin/bitmaps/ecornu.xpm b/app/bin/bitmaps/ecornu.xpm new file mode 100644 index 0000000..e32e56a --- /dev/null +++ b/app/bin/bitmaps/ecornu.xpm @@ -0,0 +1,23 @@ +/* XPM */ +static char * ecornu_xpm[] = { +"41 16 4 1", +". c None", +" c #000000000000", +"# c #FFFF00000000", +"$ c #808080000000", +" .................................. .", +" ..................................... ", +" ...... ... .. .. . ... .. .. .", +" .. .. . .... .. . .. .. . .. . .. . .", +" ..... .. .. .. . .. .. . . .. . .", +" ..... .. .... . .... .. .. . .... .. . .", +" .. . ... . .. .. .. . .. .. ", +".........................................", +"...$$$...###.....................$$$$$...", +"..$...$.#...#................$$$$.....$..", +".$..$..$#......##..###..###$$#..#.$$$..$.", +"$..$.$..#.....#..#.#$$#$#..#.#..#$...$..$", +"$..$...$#.....#$$#$#....#..#.#..#..$.$..$", +".$..$$$.#..$#$#..#.#....#..#.#..#$..$..$.", +"..$.....$###...##..#....#..#..##..$...$..", +"...$$$$$...........................$$$..."}; diff --git a/app/bin/bitmaps/eltsharp.xpm b/app/bin/bitmaps/eltsharp.xpm new file mode 100644 index 0000000..70985c1 --- /dev/null +++ b/app/bin/bitmaps/eltsharp.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static char * eltsharp_xpm[] = { +"41 16 2 1", +". c None", +" c #000000000000", +" .................................. .", +" ..................................... ", +" ...... ... .. .. . ... .. .. .", +" .. .. . .... .. . .. .. . .. . .. . .", +" ..... .. .. .. . .. .. . . .. . .", +" ..... . .... . .... .. .. . .... .. . .", +" .. . . ... . .. .. .. . .. .. ", +".........................................", +"..... ...... . ......................", +".... ...... ...... ......................", +"... ....... ...... ... .. .. .....", +".. ......... . .. . .. . .. . .. ....", +"... ............ . .. . .. . .... .. ....", +".... ........... . .. . . . .... .....", +"..... ..... .. .. .. . . .... .......", +"................................. ......."}; diff --git a/app/bin/bitmaps/helix.xpm b/app/bin/bitmaps/helix.xpm deleted file mode 100644 index ba0551e..0000000 --- a/app/bin/bitmaps/helix.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * helix_xpm[] = { -"16 16 2 1", -" c None", -". c #000000000000", -" ", -" ........... ", -" . ", -" . . ", -" . . ", -" .......... ", -" . . ", -" . . ", -" .......... ", -" . . ", -" . . ", -" ......... ", -" . ", -" . ", -" ............ ", -" "}; diff --git a/app/bin/bitmaps/map.xpm b/app/bin/bitmaps/map.xpm new file mode 100644 index 0000000..a1f427a --- /dev/null +++ b/app/bin/bitmaps/map.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static char * map_xpm[] = { +"16 16 3 1", +"o c None", +" c #000000000000", +". c #FFFFFFFFFFFF", +"ooo ooo", +"ooo ooo", +"oo ........ oo", +"oo ........ oo", +"o .......... o", +"o .......... o", +" ...... .... ", +" .... .. ... ", +" .. .. .... .. ", +" ... ...... . ", +" .............. ", +" ", +" ", +"oooooooooooooooo", +"oooooooooooooooo", +"oooooooooooooooo"}; diff --git a/app/bin/bitmaps/pan.xpm b/app/bin/bitmaps/pan.xpm new file mode 100644 index 0000000..8782714 --- /dev/null +++ b/app/bin/bitmaps/pan.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static char * pan_xpm[] = { +"16 16 3 1", +" c None", +". c #000000000000", +"X c #FFFF00000000", +" ", +" XX ", +" XXXX ", +" XXXXXX. ", +" XX XX XX ", +" XX ", +" XX XX XX ", +" XXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXX ", +" XX XX XX ", +" XX ", +" XX XX XX ", +" XXXXXX ", +" XXXX ", +" XX ", +" "}; diff --git a/app/bin/cbezier.c b/app/bin/cbezier.c new file mode 100644 index 0000000..92855c1 --- /dev/null +++ b/app/bin/cbezier.c @@ -0,0 +1,1153 @@ +/** \file cbezier.c + * Bezier Command. Draw or modify a Bezier (Track or Line). + */ + /* XTrkCad - Model Railroad CAD + * + * Cubic Bezier curves have a definitional representation as an a set of four points. + * The first and fourth are the end points, while the middle two are control points. + * The control points positions define the angle at the ends and by their relative positions the overall + * curvature. This representation is a familiar approach for those who know drawing programs such as Adobe + * Illustrator or CorelDraw. + * + * In XTrackCAD, the Bezier form is also represented and drawn as a set of + * joined circular arcs that approximate the Bezier form within a small tolerance. This is because + * many of the operations we need to do are either computationally difficult or + * impossible using the Bezier equations. For example, creating a parallel Bezier + * which is necessary to draw a track with two lines or sleepers has no easy, stable solution. + * But the program is already able to do these tasks for straight lines and curves. + * + * Note that every time we change the Bezier points we have to recalculate the arc approximation, + * but that means that the majority of the time we are using the simpler approximation. + * + * We do not allow Bezier curves that have loops or cusps as they make no sense for tracks and + * can easily be approximated for lines with multiple unaligned Bezier curves. + * + * This program borrows from particular ideas about converting Bezier curves that Pomax placed into + * open source. The originals in Javascript can be found at github.com/Pomax. + * The web pages that explain many other techniques are located at https://pomax.github.io/bezierinfo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + +#include "track.h" +#include "draw.h" +#include "ccurve.h" +#include "cbezier.h" +#include "tbezier.h" +#include "cstraigh.h" +#include "drawgeom.h" +#include "cjoin.h" +#include "i18n.h" +#include "common.h" +#include "wcolors.h" +#include "math.h" +#include "utility.h" +#include "param.h" +#include "fileio.h" +#include "layout.h" +#include "cundo.h" + +extern drawCmd_t tempD; + + +/* + * STATE INFO + */ +enum Bezier_States { NONE, + POS_1, + CONTROL_ARM_1, + POS_2, + CONTROL_ARM_2, + PICK_POINT, + POINT_PICKED, + TRACK_SELECTED }; + +typedef struct { + curveData_t curveData; + double start; + double end; + coOrd pos0; + coOrd pos1; + } bCurveData_t; + +static struct { + enum Bezier_States state; + coOrd pos[4]; + int selectPoint; + wDrawColor color; + DIST_T width; + track_p trk[2]; + EPINX_T ep[2]; + dynArr_t crvSegs_da; + int crvSegs_da_cnt; + trkSeg_t cp1Segs_da[4]; + int cp1Segs_da_cnt; + trkSeg_t cp2Segs_da[4]; + int cp2Segs_da_cnt; + BOOL_T unlocked; + track_p selectTrack; + BOOL_T track; + DIST_T minRadius; + } Da; + + + +/** + * Draw a ControlArm. + * A control arm has two filled or unfilled circles for endpoints and a straight line between them. + * If the end or control point is not selectable we don't mark it with a circle. + * If a selectable end or control point is unlocked place a filled circle on it, otherwise an empty circle. + * A red color indicates that this arm, end or control point is "active" as it was selected. + */ +int createControlArm( + trkSeg_t sp[], //seg pointer for up to 3 trkSegs (ends and line) + coOrd pos0, //end on curve + coOrd pos1, // control point at other end of line + BOOL_T track, // isTrack()? (otherwise Line) + BOOL_T selectable, // can this arm be selected? + BOOL_T cp_direction_locked, //isFixed to track + int point_selected, //number of point 0, 1 or -1 + wDrawColor color //drawColorBlack or drawColorWhite + ) +{ + DIST_T d, w; + d = tempD.scale*0.25; + w = tempD.scale/tempD.dpi; /*double width*/ + sp[0].u.l.pos[0] = pos0; + sp[0].u.l.pos[1] = pos1; + sp[0].type = SEG_STRLIN; + sp[0].width = w; + sp[0].color = (point_selected>=0)?drawColorRed:drawColorBlack; + int n = 0; + if (selectable) { + for (int j=0;j<2;j++) { + if (j==0 && cp_direction_locked) continue; //Don't show select circle if end locked + n++; + sp[n].u.c.center = j==0?pos0:pos1; + sp[n].u.c.radius = d/4; + sp[n].width = w; + sp[n].color = (j==point_selected)?drawColorRed:drawColorBlack; + if (j==point_selected && cp_direction_locked) { + sp[n].type = SEG_FILCRCL; + } else { + sp[n].type = SEG_CRVLIN; + sp[n].u.c.a0 = 0.0; + sp[n].u.c.a1 = 360.0; + } + } + } + return n+1; +} + +coOrd getPoint(coOrd pos[4], double s) { + double mt = 1-s; + double a = mt*mt*mt; + double b = mt*mt*s*3; + double c = mt*s*s*3; + double d = s*s*s; + coOrd ret; + ret.x = a*pos[0].x + b*pos[1].x + c*pos[2].x + d*pos[3].x; + ret.y = a*pos[0].y + b*pos[1].y + c*pos[2].y + d*pos[3].y; + return ret; +} +/* + * Get Error between a Bezier and an arc centered at pc that goes from start to end + * + * Because the curve is defined to pass through the start and the end and the middle, the test is + * to see how much of an error there is between those points. If the sum of the errors is off by more \ + * than 0.5 pixels - that will mean it is not a good fit. + * + */ +double BezError(coOrd pos[4], coOrd center, coOrd start_point, double start, double end) { + double quarter = (end - start) / 4; // take point at 1/4 and 3/4 and check + coOrd c1 = getPoint(pos, start + quarter); + coOrd c2 = getPoint(pos, end - quarter); + double ref = FindDistance(center, start_point); //radius + double d1 = FindDistance(center, c1); // distance to quarter + double d2 = FindDistance(center, c2); // distance to three quarters + return fabs(d1-ref) + fabs(d2-ref); //total error at quarter points +}; + +/* + * Get distance between a point and a line segment + */ + +double DistanceToLineSegment(coOrd p, coOrd l1, coOrd l2) { + double A = p.x - l1.x; + double B = p.y - l1.y; + double C = l2.x - l1.x; + double D = l2.y - l1.y; + + double dot = A * C + B * D; + double len_sq = C * C + D * D; + double param = -1; + if (len_sq != 0) //non 0 length line + param = dot / len_sq; + + double xx, yy; + + if (param < 0) { // zero length line or beyond end use point 1 + xx = l1.x; + yy = l1.y; + } else if (param > 1) { // beyond point 2 end of line segment + xx = l2.x; + yy = l2.y; + } else { // In the middle + xx = l1.x + param * C; + yy = l1.y + param * D; + } + + double dx = p.x - xx; //distance to perpendicular (or end point) + double dy = p.y - yy; + return sqrt(dx * dx + dy * dy); +} + +/* + * Get Error between a straight line segment and the Bezier curve. + * Sum distance to straight line of quarter points. + */ + +double BezErrorLine(coOrd pos[4], coOrd start_point, coOrd end_point, double start, double end) { + double quarter = (end - start) / 4; // take point at 1/4 and 3/4 and check + coOrd c1 = getPoint(pos, start + quarter); + coOrd c2 = getPoint(pos, end - quarter); + double d1 = DistanceToLineSegment(c1, start_point, end_point); + double d2 = DistanceToLineSegment(c2, start_point, end_point); + return fabs(d1)+fabs(d2); +} + +/* + * Add element to DYNARR pointed to by caller from segment handed in + */ +void addSegBezier(dynArr_t * const array_p, trkSeg_p seg) { + trkSeg_p s; + + + DYNARR_APPEND(trkSeg_t, * array_p, 1); //Adds 1 to cnt + s = &DYNARR_N(trkSeg_t,* array_p,array_p->cnt-1); + s->type = seg->type; + s->color = seg->color; + s->width = seg->width; + s->bezSegs.cnt = 0; + if (s->bezSegs.ptr) MyFree(s->bezSegs.ptr); + s->bezSegs.ptr=NULL; + s->bezSegs.max = 0; + if ((s->type == SEG_BEZLIN || s->type == SEG_BEZTRK) && seg->bezSegs.cnt) { + s->u.b.angle0 = seg->u.b.angle0; //Copy all the rest + s->u.b.angle3 = seg->u.b.angle3; + s->u.b.length = seg->u.b.length; + s->u.b.minRadius = seg->u.b.minRadius; + for (int i=0;i<4;i++) s->u.b.pos[i] = seg->u.b.pos[i]; + s->u.b.radius0 = seg->u.b.radius3; + s->bezSegs.cnt = 0; + if (s->bezSegs.ptr) MyFree(s->bezSegs.ptr); + s->bezSegs.max = 0; + s->bezSegs.ptr = NULL; //Make sure new space as addr copied in earlier from seg + for (int i = 0; ibezSegs.cnt; i++) { + addSegBezier(&s->bezSegs,(((trkSeg_p)seg->bezSegs.ptr)+i)); //recurse for copying embedded Beziers as in Cornu joint + } + } else { + s->u = seg->u; + } +} + +enum BezierType {PLAIN, LOOP, CUSP, INFLECTION, DOUBLEINFLECTION, LINE, ENDS, COINCIDENT } bType; + +/* + * Analyse Bezier. + * + * Using results from Maureen C. Stone of XeroxParc and Tony deRose of U of Washington + * characterise the curve type and find out what features it has. + * We will eliminate cusps and loops as not useful forms. Line, Plain, Inflection and DoubleInflection are ok. + * + */ +EXPORT enum BezierType AnalyseCurve(coOrd inpos[4], double *Rfx, double *Rfy, double *cusp) { + + *Rfx = *Rfy = 0; + if (Da.track && inpos[0].x == inpos[3].x && inpos[0].y == inpos[3].y ) { + return ENDS; + } + + DIST_T d01 = FindDistance(inpos[0],inpos[1]); + DIST_T d12 = FindDistance(inpos[1],inpos[2]); + DIST_T d02 = FindDistance(inpos[0],inpos[2]); + if (d01+d12 == d02) { //straight + DIST_T d23 = FindDistance(inpos[2],inpos[3]); + DIST_T d03 = FindDistance(inpos[0],inpos[3]); + if (d02+d23 == d03) return LINE; + } + int common_points = 0; + for (int i=0;i<3;i++) { + if (inpos[i].x == inpos[i+1].x && inpos[i].y == inpos[i+1].y) common_points++; + } + for (int i=0;i<2;i++) { + if (inpos[i].x == inpos[i+2].x && inpos[i].y == inpos[i+2].y) common_points++; + } + + if (common_points>2) { + return COINCIDENT; + } + + coOrd pos[4]; + coOrd offset2, offset = inpos[0]; + + for (int i=0;i<4;i++) { //move to zero origin + pos[i].x = inpos[i].x-offset.x; + pos[i].y = inpos[i].y-offset.y; + } + + offset2.x = -offset.x + pos[3].x; + offset2.y = -offset.y + pos[3].y; + if (pos[1].y == 0.0) { //flip order of points + for (int i=0;i<4;i++) { + coOrd temp_pos = pos[i]; + pos[i].x = pos[3-i].x - offset2.x; + pos[i].y = pos[3-i].y - offset2.y; + pos[3-i] = temp_pos; + } + if (pos[1].y == 0.0) { //Both ways round the second point has no y left after translation + return PLAIN; + } + } + double f21 = (pos[2].y)/(pos[1].y); + double f31 = (pos[3].y)/(pos[1].y); + if (fabs(pos[2].x-(pos[1].x*f21)) <0.0001) return PLAIN; //defend against divide by zero + double fx = (pos[3].x-(pos[1].x*f31))/(pos[2].x-(pos[1].x*f21)); + double fy = f31+(1-f21)*fx; + *Rfx = fx; + *Rfy = fy; + *cusp = fabs(fy - (-(fx*fx)+2*fx+3)/4); + + if (fy > 1.0) return INFLECTION; + if (fx >= 1.0) return PLAIN; + if (fabs(fy - (-(fx*fx)+2*fx+3)/4) <0.100) return CUSP; + if (fy < (-(fx*fx)+2*fx+3)/4) { + if (fx <= 0.0 && fy >= (3*fx-(fx*fx))/3) return LOOP; + if (fx > 0.0 && fy >= (sqrt(3*(4*fx-fx*fx))-fx)/2) return LOOP; + return PLAIN; + } + + return DOUBLEINFLECTION; +} + +/* + * ConvertToArcs + * Take a Bezier curve and turn it into a set of circular arcs, such that the error between the arc and the + * Bezier is under 0.5 pixels at maxiumum zoom. + * + * This enables us to use normal methods (operating over the array of arcs) + * to perform actions on the Bezier and also to export it to DXF. + * + */ +EXPORT BOOL_T ConvertToArcs (coOrd pos[4], dynArr_t * segs, BOOL_T track, wDrawColor color, DIST_T width) { + double t_s = 0.0, t_e = 1.0; + double errorThreshold = 0.05; + bCurveData_t prev_arc; + prev_arc.end = 0.0; + bCurveData_t arc; + segs->cnt = 0; //wipe out + BOOL_T safety; + int col = 0; + + double prev_e = 0.0; + // we do a binary search to find the "good `t` closest to no-longer-good" + do { + safety=FALSE; + // step 1: start with the maximum possible arc length + t_e = 1.0; + // points: + coOrd start_point, mid_point, end_point; + // booleans: + BOOL_T curr_good = FALSE, prev_good = FALSE, done = FALSE; + // numbers: + double t_m, step = 0; + // step 2: find the best possible arc + do { // !done + prev_good = curr_good; //remember last time + t_m = (t_s + t_e)/2; + step++; + start_point = getPoint(pos, t_s); //Start of arc + mid_point = getPoint(pos, t_m); //Middle of trial arc + end_point = getPoint(pos, t_e); //End of trial Arc + + PlotCurve( crvCmdFromChord, start_point, end_point, mid_point, + &(arc.curveData), TRUE ); //Find Arc through three points + + arc.start = t_s; //remember start + arc.end = t_e; //remember end + arc.pos0 = start_point; //remember start point (used for Straight) + arc.pos1 = end_point; // Remember end point (used for Straight) + + if (arc.curveData.type == curveTypeStraight) { + double error = BezErrorLine(pos,start_point,end_point, t_s, t_e); + curr_good = (error <= errorThreshold/2); + arc.curveData.a0 = FindAngle(start_point,end_point); + arc.curveData.a1 = FindAngle(end_point,start_point); + + } else if (arc.curveData.type == curveTypeNone) { + return FALSE; //Something wrong + } else { + double error = BezError(pos, arc.curveData.curvePos, start_point, t_s, t_e); + curr_good = (error <= errorThreshold/2); + }; + + done = prev_good && !curr_good; //Was better than this last time? + if(!done) { + // this arc is fine: we can move 'e' up to see if we can find a wider arc + if(curr_good) { + prev_e = t_e; //remember good end only + prev_arc = arc; + // if e is already at max, then we're done for this arc. + if (t_e >= 1.0) { + // make sure we cap at t=1 + arc.end = prev_e = 1.0; + // if we capped the arc segment to t=1 we also need to make sure that + // the arc's end angle is correct with respect to the bezier end point. + if (t_e > 1.0) { + if (arc.curveData.type != curveTypeStraight) { + coOrd d; + d.x = arc.curveData.curvePos.x + fabs(arc.curveData.curveRadius) * cos(D2R(arc.curveData.a1)); + d.y = arc.curveData.curvePos.y + fabs(arc.curveData.curveRadius) * sin(D2R(arc.curveData.a1)); + + arc.curveData.a1 += FindAngle(d, getPoint(pos,1.0)); + t_e = 1.0; + } + } + prev_arc = arc; + done = TRUE; + break; + } + // if not, move it up by half the iteration distance or to end + t_e = t_e + (t_e-t_s)/2; + if (t_e > 1.0) t_e = 1.0; + } + // this is a bad arc: we need to move 'e' down to find a good arc + else { + t_e = t_m; + } + } // If !Done end + } while(!done && safety++<100); + if(safety>=100) { + return FALSE; //Failed to make into arcs + } + prev_arc = prev_arc.end==0.0?arc:prev_arc; + trkSeg_t curveSeg; //Now set up tempSeg to copy into array + curveSeg.width = track?0:width; + if ( prev_arc.curveData.type == curveTypeCurve ) { + if (track) + curveSeg.color = (fabs(prev_arc.curveData.curveRadius)<(GetLayoutMinTrackRadius()-EPSILON))?wDrawColorRed:wDrawColorBlack; + else + curveSeg.color = color; + curveSeg.type = track?SEG_CRVTRK:SEG_CRVLIN; + curveSeg.u.c.a0 = prev_arc.curveData.a0; + curveSeg.u.c.a1 = prev_arc.curveData.a1; + curveSeg.u.c.center = prev_arc.curveData.curvePos; + if (prev_arc.curveData.negative) + curveSeg.u.c.radius = -prev_arc.curveData.curveRadius; + else + curveSeg.u.c.radius = prev_arc.curveData.curveRadius; + } else { //Straight Line because all points co-linear + curveSeg.type = track?SEG_STRTRK:SEG_STRLIN; + if (track) + curveSeg.color = wDrawColorBlack; + else + curveSeg.color = color; + curveSeg.u.l.angle = prev_arc.curveData.a1; + curveSeg.u.l.pos[0] = prev_arc.pos0; + curveSeg.u.l.pos[1] = prev_arc.pos1; + curveSeg.u.l.option = 0; + } + addSegBezier(segs, &curveSeg); //Add to array of segs used + t_s = prev_e; + col++; + } while(prev_e < 1.0); + + return TRUE; +}; +/* + * Draw Bezier while editing it. It consists of three elements - the curve and one or two control arms. + * + */ + +EXPORT void DrawBezCurve(trkSeg_p control_arm1, + int cp1Segs_cnt, + trkSeg_p control_arm2, + int cp2Segs_cnt, + trkSeg_p curveSegs, + int crvSegs_cnt, + wDrawColor color + ) { + long oldDrawOptions = tempD.funcs->options; + tempD.funcs->options = wDrawOptTemp; + long oldOptions = tempD.options; + tempD.options = DC_TICKS; + tempD.orig = mainD.orig; + tempD.angle = mainD.angle; + if (crvSegs_cnt && curveSegs) + DrawSegs( &tempD, zero, 0.0, curveSegs, crvSegs_cnt, trackGauge, color ); + if (cp1Segs_cnt && control_arm1) + DrawSegs( &tempD, zero, 0.0, control_arm1, cp1Segs_cnt, trackGauge, drawColorBlack ); + if (cp2Segs_cnt && control_arm2) + DrawSegs( &tempD, zero, 0.0, control_arm2, cp2Segs_cnt, trackGauge, drawColorBlack ); + tempD.funcs->options = oldDrawOptions; + tempD.options = oldOptions; + +} + +/* + * If Track, make it red if the radius is below minimum + */ +void DrawTempBezier(BOOL_T track) { + if (track) DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,Da.cp2Segs_da,Da.cp2Segs_da_cnt, (trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da_cnt,Da.minRadius<(GetLayoutMinTrackRadius()-EPSILON)?drawColorRed:drawColorBlack); + else + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,Da.cp2Segs_da,Da.cp2Segs_da_cnt, (trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da_cnt,drawColorBlack); //Add Second Arm +} + +void CreateBothControlArms(int selectPoint, BOOL_T track) { + if (selectPoint == -1) { + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], + Da.pos[1], track, TRUE, Da.trk[0]!=NULL, -1, + drawColorBlack); + Da.cp2Segs_da_cnt = createControlArm(Da.cp2Segs_da, Da.pos[3], + Da.pos[2], track, TRUE, Da.trk[1]!=NULL, -1, + drawColorBlack); + } else if (selectPoint == 0 || selectPoint == 1) { + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], + Da.pos[1], track, TRUE, Da.trk[0]!=NULL, selectPoint, + drawColorBlack); + Da.cp2Segs_da_cnt = createControlArm(Da.cp2Segs_da, Da.pos[3], + Da.pos[2], track, FALSE, Da.trk[1]!=NULL, -1, + drawColorBlack); + } else { + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], + Da.pos[1], track, FALSE, Da.trk[0]!=NULL, -1, + drawColorBlack); + Da.cp2Segs_da_cnt = createControlArm(Da.cp2Segs_da, Da.pos[3], + Da.pos[2], track, TRUE, Da.trk[1]!=NULL, + 3-selectPoint, drawColorBlack); + } +} + +/* + * AdjustBezCurve + * + * Called to adjust the curve either when creating it or modifying it + * States are "PICK_POINT" and "POINT_PICKED" and "TRACK_SELECTED". + * + * In PICK_POINT, the user can select an end-point to drag and release in POINT_PICKED. They can also + * hit Enter (which saves the changes) or ESC (which cancels them). + * + * Only those points which can be picked are shown with circles - locked end-points are not shown. + * + * SHIFT at release will lock , re-locking any end-points that are aligned with like items at the same position + * (Track to unconnected Track, Line to any Line end). + * + */ +EXPORT STATUS_T AdjustBezCurve( + wAction_t action, + coOrd pos, + BOOL_T track, + wDrawColor color, + DIST_T width, + bezMessageProc message ) +{ + track_p t; + DIST_T d; + ANGLE_T angle1, angle2; + static coOrd pos0, pos3, p; + enum BezierType b; + DIST_T dd; + EPINX_T ep; + double fx, fy, cusp; + int controlArm = -1; + + + if (Da.state != PICK_POINT && Da.state != POINT_PICKED && Da.state != TRACK_SELECTED) return C_CONTINUE; + + switch ( action & 0xFF) { + + case C_START: + Da.selectPoint = -1; + CreateBothControlArms(Da.selectPoint, track); + if (ConvertToArcs(Da.pos,&Da.crvSegs_da,track,color,Da.width)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + Da.minRadius = BezierMinRadius(Da.pos,Da.crvSegs_da); + Da.unlocked = FALSE; + if (track) + InfoMessage( _("Select End-Point - Ctrl unlocks end-point") ); + else + InfoMessage( _("Select End-Point") ); + DrawTempBezier(Da.track); + return C_CONTINUE; + + case C_DOWN: + if (Da.state != PICK_POINT) return C_CONTINUE; + dd = 10000.0; + Da.selectPoint = -1; + DrawTempBezier(Da.track); //wipe out + for (int i=0;i<4;i++) { + d = FindDistance(Da.pos[i],pos); + if (d < dd) { + if (i==0 && Da.trk[0]) continue; + if (i==3 && Da.trk[1]) continue; //ignore locked points + dd = d; + Da.selectPoint = i; + } + + } + if (!IsClose(dd) ) Da.selectPoint = -1; + if (Da.selectPoint == -1) { + InfoMessage( _("Not close enough to any valid, selectable point, reselect") ); + DrawTempBezier(Da.track); + return C_CONTINUE; + } else { + pos = Da.pos[Da.selectPoint]; + Da.state = POINT_PICKED; + InfoMessage( _("Drag point %d to new location and release it"),Da.selectPoint+1 ); + } + CreateBothControlArms(Da.selectPoint, track); + if (ConvertToArcs(Da.pos, &Da.crvSegs_da, track, color,Da.width)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + Da.minRadius = BezierMinRadius(Da.pos, Da.crvSegs_da); + DrawTempBezier(Da.track); + return C_CONTINUE; + + case C_MOVE: + if (Da.state != POINT_PICKED) { + InfoMessage(_("Pick any circle to adjust it - Enter to confirm, ESC to abort")); + return C_CONTINUE; + } + //If locked, reset pos to be on line from other track + DrawTempBezier(Da.track); //wipe out + if (Da.selectPoint == 1 || Da.selectPoint == 2) { //CPs + int controlArm = Da.selectPoint-1; //Snap to direction of track + if (Da.trk[controlArm]) { + angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk[controlArm], Da.ep[controlArm])); + angle2 = NormalizeAngle(FindAngle(pos, Da.pos[Da.selectPoint==1?0:3])-angle1); + if (angle2 > 90.0 && angle2 < 270.0) + Translate( &pos, Da.pos[Da.selectPoint==1?0:3], angle1, -FindDistance( Da.pos[Da.selectPoint==1?0:3], pos )*cos(D2R(angle2)) ); + else pos = Da.pos[Da.selectPoint==1?0:3]; + } // Dont Snap control points + } else SnapPos(&pos); + Da.pos[Da.selectPoint] = pos; + CreateBothControlArms(Da.selectPoint, track); + if (ConvertToArcs(Da.pos,&Da.crvSegs_da,track, color, Da.width)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + Da.minRadius = BezierMinRadius(Da.pos,Da.crvSegs_da); + if (Da.track) { + b = AnalyseCurve(Da.pos,&fx,&fy,&cusp); + if (b==ENDS) { + wBeep(); + InfoMessage(_("Bezier Curve Invalid has identical end points Change End Point"),b==CUSP?"Cusp":"Loop"); + } else if ( b == CUSP || b == LOOP) { + wBeep(); + InfoMessage(_("Bezier Curve Invalid has %s Change End Point"),b==CUSP?"Cusp":"Loop"); + } else if ( b == COINCIDENT ) { + wBeep(); + InfoMessage(_("Bezier Curve Invalid has three co-incident points"),b==CUSP?"Cusp":"Loop"); + } else if ( b == LINE ) { + InfoMessage(_("Bezier is Straight Line")); + } else + InfoMessage( _("Bezier %s : Min Radius=%s Length=%s fx=%0.3f fy=%0.3f cusp=%0.3f"),track?"Track":"Line", + FormatDistance(Da.minRadius>=100000?0:Da.minRadius), + FormatDistance(BezierLength(Da.pos,Da.crvSegs_da)),fx,fy,cusp); + } else + InfoMessage( _("Bezier %s : Min Radius=%s Length=%s"),track?"Track":"Line", + FormatDistance(Da.minRadius>=100000?0:Da.minRadius), + FormatDistance(BezierLength(Da.pos,Da.crvSegs_da))); + DrawTempBezier(Da.track); + return C_CONTINUE; + + case C_UP: + if (Da.state != POINT_PICKED) return C_CONTINUE; + //Take last pos and decide if it should be snapped to a track because SHIFT is held (pos0 and pos3) + ep = 0; + BOOL_T found = FALSE; + + DrawTempBezier(Da.track); //wipe out + + p = pos; + + if (track && (Da.selectPoint == 0 || Da.selectPoint == 3)) { //EPs + if ((MyGetKeyState() & WKEY_SHIFT) != 0) { //Snap Track + if ((t = OnTrackIgnore(&p, FALSE, TRUE, Da.selectTrack)) != NULL) { //Snap to endPoint + ep = PickUnconnectedEndPointSilent(p, t); + if (ep != -1) { + Da.trk[Da.selectPoint/3] = t; + Da.ep[Da.selectPoint/3] = ep; + pos0 = Da.pos[(Da.selectPoint == 0)?1:2]; + pos = GetTrkEndPos(t, ep); + found = TRUE; + } + } else { + wBeep(); + InfoMessage(_("No unconnected End Point to lock to")); + } + } + } + if (found) { + angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk[Da.selectPoint/3], Da.ep[Da.selectPoint/3])); + angle2 = NormalizeAngle(FindAngle(pos, pos0)-angle1); + Translate(&Da.pos[Da.selectPoint==0?1:2], Da.pos[Da.selectPoint==0?0:3], angle1, FindDistance(Da.pos[Da.selectPoint==0?1:2],pos)*cos(D2R(angle2))); + } + Da.selectPoint = -1; + CreateBothControlArms(Da.selectPoint,track); + if (ConvertToArcs(Da.pos,&Da.crvSegs_da,track,color,Da.width)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + Da.minRadius = BezierMinRadius(Da.pos,Da.crvSegs_da); + if (Da.track) { + b = AnalyseCurve(Da.pos,&fx,&fy,&cusp); + if (b==ENDS) { + wBeep(); + InfoMessage(_("Bezier curve invalid has identical end points Change End Point"),b==CUSP?"Cusp":"Loop"); + } else if ( b == CUSP || b == LOOP) { + wBeep(); + InfoMessage(_("Bezier curve invalid has %s Change End Point"),b==CUSP?"Cusp":"Loop"); + } else if ( b == COINCIDENT ) { + wBeep(); + InfoMessage(_("Bezier curve invalid has three co-incident points"),b==CUSP?"Cusp":"Loop"); + } else if ( b == LINE) { + InfoMessage(_("Bezier curve is straight line")); + } + InfoMessage(_("Pick any circle to adjust it - Enter to confirm, ESC to abort")); + } else + InfoMessage(_("Pick any circle to adjust it - Enter to confirm, ESC to abort")); + DrawTempBezier(Da.track); + Da.state = PICK_POINT; + + return C_CONTINUE; + + case C_OK: //C_OK is not called by Modify. + if ( Da.state == PICK_POINT ) { + char c = (unsigned char)(action >> 8); + if (Da.track && Da.pos[0].x == Da.pos[3].x && Da.pos[0].y == Da.pos[3].y ) { + wBeep(); + ErrorMessage(_("Invalid Bezier Track - end points are identical")); + return C_CONTINUE; + } + if (Da.track) { + b = AnalyseCurve(Da.pos,&fx,&fy,&cusp); + if ( b == CUSP || b == LOOP ) { + wBeep(); + ErrorMessage(_("Invalid Bezier Curve has a %s - Adjust"),b==CUSP?"Cusp":"Loop"); + return C_CONTINUE; + } else if (b==COINCIDENT) { + wBeep(); + ErrorMessage(_("Invalid Bezier Curve has three coincident points - Adjust")); + return C_CONTINUE; + } else if(b==ENDS) { + ErrorMessage(_("Invalid Bezier Track - end points are identical")); + return C_CONTINUE; + } + } + Da.minRadius = BezierMinRadius(Da.pos,Da.crvSegs_da); + DrawTempBezier(Da.track); + UndoStart( _("Create Bezier"), "newBezier - CR" ); + if (Da.track) { + t = NewBezierTrack( Da.pos, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt); + for (int i=0;i<2;i++) + if (Da.trk[i] != NULL) ConnectAbuttingTracks(t,i,Da.trk[i],Da.ep[i]); + } + else t = NewBezierLine(Da.pos, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt,color,width); + UndoEnd(); + if (Da.crvSegs_da.ptr) MyFree(Da.crvSegs_da.ptr); + Da.crvSegs_da.ptr = NULL; + Da.crvSegs_da.cnt = 0; + Da.crvSegs_da.max = 0; + DrawNewTrack(t); + Da.state = NONE; + MainRedraw(); + MapRedraw(); + return C_TERMINATE; + + } + return C_CONTINUE; + + case C_REDRAW: + DrawTempBezier(Da.track); + return C_CONTINUE; + + default: + return C_CONTINUE; + } + + +} + +struct extraData { + BezierData_t bezierData; + }; + +/* + * CmdBezModify + * + * Called from Modify Command - this function deals with the real (old) track and calls AdjustBezCurve to tune up the new one + * Sequence is this - + * - The C_START is called from CmdModify C_DOWN action if a track has being selected. The old track is hidden, the editable one is shown. + * - C_MOVES will be ignored until a C_UP ends the track selection and moves the state to PICK_POINT, + * - C_DOWN then hides the track and shows the Bezier handles version. Selects a point (if close enough and available) and the state moves to POINT_PICKED + * - C_MOVE drags the point around modifying the curve + * - C_UP puts the state back to PICK_POINT (pick another) + * - C_OK (Enter/Space) creates the new track, deletes the old and shows the changed track. + * - C_CANCEL (Esc) sets the state to NONE and reshows the original track unchanged. + * + * Note: Available points are shown - if a Bezier track is attached to its neighbor, only the control point on that side is selectable. + * Any free end-point can be locked to a unconnected end point using SHIFT during drag. + */ +STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos) { + BOOL_T track = TRUE; + track_p t; + double width = 1.0; + long mode = 0; + long cmd; + + struct extraData *xx = GetTrkExtraData(trk); + cmd = (long)commandContext; + + + switch (action&0xFF) { + case C_START: + Da.state = NONE; + DYNARR_RESET(trkSeg_t,Da.crvSegs_da); + Da.cp1Segs_da_cnt = 0; + Da.cp2Segs_da_cnt = 0; + Da.selectPoint = -1; + Da.selectTrack = NULL; + + if (IsTrack(trk)) Da.track = TRUE; + else Da.track = FALSE; + + Da.selectTrack = trk; + Da.trk[0] = GetTrkEndTrk( trk, 0 ); + if (Da.trk[0]) Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],trk); + Da.trk[1] = GetTrkEndTrk( trk, 1 ); + if (Da.trk[1]) Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],trk); + + for (int i=0;i<4;i++) Da.pos[i] = xx->bezierData.pos[i]; //Copy parms from old trk + InfoMessage(_("%s picked - now select a Point"),track?"Track":"Line"); + Da.state = TRACK_SELECTED; + DrawTrack(Da.selectTrack,&mainD,wDrawColorWhite); //Wipe out real track, draw replacement + return AdjustBezCurve(C_START, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); + + case C_DOWN: + if (Da.state == TRACK_SELECTED) return C_CONTINUE; //Ignore until first up + return AdjustBezCurve(C_DOWN, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); + + + case C_MOVE: + if (Da.state == TRACK_SELECTED) return C_CONTINUE; //Ignore until first up and down + return AdjustBezCurve(C_MOVE, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); + + case C_UP: + if (Da.state == TRACK_SELECTED) { + Da.state = PICK_POINT; //First time up, next time pick a point + } + return AdjustBezCurve(C_UP, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); //Run Adjust + + case C_TEXT: + if ((action>>8) != 32) + return C_CONTINUE; + /* no break */ + case C_OK: + if (Da.state != PICK_POINT) { //Too early - abandon + InfoMessage(_("No changes made")); + Da.state = NONE; + return C_CANCEL; + } + UndoStart( _("Modify Bezier"), "newBezier - CR" ); + if (Da.track) t = NewBezierTrack( Da.pos, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt); + else t = NewBezierLine(Da.pos, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt,xx->bezierData.segsColor,xx->bezierData.segsWidth); + + DeleteTrack(trk, TRUE); + + if (Da.track) { + for (int i=0;i<2;i++) { //Attach new track + if (Da.trk[i] != NULL && Da.ep[i] != -1) { //Like the old track + ConnectAbuttingTracks(t,i,Da.trk[i],Da.ep[i]); + } + } + } + UndoEnd(); + InfoMessage(_("Modify Bezier Complete - select another")); + Da.state = NONE; + return C_TERMINATE; + + case C_CANCEL: + InfoMessage(_("Modify Bezier Cancelled")); + Da.state = NONE; + MainRedraw(); + MapRedraw(); + return C_TERMINATE; + + case C_REDRAW: + return AdjustBezCurve(C_REDRAW, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); + } + + return C_CONTINUE; + +} + +/* + * Find length by adding up the underlying segments. The segments can be straights, curves or bezier. + */ +DIST_T BezierLength(coOrd pos[4],dynArr_t segs) { + + DIST_T dd = 0.0; + if (segs.cnt == 0 ) return dd; + for (int i = 0;i>8) { + cmd = action>>8; + } else cmd = (long)commandContext; + + Da.color = lineColor; + Da.width = (double)lineWidth/mainD.dpi; + + switch (action&0xFF) { + + case C_START: + + Da.track = (cmd == bezCmdModifyTrack || cmd == bezCmdCreateTrack)?TRUE:FALSE; + + Da.state = POS_1; + Da. selectPoint = -1; + for (int i=0;i<4;i++) { + Da.pos[i] = zero; + } + Da.trk[0] = Da.trk[1] = NULL; + //tempD.orig = mainD.orig; + + DYNARR_RESET(trkSeg_t,Da.crvSegs_da); + Da.cp1Segs_da_cnt = 0; + Da.cp2Segs_da_cnt = 0; + InfoMessage( _("Place 1st end point of Bezier + Shift -> snap to %s end"), Da.track?"Unconnected Track":"Line" ); + return C_CONTINUE; + + + case C_DOWN: + if ( Da.state == POS_1 || Da.state == POS_2) { //Set the first or third point + coOrd p = pos; + BOOL_T found = FALSE; + int end = Da.state==POS_1?0:1; + EPINX_T ep; + if (Da.track) { + if ((MyGetKeyState() & WKEY_SHIFT) != 0) { //Snap Track + if ((t = OnTrack(&p, FALSE, TRUE)) != NULL) { + ep = PickUnconnectedEndPointSilent(p, t); + if (ep != -1) { + Da.trk[end] = t; + Da.ep[end] = ep; + pos = GetTrkEndPos(t, ep); + found = TRUE; + } + } + if (!found) { + wBeep(); + InfoMessage(_("Shift used, but no Unconnected Track End there")); + return C_CONTINUE; + } + } + } else { //Snap Bez Line to Lines + if ((MyGetKeyState() & WKEY_SHIFT) != 0) { + if ((t = OnTrack(&p,FALSE, FALSE)) != NULL) { + if (GetClosestEndPt(t,&p)) { + pos = p; + found = TRUE; + } + } else { + wBeep(); + InfoMessage(_("Shift used, but no Line End there")); + return C_CONTINUE; + } + } + } + if (!found) SnapPos( &pos ); + if (Da.state == POS_1) { + Da.pos[0] = pos; + Da.pos[1] = pos; + Da.state = CONTROL_ARM_1; //Draw the first control arm + Da.selectPoint = 1; + InfoMessage( _("Drag end of first Control Arm") ); + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], Da.track,TRUE,Da.trk[1]!=NULL,1,wDrawColorBlack); + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,NULL,0,NULL,0,drawColorBlack); + } else { + Da.pos[3] = pos; //2nd End Point + Da.pos[2] = pos; //2nd Ctl Point + Da.state = POINT_PICKED; // Drag out the second control arm + Da.selectPoint = 2; + InfoMessage( _("Drag end of second Control Arm") ); + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,NULL,0,NULL,0,drawColorBlack); //Wipe out initial Arm + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], Da.track,FALSE,Da.trk[0]!=NULL,-1,wDrawColorBlack); + Da.cp2Segs_da_cnt = createControlArm(Da.cp2Segs_da, Da.pos[3], Da.pos[2], Da.track,TRUE,Da.trk[1]!=NULL,1,wDrawColorBlack); + if (ConvertToArcs(Da.pos,&Da.crvSegs_da,Da.track,Da.color,Da.width)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + DrawTempBezier(Da.track); + } + return C_CONTINUE; + } else { + return AdjustBezCurve( action&0xFF, pos, Da.track, Da.color, Da.width, InfoMessage ); + } + return C_CONTINUE; + + case C_MOVE: + if (Da.state == POS_1) { + InfoMessage( _("Place 1st end point of Bezier + Shift -> snap to %s end"), Da.track?"Unconnected Track":"Line" ); + return C_CONTINUE; + } + if (Da.state == POS_2) { + InfoMessage( _("Select other end of Bezier, +Shift -> snap to %s end"), Da.track?"Unconnected Track":"Line" ); + } + if (Da.state == CONTROL_ARM_1 ) { + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,NULL,0,NULL,0,drawColorBlack); + if (Da.trk[0]) { + EPINX_T ep = 0; + ANGLE_T angle1,angle2; + angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk[0],Da.ep[0])); + angle2 = NormalizeAngle(FindAngle(pos, Da.pos[0])-angle1); + if (angle2 > 90.0 && angle2 < 270.0) + Translate( &pos, Da.pos[0], angle1, -FindDistance( Da.pos[0], pos )*cos(D2R(angle2))); + else pos = Da.pos[0]; + } // Don't Snap control points + Da.pos[1] = pos; + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], Da.track, TRUE, Da.trk[0]!=NULL, 1, wDrawColorBlack); + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,NULL,0,NULL,0,drawColorBlack); + } else { + return AdjustBezCurve( action&0xFF, pos, Da.track, Da.color, Da.width, InfoMessage ); + } + return C_CONTINUE; + + case C_UP: + if (Da.state == CONTROL_ARM_1) { + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,NULL,0,NULL,0,drawColorBlack); + if (Da.trk[0]) { + EPINX_T ep = Da.ep[0]; + ANGLE_T angle1,angle2; + angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk[0],Da.ep[0])); + angle2 = NormalizeAngle(FindAngle(pos, Da.pos[0])-angle1); + if (angle2 > 90.0 && angle2 < 270.0) + Translate( &pos, Da.pos[0], angle1, -FindDistance( Da.pos[0], pos )*cos(D2R(angle2))); + else pos = Da.pos[0]; + } // Don't Snap control points + Da.pos[1] = pos; + if (FindDistance(Da.pos[0],Da.pos[1]) <=minLength) { + InfoMessage( _("Control Arm 1 is too short, try again") ); + Da.state = POS_1; + return C_CONTINUE; + } + Da.state = POS_2; + InfoMessage( _("Select other end of Bezier, +Shift -> snap to %s end"), Da.track?"Unconnected Track":"Line" ); + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], Da.track, FALSE, Da.trk[0]!=NULL, -1, wDrawColorBlack); + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,NULL,0,NULL,0,drawColorBlack); + return C_CONTINUE; + } else { + return AdjustBezCurve( action&0xFF, pos, Da.track, Da.color, Da.width, InfoMessage ); + } + case C_TEXT: + if (Da.state != PICK_POINT || (action>>8) != ' ') //Space is same as Enter. + return C_CONTINUE; + /* no break */ + case C_OK: + if (Da.state != PICK_POINT) return C_CONTINUE; + return AdjustBezCurve( C_OK, pos, Da.track, Da.color, Da.width, InfoMessage); + + case C_REDRAW: + if ( Da.state != NONE ) { + + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,Da.cp2Segs_da,Da.cp2Segs_da_cnt,(trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da.cnt, Da.color); + } + return C_CONTINUE; + + case C_CANCEL: + if (Da.state != NONE) { + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,Da.cp2Segs_da,Da.cp2Segs_da_cnt,(trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da.cnt, Da.color); + Da.cp1Segs_da_cnt = 0; + Da.cp2Segs_da_cnt = 0; + Da.crvSegs_da_cnt = 0; + for (int i=0;i<2;i++) { + Da.trk[i] = NULL; + Da.ep[i] = -1; + } + if (Da.crvSegs_da.ptr) MyFree(Da.crvSegs_da.ptr); + Da.crvSegs_da.ptr = NULL; + Da.crvSegs_da.cnt = 0; + Da.crvSegs_da.max = 0; + } + Da.state = NONE; + return C_CONTINUE; + + default: + + return C_CONTINUE; + } + +} + +void UpdateParms(wDrawColor color,long width) { + DrawTempBezier(Da.track); + Da.color = lineColor; + Da.width = (double)lineWidth/mainD.dpi; + if (Da.crvSegs_da.cnt) { + ConvertToArcs(Da.pos,&Da.crvSegs_da,Da.track,Da.color,Da.width); + } + DrawTempBezier(Da.track); +} + + +#include "bitmaps/bezier.xpm" +#include "bitmaps/dbezier.xpm" + +EXPORT void InitCmdBezier( wMenu_p menu ) +{ + +} diff --git a/app/bin/cbezier.h b/app/bin/cbezier.h new file mode 100644 index 0000000..8a8a8b0 --- /dev/null +++ b/app/bin/cbezier.h @@ -0,0 +1,53 @@ +/* + * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cbezier.h,v 1.1 2005-12-07 15:47:36 rc-flyer Exp $ + */ + +/* XTrkCad - Model Railroad CAD + * Copyright (C) 2005 Dave Bullis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "common.h" +#include "wlib.h" +#include "utility.h" + + +dynArr_t tempEndPts_da; +#define BezSegs(N) DYNARR_N( trkEndPt_t, tempEndPts_da, N ) + +#define bezCmdNone (0) +#define bezCmdModifyTrack (1) +#define bezCmdModifyLine (2) +#define bezCmdCreateTrack (3) +#define bezCmdCreateLine (4) + +extern wDrawColor lineColor; +extern long lineWidth; + +typedef void (*bezMessageProc)( char *, ... ); +STATUS_T CmdBezCurve( wAction_t, coOrd); +STATUS_T CmdBezModify(track_p, wAction_t, coOrd); + +STATUS_T CreateBezier( wAction_t, coOrd, BOOL_T, wDrawColor, DIST_T, long, bezMessageProc ); +DIST_T BezierDescriptionDistance( coOrd, track_p ); +STATUS_T BezierDescriptionMove( track_p, wAction_t, coOrd ); +BOOL_T GetBezierMiddle( track_p, coOrd * ); +BOOL_T ConvertToArcs (coOrd[4], dynArr_t *, BOOL_T, wDrawColor, DIST_T); +track_p NewBezierTrack(coOrd[4], trkSeg_t *, int); +double BezierLength(coOrd[4], dynArr_t); +double BezierMinRadius(coOrd[4],dynArr_t); +void UpdateParms(wDrawColor color,long width); + diff --git a/app/bin/cblock.c b/app/bin/cblock.c index 3c627e9..b1b14a8 100644 --- a/app/bin/cblock.c +++ b/app/bin/cblock.c @@ -47,10 +47,19 @@ */ #include -#include "track.h" -#include "trackx.h" +#include +#include + #include "compound.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "trackx.h" +#include "utility.h" EXPORT TRKTYP_T T_BLOCK = -1; @@ -151,8 +160,8 @@ static descData_t blockDesc[] = { /*NM*/ { DESC_STRING, N_("Name"), &blockData.name }, /*SC*/ { DESC_STRING, N_("Script"), &blockData.script }, /*LN*/ { DESC_DIM, N_("Length"), &blockData.length }, -/*E0*/ { DESC_POS, N_("End Pt 1: X"), &blockData.endPt[0] }, -/*E1*/ { DESC_POS, N_("End Pt 2: X"), &blockData.endPt[1] }, +/*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &blockData.endPt[0] }, +/*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &blockData.endPt[1] }, { DESC_NULL } }; static void UpdateBlock (track_p trk, int inx, descData_p descUpd, BOOL_T needUndoStart ) @@ -196,12 +205,18 @@ static DIST_T DistanceBlock (track_p t, coOrd * p ) blockData_p xx = GetblockData(t); DIST_T closest, current; int iTrk = 1; - - closest = GetTrkDistance ((&(xx->trackList))[0].t, *p); + coOrd pos = *p; + closest = GetTrkDistance ((&(xx->trackList))[0].t, &pos); + coOrd best_pos = pos; for (; iTrk < xx->numTracks; iTrk++) { - current = GetTrkDistance ((&(xx->trackList))[iTrk].t, *p); - if (current < closest) closest = current; + pos = *p; + current = GetTrkDistance ((&(xx->trackList))[iTrk].t, &pos); + if (current < closest) { + closest = current; + best_pos = pos; + } } + *p = best_pos; return closest; } diff --git a/app/bin/ccontrol.c b/app/bin/ccontrol.c index 9428e1a..8ff0396 100644 --- a/app/bin/ccontrol.c +++ b/app/bin/ccontrol.c @@ -47,10 +47,18 @@ static const char rcsid[] = "@(#) : $Id$"; #include -#include "track.h" -#include "trackx.h" +#include + #include "compound.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "layout.h" +#include "param.h" +#include "track.h" +#include "trackx.h" +#include "utility.h" EXPORT TRKTYP_T T_CONTROL = -1; @@ -476,21 +484,18 @@ static STATUS_T CmdControl ( wAction_t action, coOrd pos ) InfoMessage(_("Place control")); return C_CONTINUE; case C_DOWN: - SnapPos(&pos); - DDrawControl( &tempD, pos, GetScaleRatio(curScaleInx), wDrawColorBlack ); - return C_CONTINUE; - case C_MOVE: - SnapPos(&pos); - DDrawControl( &tempD, pos, GetScaleRatio(curScaleInx), wDrawColorBlack ); + case C_MOVE: + SnapPos(&pos); + DDrawControl( &tempD, pos, GetScaleRatio(GetLayoutCurScale()), wDrawColorBlack ); return C_CONTINUE; case C_UP: SnapPos(&pos); - DDrawControl( &tempD, pos, GetScaleRatio(curScaleInx), wDrawColorBlack ); + DDrawControl( &tempD, pos, GetScaleRatio(GetLayoutCurScale()), wDrawColorBlack ); CreateNewControl(pos); return C_TERMINATE; case C_REDRAW: case C_CANCEL: - DDrawControl( &tempD, pos, GetScaleRatio(curScaleInx), wDrawColorBlack ); + DDrawControl( &tempD, pos, GetScaleRatio(GetLayoutCurScale()), wDrawColorBlack ); return C_CONTINUE; default: return C_CONTINUE; diff --git a/app/bin/ccornu.c b/app/bin/ccornu.c new file mode 100644 index 0000000..b67d245 --- /dev/null +++ b/app/bin/ccornu.c @@ -0,0 +1,1240 @@ +/** \file ccornu.c + * Cornu Command. Draw or modify a Cornu Easement Track. + */ +/* XTrkCad - Model Railroad CAD + * + * Cornu curves are a family of mathematically defined curves that define spirals that Euler spirals and elastica come from. + * + * They have the useful property for us that curvature increases linearly along the curve which + * means the acceleration towards the center of the curve also increases evenly. Railways have long understood that + * smoothly changing the radius is key to passenger comfort and reduced derailments. The railway versions of these + * curves were called variously called easements, Talbot or Euler spirals. + * + * In XTrackCAD often want to change radius smoothly between two tracks whose end position, angle and curvature are known. + * + * Finding the right part(s) of the Cornu to fit the gap (if one is available) is mathematically complex, + * but fortunately Raph Levien published a PhD thesis on this together with his mathematical libraries as + * open source. He was doing work on font design where the Cornu shapes make beautiful smooth fonts. He + * was faced with the reality, though, that graphics packages do not include these shapes as native objects + * and so his solution was to produce a set of Bezier curves that approximate the solution. + * + * We already have a tool that can produce a set of arcs and straight line to approximate a Bezier - so that in the end + * for an easement track we will have an array of Bezier, each of which is an array of Arcs and Lines. The tool will + * use the approximations for most of its work. + * + * The inputs for the Cornu are the end points, angles and radii. To match the Cornu algorithm's expectations we input + * these as a set of knots (points on lines). One point is always the desired end point and the other two are picked + * direct the code to derive the other two end conditions. By specifying that the desired end point is a "one-way" + * knot we ensure that the result has smooth ends of either zero or fixed radius. + * + * When reading back the output, we simply ignore the results before the first end point knot and after the last. + * + * Because we are mathematically deriving the output, we can alter the end conditions and recalculate. This allows + * support of modify for Cornu Easements and also movement of tracks that are connected via a Cornu easement to another track. + * + * Note that unlike the existing Easements in XTrkCAD, the degree of sharpness (the rate of change of curvature) + * is derived not defined. By adjusting the ends, one can have an infinite set of sharpness solutions. + * + * Cornu will not find a solution for every set of input conditions, or may propose one that is impractical such as + * huge loops or tiny curves. These are mathematically correct, but not useful. In these cases the answer is to change the + * end conditions (more space between the ends, different angles or different radii). + * + * Note that every time we change the Cornu end points we have to recalculate the Bezier approximation, + * which recalculates the arc approximations, but that still means that the majority of the time we are using the approximation. + * + * Cornus do not have cusps, but can result in smooth loops. If there is too much looping, the code will reject the easement. + * + * This program is built and founded upon Raph Levien's seminal work and relies on an adaptation of his Cornu library. + * As with the Bezier work, it also relies on the pages about Bezier curves that PoMax put up at https://pomax.github.io/bezierinfo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + +#include "track.h" +#include "spiro.h" +#include "spiroentrypoints.h" +#include "bezctx_xtrkcad.h" +#include "draw.h" +#include "ccurve.h" +#include "ccornu.h" +#include "tcornu.h" +#include "cstraigh.h" +#include "drawgeom.h" +#include "cjoin.h" +#include "i18n.h" +#include "common.h" +#include "utility.h" +#include "math.h" +#include "param.h" +#include "layout.h" +#include "cundo.h" +#include "messages.h" +#include "cselect.h" + +extern drawCmd_t tempD; +extern TRKTYP_T T_BEZIER; +extern TRKTYP_T T_CORNU; + + +/* + * STATE INFO + */ +enum Cornu_States { NONE, + POS_1, + LOC_2, + POS_2, + PICK_POINT, + POINT_PICKED, + TRACK_SELECTED }; + +static struct { + enum Cornu_States state; + coOrd pos[2]; + int selectPoint; + wDrawColor color; + DIST_T width; + track_p trk[2]; + EPINX_T ep[2]; + DIST_T radius[2]; + ANGLE_T angle[2]; + ANGLE_T arcA0[2]; + ANGLE_T arcA1[2]; + coOrd center[2]; + curveType_e trackType[2]; + + BOOL_T extend[2]; + trkSeg_t extendSeg[2]; + + trkSeg_t ep1Segs[2]; + int ep1Segs_da_cnt; + trkSeg_t ep2Segs[2]; + int ep2Segs_da_cnt; + dynArr_t crvSegs_da; + int crvSegs_da_cnt; + trkSeg_t trk1Seg; + trkSeg_t trk2Seg; + track_p selectTrack; + DIST_T minRadius; + BOOL_T circleorHelix[2]; + + bezctx * bezc; + } Da; + + + +/** + * Draw a EndPoint. + * A Cornu end Point has a filled circle surrounded by another circle for endpoint + */ +int createEndPoint( + trkSeg_t sp[], //seg pointer for up to 2 trkSegs (ends and line) + coOrd pos0, //end on curve + BOOL_T point_selected, + BOOL_T point_selectable, + BOOL_T track_modifyable + ) +{ + DIST_T d, w; + d = tempD.scale*0.25; + w = tempD.scale/tempD.dpi; /*double width*/ + sp[0].u.c.center = pos0; + sp[0].u.c.a0 = 0.0; + sp[0].u.c.a1 = 360.0; + sp[0].width = w; + sp[0].u.c.radius = d/4; + sp[0].color = (point_selected>=0)?drawColorRed:drawColorBlack; + if (track_modifyable) + sp[0].type = SEG_CRVLIN; + else + sp[0].type = SEG_FILCRCL; + if (point_selectable) { + sp[1].u.c.center = pos0; + sp[1].u.c.a0 = 0.0; + sp[1].u.c.a1 = 360.0; + sp[1].u.c.radius = d/2; + sp[1].type = SEG_CRVLIN; + sp[1].width = w; + sp[1].color = drawColorRed; + return 2; + } + return 1; +} + + +/* + * Add element to DYNARR pointed to by caller from segment handed in + */ +void addSegCornu(dynArr_t * const array_p, trkSeg_p seg) { + trkSeg_p s; + + + DYNARR_APPEND(trkSeg_t, * array_p, 10); //Adds 1 to cnt + s = &DYNARR_N(trkSeg_t,* array_p,array_p->cnt-1); + s->type = seg->type; + s->bezSegs.max = 0; + s->bezSegs.cnt = 0; + if (s->bezSegs.ptr) MyFree(s->bezSegs.ptr); + s->bezSegs.ptr = NULL; + s->color = seg->color; + s->width = seg->width; + if ((s->type == SEG_BEZLIN || s->type == SEG_BEZTRK) && seg->bezSegs.cnt) { + s->u.b.angle0 = seg->u.b.angle0; //Copy all the rest + s->u.b.angle3 = seg->u.b.angle3; + s->u.b.length = seg->u.b.length; + s->u.b.minRadius = seg->u.b.minRadius; + for (int i=0;i<4;i++) s->u.b.pos[i] = seg->u.b.pos[i]; + s->u.b.radius0 = seg->u.b.radius3; + for (int i = 0; ibezSegs.cnt; i++) { + addSegCornu(&s->bezSegs, (((trkSeg_p)seg->bezSegs.ptr) + i)); //recurse for copying embedded Beziers as in Cornu joint + } + } else { + s->u = seg->u; + } +} +EXPORT void SetKnots(spiro_cp knots[6], coOrd posk[6]) { + for (int i = 0; i < 6; i++) { + knots[i].x = posk[i].x; + knots[i].y = posk[i].y; + } + knots[0].ty = SPIRO_OPEN_CONTOUR; + knots[1].ty = SPIRO_G2; + knots[2].ty = SPIRO_RIGHT; + knots[3].ty = SPIRO_LEFT; + knots[4].ty = SPIRO_G2; + knots[5].ty = SPIRO_END_OPEN_CONTOUR; +} + +BOOL_T CallCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T radius[2], dynArr_t * array_p, BOOL_T spots) { + array_p->cnt = 0; + //Create LH knots + //Find remote end point of track, create start knot + int ends[2]; + ends[0] = 2; ends[1] = 3; + spiro_cp knots[6]; + coOrd posk[6]; + BOOL_T back; + ANGLE_T angle1; + + if (Da.bezc) free(Da.bezc); + + Da.bezc = new_bezctx_xtrkcad(array_p,ends,spots); + + coOrd pos0 = pos[0]; + + if (radius[0] == 0.0) { + Translate(&posk[0],pos0,angle[0],10); + Translate(&posk[1],pos0,angle[0],5); + } else { + angle1 = FindAngle(center[0],pos[0]); + if (NormalizeAngle(angle1 - angle[0])<180) back = TRUE; + else back = FALSE; + posk[0] = pos[0]; + Rotate(&posk[0],center[0],(back)?-10:10); + posk[1] = pos[0]; + Rotate(&posk[1],center[0],(back)?-5:5); + } + posk[2] = pos[0]; + + posk[3] = pos[1]; + + coOrd pos1 = pos[1]; + + if (radius[1] == 0.0 ) { + Translate(&posk[4],pos1,angle[1],5); + Translate(&posk[5],pos1,angle[1],10); + } else { + angle1 = FindAngle(center[1],pos[1]); + if (NormalizeAngle(angle1 - angle[1])>180) back = TRUE; + else back = FALSE; + posk[4] = pos[1]; + Rotate(&posk[4],center[1],(back)?5:-5); + posk[5] = pos[1]; + Rotate(&posk[5],center[1],(back)?10:-10); + } + SetKnots(knots,posk); + TaggedSpiroCPsToBezier(knots,Da.bezc); + if (!bezctx_xtrkcad_close(Da.bezc)) { + return FALSE; + } + return TRUE; +} + +/* + * Set up the call to Cornu0. Take the conditions of the two ends from the connected tracks. + */ +BOOL_T CallCornu(coOrd pos[2], track_p trk[2], EPINX_T ep[2], dynArr_t * array_p, cornuParm_t * cp) { + + trackParams_t params; + ANGLE_T angle; + for (int i=0;i<2;i++) { + if (trk[i]) { + if (!GetTrackParams(PARAMS_CORNU,trk[i],pos[i],¶ms)) return FALSE; + cp->pos[i] = pos[i]; + if (Da.ep[i]>=0) angle = GetTrkEndAngle(trk[i],ep[i]); + else angle = params.angle; //Turntable only + if (Da.circleorHelix[i]) { //Helix/Circle only + cp->radius[i] = params.arcR; + cp->center[i] = params.arcP; + cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); + } else if (params.type == curveTypeStraight) { + cp->angle[i] = NormalizeAngle(angle+180); //Because end always backwards + cp->radius[i] = 0.0; + } else if ((params.type == curveTypeCornu || params.type == curveTypeBezier) && params.arcR == 0.0 ) { + cp->radius[i] = 0.0; + cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); //Use point not end + } else if (params.type == curveTypeCurve) { + cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); + cp->radius[i] = params.arcR; + cp->center[i] = params.arcP; + } else if ((params.type == curveTypeCornu || params.type == curveTypeBezier) && params.arcR != 0.0 ){ + cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); + cp->radius[i] = params.arcR; + cp->center[i] = params.arcP; + } else { + cp->angle[i] = NormalizeAngle(angle+180); //Unknown - treat like straight + cp->radius[i] = params.arcR; + cp->center[i] = params.arcP; + } + } + } + + return CallCornu0(pos,cp->center,cp->angle,cp->radius,array_p,TRUE); +} + + +/* + * Draw Cornu while editing it. It consists of up to five elements - the ends, the curve and one or two End Points. + * + */ + +EXPORT void DrawCornuCurve( + trkSeg_p first_trk, + trkSeg_p point1, + int ep1Segs_cnt, + trkSeg_p curveSegs, + int crvSegs_cnt, + trkSeg_p point2, + int ep2Segs_cnt, + trkSeg_p second_trk, + trkSeg_p extend1_trk, + trkSeg_p extend2_trk, + wDrawColor color + ) { + long oldDrawOptions = tempD.funcs->options; + tempD.funcs->options = wDrawOptTemp; + long oldOptions = tempD.options; + tempD.options = DC_TICKS; + tempD.orig = mainD.orig; + tempD.angle = mainD.angle; + if (first_trk) + DrawSegs( &tempD, zero, 0.0, first_trk, 1, trackGauge, drawColorBlack ); + if (crvSegs_cnt && curveSegs) + DrawSegs( &tempD, zero, 0.0, curveSegs, crvSegs_cnt, trackGauge, color ); + if (second_trk) + DrawSegs( &tempD, zero, 0.0, second_trk, 1, trackGauge, drawColorBlack ); + if (ep1Segs_cnt && point1) + DrawSegs( &tempD, zero, 0.0, point1, ep1Segs_cnt, trackGauge, drawColorBlack ); + if (ep2Segs_cnt && point2) + DrawSegs( &tempD, zero, 0.0, point2, ep2Segs_cnt, trackGauge, drawColorBlack ); + if (extend1_trk) + DrawSegs( &tempD, zero, 0.0, extend1_trk, 1, trackGauge, drawColorBlack); + if (extend2_trk) + DrawSegs( &tempD, zero, 0.0, extend2_trk, 1, trackGauge, drawColorBlack); + tempD.funcs->options = oldDrawOptions; + tempD.options = oldOptions; + +} + +/* + * If Track, make it red if the radius is below minimum + */ +void DrawTempCornu() { + + + DrawCornuCurve(&Da.trk1Seg, + &Da.ep1Segs[0],Da.ep1Segs_da_cnt, + (trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da_cnt, + &Da.ep2Segs[0],Da.ep2Segs_da_cnt, + &Da.trk2Seg, + Da.extend[0]?&Da.extendSeg[0]:NULL, + Da.extend[1]?&Da.extendSeg[1]:NULL, + Da.minRadius<(GetLayoutMinTrackRadius()-EPSILON)?drawColorRed:drawColorBlack); + +} + +void CreateBothEnds(int selectPoint) { + BOOL_T selectable[2],modifyable[2]; + selectable[0] = Da.trk[0] && !QueryTrack(Da.trk[0],Q_IS_CORNU); + modifyable[0] = Da.trk[0] && QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY); + selectable[1] = Da.trk[1] && !QueryTrack(Da.trk[1],Q_IS_CORNU); + modifyable[1] = Da.trk[1] && QueryTrack(Da.trk[1],Q_CORNU_CAN_MODIFY); + if (selectPoint == -1) { + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],FALSE,selectable[0],modifyable[0]); + Da.ep2Segs_da_cnt = createEndPoint(Da.ep2Segs, Da.pos[1],FALSE,selectable[1],modifyable[1]); + } else if (selectPoint == 0 || selectPoint == 1) { + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],selectPoint == 0,selectable[0],modifyable[0]); + Da.ep2Segs_da_cnt = createEndPoint(Da.ep2Segs, Da.pos[1],selectPoint == 1,selectable[1],modifyable[1]); + } else { + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],FALSE,selectable[0],modifyable[0]); + Da.ep2Segs_da_cnt = createEndPoint(Da.ep2Segs, Da.pos[1],FALSE,selectable[1],modifyable[1]); + } +} + +BOOL_T GetConnectedTrackParms(track_p t, const coOrd pos, int end, EPINX_T track_end) { + trackParams_t trackParams; + if (!GetTrackParams(PARAMS_CORNU, t, pos, &trackParams)) return FALSE; + Da.radius[end] = 0.0; + Da.center[end] = zero; + Da.circleorHelix[end] = FALSE; + Da.trackType[end] = trackParams.type; + if (trackParams.type == curveTypeCurve) { + Da.arcA0[end] = trackParams.arcA0; + Da.arcA1[end] = trackParams.arcA1; + Da.radius[end] = trackParams.arcR; + Da.center[end] = trackParams.arcP; + if (trackParams.circleOrHelix) { + Da.circleorHelix[end] = TRUE; + Da.angle[end] = trackParams.track_angle; //For Now + } else { + Da.angle[end] = NormalizeAngle(trackParams.track_angle + (track_end?180:0)); + } + } else if (trackParams.type == curveTypeBezier) { + Da.angle[end] = NormalizeAngle(trackParams.track_angle+(track_end?180:0)); + if (trackParams.arcR == 0) { + Da.radius[end] = 0; + Da.center[end] = zero; + } else { + Da.arcA0[end] = trackParams.arcA0; + Da.arcA1[end] = trackParams.arcA1; + Da.radius[end] = trackParams.arcR; + Da.center[end] = trackParams.arcP; + } + } else if (trackParams.type == curveTypeCornu) { + int ep = trackParams.ep; + Da.angle[end] = NormalizeAngle(trackParams.cornuAngle[ep]+(track_end?180:0)); + Da.radius[end] = trackParams.cornuRadius[ep]; + Da.pos[end] = trackParams.cornuEnd[ep]; + Da.center[end] = trackParams.cornuCenter[ep]; + } else if (trackParams.type == curveTypeStraight) { + if (Da.ep[end]>=0) + Da.angle[end] = NormalizeAngle(GetTrkEndAngle(t,track_end)+180); //Ignore params.angle because it gives from nearest end + else { + Da.angle[end] = NormalizeAngle(trackParams.angle+180); //Turntable + Da.pos[end] = trackParams.lineEnd; //End moved to constrain angle + } + } + return TRUE; +} + +void CorrectHelixAngles() { + if ( Da.circleorHelix[0] ) { + Da.ep[0] = PickArcEndPt( Da.center[0], Da.pos[0], Da.pos[1] ); + if (Da.ep[0] == 1) Da.angle[0] = NormalizeAngle(Da.angle[0]+180); + } + if ( Da.circleorHelix[1] ) { + Da.ep[1] = PickArcEndPt( Da.center[1], Da.pos[1], Da.pos[0] ); + if (Da.ep[1] == 1) Da.angle[1] = NormalizeAngle(Da.angle[1]+180); + } +} + +BOOL_T CheckHelix(track_p trk) { + if ( Da.trk[0] && QueryTrack(Da.trk[0],Q_HAS_VARIABLE_ENDPOINTS)) { + track_p t = GetTrkEndTrk(Da.trk[0],Da.ep[0]); + if ( t != NULL && t != trk) { + ErrorMessage( MSG_TRK_ALREADY_CONN, _("First") ); + return FALSE; + } + } + if ( Da.trk[1] && QueryTrack(Da.trk[1],Q_HAS_VARIABLE_ENDPOINTS)) { + track_p t = GetTrkEndTrk(Da.trk[1],Da.ep[1]); + if ( t != NULL && t != trk) { + ErrorMessage( MSG_TRK_ALREADY_CONN, _("Second") ); + return FALSE; + } + } + return TRUE; +} + +void SetUpCornuParms(cornuParm_t * cp) { + cp->center[0] = Da.center[0]; + cp->angle[0] = Da.angle[0]; + cp->radius[0] = Da.radius[0]; + cp->center[1] = Da.center[1]; + cp->angle[1] = Da.angle[1]; + cp->radius[1] = Da.radius[1]; +} + +/* + * AdjustCornuCurve + * + * Called to adjust the curve either when creating it or modifying it + * States are "PICK_POINT" and "POINT_PICKED" and "TRACK_SELECTED". + * + * In PICK_POINT, the user can select an end-point to drag and release in POINT_PICKED. They can also + * hit Enter (which saves the changes) or ESC (which cancels them). + * + * Deal with extended tracks from ends. + * + */ +EXPORT STATUS_T AdjustCornuCurve( + wAction_t action, + coOrd pos, + cornuMessageProc message ) +{ + track_p t; + DIST_T d; + ANGLE_T a, a2; + DIST_T dd; + EPINX_T ep; + cornuParm_t cp; + + + if (Da.state != PICK_POINT && Da.state != POINT_PICKED && Da.state != TRACK_SELECTED) return C_CONTINUE; + + switch ( action & 0xFF) { + + case C_START: + Da.selectPoint = -1; + Da.extend[0] = FALSE; + Da.extend[1] = FALSE; + CreateBothEnds(Da.selectPoint); + Da.crvSegs_da.cnt = 0; + SetUpCornuParms(&cp); + if (CallCornu(Da.pos,Da.trk,Da.ep,&Da.crvSegs_da,&cp)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + else Da.crvSegs_da_cnt = 0; + Da.minRadius = CornuMinRadius(Da.pos,Da.crvSegs_da); + InfoMessage( _("Select End-Point") ); + DrawTempCornu(); + return C_CONTINUE; + + case C_DOWN: + if (Da.state != PICK_POINT) return C_CONTINUE; + dd = 10000.0; + Da.selectPoint = -1; + for (int i=0;i<2;i++) { + d = FindDistance(Da.pos[i],pos); + if (d < dd) { + dd = d; + Da.selectPoint = i; + } + } + if (!IsClose(dd) ) Da.selectPoint = -1; + if (Da.selectPoint == -1) { + wBeep(); + InfoMessage( _("Not close enough to end point, reselect") ); + return C_CONTINUE; + } else if (Da.trk[Da.selectPoint] && QueryTrack(Da.trk[Da.selectPoint],Q_IS_CORNU)){ + wBeep(); + InfoMessage( _("Is Cornu End -> Not Selectable") ); + return C_CONTINUE; + } else { + pos = Da.pos[Da.selectPoint]; + Da.state = POINT_PICKED; + InfoMessage( _("Drag point %d to new location and release it"),Da.selectPoint+1 ); + } + DrawTempCornu(); //wipe out + CreateBothEnds(Da.selectPoint); + SetUpCornuParms(&cp); + if (CallCornu(Da.pos, Da.trk,Da.ep, &Da.crvSegs_da, &cp)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + else Da.crvSegs_da_cnt = 0; + Da.minRadius = CornuMinRadius(Da.pos, Da.crvSegs_da); + DrawTempCornu(); + return C_CONTINUE; + + case C_MOVE: + if (Da.state != POINT_PICKED) { + InfoMessage(_("Pick any circle to adjust it by dragging - Enter to accept, Esc to cancel")); + return C_CONTINUE; + } + //If locked, reset pos to be on line from other track + int sel = Da.selectPoint; + coOrd pos2 = pos; + BOOL_T inside = FALSE; + if (Da.trk[sel]) { //There is a track + if (OnTrack(&pos,FALSE,TRUE) == Da.trk[sel]) { //And the pos is on it + inside = TRUE; + if (!QueryTrack(Da.trk[Da.selectPoint],Q_CORNU_CAN_MODIFY)) { //Turnouts + InfoMessage(_("Track can't be split")); + if (Da.ep[sel]>=0) //Ignore if turntable + pos = GetTrkEndPos(Da.trk[sel],Da.ep[sel]); + } + } else { + pos = pos2; //Put Back to original position as outside track + } + // Stop the user extending right through the other track + if (Da.ep[sel]>=0 && QueryTrack(Da.trk[sel],Q_CORNU_CAN_MODIFY)) { //For non-turnouts + if ((!QueryTrack(Da.trk[sel],Q_CAN_ADD_ENDPOINTS)) // But Not Helix or Circle + && (!QueryTrack(Da.trk[sel],Q_HAS_VARIABLE_ENDPOINTS))) { // Not a Turntable + DIST_T ab = FindDistance(GetTrkEndPos(Da.trk[sel],Da.ep[sel]),GetTrkEndPos(Da.trk[sel],1-Da.ep[sel])); + DIST_T ac = FindDistance(GetTrkEndPos(Da.trk[sel],Da.ep[sel]),pos); + DIST_T cb = FindDistance(GetTrkEndPos(Da.trk[sel],1-Da.ep[sel]), pos); + if (cb=cb) && (ac>=ab)) { //Closer to far end and as long as the track + pos = GetTrkEndPos(Da.trk[sel],1-Da.ep[sel]); //Make other end of track + } + } + } + } + DrawTempCornu(); //wipe out old + Da.extend[sel] = FALSE; + if(!Da.trk[sel]) { //Cornu with no ends + if (Da.radius[sel] == 0) { //Straight + Da.extendSeg[sel].type = SEG_STRTRK; + Da.extendSeg[sel].width = 0; + Da.extendSeg[sel].color = wDrawColorBlack; + Da.extendSeg[sel].u.l.pos[1-sel] = Da.pos[sel]; + d = FindDistance( Da.extendSeg[sel].u.l.pos[1-sel], pos ); + a = NormalizeAngle(Da.angle[sel]-FindAngle(pos,Da.pos[sel])); + if (cos(D2R(a))<=0) { + Translate( &Da.extendSeg[sel].u.l.pos[sel], + Da.extendSeg[sel].u.l.pos[1-sel], + Da.angle[sel], - d * cos(D2R(a))); + pos = Da.extendSeg[sel].u.l.pos[1-sel]; + Da.extend[sel] = TRUE; + } + } else { //Curve + Da.extendSeg[sel].type = SEG_CRVTRK; + Da.extendSeg[sel].width = 0; + Da.extendSeg[sel].color = wDrawColorBlack; + Da.extendSeg[sel].u.c.center = Da.center[sel]; + Da.extendSeg[sel].u.c.radius = Da.radius[sel]; + a = FindAngle( Da.center[sel], pos ); + PointOnCircle( &pos, Da.center[sel], Da.radius[sel], a ); + a2 = FindAngle(Da.center[sel],Da.pos[sel]); + if (((Da.angle[sel] < 180) && (a2>90 && a2<270)) || + ((Da.angle[sel] > 180) && (a2<90 || a2>270))) { + Da.extendSeg[sel].u.c.a0 = a; + Da.extendSeg[sel].u.c.a1 = NormalizeAngle(a2-a); + } else { + Da.extendSeg[sel].u.c.a0 = a2; + Da.extendSeg[sel].u.c.a1 = NormalizeAngle(a-a2); + } + if (Da.extendSeg[sel].u.c.a1 == 0 || Da.extendSeg[sel].u.c.a1 >180 ) + Da.extend[sel] = FALSE; + else + Da.extend[sel] = TRUE; + } + } else { //Cornu with ends + if (inside) Da.pos[sel] = pos; + if (!GetConnectedTrackParms(Da.trk[sel],pos,sel,Da.ep[sel])) { + DrawTempCornu(); + wBeep(); + return C_CONTINUE; //Stop drawing + } + CorrectHelixAngles(); + if (!inside) { //Extend the track + if (Da.trackType[sel] == curveTypeStraight) { //Extend with a straight + Da.extendSeg[sel].type = SEG_STRTRK; + Da.extendSeg[sel].width = 0; + Da.extendSeg[sel].color = wDrawColorBlack; + if (Da.ep[sel]>=0) { + Da.extendSeg[sel].u.l.pos[0] = GetTrkEndPos( Da.trk[sel], Da.ep[sel] ); + a = NormalizeAngle(Da.angle[sel]-FindAngle(pos,GetTrkEndPos(Da.trk[sel],Da.ep[sel]))); + } else { //Turntable when unconnected + Da.extendSeg[sel].u.l.pos[0] = Da.pos[sel]; + a = NormalizeAngle(Da.angle[sel]-FindAngle(pos,Da.pos[sel])); + } + // Remove any extend in opposite direction for Turntable/Turnouts + if ((QueryTrack(Da.trk[sel],Q_CAN_ADD_ENDPOINTS) && Da.ep[sel]>=0) + && (!QueryTrack(Da.trk[sel],Q_CORNU_CAN_MODIFY)) + && (a>90 && a<270)) { + Da.extend[sel] = FALSE; //Turntable with point and extension is other side of well + Da.pos[sel] = GetTrkEndPos(Da.trk[sel],Da.ep[sel]); + } else { + Da.extend[sel] = TRUE; + d = FindDistance( Da.extendSeg[sel].u.l.pos[0], pos ); + Translate( &Da.extendSeg[sel].u.l.pos[1], + Da.extendSeg[sel].u.l.pos[0], + Da.angle[sel], -d * cos(D2R(a))); + Da.pos[sel] = pos = Da.extendSeg[sel].u.l.pos[1]; + } + } else if (Da.trackType[sel] == curveTypeCurve) { //Extend with temp curve + Da.extendSeg[sel].type = SEG_CRVTRK; + Da.extendSeg[sel].width = 0; + Da.extendSeg[sel].color = wDrawColorBlack; + Da.extendSeg[sel].u.c.center = Da.center[sel]; + Da.extendSeg[sel].u.c.radius = Da.radius[sel]; + a = FindAngle( Da.center[sel], pos ); + PointOnCircle( &pos, Da.center[sel], Da.radius[sel], a ); + a2 = FindAngle(Da.center[sel],GetTrkEndPos(Da.trk[sel],Da.ep[sel])); + if ((Da.angle[sel] < 180 && (a2>90 && a2 <270)) || + (Da.angle[sel] > 180 && (a2<90 || a2 >270))) { + Da.extendSeg[sel].u.c.a0 = a2; + Da.extendSeg[sel].u.c.a1 = NormalizeAngle(a-a2); + } else { + Da.extendSeg[sel].u.c.a0 = a; + Da.extendSeg[sel].u.c.a1 = NormalizeAngle(a2-a); + } + if (Da.extendSeg[sel].u.c.a1 == 0.0 || Da.extendSeg[sel].u.c.a1 >180 + || (Da.extendSeg[sel].u.c.a0 >= Da.arcA0[sel] && Da.extendSeg[sel].u.c.a0 < Da.arcA0[sel]+Da.arcA1[sel] + && Da.extendSeg[sel].u.c.a0 + Da.extendSeg[sel].u.c.a1 <= Da.arcA0[sel] + Da.arcA1[sel]) + ) { + Da.extend[sel] = FALSE; + Da.pos[sel] = pos; + } else { + Da.extend[sel] = TRUE; + Da.pos[sel] = pos; + } + + } else { //Bezier and Cornu that we are joining TO can't extend + DrawTempCornu(); //put back + wBeep(); + InfoMessage(_("Must be on the %s Track"),Da.trackType[sel]==curveTypeBezier?"Bezier":Da.trackType[sel]==curveTypeCornu?"Cornu":"Unknown Type"); + pos = GetTrkEndPos(Da.trk[sel],Da.ep[sel]); + return C_CONTINUE; + } + } + } + + CreateBothEnds(Da.selectPoint); + SetUpCornuParms(&cp); //In case we want to use these because the ends are not on the track + + if (CallCornu(Da.pos, Da.trk, Da.ep, &Da.crvSegs_da,&cp)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + else Da.crvSegs_da_cnt = 0; + Da.minRadius = CornuMinRadius(Da.pos,Da.crvSegs_da); + DIST_T rin = Da.radius[0]; + InfoMessage( _("Cornu : Min Radius=%s Max Rate of Radius Change=%s Length=%s Winding Arc=%s"), + FormatDistance(Da.minRadius), + FormatDistance(CornuMaxRateofChangeofCurvature(Da.pos,Da.crvSegs_da,&rin)), + FormatDistance(CornuLength(Da.pos,Da.crvSegs_da)), + FormatDistance(CornuTotalWindingArc(Da.pos,Da.crvSegs_da))); + DrawTempCornu(); + return C_CONTINUE; + + case C_UP: + if (Da.state != POINT_PICKED) return C_CONTINUE; + ep = 0; + DrawTempCornu(); //wipe out + Da.selectPoint = -1; + CreateBothEnds(Da.selectPoint); + SetUpCornuParms(&cp); + if (CallCornu(Da.pos,Da.trk,Da.ep,&Da.crvSegs_da,&cp)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + else Da.crvSegs_da_cnt = 0; + Da.minRadius = CornuMinRadius(Da.pos,Da.crvSegs_da); + InfoMessage(_("Pick on point to adjust it along track - Enter to confirm, ESC to abort")); + DrawTempCornu(); + Da.state = PICK_POINT; + return C_CONTINUE; + + case C_OK: //C_OK is not called by Modify. + if ( Da.state == PICK_POINT ) { + Da.minRadius = CornuMinRadius(Da.pos,Da.crvSegs_da); + if (CornuTotalWindingArc(Da.pos,Da.crvSegs_da)>4*360) { + wBeep(); + InfoMessage(_("Cornu has too complex shape - adjust end pts")); + return C_CONTINUE; + } + if (!CheckHelix(NULL)) { + wBeep(); + return C_CONTINUE; + } + for (int i=0;i<2;i++) { + if (FindDistance(Da.pos[i],GetTrkEndPos(Da.trk[i],1-Da.ep[i])) < minLength) { + wBeep(); + InfoMessage(_("Cornu end %d too close to other end of connect track - reposition it"),i+1); + return C_CONTINUE; + } + } + + DrawTempCornu(); + UndoStart( _("Create Cornu"),"newCornu curve"); + t = NewCornuTrack( Da.pos, Da.center, Da.angle, Da.radius,(trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt); + if (t==NULL) { + wBeep(); + InfoMessage(_("Cornu Create Failed for p1[%0.3f,%0.3f] p2[%0.3f,%0.3f], c1[%0.3f,%0.3f] c2[%0.3f,%0.3f], a1=%0.3f a2=%0.3f, r1=%s r2=%s"), + Da.pos[0].x,Da.pos[0].y, + Da.pos[1].x,Da.pos[1].y, + Da.center[0].x,Da.center[0].y, + Da.center[1].x,Da.center[1].y, + Da.angle[0],Da.angle[1], + FormatDistance(Da.radius[0]),FormatDistance(Da.radius[1])); + return C_TERMINATE; + } + + CopyAttributes( Da.trk[0], t ); + + for (int i=0;i<2;i++) { + UndoModify(Da.trk[i]); + MoveEndPt(&Da.trk[i],&Da.ep[i],Da.pos[i],0); + if ((GetTrkType(Da.trk[i])==T_BEZIER) || (GetTrkType(Da.trk[i])==T_CORNU)) { //Bezier split position not precise, so readjust Cornu + GetConnectedTrackParms(Da.trk[i],GetTrkEndPos(Da.trk[i],Da.ep[i]),i,Da.ep[i]); + ANGLE_T endAngle = NormalizeAngle(GetTrkEndAngle(Da.trk[i],Da.ep[i])+180); + SetCornuEndPt(t,i,GetTrkEndPos(Da.trk[i],Da.ep[i]),Da.center[i],endAngle,Da.radius[i]); + } + if (Da.ep[i]>=0) + ConnectTracks(Da.trk[i],Da.ep[i],t,i); + } + UndoEnd(); + DrawNewTrack(t); + Da.state = NONE; + MainRedraw(); + MapRedraw(); + return C_TERMINATE; + } + return C_CONTINUE; + + case C_REDRAW: + DrawTempCornu(); + return C_CONTINUE; + + default: + return C_CONTINUE; + } + + +} + +struct extraData { + cornuData_t cornuData; + }; + +/** + * CmdCornuModify + * + * Called from Modify Command - this function deals with the real (old) track and calls AdjustCornuCurve to tune up the new one + * Sequence is this - + * - The C_START is called from CmdModify C_DOWN action if a track has being selected. The old track is hidden, the editable one is shown. + * - C_MOVES will be ignored until a C_UP ends the track selection and moves the state to PICK_POINT, + * - C_DOWN then hides the track and shows the Cornu circles. Selects a point (if close enough and available) and the state moves to POINT_PICKED + * - C_MOVE drags the point around modifying the curve + * - C_UP puts the state back to PICK_POINT (pick another) + * - C_OK (Enter/Space) creates the new track, deletes the old and shows the changed track. + * - C_CANCEL (Esc) sets the state to NONE and reshows the original track unchanged. + * + */ +STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos) { + track_p t; + struct extraData *xx = GetTrkExtraData(trk); + + switch (action&0xFF) { + case C_START: + Da.state = NONE; + DYNARR_RESET(trkSeg_t,Da.crvSegs_da); + Da.ep1Segs_da_cnt = 0; + Da.ep2Segs_da_cnt = 0; + Da.extend[0] = FALSE; + Da.extend[1] = FALSE; + Da.selectPoint = -1; + Da.selectTrack = NULL; + + + Da.selectTrack = trk; + Da.trk[0] = GetTrkEndTrk( trk, 0 ); + if (Da.trk[0]) Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],trk); + Da.trk[1] = GetTrkEndTrk( trk, 1 ); + if (Da.trk[1]) Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],trk); + + for (int i=0;i<2;i++) { + Da.pos[i] = xx->cornuData.pos[i]; //Copy parms from old trk + Da.radius[i] = xx->cornuData.r[i]; + Da.angle[i] = xx->cornuData.a[i]; + Da.center[i] = xx->cornuData.c[i]; + } + + + if ((Da.trk[0] && (!QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY) && !QueryTrack(Da.trk[0],Q_CAN_EXTEND))) && + (Da.trk[1] && (!QueryTrack(Da.trk[1],Q_CORNU_CAN_MODIFY) && !QueryTrack(Da.trk[1],Q_CAN_EXTEND)))) { + wBeep(); + ErrorMessage("Both Ends of this Cornu are UnAdjustable"); + return C_TERMINATE; + } + + InfoMessage(_("Track picked - now select a Point")); + Da.state = TRACK_SELECTED; + DrawTrack(Da.selectTrack,&mainD,wDrawColorWhite); //Wipe out real track, draw replacement + return AdjustCornuCurve(C_START, pos, InfoMessage); + + case C_DOWN: + if (Da.state == TRACK_SELECTED) return C_CONTINUE; //Ignore until first up + return AdjustCornuCurve(C_DOWN, pos, InfoMessage); + + + case C_MOVE: + if (Da.state == TRACK_SELECTED) return C_CONTINUE; //Ignore until first up and down + return AdjustCornuCurve(C_MOVE, pos, InfoMessage); + + case C_UP: + if (Da.state == TRACK_SELECTED) { + Da.state = PICK_POINT; //First time up, next time pick a point + } + return AdjustCornuCurve(C_UP, pos, InfoMessage); //Run Adjust + + case C_TEXT: + if ((action>>8) != 32) + return C_CONTINUE; + /* no break */ + case C_OK: + if (Da.state != PICK_POINT) { //Too early - abandon + InfoMessage(_("No changes made")); + Da.state = NONE; + //DYNARR_FREE(trkSeg_t,Da.crvSegs_da); + return C_CANCEL; + } + if (!CheckHelix(trk)) { + wBeep(); + return C_CONTINUE; + } + UndoStart( _("Modify Cornu"), "newCornu - CR" ); + for (int i=0;i<2;i++) { + if (!Da.trk[i] && Da.extend[i]) { + if (Da.extendSeg[i].type == SEG_STRTRK) { + Da.trk[i] = NewStraightTrack(Da.extendSeg[i].u.l.pos[0],Da.extendSeg[i].u.l.pos[1]); + if (Da.trk[i]) Da.ep[i] = 1-i; + } else { + Da.trk[i] = NewCurvedTrack(Da.extendSeg[i].u.c.center,fabs(Da.extendSeg[i].u.c.radius), + Da.extendSeg[i].u.c.a0,Da.extendSeg[i].u.c.a1,FALSE); + if (Da.angle[i]>180) + Da.ep[i] = (Da.extendSeg[i].u.c.a0>90 && Da.extendSeg[i].u.c.a0<270)?0:1; + else + Da.ep[i] = (Da.extendSeg[i].u.c.a0>90 && Da.extendSeg[i].u.c.a0<270)?1:0; + } + if (!Da.trk[i]) { + wBeep(); + InfoMessage(_("Cornu Extension Create Failed for end %d"),i); + return C_TERMINATE; + } + + } + } + + t = NewCornuTrack( Da.pos, Da.center, Da.angle, Da.radius, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt); + if (t==NULL) { + wBeep(); + InfoMessage(_("Cornu Create Failed for p1[%0.3f,%0.3f] p2[%0.3f,%0.3f], c1[%0.3f,%0.3f] c2[%0.3f,%0.3f], a1=%0.3f a2=%0.3f, r1=%s r2=%s"), + Da.pos[0].x,Da.pos[0].y, + Da.pos[1].x,Da.pos[1].y, + Da.center[0].x,Da.center[0].y, + Da.center[1].x,Da.center[1].y, + Da.angle[0],Da.angle[1], + FormatDistance(Da.radius[0]),FormatDistance(Da.radius[1])); + UndoUndo(); + MainRedraw(); + MapRedraw(); + //DYNARR_FREE(trkSeg_t,Da.crvSegs_da); + return C_TERMINATE; + } + + DeleteTrack(trk, TRUE); + + if (Da.trk[0]) UndoModify(Da.trk[0]); + if (Da.trk[1]) UndoModify(Da.trk[1]); + + for (int i=0;i<2;i++) { //Attach new track + if (Da.trk[i] && Da.ep[i] != -1) { //Like the old track + MoveEndPt(&Da.trk[i],&Da.ep[i],Da.pos[i],0); + if (GetTrkType(Da.trk[i])==T_BEZIER) { //Bezier split position not precise, so readjust Cornu + GetConnectedTrackParms(Da.trk[i],GetTrkEndPos(Da.trk[i],Da.ep[i]),i,Da.ep[i]); + ANGLE_T endAngle = NormalizeAngle(GetTrkEndAngle(Da.trk[i],Da.ep[i])+180); + SetCornuEndPt(t,i,GetTrkEndPos(Da.trk[i],Da.ep[i]),Da.center[i],endAngle,Da.radius[i]); + } + if (Da.ep[i]>= 0) + ConnectTracks(t,i,Da.trk[i],Da.ep[i]); + } + } + UndoEnd(); + MainRedraw(); + MapRedraw(); + Da.state = NONE; + //DYNARR_FREE(trkSeg_t,Da.crvSegs_da); + return C_TERMINATE; + + case C_CANCEL: + InfoMessage(_("Modify Cornu Cancelled")); + Da.state = NONE; + //DYNARR_FREE(trkSeg_t,Da.crvSegs_da); + MainRedraw(); + MapRedraw(); + return C_TERMINATE; + + case C_REDRAW: + return AdjustCornuCurve(C_REDRAW, pos, InfoMessage); + } + + return C_CONTINUE; + +} + +/* + * Find length by adding up the underlying segments. The segments can be straights, curves or bezier. + */ +DIST_T CornuLength(coOrd pos[4],dynArr_t segs) { + + DIST_T dd = 0.0; + if (segs.cnt == 0 ) return dd; + for (int i = 0;ir_max) r_max = rc; + } + * last_c = lc; + return r_max; +} + +/* + * Create a Cornu Curve Track + * Sequence is + * 1. Place 1st End + * 2. Place 2nd End + * 3 to n. Select and drag around points until done + * n+1. Confirm with enter or Cancel with Esc + */ +STATUS_T CmdCornu( wAction_t action, coOrd pos ) +{ + track_p t; + cornuParm_t cp; + + Da.color = lineColor; + Da.width = (double)lineWidth/mainD.dpi; + + switch (action&0xFF) { + + case C_START: + Da.state = NONE; + Da. selectPoint = -1; + for (int i=0;i<2;i++) { + Da.pos[i] = zero; + } + Da.trk[0] = Da.trk[1] = NULL; + //tempD.orig = mainD.orig; + + DYNARR_RESET(trkSeg_t,Da.crvSegs_da); + Da.ep1Segs_da_cnt = 0; + Da.ep2Segs_da_cnt = 0; + Da.extend[0] = FALSE; + Da.extend[1] = FALSE; + if (selectedTrackCount==0) + InfoMessage( _("Left click - join with Cornu track") ); + else + InfoMessage( _("Left click - join with Cornu track, Shift Left click - move to join") ); + return C_CONTINUE; + + case C_DOWN: + if ( Da.state == NONE || Da.state == LOC_2) { //Set the first or second point + coOrd p = pos; + int end = Da.state==NONE?0:1; + EPINX_T ep; + if ((t = OnTrack(&p, FALSE, TRUE)) != NULL) { + if (QueryTrack(t,Q_HAS_VARIABLE_ENDPOINTS)) { //Circle/Helix find if there is an open slot and where + if ((GetTrkEndTrk(t,0) != NULL) && (GetTrkEndTrk(t,1) != NULL)) { + InfoMessage(_("Helix Already Connected")); + return C_CONTINUE; + } + ep = -1; //Not a real ep yet + } else ep = PickUnconnectedEndPointSilent(p, t); + if (ep>=0 && QueryTrack(t,Q_CAN_ADD_ENDPOINTS)) ep=-1; //Ignore Turntable Unconnected + else if (ep==-1 && (!QueryTrack(t,Q_CAN_ADD_ENDPOINTS) && !QueryTrack(t,Q_HAS_VARIABLE_ENDPOINTS))) { //No endpoints and not Turntable or Helix/Circle + wBeep(); + InfoMessage(_("No Unconnected end point on that track")); + return C_CONTINUE; + } + Da.trk[end] = t; + Da.ep[end] = ep; // Note: -1 for Turntable or Circle + if (ep ==-1) pos = p; + else pos = GetTrkEndPos(t,ep); + Da.pos[end] = pos; + InfoMessage( _("Place 2nd end point of Cornu track on track with an unconnected end-point") ); + } else { + wBeep(); + InfoMessage(_("No Unconnected Track End there")); + return C_CONTINUE; + } + if (Da.state == NONE) { + if (!GetConnectedTrackParms(t, pos, 0, Da.ep[0])) { + Da.trk[0] = NULL; + return C_CONTINUE; + } + Da.state = POS_1; + Da.selectPoint = 0; + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0], FALSE, !QueryTrack(Da.trk[0],Q_IS_CORNU),QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY)); + DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,NULL,0,NULL,0,NULL,NULL,NULL,drawColorBlack); + InfoMessage( _("Move 1st end point of Cornu track along track 1") ); + } else { + if ( Da.trk[0] == t) { + ErrorMessage( MSG_JOIN_CORNU_SAME ); + Da.trk[1] = NULL; + return C_CONTINUE; + } + if (!GetConnectedTrackParms(t, pos, 1, Da.ep[1])) { + Da.trk[1] = NULL; //Turntable Fail + return C_CONTINUE; + } + CorrectHelixAngles(); + Da.selectPoint = 1; + Da.state = POINT_PICKED; + DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,NULL,0,NULL,0,NULL,NULL,NULL,drawColorBlack); //Wipe out initial Arm + CreateBothEnds(1); + if (CallCornu(Da.pos,Da.trk,Da.ep,&Da.crvSegs_da, &cp)) + Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + DrawTempCornu(); + InfoMessage( _("Move 2nd end point of Cornu track along track 2") ); + } + return C_CONTINUE; + } else { + return AdjustCornuCurve( action&0xFF, pos, InfoMessage ); + } + return C_CONTINUE; + + case C_MOVE: + if (Da.state == NONE) { + InfoMessage("Place 1st end point of Cornu track on unconnected end-point"); + return C_CONTINUE; + } + if (Da.state == POS_1) { + EPINX_T ep = 0; + BOOL_T found = FALSE; + int end = Da.state==POS_1?0:1; + if(!QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY) && !QueryTrack(Da.trk[0],Q_CAN_ADD_ENDPOINTS)) { + InfoMessage(_("Can't Split - Locked to End Point")); + return C_CONTINUE; + } + if (Da.trk[0] != OnTrack(&pos, FALSE, TRUE)) { + wBeep(); + InfoMessage(_("Point not on track 1")); + Da.state = POS_1; + Da.selectPoint = 1; + return C_CONTINUE; + } + t = Da.trk[0]; + DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,NULL,0,NULL,0,NULL,NULL,NULL,drawColorBlack); + if (!GetConnectedTrackParms(t, pos, ep, Da.ep[ep])) { + Da.state = POS_1; + Da.selectPoint = 1; + return C_CONTINUE; + } + Da.pos[ep] = pos; + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],TRUE,!QueryTrack(Da.trk[0],Q_IS_CORNU),QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY)); + DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,NULL,0,NULL,0,NULL,NULL,NULL,drawColorBlack); + } else { + return AdjustCornuCurve( action&0xFF, pos, InfoMessage ); + } + return C_CONTINUE; + + case C_UP: + if (Da.state == POS_1 && Da.trk[0]) { + DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,NULL,0,NULL,0,NULL,NULL,NULL,drawColorBlack); + Da.state = LOC_2; + InfoMessage( _("Put other end of Cornu on a track with an unconnected end point") ); + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0], FALSE,!QueryTrack(Da.trk[0],Q_IS_CORNU),QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY)); + DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,NULL,0,NULL,0,NULL,NULL,NULL,drawColorBlack); + return C_CONTINUE; + } else { + return AdjustCornuCurve( action&0xFF, pos, InfoMessage ); + } + case C_TEXT: + if (Da.state != PICK_POINT || (action>>8) != 32) //Space is same as Enter. + return C_CONTINUE; + /* no break */ + case C_OK: + if (Da.state != PICK_POINT) return C_CONTINUE; + return AdjustCornuCurve( C_OK, pos, InfoMessage); + + case C_REDRAW: + if ( Da.state != NONE ) { + DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,Da.ep2Segs,Da.ep2Segs_da_cnt,(trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da.cnt, NULL, &Da.extendSeg[0],&Da.extendSeg[1],Da.color); + } + return C_CONTINUE; + + case C_CANCEL: + if (Da.state != NONE) { + DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,Da.ep2Segs,Da.ep2Segs_da_cnt,(trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da.cnt, NULL, &Da.extendSeg[0],&Da.extendSeg[1],Da.color); + Da.ep1Segs_da_cnt = 0; + Da.ep2Segs_da_cnt = 0; + Da.crvSegs_da_cnt = 0; + for (int i=0;i<2;i++) { + Da.radius[i] = 0.0; + Da.angle[i] = 0.0; + Da.center[i] = zero; + Da.trk[i] = NULL; + Da.ep[i] = -1; + Da.pos[i] = zero; + } + //DYNARR_FREE(trkSeg_t,Da.crvSegs_da); + } + Da.state = NONE; + return C_CONTINUE; + + default: + + return C_CONTINUE; + } + +} + + +EXPORT void InitCmdCornu( wMenu_p menu ) +{ + +} diff --git a/app/bin/ccornu.h b/app/bin/ccornu.h new file mode 100644 index 0000000..a11e713 --- /dev/null +++ b/app/bin/ccornu.h @@ -0,0 +1,23 @@ +/* + * ccornu.h + * + * Created on: May 28, 2017 + * Author: richardsa + */ + +#ifndef APP_BIN_CCORNU_H_ +#define APP_BIN_CCORNU_H_ + + +typedef void (*cornuMessageProc)( char *, ... ); + + +#endif /* APP_BIN_CCORNU_H_ */ + +STATUS_T CmdCornu( wAction_t action, coOrd pos ); +DIST_T CornuMinRadius(coOrd pos[4],dynArr_t segs); +DIST_T CornuMaxRateofChangeofCurvature(coOrd pos[4],dynArr_t segs,DIST_T * last_c); +DIST_T CornuLength(coOrd pos[4],dynArr_t segs); +DIST_T CornuTotalWindingArc(coOrd pos[4],dynArr_t segs); + +STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos); diff --git a/app/bin/ccurve.c b/app/bin/ccurve.c index b284669..58bb5c1 100644 --- a/app/bin/ccurve.c +++ b/app/bin/ccurve.c @@ -1,8 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/ccurve.c,v 1.4 2008-03-06 19:35:04 m_fischer Exp $ - * +/** \file ccurve.c * CURVE - * */ /* XTrkCad - Model Railroad CAD @@ -23,12 +20,25 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include +#include + #include "ccurve.h" -#include "cstraigh.h" + #include "cjoin.h" +#include "cstraigh.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "messages.h" +#include "param.h" +#include "param.h" +#include "track.h" +#include "utility.h" +#include "wlib.h" +#include "cbezier.h" /* * STATE INFO @@ -39,12 +49,15 @@ static struct { coOrd pos0; coOrd pos1; curveData_t curveData; + track_p trk; + EPINX_T ep; + BOOL_T down; } Da; static long curveMode; -static void DrawArrowHeads( +EXPORT void DrawArrowHeads( trkSeg_p sp, coOrd pos, ANGLE_T angle, @@ -89,26 +102,34 @@ EXPORT STATUS_T CreateCurve( long mode, curveMessageProc message ) { + track_p t; DIST_T d; - ANGLE_T a; - static coOrd pos0; + ANGLE_T a, angle1, angle2; + static coOrd pos0, p; int inx; switch ( action ) { case C_START: DYNARR_SET( trkSeg_t, tempSegs_da, 8 ); + Da.down = FALSE; //Not got a valid start yet switch ( curveMode ) { case crvCmdFromEP1: - InfoMessage( _("Drag from End-Point in direction of curve") ); + if (track) + message(_("Drag from End-Point in direction of curve - Shift locks to track open end-point") ); + else + message (_("Drag from End-Point in direction of curve") ); break; case crvCmdFromTangent: - InfoMessage( _("Drag from End-Point to Center") ); + if (track) + message(_("Drag from End-Point to Center - Shift locks to track open end-point") ); + else + message(_("Drag from End-Point to Center") ); break; case crvCmdFromCenter: - InfoMessage( _("Drag from Center to End-Point") ); + message(_("Drag from Center to End-Point") ); break; case crvCmdFromChord: - InfoMessage( _("Drag to other end of chord") ); + message(_("Drag from one to other end of chord") ); break; } return C_CONTINUE; @@ -118,14 +139,40 @@ EXPORT STATUS_T CreateCurve( tempSegs(inx).width = 0; } tempSegs_da.cnt = 0; - SnapPos( &pos ); + p = pos; + BOOL_T found = FALSE; + Da.trk = NULL; + if ((mode == crvCmdFromEP1 || mode == crvCmdFromTangent) && track && (MyGetKeyState() & WKEY_SHIFT) != 0) { + if ((t = OnTrack(&p, FALSE, TRUE)) != NULL) { + EPINX_T ep = PickUnconnectedEndPointSilent(p, t); + if (ep != -1) { + Da.trk = t; + Da.ep = ep; + pos = GetTrkEndPos(t, ep); + found = TRUE; + } else { + Da.pos0=pos; + message(_("No unconnected end-point on track - Try again or release Shift and click")); + return C_CONTINUE; + } + } else { + Da.pos0=pos; + message(_("Not on a track - Try again or release Shift and click")); + return C_CONTINUE; + } + Da.down = TRUE; + } + Da.down = TRUE; + if (!found) SnapPos( &pos ); pos0 = pos; + Da.pos0 = pos; switch (mode) { case crvCmdFromEP1: tempSegs(0).type = (track?SEG_STRTRK:SEG_STRLIN); tempSegs(0).color = color; tempSegs(0).width = width; - message( _("Drag to set angle") ); + if (Da.trk) message(_("End Locked: Drag out curve start")); + else message(_("Drag along curve start") ); break; case crvCmdFromTangent: case crvCmdFromCenter: @@ -135,12 +182,14 @@ EXPORT STATUS_T CreateCurve( tempSegs(1).u.c.a0 = 0; tempSegs(1).u.c.a1 = 360; tempSegs(2).type = SEG_STRLIN; - message( mode==crvCmdFromTangent?_("Drag from End-Point to Center"):_("Drag from Center to End-Point") ); + if (Da.trk && mode==crvCmdFromTangent) message(_("End Locked: Drag out to center")); + else + message( mode==crvCmdFromTangent?_("Drag from End-Point to Center"):_("Drag from Center to End-Point") ); break; case crvCmdFromChord: tempSegs(0).type = (track?SEG_STRTRK:SEG_STRLIN); tempSegs(0).color = color; - tempSegs(0).width = width; + tempSegs(0).width = width; message( _("Drag to other end of chord") ); break; } @@ -148,16 +197,34 @@ EXPORT STATUS_T CreateCurve( return C_CONTINUE; case C_MOVE: + if (!Da.down) return C_CONTINUE; + if (Da.trk) { + angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk, Da.ep)); + angle2 = NormalizeAngle(FindAngle(pos, pos0)-angle1); + if (mode ==crvCmdFromEP1) { + if (angle2 > 90.0 && angle2 < 270.0) + Translate( &pos, pos0, angle1, -FindDistance( pos0, pos )*cos(D2R(angle2)) ); + else pos = pos0; + } else { + DIST_T dp = -FindDistance(pos0, pos)*sin(D2R(angle2)); + if (angle2 > 180.0) + Translate( &pos, pos0, angle1+90.0, dp ); + else + Translate( &pos, pos0, angle1-90.0, dp ); + } + } else SnapPos(&pos); tempSegs(0).u.l.pos[1] = pos; d = FindDistance( pos0, pos ); a = FindAngle( pos0, pos ); switch ( mode ) { case crvCmdFromEP1: - message( _("Angle=%0.3f"), PutAngle(a) ); + if (Da.trk) message( _("Start Locked: Drag out curve start - Angle=%0.3f"), PutAngle(a)); + else message( _("Drag out curve start - Angle=%0.3f"), PutAngle(a) ); tempSegs_da.cnt = 1; break; case crvCmdFromTangent: - message( _("Radius=%s Angle=%0.3f"), FormatDistance(d), PutAngle(a) ); + if (Da.trk) message( _("Tangent Locked: Drag out center - Radius=%s Angle=%0.3f"), FormatDistance(d), PutAngle(a) ); + else message( _("Drag out center - Radius=%s Angle=%0.3f"), FormatDistance(d), PutAngle(a) ); tempSegs(1).u.c.center = pos; DrawArrowHeads( &tempSegs(2), pos0, FindAngle(pos0,pos)+90, TRUE, wDrawColorBlack ); tempSegs_da.cnt = 7; @@ -181,10 +248,30 @@ EXPORT STATUS_T CreateCurve( break; } return C_CONTINUE; - case C_UP: + if (!Da.down) return C_CONTINUE; + if (Da.trk) { + angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk, Da.ep)); + angle2 = NormalizeAngle(FindAngle(pos, pos0)-angle1); + if (mode == crvCmdFromEP1) { + if (angle2 > 90.0 && angle2 < 270.0) { + Translate( &pos, pos0, angle1, -FindDistance( pos0, pos )*cos(D2R(angle2)) ); + Da.pos1 = pos; + } else { + ErrorMessage( MSG_TRK_TOO_SHORT, "Curved ", PutDim(0.0) ); + return C_TERMINATE; + } + } else { + DIST_T dp = -FindDistance(pos0, pos)*sin(D2R(angle2)); + if (angle2 > 180.0) + Translate( &pos, pos0, angle1+90.0, dp ); + else + Translate( &pos, pos0, angle1-90.0, dp ); + Da.pos1 = pos; + } + } switch (mode) { - case crvCmdFromEP1: + case crvCmdFromEP1: DrawArrowHeads( &tempSegs(1), pos, FindAngle(pos,pos0)+90, TRUE, drawColorRed ); tempSegs_da.cnt = 6; break; @@ -221,7 +308,9 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) case C_START: curveMode = (long)commandContext; Da.state = -1; + Da.pos0 = pos; tempSegs_da.cnt = 0; + STATUS_T rcode; return CreateCurve( action, pos, TRUE, wDrawColorBlack, 0, curveMode, InfoMessage ); case C_TEXT: @@ -232,25 +321,29 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) case C_DOWN: if ( Da.state == -1 ) { - SnapPos( &pos ); + //SnapPos( &pos ); Da.pos0 = pos; Da.state = 0; - return CreateCurve( action, pos, TRUE, wDrawColorBlack, 0, curveMode, InfoMessage ); + rcode = CreateCurve( action, pos, TRUE, wDrawColorBlack, 0, curveMode, InfoMessage ); + if (!Da.down) Da.state = -1; + return rcode; + //Da.pos0 = pos; } else { tempSegs_da.cnt = segCnt; return C_CONTINUE; } case C_MOVE: + if (Da.state<0) return C_CONTINUE; mainD.funcs->options = wDrawOptTemp; DrawSegs( &mainD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); if ( Da.state == 0 ) { - SnapPos( &pos ); - Da.pos1 = pos; + Da.pos1 = pos; rc = CreateCurve( action, pos, TRUE, wDrawColorBlack, 0, curveMode, InfoMessage ); } else { - SnapPos( &pos ); - PlotCurve( curveMode, Da.pos0, Da.pos1, pos, &Da.curveData, TRUE ); + // SnapPos( &pos ); + if (Da.trk) PlotCurve( curveMode, Da.pos0, Da.pos1, pos, &Da.curveData, FALSE ); + else PlotCurve( curveMode, Da.pos0, Da.pos1, pos, &Da.curveData, TRUE ); if (Da.curveData.type == curveTypeStraight) { tempSegs(0).type = SEG_STRTRK; tempSegs(0).u.l.pos[0] = Da.pos0; @@ -290,6 +383,7 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) case C_UP: + if (Da.state<0) return C_CONTINUE; mainD.funcs->options = wDrawOptTemp; DrawSegs( &mainD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); if (Da.state == 0) { @@ -313,6 +407,10 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) } UndoStart( _("Create Straight Track"), "newCurve - straight" ); t = NewStraightTrack( Da.pos0, Da.curveData.pos1 ); + if (Da.trk) { + EPINX_T ep = PickUnconnectedEndPoint(Da.pos0, t); + if (ep != -1) ConnectTracks(Da.trk, Da.ep, t, ep); + } UndoEnd(); } else if (Da.curveData.type == curveTypeCurve) { if ((d= Da.curveData.curveRadius * Da.curveData.a1 *2.0*M_PI/360.0) <= minLength) { @@ -322,6 +420,10 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) UndoStart( _("Create Curved Track"), "newCurve - curve" ); t = NewCurvedTrack( Da.curveData.curvePos, Da.curveData.curveRadius, Da.curveData.a0, Da.curveData.a1, 0 ); + if (Da.trk) { + EPINX_T ep = PickUnconnectedEndPoint(Da.pos0, t); + if (ep != -1) ConnectTracks(Da.trk, Da.ep, t, ep); + } UndoEnd(); } else { return C_ERROR; @@ -344,6 +446,7 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) DrawSegs( &mainD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); mainD.funcs->options = 0; tempSegs_da.cnt = 0; + Da.trk = NULL; } Da.state = -1; return C_CONTINUE; @@ -381,12 +484,12 @@ static void ComputeHelix( paramGroup_p, int, void * ); static paramFloatRange_t r0_360 = { 0, 360 }; static paramFloatRange_t r0_1000000 = { 0, 1000000 }; static paramIntegerRange_t i1_1000000 = { 1, 1000000 }; -static paramFloatRange_t r1_1000000 = { 1, 1000000 }; +static paramFloatRange_t r1_10000 = { 1, 10000 }; static paramFloatRange_t r0_100= { 0, 100 }; static paramData_t helixPLs[] = { { PD_FLOAT, &helixElev, "elev", PDO_DIM, &r0_1000000, N_("Elevation Difference") }, - { PD_FLOAT, &helixRadius, "radius", PDO_DIM, &r1_1000000, N_("Radius") }, + { PD_FLOAT, &helixRadius, "radius", PDO_DIM, &r1_10000, N_("Radius") }, { PD_LONG, &helixTurns, "turns", 0, &i1_1000000, N_("Turns") }, { PD_FLOAT, &helixAngSep, "angSep", 0, &r0_360, N_("Angular Separation") }, { PD_FLOAT, &helixGrade, "grade", 0, &r0_100, N_("Grade") }, @@ -396,7 +499,7 @@ static paramData_t helixPLs[] = { static paramGroup_t helixPG = { "helix", PGO_PREFMISCGROUP, helixPLs, sizeof helixPLs/sizeof helixPLs[0] }; static paramData_t circleRadiusPLs[] = { - { PD_FLOAT, &circleRadius, "radius", PDO_DIM, &r1_1000000 } }; + { PD_FLOAT, &circleRadius, "radius", PDO_DIM, &r1_10000 } }; static paramGroup_t circleRadiusPG = { "circle", 0, circleRadiusPLs, sizeof circleRadiusPLs/sizeof circleRadiusPLs[0] }; @@ -604,7 +707,19 @@ static STATUS_T CmdCircleCommon( wAction_t action, coOrd pos, BOOL_T helix ) case C_UP: DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); + if (helixRadius > mapD.size.x && helixRadius > mapD.size.y) { + ErrorMessage( MSG_RADIUS_TOO_BIG ); + return C_ERROR; + } + if (circleRadius > mapD.size.x && circleRadius > mapD.size.y) { + ErrorMessage( MSG_RADIUS_TOO_BIG ); + return C_ERROR; + } if ( helix ) { + if (helixRadius > 10000) { + ErrorMessage( MSG_RADIUS_GTR_10000 ); + return C_ERROR; + } UndoStart( _("Create Helix Track"), "newHelix" ); t = NewCurvedTrack( tempSegs(0).u.c.center, helixRadius, 0.0, 0.0, helixTurns ); } else { @@ -612,6 +727,10 @@ static STATUS_T CmdCircleCommon( wAction_t action, coOrd pos, BOOL_T helix ) ErrorMessage( MSG_RADIUS_GTR_0 ); return C_ERROR; } + if ((circleRadius > 100000) || (helixRadius > 10000)) { + ErrorMessage( MSG_RADIUS_GTR_10000 ); + return C_ERROR; + } UndoStart( _("Create Circle Track"), "newCircle" ); t = NewCurvedTrack( tempSegs(0).u.c.center, circleRadius, 0.0, 0.0, 0 ); } @@ -655,56 +774,15 @@ static STATUS_T CmdHelix( wAction_t action, coOrd pos ) return CmdCircleCommon( action, pos, TRUE ); } -#ifdef LATER -static struct { - coOrd pos; - DIST_T radius; - } Dc2; - - -static STATUS_T CmdCircle2( wAction_t action, coOrd pos ) -{ - - switch (action) { - - case C_START: - InfoMessage( _("Place circle center") ); - return C_CONTINUE; - - case C_DOWN: - Dc2.pos = pos; - InfoMessage( _("Drag to set radius") ); - return C_CONTINUE; - - case C_MOVE: - dc2.radius = ConstrainR( FindDistance( Dc2.pos, pos ) ); - InfoMessage( "%s", FormatDistance(dc2.radius) ); - return C_CONTINUE; - - case C_UP: - curCommand = cmdCircle; - InfoMessage( _("Place circle") ); - return C_CONTINUE; - - default: - return C_CONTINUE; - } -} -#endif - - - -#include "bitmaps/helix.xpm" #include "bitmaps/curve1.xpm" #include "bitmaps/curve2.xpm" #include "bitmaps/curve3.xpm" #include "bitmaps/curve4.xpm" +#include "bitmaps/bezier.xpm" #include "bitmaps/circle1.xpm" #include "bitmaps/circle2.xpm" #include "bitmaps/circle3.xpm" - - EXPORT void InitCmdCurve( wMenu_p menu ) { @@ -713,6 +791,7 @@ EXPORT void InitCmdCurve( wMenu_p menu ) AddMenuButton( menu, CmdCurve, "cmdCurveTangent", _("Curve from Tangent"), wIconCreatePixMap( curve2_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CURVE2, (void*)1 ); AddMenuButton( menu, CmdCurve, "cmdCurveCenter", _("Curve from Center"), wIconCreatePixMap( curve3_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CURVE3, (void*)2 ); AddMenuButton( menu, CmdCurve, "cmdCurveChord", _("Curve from Chord"), wIconCreatePixMap( curve4_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CURVE4, (void*)3 ); + AddMenuButton( menu, CmdBezCurve, "cmdBezier", _("Bezier Curve"), wIconCreatePixMap(bezier_xpm), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_BEZIER, (void*)bezCmdCreateTrack ); ButtonGroupEnd(); ButtonGroupBegin( _("Circle Track"), "cmdCurveSetCmd", _("Circle Tracks") ); @@ -726,10 +805,18 @@ EXPORT void InitCmdCurve( wMenu_p menu ) } -EXPORT void InitCmdHelix( wMenu_p menu ) -{ - AddMenuButton( menu, CmdHelix, "cmdHelix", _("Helix"), wIconCreatePixMap(helix_xpm), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_HELIX, NULL ); - ParamRegister( &helixPG ); - RegisterChangeNotification( ChangeHelixW ); +/** +* Append the helix command to the pulldown menu. The helix doesn't use an icon, so it is only +* available through the pulldown +* +* \param varname1 IN pulldown menu +* \return +*/ +void InitCmdHelix(wMenu_p menu) +{ + AddMenuButton(menu, CmdHelix, "cmdHelix", _("Helix"), NULL, LEVEL0_50, + IC_STICKY|IC_POPUP2, ACCL_HELIX, NULL); + ParamRegister(&helixPG); + RegisterChangeNotification(ChangeHelixW); } diff --git a/app/bin/ccurve.h b/app/bin/ccurve.h index 1b2c7f6..c9d1c8c 100644 --- a/app/bin/ccurve.h +++ b/app/bin/ccurve.h @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/ccurve.h,v 1.1 2005-12-07 15:47:36 rc-flyer Exp $ +/** \file ccurve.h + * Definitions for curve commands */ /* XTrkCad - Model Railroad CAD @@ -20,6 +20,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef HAVE_CCURVE_H +#define HAVE_CCURVE_H + +#include "draw.h" +#include "track.h" +#include "wlib.h" +#include "utility.h" typedef struct { curveType_e type; @@ -27,12 +34,14 @@ typedef struct { coOrd pos1; DIST_T curveRadius; ANGLE_T a0, a1; + BOOL_T negative; } curveData_t; #define crvCmdFromEP1 (0) #define crvCmdFromTangent (1) #define crvCmdFromCenter (2) #define crvCmdFromChord (3) +#define crvCmdFromCornu (4) #define circleCmdFixedRadius (0) #define circleCmdFromTangent (1) @@ -45,4 +54,7 @@ void PlotCurve( long, coOrd, coOrd, coOrd, curveData_t *, BOOL_T ); track_p NewCurvedTrack( coOrd, DIST_T, ANGLE_T, ANGLE_T, long ); DIST_T CurveDescriptionDistance( coOrd, track_p ); STATUS_T CurveDescriptionMove( track_p, wAction_t, coOrd ); -BOOL_T GetCurveMiddle( track_p, coOrd * ); +BOOL_T GetCurveMiddle( track_p , coOrd * ); +void DrawArrowHeads(trkSeg_p sp, coOrd pos, ANGLE_T angle, BOOL_T bidirectional, wDrawColor color ); + +#endif // !HAVE_CCURVE_H diff --git a/app/bin/cdraw.c b/app/bin/cdraw.c index efdb51a..418f32a 100644 --- a/app/bin/cdraw.c +++ b/app/bin/cdraw.c @@ -20,12 +20,22 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include +#include +#include + #include "ccurve.h" +#include "cbezier.h" #include "drawgeom.h" +#include "fileio.h" #include "i18n.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" +#include "misc.h" -#include +extern TRKTYP_T T_BZRLIN; extern void wSetSelectedFontSize(int size); @@ -200,14 +210,15 @@ static struct { wIndex_t dimenSize; descPivot_t pivot; wIndex_t fontSizeInx; - char text[STR_SIZE]; - LAYER_T layer; + char text[STR_LONG_SIZE]; + unsigned int layer; + char polyType[STR_SIZE]; } drawData; -typedef enum { E0, E1, CE, RA, LN, AL, A1, A2, VC, LW, CO, BE, OR, DS, TP, TA, TS, TX, PV, LY } drawDesc_e; +typedef enum { E0, E1, CE, RA, LN, AL, A1, A2, VC, LW, CO, BE, OR, DS, TP, TA, TS, TX, PV, LY, PT } drawDesc_e; static descData_t drawDesc[] = { -/*E0*/ { DESC_POS, N_("End Pt 1: X"), &drawData.endPt[0] }, -/*E1*/ { DESC_POS, N_("End Pt 2: X"), &drawData.endPt[1] }, -/*CE*/ { DESC_POS, N_("Center: X"), &drawData.center }, +/*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &drawData.endPt[0] }, +/*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &drawData.endPt[1] }, +/*CE*/ { DESC_POS, N_("Center: X,Y"), &drawData.center }, /*RA*/ { DESC_DIM, N_("Radius"), &drawData.radius }, /*LN*/ { DESC_DIM, N_("Length"), &drawData.length }, /*AL*/ { DESC_FLOAT, N_("Angle"), &drawData.angle }, @@ -219,12 +230,13 @@ static descData_t drawDesc[] = { /*BE*/ { DESC_LIST, N_("Lumber"), &drawData.benchChoice }, /*OR*/ { DESC_LIST, N_("Orientation"), &drawData.benchOrient }, /*DS*/ { DESC_LIST, N_("Size"), &drawData.dimenSize }, -/*TP*/ { DESC_POS, N_("Origin: X"), &drawData.endPt[0] }, +/*TP*/ { DESC_POS, N_("Origin: X,Y"), &drawData.endPt[0] }, /*TA*/ { DESC_FLOAT, N_("Angle"), &drawData.angle }, /*TS*/ { DESC_EDITABLELIST, N_("Font Size"), &drawData.fontSizeInx }, -/*TX*/ { DESC_STRING, N_("Text"), &drawData.text }, +/*TX*/ { DESC_TEXT, N_("Text"), &drawData.text }, /*PV*/ { DESC_PIVOT, N_("Pivot"), &drawData.pivot }, /*LY*/ { DESC_LAYER, N_("Layer"), &drawData.layer }, +/*PT*/ { DESC_STRING, N_("Type"), &drawData.polyType }, { DESC_NULL } }; int drawSegInx; @@ -241,14 +253,15 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) struct extraData *xx = GetTrkExtraData(trk); trkSeg_p segPtr; coOrd mid; - const char * text; long fontSize; if ( drawSegInx==-1 ) return; - if ( inx == -1 ) - return; segPtr = &xx->segs[drawSegInx]; + if ( inx == -1 ) { + if (segPtr->type != SEG_TEXT) return; + else inx = TX; //Always look at TextField for SEG_TEXT on "Done" + } MainRedraw(); MapRedraw(); UndrawNewTrack( trk ); @@ -286,7 +299,7 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) if ( segPtr->type != SEG_CRVLIN ) { drawData.length = FindDistance( drawData.endPt[0], drawData.endPt[1] ); } else { - drawData.length = segPtr->u.c.radius*2*M_PI*segPtr->u.c.a1/360.0; + drawData.length = fabs(segPtr->u.c.radius)*2*M_PI*segPtr->u.c.a1/360.0; } drawDesc[LN].mode |= DESC_CHANGE; break; @@ -375,12 +388,14 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) segPtr->u.t.fontSize = fontSize; break; case TX: - text = wStringGetValue( (wString_p)drawDesc[TX].control0 ); - if ( text && text[0] && strcmp( segPtr->u.t.string, text ) != 0 ) { + if ( wTextGetModified((wText_p)drawDesc[TX].control0 )) { + int len = wTextGetSize((wText_p)drawDesc[TX].control0); MyFree( segPtr->u.t.string ); - segPtr->u.t.string = MyStrdup( text ); - /*(char*)drawDesc[TX].valueP = segPtr->u.t.string;*/ + segPtr->u.t.string = (char *)MyMalloc(len+1); + wTextGetText((wText_p)drawDesc[TX].control0, segPtr->u.t.string, len+1); + segPtr->u.t.string[len] = '\0'; //Make sure of null term } + break; case LY: SetTrkLayer( trk, drawData.layer); @@ -400,6 +415,7 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) trkSeg_p segPtr; int inx; char * title = NULL; + char * polyType = NULL; DistanceSegs( xx->orig, xx->angle, xx->segCnt, xx->segs, &pos, &drawSegInx ); @@ -462,7 +478,7 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) break; case SEG_CRVLIN: REORIGIN( drawData.center, segPtr->u.c.center, xx->angle, xx->orig ); - drawData.radius = segPtr->u.c.radius; + drawData.radius = fabs(segPtr->u.c.radius); drawDesc[CE].mode = drawDesc[RA].mode = 0; if ( segPtr->u.c.a1 >= 360.0 ) { @@ -479,7 +495,7 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) break; case SEG_FILCRCL: REORIGIN( drawData.center, segPtr->u.c.center, xx->angle, xx->orig ); - drawData.radius = segPtr->u.c.radius; + drawData.radius = fabs(segPtr->u.c.radius); drawDesc[CE].mode = drawDesc[RA].mode = 0; drawDesc[LW].mode = DESC_IGNORE; @@ -488,21 +504,37 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) case SEG_POLY: drawData.pointCount = segPtr->u.p.cnt; drawDesc[VC].mode = DESC_RO; - title = _("Poly Line"); + drawDesc[PT].mode = DESC_RO; + switch (segPtr->u.p.polyType) { + case RECTANGLE: + polyType = _("Rectangle"); + break; + default: + polyType = _("Freeform"); + } + strncpy( drawData.polyType, polyType, sizeof drawData.polyType ); + title = _("Polygonal Line"); break; case SEG_FILPOLY: drawData.pointCount = segPtr->u.p.cnt; drawDesc[VC].mode = DESC_RO; drawDesc[LW].mode = DESC_IGNORE; + drawDesc[PT].mode = DESC_RO; + switch (segPtr->u.p.polyType) { + case RECTANGLE: + polyType =_("Rectangle"); + break; + default: + polyType = _("Freeform"); + } + strncpy( drawData.polyType, polyType, sizeof drawData.polyType ); title = _("Polygon"); break; case SEG_TEXT: REORIGIN( drawData.endPt[0], segPtr->u.t.pos, xx->angle, xx->orig ); - //drawData.angle = NormalizeAngle( segPtr->u.t.angle ); drawData.angle = NormalizeAngle( xx->angle ); strncpy( drawData.text, segPtr->u.t.string, sizeof drawData.text ); - /*drawData.fontSize = segPtr->u.t.fontSize;*/ - /*(char*)drawDesc[TX].valueP = segPtr->u.t.string;*/ + drawData.text[sizeof drawData.text-1] ='\0'; drawDesc[TP].mode = drawDesc[TS].mode = drawDesc[TX].mode = @@ -541,7 +573,7 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) static void DrawDraw( track_p t, drawCmd_p d, wDrawColor color ) { struct extraData * xx = GetTrkExtraData(t); - if ( (d->options&DC_QUICK) == 0 ) + if ( (d->funcs->options&DC_QUICK) == 0 ) DrawSegs( d, xx->orig, xx->angle, xx->segs, xx->segCnt, 0.0, color ); } @@ -668,7 +700,7 @@ static ANGLE_T GetAngleDraw( pos.x -= xx->orig.x; pos.y -= xx->orig.y; Rotate( &pos, zero, -xx->angle ); - angle = GetAngleSegs( xx->segCnt, xx->segs, pos, NULL ); + angle = GetAngleSegs( xx->segCnt, xx->segs, &pos, NULL, NULL, NULL, NULL, NULL); if ( ep0 ) *ep0 = -1; if ( ep1 ) *ep1 = -1; return NormalizeAngle( angle + xx->angle ); @@ -767,7 +799,69 @@ EXPORT BOOL_T OnTableEdgeEndPt( track_p trk, coOrd * pos ) return FALSE; } +EXPORT BOOL_T GetClosestEndPt( track_p trk, coOrd * pos) +{ + struct extraData *xx; + + if (GetTrkType(trk) == T_DRAW) { + ignoredTableEdge = NULL; + xx = GetTrkExtraData(trk); + if (xx->segCnt < 1) + return FALSE; + DIST_T dd0,dd1; + coOrd p00,p0,p1; + p00 = *pos; + if (GetTrkType(trk) == T_DRAW) { + Rotate(&p00,xx->orig,-xx->angle); + p00.x -= xx->orig.x; + p00.y -= xx->orig.y; + switch (xx->segs[0].type) { + case SEG_CRVLIN: + PointOnCircle( &p0, xx->segs[0].u.c.center, fabs(xx->segs[0].u.c.radius), xx->segs[0].u.c.a0 ); + dd0 = FindDistance( p00, p0); + PointOnCircle( &p1, xx->segs[0].u.c.center, fabs(xx->segs[0].u.c.radius), xx->segs[0].u.c.a0 + xx->segs[0].u.c.a1); + dd1 = FindDistance( p00, p1); + break; + case SEG_STRLIN: + dd0 = FindDistance( p00, xx->segs[0].u.l.pos[0]); + p0 = xx->segs[0].u.l.pos[0]; + dd1 = FindDistance( p00, xx->segs[0].u.l.pos[1]); + p1 = xx->segs[0].u.l.pos[1]; + break; + case SEG_BEZLIN: + dd0 = FindDistance( p00, xx->segs[0].u.b.pos[0]); + p0 = xx->segs[0].u.b.pos[0]; + dd1 = FindDistance( p00, xx->segs[0].u.b.pos[3]); + p1 = xx->segs[0].u.b.pos[3]; + break; + default: + return FALSE; + } + p0.x += xx->orig.x; + p0.y += xx->orig.y; + Rotate(&p0,xx->orig,xx->angle); + p1.x += xx->orig.x; + p1.y += xx->orig.y; + Rotate(&p1,xx->orig,xx->angle); + } else if (GetTrkType(trk) == T_BZRLIN) { + coOrd p0,p1; + xx = GetTrkExtraData(trk); + p0 = xx->segs[0].u.b.pos[0]; + p1 = xx->segs[0].u.b.pos[3]; + dd0 = FindDistance(p00,p0); + dd1 = FindDistance(p00,p1); + } else return FALSE; + if (dd0>dd1) { + * pos = p1; + return TRUE; + } else { + * pos = p0; + return TRUE; + } + } + return FALSE; +} static void DrawRedraw(void); @@ -783,15 +877,13 @@ static void DrawRedraw( void ) MapRedraw(); } - static wIndex_t benchChoice; static wIndex_t benchOrient; static wIndex_t dimArrowSize; -static wDrawColor lineColor; +wDrawColor lineColor = 1; +long lineWidth = 0; static wDrawColor benchColor; -#ifdef LATER -static wIndex_t benchInx; -#endif + static paramIntegerRange_t i0_100 = { 0, 100, 25 }; static paramData_t drawPLs[] = { @@ -802,7 +894,11 @@ static paramData_t drawPLs[] = { #define drawBenchColorPD (drawPLs[2]) { PD_COLORLIST, &benchColor, "benchcolor", PDO_NORECORD, NULL, N_("Color") }, #define drawBenchChoicePD (drawPLs[3]) - { PD_DROPLIST, &benchChoice, "benchlist", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, (void*)80, N_("Lumber Type") }, +#ifdef WINDOWS + { PD_DROPLIST, &benchChoice, "benchlist", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, (void*)120, N_("Lumber Type") }, +#else + { PD_DROPLIST, &benchChoice, "benchlist", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, (void*)145, N_("Lumber Type") }, +#endif #define drawBenchOrientPD (drawPLs[4]) #ifdef WINDOWS { PD_DROPLIST, &benchOrient, "benchorient", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, (void*)45, "", 0 }, @@ -832,6 +928,7 @@ static char * objectName[] = { N_("Filled Circle"), N_("Filled Box"), N_("Polygon"), + N_("Bezier Line"), NULL}; static STATUS_T CmdDraw( wAction_t action, coOrd pos ) @@ -842,6 +939,8 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) char * labels[3]; static char labelName[40]; + wAction_t act2 = (action&0xFF) | (bezCmdCreateLine<<8); + switch (action&0xFF) { case C_START: @@ -870,6 +969,7 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) case OP_CIRCLE3: case OP_BOX: case OP_POLY: + case OP_BEZLIN: controls[0] = drawWidthPD.control; controls[1] = drawColorPD.control; controls[2] = NULL; @@ -879,6 +979,7 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) InfoSubstituteControls( controls, labels ); drawWidthPD.option &= ~PDO_NORECORD; drawColorPD.option &= ~PDO_NORECORD; + lineWidth = drawCmdContext.Width; break; case OP_FILLCIRCLE2: case OP_FILLCIRCLE3: @@ -935,12 +1036,17 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) infoSubst = FALSE; } ParamGroupRecord( &drawPG ); + if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); DrawGeomMouse( C_START, pos, &drawCmdContext ); return C_CONTINUE; case wActionLDown: ParamLoadData( &drawPG ); + if (drawCmdContext.Op == OP_BEZLIN) { + act2 = action | (bezCmdCreateLine<<8); + return CmdBezCurve(act2, pos); + } if ( drawCmdContext.Op == OP_BENCH ) { drawCmdContext.benchOption = GetBenchData( (long)wListGetItemContext((wList_p)drawBenchChoicePD.control, benchChoice ), benchOrient ); drawCmdContext.Color = benchColor; @@ -963,22 +1069,29 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) case wActionRUp: case wActionText: case C_CMDMENU: - SnapPos( &pos ); + if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); + if (!((MyGetKeyState() & WKEY_SHIFT) != 0)) { + SnapPos( &pos ); + } return DrawGeomMouse( action, pos, &drawCmdContext ); case C_CANCEL: InfoSubstituteControls( NULL, NULL ); + if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); return DrawGeomMouse( action, pos, &drawCmdContext ); case C_OK: + if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); return DrawGeomMouse( (0x0D<<8|wActionText), pos, &drawCmdContext ); /*DrawOk( NULL );*/ case C_FINISH: + if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); return DrawGeomMouse( (0x0D<<8|wActionText), pos, &drawCmdContext ); /*DrawOk( NULL );*/ case C_REDRAW: + if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); return DrawGeomMouse( action, pos, &drawCmdContext ); default: @@ -1004,6 +1117,7 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) #include "bitmaps/dfilbox.xpm" #include "bitmaps/dpoly.xpm" #include "bitmaps/dfilpoly.xpm" +#include "bitmaps/dbezier.xpm" typedef struct { char **xpm; @@ -1023,7 +1137,8 @@ static drawData_t dcurveCmds[] = { { dcurve1_xpm, OP_CURVE1, N_("Curve End"), N_("Draw Curve from End"), "cmdDrawCurveEndPt", ACCL_DRAWCURVE1 }, { dcurve2_xpm, OP_CURVE2, N_("Curve Tangent"), N_("Draw Curve from Tangent"), "cmdDrawCurveTangent", ACCL_DRAWCURVE2 }, { dcurve3_xpm, OP_CURVE3, N_("Curve Center"), N_("Draw Curve from Center"), "cmdDrawCurveCenter", ACCL_DRAWCURVE3 }, - { dcurve4_xpm, OP_CURVE4, N_("Curve Chord"), N_("Draw Curve from Chord"), "cmdDrawCurveChord", ACCL_DRAWCURVE4 } }; + { dcurve4_xpm, OP_CURVE4, N_("Curve Chord"), N_("Draw Curve from Chord"), "cmdDrawCurveChord", ACCL_DRAWCURVE4 }, + { dbezier_xpm, OP_BEZLIN, N_("Bezier Curve"), N_("Draw Bezier"), "cmdDrawBezierCurve", ACCL_DRAWBEZLINE } }; static drawData_t dcircleCmds[] = { /*{ dcircle1_xpm, OP_CIRCLE1, "Circle Fixed Radius", "Draw Fixed Radius Circle", "cmdDrawCircleFixedRadius", ACCL_DRAWCIRCLE1 },*/ { dcircle2_xpm, OP_CIRCLE3, N_("Circle Tangent"), N_("Draw Circle from Tangent"), "cmdDrawCircleTangent", ACCL_DRAWCIRCLE2 }, @@ -1052,12 +1167,11 @@ static drawStuff_t drawStuff[4]; static drawStuff_t drawStuff[4] = { { "cmdDrawLineSetCmd", N_("Straight Objects"), N_("Draw Straight Objects"), 4, dlineCmds }, - { "cmdDrawCurveSetCmd", N_("Curved Lines"), N_("Draw Curved Lines"), 4, dcurveCmds }, + { "cmdDrawCurveSetCmd", N_("Curved Lines"), N_("Draw Curved Lines"), 5, dcurveCmds }, { "cmdDrawCircleSetCmd", N_("Circle Lines"), N_("Draw Circles"), 4, dcircleCmds }, { "cmdDrawShapeSetCmd", N_("Shapes"), N_("Draw Shapes"), 4, dshapeCmds} }; - static void ChangeDraw( long changes ) { wIndex_t choice, orient; @@ -1079,6 +1193,15 @@ static void DrawDlgUpdate( int inx, void * valueP ) { + if (drawCmdContext.Op == OP_BEZLIN) { + if ( (inx == 0 && pg->paramPtr[inx].valueP == &drawCmdContext.Width) || + (inx == 1 && pg->paramPtr[inx].valueP == &lineColor)) + { + lineWidth = drawCmdContext.Width; + UpdateParms(lineColor, lineWidth); + } + } + if ( inx >= 0 && pg->paramPtr[inx].valueP == &benchChoice ) BenchUpdateOrientationList( (long)wListGetItemContext( (wList_p)drawBenchChoicePD.control, (wIndex_t)*(long*)valueP ), (wList_p)drawBenchOrientPD.control ); } @@ -1108,9 +1231,7 @@ EXPORT void InitCmdDraw( wMenu_p menu ) ParamRegister( &drawPG ); RegisterChangeNotification( ChangeDraw ); -#ifdef LATER - InitCommand( cmdDraw, N_("Draw"), draw_bits, LEVEL0_50, IC_POPUP|IC_CMDMENU, ACCL_DRAW ); -#endif + } @@ -1168,7 +1289,6 @@ EXPORT track_p NewText( return trk; } - EXPORT BOOL_T ReadText( char * line ) { coOrd pos; @@ -1190,6 +1310,10 @@ EXPORT BOOL_T ReadText( char * line ) return FALSE; } + char * old = text; + text = ConvertFromEscapedText(text); + MyFree(old); + trk = NewText( index, pos, angle, text, textSize, color ); SetTrkLayer( trk, layer ); MyFree(text); diff --git a/app/bin/celev.c b/app/bin/celev.c index 164ea43..2677f2e 100644 --- a/app/bin/celev.c +++ b/app/bin/celev.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/celev.c,v 1.4 2008-03-06 19:35:05 m_fischer Exp $ +/** /file celev.c + * ELEVATION */ /* XTrkCad - Model Railroad CAD @@ -19,16 +19,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include +#include -#include "track.h" #include "cselect.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" - -/***************************************************************************** - * - * ELEVATION - * - */ +#include "param.h" +#include "track.h" static wWin_p elevW; diff --git a/app/bin/cgroup.c b/app/bin/cgroup.c index 76b15ca..b173987 100644 --- a/app/bin/cgroup.c +++ b/app/bin/cgroup.c @@ -1,6 +1,4 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cgroup.c,v 1.2 2008-01-20 23:29:15 mni77 Exp $ - * +/** \file cgroup.c * Compound tracks: Group * */ @@ -24,10 +22,23 @@ */ #include -#include "track.h" +#include +#include + #include "compound.h" -#include "shrtpath.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "tbezier.h" +#include "tcornu.h" +#include "common.h" +#include "messages.h" +#include "param.h" +#include "shrtpath.h" +#include "track.h" +#include "utility.h" + /***************************************************************************** * @@ -46,6 +57,10 @@ static char groupPartno[STR_SIZE]; static char groupTitle[STR_SIZE]; static int groupCompoundCount = 0; +extern TRKTYP_T T_BZRTRK; +extern TRKTYP_T T_BZRLIN; +extern TRKTYP_T T_CORNU; + typedef struct { int segInx; EPINX_T segEP; @@ -666,7 +681,11 @@ static char * FindPathBtwEP( if ( ep1+ep2 != 1 ) AbortProg( "findPathBtwEP" ); *flip = ( ep1 == 1 ); - return "\1\0\0"; + if (GetTrkType(trk) == T_CORNU ) { // Cornu doesn't have a path but lots of segs! + cp = CreateSegPathList(trk); // Make path +LOG( log_group, 2, ( " Group: Cornu path:%s \n", cp ) ) + } else cp = "\1\0\0"; //One segment (but could be a Bezier) + return cp; } cp = (char *)xx->paths; pos1 = GetTrkEndPos(trk,ep1); @@ -678,7 +697,7 @@ static char * FindPathBtwEP( pos2.x -= xx->orig.x; pos2.y -= xx->orig.y; while ( cp[0] ) { - cp += strlen(cp)+1; + cp += strlen(cp)+1; //Ignore Path Name while ( cp[0] ) { cp0 = cp; epN = -1; @@ -691,8 +710,8 @@ static char * FindPathBtwEP( if ( epN != -1 ) { GetSegInxEP( cp[-1], &segInx, &segEP ); if ( CheckTurnoutEndPoint( &xx->segs[segInx], epN==0?pos1:pos2, 1-segEP ) ) { - *flip = epN==0; - return cp0; + *flip = epN==0; // If its reversed, set up to be flipped or noted + return cp0; //Found path between EPs } } cp++; @@ -995,6 +1014,12 @@ static void GroupOk( void * junk ) DrawSegs( &groupD, xx->orig, xx->angle, segPtr, 1, trackGauge, wDrawColorBlack ); } } + } else if (GetTrkType(trk) == T_BEZIER || GetTrkType(trk) == T_BZRLIN ) { + DYNARR_APPEND(trkSeg_t, trackSegs_da, 10); + segPtr = &trackSegs(trackSegs_da.cnt-1); + GetBezierSegmentFromTrack(trk,segPtr); + } else if (GetTrkType(trk) == T_CORNU) { + GetBezierSegmentsFromCornu(trk,&trackSegs_da); //Only give back Bezier - cant be undone } else { segCnt = tempSegs_da.cnt; oldOptions = groupD.options; @@ -1072,6 +1097,7 @@ static void GroupOk( void * junk ) } /* Make sure no turnouts in groupTrk list have a path end which is not an EndPt */ + //TODO Add Trap Points (which are Turnouts with a bumper track) for ( inx=0; inx= 1 && logTable(log_group).level > log_group ) { for ( pinx=0; pinxtrk), ppp->ep2, ppp->ep1 ); if ( flip ) path += strlen((char *)path)-1; - while ( *path ) { + while ( *path && (path >= ppp->path) ) { //Add Guard for flip backwards DYNARR_APPEND( char, pathPtr_da, 10 ); pathChar = *path; flip1 = flip; @@ -1568,6 +1594,7 @@ EXPORT void DoGroup( void ) xx = NULL; groupSegCnt = 0; groupCompoundCount = 0; + while ( TrackIterate( &trk ) ) { if ( GetTrkSelected( trk ) ) { trkType = GetTrkType(trk); @@ -1575,9 +1602,8 @@ EXPORT void DoGroup( void ) xx = GetTrkExtraData(trk); groupSegCnt += xx->segCnt; GroupCopyTitle( xtitle(xx) ); - } else { + } else groupSegCnt += 1; - } } } if ( groupSegCnt <= 0 ) { diff --git a/app/bin/chndldto.c b/app/bin/chndldto.c index 2e1f826..fa88398 100644 --- a/app/bin/chndldto.c +++ b/app/bin/chndldto.c @@ -1,7 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/chndldto.c,v 1.4 2008-03-06 19:35:05 m_fischer Exp $ - * - * CURVE +/** \file chndlto.c + * Handlaid turnout * */ @@ -23,13 +21,17 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include + #include "ccurve.h" -#include "cstraigh.h" #include "cjoin.h" #include "compound.h" -#include +#include "cstraigh.h" +#include "cundo.h" #include "i18n.h" +#include "messages.h" +#include "track.h" +#include "utility.h" #define PTRACE(X) @@ -297,7 +299,7 @@ PTRACE(( " a2=%0.1f rA1=%0.1f\n", angle2, reverseA1 )) ep2b = 0; break; case SEG_CRVTRK: - trk2b = NewCurvedTrack( segP->u.c.center, segP->u.c.radius, segP->u.c.a0, segP->u.c.a1, 0 ); + trk2b = NewCurvedTrack( segP->u.c.center, fabs(segP->u.c.radius), segP->u.c.a0, segP->u.c.a1, 0 ); ep2b = (right?0:1); } if (trk2 == NULL) { diff --git a/app/bin/chotbar.c b/app/bin/chotbar.c index f138cbb..188ad27 100644 --- a/app/bin/chotbar.c +++ b/app/bin/chotbar.c @@ -21,10 +21,13 @@ */ #include -#include "track.h" -#include "compound.h" - #include +#include + +#include "compound.h" +#include "fileio.h" +#include "messages.h" +#include "track.h" EXPORT DIST_T curBarScale = -1; EXPORT long hotBarLabels = 0; @@ -73,7 +76,7 @@ static void HotBarHighlight( int inx ) { wPos_t x0; if ( inx >= hotBarCurrStart && inx < hotBarCurrEnd ) { - x0 = (wPos_t)((hotBarMap(inx).x-hotBarMap((int)hotBarCurrStart).x)*hotBarD.dpi+2); + x0 = (wPos_t)((hotBarMap(inx).x-hotBarMap((int)hotBarCurrStart).x)*hotBarD.dpi); wDrawFilledRectangle( hotBarD.d, x0, 0, (wPos_t)(hotBarMap(inx).w*hotBarD.dpi-2), hotBarHeight, wDrawColorBlack, wDrawOptTemp ); } } @@ -101,30 +104,32 @@ static void RedrawHotBar( wDraw_p dd, void * data, wPos_t w, wPos_t h ) } if ( hotBarLabels && !hotBarFp ) hotBarFp = wStandardFont( F_HELV, FALSE, FALSE ); + wPos_t textSize = wMessageGetHeight(0L); for ( inx=hotBarCurrStart; inx < hotBarMap_da.cnt; inx++ ) { tbm = &hotBarMap(inx); barScale = tbm->barScale; - x = tbm->x - hotBarMap(hotBarCurrStart).x + 2.0/hotBarD.dpi; + x = tbm->x - hotBarMap(hotBarCurrStart).x; if ( x + tbm->w > barWidth ) { break; } orig.y = hh/2.0*barScale - tbm->size.y/2.0 - tbm->orig.y; if ( hotBarLabels ) { - orig.y += 8/hotBarD.dpi*barScale; + orig.y += textSize/hotBarD.dpi*barScale; if ( tbm->labelW > tbm->objectW ) { x += (tbm->labelW-tbm->objectW)/2; } } x *= barScale; - orig.x = x - tbm->orig.x; + orig.x = x; hotBarD.scale = barScale; hotBarD.size.x = barWidth*barScale; hotBarD.size.y = barHeight*barScale; tbm->proc( HB_DRAW, tbm->context, &hotBarD, &orig ); if ( hotBarLabels ) { - orig.x = x - (tbm->labelW-tbm->objectW)/2*barScale; - orig.y = 2*barScale/hotBarD.dpi; - DrawString( &hotBarD, orig, 0.0, tbm->proc( HB_BARTITLE, tbm->context, NULL, NULL ), hotBarFp, hotBarFs*barScale, drawColorBlack ); + hotBarD.scale = 1.0; + orig.x = tbm->x - hotBarMap(hotBarCurrStart).x; + orig.y = 2.0/hotBarD.dpi; //Draw Label under icon + DrawString( &hotBarD, orig, 0.0, tbm->proc( HB_BARTITLE, tbm->context, NULL, NULL ), hotBarFp, hotBarFs, drawColorBlack ); } } hotBarCurrEnd = inx; @@ -220,7 +225,8 @@ static void SelectHotBar( wDraw_p d, void * context, wAction_t action, wPos_t w, } x = w/hotBarD.dpi + hotBarMap(hotBarCurrStart).x; for ( inx=hotBarCurrStart; inx= hotBarMap(inx).x) && //leave spaces between buttons + (x <= hotBarMap(inx).x + hotBarMap(inx).w )) { break; } } @@ -231,7 +237,7 @@ static void SelectHotBar( wDraw_p d, void * context, wAction_t action, wPos_t w, px += (wPos_t)(tbm->w*hotBarD.dpi/2); titleP = tbm->proc( HB_LISTTITLE, tbm->context, NULL, NULL ); px -= wLabelWidth( titleP ) / 2; - wControlSetBalloon( (wControl_p)hotBarD.d, px, -5, titleP ); + wControlSetBalloon( (wControl_p)hotBarD.d, px, -20, titleP ); switch (action & 0xff) { case wActionLDown: pos.x = mainD.size.x+mainD.orig.x; @@ -380,7 +386,7 @@ EXPORT void AddHotBarElement( tbm->w = tbm->labelW; } } - hotBarWidth += tbm->w; + hotBarWidth += tbm->w + 2/hotBarD.dpi; } @@ -440,8 +446,9 @@ EXPORT void LayoutHotBar( void ) wWinGetSize( mainW, &winWidth, &winHeight ); hotBarHeight = hotBarDrawHeight; - if ( hotBarLabels) - hotBarHeight += 8; + if ( hotBarLabels) { + hotBarHeight += wMessageGetHeight(0L); + } if (hotBarLeftB == NULL) { wIcon_p bm_p; if (winWidth < 50) @@ -450,18 +457,18 @@ EXPORT void LayoutHotBar( void ) hotBarLeftB = wButtonCreate( mainW, 0, 0, "hotBarLeft", (char*)bm_p, BO_ICON, 0, DoHotBarLeft, NULL ); bm_p = wIconCreateBitMap( 16, 16, turnbarr_bits, wDrawColorBlack ); hotBarRightB = wButtonCreate( mainW, 0, 0, "hotBarRight", (char*)bm_p, BO_ICON, 0, DoHotBarRight, NULL ); - hotBarD.d = wDrawCreate( mainW, 0, 0, NULL, BD_NOCAPTURE, 100, hotBarHeight, NULL, RedrawHotBar, SelectHotBar ); + hotBarD.d = wDrawCreate( mainW, 0, 0, NULL, BD_NOCAPTURE|BD_NOFOCUS, 100, hotBarHeight, NULL, RedrawHotBar, SelectHotBar ); hotBarD.dpi = wDrawGetDPI( hotBarD.d ); hotBarD.scale = 1.0; initialize = TRUE; } buttonWidth = wControlGetWidth((wControl_p)hotBarLeftB); wControlSetPos( (wControl_p)hotBarLeftB, 0, toolbarHeight ); - wControlSetPos( (wControl_p)hotBarRightB, winWidth-buttonWidth, toolbarHeight ); + wControlSetPos( (wControl_p)hotBarRightB, winWidth-20-buttonWidth, toolbarHeight ); wControlSetPos( (wControl_p)hotBarD.d, buttonWidth, toolbarHeight ); - wDrawSetSize( hotBarD.d, winWidth-buttonWidth*2, hotBarHeight+2 ); - hotBarD.size.x = ((double)(winWidth-buttonWidth*2))/hotBarD.dpi*hotBarD.scale; - hotBarD.size.y = (double)hotBarHeight/hotBarD.dpi*hotBarD.scale; + wDrawSetSize( hotBarD.d, winWidth-20-buttonWidth*2, hotBarHeight+2 ); + hotBarD.size.x = ((double)(winWidth-20-buttonWidth*2))/hotBarD.dpi*hotBarD.scale; + hotBarD.size.y = (double)hotBarDrawHeight/hotBarD.dpi*hotBarD.scale; //Exclude Label from calc wControlShow( (wControl_p)hotBarLeftB, TRUE ); wControlShow( (wControl_p)hotBarRightB, TRUE ); wControlShow( (wControl_p)hotBarD.d, TRUE ); diff --git a/app/bin/cjoin.c b/app/bin/cjoin.c index e8d72eb..8cfa3d4 100644 --- a/app/bin/cjoin.c +++ b/app/bin/cjoin.c @@ -29,7 +29,15 @@ #include "ccurve.h" #include "cstraigh.h" #include "cjoin.h" +#include "ccornu.h" #include "i18n.h" +#include "utility.h" +#include "math.h" +#include "messages.h" +#include "param.h" +#include "cundo.h" +#include "cselect.h" +#include "fileio.h" static int log_join = 0; @@ -444,18 +452,25 @@ static STATUS_T CmdJoin( DIST_T eR[2]; BOOL_T ok; - switch (action) { + switch (action&0xFF) { case C_START: - InfoMessage( _("Left click - join with track, Shift Left click - move to join") ); + if (selectedTrackCount==0) + InfoMessage( _("Left click - join with track") ); + else + InfoMessage( _("Left click - join with track, Shift Left click - move to join") ); Dj.state = 0; Dj.joinMoveState = 0; /*ParamGroupRecord( &easementPG );*/ + if (easementVal < 0) + return CmdCornu(action, pos); return C_CONTINUE; case C_DOWN: if ( (Dj.state == 0 && (MyGetKeyState() & WKEY_SHIFT) != 0) || Dj.joinMoveState != 0 ) return DoMoveToJoin( pos ); + if (easementVal < 0.0) + return CmdCornu(action, pos); DYNARR_SET( trkSeg_t, tempSegs_da, 3 ); tempSegs(0).color = drawColorBlack; @@ -545,6 +560,8 @@ LOG( log_join, 1, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) tempSegs_da.cnt = 0; case C_MOVE: + if (easementVal < 0) + return CmdCornu(action, pos); LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) if (Dj.state != 2) @@ -580,6 +597,8 @@ LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) ((Dj.inp[0].params.ep==0)?-90.0:90.0) ); break; case curveTypeNone: + case curveTypeBezier: + case curveTypeCornu: break; } @@ -655,6 +674,11 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", d = Dj.inp[0].params.arcR * a1 * 2.0*M_PI/360.0; } break; + case curveTypeCornu: + case curveTypeBezier: + case curveTypeNone: + InfoMessage( _("First Track Type not supported for non-Cornu Join") ); + goto errorReturn; default: AbortProg( "cmdJoin - unknown type[0]" ); } @@ -682,6 +706,11 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", d = Dj.inp[1].params.arcR * a1 * 2.0*M_PI/360.0; } break; + case curveTypeCornu: + case curveTypeBezier: + case curveTypeNone: + InfoMessage( _("Second Track Type not supported for non-Cornu Join") ); + goto errorReturn; default: AbortProg( "cmdJoin - unknown type[1]" ); } @@ -775,8 +804,13 @@ errorReturn: return C_CONTINUE; case C_UP: - if (Dj.state == 0) - return C_CONTINUE; + + if (Dj.state == 0) { + if (easementVal<0) + return CmdCornu(action, pos); + else + return C_CONTINUE; + } if (Dj.state == 1) { InfoMessage( _("Select 2nd track") ); return C_CONTINUE; @@ -801,6 +835,8 @@ errorReturn: Dj.jRes.arcA0, Dj.jRes.arcA1, 0 ); break; case curveTypeNone: + case curveTypeBezier: + case curveTypeCornu: return C_CONTINUE; } @@ -822,65 +858,26 @@ errorReturn: DrawNewTrack( trk ); return rc; -#ifdef LATER - case C_LCLICK: - if ( (MyGetKeyState() & WKEY_SHIFT) == 0 ) { - rc = CmdJoin( C_DOWN, pos ); - if (rc == C_TERMINATE) - return rc; - return CmdJoin( C_UP, pos ); - } - if ( selectedTrackCount <= 0 ) { - ErrorMessage( MSG_NO_SELECTED_TRK ); - return C_CONTINUE; - } - if ( (Dj.inp[Dj.joinMoveState].trk = OnTrack( &pos, TRUE, TRUE )) == NULL ) - return C_CONTINUE; - if (!CheckTrackLayer( Dj.inp[Dj.joinMoveState].trk ) ) - return C_CONTINUE; - Dj.inp[Dj.joinMoveState].params.ep = PickUnconnectedEndPoint( pos, Dj.inp[Dj.joinMoveState].trk ); /* CHECKME */ - if ( Dj.inp[Dj.joinMoveState].params.ep == -1 ) { -#ifdef LATER - ErrorMessage( MSG_NO_ENDPTS ); -#endif - return C_CONTINUE; - } -#ifdef LATER - if ( GetTrkEndTrk( Dj.inp[Dj.joinMoveState].trk, Dj.inp[Dj.joinMoveState].params.ep ) ) { - ErrorMessage( MSG_SEL_EP_CONN ); - return C_CONTINUE; - } -#endif - if (Dj.joinMoveState == 0) { - Dj.joinMoveState++; - InfoMessage( GetTrkSelected(Dj.inp[0].trk)? - _("Click on an unselected End-Point"): - _("Click on a selected End-Point") ); - return C_CONTINUE; - } - if ( GetTrkSelected(Dj.inp[0].trk) == GetTrkSelected(Dj.inp[1].trk) ) { - ErrorMessage( MSG_2ND_TRK_NOT_SEL_UNSEL, GetTrkSelected(Dj.inp[0].trk) - ? _("unselected") : _("selected") ); - return C_CONTINUE; - } - if (GetTrkSelected(Dj.inp[0].trk)) - MoveToJoin( Dj.inp[0].trk, Dj.inp[0].params.ep, Dj.inp[1].trk, Dj.inp[1].params.ep ); - else - MoveToJoin( Dj.inp[1].trk, Dj.inp[1].params.ep, Dj.inp[0].trk, Dj.inp[0].params.ep ); - Dj.joinMoveState = 0; - return C_TERMINATE; - break; -#endif case C_CANCEL: case C_REDRAW: + + if ( Dj.joinMoveState == 1 || Dj.state == 1 ) { DrawFillCircle( &tempD, Dj.inp[0].pos, 0.10*mainD.scale, selectedColor ); - } + } else if (easementVal<0 ) + return CmdCornu(action,pos); + DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); break; + case C_TEXT: + case C_OK: + if (easementVal<0 ) + return CmdCornu(action,pos); } + + return C_CONTINUE; } diff --git a/app/bin/cjoin.h b/app/bin/cjoin.h index 021e0a1..8d9c7e3 100644 --- a/app/bin/cjoin.h +++ b/app/bin/cjoin.h @@ -1,7 +1,6 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cjoin.h,v 1.1 2005-12-07 15:47:39 rc-flyer Exp $ +/** \file cjoin.h + * Prototypes and definitions related to the "join" command */ - /* XTrkCad - Model Railroad CAD * Copyright (C) 2005 Dave Bullis * @@ -20,6 +19,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef HAVE_CJOIN_H +#define HAVE_CJOIN_H + +#include "common.h" +#include "wlib.h" +#include "track.h" + #define E_NOTREQ (0) #define E_REQ (1) #define E_ERROR (2) @@ -42,3 +48,6 @@ void UndoJoint( track_p, EPINX_T, track_p, EPINX_T ); void DrawJointTrack( drawCmd_p, coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, BOOL_T, BOOL_T, BOOL_T, track_p, EPINX_T, EPINX_T, DIST_T, wDrawColor, long ); DIST_T JointDistance( coOrd *, coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, BOOL_T, BOOL_T ); coOrd GetJointSegEndPos( coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, BOOL_T, BOOL_T, BOOL_T, EPINX_T, ANGLE_T * ); + +#endif // !HAVE_CJOIN_H + diff --git a/app/bin/cmisc.c b/app/bin/cmisc.c index 1e2ea39..227a7d0 100644 --- a/app/bin/cmisc.c +++ b/app/bin/cmisc.c @@ -20,16 +20,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include + #include "common.h" +#include "cundo.h" #include "i18n.h" - -/***************************************************************************** - * - * DESCRIPTION WINDOW - * - */ - +#include "messages.h" +#include "param.h" +#include "track.h" EXPORT wIndex_t describeCmdInx; EXPORT BOOL_T inDescribeCmd; @@ -45,6 +43,8 @@ static BOOL_T descNeedDrawHilite; static wPos_t describeW_posy; static wPos_t describeCmdButtonEnd; +static unsigned int editableLayerList[NUM_LAYERS]; /**< list of non-frozen layers */ +static int * layerValue; /**pointer to current Layer (int *) */ static paramFloatRange_t rdata = { 0, 0, 100, PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW }; static paramIntegerRange_t idata = { 0, 0, 100, PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW }; @@ -52,225 +52,339 @@ static paramTextData_t tdata = { 300, 150 }; static char * pivotLabels[] = { N_("First"), N_("Middle"), N_("Second"), NULL }; static paramData_t describePLs[] = { #define I_FLOAT_0 (0) - { PD_FLOAT, NULL, "F1", 0, &rdata }, - { PD_FLOAT, NULL, "F2", 0, &rdata }, - { PD_FLOAT, NULL, "F3", 0, &rdata }, - { PD_FLOAT, NULL, "F4", 0, &rdata }, - { PD_FLOAT, NULL, "F5", 0, &rdata }, - { PD_FLOAT, NULL, "F6", 0, &rdata }, - { PD_FLOAT, NULL, "F7", 0, &rdata }, - { PD_FLOAT, NULL, "F8", 0, &rdata }, - { PD_FLOAT, NULL, "F9", 0, &rdata }, - { PD_FLOAT, NULL, "F10", 0, &rdata }, - { PD_FLOAT, NULL, "F11", 0, &rdata }, - { PD_FLOAT, NULL, "F12", 0, &rdata }, - { PD_FLOAT, NULL, "F13", 0, &rdata }, - { PD_FLOAT, NULL, "F14", 0, &rdata }, - { PD_FLOAT, NULL, "F15", 0, &rdata }, - { PD_FLOAT, NULL, "F16", 0, &rdata }, - { PD_FLOAT, NULL, "F17", 0, &rdata }, - { PD_FLOAT, NULL, "F18", 0, &rdata }, - { PD_FLOAT, NULL, "F19", 0, &rdata }, - { PD_FLOAT, NULL, "F20", 0, &rdata }, -#define I_FLOAT_N I_FLOAT_0+20 + { PD_FLOAT, NULL, "F1", 0, &rdata }, + { PD_FLOAT, NULL, "F2", 0, &rdata }, + { PD_FLOAT, NULL, "F3", 0, &rdata }, + { PD_FLOAT, NULL, "F4", 0, &rdata }, + { PD_FLOAT, NULL, "F5", 0, &rdata }, + { PD_FLOAT, NULL, "F6", 0, &rdata }, + { PD_FLOAT, NULL, "F7", 0, &rdata }, + { PD_FLOAT, NULL, "F8", 0, &rdata }, + { PD_FLOAT, NULL, "F9", 0, &rdata }, + { PD_FLOAT, NULL, "F10", 0, &rdata }, + { PD_FLOAT, NULL, "F11", 0, &rdata }, + { PD_FLOAT, NULL, "F12", 0, &rdata }, + { PD_FLOAT, NULL, "F13", 0, &rdata }, + { PD_FLOAT, NULL, "F14", 0, &rdata }, + { PD_FLOAT, NULL, "F15", 0, &rdata }, + { PD_FLOAT, NULL, "F16", 0, &rdata }, + { PD_FLOAT, NULL, "F17", 0, &rdata }, + { PD_FLOAT, NULL, "F18", 0, &rdata }, + { PD_FLOAT, NULL, "F19", 0, &rdata }, + { PD_FLOAT, NULL, "F20", 0, &rdata }, + { PD_FLOAT, NULL, "F21", 0, &rdata }, + { PD_FLOAT, NULL, "F22", 0, &rdata }, + { PD_FLOAT, NULL, "F23", 0, &rdata }, + { PD_FLOAT, NULL, "F24", 0, &rdata }, + { PD_FLOAT, NULL, "F25", 0, &rdata }, + { PD_FLOAT, NULL, "F26", 0, &rdata }, + { PD_FLOAT, NULL, "F27", 0, &rdata }, + { PD_FLOAT, NULL, "F28", 0, &rdata }, + { PD_FLOAT, NULL, "F29", 0, &rdata }, + { PD_FLOAT, NULL, "F30", 0, &rdata }, + { PD_FLOAT, NULL, "F31", 0, &rdata }, + { PD_FLOAT, NULL, "F32", 0, &rdata }, + { PD_FLOAT, NULL, "F33", 0, &rdata }, + { PD_FLOAT, NULL, "F34", 0, &rdata }, + { PD_FLOAT, NULL, "F35", 0, &rdata }, + { PD_FLOAT, NULL, "F36", 0, &rdata }, + { PD_FLOAT, NULL, "F37", 0, &rdata }, + { PD_FLOAT, NULL, "F38", 0, &rdata }, + { PD_FLOAT, NULL, "F39", 0, &rdata }, + { PD_FLOAT, NULL, "F40", 0, &rdata }, +#define I_FLOAT_N I_FLOAT_0+40 #define I_LONG_0 I_FLOAT_N - { PD_LONG, NULL, "I1", 0, &idata }, - { PD_LONG, NULL, "I2", 0, &idata }, - { PD_LONG, NULL, "I3", 0, &idata }, - { PD_LONG, NULL, "I4", 0, &idata }, - { PD_LONG, NULL, "I5", 0, &idata }, + { PD_LONG, NULL, "I1", 0, &idata }, + { PD_LONG, NULL, "I2", 0, &idata }, + { PD_LONG, NULL, "I3", 0, &idata }, + { PD_LONG, NULL, "I4", 0, &idata }, + { PD_LONG, NULL, "I5", 0, &idata }, #define I_LONG_N I_LONG_0+5 #define I_STRING_0 I_LONG_N - { PD_STRING, NULL, "S1", 0, (void*)300 }, - { PD_STRING, NULL, "S2", 0, (void*)300 }, - { PD_STRING, NULL, "S3", 0, (void*)300 }, - { PD_STRING, NULL, "S4", 0, (void*)300 }, + { PD_STRING, NULL, "S1", 0, (void*)300 }, + { PD_STRING, NULL, "S2", 0, (void*)300 }, + { PD_STRING, NULL, "S3", 0, (void*)300 }, + { PD_STRING, NULL, "S4", 0, (void*)300 }, #define I_STRING_N I_STRING_0+4 #define I_LAYER_0 I_STRING_N - { PD_DROPLIST, NULL, "Y1", 0, (void*)150, NULL, 0 }, + { PD_DROPLIST, NULL, "Y1", 0, (void*)150, NULL, 0 }, #define I_LAYER_N I_LAYER_0+1 #define I_COLOR_0 I_LAYER_N - { PD_COLORLIST, NULL, "C1", 0, NULL, N_("Color") }, + { PD_COLORLIST, NULL, "C1", 0, NULL, N_("Color") }, #define I_COLOR_N I_COLOR_0+1 #define I_LIST_0 I_COLOR_N - { PD_DROPLIST, NULL, "L1", 0, (void*)150, NULL, 0 }, - { PD_DROPLIST, NULL, "L2", 0, (void*)150, NULL, 0 }, + { PD_DROPLIST, NULL, "L1", 0, (void*)150, NULL, 0 }, + { PD_DROPLIST, NULL, "L2", 0, (void*)150, NULL, 0 }, #define I_LIST_N I_LIST_0+2 #define I_EDITLIST_0 I_LIST_N - { PD_DROPLIST, NULL, "LE1", 0, (void*)150, NULL, BL_EDITABLE }, + { PD_DROPLIST, NULL, "LE1", 0, (void*)150, NULL, BL_EDITABLE }, #define I_EDITLIST_N I_EDITLIST_0+1 #define I_TEXT_0 I_EDITLIST_N - { PD_TEXT, NULL, "T1", 0, &tdata }, + { PD_TEXT, NULL, "T1", 0, &tdata }, #define I_TEXT_N I_TEXT_0+1 #define I_PIVOT_0 I_TEXT_N - { PD_RADIO, NULL, "P1", 0, pivotLabels, N_("Pivot"), BC_HORZ|BC_NOBORDER, 0 } + { PD_RADIO, NULL, "P1", 0, pivotLabels, N_("Pivot"), BC_HORZ|BC_NOBORDER, 0 } #define I_PIVOT_N I_PIVOT_0+1 - }; +}; static paramGroup_t describePG = { "describe", 0, describePLs, sizeof describePLs/sizeof describePLs[0] }; +/** + * A mapping table is used to map the index in the dropdown list to the layer + * number. While usually this is a 1:1 translation, the values differ if there + * are frozen layer. Frozen layers are not shown in the dropdown list. + */ + +void +CreateEditableLayersList() +{ + int i = 0; + int j = 0; + + while (i <= NUM_LAYERS) { + if (!GetLayerFrozen(i)) { + editableLayerList[j++] = i; + } + + i++; + } +} + +/** + * Search a layer in the list of editable layers. + * + * \param IN layer layer to search + * \return the index into the list + */ + +static int +SearchEditableLayerList(unsigned int layer) +{ + int i; + + for (i = 0; i < NUM_LAYERS; i++) { + if (editableLayerList[i] == layer) { + return (i); + } + } -static void DrawDescHilite( void ) + return (-1); +} + +static void DrawDescHilite(void) { - wPos_t x, y, w, h; - if ( descNeedDrawHilite == FALSE ) - return; - if (descColor==0) - descColor = wDrawColorGray(87); - w = (wPos_t)((descSize.x/mainD.scale)*mainD.dpi+0.5); - h = (wPos_t)((descSize.y/mainD.scale)*mainD.dpi+0.5); - mainD.CoOrd2Pix(&mainD,descOrig,&x,&y); - wDrawFilledRectangle( mainD.d, x, y, w, h, descColor, wDrawOptTemp ); + wPos_t x, y, w, h; + + if (descNeedDrawHilite == FALSE) { + return; + } + + if (descColor==0) { + descColor = wDrawColorGray(87); + } + + w = (wPos_t)((descSize.x/mainD.scale)*mainD.dpi+0.5); + h = (wPos_t)((descSize.y/mainD.scale)*mainD.dpi+0.5); + mainD.CoOrd2Pix(&mainD,descOrig,&x,&y); + wDrawFilledRectangle(mainD.d, x, y, w, h, descColor, wDrawOptTemp); } static void DescribeUpdate( - paramGroup_p pg, - int inx, - void * data ) + paramGroup_p pg, + int inx, + void * data) { - coOrd hi, lo; - descData_p ddp; - if ( inx < 0 ) - return; - ddp = (descData_p)pg->paramPtr[inx].context; - if ( (ddp->mode&(DESC_RO|DESC_IGNORE)) != 0 ) - return; - if ( ddp->type == DESC_PIVOT ) - return; - if ( (ddp->mode&DESC_NOREDRAW) == 0 ) - DrawDescHilite(); - if ( !descUndoStarted ) { - UndoStart( _("Change Track"), "Change Track" ); - descUndoStarted = TRUE; - } - if (!descTrk) return; // In case timer pops after OK - UndoModify( descTrk ); - descUpdateFunc( descTrk, ddp-descData, descData, FALSE ); - if ( descTrk ) { - GetBoundingBox( descTrk, &hi, &lo ); - if ( OFF_D( mapD.orig, mapD.size, descOrig, descSize ) ) { - ErrorMessage( MSG_MOVE_OUT_OF_BOUNDS ); - } - } - if ( (ddp->mode&DESC_NOREDRAW) == 0 ) { - descOrig = lo; - descSize = hi; - descOrig.x -= descBorder; - descOrig.y -= descBorder; - descSize.x -= descOrig.x-descBorder; - descSize.y -= descOrig.y-descBorder; - DrawDescHilite(); - } - for ( inx = 0; inx < sizeof describePLs/sizeof describePLs[0]; inx++ ) { - if ( (describePLs[inx].option & PDO_DLGIGNORE) != 0 ) - continue; - ddp = (descData_p)describePLs[inx].context; - if ( (ddp->mode&DESC_IGNORE) != 0 ) - continue; - if ( (ddp->mode&DESC_CHANGE) == 0 ) - continue; - ddp->mode &= ~DESC_CHANGE; - ParamLoadControl( &describePG, inx ); - } + coOrd hi, lo; + descData_p ddp; + + if (inx < 0) { + return; + } + + ddp = (descData_p)pg->paramPtr[inx].context; + + if ((ddp->mode&(DESC_RO|DESC_IGNORE)) != 0) { + return; + } + + if (ddp->type == DESC_PIVOT) { + return; + } + + if ((ddp->mode&DESC_NOREDRAW) == 0) { + DrawDescHilite(); + } + + if (!descUndoStarted) { + UndoStart(_("Change Track"), "Change Track"); + descUndoStarted = TRUE; + } + + if (!descTrk) { + return; // In case timer pops after OK + } + + UndoModify(descTrk); + descUpdateFunc(descTrk, ddp-descData, descData, FALSE); + + if (descTrk) { + GetBoundingBox(descTrk, &hi, &lo); + + if (OFF_D(mapD.orig, mapD.size, descOrig, descSize)) { + ErrorMessage(MSG_MOVE_OUT_OF_BOUNDS); + } + } + + if ((ddp->mode&DESC_NOREDRAW) == 0) { + descOrig = lo; + descSize = hi; + descOrig.x -= descBorder; + descOrig.y -= descBorder; + descSize.x -= descOrig.x-descBorder; + descSize.y -= descOrig.y-descBorder; + DrawDescHilite(); + } + + for (inx = 0; inx < sizeof describePLs/sizeof describePLs[0]; inx++) { + if ((describePLs[inx].option & PDO_DLGIGNORE) != 0) { + continue; + } + + ddp = (descData_p)describePLs[inx].context; + + if ((ddp->mode&DESC_IGNORE) != 0) { + continue; + } + + if ((ddp->mode&DESC_CHANGE) == 0) { + continue; + } + + ddp->mode &= ~DESC_CHANGE; + ParamLoadControl(&describePG, inx); + } } -static void DescOk( void * junk ) +static void DescOk(void * junk) { - wHide( describePG.win ); - if ( descTrk ) - DrawDescHilite(); - - descUpdateFunc( descTrk, -1, descData, !descUndoStarted ); - descTrk = NULL; - if (descUndoStarted) { - UndoEnd(); - descUndoStarted = FALSE; - } - descNeedDrawHilite = FALSE; - Reset(); + wHide(describePG.win); + + if (descTrk) { + DrawDescHilite(); + } + if (layerValue && *layerValue>=0) { + SetTrkLayer(descTrk, editableLayerList[*layerValue]); //int found that is really in the parm controls. + } + layerValue = NULL; // wipe out reference + descUpdateFunc(descTrk, -1, descData, !descUndoStarted); + descTrk = NULL; + + if (descUndoStarted) { + UndoEnd(); + descUndoStarted = FALSE; + } + + descNeedDrawHilite = FALSE; + Reset(); } static struct { - parameterType pd_type; - long option; - int first; - int last; - } descTypeMap[] = { -/*NULL*/ { 0, 0 }, -/*POS*/ { PD_FLOAT, PDO_DIM, I_FLOAT_0, I_FLOAT_N }, -/*FLOAT*/ { PD_FLOAT, 0, I_FLOAT_0, I_FLOAT_N }, -/*ANGLE*/ { PD_FLOAT, PDO_ANGLE, I_FLOAT_0, I_FLOAT_N }, -/*LONG*/ { PD_LONG, 0, I_LONG_0, I_LONG_N }, -/*COLOR*/ { PD_LONG, 0, I_COLOR_0, I_COLOR_N }, -/*DIM*/ { PD_FLOAT, PDO_DIM, I_FLOAT_0, I_FLOAT_N }, -/*PIVOT*/ { PD_RADIO, 0, I_PIVOT_0, I_PIVOT_N }, -/*LAYER*/ { PD_DROPLIST,PDO_LISTINDEX, I_LAYER_0, I_LAYER_N }, -/*STRING*/ { PD_STRING,0, I_STRING_0, I_STRING_N }, -/*TEXT*/ { PD_TEXT, PDO_DLGNOLABELALIGN, I_TEXT_0, I_TEXT_N }, -/*LIST*/ { PD_DROPLIST, PDO_LISTINDEX, I_LIST_0, I_LIST_N }, -/*EDITABLELIST*/{ PD_DROPLIST, 0, I_EDITLIST_0, I_EDITLIST_N } }; - -static wControl_p AllocateButt( descData_p ddp, void * valueP, char * label, wPos_t sep ) + parameterType pd_type; + long option; + int first; + int last; +} descTypeMap[] = { + /*NULL*/ { 0, 0 }, + /*POS*/ { PD_FLOAT, PDO_DIM, I_FLOAT_0, I_FLOAT_N }, + /*FLOAT*/ { PD_FLOAT, 0, I_FLOAT_0, I_FLOAT_N }, + /*ANGLE*/ { PD_FLOAT, PDO_ANGLE, I_FLOAT_0, I_FLOAT_N }, + /*LONG*/ { PD_LONG, 0, I_LONG_0, I_LONG_N }, + /*COLOR*/ { PD_LONG, 0, I_COLOR_0, I_COLOR_N }, + /*DIM*/ { PD_FLOAT, PDO_DIM, I_FLOAT_0, I_FLOAT_N }, + /*PIVOT*/ { PD_RADIO, 0, I_PIVOT_0, I_PIVOT_N }, + /*LAYER*/ { PD_DROPLIST,PDO_LISTINDEX, I_LAYER_0, I_LAYER_N }, + /*STRING*/ { PD_STRING,0, I_STRING_0, I_STRING_N }, + /*TEXT*/ { PD_TEXT, PDO_DLGNOLABELALIGN, I_TEXT_0, I_TEXT_N }, + /*LIST*/ { PD_DROPLIST, PDO_LISTINDEX, I_LIST_0, I_LIST_N }, + /*EDITABLELIST*/{ PD_DROPLIST, 0, I_EDITLIST_0, I_EDITLIST_N } +}; + +static wControl_p AllocateButt(descData_p ddp, void * valueP, char * label, + wPos_t sep) { - int inx; - - for ( inx = descTypeMap[ddp->type].first; inxtype].last; inx++ ) { - if ( (describePLs[inx].option & PDO_DLGIGNORE) != 0 ) { - describePLs[inx].option = descTypeMap[ddp->type].option; - if ( describeW_posy > describeCmdButtonEnd ) - describePLs[inx].option |= PDO_DLGUNDERCMDBUTT; - describeW_posy += wControlGetHeight( describePLs[inx].control ) + sep; - describePLs[inx].context = ddp; - describePLs[inx].valueP = valueP; - if ( label && ddp->type != DESC_TEXT ) { - wControlSetLabel( describePLs[inx].control, label ); - describePLs[inx].winLabel = label; - } - return describePLs[inx].control; - } - } - AbortProg( "allocateButt: can't find %d", ddp->type ); - return NULL; + int inx; + + for (inx = descTypeMap[ddp->type].first; inxtype].last; + inx++) { + if ((describePLs[inx].option & PDO_DLGIGNORE) != 0) { + describePLs[inx].option = descTypeMap[ddp->type].option; + + if (describeW_posy > describeCmdButtonEnd) { + describePLs[inx].option |= PDO_DLGUNDERCMDBUTT; + } + + if (sep) + describeW_posy += wControlGetHeight(describePLs[inx].control) + sep; + describePLs[inx].context = ddp; + describePLs[inx].valueP = valueP; + + if (label && ddp->type != DESC_TEXT) { + wControlSetLabel(describePLs[inx].control, label); + describePLs[inx].winLabel = label; + } + + return describePLs[inx].control; + } + } + + AbortProg("allocateButt: can't find %d", ddp->type); + return NULL; } static void DescribeLayout( - paramData_t * pd, - int inx, - wPos_t colX, - wPos_t * x, - wPos_t * y ) + paramData_t * pd, + int inx, + wPos_t colX, + wPos_t * x, + wPos_t * y) { - descData_p ddp; - wPos_t w, h; - - if ( inx < 0 ) - return; - if ( pd->context == NULL ) - return; - ddp = (descData_p)pd->context; - *y = ddp->posy; - if ( ddp->type == DESC_POS && - ddp->control0 != pd->control ) { - *y += wControlGetHeight( pd->control ) + 3; - } else if ( ddp->type == DESC_TEXT ) { - w = tdata.width; - h = tdata.height; - wTextSetSize( (wText_p)pd->control, w, h ); - } - wControlShow( pd->control, TRUE ); + descData_p ddp; + wPos_t w, h; + + if (inx < 0) { + return; + } + + if (pd->context == NULL) { + return; + } + + ddp = (descData_p)pd->context; + *y = ddp->posy; + + if (ddp->type == DESC_POS && + ddp->control0 != pd->control) { + *x += wControlGetWidth(pd->control) + 3; + } else if (ddp->type == DESC_TEXT) { + w = tdata.width; + h = tdata.height; + wTextSetSize((wText_p)pd->control, w, h); + } + + wControlShow(pd->control, TRUE); } @@ -278,89 +392,109 @@ static void DescribeLayout( * Creation and modification of the Describe dialog box is handled here. As the number * of values for a track element depends on the specific type, this dialog is dynamically * updated to hsow the changable parameters only - * + * * \param IN title Description of the selected part, shown in window title bar * \param IN trk Track element to be described * \param IN data * \param IN update * */ + static wList_p setLayerL; -void DoDescribe( char * title, track_p trk, descData_p data, descUpdate_t update ) +void DoDescribe(char * title, track_p trk, descData_p data, descUpdate_t update) { - int inx; - descData_p ddp; - char * label; - int ro_mode; - - if (!inDescribeCmd) - return; - - descTrk = trk; - descData = data; - descUpdateFunc = update; - describeW_posy = 0; - if ( describePG.win == NULL ) { - /* SDB 5.13.2005 */ - ParamCreateDialog( &describePG, _("Description"), _("Done"), DescOk, - (paramActionCancelProc) DescribeCancel, - TRUE, DescribeLayout, F_RECALLPOS, - DescribeUpdate ); - describeCmdButtonEnd = wControlBelow( (wControl_p)describePG.helpB ); - } - for ( inx=0; inxtype != DESC_NULL; ddp++ ) { - if ( ddp->mode&DESC_IGNORE ) - continue; - ddp->mode |= ro_mode; - } - for ( ddp=data; ddp->type != DESC_NULL; ddp++ ) { - if ( ddp->mode&DESC_IGNORE ) - continue; - label = _(ddp->label); - - ddp->posy = describeW_posy; - ddp->control0 = AllocateButt( ddp, ddp->valueP, label, (ddp->type == DESC_POS?3:3) ); - wControlActive( ddp->control0, ((ddp->mode|ro_mode)&DESC_RO)==0 ); - switch (ddp->type) { - case DESC_POS: - ddp->control1 = AllocateButt( ddp, - &((coOrd*)(ddp->valueP))->y, - "Y", - 3 ); - wControlActive( ddp->control1, ((ddp->mode|ro_mode)&DESC_RO)==0 ); - break; - case DESC_LAYER: - wListClear((wList_p)ddp->control0); // Rebuild list on each invovation - for ( inx = 0; inxcontrol0, message, NULL, (void*)(intptr_t)inx ); - } - } - break; - default: - break; - } - } - ParamLayoutDialog( &describePG ); - ParamLoadControls( &describePG ); - sprintf( message, "%s (T%d)", title, GetTrkIndex(trk) ); - wWinSetTitle( describePG.win, message ); - wShow( describePG.win ); + int inx; + descData_p ddp; + char * label; + int ro_mode; + + if (!inDescribeCmd) { + return; + } + + CreateEditableLayersList(); + descTrk = trk; + descData = data; + descUpdateFunc = update; + describeW_posy = 0; + + if (describePG.win == NULL) { + /* SDB 5.13.2005 */ + ParamCreateDialog(&describePG, _("Description"), _("Done"), DescOk, + (paramActionCancelProc) DescribeCancel, + TRUE, DescribeLayout, F_RECALLPOS, + DescribeUpdate); + describeCmdButtonEnd = wControlBelow((wControl_p)describePG.helpB); + } + + for (inx=0; inxtype != DESC_NULL; ddp++) { + if (ddp->mode&DESC_IGNORE) { + continue; + } + + ddp->mode |= ro_mode; + } + + for (ddp=data; ddp->type != DESC_NULL; ddp++) { + if (ddp->mode&DESC_IGNORE) { + continue; + } + + label = _(ddp->label); + ddp->posy = describeW_posy; + ddp->control0 = AllocateButt(ddp, ddp->valueP, label, + (ddp->type == DESC_POS?3:3)); + wControlActive(ddp->control0, ((ddp->mode|ro_mode)&DESC_RO)==0); + + switch (ddp->type) { + case DESC_POS: + ddp->control1 = AllocateButt(ddp, + &((coOrd*)(ddp->valueP))->y, + NULL, + 0); + wControlActive(ddp->control1, ((ddp->mode|ro_mode)&DESC_RO)==0); + break; + + case DESC_LAYER: + wListClear((wList_p)ddp->control0); // Rebuild list on each invovation + + for (inx = 0; inxcontrol0, layerFormattedName, NULL, (void*)(long)inx); + free(layerFormattedName); + } + + *(int *)(ddp->valueP) = SearchEditableLayerList(*(int *)(ddp->valueP)); + layerValue = (int *)(ddp->valueP); + break; + + default: + break; + } + } + + ParamLayoutDialog(&describePG); + ParamLoadControls(&describePG); + sprintf(message, "%s (T%d)", title, GetTrkIndex(trk)); + wWinSetTitle(describePG.win, message); + wShow(describePG.win); } -static void DescChange( long changes ) +static void DescChange(long changes) { - if ( (changes&CHANGE_UNITS) && describePG.win && wWinIsVisible(describePG.win) ) - ParamLoadControls( &describePG ); + if ((changes&CHANGE_UNITS) && describePG.win && wWinIsVisible(describePG.win)) { + ParamLoadControls(&describePG); + } } /***************************************************************************** @@ -370,81 +504,93 @@ static void DescChange( long changes ) */ -EXPORT void DescribeCancel( void ) +EXPORT void DescribeCancel(void) { - if ( describePG.win && wWinIsVisible(describePG.win) ) { - if ( descTrk ) { - descUpdateFunc( descTrk, -1, descData, TRUE ); - descTrk = NULL; - DrawDescHilite(); - } - wHide( describePG.win ); - if ( descUndoStarted ) { - UndoEnd(); - descUndoStarted = FALSE; - } - } - descNeedDrawHilite = FALSE; + if (describePG.win && wWinIsVisible(describePG.win)) { + if (descTrk) { + descUpdateFunc(descTrk, -1, descData, TRUE); + descTrk = NULL; + DrawDescHilite(); + } + + wHide(describePG.win); + + if (descUndoStarted) { + UndoEnd(); + descUndoStarted = FALSE; + } + } + + descNeedDrawHilite = FALSE; } -static STATUS_T CmdDescribe( wAction_t action, coOrd pos ) +static STATUS_T CmdDescribe(wAction_t action, coOrd pos) { - track_p trk; - char msg[STR_SIZE]; - - switch (action) { - case C_START: - InfoMessage( _("Select track to describe") ); - descUndoStarted = FALSE; - return C_CONTINUE; - - case C_DOWN: - if ((trk = OnTrack( &pos, FALSE, FALSE )) != NULL) { - if ( describePG.win && wWinIsVisible(describePG.win) && descTrk ) { - DrawDescHilite(); - descUpdateFunc( descTrk, -1, descData, TRUE ); - descTrk = NULL; - } - descBorder = mainD.scale*0.1; - if ( descBorder < trackGauge ) - descBorder = trackGauge; - inDescribeCmd = TRUE; - GetBoundingBox( trk, &descSize, &descOrig ); - descOrig.x -= descBorder; - descOrig.y -= descBorder; - descSize.x -= descOrig.x-descBorder; - descSize.y -= descOrig.y-descBorder; - descNeedDrawHilite = TRUE; - DrawDescHilite(); - DescribeTrack( trk, msg, 255 ); - inDescribeCmd = FALSE; - InfoMessage( msg ); - } else - InfoMessage( "" ); - return C_CONTINUE; - - case C_REDRAW: - if (describePG.win && wWinIsVisible(describePG.win) && descTrk) - DrawDescHilite(); - break; - - case C_CANCEL: - DescribeCancel(); - return C_CONTINUE; - } - return C_CONTINUE; + track_p trk; + char msg[STR_SIZE]; + + switch (action) { + case C_START: + InfoMessage(_("Select track to describe")); + descUndoStarted = FALSE; + return C_CONTINUE; + + case C_DOWN: + if ((trk = OnTrack(&pos, FALSE, FALSE)) != NULL) { + if (describePG.win && wWinIsVisible(describePG.win) && descTrk) { + DrawDescHilite(); + descUpdateFunc(descTrk, -1, descData, TRUE); + descTrk = NULL; + } + + descBorder = mainD.scale*0.1; + + if (descBorder < trackGauge) { + descBorder = trackGauge; + } + + inDescribeCmd = TRUE; + GetBoundingBox(trk, &descSize, &descOrig); + descOrig.x -= descBorder; + descOrig.y -= descBorder; + descSize.x -= descOrig.x-descBorder; + descSize.y -= descOrig.y-descBorder; + descNeedDrawHilite = TRUE; + DrawDescHilite(); + DescribeTrack(trk, msg, 255); + inDescribeCmd = FALSE; + InfoMessage(msg); + } else { + InfoMessage(""); + } + + return C_CONTINUE; + + case C_REDRAW: + if (describePG.win && wWinIsVisible(describePG.win) && descTrk) { + DrawDescHilite(); + } + + break; + + case C_CANCEL: + DescribeCancel(); + return C_CONTINUE; + } + + return C_CONTINUE; } #include "bitmaps/describe.xpm" -void InitCmdDescribe( wMenu_p menu ) +void InitCmdDescribe(wMenu_p menu) { - describeCmdInx = AddMenuButton( menu, CmdDescribe, "cmdDescribe", _("Properties"), wIconCreatePixMap(describe_xpm), - LEVEL0, IC_CANCEL|IC_POPUP, ACCL_DESCRIBE, NULL ); - RegisterChangeNotification( DescChange ); - ParamRegister( &describePG ); - /*AddPlaybackProc( "DESCRIBE", playbackDescribe, NULL );*/ + describeCmdInx = AddMenuButton(menu, CmdDescribe, "cmdDescribe", + _("Properties"), wIconCreatePixMap(describe_xpm), + LEVEL0, IC_CANCEL|IC_POPUP, ACCL_DESCRIBE, NULL); + RegisterChangeNotification(DescChange); + ParamRegister(&describePG); } diff --git a/app/bin/cmodify.c b/app/bin/cmodify.c index 6828ff9..594d742 100644 --- a/app/bin/cmodify.c +++ b/app/bin/cmodify.c @@ -1,6 +1,4 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cmodify.c,v 1.4 2008-03-06 19:35:05 m_fischer Exp $ - * +/** \file cmodify.c * TRACK MODIFY */ @@ -22,18 +20,20 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include + #include "cjoin.h" #include "ccurve.h" +#include "cbezier.h" +#include "ccornu.h" #include "cstraigh.h" +#include "cundo.h" +#include "fileio.h" #include "i18n.h" - -/***************************************************************************** - * - * MODIFY - * - */ - +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" static struct { track_p Trk; @@ -49,12 +49,73 @@ static struct { static int log_modify; +static BOOL_T modifyBezierMode; +static BOOL_T modifyCornuMode; + +/* + * Call cbezier.c CmdBezModify to alter Bezier Track and Lines. + * Picking a Bezier will allow control point(s) modifications until terminated with "Enter" + */ +static STATUS_T ModifyBezier(wAction_t action, coOrd pos) { + STATUS_T rc = C_CONTINUE; + if (Dex.Trk == NULL) return C_ERROR; //No track picked yet! + switch (action&0xFF) { + case C_START: + case C_DOWN: + case C_MOVE: + case C_UP: + case C_OK: + case C_TEXT: + rc = CmdBezModify(Dex.Trk, action, pos); + break; + case C_TERMINATE: + rc = CmdBezModify(Dex.Trk, action, pos); + Dex.Trk = NULL; + modifyBezierMode = FALSE; + break; + case C_REDRAW: + rc = CmdBezModify(Dex.Trk, action, pos); + break; + } + return rc; +} + +/* + * Call ccornu.c CmdCornuModify to alter Cornu Track and Lines. + * Picking a Cornu will allow end point(s) modifications until terminated with "Enter" + */ +static STATUS_T ModifyCornu(wAction_t action, coOrd pos) { + STATUS_T rc = C_CONTINUE; + if (Dex.Trk == NULL) return C_ERROR; //No track picked yet! + switch (action&0xFF) { + case C_START: + case C_DOWN: + case C_MOVE: + case C_UP: + case C_OK: + case C_TEXT: + rc = CmdCornuModify(Dex.Trk, action, pos); + break; + case C_TERMINATE: + rc = CmdCornuModify(Dex.Trk, action, pos); + Dex.Trk = NULL; + modifyCornuMode = FALSE; + break; + case C_REDRAW: + rc = CmdCornuModify(Dex.Trk, action, pos); + break; + } + return rc; +} static STATUS_T CmdModify( wAction_t action, coOrd pos ) /* - * Extend a track with a curve or straight. + * Extend and alter a track. + * Extend a track with a curve or straight and optionally an easement. + * Alter a ruler. + * Modify a Bezier. */ { @@ -86,10 +147,15 @@ static STATUS_T CmdModify( /*ChangeParameter( &easementPD );*/ trackGauge = 0.0; changeTrackMode = modifyRulerMode = FALSE; + modifyBezierMode = FALSE; + modifyCornuMode = FALSE; return C_CONTINUE; case C_DOWN: - changeTrackMode = modifyRulerMode = FALSE; + if (modifyBezierMode) + return ModifyBezier(C_DOWN, pos); + if (modifyCornuMode) + return ModifyCornu(C_DOWN, pos); DYNARR_SET( trkSeg_t, tempSegs_da, 2 ); tempSegs(0).color = wDrawColorBlack; tempSegs(0).width = 0; @@ -107,9 +173,29 @@ static STATUS_T CmdModify( Dex.Trk = NULL; return C_CONTINUE; } + if (QueryTrack( Dex.Trk, Q_CAN_MODIFY_CONTROL_POINTS )) { //Bezier + modifyBezierMode = TRUE; + if (ModifyBezier(C_START, pos) != C_CONTINUE) { //Call Start with track + modifyBezierMode = FALSE; //Function rejected Bezier + Dex.Trk =NULL; + tempSegs_da.cnt = 0; + } + return C_CONTINUE; //That's it + } + if (QueryTrack( Dex.Trk, Q_IS_CORNU )) { //Bezier + modifyCornuMode = TRUE; + if (ModifyCornu(C_START, pos) != C_CONTINUE) { //Call Start with track + modifyCornuMode = FALSE; //Function rejected Bezier + Dex.Trk =NULL; + tempSegs_da.cnt = 0; + } + return C_CONTINUE; //That's it + } + + trackGauge = (IsTrack(Dex.Trk)?GetTrkGauge(Dex.Trk):0.0); if ( (MyGetKeyState()&WKEY_SHIFT) && - QueryTrack( Dex.Trk, Q_CAN_MODIFYRADIUS ) && + QueryTrack( Dex.Trk, Q_CAN_MODIFYRADIUS )&& (inx=PickUnconnectedEndPoint(pos,Dex.Trk)) >= 0 ) { trk = Dex.Trk; while ( (trk1=GetTrkEndTrk(trk,1-inx)) && @@ -146,6 +232,10 @@ static STATUS_T CmdModify( return ModifyRuler( C_MOVE, pos ); if (Dex.Trk == NULL) return C_CONTINUE; + if ( modifyBezierMode ) + return ModifyBezier(C_MOVE, pos); + if ( modifyCornuMode ) + return ModifyCornu(C_MOVE, pos); DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); tempSegs_da.cnt = 0; SnapPos( &pos ); @@ -165,6 +255,10 @@ static STATUS_T CmdModify( return C_CONTINUE; if ( modifyRulerMode ) return ModifyRuler( C_MOVE, pos ); + if ( modifyBezierMode ) + return ModifyBezier( C_UP, pos); + if (modifyCornuMode) + return ModifyCornu(C_UP, pos); DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); tempSegs_da.cnt = 0; SnapPos( &pos ); @@ -181,6 +275,8 @@ static STATUS_T CmdModify( case C_RDOWN: changeTrackMode = TRUE; modifyRulerMode = FALSE; + modifyBezierMode = FALSE; + modifyCornuMode = FALSE; Dex.Trk = OnTrack( &pos, TRUE, TRUE ); if (Dex.Trk) { if (!CheckTrackLayer( Dex.Trk ) ) { @@ -212,10 +308,7 @@ LOG( log_modify, 1, ("extend endPt[%d] = [%0.3f %0.3f] A%0.3f\n", Dex.first = TRUE; MainRedraw(); MapRedraw(); -#ifdef LATER - return C_CONTINUE; -#endif - + /* no break */ case C_RMOVE: DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); tempSegs_da.cnt = 0; @@ -226,7 +319,21 @@ LOG( log_modify, 1, ("extend endPt[%d] = [%0.3f %0.3f] A%0.3f\n", return C_CONTINUE; Dex.first = FALSE; Dex.pos01 = Dex.pos00; - PlotCurve( crvCmdFromEP1, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, TRUE ); + if (Dex.params.type == curveTypeCornu) { //Restrict Cornu drag out to match end + ANGLE_T angle2 = NormalizeAngle(FindAngle(pos, Dex.pos00)-Dex.angle); + if (angle2 > 90.0 && angle2 < 270.0) { + if (Dex.params.cornuRadius[Dex.params.ep] == 0) { + Translate( &pos, Dex.pos00, Dex.angle, FindDistance( Dex.pos00, pos ) ); + } else { + ANGLE_T angle = FindAngle(Dex.params.cornuCenter[Dex.params.ep],pos)- + FindAngle(Dex.params.cornuCenter[Dex.params.ep],Dex.pos00); + pos=Dex.pos00; + Rotate(&pos,Dex.params.cornuCenter[Dex.params.ep],angle); + } + } else pos = Dex.pos00; //Only out from end + PlotCurve( crvCmdFromCornu, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, FALSE ); + } else + PlotCurve( crvCmdFromEP1, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, TRUE ); curveType = Dex.curveData.type; if ( curveType == curveTypeStraight ) { Dex.r1 = 0.0; @@ -382,6 +489,8 @@ LOG( log_modify, 1, ("A0 = %0.3f, A1 = %0.3f\n", return C_TERMINATE; case C_REDRAW: + if (modifyBezierMode) return ModifyBezier(C_REDRAW, pos); + if (modifyCornuMode) return ModifyCornu(C_REDRAW, pos); if ( (!changeTrackMode) && Dex.Trk && !QueryTrack( Dex.Trk, Q_MODIFY_REDRAW_DONT_UNDRAW_TRACK ) ) UndrawNewTrack( Dex.Trk ); DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); @@ -390,9 +499,15 @@ LOG( log_modify, 1, ("A0 = %0.3f, A1 = %0.3f\n", case C_TEXT: if ( !Dex.Trk ) return C_CONTINUE; + if (modifyBezierMode) + return ModifyBezier(action, pos); + if (modifyCornuMode) + return ModifyCornu(action, pos); return ModifyTrack( Dex.Trk, action, pos ); default: + if (modifyBezierMode) return ModifyBezier(action, pos); + if (modifyCornuMode) return ModifyCornu(action, pos); return C_CONTINUE; } } diff --git a/app/bin/cnote.c b/app/bin/cnote.c index 88c9986..3cbd28d 100644 --- a/app/bin/cnote.c +++ b/app/bin/cnote.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cnote.c,v 1.6 2008-03-10 18:59:53 m_fischer Exp $ +/** \file cnote.c + * NOTE */ /* XTrkCad - Model Railroad CAD @@ -19,23 +19,23 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include -#include "track.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" - -/***************************************************************************** - * - * NOTE - * - */ +#include "param.h" +#include "track.h" +#include "utility.h" static TRKTYP_T T_NOTE = -1; static wDrawBitMap_p note_bm; struct extraData { - coOrd pos; - char * text; - }; + coOrd pos; + char * text; +}; extern BOOL_T inDescribeCmd; @@ -49,56 +49,63 @@ static paramTextData_t noteTextData = { 300, 150 }; static paramData_t notePLs[] = { #define I_NOTETEXT (0) #define noteT ((wText_p)notePLs[I_NOTETEXT].control) - { PD_TEXT, NULL, "text", PDO_DLGRESIZE, ¬eTextData } }; + { PD_TEXT, NULL, "text", PDO_DLGRESIZE, ¬eTextData } +}; static paramGroup_t notePG = { "note", 0, notePLs, sizeof notePLs/sizeof notePLs[0] }; -static track_p NewNote( wIndex_t index, coOrd p, long size ) +static track_p NewNote(wIndex_t index, coOrd p, long size) { - track_p t; - struct extraData * xx; - t = NewTrack( index, T_NOTE, 0, sizeof *xx ); - xx = GetTrkExtraData(t); - xx->pos = p; - xx->text = (char*)MyMalloc( (int)size + 2 ); - SetBoundingBox( t, p, p ); - return t; + track_p t; + struct extraData * xx; + t = NewTrack(index, T_NOTE, 0, sizeof *xx); + xx = GetTrkExtraData(t); + xx->pos = p; + xx->text = (char*)MyMalloc((int)size + 2); + SetBoundingBox(t, p, p); + return t; } -void ClearNote( void ) +void ClearNote(void) { - if (mainText) { - MyFree(mainText); - mainText = NULL; - } + if (mainText) { + MyFree(mainText); + mainText = NULL; + } } -static void NoteOk( void * junk ) +static void NoteOk(void * junk) { - int len; - if ( wTextGetModified(noteT) ) { - ClearNote(); - len = wTextGetSize( noteT ); - mainText = (char*)MyMalloc( len+2 ); - wTextGetText( noteT, mainText, len ); - if (mainText[len-1] != '\n') { - mainText[len++] = '\n'; - } - mainText[len] = '\0'; - } - wHide( noteW ); + if (wTextGetModified(noteT)) { + int len; + ClearNote(); + len = wTextGetSize(noteT); + mainText = (char*)MyMalloc(len+2); + wTextGetText(noteT, mainText, len); + + if (mainText[len-1] != '\n') { + mainText[len++] = '\n'; + } + + mainText[len] = '\0'; + } + + wHide(noteW); } -void DoNote( void ) +void DoNote(void) { - if ( noteW == NULL ) { - noteW = ParamCreateDialog( ¬ePG, MakeWindowTitle(_("Note")), _("Ok"), NoteOk, NULL, FALSE, NULL, F_RESIZE, NULL ); - } - wTextClear( noteT ); - wTextAppend( noteT, mainText?mainText:_("Replace this text with your layout notes") ); - wTextSetReadonly( noteT, FALSE ); - wShow( noteW ); + if (noteW == NULL) { + noteW = ParamCreateDialog(¬ePG, MakeWindowTitle(_("Note")), _("Ok"), NoteOk, + NULL, FALSE, NULL, F_RESIZE, NULL); + } + + wTextClear(noteT); + wTextAppend(noteT, mainText?mainText: + _("Replace this text with your layout notes")); + wTextSetReadonly(noteT, FALSE); + wShow(noteW); } @@ -107,238 +114,287 @@ void DoNote( void ) * NOTE OBJECT */ -static void DrawNote( track_p t, drawCmd_p d, wDrawColor color ) +static void DrawNote(track_p t, drawCmd_p d, wDrawColor color) { - struct extraData *xx = GetTrkExtraData(t); - coOrd p[4]; - DIST_T dist; - if (d->scale >= 16) - return; - if ( (d->funcs->options & wDrawOptTemp) == 0 ) { - DrawBitMap( d, xx->pos, note_bm, color ); - } else { - dist = 0.1*d->scale; - p[0].x = p[1].x = xx->pos.x-dist; - p[2].x = p[3].x = xx->pos.x+dist; - p[1].y = p[2].y = xx->pos.y-dist; - p[3].y = p[0].y = xx->pos.y+dist; - DrawLine( d, p[0], p[1], 0, color ); - DrawLine( d, p[1], p[2], 0, color ); - DrawLine( d, p[2], p[3], 0, color ); - DrawLine( d, p[3], p[0], 0, color ); - } + struct extraData *xx = GetTrkExtraData(t); + coOrd p[4]; + + if (d->scale >= 16) { + return; + } + + if ((d->funcs->options & wDrawOptTemp) == 0) { + DrawBitMap(d, xx->pos, note_bm, color); + } else { + DIST_T dist; + dist = 0.1*d->scale; + p[0].x = p[1].x = xx->pos.x-dist; + p[2].x = p[3].x = xx->pos.x+dist; + p[1].y = p[2].y = xx->pos.y-dist; + p[3].y = p[0].y = xx->pos.y+dist; + DrawLine(d, p[0], p[1], 0, color); + DrawLine(d, p[1], p[2], 0, color); + DrawLine(d, p[2], p[3], 0, color); + DrawLine(d, p[3], p[0], 0, color); + } } -static DIST_T DistanceNote( track_p t, coOrd * p ) +static DIST_T DistanceNote(track_p t, coOrd * p) { - struct extraData *xx = GetTrkExtraData(t); - DIST_T d; - d = FindDistance( *p, xx->pos ); - if (d < 1.0) - return d; - return 100000.0; + struct extraData *xx = GetTrkExtraData(t); + DIST_T d; + d = FindDistance(*p, xx->pos); + + if (d < 1.0) { + return d; + } + + return 100000.0; } static struct { - coOrd pos; - } noteData; + coOrd pos; + unsigned int layer; +} noteData; typedef enum { OR, LY, TX } noteDesc_e; static descData_t noteDesc[] = { -/*OR*/ { DESC_POS, N_("Position"), ¬eData.pos }, -/*LY*/ { DESC_LAYER, N_("Layer"), NULL }, -/*TX*/ { DESC_TEXT, NULL, NULL }, - { DESC_NULL } }; - -static void UpdateNote( track_p trk, int inx, descData_p descUpd, BOOL_T needUndoStart ) + /*OR*/ { DESC_POS, N_("Position"), ¬eData.pos }, + /*LY*/ { DESC_LAYER, N_("Layer"), ¬eData.layer }, + /*TX*/ { DESC_TEXT, NULL, NULL }, + { DESC_NULL } +}; + +static void UpdateNote(track_p trk, int inx, descData_p descUpd, + BOOL_T needUndoStart) { - struct extraData *xx = GetTrkExtraData(trk); - int len; - - switch ( inx ) { - case OR: - UndrawNewTrack( trk ); - xx->pos = noteData.pos; - SetBoundingBox( trk, xx->pos, xx->pos ); - DrawNewTrack( trk ); - break; - case -1: - if ( wTextGetModified((wText_p)noteDesc[TX].control0) ) { - if ( needUndoStart ) - UndoStart( _("Change Track"), "Change Track" ); - UndoModify( trk ); - MyFree( xx->text ); - len = wTextGetSize( (wText_p)noteDesc[TX].control0 ); - xx->text = (char*)MyMalloc( len+2 ); - wTextGetText( (wText_p)noteDesc[TX].control0, xx->text, len ); - if (xx->text[len-1] != '\n') { - xx->text[len++] = '\n'; - } - xx->text[len] = '\0'; - } - break; - default: - break; - } + struct extraData *xx = GetTrkExtraData(trk); + + switch (inx) { + case OR: + xx->pos = noteData.pos; + SetBoundingBox(trk, xx->pos, xx->pos); + MainRedraw(); + break; + + case LY: + SetTrkLayer(trk, noteData.layer); + MainRedraw(); + break; + + case -1: + if (wTextGetModified((wText_p)noteDesc[TX].control0)) { + int len; + + if (needUndoStart) { + UndoStart(_("Change Track"), "Change Track"); + } + + UndoModify(trk); + MyFree(xx->text); + len = wTextGetSize((wText_p)noteDesc[TX].control0); + xx->text = (char*)MyMalloc(len+2); + wTextGetText((wText_p)noteDesc[TX].control0, xx->text, len); + + if (xx->text[len-1] != '\n') { + xx->text[len++] = '\n'; + } + + xx->text[len] = '\0'; + } + MainRedraw(); + break; + + default: + break; + } } -static void DescribeNote( track_p trk, char * str, CSIZE_T len ) +static void DescribeNote(track_p trk, char * str, CSIZE_T len) { - struct extraData * xx = GetTrkExtraData(trk); - - strcpy( str, _("Note: ") ); - len -= strlen(_("Note: ")); - str += strlen(_("Note: ")); - strncpy( str, xx->text, len ); - for (;*str;str++) { - if (*str=='\n') - *str = ' '; - } - noteData.pos = xx->pos; - noteDesc[TX].valueP = xx->text; - noteDesc[OR].mode = 0; - noteDesc[TX].mode = 0; - noteDesc[LY].mode = DESC_RO; - DoDescribe( _("Note"), trk, noteDesc, UpdateNote ); + struct extraData * xx = GetTrkExtraData(trk); + strcpy(str, _("Note: ")); + len -= strlen(_("Note: ")); + str += strlen(_("Note: ")); + strncpy(str, xx->text, len); + + for (; *str; str++) { + if (*str=='\n') { + *str = ' '; + } + } + + noteData.pos = xx->pos; + noteDesc[TX].valueP = xx->text; + noteDesc[OR].mode = 0; + noteDesc[TX].mode = 0; + noteDesc[LY].mode = DESC_NOREDRAW; + DoDescribe(_("Note"), trk, noteDesc, UpdateNote); } -static void DeleteNote( track_p t ) +static void DeleteNote(track_p t) { - struct extraData *xx = GetTrkExtraData(t); - if (xx->text) - MyFree( xx->text ); + struct extraData *xx = GetTrkExtraData(t); + + if (xx->text) { + MyFree(xx->text); + } } -static BOOL_T WriteNote( track_p t, FILE * f ) +static BOOL_T WriteNote(track_p t, FILE * f) { - struct extraData *xx = GetTrkExtraData(t); - int len; - BOOL_T addNL = FALSE; - BOOL_T rc = TRUE; - len = strlen(xx->text); - if ( xx->text[len-1] != '\n' ) { - len++; - addNL = TRUE; - } - rc &= fprintf(f, "NOTE %d %d 0 0 %0.6f %0.6f 0 %d\n", GetTrkIndex(t), GetTrkLayer(t), - xx->pos.x, xx->pos.y, len )>0; - rc &= fprintf(f, "%s%s", xx->text, addNL?"\n":"" )>0; - rc &= fprintf(f, " END\n")>0; - return rc; + struct extraData *xx = GetTrkExtraData(t); + int len; + BOOL_T addNL = FALSE; + BOOL_T rc = TRUE; + len = strlen(xx->text); + + if (xx->text[len-1] != '\n') { + len++; + addNL = TRUE; + } + + rc &= fprintf(f, "NOTE %d %d 0 0 %0.6f %0.6f 0 %d\n", GetTrkIndex(t), + GetTrkLayer(t), + xx->pos.x, xx->pos.y, len)>0; + rc &= fprintf(f, "%s%s", xx->text, addNL?"\n":"")>0; + rc &= fprintf(f, " END\n")>0; + return rc; } -static void ReadNote( char * line ) +static void ReadNote(char * line) { - coOrd pos; - DIST_T elev; - CSIZE_T size; - char * cp; - track_p t; - struct extraData *xx; - int len; - wIndex_t index; - wIndex_t layer; - int lineCount; - - if ( strncmp( line, "NOTE MAIN", 9 ) == 0 ){ - if ( !GetArgs( line+9, paramVersion<3?"d":"0000d", &size ) ) - return; - if (mainText) - MyFree( mainText ); - mainText = (char*)MyMalloc( size+2 ); - cp = mainText; - } else { - if ( !GetArgs( line+5, paramVersion<3?"XXpYd":paramVersion<9?"dL00pYd":"dL00pfd", - &index, &layer, &pos, &elev, &size ) ) { - return; - } - t = NewNote( index, pos, size+2 ); - SetTrkLayer( t, layer ); - xx = GetTrkExtraData(t); - cp = xx->text; - } - lineCount = 0; - while (1) { - line = GetNextLine(); - if (strncmp(line, " END", 7) == 0) - break; - len = strlen(line); - if (size > 0 && size < len) { - InputError( "NOTE text overflow", TRUE ); - size = -1; - } - if (size > 0) { - if ( lineCount != 0 ) { - strcat( cp, "\n" ); - cp++; - size--; - } - strcpy( cp, line ); - cp += len; - size -= len; - } - lineCount++; - } - if (cp[-1] != '\n') - *cp++ = '\n'; - *cp = '\0'; + coOrd pos; + DIST_T elev; + CSIZE_T size; + char * cp; + struct extraData *xx; + wIndex_t index; + wIndex_t layer; + int lineCount; + + if (strncmp(line, "NOTE MAIN", 9) == 0) { + if (!GetArgs(line+9, paramVersion<3?"d":"0000d", &size)) { + return; + } + + if (mainText) { + MyFree(mainText); + } + + mainText = (char*)MyMalloc(size+2); + cp = mainText; + } else { + track_p t; + + if (!GetArgs(line+5, paramVersion<3?"XXpYd":paramVersion<9?"dL00pYd":"dL00pfd", + &index, &layer, &pos, &elev, &size)) { + return; + } + + t = NewNote(index, pos, size+2); + SetTrkLayer(t, layer); + xx = GetTrkExtraData(t); + cp = xx->text; + } + + lineCount = 0; + + while (1) { + int len; + line = GetNextLine(); + + if (strncmp(line, " END", 7) == 0) { + break; + } + + len = strlen(line); + + if (size > 0 && size < len) { + InputError("NOTE text overflow", TRUE); + size = -1; + } + + if (size > 0) { + if (lineCount != 0) { + strcat(cp, "\n"); + cp++; + size--; + } + + strcpy(cp, line); + cp += len; + size -= len; + } + + lineCount++; + } + + if (cp[-1] != '\n') { + *cp++ = '\n'; + } + + *cp = '\0'; } -static void MoveNote( track_p trk, coOrd orig ) +static void MoveNote(track_p trk, coOrd orig) { - struct extraData * xx = GetTrkExtraData( trk ); - xx->pos.x += orig.x; - xx->pos.y += orig.y; - SetBoundingBox( trk, xx->pos, xx->pos ); + struct extraData * xx = GetTrkExtraData(trk); + xx->pos.x += orig.x; + xx->pos.y += orig.y; + SetBoundingBox(trk, xx->pos, xx->pos); } -static void RotateNote( track_p trk, coOrd orig, ANGLE_T angle ) +static void RotateNote(track_p trk, coOrd orig, ANGLE_T angle) { - struct extraData * xx = GetTrkExtraData( trk ); - Rotate( &xx->pos, orig, angle ); - SetBoundingBox( trk, xx->pos, xx->pos ); + struct extraData * xx = GetTrkExtraData(trk); + Rotate(&xx->pos, orig, angle); + SetBoundingBox(trk, xx->pos, xx->pos); } -static void RescaleNote( track_p trk, FLOAT_T ratio ) +static void RescaleNote(track_p trk, FLOAT_T ratio) { - struct extraData * xx = GetTrkExtraData( trk ); - xx->pos.x *= ratio; - xx->pos.y *= ratio; + struct extraData * xx = GetTrkExtraData(trk); + xx->pos.x *= ratio; + xx->pos.y *= ratio; } static trackCmd_t noteCmds = { - "NOTE", - DrawNote, - DistanceNote, - DescribeNote, - DeleteNote, - WriteNote, - ReadNote, - MoveNote, - RotateNote, - RescaleNote, - NULL, /* audit */ - NULL, /* getAngle */ - NULL, /* split */ - NULL, /* traverse */ - NULL, /* enumerate */ - NULL /* redraw */ }; - - -BOOL_T WriteMainNote( FILE* f ) + "NOTE", + DrawNote, + DistanceNote, + DescribeNote, + DeleteNote, + WriteNote, + ReadNote, + MoveNote, + RotateNote, + RescaleNote, + NULL, /* audit */ + NULL, /* getAngle */ + NULL, /* split */ + NULL, /* traverse */ + NULL, /* enumerate */ + NULL /* redraw */ +}; + + +BOOL_T WriteMainNote(FILE* f) { - BOOL_T rc = TRUE; - if (mainText && *mainText) { - rc &= fprintf(f, "NOTE MAIN 0 0 0 0 %d\n", strlen(mainText) )>0; - rc &= fprintf(f, "%s", mainText )>0; - rc &= fprintf(f, " END\n")>0; - } - return rc; + BOOL_T rc = TRUE; + + if (mainText && *mainText) { + rc &= fprintf(f, "NOTE MAIN 0 0 0 0 %lu\n", strlen(mainText))>0; + rc &= fprintf(f, "%s", mainText)>0; + rc &= fprintf(f, " END\n")>0; + } + + return rc; } /***************************************************************************** @@ -347,63 +403,71 @@ BOOL_T WriteMainNote( FILE* f ) -static STATUS_T CmdNote( wAction_t action, coOrd pos ) +static STATUS_T CmdNote(wAction_t action, coOrd pos) { - static coOrd oldPos; - track_p trk; - struct extraData * xx; - const char* tmpPtrText; - - switch (action) { - case C_START: - InfoMessage( _("Place a note on the layout") ); - return C_CONTINUE; - case C_DOWN: - DrawBitMap( &tempD, pos, note_bm, normalColor ); - oldPos = pos; - return C_CONTINUE; - case C_MOVE: - DrawBitMap( &tempD, oldPos, note_bm, normalColor ); - DrawBitMap( &tempD, pos, note_bm, normalColor ); - oldPos = pos; - return C_CONTINUE; - break; - case C_UP: - UndoStart( _("New Note"), "New Note" ); - trk = NewNote( -1, pos, 2 ); - DrawNewTrack( trk ); - xx = GetTrkExtraData(trk); - - tmpPtrText = _("Replace this text with your note"); - xx->text = (char*)MyMalloc( strlen(tmpPtrText) + 1 ); - strcpy( xx->text, tmpPtrText); - - inDescribeCmd = TRUE; - DescribeNote( trk, message, sizeof message ); - inDescribeCmd = FALSE; - return C_CONTINUE; - case C_REDRAW: - DrawBitMap( &tempD, oldPos, note_bm, normalColor ); - return C_CONTINUE; - case C_CANCEL: - DescribeCancel(); - return C_CONTINUE; - } - return C_INFO; + static coOrd oldPos; + track_p trk; + struct extraData * xx; + const char* tmpPtrText; + static int state_on = FALSE; + + switch (action) { + case C_START: + InfoMessage(_("Place a note on the layout")); + return C_CONTINUE; + + case C_DOWN: + state_on = TRUE; + oldPos = pos; + MainRedraw(); + return C_CONTINUE; + + case C_MOVE: + oldPos = pos; + MainRedraw(); + return C_CONTINUE; + break; + + case C_UP: + UndoStart(_("New Note"), "New Note"); + state_on = FALSE; + MainRedraw(); + trk = NewNote(-1, pos, 2); + DrawNewTrack(trk); + xx = GetTrkExtraData(trk); + tmpPtrText = _("Replace this text with your note"); + xx->text = (char*)MyMalloc(strlen(tmpPtrText) + 1); + strcpy(xx->text, tmpPtrText); + inDescribeCmd = TRUE; + DescribeNote(trk, message, sizeof message); + inDescribeCmd = FALSE; + return C_CONTINUE; + + case C_REDRAW: + if (state_on) DrawBitMap(&tempD, oldPos, note_bm, normalColor); + return C_CONTINUE; + + case C_CANCEL: + DescribeCancel(); + return C_CONTINUE; + } + + return C_INFO; } #include "bitmaps/note.xbm" #include "bitmaps/cnote.xpm" -void InitCmdNote( wMenu_p menu ) +void InitCmdNote(wMenu_p menu) { - ParamRegister( ¬ePG ); - AddMenuButton( menu, CmdNote, "cmdNote", _("Note"), wIconCreatePixMap(cnote_xpm), LEVEL0_50, IC_POPUP2, ACCL_NOTE, NULL ); + ParamRegister(¬ePG); + AddMenuButton(menu, CmdNote, "cmdNote", _("Note"), wIconCreatePixMap(cnote_xpm), + LEVEL0_50, IC_POPUP2, ACCL_NOTE, NULL); } -void InitTrkNote( void ) +void InitTrkNote(void) { - note_bm = wDrawBitMapCreate( mainD.d, note_width, note_width, 8, 8, note_bits ); - T_NOTE = InitObject( ¬eCmds ); + note_bm = wDrawBitMapCreate(mainD.d, note_width, note_width, 8, 8, note_bits); + T_NOTE = InitObject(¬eCmds); } diff --git a/app/bin/common.h b/app/bin/common.h index e238e33..255e8d7 100644 --- a/app/bin/common.h +++ b/app/bin/common.h @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/common.h,v 1.2 2008-02-23 07:27:15 m_fischer Exp $ +/** \file common.h + * Defnitions of basic types */ /* XTrkCad - Model Railroad CAD @@ -23,6 +23,8 @@ #ifndef COMMON_H #define COMMON_H +#include + #ifndef TRUE #define TRUE (1) #define FALSE (0) @@ -99,21 +101,18 @@ typedef struct { abort(); \ } \ (DA).cnt = N; } +#define DYNARR_FREE(T,DA) \ + { if ((DA).ptr) { \ + MyFree( (DA).ptr); \ + (DA).ptr = NULL; \ + } \ + (DA).max = 0; \ + (DA).cnt = 0; } #ifdef WINDOWS -#ifdef FAR -#undef FAR -#endif -#ifndef WIN32 -#define FAR _far -#else -#define FAR -#endif #define M_PI 3.14159 #define strcasecmp _stricmp #define strncasecmp _strnicmp -#else -#define FAR #endif #if _MSC_VER >1300 diff --git a/app/bin/compound.c b/app/bin/compound.c index ed585f7..972ff82 100644 --- a/app/bin/compound.c +++ b/app/bin/compound.c @@ -22,15 +22,20 @@ */ #include -#include "track.h" -#include "compound.h" -#include "shrtpath.h" +#include +#include + + +#include "tbezier.h" #include "cjoin.h" +#include "common.h" +#include "compound.h" +#include "cundo.h" +#include "fileio.h" #include "i18n.h" - -#if _MSC_VER >=1400 -#define strdup _strdup -#endif +#include "shrtpath.h" +#include "track.h" +#include "utility.h" /***************************************************************************** * @@ -326,41 +331,6 @@ void DrawCompoundDescription( Rotate( &p1, zero, xx->angle ); p1.x += xx->orig.x + xx->descriptionOff.x; p1.y += xx->orig.y + xx->descriptionOff.y; -#ifdef LATER - maxInx = -1; - for ( inx=0,a=0.0; a<360.0; inx++,a+=45 ) { - Translate( &p1, p0, a, trackGauge*3 ); - dists[inx].p = p1; - if ((trk1 = dists[inx].trk = OnTrack( &p1, FALSE, TRUE )) == NULL || - trk1 == trk ) { - p1 = dists[inx].p; - dists[inx].d = DistanceSegs( xx->orig, xx->angle, xx->segCnt, xx->segs, &p1, NULL ); - } else if ( GetTrkType(trk1) == T_TURNOUT ) { - struct extraData *yy = GetTrkExtraData(trk1); - dists[inx].d = DistanceSegs( yy->orig, yy->angle, yy->segCnt, yy->segs, &p1, NULL ); - } else { - dists[inx].d = FindDistance( p0, p1 ); - } - } - maxD = 0; maxInx = -1; - for ( inx=0,a=0.0; a<360.0; inx++,a+=45 ) { - if (dists[inx].trk == NULL || dists[inx].trk == trk) { - if (dists[inx].d > maxD) { - maxD = dists[inx].d; - maxInx = inx; - } - } - } - if (maxInx == -1) { - if (dists[inx].d > maxD) { - maxD = dists[inx].d; - maxInx = inx; - } - } - if (maxInx != -1) { - p0 = dists[maxInx].p; - } -#endif fp = wStandardFont( F_TIMES, FALSE, FALSE ); DrawBoxedString( (xx->special==TOpier)?BOX_INVERT:BOX_NONE, d, p1, desc, fp, (wFontSize_t)descriptionFontSize, color, 0.0 ); } @@ -374,6 +344,8 @@ DIST_T CompoundDescriptionDistance( coOrd p1; if (GetTrkType(trk) != T_TURNOUT && GetTrkType(trk) != T_STRUCTURE) return 100000; + if ( (GetTrkBits( trk ) & TB_HIDEDESC) != 0 ) + return 100000; p1 = xx->descriptionOrig; Rotate( &p1, zero, xx->angle ); p1.x += xx->orig.x + xx->descriptionOff.x; @@ -389,30 +361,37 @@ STATUS_T CompoundDescriptionMove( { struct extraData *xx = GetTrkExtraData(trk); static coOrd p0, p1; + static BOOL_T editMode; wDrawColor color; switch (action) { case C_DOWN: + editMode = TRUE; REORIGIN( p0, xx->descriptionOrig, xx->angle, xx->orig ) case C_MOVE: case C_UP: - if (action != C_DOWN) - DrawLine( &tempD, p0, p1, 0, wDrawColorBlack ); color = GetTrkColor( trk, &mainD ); - DrawCompoundDescription( trk, &tempD, color ); xx->descriptionOff.x = (pos.x-p0.x); xx->descriptionOff.y = (pos.y-p0.y); p1 = xx->descriptionOrig; Rotate( &p1, zero, xx->angle ); p1.x += xx->orig.x + xx->descriptionOff.x; p1.y += xx->orig.y + xx->descriptionOff.y; - DrawCompoundDescription( trk, &tempD, color ); - if (action != C_UP) - DrawLine( &tempD, p0, p1, 0, wDrawColorBlack ); - MainRedraw(); + if (action == C_UP) { + editMode = FALSE; + } + MainRedraw(); + MapRedraw(); return action==C_UP?C_TERMINATE:C_CONTINUE; + break; + case C_REDRAW: + if (editMode) { + DrawLine( &tempD, p0, p1, 0, wDrawColorBlack ); + } } + + return C_CONTINUE; } @@ -494,8 +473,11 @@ DIST_T DistanceCompound( static struct { - coOrd endPt[2]; - FLOAT_T elev[2]; + coOrd endPt[4]; + ANGLE_T endAngle[4]; + DIST_T endRadius[4]; + coOrd endCenter[4]; + FLOAT_T elev[4]; coOrd orig; ANGLE_T angle; char manuf[STR_SIZE]; @@ -503,23 +485,40 @@ static struct { char partno[STR_SIZE]; long epCnt; long segCnt; + long pathCnt; FLOAT_T grade; DIST_T length; - LAYER_T layerNumber; + unsigned int layerNumber; } compoundData; -typedef enum { E0, Z0, E1, Z1, GR, OR, AN, MN, NM, PN, EC, SC, LY } compoundDesc_e; +typedef enum { E0, A0, C0, R0, Z0, E1, A1, C1, R1, Z1, E2, A2, C2, R2, Z2, E3, A3, C3, R3, Z3, GR, OR, AN, MN, NM, PN, EC, SC, LY } compoundDesc_e; static descData_t compoundDesc[] = { -/*E0*/ { DESC_POS, N_("End Pt 1: X"), &compoundData.endPt[0] }, -/*Z0*/ { DESC_DIM, N_("Z"), &compoundData.elev[0] }, -/*E1*/ { DESC_POS, N_("End Pt 2: X"), &compoundData.endPt[1] }, -/*Z1*/ { DESC_DIM, N_("Z"), &compoundData.elev[1] }, +/*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &compoundData.endPt[0] }, +/*A0*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[0] }, +/*C0*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[0] }, +/*R0*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[0] }, +/*Z0*/ { DESC_DIM, N_("Z1"), &compoundData.elev[0] }, +/*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &compoundData.endPt[1] }, +/*A1*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[1] }, +/*C1*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[1] }, +/*R1*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[1] }, +/*Z1*/ { DESC_DIM, N_("Z2"), &compoundData.elev[1] }, +/*E2*/ { DESC_POS, N_("End Pt 3: X,Y"), &compoundData.endPt[2] }, +/*A2*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[2] }, +/*C2*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[2] }, +/*R2*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[2] }, +/*Z2*/ { DESC_DIM, N_("Z3"), &compoundData.elev[2] }, +/*E3*/ { DESC_POS, N_("End Pt 4: X,Y"), &compoundData.endPt[3] }, +/*A3*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[3] }, +/*C3*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[3] }, +/*R3*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[3] }, +/*Z3*/ { DESC_DIM, N_("Z4"), &compoundData.elev[3] }, /*GR*/ { DESC_FLOAT, N_("Grade"), &compoundData.grade }, -/*OR*/ { DESC_POS, N_("Origin: X"), &compoundData.orig }, +/*OR*/ { DESC_POS, N_("Origin: X,Y"), &compoundData.orig }, /*AN*/ { DESC_ANGLE, N_("Angle"), &compoundData.angle }, /*MN*/ { DESC_STRING, N_("Manufacturer"), &compoundData.manuf }, /*NM*/ { DESC_STRING, N_("Name"), &compoundData.name }, /*PN*/ { DESC_STRING, N_("Part No"), &compoundData.partno }, -/*EC*/ { DESC_LONG, N_("# End Pt"), &compoundData.epCnt }, +/*EC*/ { DESC_LONG, N_("# End Pts"), &compoundData.epCnt }, /*SC*/ { DESC_LONG, N_("# Segments"), &compoundData.segCnt }, /*LY*/ { DESC_LAYER, N_("Layer"), &compoundData.layerNumber }, { DESC_NULL } }; @@ -616,36 +615,55 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee MoveTrack( trk, pos ); ComputeCompoundBoundingBox( trk ); break; + case A0: + case A1: + case A2: + case A3: + if (inx==E3) ep=3; + else if (inx==E2) ep=2; + else if (inx==E1) ep=1; + else ep=0; + RotateTrack( trk, xx->orig, NormalizeAngle( compoundData.endAngle[ep]-xx->angle ) ); + ComputeCompoundBoundingBox( trk ); + compoundData.angle = xx->angle; + compoundDesc[AN].mode |= DESC_CHANGE; + break; case AN: RotateTrack( trk, xx->orig, NormalizeAngle( compoundData.angle-xx->angle ) ); ComputeCompoundBoundingBox( trk ); break; case E0: case E1: - ep = (inx==E0?0:1); + case E2: + case E3: + if (inx==E3) ep=3; + else if (inx==E2) ep=2; + else if (inx==E1) ep=1; + else ep=0; pos = GetTrkEndPos(trk,ep); pos.x = compoundData.endPt[ep].x - pos.x; pos.y = compoundData.endPt[ep].y - pos.y; MoveTrack( trk, pos ); ComputeCompoundBoundingBox( trk ); - if ( compoundData.epCnt >= 2 ) { - compoundData.endPt[1-ep] = GetTrkEndPos(trk,1-ep); - compoundDesc[inx==E0?E1:E0].mode |= DESC_CHANGE; - } break; case Z0: case Z1: - ep = (inx==Z0?0:1); + case Z2: + case Z3: + ep = (inx==Z0?0:(inx==Z1?1:(inx==Z2?2:3))); UpdateTrkEndElev( trk, ep, GetTrkEndElevUnmaskedMode(trk,ep), compoundData.elev[ep], NULL ); if ( GetTrkEndPtCnt(trk) == 1 ) break; - ComputeElev( trk, 1-ep, FALSE, &compoundData.elev[1-ep], NULL ); + for (int i=0;i minLength ) compoundData.grade = fabs( (compoundData.elev[0]-compoundData.elev[1])/compoundData.length )*100.0; else compoundData.grade = 0.0; compoundDesc[GR].mode |= DESC_CHANGE; - compoundDesc[inx==Z0?Z1:Z0].mode |= DESC_CHANGE; + compoundDesc[Z0+(E1-E0)*inx].mode |= DESC_CHANGE; break; case LY: SetTrkLayer( trk, compoundData.layerNumber); @@ -653,6 +671,35 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee default: break; } + switch ( inx ) { + case A0: + case A1: + case A2: + case A3: + case E0: + case E1: + case E2: + case E3: + case AN: + case OR: + for (int i=0;isegCnt; compoundData.length = 0; compoundData.layerNumber = GetTrkLayer( trk ); - compoundDesc[E0].mode = - compoundDesc[Z0].mode = - compoundDesc[E1].mode = - compoundDesc[Z1].mode = + + for ( int i=0 ; i<4 ; i++) { + compoundDesc[E0+(E1-E0)*i].mode = DESC_IGNORE; + compoundDesc[A0+(E1-E0)*i].mode = DESC_IGNORE; + compoundDesc[R0+(E1-E0)*i].mode = DESC_IGNORE; + compoundDesc[C0+(E1-E0)*i].mode = DESC_IGNORE; + compoundDesc[Z0+(E1-E0)*i].mode = DESC_IGNORE; + } + compoundDesc[GR].mode = DESC_IGNORE; compoundDesc[OR].mode = compoundDesc[AN].mode = fix?DESC_RO:0; @@ -746,37 +800,37 @@ void DescribeCompound( compoundDesc[NM].mode = compoundDesc[PN].mode = 0 /*DESC_NOREDRAW*/; compoundDesc[EC].mode = - compoundDesc[SC].mode = + compoundDesc[SC].mode = DESC_RO; compoundDesc[LY].mode = DESC_NOREDRAW; - if ( compoundData.epCnt ) { - if ( compoundData.epCnt <=2 ) { - if ( GetTrkEndTrk(trk,0) || (compoundData.epCnt==2 && GetTrkEndTrk(trk,1)) ) - mode = DESC_RO; - else - mode = 0; - compoundDesc[OR].mode = DESC_IGNORE; - compoundDesc[AN].mode = DESC_IGNORE; - compoundDesc[EC].mode = DESC_IGNORE; - compoundData.endPt[0] = GetTrkEndPos(trk,0); - ComputeElev( trk, 0, FALSE, &compoundData.elev[0], NULL ); - compoundDesc[E0].mode = (int)mode; - compoundDesc[Z0].mode = (EndPtIsDefinedElev(trk,0)?0:DESC_RO)|DESC_NOREDRAW; - if ( compoundData.epCnt == 2 ) { - compoundData.length = GetTrkLength( trk, 0, 1 ); - compoundData.endPt[1] = GetTrkEndPos(trk,1); - ComputeElev( trk, 1, FALSE, &compoundData.elev[1], NULL ); - compoundDesc[E1].mode = (int)mode; - compoundDesc[Z1].mode = (EndPtIsDefinedElev(trk,1)?0:DESC_RO)|DESC_NOREDRAW; - compoundDesc[GR].mode = DESC_RO; - if ( compoundData.length > minLength ) - compoundData.grade = fabs( (compoundData.elev[0]-compoundData.elev[1])/compoundData.length )*100.0; - else - compoundData.grade = 0.0; + if (compoundData.epCnt >0) { + for (int i=0;i minLength && compoundData.epCnt > 1) + compoundData.grade = fabs( (compoundData.elev[0]-compoundData.elev[1])/compoundData.length )*100.0; + else + compoundData.grade = 0.0; + if ( compoundData.epCnt >1 ) { DoDescribe( compoundData.epCnt>2?_("Turnout"):_("Sectional Track"), trk, compoundDesc, UpdateCompound ); } else { - compoundDesc[EC].mode |= DESC_IGNORE; DoDescribe( _("Structure"), trk, compoundDesc, UpdateCompound ); } } @@ -785,6 +839,9 @@ void DescribeCompound( void DeleteCompound( track_p t ) { + struct extraData *xx = GetTrkExtraData(t); + FreeFilledDraw( xx->segCnt, xx->segs ); + MyFree( xx->segs ); } @@ -894,6 +951,8 @@ EXPORT track_p NewCompound( xx->pathCurr = xx->paths; xx->segCnt = segCnt; xx->segs = memdup( segs, segCnt * sizeof *segs ); + trkSeg_p p = xx->segs; + FixUpBezierSegs(xx->segs,xx->segCnt); ComputeCompoundBoundingBox( trk ); SetDescriptionOrig( trk ); for ( ep=0; ep + #include "ccurve.h" #include "cstraigh.h" +#include "cundo.h" #include "i18n.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" static struct { track_p Trk; @@ -90,6 +93,7 @@ static STATUS_T CmdParallel( wAction_t action, coOrd pos ) } if ( !QueryTrack( Dpa.Trk, Q_CAN_PARALLEL ) ) { Dpa.Trk = NULL; + InfoMessage(_(" Track doesn't support parallel")); return C_CONTINUE; } /* in case query has changed things (eg joint) */ @@ -101,6 +105,7 @@ static STATUS_T CmdParallel( wAction_t action, coOrd pos ) tempSegs_da.cnt = 0; case C_MOVE: + if (Dpa.Trk == NULL) return C_CONTINUE; DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); if ( !MakeParallelTrack( Dpa.Trk, pos, parSeparation, NULL, &p0, &p1 ) ) { diff --git a/app/bin/cprint.c b/app/bin/cprint.c index d89d1e2..88a9151 100644 --- a/app/bin/cprint.c +++ b/app/bin/cprint.c @@ -1,7 +1,5 @@ /** \file cprint.c * Printing functions. - * - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cprint.c,v 1.6 2009-08-16 13:26:41 m_fischer Exp $ */ /* XTrkCad - Model Railroad CAD @@ -26,9 +24,16 @@ #include #include #include -#include "track.h" -#include "i18n.h" +#include +#include "custom.h" +#include "fileio.h" +#include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" #define PRINT_GAUDY (0) #define PRINT_PLAIN (1) @@ -73,6 +78,7 @@ static long printRoadbed = 0; static DIST_T printRoadbedWidth = 0.0; static BOOL_T printRotate = FALSE; static BOOL_T rotateCW = FALSE; +static long printCenterLine = 0; static double printScale = 16; static long iPrintScale = 16; @@ -101,6 +107,7 @@ static char * printPhysSizeLabels[] = { N_("Ignore Page Margins"), NULL }; static char * printGridLabels[] = { N_("Print Snap Grid"), NULL }; static char * printRulerLabels[] = { N_("Print Rulers"), NULL }; static char * printRoadbedLabels[] = { N_("Print Roadbed Outline"), NULL }; +static char * printCenterLineLabels[] = { N_("Print Centerline below Scale 1:1"), NULL }; static paramIntegerRange_t rminScale_999 = { 1, 999, 0, PDO_NORANGECHECK_HIGH }; static paramFloatRange_t r0_ = { 0, 0, 0, PDO_NORANGECHECK_HIGH }; static paramFloatRange_t r1_ = { 1, 0, 0, PDO_NORANGECHECK_HIGH }; @@ -124,19 +131,22 @@ static paramData_t printPLs[] = { /*10*/ { PD_TOGGLE, &printGrid, "grid", PDO_DLGNOLABELALIGN, printGridLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_RULER (11) /*11*/ { PD_TOGGLE, &printRuler, "ruler", PDO_DLGNOLABELALIGN, printRulerLabels, NULL, BC_HORZ|BC_NOBORDER }, -#define I_ROADBED (12) -/*12*/{ PD_TOGGLE, &printRoadbed, "roadbed", PDO_DLGNOLABELALIGN, printRoadbedLabels, NULL, BC_HORZ|BC_NOBORDER }, -#define I_ROADBEDWIDTH (13) -/*13*/{ PD_FLOAT, &printRoadbedWidth, "roadbedWidth", PDO_DIM|PDO_DLGBOXEND, &r0_, N_("Width") }, -/*14*/{ PD_FLOAT, &newPrintGrid.orig.x, "origx", PDO_DIM|PDO_DLGRESETMARGIN, &r_10_99999, N_("Origin: X"), 0, (void*)2 }, -/*15*/ { PD_FLOAT, &newPrintGrid.orig.y, "origy", PDO_DIM, &r_10_99999, N_("Y"), 0, (void*)2 }, -/*16*/ { PD_BUTTON, (void*)DoResetGrid, "reset", PDO_DLGHORZ, NULL, N_("Reset") }, -/*17*/ { PD_FLOAT, &newPrintGrid.angle, "origa", PDO_ANGLE|PDO_DLGBOXEND, &r0_360, N_("Angle"), 0, (void*)2 }, -/*18*/ { PD_BUTTON, (void*)DoPrintSetup, "setup", PDO_DLGCMDBUTTON, NULL, N_("Setup") }, -/*19*/ { PD_BUTTON, (void*)PrintClear, "clear", 0, NULL, N_("Clear") }, -#define I_PAGECNT (20) -/*20*/ { PD_MESSAGE, N_("0 pages"), NULL, 0, (void*)80 }, -/*21*/ { PD_MESSAGE, N_("selected"), NULL, 0, (void*)80 } }; +#define I_CENTERLINE (12) +/*12*/ { PD_TOGGLE, &printCenterLine, "centerLine", PDO_DLGNOLABELALIGN, printCenterLineLabels, NULL, BC_HORZ|BC_NOBORDER }, +#define I_ROADBED (13) +/*13*/{ PD_TOGGLE, &printRoadbed, "roadbed", PDO_DLGNOLABELALIGN, printRoadbedLabels, NULL, BC_HORZ|BC_NOBORDER }, +#define I_ROADBEDWIDTH (14) +/*14*/{ PD_FLOAT, &printRoadbedWidth, "roadbedWidth", PDO_DIM|PDO_DLGBOXEND, &r0_, N_("Width") }, +/*15*/{ PD_FLOAT, &newPrintGrid.orig.x, "origx", PDO_DIM|PDO_DLGRESETMARGIN, &r_10_99999, N_("Origin: X"), 0, (void*)2 }, +/*16*/ { PD_FLOAT, &newPrintGrid.orig.y, "origy", PDO_DIM, &r_10_99999, N_("Y"), 0, (void*)2 }, +/*17*/ { PD_BUTTON, (void*)DoResetGrid, "reset", PDO_DLGHORZ, NULL, N_("Reset") }, +/*18*/ { PD_FLOAT, &newPrintGrid.angle, "origa", PDO_ANGLE|PDO_DLGBOXEND, &r0_360, N_("Angle"), 0, (void*)2 }, +/*19*/ { PD_BUTTON, (void*)DoPrintSetup, "setup", PDO_DLGCMDBUTTON, NULL, N_("Setup") }, +/*20*/ { PD_BUTTON, (void*)PrintClear, "clear", 0, NULL, N_("Clear") }, +#define I_PAGECNT (21) +/*21*/ { PD_MESSAGE, N_("0 pages"), NULL, 0, (void*)80 }, +/*22*/ { PD_MESSAGE, N_("selected"), NULL, 0, (void*)80 } +}; static paramGroup_t printPG = { "print", PGO_PREFMISCGROUP, printPLs, sizeof printPLs/sizeof printPLs[0] }; @@ -158,33 +168,6 @@ static void ChangeDim( void ) MapGrid( zero, mapD.size, 0.0, currPrintGrid.orig, currPrintGrid.angle, currPrintGrid.size.x, currPrintGrid.size.y, &x0, &x1, &y0, &y1 ); -#ifdef LATER - d0 = sqrt( mapD.size.x * mapD.size.x + mapD.size.y * mapD.size.y ); - - Translate( &p1, currPrintGrid.orig, currPrintGrid.angle, d0 ); - p0 = currPrintGrid.orig; - ClipLine( &p0, &p1, zero, 0.0, mapD.size ); - d1 = FindDistance( currPrintGrid.orig, p1 ); - y1 = (int)ceil(d1/currPrintGrid.size.y); - - Translate( &p1, currPrintGrid.orig, currPrintGrid.angle+180, d0 ); - p0 = currPrintGrid.orig; - ClipLine( &p0, &p1, zero, 0.0, mapD.size ); - d1 = FindDistance( currPrintGrid.orig, p1 ); - y0 = -(int)floor(d1/currPrintGrid.size.y); - - Translate( &p1, currPrintGrid.orig, currPrintGrid.angle+90, d0 ); - p0 = currPrintGrid.orig; - ClipLine( &p0, &p1, zero, 0.0, mapD.size ); - d1 = FindDistance( currPrintGrid.orig, p1 ); - x1 = (int)ceil(d1/currPrintGrid.size.x); - - Translate( &p1, currPrintGrid.orig, currPrintGrid.angle+270, d0 ); - p0 = currPrintGrid.orig; - ClipLine( &p0, &p1, zero, 0.0, mapD.size ); - d1 = FindDistance( currPrintGrid.orig, p1 ); - x0 = -(int)floor(d1/currPrintGrid.size.x); -#endif if ( x0==bm.x0 && x1==bm.x1 && y0==bm.y0 && y1==bm.y1 ) return; @@ -385,20 +368,20 @@ static void PrintGaudyBox( DrawString( &page_d, p00, 0.0, dat, fp, 16.0, wDrawColorBlack ); p00.y = 0.5+0.05; - DrawTextSize( &mainD, Title1, fp, 16.0, FALSE, &textsize ); + DrawTextSize( &mainD, GetLayoutTitle(), fp, 16.0, FALSE, &textsize ); p00.x = (pageW/2.0)-(textsize.x/2.0); p00.y = 0.75+0.05; - DrawString( &page_d, p00, 0.0, Title1, fp, 16.0, wDrawColorBlack ); - DrawTextSize( &mainD, Title2, fp, 16.0, FALSE, &textsize ); + DrawString( &page_d, p00, 0.0, GetLayoutTitle(), fp, 16.0, wDrawColorBlack ); + DrawTextSize( &mainD, GetLayoutSubtitle(), fp, 16.0, FALSE, &textsize ); p00.x = (pageW/2.0)-(textsize.x/2.0); p00.y = 0.50+0.05; - DrawString( &page_d, p00, 0.0, Title2, fp, 16.0, wDrawColorBlack ); + DrawString( &page_d, p00, 0.0, GetLayoutSubtitle(), fp, 16.0, wDrawColorBlack ); sprintf( dat, _("PrintScale 1:%ld Room %s x %s Model Scale %s File %s"), (long)printScale, FormatDistance( roomSize.x ), FormatDistance( roomSize.y ), - curScaleName, curFileName ); + curScaleName, GetLayoutFilename() ); p00.x = 0.05; p00.y = 0.25+0.05; DrawString( &page_d, p00, 0.0, dat, fp, 16.0, wDrawColorBlack ); } @@ -480,30 +463,17 @@ static void PrintEnableControls( void ) ParamLoadControl( &printPG, I_ROADBED ); ParamControlActive( &printPG, I_ROADBED, TRUE ); ParamControlActive( &printPG, I_ROADBEDWIDTH, TRUE ); + ParamControlActive( &printPG, I_CENTERLINE, TRUE); } else { printRoadbed = 0; ParamLoadControl( &printPG, I_ROADBED ); ParamControlActive( &printPG, I_ROADBED, FALSE ); ParamControlActive( &printPG, I_ROADBEDWIDTH, FALSE ); + ParamControlActive( &printPG, I_CENTERLINE, FALSE ); } } -#ifdef LATER -static void PrintSetOrient( void ) -/* - * Called when print landscape/portrait toggled - */ -{ - DrawPrintGrid(); - ParamLoadData( &printPG ); - currPrintGrid = newPrintGrid; - ChangeDim(); - DrawPrintGrid(); -} -#endif - - static void PrintUpdate( int inx0 ) /* * Called when print page size (x or y) is changed. @@ -918,6 +888,7 @@ static BOOL_T PrintPage( if (printGrid) DrawSnapGrid( &print_d, mapD.size, FALSE ); roadbedWidth = printRoadbed?printRoadbedWidth:0.0; + printCenterLines = printCenterLine; DrawTracks( &print_d, print_d.scale, minP, maxP ); if (printRegistrationMarks && printScale == 1) DrawRegistrationMarks( &print_d ); @@ -950,7 +921,7 @@ static void DoPrintPrint( void * junk ) print_d.CoOrd2Pix = page_d.CoOrd2Pix = mainD.CoOrd2Pix; wSetCursor( wCursorWait ); - if (!wPrintDocStart( Title1, pageCount, &copies )) { + if (!wPrintDocStart(GetLayoutTitle(), pageCount, &copies )) { wSetCursor( wCursorNormal ); return; } diff --git a/app/bin/cprofile.c b/app/bin/cprofile.c index d8bbc24..49c3289 100644 --- a/app/bin/cprofile.c +++ b/app/bin/cprofile.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cprofile.c,v 1.4 2008-03-06 19:35:06 m_fischer Exp $ +/* \file cprofile.c + * Track profile */ /* XTrkCad - Model Railroad CAD @@ -20,11 +20,17 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" -#include "cselect.h" #include -#include "shrtpath.h" + +#include "custom.h" +#include "cselect.h" +#include "cundo.h" #include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "shrtpath.h" +#include "track.h" /* @@ -484,7 +490,7 @@ static void DoProfilePrint( void * junk ) screenRatio = screenSize.y/screenSize.x; printProfileD.size.x = w; printProfileD.size.y = h; - sprintf( message, _("%s Profile: %s"), sProdName, Title1 ); + sprintf( message, _("%s Profile: %s"), sProdName, GetLayoutTitle() ); fp = wStandardFont( F_TIMES, FALSE, FALSE ); DrawTextSize( &mainD, message, fp, 24, FALSE, &textsize ); titleH = textsize.y + 6.0/mainD.dpi; diff --git a/app/bin/cpull.c b/app/bin/cpull.c index a10f426..d7f7c80 100644 --- a/app/bin/cpull.c +++ b/app/bin/cpull.c @@ -1,8 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cpull.c,v 1.4 2008-03-06 19:35:06 m_fischer Exp $ - * +/** \file cpull.c * Pull and Tighten commands - * */ /* XTrkCad - Model Railroad CAD @@ -24,14 +21,15 @@ */ #include -#include "track.h" + #include "cselect.h" #include "compound.h" +#include "cundo.h" +#include "fileio.h" #include "i18n.h" - -/* - * pull track endpoint together - */ +#include "messages.h" +#include "track.h" +#include "utility.h" int debugPull = 0; @@ -454,12 +452,20 @@ static void PullTracks( int cnt1, cnt2; int rc; + if (QueryTrack(trk1,Q_CAN_ADD_ENDPOINTS) || QueryTrack(trk2,Q_CAN_ADD_ENDPOINTS)) { + ConnectTurntableTracks(trk1, ep1, trk2, ep2 ); + return; + } + + if (ep1<0 || ep1<0 ) return; + if (ConnectAbuttingTracks( trk1, ep1, trk2, ep2 )) return; if (ConnectAdjustableTracks( trk1, ep1, trk2, ep2 )) return; + p1 = GetTrkEndPos( trk1, ep1 ); p2 = GetTrkEndPos( trk2, ep2 ); a1 = GetTrkEndAngle( trk1, ep1 ); @@ -593,12 +599,22 @@ static STATUS_T CmdPull( static EPINX_T ep1; track_p trk2; EPINX_T ep2; + static BOOL_T turntable; + + int countTracksR0 = 0, countTracksR1 = 0, possibleEndPoints = 0; + BOOL_T found = FALSE; + ANGLE_T a; + DIST_T d; switch (action) { case C_START: - InfoMessage( _("Select first End-Point to connect") ); + if (selectedTrackCount==0) + InfoMessage( _("Select first end-point to connect") ); + else + InfoMessage( _("Select first end-point to connect, or Right-Click for connecting selected tracks") ); trk1 = NULL; + turntable = FALSE; return C_CONTINUE; case C_LCLICK: @@ -606,10 +622,14 @@ static STATUS_T CmdPull( if (trk1 == NULL) { if ((trk1 = OnTrack( &pos, TRUE, FALSE )) != NULL) { if ((ep1 = PickUnconnectedEndPoint( pos, trk1 )) < 0) { - trk1 = NULL; + if (QueryTrack(trk1, Q_CAN_ADD_ENDPOINTS)) { + turntable = TRUE; + ep1 = -1; + } else trk1 = NULL; } else { - InfoMessage( _("Select second End-Point to connect") ); + InfoMessage( _("Select second end-point to connect") ); } + } } else { if ((trk2 = OnTrack( &pos, TRUE, FALSE )) != NULL) { @@ -619,6 +639,15 @@ static STATUS_T CmdPull( inError = TRUE; return C_TERMINATE; } + if (!turntable && QueryTrack(trk2, Q_CAN_ADD_ENDPOINTS)) { + ep2 = -1; + turntable = TRUE; + PullTracks( trk2, ep2, trk1, ep1); + trk1 = NULL; + inError = TRUE; + turntable = FALSE; + return C_TERMINATE; + } } } } else { @@ -635,6 +664,53 @@ static STATUS_T CmdPull( } return C_CONTINUE; + case C_RCLICK: + if (selectedTrackCount==0) { + ErrorMessage(_("Connect Multiple Tracks - Select multiple tracks to join first")); + return C_CONTINUE; + } + if (NoticeMessage(_("Try to Connect all Selected Tracks?"), _("Yes"), _("No"))<=0) return C_CONTINUE; + trk1 = NULL; + trk2 = NULL; + UndoStart( _("ReConnect"),"Try to reconnect all selected tracks"); + for (int i=0;i<2;i++) { // Try twice - in case later joins help earlier ones and to try close ones first + while ( TrackIterate( &trk1 ) ) { + found = FALSE; + if ( GetTrkSelected( trk1 ) ) { + for (ep1=0; ep10 && (d<3.0 && a<7.5))) { // Match PullTracks criteria in round 2 + PullTracks(trk1,ep1,trk2,ep2); + if (GetTrkEndTrk( trk2, ep2 )) { + found = TRUE; + if (i==0) + countTracksR0++; + else + countTracksR1++; + break; //Stop looking + } else if (i==1) possibleEndPoints++; + } + } + } + if (found) break; //Next EndPoint + } + } + } + } + } + UndoEnd(); + NoticeMessage(_("Round 1 %d and Round 2 %d tracks connected, %d close pairs of end Points were not connected"), _("Ok"), NULL, countTracksR0, countTracksR1, possibleEndPoints); + return C_TERMINATE; + case C_REDRAW: return C_CONTINUE; @@ -658,5 +734,5 @@ static STATUS_T CmdPull( void InitCmdPull( wMenu_p menu ) { - AddMenuButton( menu, CmdPull, "cmdConnect", _("Connect Sectional Tracks"), wIconCreatePixMap(pull_xpm), LEVEL0_50, IC_STICKY|IC_LCLICK|IC_POPUP2, ACCL_CONNECT, NULL ); + AddMenuButton( menu, CmdPull, "cmdConnect", _("Connect Two Tracks"), wIconCreatePixMap(pull_xpm), LEVEL0_50, IC_STICKY|IC_LCLICK|IC_POPUP2|IC_RCLICK, ACCL_CONNECT, NULL ); } diff --git a/app/bin/cruler.c b/app/bin/cruler.c index 6566e93..b1addc6 100644 --- a/app/bin/cruler.c +++ b/app/bin/cruler.c @@ -20,8 +20,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include "cundo.h" +#include "fileio.h" #include "i18n.h" +#include "param.h" +#include "track.h" +#include "utility.h" + /***************************************************************************** * diff --git a/app/bin/cselect.c b/app/bin/cselect.c index 1bafd45..861f03f 100644 --- a/app/bin/cselect.c +++ b/app/bin/cselect.c @@ -1,8 +1,5 @@ /** \file cselect.c * Handle selecting / unselecting track and basic operations on the selection - * - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cselect.c,v 1.11 2008-09-05 08:08:15 m_fischer Exp $ - * */ /* XTrkCad - Model Railroad CAD @@ -23,19 +20,30 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" -/*#include "trackx.h"*/ +#include +#include + #include "ccurve.h" +#include "tcornu.h" +#include "tbezier.h" #define PRIVATE_EXTRADATA #include "compound.h" +#include "cselect.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" +#include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" #include "bitmaps/bmendpt.xbm" #include "bitmaps/bma0.xbm" #include "bitmaps/bma45.xbm" #include "bitmaps/bma90.xbm" #include "bitmaps/bma135.xbm" -#include "i18n.h" - #define SETMOVEMODE "MOVEMODE" @@ -55,8 +63,10 @@ static wDrawBitMap_p angle_bm[4]; long quickMove = 0; BOOL_T importMove = 0; int incrementalDrawLimit = 20; + static int microCount = 0; static dynArr_t tlist_da; + #define Tlist(N) DYNARR_N( track_p, tlist_da, N ) #define TlistAppend( T ) \ { DYNARR_APPEND( track_p, tlist_da, 10 );\ @@ -143,6 +153,7 @@ EXPORT void SetAllTrackSelect( BOOL_T select ) SelectedTrackCountChange(); if (doRedraw) { MainRedraw(); + MapRedraw(); } else { wDrawDelayUpdate( mainD.d, FALSE ); } @@ -174,6 +185,7 @@ EXPORT void InvertTrackSelect( void *ptr ) SelectedTrackCountChange(); MainRedraw(); + MapRedraw(); } /* Select orphaned (ie single) track pieces. @@ -207,6 +219,7 @@ EXPORT void OrphanedTrackSelect( void *ptr ) } SelectedTrackCountChange(); MainRedraw(); + MapRedraw(); } @@ -389,7 +402,7 @@ EXPORT void SelectTunnel( void ) } -EXPORT void SelectRecount( void ) +void SelectRecount( void ) { track_p trk; selectedTrackCount = 0; @@ -518,6 +531,7 @@ EXPORT void DoRefreshCompound( void ) RefreshCompound( NULL, FALSE ); UndoEnd(); MainRedraw(); + MapRedraw(); } else { ErrorMessage( MSG_NO_SELECTED_TRK ); } @@ -766,9 +780,9 @@ EXPORT void DoRescale( void ) if ( rescalePG.win == NULL ) { ParamCreateDialog( &rescalePG, MakeWindowTitle(_("Rescale")), _("Ok"), RescaleDlgOk, wHide, TRUE, NULL, F_BLOCK, RescaleDlgUpdate ); LoadScaleList( (wList_p)rescalePLs[I_RESCALE_TO_SCALE].control ); - LoadGaugeList( (wList_p)rescalePLs[I_RESCALE_TO_GAUGE].control, curScaleDescInx ); /* set correct gauge list here */ - rescaleFromScaleInx = curScaleInx; - rescaleToScaleInx = curScaleInx; + LoadGaugeList( (wList_p)rescalePLs[I_RESCALE_TO_GAUGE].control, GetLayoutCurScaleDesc() ); /* set correct gauge list here */ + rescaleFromScaleInx = GetLayoutCurScale(); + rescaleToScaleInx = rescaleFromScaleInx; rescalePercent = 100.0; } @@ -1032,6 +1046,10 @@ static void MoveTracks( track_p trk, trk1; EPINX_T ep, ep1; int inx; + trackParams_t trackParms; + ANGLE_T endAngle; + DIST_T endRadius; + coOrd endCenter; wSetCursor( wCursorWait ); /*UndoStart( "Move/Rotate Tracks", "move/rotate" );*/ @@ -1050,12 +1068,57 @@ static void MoveTracks( RotateTrack( trk, orig, angle ); for (ep=0; ep>8) { + case wAccelKey_Up: + base.y = w; + break; + case wAccelKey_Down: + base.y = -w; + break; + case wAccelKey_Left: + base.x = -w; + break; + case wAccelKey_Right: + base.x = w; + break; + default: + return C_CONTINUE; + break; + } + + drawEnable = enableMoveDraw; + GetMovedTracks(quickMove!=MOVE_QUICK); + UndoStart( _("Move Tracks"), "move" ); + SetMoveD( TRUE, base, 0.0 ); + DrawSelectedTracksD( &mainD, wDrawColorWhite ); + MoveTracks( quickMove==MOVE_QUICK, TRUE, FALSE, base, zero, 0.0 ); + ++microCount; + if (microCount>5) { + microCount = 0; + MainRedraw(); + MapRedraw(); + } + return C_CONTINUE; + } + break; + default: break; } @@ -1214,7 +1331,7 @@ static STATUS_T CmdRotate( if (SelectedTracksAreFrozen()) { return C_TERMINATE; } - InfoMessage( _("Drag to rotate selected tracks") ); + InfoMessage( _("Drag to rotate selected tracks, Shift+RightClick for QuickRotate Menu") ); wMenuPushEnable( rotateAlignMI, TRUE ); rotateAlignState = 0; break; @@ -1226,9 +1343,22 @@ static STATUS_T CmdRotate( UndoStart( _("Rotate Tracks"), "rotate" ); if ( rotateAlignState == 0 ) { drawnAngle = FALSE; - angle = 0; + angle = 0.0; base = orig = pos; + trk = OnTrack(&pos, FALSE, FALSE); //Note pollutes pos if turntable + if ((trk) && + QueryTrack(trk,Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius + trackParams_t trackParams; + if (GetTrackParams(PARAMS_CORNU, trk, pos, &trackParams)) { + DIST_T dist = FindDistance(base, trackParams.ttcenter); + if (dist < trackParams.ttradius/4) { + base = orig = trackParams.ttcenter; + InfoMessage( _("Center of Rotation snapped to Turntable center") ); + } + } + } GetMovedTracks(FALSE); + SetMoveD( FALSE, base, angle ); /*DrawLine( &mainD, base, orig, 0, wDrawColorBlack ); DrawMovedTracks(FALSE, orig, angle);*/ } else { @@ -1256,20 +1386,21 @@ static STATUS_T CmdRotate( angle = 0; } else { angle = NormalizeAngle(angle1-baseAngle); - if ( angle > 90 && angle < 270 ) - angle = NormalizeAngle( angle + 180.0 ); - if ( NormalizeAngle( FindAngle( pos, pos1 ) - angle1 ) < 180.0 ) - angle = NormalizeAngle( angle + 180.0 ); + //if ( angle > 90 && angle < 270 ) + // angle = NormalizeAngle( angle + 180.0 ); + //if ( NormalizeAngle( FindAngle( base, pos1 ) - angle1 ) < 180.0 ) + // angle = NormalizeAngle( angle + 180.0 ); /*printf( "angle 1 = %0.3f\n", angle );*/ if ( angle1 > 180.0 ) angle1 -= 180.0; InfoMessage( _("Angle %0.3f"), angle1 ); } GetMovedTracks(TRUE); SetMoveD( FALSE, orig, angle ); - DrawMovedTracks(); + //DrawMovedTracks(); } } MainRedraw(); + MapRedraw(); return C_CONTINUE; case C_MOVE: if ( rotateAlignState == 1 ) @@ -1285,7 +1416,7 @@ static STATUS_T CmdRotate( ErrorMessage( MSG_2ND_TRACK_MUST_BE_UNSELECTED ); return C_CONTINUE; } - DrawMovedTracks(); + //DrawMovedTracks(); angle1 = NormalizeAngle( GetAngleAtPoint( trk, pos, NULL, NULL ) ); angle = NormalizeAngle(angle1-baseAngle); if ( angle > 90 && angle < 270 ) @@ -1296,8 +1427,9 @@ static STATUS_T CmdRotate( InfoMessage( _("Angle %0.3f"), angle1 ); SetMoveD( FALSE, orig, angle ); /*printf( "angle 2 = %0.3f\n", angle );*/ - DrawMovedTracks(); + //DrawMovedTracks(); MainRedraw(); + MapRedraw(); return C_CONTINUE; } if ( FindDistance( orig, pos ) > (6.0/75.0)*mainD.scale ) { @@ -1321,7 +1453,7 @@ static STATUS_T CmdRotate( } DrawLine( &tempD, base, orig, 0, wDrawColorBlack ); SetMoveD( FALSE, orig, angle ); - DrawMovedTracks(); + //DrawMovedTracks(); #ifdef DRAWCOUNT InfoMessage( _(" Angle %0.3f #%ld"), angle, drawCount ); #else @@ -1331,6 +1463,7 @@ static STATUS_T CmdRotate( drawEnable = TRUE; } MainRedraw(); + MapRedraw(); return C_CONTINUE; case C_UP: state = 0; @@ -1341,19 +1474,33 @@ static STATUS_T CmdRotate( } return C_CONTINUE; } + FreeTempStrings(); if ( rotateAlignState == 2 ) { - DrawMovedTracks(); + //DrawMovedTracks(); MoveTracks( quickMove==MOVE_QUICK, FALSE, TRUE, zero, orig, angle ); rotateAlignState = 0; } else if (drawnAngle) { DrawLine( &tempD, base, orig, 0, wDrawColorBlack ); - DrawMovedTracks(); + //DrawMovedTracks(); MoveTracks( quickMove==MOVE_QUICK, FALSE, TRUE, zero, orig, angle ); } MainRedraw(); + MapRedraw(); return C_TERMINATE; case C_CMDMENU: + base = pos; + trk = OnTrack(&pos, FALSE, FALSE); //Note pollutes pos if turntable + if ((trk) && + QueryTrack(trk,Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius + trackParams_t trackParams; + if (GetTrackParams(PARAMS_CORNU, trk, pos, &trackParams)) { + DIST_T dist = FindDistance(base, trackParams.ttcenter); + if (dist < trackParams.ttradius/4) { + cmdMenuPos = trackParams.ttcenter; + } + } + } wMenuPopupShow( selectPopup2M ); return C_CONTINUE; @@ -1371,6 +1518,20 @@ static STATUS_T CmdRotate( return C_CONTINUE; } +static void QuickMove( void* pos) { + coOrd move_pos = *(coOrd*)pos; + if ( SelectedTracksAreFrozen() ) + return; + wDrawDelayUpdate( mainD.d, TRUE ); + GetMovedTracks(FALSE); + DrawSelectedTracksD( &mainD, wDrawColorWhite ); + UndoStart( _("Move Tracks"), "Move Tracks" ); + MoveTracks( quickMove==MOVE_QUICK, TRUE, FALSE, move_pos, zero, 0.0 ); + wDrawDelayUpdate( mainD.d, FALSE ); + MainRedraw(); + MapRedraw(); +} + static void QuickRotate( void* pangle ) { ANGLE_T angle = (ANGLE_T)(long)pangle; @@ -1382,6 +1543,8 @@ static void QuickRotate( void* pangle ) UndoStart( _("Rotate Tracks"), "Rotate Tracks" ); MoveTracks( quickMove==MOVE_QUICK, FALSE, TRUE, zero, cmdMenuPos, angle ); wDrawDelayUpdate( mainD.d, FALSE ); + MainRedraw(); + MapRedraw(); } @@ -1460,11 +1623,26 @@ STATUS_T CmdMoveDescription( ep = -1; mode = 2; } + d = CornuDescriptionDistance( pos, trk1 ); + if ( d < dd ) { + dd = d; + trk = trk1; + ep = -1; + mode = 3; + } + d = BezierDescriptionDistance( pos, trk1 ); + if ( d < dd ) { + dd = d; + trk = trk1; + ep = -1; + mode = 4; + } } if (trk != NULL) { UndoStart( _("Move Label"), "Modedesc( T%d )", GetTrkIndex(trk) ); UndoModify( trk ); } + /* no break */ case C_MOVE: case C_UP: case C_REDRAW: @@ -1478,9 +1656,13 @@ STATUS_T CmdMoveDescription( return CompoundDescriptionMove( trk, action, pos ); case 2: return CurveDescriptionMove( trk, action, pos ); + case 3: + return CornuDescriptionMove( trk, action, pos ); + case 4: + return BezierDescriptionMove( trk, action, pos ); } } - + break; case C_CMDMENU: moveDescTrk = OnTrack( &pos, TRUE, FALSE ); if ( moveDescTrk == NULL ) break; @@ -1579,6 +1761,7 @@ static STATUS_T CmdFlip( pos0 = pos1 = pos; DrawLine( &tempD, pos0, pos1, 0, wDrawColorBlack ); MainRedraw(); + MapRedraw(); return C_CONTINUE; case C_MOVE: DrawLine( &tempD, pos0, pos1, 0, wDrawColorBlack ); @@ -1586,6 +1769,7 @@ static STATUS_T CmdFlip( DrawLine( &tempD, pos0, pos1, 0, wDrawColorBlack ); InfoMessage( _("Angle %0.2f"), FindAngle( pos0, pos1 ) ); MainRedraw(); + MapRedraw(); return C_CONTINUE; case C_UP: DrawLine( &tempD, pos0, pos1, 0, wDrawColorBlack ); @@ -1593,6 +1777,7 @@ static STATUS_T CmdFlip( FlipTracks( pos0, FindAngle( pos0, pos1 ) ); state = 0; MainRedraw(); + MapRedraw(); return C_TERMINATE; #ifdef LATER @@ -1821,6 +2006,18 @@ static STATUS_T CmdSelect( if (selectedTrackCount <= 0) { wMenuPopupShow( selectPopup1M ); } else { + coOrd base = pos; + track_p trk = OnTrack(&pos, FALSE, FALSE); //Note pollutes pos if turntable + if ((trk) && + QueryTrack(trk,Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius + trackParams_t trackParams; + if (GetTrackParams(PARAMS_CORNU, trk, pos, &trackParams)) { + DIST_T dist = FindDistance(base, trackParams.ttcenter); + if (dist < trackParams.ttradius/4) { + cmdMenuPos = trackParams.ttcenter; + } + } + } wMenuPopupShow( selectPopup2M ); } return C_CONTINUE; @@ -1871,6 +2068,8 @@ EXPORT void InitCmdSelect( wMenu_p menu ) quickMove2M[1] = wMenuToggleCreate( selectPopup2M, "", _("Simple"), 0, quickMove==1, ChangeQuickMove, (void *) 1 ); quickMove2M[2] = wMenuToggleCreate( selectPopup2M, "", _("End Points"), 0, quickMove==2, ChangeQuickMove, (void *) 2 ); wMenuSeparatorCreate( selectPopup2M ); + AddMoveMenu( selectPopup2M, QuickMove); + wMenuSeparatorCreate( selectPopup2M ); AddRotateMenu( selectPopup2M, QuickRotate ); rotateAlignMI = wMenuPushCreate( selectPopup2M, "", _("Align"), 0, (wMenuCallBack_p)RotateAlign, NULL ); ParamRegister( &rescalePG ); diff --git a/app/bin/cselect.h b/app/bin/cselect.h index 890e53b..c02cc1c 100644 --- a/app/bin/cselect.h +++ b/app/bin/cselect.h @@ -1,6 +1,6 @@ -#ifndef CSELECT_H -#define CSELECT_H - +/** \file cselect.h + * Definitions and function prototypes for operations on selected elements + */ /* XTrkCad - Model Railroad CAD * Copyright (C) 2005 Dave Bullis * @@ -19,6 +19,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef CSELECT_H +#define CSELECT_H + +#include "common.h" +#include "track.h" + wIndex_t selectCmdInx; wIndex_t moveCmdInx; wIndex_t rotateCmdInx; diff --git a/app/bin/csensor.c b/app/bin/csensor.c index e962089..db34b95 100644 --- a/app/bin/csensor.c +++ b/app/bin/csensor.c @@ -47,10 +47,18 @@ static const char rcsid[] = "@(#) : $Id$"; #include -#include "track.h" -#include "trackx.h" +#include + #include "compound.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "layout.h" +#include "param.h" +#include "track.h" +#include "trackx.h" +#include "utility.h" EXPORT TRKTYP_T T_SENSOR = -1; @@ -433,28 +441,23 @@ static void CreateNewSensor (coOrd orig) static STATUS_T CmdSensor ( wAction_t action, coOrd pos ) { - - switch (action) { case C_START: InfoMessage(_("Place sensor")); return C_CONTINUE; case C_DOWN: - SnapPos(&pos); - DDrawSensor( &tempD, pos, GetScaleRatio(curScaleInx), wDrawColorBlack ); - return C_CONTINUE; - case C_MOVE: - SnapPos(&pos); - DDrawSensor( &tempD, pos, GetScaleRatio(curScaleInx), wDrawColorBlack ); + case C_MOVE: + SnapPos(&pos); + DDrawSensor( &tempD, pos, GetScaleRatio(GetLayoutCurScale()), wDrawColorBlack ); return C_CONTINUE; case C_UP: SnapPos(&pos); - DDrawSensor( &tempD, pos, GetScaleRatio(curScaleInx), wDrawColorBlack ); + DDrawSensor( &tempD, pos, GetScaleRatio(GetLayoutCurScale()), wDrawColorBlack ); CreateNewSensor(pos); return C_TERMINATE; case C_REDRAW: case C_CANCEL: - DDrawSensor( &tempD, pos, GetScaleRatio(curScaleInx), wDrawColorBlack ); + DDrawSensor( &tempD, pos, GetScaleRatio(GetLayoutCurScale()), wDrawColorBlack ); return C_CONTINUE; default: return C_CONTINUE; diff --git a/app/bin/csignal.c b/app/bin/csignal.c index 06adb19..2f02e58 100644 --- a/app/bin/csignal.c +++ b/app/bin/csignal.c @@ -12,7 +12,7 @@ * Author : $Author$ * Created By : Robert Heller * Created : Sun Feb 19 13:11:45 2017 - * Last Modified : <170314.1311> + * Last Modified : <170417.1113> * * Description * @@ -48,10 +48,18 @@ static const char rcsid[] = "@(#) : $Id$"; #include -#include "track.h" -#include "trackx.h" +#include + #include "compound.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "layout.h" +#include "param.h" +#include "track.h" +#include "trackx.h" +#include "utility.h" EXPORT TRKTYP_T T_SIGNAL = -1; @@ -515,6 +523,7 @@ static void SignalEditOk ( void * junk ) track_p trk; signalData_p xx; wIndex_t ia; + CSIZE_T newsize; if (signalCreate_P) { UndoStart( _("Create Signal"), "Create Signal"); @@ -526,16 +535,15 @@ static void SignalEditOk ( void * junk ) xx = GetsignalData(trk); if (xx->numAspects != signalAspect_da.cnt) { /* We need to reallocate the extra data. */ - /* We will delete the Signal and re-create it. */ - BOOL_T visible = GetTrkVisible(trk); - SCALEINX_T scale = GetTrkScale(trk); - LAYER_T layer = GetTrkLayer(trk); - wIndex_t tindx = GetTrkIndex(trk); - FreeTrack(trk); - trk = NewTrack(tindx, T_SIGNAL, 0, sizeof(signalData_t)+(sizeof(signalAspect_t)*(signalAspect_da.cnt-1))+1); - SetTrkVisible(trk,visible); - SetTrkScale(trk,scale); - SetTrkLayer(trk,layer); + for (ia = 0; ia < xx->numAspects; ia++) { + MyFree((&(xx->aspectList))[ia].aspectName); + MyFree((&(xx->aspectList))[ia].aspectScript); + (&(xx->aspectList))[ia].aspectName = NULL; + (&(xx->aspectList))[ia].aspectScript = NULL; + } + newsize = sizeof(signalData_t)+(sizeof(signalAspect_t)*(signalAspect_da.cnt-1))+1; + trk->extraData = MyRealloc(trk->extraData,newsize); + trk->extraSize = newsize; xx = GetsignalData(trk); } } @@ -769,7 +777,7 @@ static STATUS_T CmdSignal ( wAction_t action, coOrd pos ) case C_MOVE: SnapPos(&pos); orient = FindAngle(pos0,pos); - DDrawSignal( &tempD, pos0, orient, 1, GetScaleRatio(curScaleInx), wDrawColorBlack ); + DDrawSignal( &tempD, pos0, orient, 1, GetScaleRatio(GetLayoutCurScale()), wDrawColorBlack ); return C_CONTINUE; case C_UP: SnapPos(&pos); @@ -778,7 +786,7 @@ static STATUS_T CmdSignal ( wAction_t action, coOrd pos ) return C_TERMINATE; case C_REDRAW: case C_CANCEL: - DDrawSignal( &tempD, pos0, orient, 1, GetScaleRatio(curScaleInx), wDrawColorBlack ); + DDrawSignal( &tempD, pos0, orient, 1, GetScaleRatio(GetLayoutCurScale()), wDrawColorBlack ); return C_CONTINUE; default: return C_CONTINUE; diff --git a/app/bin/csnap.c b/app/bin/csnap.c index 1d16136..0f0f353 100644 --- a/app/bin/csnap.c +++ b/app/bin/csnap.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/csnap.c,v 1.7 2008-06-03 15:43:58 m_fischer Exp $ +/** \file csnap.c + * Draw Snap Grid */ /* XTrkCad - Model Railroad CAD @@ -20,13 +20,19 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" -#include "i18n.h" +#include +#include "custom.h" +#include "fileio.h" +#include "i18n.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" /***************************************************************************** * - * Draw Snap Grid + * */ diff --git a/app/bin/csplit.c b/app/bin/csplit.c index 69642fb..6cfdcc8 100644 --- a/app/bin/csplit.c +++ b/app/bin/csplit.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/csplit.c,v 1.4 2008-03-06 19:35:06 m_fischer Exp $ +/** \file csplit.c + * SPLIT */ /* XTrkCad - Model Railroad CAD @@ -20,15 +20,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include "cundo.h" #include "i18n.h" - -/***************************************************************************** - * - * SPLIT - * - */ - +#include "messages.h" +#include "track.h" +#include "utility.h" static wMenu_p splitPopupM[2]; static wMenuToggle_p splitPopupMI[2][4]; @@ -70,6 +66,7 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) switch (action) { case C_START: InfoMessage( _("Select track to split") ); + /* no break */ case C_DOWN: case C_MOVE: return C_CONTINUE; @@ -82,6 +79,11 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) onTrackInSplit = FALSE; return C_TERMINATE; } + if (!QueryTrack(trk0,Q_MODIFY_CAN_SPLIT)) { + onTrackInSplit = FALSE; + InfoMessage(_("Can't Split that Track")); + return C_CONTINUE; + } ep0 = PickEndPoint( pos, trk0 ); onTrackInSplit = FALSE; if (ep0 < 0) { diff --git a/app/bin/cstraigh.c b/app/bin/cstraigh.c index 6038c9a..7be25ee 100644 --- a/app/bin/cstraigh.c +++ b/app/bin/cstraigh.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cstraigh.c,v 1.4 2008-03-06 19:35:06 m_fischer Exp $ +/** \file cstraigh.c + * STRAIGHT */ /* XTrkCad - Model Railroad CAD @@ -19,22 +19,25 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include -#include "track.h" #include "cstraigh.h" +#include "cundo.h" +#include "fileio.h" #include "i18n.h" - -/******************************************************************************* - * - * STRAIGHT - * - */ +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" /* * STATE INFO */ static struct { coOrd pos0, pos1; + track_p trk; + EPINX_T ep; + BOOL_T down; } Dl; @@ -42,15 +45,46 @@ static STATUS_T CmdStraight( wAction_t action, coOrd pos ) { track_p t; DIST_T dist; + coOrd p; switch (action) { case C_START: - InfoMessage( _("Place 1st end point of Straight track") ); + Dl.pos0=pos; + Dl.pos1=pos; + Dl.trk = NULL; + Dl.ep=-1; + Dl.down = FALSE; + InfoMessage( _("Place 1st end point of straight track + Shift -> snap to unconnected endpoint") ); return C_CONTINUE; case C_DOWN: - SnapPos( &pos ); + p = pos; + BOOL_T found = FALSE; + Dl.trk = NULL; + if ((MyGetKeyState() & WKEY_SHIFT) != 0) { + if ((t = OnTrack(&p, FALSE, TRUE)) != NULL) { + EPINX_T ep = PickUnconnectedEndPointSilent(p, t); + if (ep != -1) { + Dl.trk = t; + Dl.ep = ep; + pos = GetTrkEndPos(t, ep); + found = TRUE; + } else { + InfoMessage(_("No unconnected end-point on track - Try again or release Shift and click")); + Dl.pos0=pos; + Dl.pos1=pos; + return C_CONTINUE; + } + } else { + InfoMessage(_("Not on a track - Try again or release Shift and click")); + Dl.pos0=pos; + Dl.pos1=pos; + return C_CONTINUE; + } + } + Dl.down = TRUE; + if (!found) SnapPos( &pos ); Dl.pos0 = pos; InfoMessage( _("Drag to place 2nd end point") ); DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); @@ -62,8 +96,17 @@ static STATUS_T CmdStraight( wAction_t action, coOrd pos ) return C_CONTINUE; case C_MOVE: + if (!Dl.down) return C_CONTINUE; DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); - SnapPos( &pos ); + ANGLE_T angle, angle2; + if (Dl.trk) { + angle = NormalizeAngle(GetTrkEndAngle( Dl.trk, Dl.ep)); + angle2 = NormalizeAngle(FindAngle(pos, Dl.pos0)-angle); + if (angle2 > 90.0 && angle2 < 270.0) + Translate( &pos, Dl.pos0, angle, FindDistance( Dl.pos0, pos ) ); + else pos = Dl.pos0; + } else SnapPos( &pos ); + InfoMessage( _("Straight Track Length=%s Angle=%0.3f"), FormatDistance(FindDistance( Dl.pos0, pos )), PutAngle(FindAngle( Dl.pos0, pos )) ); @@ -73,15 +116,25 @@ static STATUS_T CmdStraight( wAction_t action, coOrd pos ) return C_CONTINUE; case C_UP: + if (!Dl.down) return C_CONTINUE; DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); tempSegs_da.cnt = 0; - SnapPos( &pos ); + if (Dl.trk) { + angle = NormalizeAngle(GetTrkEndAngle( Dl.trk, Dl.ep)); + angle2 = NormalizeAngle(FindAngle(pos, Dl.pos0)-angle); + if (angle2 > 90.0 && angle2 < 270.0) + Translate( &pos, Dl.pos0, angle, FindDistance( Dl.pos0, pos )); + else pos = Dl.pos0; + } else SnapPos( &pos ); if ((dist=FindDistance( Dl.pos0, pos )) <= minLength) { ErrorMessage( MSG_TRK_TOO_SHORT, "Straight ", PutDim(fabs(minLength-dist)) ); return C_TERMINATE; } UndoStart( _("Create Straight Track"), "newStraight" ); t = NewStraightTrack( Dl.pos0, pos ); + if (Dl.trk) { + ConnectTracks(Dl.trk, Dl.ep, t, 0); + } UndoEnd(); DrawNewTrack(t); return C_TERMINATE; @@ -89,6 +142,7 @@ static STATUS_T CmdStraight( wAction_t action, coOrd pos ) case C_REDRAW: case C_CANCEL: DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); + Dl.down = FALSE; return C_CONTINUE; default: diff --git a/app/bin/cstraigh.h b/app/bin/cstraigh.h index eca7e99..30d1539 100644 --- a/app/bin/cstraigh.h +++ b/app/bin/cstraigh.h @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cstraigh.h,v 1.1 2005-12-07 15:46:54 rc-flyer Exp $ +/** \file cstraigh.h + * Prototypes for straight track functions */ /* XTrkCad - Model Railroad CAD @@ -20,6 +20,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef HAVE_CSTRAIGH_H +#define HAVE_CSTRAIGH_H + +#include "common.h" +#include "track.h" + void AdjustStraightEndPt( track_p t, EPINX_T ep, coOrd pos ); track_p NewStraightTrack( coOrd p0, coOrd p1 ); BOOL_T ExtendStraightToJoin( track_p, EPINX_T, track_p, EPINX_T ); + +#endif // !HAVE_CSTRAIGH_H \ No newline at end of file diff --git a/app/bin/cstruct.c b/app/bin/cstruct.c index 1f86217..41c47e5 100644 --- a/app/bin/cstruct.c +++ b/app/bin/cstruct.c @@ -1,8 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cstruct.c,v 1.4 2008-03-06 19:35:06 m_fischer Exp $ - * +/** \file cstruct.c * T_STRUCTURE - * */ /* XTrkCad - Model Railroad CAD @@ -24,11 +21,20 @@ */ #include -#include "track.h" +#include +#include +#include + #include "compound.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" - -#include +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" EXPORT TRKTYP_T T_STRUCTURE = -1; @@ -272,7 +278,7 @@ static ANGLE_T GetAngleStruct( pos.x -= xx->orig.x; pos.y -= xx->orig.y; Rotate( &pos, zero, -xx->angle ); - angle = GetAngleSegs( xx->segCnt, xx->segs, pos, NULL ); + angle = GetAngleSegs( xx->segCnt, xx->segs, &pos, NULL, NULL, NULL, NULL, NULL); if ( ep0 ) *ep0 = -1; if ( ep1 ) *ep1 = -1; return NormalizeAngle( angle+xx->angle ); @@ -403,7 +409,7 @@ static void structureChange( long changes ) maxStructureDim.x = maxStructureDim.y = 0.0; if (structureInfo_da.cnt <= 0) return; - curStructure = StructAdd( LABEL_TABBED|LABEL_MANUF|LABEL_PARTNO|LABEL_DESCR, curScaleInx, structureListL, &maxStructureDim ); + curStructure = StructAdd( LABEL_TABBED|LABEL_MANUF|LABEL_PARTNO|LABEL_DESCR, GetLayoutCurScale(), structureListL, &maxStructureDim ); wControlShow( (wControl_p)structureListL, TRUE ); if (curStructure == NULL) { wDrawClear( structureD.d ); @@ -653,6 +659,7 @@ EXPORT STATUS_T CmdStructureAction( DrawSegs( &tempD, Dst.pos, Dst.angle, curStructure->segs, curStructure->segCnt, 0.0, wDrawColorBlack ); MainRedraw(); + MapRedraw(); InfoMessage( "[ %0.3f %0.3f ]", pos.x - origPos.x, pos.y - origPos.y ); return C_CONTINUE; @@ -701,6 +708,7 @@ EXPORT STATUS_T CmdStructureAction( DrawLine( &tempD, rot0, rot1, 0, wDrawColorBlack ); case C_UP: MainRedraw(); + MapRedraw(); return C_CONTINUE; case C_CMDMENU: @@ -854,7 +862,7 @@ EXPORT void AddHotBarStructures( void ) to = structureInfo(inx); if ( !( IsParamValid(to->paramFileIndex) && to->segCnt > 0 && - CompatibleScale( FALSE, to->scaleInx, curScaleInx ) ) ) + CompatibleScale( FALSE, to->scaleInx, GetLayoutCurScale()) ) ) /*( (strcmp( to->scale, "*" ) == 0 && strcasecmp( curScaleName, "DEMO" ) != 0 ) || strncasecmp( to->scale, curScaleName, strlen(to->scale) ) == 0 ) ) )*/ continue; diff --git a/app/bin/cswitchmotor.c b/app/bin/cswitchmotor.c index dbe006c..3d39a68 100644 --- a/app/bin/cswitchmotor.c +++ b/app/bin/cswitchmotor.c @@ -50,10 +50,17 @@ */ #include -#include "track.h" -#include "trackx.h" +#include + #include "compound.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "param.h" +#include "track.h" +#include "trackx.h" +#include "utility.h" EXPORT TRKTYP_T T_SWITCHMOTOR = -1; @@ -271,7 +278,7 @@ static DIST_T DistanceSwitchMotor (track_p t, coOrd * p ) { switchmotorData_p xx = GetswitchmotorData(t); if (xx->turnout == NULL) return 0; - return GetTrkDistance(xx->turnout,*p); + return GetTrkDistance(xx->turnout,p); } static void DescribeSwitchMotor (track_p trk, char * str, CSIZE_T len ) @@ -769,11 +776,11 @@ EXPORT void CheckDeleteSwitchmotor(track_p t) track_p sm; switchmotorData_p xx; - sm = FindSwitchMotor( t ); - if (sm == NULL) return; - xx = GetswitchmotorData (sm); - NoticeMessage(_("Deleting Switch Motor %s"),_("Ok"),NULL,xx->name); - DeleteTrack (sm, FALSE); + while ((sm = FindSwitchMotor( t ))) { //Cope with multiple motors for one Turnout! + xx = GetswitchmotorData (sm); + InfoMessage(_("Deleting Switch Motor %s"),xx->name); + DeleteTrack (sm, FALSE); + }; } diff --git a/app/bin/ctext.c b/app/bin/ctext.c index 525b55a..ca0c7c7 100644 --- a/app/bin/ctext.c +++ b/app/bin/ctext.c @@ -1,6 +1,5 @@ /** \file ctext.c * Text command - * */ /* XTrkCad - Model Railroad CAD @@ -21,8 +20,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include "cundo.h" +#include "fileio.h" #include "i18n.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "wlib.h" +#include "draw.h" +#include "misc.h" track_p NewText( wIndex_t index, coOrd p, ANGLE_T angle, char * text, CSIZE_T textSize, wDrawColor color ); @@ -43,11 +49,13 @@ static struct { coOrd cursPos0, cursPos1; POS_T cursHeight; POS_T textLen; + POS_T lastLineLen; + POS_T lastLineOffset; coOrd pos; ANGLE_T angle; long size; wIndex_t fontSizeInx; - char text[STR_SIZE]; + char text[STR_LONG_SIZE]; wDrawColor color; } Dt; @@ -70,31 +78,35 @@ static void TextDlgUpdate( int inx, void * context ) { - coOrd size; + coOrd size, lastline; switch (inx) { case 0: + case 1: if ( Dt.state == SHOW_TEXT) { - DrawString( &tempD, Dt.pos, 0.0, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color ); + DrawMultiString( &tempD, Dt.pos, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color, 0, NULL, NULL ); DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, Dt.color ); } UpdateFontSizeList( &Dt.size, (wList_p)textPLs[0].control, Dt.fontSizeInx ); /*wWinSetBusy( mainW, TRUE );*/ if ( Dt.state == SHOW_TEXT) { - DrawTextSize( &mainD, Dt.text, NULL, Dt.size, TRUE, &size ); + DrawMultiLineTextSize( &mainD, Dt.text, NULL, Dt.size, TRUE, &size, &lastline); Dt.textLen = size.x; + Dt.lastLineLen = lastline.x; + Dt.lastLineOffset = lastline.y; } - DrawTextSize( &mainD, "X", NULL, Dt.size, TRUE, &size ); + DrawTextSize( &mainD, "Aquilp", NULL, Dt.size, TRUE, &size ); Dt.cursHeight = size.y; /*wWinSetBusy( mainW, FALSE );*/ if ( Dt.state == SHOW_TEXT) { - Dt.cursPos0.x = Dt.cursPos1.x = Dt.pos.x+Dt.textLen; - Dt.cursPos1.y = Dt.pos.y+Dt.cursHeight; + Dt.cursPos0.x = Dt.cursPos1.x = Dt.pos.x+Dt.lastLineLen; + Dt.cursPos1.y = Dt.pos.y+Dt.cursHeight+Dt.lastLineOffset; DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, Dt.color ); - DrawString( &tempD, Dt.pos, 0.0, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color ); + DrawMultiString( &tempD, Dt.pos, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color, 0, NULL, NULL ); } MainRedraw(); - break; + MapRedraw(); + break; } } @@ -105,7 +117,7 @@ static STATUS_T CmdText( wAction_t action, coOrd pos ) unsigned char c; wControl_p controls[3]; char * labels[2]; - coOrd size; + coOrd size, lastline; switch (action & 0xFF) { case C_START: @@ -114,6 +126,8 @@ static STATUS_T CmdText( wAction_t action, coOrd pos ) Dt.len = 0; Dt.textLen = 0; Dt.text[0] = '\0'; + Dt.lastLineLen = 0; + Dt.lastLineOffset = 0; if (textPD.control == NULL) { @@ -122,14 +136,14 @@ static STATUS_T CmdText( wAction_t action, coOrd pos ) ParamRegister(&textPG); Dt.size = GetFontSize(Dt.fontSizeInx); } - Dt.size = wSelectedFontSize(); + Dt.size = (long)wSelectedFontSize(); Dt.fontSizeInx = GetFontSizeIndex(Dt.size); ParamLoadControls(&textPG); ParamGroupRecord( &textPG ); if (!inPlayback) wWinSetBusy(mainW, TRUE); - DrawTextSize(&mainD, "X", NULL, Dt.size, TRUE, &size); + DrawTextSize(&mainD, "Aquilp", NULL, Dt.size, TRUE, &size); Dt.cursHeight = size.y; if (!inPlayback) wWinSetBusy(mainW, FALSE); @@ -144,28 +158,28 @@ static STATUS_T CmdText( wAction_t action, coOrd pos ) break; case C_DOWN: if (Dt.state != 0) { - //DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, Dt.color ); - //DrawString( &tempD, Dt.pos, 0.0, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color ); } Dt.pos = pos; - Dt.cursPos0.y = Dt.cursPos1.y = pos.y; - Dt.cursPos0.x = Dt.cursPos1.x = pos.x + Dt.textLen; + Dt.cursPos0.y = Dt.cursPos1.y = pos.y + Dt.lastLineOffset; + Dt.cursPos0.x = Dt.cursPos1.x = pos.x + Dt.lastLineLen; + DrawTextSize(&mainD, "Aquilp", NULL, Dt.size, TRUE, &size); //In case fontsize change + Dt.cursHeight = size.y; Dt.cursPos1.y += Dt.cursHeight; DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, Dt.color ); - DrawString( &tempD, Dt.pos, 0.0, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color ); + DrawMultiString(&tempD, Dt.pos, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color, 0.0, NULL, NULL ); Dt.state = SHOW_TEXT; MainRedraw(); + MapRedraw(); return C_CONTINUE; case C_MOVE: - //DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, Dt.color ); - //DrawString( &tempD, Dt.pos, 0.0, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color ); Dt.pos = pos; - Dt.cursPos0.y = Dt.cursPos1.y = pos.y; - Dt.cursPos0.x = Dt.cursPos1.x = pos.x + Dt.textLen; + Dt.cursPos0.y = Dt.cursPos1.y = pos.y + Dt.lastLineOffset; + Dt.cursPos0.x = Dt.cursPos1.x = pos.x + Dt.lastLineLen; Dt.cursPos1.y += Dt.cursHeight; DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, wDrawColorBlack ); - DrawString( &tempD, Dt.pos, 0.0, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color ); + DrawMultiString(&tempD, Dt.pos, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color, 0.0, NULL, NULL ); MainRedraw(); + MapRedraw(); return C_CONTINUE; case C_UP: return C_CONTINUE; @@ -175,7 +189,7 @@ static STATUS_T CmdText( wAction_t action, coOrd pos ) return C_CONTINUE; } DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, Dt.color ); - DrawString( &tempD, Dt.pos, 0.0, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color ); + DrawMultiString(&tempD, Dt.pos, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color, 0.0, NULL, NULL ); c = (unsigned char)(action >> 8); switch (c) { case '\b': @@ -187,11 +201,17 @@ static STATUS_T CmdText( wAction_t action, coOrd pos ) wBeep(); } break; + case '\n': // Line Feed + if (Dt.len < sizeof Dt.text - 1 ) { + Dt.text[Dt.len++] = (char)c; + Dt.text[Dt.len] = '\000'; + } + break; case '\015': UndoStart( _("Create Text"), "newText - CR" ); t = NewText( 0, Dt.pos, Dt.angle, Dt.text, (CSIZE_T)Dt.size, Dt.color ); UndoEnd(); - DrawNewTrack(t); + DrawNewTrack(t); Dt.state = POSITION_TEXT; InfoSubstituteControls( NULL, NULL ); return C_TERMINATE; @@ -201,26 +221,33 @@ static STATUS_T CmdText( wAction_t action, coOrd pos ) Dt.text[Dt.len] = '\000'; } } - DrawTextSize( &mainD, Dt.text, NULL, Dt.size, TRUE, &size ); + DrawMultiLineTextSize( &mainD, Dt.text, NULL, Dt.size, TRUE, &size, &lastline); Dt.textLen = size.x; - Dt.cursPos0.x = Dt.cursPos1.x = Dt.pos.x + Dt.textLen; - DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, Dt.color ); - DrawString( &tempD, Dt.pos, 0.0, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color ); + Dt.lastLineLen = lastline.x; + Dt.lastLineOffset = lastline.y; + Dt.cursPos0.x = Dt.cursPos1.x = Dt.pos.x + Dt.lastLineLen; + Dt.cursPos0.y = Dt.cursPos1.y = Dt.pos.y + Dt.lastLineOffset; + DrawTextSize(&mainD, "Aquilp", NULL, Dt.size, TRUE, &size); //In case fontsize change + Dt.cursHeight = size.y; + Dt.cursPos1.y +=Dt.cursHeight; + MainRedraw(); + MapRedraw(); + //DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, Dt.color ); + //DrawMultiString(&tempD, Dt.pos, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color, 0.0, NULL, NULL ); return C_CONTINUE; case C_REDRAW: if (Dt.state == 1) { DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, Dt.color ); - DrawString( &tempD, Dt.pos, 0.0, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color ); + DrawMultiString(&tempD, Dt.pos, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color, 0.0, NULL, NULL ); } return C_CONTINUE; case C_CANCEL: if (Dt.state != POSITION_TEXT) { - //DrawString( &tempD, Dt.pos, 0.0, Dt.text, NULL, (FONTSIZE_T)Dt.size, Dt.color ); - //DrawLine( &tempD, Dt.cursPos0, Dt.cursPos1, 0, Dt.color ); Dt.state = POSITION_TEXT; } InfoSubstituteControls( NULL, NULL ); MainRedraw(); + MapRedraw(); return C_TERMINATE; case C_OK: if (Dt.state != POSITION_TEXT) { @@ -235,6 +262,7 @@ static STATUS_T CmdText( wAction_t action, coOrd pos ) } InfoSubstituteControls( NULL, NULL ); MainRedraw(); + MapRedraw(); return C_TERMINATE; case C_FINISH: diff --git a/app/bin/ctodesgn.c b/app/bin/ctodesgn.c index b5ba768..392b405 100644 --- a/app/bin/ctodesgn.c +++ b/app/bin/ctodesgn.c @@ -26,14 +26,22 @@ #endif #include - #include -#include "track.h" +#include +#include +#include + #include "ccurve.h" -#include "cstraigh.h" #include "compound.h" +#include "cstraigh.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "param.h" +#include "track.h" +#include "utility.h" + #define TURNOUTDESIGNER "CTURNOUT DESIGNER" @@ -1414,7 +1422,7 @@ static void NewTurnPrint( wDrawString( newTurnout_d.d, POSX(3.0), POSY(6.25), 0.0, message, fp, 30, wDrawColorBlack, 0 ); - sprintf( message, "%s %d x %d (of %d x %d)", _("Page"), i+1, j+1, ii, jj ); + sprintf( message, _("%s %d x %d (of %d x %d)"), _("Page"), i+1, j+1, ii, jj ); wDrawString( newTurnout_d.d, POSX(3.0), POSY(5.75), 0.0, message, fp, 20, wDrawColorBlack, 0 ); @@ -2176,14 +2184,14 @@ EXPORT BOOL_T WriteSegs( case SEG_CRVLIN: rc &= fprintf( f, "\t%c %ld %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f\n", segs[i].type, (segs[i].type==SEG_CRVTRK?0:roadbedColorRGB), segs[i].width, - segs[i].u.c.radius, + fabs(segs[i].u.c.radius), segs[i].u.c.center.x, segs[i].u.c.center.y, segs[i].u.c.a0, segs[i].u.c.a1 )>0; break; case SEG_FILCRCL: rc &= fprintf( f, "\t%c %ld %0.6f %0.6f %0.6f %0.6f\n", segs[i].type, roadbedColorRGB, segs[i].width, - segs[i].u.c.radius, + fabs(segs[i].u.c.radius), segs[i].u.c.center.x, segs[i].u.c.center.y )>0; break; case SEG_POLY: diff --git a/app/bin/ctrain.c b/app/bin/ctrain.c index d3eb00a..d480982 100644 --- a/app/bin/ctrain.c +++ b/app/bin/ctrain.c @@ -1,6 +1,5 @@ /** \file ctrain.c * Functions related to running trains - * */ /* XTrkCad - Model Railroad CAD @@ -25,37 +24,47 @@ #include #endif #include +#include +#include #define PRIVATE_EXTRADATA -#include "track.h" -#include "trackx.h" -#include "ctrain.h" + #include "compound.h" +#include "ctrain.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "trackx.h" +#include "utility.h" -EXPORT long programMode; -EXPORT long maxCouplingSpeed = 100; -EXPORT long hideTrainsInTunnels; +long programMode; +long maxCouplingSpeed = 100; +long hideTrainsInTunnels; extern int doDrawTurnoutPosition; -extern void NextTurnoutPosition( track_p ); +extern void NextTurnoutPosition(track_p); static TRKTYP_T T_CAR = -1; typedef enum { ST_NotOnTrack, ST_StopManual, ST_EndOfTrack, ST_OpenTurnout, ST_NoRoom, ST_Crashed } trainStatus_e; struct extraData { - traverseTrack_t trvTrk; - long state; - carItem_p item; - double speed; - BOOL_T direction; - BOOL_T autoReverse; - trainStatus_e status; - DIST_T distance; - coOrd couplerPos[2]; - LAYER_T trkLayer; - }; + traverseTrack_t trvTrk; + long state; + carItem_p item; + double speed; + BOOL_T direction; + BOOL_T autoReverse; + trainStatus_e status; + DIST_T distance; + coOrd couplerPos[2]; + unsigned int trkLayer; +}; #define NOTALAYER (127) #define CAR_STATE_IGNORED (1L<<17) @@ -63,16 +72,14 @@ struct extraData { #define CAR_STATE_LOCOISMASTER (1L<<19) #define CAR_STATE_ONHIDENTRACK (1L<<20) +#define COUPLERCONNECTIONANGLE 45.0 +#define CRASHSPEEDDECAY 5 #define IsOnTrack( XX ) ((XX)->trvTrk.trk!=NULL) #define IsIgnored( XX ) (((XX)->state&CAR_STATE_IGNORED)!=0) #define SetIgnored( XX ) (XX)->state |= CAR_STATE_IGNORED #define ClrIgnored( XX ) (XX)->state &= ~CAR_STATE_IGNORED -#ifdef LATER -#define IsLocoMaster( XX ) (((XX)->state&CAR_STATE_LOCOISMASTER)!=0) -#define SetLocoMaster( XX ) (XX)->state |= CAR_STATE_LOCOISMASTER -#define ClrLocoMaster( XX ) (XX)->state &= ~CAR_STATE_LOCOISMASTER -#endif + #define IsLocoMaster( XX ) CarItemIsLocoMaster((XX)->item) #define SetLocoMaster( XX ) CarItemSetLocoMaster((XX)->item,TRUE) #define ClrLocoMaster( XX ) CarItemSetLocoMaster((XX)->item,FALSE) @@ -82,8 +89,8 @@ struct extraData { static wButton_p newcarB; -static void ControllerDialogSyncAll( void ); -static STATUS_T CmdTrain( wAction_t, coOrd ); +static void ControllerDialogSyncAll(void); +static STATUS_T CmdTrain(wAction_t, coOrd); static wMenu_p trainPopupM; static wMenuPush_p trainPopupMI[8]; static track_p followTrain; @@ -91,16 +98,16 @@ static coOrd followCenter; static BOOL_T trainsTimeoutPending; static enum { TRAINS_STOP, TRAINS_RUN, TRAINS_IDLE, TRAINS_PAUSE } trainsState; static wIcon_p stopI, goI; -static void RestartTrains( void ); -static void DrawAllCars( void ); -static void UncoupleCars( track_p, track_p ); -static void TrainTimeEndPause( void ); -static void TrainTimeStartPause( void ); +static void RestartTrains(void); +static void DrawAllCars(void); +static void UncoupleCars(track_p, track_p); +static void TrainTimeEndPause(void); +static void TrainTimeStartPause(void); static int log_trainMove; static int log_trainPlayback; -static void PlaceCar( track_p ); +static void PlaceCar(track_p); #define WALK_CARS_START( CAR, XX, DIR ) \ @@ -123,151 +130,175 @@ static void PlaceCar( track_p ); * Generic Commands */ -EXPORT void CarGetPos( - track_p car, - coOrd * posR, - ANGLE_T * angleR ) +void CarGetPos( + track_p car, + coOrd * posR, + ANGLE_T * angleR) { - struct extraData * xx = GetTrkExtraData( car ); - if ( GetTrkType(car) != T_CAR ) - AbortProg( "getCarPos" ); - *posR = xx->trvTrk.pos; - *angleR = xx->trvTrk.angle; + struct extraData * xx = GetTrkExtraData(car); + + if (GetTrkType(car) != T_CAR) { + AbortProg("getCarPos"); + } + + *posR = xx->trvTrk.pos; + *angleR = xx->trvTrk.angle; } -EXPORT void CarSetVisible( - track_p car ) +void CarSetVisible( + track_p car) { - struct extraData * xx; - int dir; - dir = 0; - WALK_CARS_START( car, xx, dir ) - if ( GetTrkType(car) != T_CAR ) - AbortProg( "carSetVisible" ); - WALK_CARS_END( car, xx, dir ) - dir = 1-dir; - WALK_CARS_START( car, xx, dir ) { - xx->state &= ~(CAR_STATE_ONHIDENTRACK); - xx->trkLayer = NOTALAYER; - } - WALK_CARS_END( car, xx, dir ) + struct extraData * xx; + int dir; + dir = 0; + WALK_CARS_START(car, xx, dir) + + if (GetTrkType(car) != T_CAR) { + AbortProg("carSetVisible"); + } + + WALK_CARS_END(car, xx, dir) + dir = 1-dir; + WALK_CARS_START(car, xx, dir) { + xx->state &= ~(CAR_STATE_ONHIDENTRACK); + xx->trkLayer = NOTALAYER; + } + WALK_CARS_END(car, xx, dir) } static struct { - long index; - coOrd pos; - ANGLE_T angle; - DIST_T length; - DIST_T width; - char desc[STR_SIZE]; - char number[STR_SIZE]; - } carData; + long index; + coOrd pos; + ANGLE_T angle; + DIST_T length; + DIST_T width; + char desc[STR_SIZE]; + char number[STR_SIZE]; +} carData; typedef enum { IT, PN, AN, LN, WD, DE, NM } carDesc_e; static descData_t carDesc[] = { -/*IT*/ { DESC_LONG, N_("Index"), &carData.index }, -/*PN*/ { DESC_POS, N_("Position"), &carData.pos }, -/*AN*/ { DESC_ANGLE, N_("Angle"), &carData.angle }, -/*LN*/ { DESC_DIM, N_("Length"), &carData.length }, -/*WD*/ { DESC_DIM, N_("Width"), &carData.width }, -/*DE*/ { DESC_STRING, N_("Description"), &carData.desc }, -/*NM*/ { DESC_STRING, N_("Rep Marks"), &carData.number }, - { DESC_NULL } }; + /*IT*/ { DESC_LONG, N_("Index"), &carData.index }, + /*PN*/ { DESC_POS, N_("Position"), &carData.pos }, + /*AN*/ { DESC_ANGLE, N_("Angle"), &carData.angle }, + /*LN*/ { DESC_DIM, N_("Length"), &carData.length }, + /*WD*/ { DESC_DIM, N_("Width"), &carData.width }, + /*DE*/ { DESC_STRING, N_("Description"), &carData.desc }, + /*NM*/ { DESC_STRING, N_("Rep Marks"), &carData.number }, + { DESC_NULL } +}; static void UpdateCar( - track_p trk, - int inx, - descData_p descUpd, - BOOL_T needUndoStart ) + track_p trk, + int inx, + descData_p descUpd, + BOOL_T needUndoStart) { - BOOL_T titleChanged; - const char * cp; - if ( inx == -1 ) { - titleChanged = FALSE; - cp = wStringGetValue( (wString_p)carDesc[NM].control0 ); - if ( cp && strcmp( carData.number, cp ) != 0 ) { - titleChanged = TRUE; - strcpy( carData.number, cp ); - } - if ( !titleChanged ) - return; - if ( needUndoStart ) - UndoStart( _("Change Track"), "Change Track" ); - UndoModify( trk ); - UndrawNewTrack( trk ); - DrawNewTrack( trk ); - return; - } - UndrawNewTrack( trk ); - switch (inx) { - case NM: - break; - default: - break; - } - DrawNewTrack( trk ); + if (inx == -1) { + BOOL_T titleChanged; + const char * cp; + titleChanged = FALSE; + cp = wStringGetValue((wString_p)carDesc[NM].control0); + + if (cp && strcmp(carData.number, cp) != 0) { + titleChanged = TRUE; + strcpy(carData.number, cp); + } + + if (!titleChanged) { + return; + } + + if (needUndoStart) { + UndoStart(_("Change Track"), "Change Track"); + } + + UndoModify(trk); + UndrawNewTrack(trk); + DrawNewTrack(trk); + return; + } + + UndrawNewTrack(trk); + + switch (inx) { + case NM: + break; + + default: + break; + } + + DrawNewTrack(trk); } static void DescribeCar( - track_p trk, - char * str, - CSIZE_T len ) + track_p trk, + char * str, + CSIZE_T len) +{ + struct extraData *xx = GetTrkExtraData(trk); + char * cp; + coOrd size; + CarItemSize(xx->item, &size); + carData.length = size.x; + carData.width = size.y; + cp = CarItemDescribe(xx->item, 0, &carData.index); + strcpy(carData.number, CarItemNumber(xx->item)); + strncpy(str, cp, len); + carData.pos = xx->trvTrk.pos; + carData.angle = xx->trvTrk.angle; + cp = CarItemDescribe(xx->item, -1, NULL); + strncpy(carData.desc, cp, sizeof carData.desc); + carDesc[IT].mode = + carDesc[PN].mode = + carDesc[AN].mode = + carDesc[LN].mode = + carDesc[WD].mode = DESC_RO; + carDesc[DE].mode = + carDesc[NM].mode = DESC_RO; + DoDescribe(_("Car"), trk, carDesc, UpdateCar); +} + + +void FlipTraverseTrack( + traverseTrack_p trvTrk) { - struct extraData *xx = GetTrkExtraData(trk); - char * cp; - coOrd size; - - CarItemSize( xx->item, &size ); - carData.length = size.x; - carData.width = size.y; - cp = CarItemDescribe( xx->item, 0, &carData.index ); - strcpy( carData.number, CarItemNumber(xx->item) ); - strncpy( str, cp, len ); - carData.pos = xx->trvTrk.pos; - carData.angle = xx->trvTrk.angle; - cp = CarItemDescribe( xx->item, -1, NULL ); - strncpy( carData.desc, cp, sizeof carData.desc ); - carDesc[IT].mode = - carDesc[PN].mode = - carDesc[AN].mode = - carDesc[LN].mode = - carDesc[WD].mode = DESC_RO; - carDesc[DE].mode = - carDesc[NM].mode = DESC_RO; - DoDescribe( _("Car"), trk, carDesc, UpdateCar ); + trvTrk->angle = NormalizeAngle(trvTrk->angle + 180.0); + + if (trvTrk->length > 0) { + trvTrk->dist = trvTrk->length - trvTrk->dist; + } } -EXPORT void FlipTraverseTrack( - traverseTrack_p trvTrk ) +BOOL_T TraverseTrack2( + traverseTrack_p trvTrk0, + DIST_T dist0) { - trvTrk->angle = NormalizeAngle( trvTrk->angle + 180.0 ); - if ( trvTrk->length > 0 ) - trvTrk->dist = trvTrk->length - trvTrk->dist; -} + traverseTrack_t trvTrk = *trvTrk0; + DIST_T dist = dist0; + if (dist0 < 0) { + dist = -dist; + FlipTraverseTrack(&trvTrk); + } -EXPORT BOOL_T TraverseTrack2( - traverseTrack_p trvTrk0, - DIST_T dist0 ) -{ - traverseTrack_t trvTrk = *trvTrk0; - DIST_T dist = dist0; - if ( dist0 < 0 ) { - dist = -dist; - FlipTraverseTrack( &trvTrk ); - } - if ( trvTrk.trk==NULL || - (!TraverseTrack(&trvTrk,&dist)) || - trvTrk.trk==NULL || - dist!=0.0 ) { - Translate( &trvTrk.pos, trvTrk.pos, trvTrk.angle, dist ); - } - if ( dist0 < 0 ) - FlipTraverseTrack( &trvTrk ); - *trvTrk0 = trvTrk; - return TRUE; + if (trvTrk.trk==NULL || + (!TraverseTrack(&trvTrk,&dist)) || + trvTrk.trk==NULL || + dist!=0.0) { + Translate(&trvTrk.pos, trvTrk.pos, trvTrk.angle, dist); + + } + + if (dist0 < 0) { + FlipTraverseTrack(&trvTrk); + } + + *trvTrk0 = trvTrk; + return TRUE; } @@ -276,220 +307,238 @@ static BOOL_T drawCarEnable = TRUE; static BOOL_T noCarDraw = FALSE; static void DrawCar( - track_p car, - drawCmd_p d, - wDrawColor color ) + track_p car, + drawCmd_p d, + wDrawColor color) { - struct extraData * xx = GetTrkExtraData(car); - int dir; - vector_t coupler[2]; - track_p car1; - struct extraData * xx1; - int dir1; - - if ( drawCarEnable == FALSE ) - return; - /*d = &tempD;*/ -/* - if ( !IsVisible(xx) ) - return; -*/ - if ( d == &mapD ) - return; - if ( noCarDraw ) - return; - if ( hideTrainsInTunnels && - ( (((xx->state&CAR_STATE_ONHIDENTRACK)!=0) && drawTunnel==0) || - (xx->trkLayer!=NOTALAYER && !GetLayerVisible(xx->trkLayer)) ) ) - return; - - for ( dir=0; dir<2; dir++ ) { - coupler[dir].pos = xx->couplerPos[dir]; - if ( (car1 = GetTrkEndTrk(car,dir)) ) { - xx1 = GetTrkExtraData(car1); - dir1 = (GetTrkEndTrk(car1,0)==car)?0:1; - coupler[dir].angle = FindAngle( xx->couplerPos[dir], xx1->couplerPos[dir1] ); - } else { - coupler[dir].angle = NormalizeAngle(xx->trvTrk.angle+(dir==0?0.0:180.0)-15.0); - } - } - CarItemDraw( d, xx->item, color, xx->direction, IsLocoMaster(xx), coupler ); + struct extraData * xx = GetTrkExtraData(car); + int dir; + vector_t coupler[2]; + struct extraData * xx1; + int dir1; + + if (drawCarEnable == FALSE) { + return; + } + + if (d == &mapD) { + return; + } + + if (noCarDraw) { + return; + } + + if (hideTrainsInTunnels && + ((((xx->state&CAR_STATE_ONHIDENTRACK)!=0) && drawTunnel==0) || + (xx->trkLayer!=NOTALAYER && !GetLayerVisible(xx->trkLayer)))) { + return; + } + + for (dir=0; dir<2; dir++) { + track_p car1; + coupler[dir].pos = xx->couplerPos[dir]; + + if ((car1 = GetTrkEndTrk(car,dir))) { + xx1 = GetTrkExtraData(car1); + dir1 = (GetTrkEndTrk(car1,0)==car)?0:1; + coupler[dir].angle = FindAngle(xx->couplerPos[dir], xx1->couplerPos[dir1]); + } else { + coupler[dir].angle = NormalizeAngle(xx->trvTrk.angle+(dir==0?0.0:180.0)-15.0); + } + } + + CarItemDraw(d, xx->item, color, xx->direction, IsLocoMaster(xx), coupler); } static DIST_T DistanceCar( - track_p trk, - coOrd * pos ) + track_p trk, + coOrd * pos) { - struct extraData * xx = GetTrkExtraData(trk); - DIST_T dist; - coOrd pos1; - coOrd size; - - xx = GetTrkExtraData(trk); - if ( IsIgnored(xx) ) - return 10000.0; - - CarItemSize( xx->item, &size ); /* TODO assumes xx->trvTrk.pos is the car center */ - dist = FindDistance( *pos, xx->trvTrk.pos ); - if ( dist < size.x/2.0 ) { - pos1 = *pos; - Rotate( &pos1, xx->trvTrk.pos, -xx->trvTrk.angle ); - pos1.x += -xx->trvTrk.pos.x + size.y/2.0; /* TODO: why not size.x? */ - pos1.y += -xx->trvTrk.pos.y + size.x/2.0; - if ( pos1.x >= 0 && pos1.x <= size.y && - pos1.y >= 0 && pos1.y <= size.x ) - dist = 0; - } - *pos = xx->trvTrk.pos; - return dist; -} + struct extraData * xx = GetTrkExtraData(trk); + DIST_T dist; + coOrd pos1; + coOrd size; + if (IsIgnored(xx)) { + return 10000.0; + } -static void SetCarBoundingBox( - track_p car ) -{ - struct extraData * xx = GetTrkExtraData(car); - coOrd lo, hi, p[4]; - int inx; - coOrd size; - -/* TODO: should be bounding box of all pieces aligned on track */ - CarItemSize( xx->item, &size ); /* TODO assumes xx->trvTrk.pos is the car center */ - Translate( &p[0], xx->trvTrk.pos, xx->trvTrk.angle, size.x/2.0 ); - Translate( &p[1], p[0], xx->trvTrk.angle+90, size.y/2.0 ); - Translate( &p[0], p[0], xx->trvTrk.angle-90, size.y/2.0 ); - Translate( &p[2], xx->trvTrk.pos, xx->trvTrk.angle+180, size.x/2.0 ); - Translate( &p[3], p[2], xx->trvTrk.angle+90, size.y/2.0 ); - Translate( &p[2], p[2], xx->trvTrk.angle-90, size.y/2.0 ); - lo = hi = p[0]; - for ( inx = 1; inx < 4; inx++ ) { - if ( p[inx].x < lo.x ) - lo.x = p[inx].x; - if ( p[inx].y < lo.y ) - lo.y = p[inx].y; - if ( p[inx].x > hi.x ) - hi.x = p[inx].x; - if ( p[inx].y > hi.y ) - hi.y = p[inx].y; - } - SetBoundingBox( car, hi, lo ); + CarItemSize(xx->item, + &size); /* TODO assumes xx->trvTrk.pos is the car center */ + dist = FindDistance(*pos, xx->trvTrk.pos); + + if (dist < size.x/2.0) { + pos1 = *pos; + Rotate(&pos1, xx->trvTrk.pos, -xx->trvTrk.angle); + pos1.x += -xx->trvTrk.pos.x + size.y/2.0; /* TODO: why not size.x? */ + pos1.y += -xx->trvTrk.pos.y + size.x/2.0; + if (pos1.x >= 0 && pos1.x <= size.y && + pos1.y >= 0 && pos1.y <= size.x) { + dist = 0; + } + } + + *pos = xx->trvTrk.pos; + return dist; } -EXPORT track_p NewCar( - wIndex_t index, - carItem_p item, - coOrd pos, - ANGLE_T angle ) +static void SetCarBoundingBox( + track_p car) { - track_p trk; - struct extraData * xx; - - trk = NewTrack( index, T_CAR, 2, sizeof (*xx) ); - /*SetEndPts( trk, 0 );*/ - xx = GetTrkExtraData(trk); - /*SetTrkVisible( trk, IsVisible(xx) );*/ - xx->item = item; - xx->trvTrk.pos = pos; - xx->trvTrk.angle = angle; - xx->state = 0; - SetCarBoundingBox( trk ); - CarItemSetTrack( item, trk ); - PlaceCar( trk ); - return trk; + struct extraData * xx = GetTrkExtraData(car); + coOrd lo, hi, p[4]; + int inx; + coOrd size; + /* TODO: should be bounding box of all pieces aligned on track */ + CarItemSize(xx->item, + &size); /* TODO assumes xx->trvTrk.pos is the car center */ + Translate(&p[0], xx->trvTrk.pos, xx->trvTrk.angle, size.x/2.0); + Translate(&p[1], p[0], xx->trvTrk.angle+90, size.y/2.0); + Translate(&p[0], p[0], xx->trvTrk.angle-90, size.y/2.0); + Translate(&p[2], xx->trvTrk.pos, xx->trvTrk.angle+180, size.x/2.0); + Translate(&p[3], p[2], xx->trvTrk.angle+90, size.y/2.0); + Translate(&p[2], p[2], xx->trvTrk.angle-90, size.y/2.0); + lo = hi = p[0]; + + for (inx = 1; inx < 4; inx++) { + if (p[inx].x < lo.x) { + lo.x = p[inx].x; + } + + if (p[inx].y < lo.y) { + lo.y = p[inx].y; + } + + if (p[inx].x > hi.x) { + hi.x = p[inx].x; + } + + if (p[inx].y > hi.y) { + hi.y = p[inx].y; + } + } + + SetBoundingBox(car, hi, lo); +} + + +track_p NewCar( + wIndex_t index, + carItem_p item, + coOrd pos, + ANGLE_T angle) +{ + track_p trk; + struct extraData * xx; + trk = NewTrack(index, T_CAR, 2, sizeof(*xx)); + /*SetEndPts( trk, 0 );*/ + xx = GetTrkExtraData(trk); + /*SetTrkVisible( trk, IsVisible(xx) );*/ + xx->item = item; + xx->trvTrk.pos = pos; + xx->trvTrk.angle = angle; + xx->state = 0; + SetCarBoundingBox(trk); + CarItemSetTrack(item, trk); + PlaceCar(trk); + return trk; } static void DeleteCar( - track_p trk ) + track_p trk) { - struct extraData * xx = GetTrkExtraData(trk); - CarItemSetTrack( xx->item, NULL ); + struct extraData * xx = GetTrkExtraData(trk); + CarItemSetTrack(xx->item, NULL); } static void ReadCar( - char * line ) + char * line) { - CarItemRead( line ); + CarItemRead(line); } static BOOL_T WriteCar( - track_p trk, - FILE * f ) + track_p trk, + FILE * f) { - BOOL_T rc = TRUE; - return rc; + BOOL_T rc = TRUE; + return rc; } static void MoveCar( - track_p car, - coOrd pos ) + track_p car, + coOrd pos) { - struct extraData *xx = GetTrkExtraData(car); - xx->trvTrk.pos.x += pos.x; - xx->trvTrk.pos.y += pos.y; - xx->trvTrk.trk = NULL; - PlaceCar( car ); - SetCarBoundingBox(car); + struct extraData *xx = GetTrkExtraData(car); + xx->trvTrk.pos.x += pos.x; + xx->trvTrk.pos.y += pos.y; + xx->trvTrk.trk = NULL; + PlaceCar(car); + SetCarBoundingBox(car); } static void RotateCar( - track_p car, - coOrd pos, - ANGLE_T angle ) + track_p car, + coOrd pos, + ANGLE_T angle) { - struct extraData *xx = GetTrkExtraData(car); - Rotate( &xx->trvTrk.pos, pos, angle ); - xx->trvTrk.angle = NormalizeAngle( xx->trvTrk.angle + angle ); - xx->trvTrk.trk = NULL; - PlaceCar( car ); - SetCarBoundingBox( car ); + struct extraData *xx = GetTrkExtraData(car); + Rotate(&xx->trvTrk.pos, pos, angle); + xx->trvTrk.angle = NormalizeAngle(xx->trvTrk.angle + angle); + xx->trvTrk.trk = NULL; + PlaceCar(car); + SetCarBoundingBox(car); } -static BOOL_T QueryCar( track_p trk, int query ) +static BOOL_T QueryCar(track_p trk, int query) { - switch ( query ) { - case Q_NODRAWENDPT: - return TRUE; - default: - return FALSE; - } + switch (query) { + case Q_NODRAWENDPT: + return TRUE; + + default: + return FALSE; + } } static trackCmd_t carCmds = { - "CAR ", - DrawCar, /* draw */ - DistanceCar, /* distance */ - DescribeCar, /* describe */ - DeleteCar, /* delete */ - WriteCar, /* write */ - ReadCar, /* read */ - MoveCar, /* move */ - RotateCar, /* rotate */ - NULL, /* rescale */ - NULL, /* audit */ - NULL, /* getAngle */ - NULL, /* split */ - NULL, /* traverse */ - NULL, /* enumerate */ - NULL, /* redraw*/ - NULL, /* trim*/ - NULL, /* merge*/ - NULL, /* modify */ - NULL, /* getLength */ - NULL, /* getParams */ - NULL, /* moveEndPt */ - QueryCar, /* query */ - NULL, /* ungroup */ - NULL, /* flip */ }; + "CAR ", + DrawCar, /* draw */ + DistanceCar, /* distance */ + DescribeCar, /* describe */ + DeleteCar, /* delete */ + WriteCar, /* write */ + ReadCar, /* read */ + MoveCar, /* move */ + RotateCar, /* rotate */ + NULL, /* rescale */ + NULL, /* audit */ + NULL, /* getAngle */ + NULL, /* split */ + NULL, /* traverse */ + NULL, /* enumerate */ + NULL, /* redraw*/ + NULL, /* trim*/ + NULL, /* merge*/ + NULL, /* modify */ + NULL, /* getLength */ + NULL, /* getParams */ + NULL, /* moveEndPt */ + QueryCar, /* query */ + NULL, /* ungroup */ + NULL, /* flip */ +}; /* * @@ -505,36 +554,37 @@ static int numTrainDlg; #define MAX_SPEED (100.0) typedef struct { - wWin_p win; - wIndex_t inx; - track_p train; - long direction; - long followMe; - long autoReverse; - coOrd pos; - char posS[STR_SHORT_SIZE]; - DIST_T speed; - char speedS[10]; - paramGroup_p trainPGp; - } trainControlDlg_t, * trainControlDlg_p; + wWin_p win; + wIndex_t inx; + track_p train; + long direction; + long followMe; + long autoReverse; + coOrd pos; + char posS[STR_SHORT_SIZE]; + DIST_T speed; + char speedS[10]; + paramGroup_p trainPGp; +} trainControlDlg_t, * trainControlDlg_p; static trainControlDlg_t * curTrainDlg; -static void SpeedRedraw( wDraw_p, void *, wPos_t, wPos_t ); -static void SpeedAction( wAction_t, coOrd ); -static void LocoListChangeEntry( track_p, track_p ); -static void CmdTrainExit( void * ); +static void SpeedRedraw(wDraw_p, void *, wPos_t, wPos_t); +static void SpeedAction(wAction_t, coOrd); +static void LocoListChangeEntry(track_p, track_p); +static void CmdTrainExit(void *); drawCmd_t speedD = { - NULL, - &screenDrawFuncs, - 0, - 1.0, - 0.0, - { 0.0, 0.0 }, - { 0.0, 0.0 }, - Pix2CoOrd, - CoOrd2Pix }; + NULL, + &screenDrawFuncs, + 0, + 1.0, + 0.0, + { 0.0, 0.0 }, + { 0.0, 0.0 }, + Pix2CoOrd, + CoOrd2Pix +}; static paramDrawData_t speedParamData = { SLIDER_WIDTH, SLIDER_HEIGHT, SpeedRedraw, SpeedAction, &speedD }; #ifndef WINDOWS static paramListData_t listData = { 3, 120 }; @@ -544,52 +594,56 @@ static char * trainAutoReverseLabels[] = { N_("Auto Reverse"), NULL }; static paramData_t trainPLs[] = { #define I_LIST (0) #ifdef WINDOWS -/*0*/ { PD_DROPLIST, NULL, "list", PDO_NOPREF|PDO_NOPSHUPD, (void*)120, NULL, 0 }, + /*0*/ { PD_DROPLIST, NULL, "list", PDO_NOPREF|PDO_NOPSHUPD, (void*)120, NULL, 0 }, #else -/*0*/ { PD_LIST, NULL, "list", PDO_NOPREF|PDO_NOPSHUPD, &listData, NULL, 0 }, + /*0*/ { PD_LIST, NULL, "list", PDO_NOPREF|PDO_NOPSHUPD, &listData, NULL, 0 }, #endif #define I_STATUS (1) - { PD_MESSAGE, NULL, NULL, 0, (void*)120 }, + { PD_MESSAGE, NULL, NULL, 0, (void*)120 }, #define I_POS (2) - { PD_MESSAGE, NULL, NULL, 0, (void*)120 }, + { PD_MESSAGE, NULL, NULL, 0, (void*)120 }, #define I_SLIDER (3) - { PD_DRAW, NULL, "speed", PDO_NOPSHUPD|PDO_DLGSETY, &speedParamData }, + { PD_DRAW, NULL, "speed", PDO_NOPSHUPD|PDO_DLGSETY, &speedParamData }, #define I_DIST (4) - { PD_STRING, NULL, "distance", PDO_DLGNEWCOLUMN, (void*)(100-SLIDER_WIDTH), NULL, BO_READONLY }, + { PD_STRING, NULL, "distance", PDO_DLGNEWCOLUMN, (void*)(100-SLIDER_WIDTH), NULL, BO_READONLY }, #define I_ZERO (5) - { PD_BUTTON, NULL, "zeroDistance", PDO_NOPSHUPD|PDO_NOPREF|PDO_DLGHORZ, NULL, NULL, BO_ICON }, + { PD_BUTTON, NULL, "zeroDistance", PDO_NOPSHUPD|PDO_NOPREF|PDO_DLGHORZ, NULL, NULL, BO_ICON }, #define I_GOTO (6) - { PD_BUTTON, NULL, "goto", PDO_NOPSHUPD|PDO_NOPREF|PDO_DLGWIDE, NULL, N_("Find") }, + { PD_BUTTON, NULL, "goto", PDO_NOPSHUPD|PDO_NOPREF|PDO_DLGWIDE, NULL, N_("Find") }, #define I_FOLLOW (7) - { PD_TOGGLE, NULL, "follow", PDO_NOPREF|PDO_DLGWIDE, trainFollowMeLabels, NULL, BC_HORZ|BC_NOBORDER }, + { PD_TOGGLE, NULL, "follow", PDO_NOPREF|PDO_DLGWIDE, trainFollowMeLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_AUTORVRS (8) - { PD_TOGGLE, NULL, "autoreverse", PDO_NOPREF, trainAutoReverseLabels, NULL, BC_HORZ|BC_NOBORDER }, + { PD_TOGGLE, NULL, "autoreverse", PDO_NOPREF, trainAutoReverseLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_DIR (9) - { PD_BUTTON, NULL, "direction", PDO_NOPREF|PDO_DLGWIDE, NULL, N_("Forward"), 0 }, + { PD_BUTTON, NULL, "direction", PDO_NOPREF|PDO_DLGWIDE, NULL, N_("Forward"), 0 }, #define I_STOP (10) - { PD_BUTTON, NULL, "stop", PDO_DLGWIDE, NULL, N_("Stop") }, + { PD_BUTTON, NULL, "stop", PDO_DLGWIDE, NULL, N_("Stop") }, #define I_SPEED (11) - { PD_MESSAGE, NULL, NULL, PDO_DLGIGNOREX, (void *)120 } }; + { PD_MESSAGE, NULL, NULL, PDO_DLGIGNOREX, (void *)120 } +}; static paramGroup_t trainPG = { "train", 0, trainPLs, sizeof trainPLs/sizeof trainPLs[0] }; typedef struct { - track_p loco; - BOOL_T running; - } locoList_t; + track_p loco; + BOOL_T running; +} locoList_t; dynArr_t locoList_da; #define locoList(N) DYNARR_N( locoList_t, locoList_da, N ) static wIndex_t FindLoco( - track_p loco ) + track_p loco) { - wIndex_t inx; - for ( inx = 0; inxtrain == NULL ) return; - xx = GetTrkExtraData( dlg->train ); - if ( xx->speed > MAX_SPEED ) - xx->speed = MAX_SPEED; - if ( xx->speed < 0 ) - xx->speed = 0; - y = (wPos_t)(xx->speed/MAX_SPEED*((SLIDER_HEIGHT-SLIDER_THICKNESS))+SLIDER_THICKNESS/2); - - drawColor = wDrawFindColor( wRGB( 160, 160, 160) ); - pts[0][1] = pts[1][1] = y-SLIDER_THICKNESS/2; - pts[2][1] = pts[3][1] = y+SLIDER_THICKNESS/2; - pts[0][0] = pts[3][0] = 0; - pts[1][0] = pts[2][0] = SLIDER_WIDTH; - wDrawFilledPolygon( d, pts, 4, drawColor, 0 ); - - drawColor = wDrawFindColor( wRGB( 220, 220, 220) ); - pts[0][1] = pts[1][1] = y+SLIDER_THICKNESS/2; - pts[2][1] = pts[3][1] = y; - pts[0][0] = pts[3][0] = 0; - pts[1][0] = pts[2][0] = SLIDER_WIDTH; - wDrawFilledPolygon( d, pts, 4, drawColor, 0 ); - - wDrawLine( d, 0, y, SLIDER_WIDTH, y, 1, wDrawLineSolid, drawColorRed, 0 ); - wDrawLine( d, 0, y+SLIDER_THICKNESS/2, SLIDER_WIDTH, y+SLIDER_THICKNESS/2, 1, wDrawLineSolid, drawColorBlack, 0 ); - wDrawLine( d, 0, y-SLIDER_THICKNESS/2, SLIDER_WIDTH, y-SLIDER_THICKNESS/2, 1, wDrawLineSolid, drawColorBlack, 0 ); - - sprintf( dlg->speedS, "%3d %s", (int)(units==UNITS_ENGLISH?xx->speed:xx->speed*1.6), (units==UNITS_ENGLISH?"mph":"km/h") ); - ParamLoadMessage( dlg->trainPGp, I_SPEED, dlg->speedS ); - LOG( log_trainPlayback, 3, ( "Speed = %d\n", (int)xx->speed ) ); + wPos_t y, pts[4][2]; + trainControlDlg_p dlg = (trainControlDlg_p)context; + struct extraData * xx; + wDrawColor drawColor; + wDrawClear(d); + + if (dlg == NULL || dlg->train == NULL) { + return; + } + + xx = GetTrkExtraData(dlg->train); + + if (xx->speed > MAX_SPEED) { + xx->speed = MAX_SPEED; + } + + if (xx->speed < 0) { + xx->speed = 0; + } + + y = (wPos_t)(xx->speed/MAX_SPEED*((SLIDER_HEIGHT-SLIDER_THICKNESS)) + +SLIDER_THICKNESS/2); + drawColor = wDrawFindColor(wRGB(160, 160, 160)); + pts[0][1] = pts[1][1] = y-SLIDER_THICKNESS/2; + pts[2][1] = pts[3][1] = y+SLIDER_THICKNESS/2; + pts[0][0] = pts[3][0] = 0; + pts[1][0] = pts[2][0] = SLIDER_WIDTH; + wDrawFilledPolygon(d, pts, 4, drawColor, 0); + drawColor = wDrawFindColor(wRGB(220, 220, 220)); + pts[0][1] = pts[1][1] = y+SLIDER_THICKNESS/2; + pts[2][1] = pts[3][1] = y; + pts[0][0] = pts[3][0] = 0; + pts[1][0] = pts[2][0] = SLIDER_WIDTH; + wDrawFilledPolygon(d, pts, 4, drawColor, 0); + wDrawLine(d, 0, y, SLIDER_WIDTH, y, 1, wDrawLineSolid, drawColorRed, 0); + wDrawLine(d, 0, y+SLIDER_THICKNESS/2, SLIDER_WIDTH, y+SLIDER_THICKNESS/2, 1, + wDrawLineSolid, drawColorBlack, 0); + wDrawLine(d, 0, y-SLIDER_THICKNESS/2, SLIDER_WIDTH, y-SLIDER_THICKNESS/2, 1, + wDrawLineSolid, drawColorBlack, 0); + sprintf(dlg->speedS, "%3d %s", + (int)(units==UNITS_ENGLISH?xx->speed:xx->speed*1.6), + (units==UNITS_ENGLISH?"mph":"km/h")); + ParamLoadMessage(dlg->trainPGp, I_SPEED, dlg->speedS); + LOG(log_trainPlayback, 3, ("Speed = %d\n", (int)xx->speed)); } static void SpeedAction( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos) { - /*trainControlDlg_p dlg = (trainControlDlg_p)wDrawGetContext(d);*/ - trainControlDlg_p dlg = curTrainDlg; - struct extraData * xx; - FLOAT_T speed; - BOOL_T startStop; - if ( dlg == NULL || dlg->train == NULL ) - return; - xx = GetTrkExtraData( dlg->train ); - switch ( action ) { - case C_DOWN: - InfoMessage( "" ); - case C_MOVE: - case C_UP: - TrainTimeEndPause(); - if ( IsOnTrack(xx) ) { - speed = ((FLOAT_T)((pos.y*speedD.dpi)-SLIDER_THICKNESS/2))/(SLIDER_HEIGHT-SLIDER_THICKNESS)*MAX_SPEED; - } else { - speed = 0; - } - if ( speed > MAX_SPEED ) - speed = MAX_SPEED; - if ( speed < 0 ) - speed = 0; - startStop = (xx->speed == 0) != (speed == 0); - xx->speed = speed; - SpeedRedraw( (wDraw_p)dlg->trainPGp->paramPtr[I_SLIDER].control, dlg, SLIDER_WIDTH, SLIDER_HEIGHT ); - if ( startStop ) { - if ( xx->speed == 0 ) - xx->status = ST_StopManual; - LocoListChangeEntry( dlg->train, dlg->train ); - } - TrainTimeStartPause(); - if ( trainsState == TRAINS_IDLE ) - RestartTrains(); - break; - default: - break; - } -} + trainControlDlg_p dlg = curTrainDlg; + struct extraData * xx; + FLOAT_T speed; + BOOL_T startStop; + if (dlg == NULL || dlg->train == NULL) { + return; + } -static void ControllerDialogSync( - trainControlDlg_p dlg ) -{ - struct extraData * xx=NULL; - wIndex_t inx; - BOOL_T dir; - BOOL_T followMe; - BOOL_T autoReverse; - DIST_T speed; - coOrd pos; - char * statusMsg; - long format; - - if ( dlg == NULL ) return; - - inx = wListGetIndex( (wList_p)dlg->trainPGp->paramPtr[I_LIST].control ); - if ( dlg->train ) { - if ( inx >= 0 && inx < locoList_da.cnt && dlg->train && dlg->train != locoList(inx).loco ) { - inx = FindLoco( dlg->train ); - if ( inx >= 0 ) { - wListSetIndex( (wList_p)dlg->trainPGp->paramPtr[I_LIST].control, inx ); - } - } - } else { - wListSetIndex( (wList_p)dlg->trainPGp->paramPtr[I_LIST].control, -1 ); - } + xx = GetTrkExtraData(dlg->train); - if ( dlg->train ) { - xx = GetTrkExtraData(dlg->train); - dir = xx->direction==0?0:1; - speed = xx->speed; - pos = xx->trvTrk.pos; - followMe = followTrain == dlg->train; - autoReverse = xx->autoReverse; - if ( xx->trvTrk.trk == NULL ) { - if ( xx->status == ST_Crashed ) - statusMsg = _("Crashed"); - else - statusMsg = _("Not on Track"); - } else if ( xx->speed > 0 ) { - if ( trainsState == TRAINS_STOP ) - statusMsg = _("Trains Paused"); - else - statusMsg = _("Running"); - } else { - switch (xx->status ) { - case ST_EndOfTrack: - statusMsg = _("End of Track"); - break; - case ST_OpenTurnout: - statusMsg = _("Open Turnout"); - break; - case ST_StopManual: - statusMsg = _("Manual Stop"); - break; - case ST_NoRoom: - statusMsg = _("No Room"); - break; - case ST_Crashed: - statusMsg = _("Crashed"); - break; - default: - statusMsg = _("Unknown Status"); - break; - } - } - ParamLoadMessage( dlg->trainPGp, I_STATUS, statusMsg ); - } else { - dir = 0; - followMe = FALSE; - autoReverse = FALSE; - ParamLoadMessage( dlg->trainPGp, I_STATUS, _("No trains") ); - } - if ( dlg->followMe != followMe ) { - dlg->followMe = followMe; - ParamLoadControl( dlg->trainPGp, I_FOLLOW ); - } - if ( dlg->autoReverse != autoReverse ) { - dlg->autoReverse = autoReverse; - ParamLoadControl( dlg->trainPGp, I_AUTORVRS ); - } - if ( dlg->direction != dir ) { - dlg->direction = dir; - wButtonSetLabel( (wButton_p)dlg->trainPGp->paramPtr[I_DIR].control, (dlg->direction?_("Reverse"):_("Forward")) ); - } - if ( dlg->train ) { - if ( dlg->posS[0] == '\0' || - dlg->pos.x != xx->trvTrk.pos.x || - dlg->pos.y != xx->trvTrk.pos.y ) { - dlg->pos = xx->trvTrk.pos; - format = GetDistanceFormat(); - format &= ~DISTFMT_DECS; - sprintf( dlg->posS, "X:%s Y:%s", - FormatDistanceEx( xx->trvTrk.pos.x, format ), - FormatDistanceEx( xx->trvTrk.pos.y, format ) ); - ParamLoadMessage( dlg->trainPGp, I_POS, dlg->posS ); - } - if ( dlg->speed != xx->speed ) { - dlg->speed = xx->speed; - sprintf( dlg->speedS, "%3d", (int)(units==UNITS_ENGLISH?xx->speed:xx->speed*1.6) ); - ParamLoadMessage( dlg->trainPGp, I_SPEED, dlg->speedS ); - SpeedRedraw( (wDraw_p)dlg->trainPGp->paramPtr[I_SLIDER].control, dlg, SLIDER_WIDTH, SLIDER_HEIGHT ); - } - ParamLoadMessage( dlg->trainPGp, I_DIST, FormatDistance(xx->distance) ); - } else { - if ( dlg->posS[0] != '\0' ) { - dlg->posS[0] = '\0'; - ParamLoadMessage( dlg->trainPGp, I_POS, dlg->posS ); - } - if ( dlg->speed >= 0 ) { - dlg->speed = -1; - dlg->speedS[0] = '\0'; - ParamLoadMessage( dlg->trainPGp, I_SPEED, dlg->speedS ); - wDrawClear( (wDraw_p)dlg->trainPGp->paramPtr[I_SLIDER].control ); - } - ParamLoadMessage( dlg->trainPGp, I_DIST, "" ); - } + switch (action) { + case C_DOWN: + InfoMessage(""); + + case C_MOVE: + case C_UP: + TrainTimeEndPause(); + + if (IsOnTrack(xx)) { + speed = ((FLOAT_T)((pos.y*speedD.dpi)-SLIDER_THICKNESS/2))/ + (SLIDER_HEIGHT-SLIDER_THICKNESS)*MAX_SPEED; + } else { + speed = 0; + } + + if (speed > MAX_SPEED) { + speed = MAX_SPEED; + } + + if (speed < 0) { + speed = 0; + } + + startStop = (xx->speed == 0) != (speed == 0); + xx->speed = speed; + SpeedRedraw((wDraw_p)dlg->trainPGp->paramPtr[I_SLIDER].control, dlg, + SLIDER_WIDTH, SLIDER_HEIGHT); + + if (startStop) { + if (xx->speed == 0) { + xx->status = ST_StopManual; + } + + LocoListChangeEntry(dlg->train, dlg->train); + } + + TrainTimeStartPause(); + + if (trainsState == TRAINS_IDLE) { + RestartTrains(); + } + + break; + + default: + break; + } } -static void ControllerDialogSyncAll( void ) +static void ControllerDialogSync( + trainControlDlg_p dlg) +{ + struct extraData * xx=NULL; + wIndex_t inx; + BOOL_T dir; + BOOL_T followMe; + BOOL_T autoReverse; + coOrd pos; + + if (dlg == NULL) { + return; + } + + inx = wListGetIndex((wList_p)dlg->trainPGp->paramPtr[I_LIST].control); + + if (dlg->train) { + if (inx >= 0 && inx < locoList_da.cnt && dlg->train && + dlg->train != locoList(inx).loco) { + inx = FindLoco(dlg->train); + + if (inx >= 0) { + wListSetIndex((wList_p)dlg->trainPGp->paramPtr[I_LIST].control, inx); + } + } + } else { + wListSetIndex((wList_p)dlg->trainPGp->paramPtr[I_LIST].control, -1); + } + + if (dlg->train) { + char * statusMsg; + DIST_T speed; + xx = GetTrkExtraData(dlg->train); + dir = xx->direction==0?0:1; + speed = xx->speed; + pos = xx->trvTrk.pos; + followMe = followTrain == dlg->train; + autoReverse = xx->autoReverse; + + if (xx->trvTrk.trk == NULL) { + if (xx->status == ST_Crashed) { + statusMsg = _("Crashed"); + } else { + statusMsg = _("Not on Track"); + } + } else if (xx->speed > 0) { + if (trainsState == TRAINS_STOP) { + statusMsg = _("Trains Paused"); + } else { + statusMsg = _("Running"); + } + } else { + switch (xx->status) { + case ST_EndOfTrack: + statusMsg = _("End of Track"); + break; + + case ST_OpenTurnout: + statusMsg = _("Open Turnout"); + break; + + case ST_StopManual: + statusMsg = _("Manual Stop"); + break; + + case ST_NoRoom: + statusMsg = _("No Room"); + break; + + case ST_Crashed: + statusMsg = _("Crashed"); + break; + + default: + statusMsg = _("Unknown Status"); + break; + } + } + + ParamLoadMessage(dlg->trainPGp, I_STATUS, statusMsg); + } else { + dir = 0; + followMe = FALSE; + autoReverse = FALSE; + ParamLoadMessage(dlg->trainPGp, I_STATUS, _("No trains")); + } + + if (dlg->followMe != followMe) { + dlg->followMe = followMe; + ParamLoadControl(dlg->trainPGp, I_FOLLOW); + } + + if (dlg->autoReverse != autoReverse) { + dlg->autoReverse = autoReverse; + ParamLoadControl(dlg->trainPGp, I_AUTORVRS); + } + + if (dlg->direction != dir) { + dlg->direction = dir; + wButtonSetLabel((wButton_p)dlg->trainPGp->paramPtr[I_DIR].control, + (dlg->direction?_("Reverse"):_("Forward"))); + } + + if (dlg->train) { + if (dlg->posS[0] == '\0' || + dlg->pos.x != xx->trvTrk.pos.x || + dlg->pos.y != xx->trvTrk.pos.y) { + long format; + dlg->pos = xx->trvTrk.pos; + format = GetDistanceFormat(); + format &= ~DISTFMT_DECS; + sprintf(dlg->posS, "X:%s Y:%s", + FormatDistanceEx(xx->trvTrk.pos.x, format), + FormatDistanceEx(xx->trvTrk.pos.y, format)); + ParamLoadMessage(dlg->trainPGp, I_POS, dlg->posS); + } + + if (dlg->speed != xx->speed) { + dlg->speed = xx->speed; + sprintf(dlg->speedS, "%3d", + (int)(units==UNITS_ENGLISH?xx->speed:xx->speed*1.6)); + ParamLoadMessage(dlg->trainPGp, I_SPEED, dlg->speedS); + SpeedRedraw((wDraw_p)dlg->trainPGp->paramPtr[I_SLIDER].control, dlg, + SLIDER_WIDTH, SLIDER_HEIGHT); + } + + ParamLoadMessage(dlg->trainPGp, I_DIST, FormatDistance(xx->distance)); + } else { + if (dlg->posS[0] != '\0') { + dlg->posS[0] = '\0'; + ParamLoadMessage(dlg->trainPGp, I_POS, dlg->posS); + } + + if (dlg->speed >= 0) { + dlg->speed = -1; + dlg->speedS[0] = '\0'; + ParamLoadMessage(dlg->trainPGp, I_SPEED, dlg->speedS); + wDrawClear((wDraw_p)dlg->trainPGp->paramPtr[I_SLIDER].control); + } + + ParamLoadMessage(dlg->trainPGp, I_DIST, ""); + } +} + + +static void ControllerDialogSyncAll(void) { - if ( curTrainDlg ) - ControllerDialogSync( curTrainDlg ); + if (curTrainDlg) { + ControllerDialogSync(curTrainDlg); + } } static void LocoListChangeEntry( - track_p oldLoco, - track_p newLoco ) + track_p oldLoco, + track_p newLoco) { - wIndex_t inx = -1; - struct extraData * xx; - - if ( curTrainDlg == NULL ) - return; - if ( oldLoco && (inx=FindLoco(oldLoco))>=0 ) { - if ( newLoco ) { - xx = GetTrkExtraData(newLoco); - locoList(inx).loco = newLoco; - xx = GetTrkExtraData(newLoco); - locoList(inx).running = IsOnTrack(xx) && xx->speed > 0; - wListSetValues( (wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control, inx, CarItemNumber(xx->item), locoList(inx).running?goI:stopI, newLoco ); - } else { - wListDelete( (wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control, inx ); - for ( ; inx= locoList_da.cnt ) - inx--; - } - } else if ( newLoco ){ - inx = locoList_da.cnt; - DYNARR_APPEND( locoList_t, locoList_da, 10 ); - locoList(inx).loco = newLoco; - xx = GetTrkExtraData(newLoco); - locoList(inx).running = IsOnTrack(xx) && xx->speed > 0; - wListAddValue( (wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control, CarItemNumber(xx->item), locoList(inx).running?goI:stopI, newLoco ); - } - if ( curTrainDlg->train == oldLoco ) { - if ( newLoco || locoList_da.cnt <= 0 ) { - curTrainDlg->train = newLoco; - } else { - curTrainDlg->train = wListGetItemContext( (wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control, inx ); - } - } - ControllerDialogSync( curTrainDlg ); -} + wIndex_t inx = -1; + struct extraData * xx; + + if (curTrainDlg == NULL) { + return; + } + + if (oldLoco && (inx=FindLoco(oldLoco))>=0) { + if (newLoco) { + locoList(inx).loco = newLoco; + xx = GetTrkExtraData(newLoco); + locoList(inx).running = IsOnTrack(xx) && xx->speed > 0; + wListSetValues((wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control, inx, + CarItemNumber(xx->item), locoList(inx).running?goI:stopI, newLoco); + } else { + wListDelete((wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control, inx); + + for (; inx= locoList_da.cnt) { + inx--; + } + } + } else if (newLoco) { + inx = locoList_da.cnt; + DYNARR_APPEND(locoList_t, locoList_da, 10); + locoList(inx).loco = newLoco; + xx = GetTrkExtraData(newLoco); + locoList(inx).running = IsOnTrack(xx) && xx->speed > 0; + wListAddValue((wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control, + CarItemNumber(xx->item), locoList(inx).running?goI:stopI, newLoco); + } + + if (curTrainDlg->train == oldLoco) { + if (newLoco || locoList_da.cnt <= 0) { + curTrainDlg->train = newLoco; + } else { + curTrainDlg->train = wListGetItemContext((wList_p) + curTrainDlg->trainPGp->paramPtr[I_LIST].control, inx); + } + } + + ControllerDialogSync(curTrainDlg); +} + + +static void LocoListInit(void) +{ + track_p train; + struct extraData * xx; + locoList_da.cnt = 0; + for (train=NULL; TrackIterate(&train);) { + if (GetTrkType(train) != T_CAR) { + continue; + } -static void LocoListInit( void ) -{ - track_p train; - struct extraData * xx; - - locoList_da.cnt = 0; - for ( train=NULL; TrackIterate( &train ); ) { - if ( GetTrkType(train) != T_CAR ) continue; - xx = GetTrkExtraData(train); - if ( !CarItemIsLoco(xx->item) ) continue; - if ( !IsLocoMaster(xx) ) continue; - LocoListChangeEntry( NULL, train ); - } -} + xx = GetTrkExtraData(train); + if (!CarItemIsLoco(xx->item)) { + continue; + } -#ifdef LATER -static void LoadTrainDlgIndex( - trainControlDlg_p dlg ) -{ - track_p car; - struct extraData * xx; - - wListClear( (wList_p)dlg->trainPGp->paramPtr[I_LIST].control ); - for ( car=NULL; TrackIterate( &car ); ) { - if ( GetTrkType(car) != T_CAR ) continue; - xx = GetTrkExtraData(car); - if ( !CarItemIsLoco(xx->item) ) continue; - if ( !IsLocoMaster(xx) ) continue; - wListAddValue( (wList_p)dlg->trainPGp->paramPtr[I_LIST].control, CarItemNumber(xx->item), xx->speed>0?goI:stopI, car ); - } - TrainDialogSetIndex( dlg ); - ControllerDialogSync( curTrainDlg ); + if (!IsLocoMaster(xx)) { + continue; + } + + LocoListChangeEntry(NULL, train); + } } -#endif static void SetCurTrain( - track_p train ) + track_p train) { - curTrainDlg->train = train; - ControllerDialogSync( curTrainDlg ); + curTrainDlg->train = train; + ControllerDialogSync(curTrainDlg); } static void StopTrain( - track_p train, - trainStatus_e status ) + track_p train, + trainStatus_e status) { - struct extraData * xx; - - if ( train == NULL ) - return; - xx = GetTrkExtraData(train); - xx->speed = 0; - xx->status = status; - LocoListChangeEntry( train, train ); + struct extraData * xx; + + if (train == NULL) { + return; + } + + xx = GetTrkExtraData(train); + xx->speed = 0; + xx->status = status; + LocoListChangeEntry(train, train); } static void MoveMainWindow( - coOrd pos, - ANGLE_T angle ) + coOrd pos, + ANGLE_T angle) { - DIST_T dist; - static DIST_T factor = 0.5; - ANGLE_T angle1 = angle, angle2; - if ( angle1 > 180.0) - angle1 = 360.0 - angle1; - if ( angle1 > 90.0) - angle1 = 180.0 - angle1; - angle2 = R2D(atan2(mainD.size.x,mainD.size.y)); - if ( angle1 < angle2 ) - dist = mainD.size.y/2.0/cos(D2R(angle1)); - else - dist = mainD.size.x/2.0/cos(D2R(90.0-angle1)); - dist *= factor; - Translate( &pos, pos, angle, dist ); - DrawMapBoundingBox( FALSE ); - mainCenter = pos; - mainD.orig.x = pos.x-mainD.size.x/2;; - mainD.orig.y = pos.y-mainD.size.y/2;; - MainRedraw(); - DrawMapBoundingBox( TRUE ); + DIST_T dist; + static DIST_T factor = 0.5; + ANGLE_T angle1 = angle, angle2; + + if (angle1 > 180.0) { + angle1 = 360.0 - angle1; + } + + if (angle1 > 90.0) { + angle1 = 180.0 - angle1; + } + + angle2 = R2D(atan2(mainD.size.x,mainD.size.y)); + + if (angle1 < angle2) { + dist = mainD.size.y/2.0/cos(D2R(angle1)); + } else { + dist = mainD.size.x/2.0/cos(D2R(90.0-angle1)); + } + + dist *= factor; + Translate(&pos, pos, angle, dist); + //DrawMapBoundingBox(FALSE); + mainCenter = pos; + mainD.orig.x = pos.x-mainD.size.x/2;; + mainD.orig.y = pos.y-mainD.size.y/2;; + MainRedraw(); + MapRedraw(); + //DrawMapBoundingBox(TRUE); } static void SetTrainDirection( - track_p train ) + track_p train) { - struct extraData *xx, *xx0=GetTrkExtraData(train); - int dir, dir0; - track_p car; - - car = train; - for ( dir0 = 0; dir0 < 2; dir0++ ) { - dir = dir0; - WALK_CARS_START( car, xx, dir ) - if ( car != train ) { - if ( CarItemIsLoco(xx->item) ) { - xx->direction = (dir==dir0?xx0->direction:!xx0->direction); - } - } - WALK_CARS_END( car, xx, dir ) - } -} + struct extraData *xx, *xx0=GetTrkExtraData(train); + int dir0; + track_p car; + car = train; + for (dir0 = 0; dir0 < 2; dir0++) { + int dir; + dir = dir0; + WALK_CARS_START(car, xx, dir) -static void ControllerDialogUpdate( - paramGroup_p pg, - int inx, - void * valueP ) -{ - trainControlDlg_p dlg = curTrainDlg; - track_p train; - struct extraData * xx; - - if ( dlg == NULL ) - return; - - TrainTimeEndPause(); - switch (inx) { - case I_LIST: - train = (track_p)wListGetItemContext( (wList_p)pg->paramPtr[inx].control, (wIndex_t)*(long*)valueP ); - if ( train == NULL ) return; - dlg->train = train; - ControllerDialogSync( dlg ); - break; - case I_ZERO: - if ( dlg->train == NULL ) return; - TrainTimeEndPause(); - xx = GetTrkExtraData( dlg->train ); - xx->distance = 0.0; - ParamLoadMessage( dlg->trainPGp, I_DIST, FormatDistance(xx->distance) ); - ParamLoadControl( curTrainDlg->trainPGp, I_DIST ); - TrainTimeStartPause(); - break; - case I_GOTO: - if ( dlg->train == NULL ) return; - TrainTimeEndPause(); - xx = GetTrkExtraData( dlg->train ); - followTrain = NULL; - dlg->followMe = FALSE; - ParamLoadControl( curTrainDlg->trainPGp, I_FOLLOW ); - CarSetVisible( dlg->train ); - MoveMainWindow( xx->trvTrk.pos, xx->trvTrk.angle ); - TrainTimeStartPause(); - break; - case I_FOLLOW: - if ( dlg->train == NULL ) return; - if ( *(long*)valueP ) { - followTrain = dlg->train; - xx = GetTrkExtraData(dlg->train); - if ( OFF_MAIND( xx->trvTrk.pos, xx->trvTrk.pos ) ) { - MoveMainWindow( xx->trvTrk.pos, xx->trvTrk.angle ); - } - followCenter = mainCenter; - } else { - followTrain = NULL; - } - break; - case I_AUTORVRS: - if ( dlg->train == NULL ) return; - xx = GetTrkExtraData(dlg->train); - xx->autoReverse = *(long*)valueP!=0; - break; - case I_DIR: - if ( dlg->train == NULL ) return; - xx = GetTrkExtraData(dlg->train); - dlg->direction = xx->direction = !xx->direction; - wButtonSetLabel( (wButton_p)pg->paramPtr[I_DIR].control, (dlg->direction?_("Reverse"):_("Forward")) ); - SetTrainDirection( dlg->train ); - DrawAllCars(); - break; - case I_STOP: - if ( dlg->train == NULL ) return; - TrainTimeEndPause(); - StopTrain( dlg->train, ST_StopManual ); - TrainTimeStartPause(); - break; - case -1: - /* Close window */ - CmdTrainExit( NULL ); - break; - } - /*ControllerDialogSync( dlg );*/ - TrainTimeStartPause(); + if (car != train) { + if (CarItemIsLoco(xx->item)) { + xx->direction = (dir==dir0?xx0->direction:!xx0->direction); + } + } + + WALK_CARS_END(car, xx, dir) + } } -static trainControlDlg_p CreateTrainControlDlg( void ) +static void ControllerDialogUpdate( + paramGroup_p pg, + int inx, + void * valueP) { - trainControlDlg_p dlg; - char * title; - paramData_p PLp; - dlg = (trainControlDlg_p)MyMalloc( sizeof *dlg ); -#ifdef LATER - PLp = (paramData_p)MyMalloc( sizeof trainPLs ); - memcpy( PLp, trainPLs, sizeof trainPLs ); -#endif - PLp = trainPLs; - dlg->posS[0] = '\0'; - dlg->speedS[0] = '\0'; - PLp[I_LIST].valueP = &dlg->inx; - PLp[I_LIST].context = dlg; - PLp[I_POS].valueP = &dlg->posS; - PLp[I_POS].context = dlg; - /*PLp[I_GOTO].valueP = NULL;*/ - PLp[I_GOTO].context = dlg; - PLp[I_SLIDER].context = dlg; - PLp[I_SPEED].valueP = &dlg->speedS; - PLp[I_SPEED].context = dlg; - PLp[I_DIR].context = dlg; - /*PLp[I_STOP].valueP = NULL;*/ - PLp[I_STOP].context = dlg; - PLp[I_FOLLOW].valueP = &dlg->followMe; - PLp[I_FOLLOW].context = dlg; - PLp[I_AUTORVRS].valueP = &dlg->autoReverse; - PLp[I_AUTORVRS].context = dlg; - title = MyStrdup( _("Train Control XXX") ); - sprintf( title, _("Train Control %d"), ++numTrainDlg ); - dlg->trainPGp = &trainPG; - dlg->win = ParamCreateDialog( dlg->trainPGp, _("Train Control"), NULL, NULL, NULL, FALSE, NULL, 0, ControllerDialogUpdate ); - return dlg; + trainControlDlg_p dlg = curTrainDlg; + track_p train; + struct extraData * xx; + + if (dlg == NULL) { + return; + } + + TrainTimeEndPause(); + + switch (inx) { + case I_LIST: + train = (track_p)wListGetItemContext((wList_p)pg->paramPtr[inx].control, + (wIndex_t)*(long*)valueP); + + if (train == NULL) { + return; + } + + dlg->train = train; + ControllerDialogSync(dlg); + break; + + case I_ZERO: + if (dlg->train == NULL) { + return; + } + + TrainTimeEndPause(); + xx = GetTrkExtraData(dlg->train); + xx->distance = 0.0; + ParamLoadMessage(dlg->trainPGp, I_DIST, FormatDistance(xx->distance)); + ParamLoadControl(curTrainDlg->trainPGp, I_DIST); + TrainTimeStartPause(); + break; + + case I_GOTO: + if (dlg->train == NULL) { + return; + } + + TrainTimeEndPause(); + xx = GetTrkExtraData(dlg->train); + followTrain = NULL; + dlg->followMe = FALSE; + ParamLoadControl(curTrainDlg->trainPGp, I_FOLLOW); + CarSetVisible(dlg->train); + MoveMainWindow(xx->trvTrk.pos, xx->trvTrk.angle); + TrainTimeStartPause(); + break; + + case I_FOLLOW: + if (dlg->train == NULL) { + return; + } + + if (*(long*)valueP) { + followTrain = dlg->train; + xx = GetTrkExtraData(dlg->train); + + if (OFF_MAIND(xx->trvTrk.pos, xx->trvTrk.pos)) { + MoveMainWindow(xx->trvTrk.pos, xx->trvTrk.angle); + } + + followCenter = mainCenter; + } else { + followTrain = NULL; + } + + break; + + case I_AUTORVRS: + if (dlg->train == NULL) { + return; + } + + xx = GetTrkExtraData(dlg->train); + xx->autoReverse = *(long*)valueP!=0; + break; + + case I_DIR: + if (dlg->train == NULL) { + return; + } + + xx = GetTrkExtraData(dlg->train); + dlg->direction = xx->direction = !xx->direction; + wButtonSetLabel((wButton_p)pg->paramPtr[I_DIR].control, + (dlg->direction?_("Reverse"):_("Forward"))); + SetTrainDirection(dlg->train); + DrawAllCars(); + break; + + case I_STOP: + if (dlg->train == NULL) { + return; + } + + TrainTimeEndPause(); + StopTrain(dlg->train, ST_StopManual); + TrainTimeStartPause(); + break; + + case -1: + /* Close window */ + CmdTrainExit(NULL); + break; + } + + /*ControllerDialogSync( dlg );*/ + TrainTimeStartPause(); +} + + +static trainControlDlg_p CreateTrainControlDlg(void) +{ + trainControlDlg_p dlg; + char * title; + paramData_p PLp; + dlg = (trainControlDlg_p)MyMalloc(sizeof *dlg); + PLp = trainPLs; + dlg->posS[0] = '\0'; + dlg->speedS[0] = '\0'; + PLp[I_LIST].valueP = &dlg->inx; + PLp[I_LIST].context = dlg; + PLp[I_POS].valueP = &dlg->posS; + PLp[I_POS].context = dlg; + /*PLp[I_GOTO].valueP = NULL;*/ + PLp[I_GOTO].context = dlg; + PLp[I_SLIDER].context = dlg; + PLp[I_SPEED].valueP = &dlg->speedS; + PLp[I_SPEED].context = dlg; + PLp[I_DIR].context = dlg; + /*PLp[I_STOP].valueP = NULL;*/ + PLp[I_STOP].context = dlg; + PLp[I_FOLLOW].valueP = &dlg->followMe; + PLp[I_FOLLOW].context = dlg; + PLp[I_AUTORVRS].valueP = &dlg->autoReverse; + PLp[I_AUTORVRS].context = dlg; + title = MyStrdup(_("Train Control XXX")); + sprintf(title, _("Train Control %d"), ++numTrainDlg); + dlg->trainPGp = &trainPG; + dlg->win = ParamCreateDialog(dlg->trainPGp, _("Train Control"), NULL, NULL, + NULL, FALSE, NULL, 0, ControllerDialogUpdate); + return dlg; } @@ -1094,920 +1251,1141 @@ static trainControlDlg_p CreateTrainControlDlg( void ) */ static struct { - STATE_T state; - coOrd pos0; - } Dtrain; + STATE_T state; + coOrd pos0; +} Dtrain; -EXPORT long trainPause = 200; +long trainPause = 200; static track_p followTrain = NULL; -/*static int suppressTrainRedraw = 0;*/ -static long setTimeD; - - - -#ifdef MEMCHECK -static BOOL_T drawAllCarsDisable; -static void * top1, * top2; -static long drawCounter; -#endif -static void DrawAllCars( void ) +static void DrawAllCars(void) { - track_p car; - struct extraData * xx; - coOrd size, lo, hi; - BOOL_T drawCarEnable1 = drawCarEnable; -#ifdef MEMCHECK -drawCounter++; -top1 = Sbrk( 0 ); -if ( top1 != top2 ) { - fprintf( stderr, "incr by %ld at %ld\n", (char*)top1-(char*)top2, drawCounter ); - top2 = top1; -} -#endif - drawCarEnable = TRUE; - wDrawDelayUpdate( mainD.d, TRUE ); - wDrawRestoreImage( mainD.d ); - DrawMarkers(); - DrawPositionIndicators(); - for ( car=NULL; TrackIterate(&car); ) { - if ( GetTrkType(car) == T_CAR ) { - xx = GetTrkExtraData(car); - CarItemSize( xx->item, &size ); /* TODO assumes xx->trvTrk.pos is the car center */ - lo.x = xx->trvTrk.pos.x - size.x/2.0; - lo.y = xx->trvTrk.pos.y - size.x/2.0; - hi.x = lo.x + size.x; - hi.y = lo.y + size.x; - if ( !OFF_MAIND( lo, hi ) ) - DrawCar( car, &mainD, wDrawColorBlack ); - } - } - wDrawDelayUpdate( mainD.d, FALSE ); - drawCarEnable = drawCarEnable1; + track_p car; + struct extraData * xx; + coOrd size, lo, hi; + BOOL_T drawCarEnable1 = drawCarEnable; + drawCarEnable = TRUE; + wDrawDelayUpdate(mainD.d, TRUE); + wDrawRestoreImage(mainD.d); + DrawMarkers(); + DrawPositionIndicators(); + + for (car=NULL; TrackIterate(&car);) { + if (GetTrkType(car) == T_CAR) { + xx = GetTrkExtraData(car); + CarItemSize(xx->item, + &size); /* TODO assumes xx->trvTrk.pos is the car center */ + lo.x = xx->trvTrk.pos.x - size.x/2.0; + lo.y = xx->trvTrk.pos.y - size.x/2.0; + hi.x = lo.x + size.x; + hi.y = lo.y + size.x; + + if (!OFF_MAIND(lo, hi)) { + DrawCar(car, &mainD, wDrawColorBlack); + } + } + } + + wDrawDelayUpdate(mainD.d, FALSE); + drawCarEnable = drawCarEnable1; } static DIST_T GetTrainLength2( - track_p * car0, - BOOL_T * dir ) + track_p * car0, + BOOL_T * dir) { - DIST_T length = 0, carLength; - struct extraData * xx; - - WALK_CARS_START ( *car0, xx, *dir ) - carLength = CarItemCoupledLength( xx->item ); - if ( length == 0 ) - length = carLength/2.0; /* TODO assumes xx->trvTrk.pos is the car center */ - else - length += carLength; - WALK_CARS_END ( *car0, xx, *dir ) - return length; + DIST_T length = 0, carLength; + struct extraData * xx; + WALK_CARS_START(*car0, xx, *dir) + carLength = CarItemCoupledLength(xx->item); + + if (length == 0) { + length = carLength/2.0; /* TODO assumes xx->trvTrk.pos is the car center */ + } else { + length += carLength; + } + + WALK_CARS_END(*car0, xx, *dir) + return length; } static DIST_T GetTrainLength( - track_p car0, - BOOL_T dir ) + track_p car0, + BOOL_T dir) { - return GetTrainLength2( &car0, &dir ); + return GetTrainLength2(&car0, &dir); } static void PlaceCar( - track_p car ) + track_p car) { - struct extraData *xx = GetTrkExtraData(car); - DIST_T dists[2]; - int dir; - - CarItemPlace( xx->item, &xx->trvTrk, dists ); - - for ( dir=0; dir<2; dir++ ) - xx->couplerPos[dir] = CarItemFindCouplerMountPoint( xx->item, xx->trvTrk, dir ); - - car->endPt[0].angle = xx->trvTrk.angle; - Translate( &car->endPt[0].pos, xx->trvTrk.pos, car->endPt[0].angle, dists[0] ); - car->endPt[1].angle = NormalizeAngle( xx->trvTrk.angle + 180.0 ); - Translate( &car->endPt[1].pos, xx->trvTrk.pos, car->endPt[1].angle, dists[1] ); -LOG( log_trainMove, 4, ( "%s @ [%0.3f,%0.3f] A%0.3f\n", CarItemNumber(xx->item), xx->trvTrk.pos.x, xx->trvTrk.pos.y, xx->trvTrk.angle ) ) - SetCarBoundingBox( car ); - xx->state &= ~(CAR_STATE_ONHIDENTRACK); - xx->trkLayer = NOTALAYER; - if ( xx->trvTrk.trk ) { - if ( !GetTrkVisible(xx->trvTrk.trk) ) - xx->state |= CAR_STATE_ONHIDENTRACK; - xx->trkLayer = GetTrkLayer(xx->trvTrk.trk); - } + struct extraData *xx = GetTrkExtraData(car); + DIST_T dists[2]; + int dir; + CarItemPlace(xx->item, &xx->trvTrk, dists); + + for (dir=0; dir<2; dir++) { + xx->couplerPos[dir] = CarItemFindCouplerMountPoint(xx->item, xx->trvTrk, dir); + } + + car->endPt[0].angle = xx->trvTrk.angle; + Translate(&car->endPt[0].pos, xx->trvTrk.pos, car->endPt[0].angle, dists[0]); + car->endPt[1].angle = NormalizeAngle(xx->trvTrk.angle + 180.0); + Translate(&car->endPt[1].pos, xx->trvTrk.pos, car->endPt[1].angle, dists[1]); + LOG(log_trainMove, 4, ("%s @ [%0.3f,%0.3f] A%0.3f\n", CarItemNumber(xx->item), + xx->trvTrk.pos.x, xx->trvTrk.pos.y, xx->trvTrk.angle)) + SetCarBoundingBox(car); + xx->state &= ~(CAR_STATE_ONHIDENTRACK); + xx->trkLayer = NOTALAYER; + + if (xx->trvTrk.trk) { + if (!GetTrkVisible(xx->trvTrk.trk)) { + xx->state |= CAR_STATE_ONHIDENTRACK; + } + + xx->trkLayer = GetTrkLayer(xx->trvTrk.trk); + } } static track_p FindCar( - coOrd * pos ) + coOrd * pos) { - coOrd pos0, pos1; - track_p trk, trk1; - DIST_T dist1 = 100000, dist; - struct extraData * xx; - - trk1 = NULL; - for ( trk=NULL; TrackIterate(&trk); ) { - if ( GetTrkType(trk) == T_CAR ) { - xx = GetTrkExtraData(trk); - if ( IsIgnored(xx) ) - continue; - pos0 = *pos; - dist = DistanceCar( trk, &pos0 ); - if ( dist < dist1 ) { - dist1 = dist; - trk1 = trk; - pos1 = pos0; - } - } - } - if ( dist1 < 10 ) { - *pos = pos1; - return trk1; - } else { - return NULL; - } + coOrd pos0, pos1; + track_p trk, trk1; + DIST_T dist1 = 100000, dist; + struct extraData * xx; + trk1 = NULL; + + for (trk=NULL; TrackIterate(&trk);) { + if (GetTrkType(trk) == T_CAR) { + xx = GetTrkExtraData(trk); + + if (IsIgnored(xx)) { + continue; + } + + pos0 = *pos; + dist = DistanceCar(trk, &pos0); + + if (dist < dist1) { + dist1 = dist; + trk1 = trk; + pos1 = pos0; + } + } + } + + if (dist1 < 10) { + *pos = pos1; + return trk1; + } else { + return NULL; + } } static track_p FindMasterLoco( - track_p train, - int * dirR ) + track_p train, + int * dirR) { - track_p car0; - struct extraData *xx0; - int dir, dir0; - - for ( dir = 0; dir<2; dir++ ) { - car0 = train; - dir0 = dir; - WALK_CARS_START( car0, xx0, dir0 ) - if ( CarItemIsLoco(xx0->item) && IsLocoMaster(xx0) ) { - if ( dirR ) *dirR = 1-dir0; - return car0; - } - WALK_CARS_END( car0, xx0, dir0 ) - } - return NULL; + struct extraData *xx0; + int dir; + + for (dir = 0; dir<2; dir++) { + track_p car0; + int dir0; + car0 = train; + dir0 = dir; + WALK_CARS_START(car0, xx0, dir0) + + if (CarItemIsLoco(xx0->item) && IsLocoMaster(xx0)) { + if (dirR) { + *dirR = 1-dir0; + } + + return car0; + } + + WALK_CARS_END(car0, xx0, dir0) + } + + return NULL; } static track_p PickMasterLoco( - track_p car, - int dir ) + track_p car, + int dir) { - track_p loco=NULL; - struct extraData *xx; - - WALK_CARS_START( car, xx, dir ) - if ( CarItemIsLoco(xx->item) ) { - if ( IsLocoMaster(xx) ) - return car; - if ( loco == NULL ) loco = car; - } - WALK_CARS_END( car, xx, dir ) - if ( loco == NULL ) - return NULL; - xx = GetTrkExtraData(loco); - SetLocoMaster(xx); - xx->speed = 0; - LOG( log_trainMove, 1, ( "%s becomes master\n", CarItemNumber(xx->item) ) ) - return loco; + track_p loco=NULL; + struct extraData *xx; + WALK_CARS_START(car, xx, dir) + + if (CarItemIsLoco(xx->item)) { + if (IsLocoMaster(xx)) { + return car; + } + + if (loco == NULL) { + loco = car; + } + } + + WALK_CARS_END(car, xx, dir) + + if (loco == NULL) { + return NULL; + } + + xx = GetTrkExtraData(loco); + SetLocoMaster(xx); + xx->speed = 0; + LOG(log_trainMove, 1, ("%s becomes master\n", CarItemNumber(xx->item))) + return loco; } static void UncoupleCars( - track_p car1, - track_p car2 ) + track_p car1, + track_p car2) { - struct extraData * xx1, * xx2; - track_p loco, loco1, loco2; - int dir1, dir2; - - xx1 = GetTrkExtraData(car1); - xx2 = GetTrkExtraData(car2); - if ( GetTrkEndTrk(car1,0) == car2 ) { - dir1 = 0; - } else if ( GetTrkEndTrk(car1,1) == car2 ) { - dir1 = 1; - } else { - ErrorMessage( "uncoupleCars - not coupled" ); - return; - } - if ( GetTrkEndTrk(car2,0) == car1 ) { - dir2 = 0; - } else if ( GetTrkEndTrk(car2,1) == car1 ) { - dir2 = 1; - } else { - ErrorMessage( "uncoupleCars - not coupled" ); - return; - } - loco = FindMasterLoco( car1, NULL ); - car1->endPt[dir1].track = NULL; - car2->endPt[dir2].track = NULL; - /*DisconnectTracks( car1, dir1, car2, dir2 );*/ - if ( loco ) { - loco1 = PickMasterLoco( car1, 1-dir1 ); - if ( loco1 != loco ) - LocoListChangeEntry( NULL, loco1 ); - loco2 = PickMasterLoco( car2, 1-dir2 ); - if ( loco2 != loco ) - LocoListChangeEntry( NULL, loco2 ); - } + track_p loco; + int dir1, dir2; + + if (GetTrkEndTrk(car1,0) == car2) { + dir1 = 0; + } else if (GetTrkEndTrk(car1,1) == car2) { + dir1 = 1; + } else { + ErrorMessage("uncoupleCars - not coupled"); + return; + } + + if (GetTrkEndTrk(car2,0) == car1) { + dir2 = 0; + } else if (GetTrkEndTrk(car2,1) == car1) { + dir2 = 1; + } else { + ErrorMessage("uncoupleCars - not coupled"); + return; + } + + loco = FindMasterLoco(car1, NULL); + car1->endPt[dir1].track = NULL; + car2->endPt[dir2].track = NULL; + + if (loco) { + track_p loco1, loco2; + loco1 = PickMasterLoco(car1, 1-dir1); + + if (loco1 != loco) { + LocoListChangeEntry(NULL, loco1); + } + + loco2 = PickMasterLoco(car2, 1-dir2); + + if (loco2 != loco) { + LocoListChangeEntry(NULL, loco2); + } + } } static void CoupleCars( - track_p car1, - int dir1, - track_p car2, - int dir2 ) + track_p car1, + int dir1, + track_p car2, + int dir2) { - struct extraData * xx1, * xx2; - track_p loco1, loco2; - track_p car; - int dir; - - xx1 = GetTrkExtraData(car1); - xx2 = GetTrkExtraData(car2); - if ( GetTrkEndTrk(car1,dir1) != NULL || GetTrkEndTrk(car2,dir2) != NULL ) { - LOG( log_trainMove, 1, ( "coupleCars - already coupled\n" ) ) - return; - } - car = car1; - dir = 1-dir1; - WALK_CARS_START( car, xx1, dir ) - if ( car == car2 ) { - LOG( log_trainMove, 1, ( "coupleCars - already coupled\n" ) ) - ErrorMessage( "Car coupling loop" ); - return; - } - WALK_CARS_END( car, xx1, dir ) - car = car2; - dir = 1-dir2; - WALK_CARS_START( car, xx2, dir ) - if ( car == car1 ) { - LOG( log_trainMove, 1, ( "coupleCars - already coupled\n" ) ) - ErrorMessage( "Car coupling loop" ); - return; - } - WALK_CARS_END( car, xx1, dir ) - loco1 = FindMasterLoco( car1, NULL ); - loco2 = FindMasterLoco( car2, NULL ); - car1->endPt[dir1].track = car2; - car2->endPt[dir2].track = car1; - /*ConnectTracks( car1, dir1, car2, dir2 );*/ -if ( logTable(log_trainMove).level >= 2 ) { -LogPrintf( "Coupling %s[%d] ", CarItemNumber(xx1->item), dir1 ); -LogPrintf( " and %s[%d]\n", CarItemNumber(xx2->item), dir2 ); -} - if ( ( loco1 != NULL && loco2 != NULL ) ) { - xx1 = GetTrkExtraData( loco1 ); - xx2 = GetTrkExtraData( loco2 ); - if ( xx1->speed == 0 ) { - ClrLocoMaster(xx1); - LOG( log_trainMove, 2, ( "%s loses master\n", CarItemNumber(xx1->item) ) ) - if ( followTrain == loco1 ) - followTrain = loco2; - LocoListChangeEntry( loco1, NULL ); - loco1 = loco2; - } else { - ClrLocoMaster(xx2); - xx1->speed = (xx1->speed + xx2->speed)/2.0; - if ( xx1->speed < 0 ) - xx1->speed = 0; - if ( xx1->speed > 100 ) - xx1->speed = 100; - LOG( log_trainMove, 2, ( "%s loses master\n", CarItemNumber(xx2->item) ) ) - if ( followTrain == loco2 ) - followTrain = loco1; - LocoListChangeEntry( loco2, NULL ); - } - SetTrainDirection( loco1 ); - } + struct extraData * xx1, * xx2; + track_p loco1, loco2; + track_p car; + int dir; + xx1 = GetTrkExtraData(car1); + xx2 = GetTrkExtraData(car2); + + if (GetTrkEndTrk(car1,dir1) != NULL || GetTrkEndTrk(car2,dir2) != NULL) { + LOG(log_trainMove, 1, ("coupleCars - already coupled\n")) + return; + } + + car = car1; + dir = 1-dir1; + WALK_CARS_START(car, xx1, dir) + + if (car == car2) { + LOG(log_trainMove, 1, ("coupleCars - already coupled\n")) + ErrorMessage("Car coupling loop"); + return; + } + + WALK_CARS_END(car, xx1, dir) + car = car2; + dir = 1-dir2; + WALK_CARS_START(car, xx2, dir) + + if (car == car1) { + LOG(log_trainMove, 1, ("coupleCars - already coupled\n")) + ErrorMessage("Car coupling loop"); + return; + } + + WALK_CARS_END(car, xx1, dir) + loco1 = FindMasterLoco(car1, NULL); + loco2 = FindMasterLoco(car2, NULL); + car1->endPt[dir1].track = car2; + car2->endPt[dir2].track = car1; + + /*ConnectTracks( car1, dir1, car2, dir2 );*/ + if (logTable(log_trainMove).level >= 2) { + LogPrintf("Coupling %s[%d] ", CarItemNumber(xx1->item), dir1); + LogPrintf(" and %s[%d]\n", CarItemNumber(xx2->item), dir2); + } + + if ((loco1 != NULL && loco2 != NULL)) { + xx1 = GetTrkExtraData(loco1); + xx2 = GetTrkExtraData(loco2); + + if (xx1->speed == 0) { + ClrLocoMaster(xx1); + LOG(log_trainMove, 2, ("%s loses master\n", CarItemNumber(xx1->item))) + + if (followTrain == loco1) { + followTrain = loco2; + } + + LocoListChangeEntry(loco1, NULL); + loco1 = loco2; + } else { + ClrLocoMaster(xx2); + xx1->speed = (xx1->speed + xx2->speed)/2.0; + + if (xx1->speed < 0) { + xx1->speed = 0; + } + + if (xx1->speed > 100) { + xx1->speed = 100; + } + + LOG(log_trainMove, 2, ("%s loses master\n", CarItemNumber(xx2->item))) + + if (followTrain == loco2) { + followTrain = loco1; + } + + LocoListChangeEntry(loco2, NULL); + } + + SetTrainDirection(loco1); + } } -long crashSpeedDecay=5; + long crashDistFactor=60; static void PlaceCars( - track_p car0, - int dir0, - long crashSpeed, - BOOL_T crashFlip ) + track_p car0, + int dir0, + long crashSpeed, + BOOL_T crashFlip) { - struct extraData *xx0 = GetTrkExtraData(car0), *xx; - int dir; - traverseTrack_t trvTrk; - DIST_T length, dist, length1; - track_p car_curr; - DIST_T flipflop = 1; - - if ( crashFlip ) - flipflop = -1; - dir = dir0; - trvTrk = xx0->trvTrk; - if ( dir0 ) - FlipTraverseTrack( &trvTrk ); - length = CarItemCoupledLength(xx0->item)/2.0; - car_curr = car0; - ClrIgnored( xx0 ); - WALK_CARS_START ( car_curr, xx, dir ) - if ( car_curr != car0 ) { - ClrIgnored( xx ); - length1 = CarItemCoupledLength(xx->item)/2.0; - dist = length + length1; - crashSpeed = crashSpeed*crashSpeedDecay/10; - if ( crashSpeed > 0 ) - dist -= dist * crashSpeed/crashDistFactor; - TraverseTrack2( &trvTrk, dist ); - xx->trvTrk = trvTrk; - if ( crashSpeed > 0 ) { - xx->trvTrk.angle = NormalizeAngle( xx->trvTrk.angle + flipflop*crashSpeed ); - xx->trvTrk.trk = NULL; - } - flipflop = -flipflop; - if ( dir != 0 ) - FlipTraverseTrack( &xx->trvTrk ); - PlaceCar( car_curr ); - length = length1; - } - WALK_CARS_END ( car_curr, xx, dir ) + struct extraData *xx0 = GetTrkExtraData(car0), *xx; + int dir; + traverseTrack_t trvTrk; + DIST_T length; + track_p car_curr; + DIST_T flipflop = 1; + + if (crashFlip) { + flipflop = -1; + } + + dir = dir0; + trvTrk = xx0->trvTrk; + + if (dir0) { + FlipTraverseTrack(&trvTrk); + } + + length = CarItemCoupledLength(xx0->item)/2.0; + car_curr = car0; + ClrIgnored(xx0); + WALK_CARS_START(car_curr, xx, dir) + + if (car_curr != car0) { + DIST_T dist, length1; + ClrIgnored(xx); + length1 = CarItemCoupledLength(xx->item)/2.0; + dist = length + length1; + crashSpeed = crashSpeed*CRASHSPEEDDECAY/10; + + if (crashSpeed > 0) { + dist -= dist * crashSpeed/crashDistFactor; + } + + TraverseTrack2(&trvTrk, dist); + xx->trvTrk = trvTrk; + + if (crashSpeed > 0) { + xx->trvTrk.angle = NormalizeAngle(xx->trvTrk.angle + flipflop*crashSpeed); + xx->trvTrk.trk = NULL; + } + + flipflop = -flipflop; + + if (dir != 0) { + FlipTraverseTrack(&xx->trvTrk); + } + + PlaceCar(car_curr); + length = length1; + } + + WALK_CARS_END(car_curr, xx, dir) } static void CrashTrain( - track_p car, - int dir, - traverseTrack_p trvTrkP, - long speed, - BOOL_T flip ) + track_p car, + int dir, + traverseTrack_p trvTrkP, + long speed, + BOOL_T flip) { - track_p loco; - struct extraData *xx; + track_p loco; + struct extraData *xx; + loco = FindMasterLoco(car,NULL); - loco = FindMasterLoco(car,NULL); - if ( loco != NULL ) { - StopTrain( loco, ST_Crashed ); - } - xx = GetTrkExtraData(car); - xx->trvTrk = *trvTrkP; - if ( dir ) - FlipTraverseTrack( &xx->trvTrk ); - PlaceCars( car, 1-dir, speed, flip ); - if ( flip ) - speed = - speed; - xx->trvTrk.angle = NormalizeAngle( xx->trvTrk.angle - speed ); - xx->trvTrk.trk = NULL; - PlaceCar( car ); + if (loco != NULL) { + StopTrain(loco, ST_Crashed); + } + + xx = GetTrkExtraData(car); + xx->trvTrk = *trvTrkP; + + if (dir) { + FlipTraverseTrack(&xx->trvTrk); + } + + PlaceCars(car, 1-dir, speed, flip); + + if (flip) { + speed = - speed; + } + + xx->trvTrk.angle = NormalizeAngle(xx->trvTrk.angle - speed); + xx->trvTrk.trk = NULL; + PlaceCar(car); } -static FLOAT_T couplerConnAngle = 45.0; static BOOL_T CheckCoupling( - track_p car0, - int dir00, - BOOL_T doCheckCrash ) + track_p car0, + int dir00, + BOOL_T doCheckCrash) { - track_p car1, loco1; - struct extraData *xx0, *xx1; - coOrd pos1; - DIST_T dist0, distc, dist=100000.0; - int dir0, dir1, dirl; - ANGLE_T angle; - traverseTrack_t trvTrk0, trvTrk1; - long speed, speed0, speed1; - - xx0 = xx1 = GetTrkExtraData(car0); - /* find length of train from loco to start and end */ - dir0 = dir00; - dist0 = GetTrainLength2( &car0, &dir0 ); - - trvTrk0 = xx0->trvTrk; - if ( dir00 ) - FlipTraverseTrack( &trvTrk0 ); - TraverseTrack2( &trvTrk0, dist0 ); - pos1 = trvTrk0.pos; - car1 = FindCar( &pos1 ); - if ( !car1 ) - return TRUE; - xx1 = GetTrkExtraData(car1); - if ( !IsOnTrack(xx1) ) - return TRUE; - /* determine which EP of the found car to couple to */ - angle = NormalizeAngle( trvTrk0.angle-xx1->trvTrk.angle ); - if ( angle > 90 && angle < 270 ) { - dir1 = 0; - angle = NormalizeAngle( angle+180 ); - } else { - dir1 = 1; - } - /* already coupled? */ - if ( GetTrkEndTrk(car1,dir1) != NULL ) - return TRUE; - /* are we close to aligned? */ - if ( angle > couplerConnAngle && angle < 360.0-couplerConnAngle ) - return TRUE; - /* find pos of found car's coupler, and dist btw couplers */ - distc = CarItemCoupledLength(xx1->item); - Translate( &pos1, xx1->trvTrk.pos, xx1->trvTrk.angle+(dir1?180.0:0.0), distc/2.0 ); - dist = FindDistance( trvTrk0.pos, pos1 ); - if ( dist < trackGauge/10 ) - return TRUE; - /* not real close: are we overlapped? */ - angle = FindAngle( trvTrk0.pos, pos1 ); - angle = NormalizeAngle( angle - trvTrk0.angle ); - if ( angle < 90 || angle > 270 ) - return TRUE; - /* are we beyond the end of the found car? */ - if ( dist > distc ) - return TRUE; - /* are we on the same track? */ - trvTrk1 = xx1->trvTrk; - if ( dir1 ) - FlipTraverseTrack( &trvTrk1 ); - TraverseTrack2( &trvTrk1, distc/2.0-dist ); - if ( trvTrk1.trk != trvTrk0.trk ) - return TRUE; - if ( doCheckCrash ) { - speed0 = (long)xx0->speed; - if ( (xx0->direction==0) != (dir00==0) ) - speed0 = - speed0; - loco1 = FindMasterLoco( car1, &dirl ); - xx1 = NULL; - if ( loco1 ) { - xx1 = GetTrkExtraData(loco1); - speed1 = (long)xx1->speed; - if ( car1 == loco1 ) { - dirl = IsAligned( xx1->trvTrk.angle, FindAngle( trvTrk0.pos, xx1->trvTrk.pos ) )?1:0; - } - if ( (xx1->direction==1) != (dirl==1) ) - speed1 = -speed1; - } else { - speed1 = 0; - } - speed = (long)labs( speed0 + speed1 ); - LOG( log_trainMove, 2, ( "coupling speed=%ld\n", speed ) ) - if ( speed > maxCouplingSpeed ) { - CrashTrain( car0, dir0, &trvTrk0, speed, FALSE ); - CrashTrain( car1, dir1, &trvTrk1, speed, TRUE ); - return FALSE; - } - } - if ( dir00 ) - dist = -dist; - TraverseTrack2( &xx0->trvTrk, dist ); - CoupleCars( car0, dir0, car1, dir1 ); -LOG( log_trainMove, 3, ( " -> %0.3f\n", dist ) ) - return TRUE; -} + track_p car1; + struct extraData *xx0, *xx1; + coOrd pos1; + DIST_T dist0, distc, dist=100000.0; + int dir0, dir1, dirl; + ANGLE_T angle; + traverseTrack_t trvTrk0, trvTrk1; + xx0 = xx1 = GetTrkExtraData(car0); + /* find length of train from loco to start and end */ + dir0 = dir00; + dist0 = GetTrainLength2(&car0, &dir0); + trvTrk0 = xx0->trvTrk; + + if (dir00) { + FlipTraverseTrack(&trvTrk0); + } + + TraverseTrack2(&trvTrk0, dist0); + pos1 = trvTrk0.pos; + car1 = FindCar(&pos1); + + if (!car1) { + return TRUE; + } + + xx1 = GetTrkExtraData(car1); + + if (!IsOnTrack(xx1)) { + return TRUE; + } + + /* determine which EP of the found car to couple to */ + angle = NormalizeAngle(trvTrk0.angle-xx1->trvTrk.angle); + + if (angle > 90 && angle < 270) { + dir1 = 0; + angle = NormalizeAngle(angle+180); + } else { + dir1 = 1; + } + + /* already coupled? */ + if (GetTrkEndTrk(car1,dir1) != NULL) { + return TRUE; + } + + /* are we close to aligned? */ + if (angle > COUPLERCONNECTIONANGLE && angle < 360.0-COUPLERCONNECTIONANGLE) { + return TRUE; + } + + /* find pos of found car's coupler, and dist btw couplers */ + distc = CarItemCoupledLength(xx1->item); + Translate(&pos1, xx1->trvTrk.pos, xx1->trvTrk.angle+(dir1?180.0:0.0), + distc/2.0); + dist = FindDistance(trvTrk0.pos, pos1); + + if (dist < trackGauge/10) { + return TRUE; + } + + /* not real close: are we overlapped? */ + angle = FindAngle(trvTrk0.pos, pos1); + angle = NormalizeAngle(angle - trvTrk0.angle); + + if (angle < 90 || angle > 270) { + return TRUE; + } + + /* are we beyond the end of the found car? */ + if (dist > distc) { + return TRUE; + } + + /* are we on the same track? */ + trvTrk1 = xx1->trvTrk; + + if (dir1) { + FlipTraverseTrack(&trvTrk1); + } + + TraverseTrack2(&trvTrk1, distc/2.0-dist); + + if (trvTrk1.trk != trvTrk0.trk) { + return TRUE; + } + + if (doCheckCrash) { + track_p loco1; + long speed, speed0, speed1; + speed0 = (long)xx0->speed; + + if ((xx0->direction==0) != (dir00==0)) { + speed0 = - speed0; + } + + loco1 = FindMasterLoco(car1, &dirl); + xx1 = NULL; + + if (loco1) { + xx1 = GetTrkExtraData(loco1); + speed1 = (long)xx1->speed; + + if (car1 == loco1) { + dirl = IsAligned(xx1->trvTrk.angle, FindAngle(trvTrk0.pos, + xx1->trvTrk.pos))?1:0; + } + + if ((xx1->direction==1) != (dirl==1)) { + speed1 = -speed1; + } + } else { + speed1 = 0; + } + speed = labs(speed0 + speed1); + LOG(log_trainMove, 2, ("coupling speed=%ld\n", speed)) -static void PlaceTrain( - track_p car0, - BOOL_T doCheckCrash, - BOOL_T doCheckCoupling ) -{ - track_p car_curr; - struct extraData *xx0, *xx; - int dir0, dir; - - xx0 = GetTrkExtraData(car0); - - LOG( log_trainMove, 2, ( " placeTrain: %s [%0.3f %0.3f] A%0.3f", CarItemNumber(xx0->item), xx0->trvTrk.pos.x, xx0->trvTrk.pos.y, xx0->trvTrk.angle ) ) - - car_curr = car0; - for ( dir0=0; dir0<2; dir0++ ) { - car_curr = car0; - dir = dir0; - xx = xx0; - WALK_CARS_START( car_curr, xx, dir ) - SetIgnored(xx); - WALK_CARS_END( car_curr, xx, dir ); - } + if (speed > maxCouplingSpeed) { + CrashTrain(car0, dir0, &trvTrk0, speed, FALSE); + CrashTrain(car1, dir1, &trvTrk1, speed, TRUE); + return FALSE; + } + } - /* check for coupling to other cars */ - if ( doCheckCoupling ) { - if ( xx0->trvTrk.trk ) - if ( !CheckCoupling( car0, 0, doCheckCrash ) ) - return; - if ( xx0->trvTrk.trk ) - if ( !CheckCoupling( car0, 1, doCheckCrash ) ) - return; - } + if (dir00) { + dist = -dist; + } + + TraverseTrack2(&xx0->trvTrk, dist); + CoupleCars(car0, dir0, car1, dir1); + LOG(log_trainMove, 3, (" -> %0.3f\n", dist)) + return TRUE; +} - PlaceCar( car0 ); - for ( dir0=0; dir0<2; dir0++ ) - PlaceCars( car0, dir0, 0, FALSE ); +static void PlaceTrain( + track_p car0, + BOOL_T doCheckCrash, + BOOL_T doCheckCoupling) +{ + track_p car_curr; + struct extraData *xx0; + int dir0; + xx0 = GetTrkExtraData(car0); + LOG(log_trainMove, 2, (" placeTrain: %s [%0.3f %0.3f] A%0.3f", + CarItemNumber(xx0->item), xx0->trvTrk.pos.x, xx0->trvTrk.pos.y, + xx0->trvTrk.angle)) + car_curr = car0; + + for (dir0=0; dir0<2; dir0++) { + int dir; + struct extraData *xx; + car_curr = car0; + dir = dir0; + xx = xx0; + WALK_CARS_START(car_curr, xx, dir) + SetIgnored(xx); + WALK_CARS_END(car_curr, xx, dir); + } + + /* check for coupling to other cars */ + if (doCheckCoupling) { + if (xx0->trvTrk.trk) + if (!CheckCoupling(car0, 0, doCheckCrash)) { + return; + } + + if (xx0->trvTrk.trk) + if (!CheckCoupling(car0, 1, doCheckCrash)) { + return; + } + } + + PlaceCar(car0); + + for (dir0=0; dir0<2; dir0++) { + PlaceCars(car0, dir0, 0, FALSE); + } } static void PlaceTrainInit( - track_p car0, - track_p trk0, - coOrd pos0, - ANGLE_T angle0, - BOOL_T doCheckCoupling ) + track_p car0, + track_p trk0, + coOrd pos0, + ANGLE_T angle0, + BOOL_T doCheckCoupling) { - struct extraData * xx = GetTrkExtraData(car0); - xx->trvTrk.trk = trk0; - xx->trvTrk.dist = xx->trvTrk.length = -1; - xx->trvTrk.pos = pos0; - xx->trvTrk.angle = angle0; - PlaceTrain( car0, FALSE, doCheckCoupling ); + struct extraData * xx = GetTrkExtraData(car0); + xx->trvTrk.trk = trk0; + xx->trvTrk.dist = xx->trvTrk.length = -1; + xx->trvTrk.pos = pos0; + xx->trvTrk.angle = angle0; + PlaceTrain(car0, FALSE, doCheckCoupling); } static void FlipTrain( - track_p train ) + track_p train) { - DIST_T d0, d1; - struct extraData * xx; - - if ( train == NULL ) - return; - d0 = GetTrainLength( train, 0 ); - d1 = GetTrainLength( train, 1 ); - xx = GetTrkExtraData(train); - TraverseTrack2( &xx->trvTrk, d0-d1 ); - FlipTraverseTrack( &xx->trvTrk ); - xx->trvTrk.length = -1; - PlaceTrain( train, FALSE, TRUE ); + DIST_T d0, d1; + struct extraData * xx; + + if (train == NULL) { + return; + } + + d0 = GetTrainLength(train, 0); + d1 = GetTrainLength(train, 1); + xx = GetTrkExtraData(train); + TraverseTrack2(&xx->trvTrk, d0-d1); + FlipTraverseTrack(&xx->trvTrk); + xx->trvTrk.length = -1; + PlaceTrain(train, FALSE, TRUE); } static BOOL_T MoveTrain( - track_p train, - long timeD ) + track_p train, + long timeD) { - DIST_T ips, dist0, dist1; - struct extraData *xx, *xx1; - traverseTrack_t trvTrk; - DIST_T length; - track_p car1; - int dir1; - int measured; /* make sure the distance is only measured once per train */ - - if ( train == NULL ) - return FALSE; - xx = GetTrkExtraData(train); - if ( xx->speed <= 0 ) - return FALSE; - - if ( setTimeD ) - timeD = setTimeD; - ips = ((xx->speed*5280.0*12.0)/(60.0*60.0*GetScaleRatio(curScaleInx))); - dist0 = ips * timeD/1000.0; - length = GetTrainLength( train, xx->direction ); - dist1 = length + dist0; - trvTrk = xx->trvTrk; - if ( trvTrk.trk == NULL ) { - return FALSE; - } - LOG( log_trainMove, 1, ( "moveTrain: %s t%ld->%0.3f S%0.3f D%d [%0.3f %0.3f] A%0.3f T%d\n", - CarItemNumber(xx->item), timeD, dist0, xx->speed, xx->direction, xx->trvTrk.pos.x, xx->trvTrk.pos.y, xx->trvTrk.angle, xx->trvTrk.trk?GetTrkIndex(xx->trvTrk.trk):-1 ) ) - if ( xx->direction ) - FlipTraverseTrack( &trvTrk ); - TraverseTrack( &trvTrk, &dist1 ); - if ( dist1 > 0.0 ) { - if ( dist1 > dist0 ) { - /*ErrorMessage( "%s no room: L%0.3f D%0.3f", CarItemNumber(xx->item), length, dist1 );*/ - StopTrain( train, ST_NoRoom ); - return FALSE; - } else { - dist0 -= dist1; - LOG( log_trainMove, 1, ( " %s STOP D%d [%0.3f %0.3f] A%0.3f D%0.3f\n", - CarItemNumber(xx->item), xx->direction, xx->trvTrk.pos.x, xx->trvTrk.pos.y, xx->trvTrk.angle, dist0 ) ) - } - /*ErrorMessage( "%s stopped at End Of Track", CarItemNumber(xx->item) );*/ - if ( xx->autoReverse ) { - xx->direction = !xx->direction; - SetTrainDirection( train ); - } else { - if ( xx->speed > maxCouplingSpeed ) { - car1 = train; - dir1 = xx->direction; - GetTrainLength2( &car1, &dir1 ); - CrashTrain( car1, dir1, &trvTrk, (long)xx->speed, FALSE ); - return TRUE; - } else { - StopTrain( train, trvTrk.trk?ST_OpenTurnout:ST_EndOfTrack ); - } - } - } - trvTrk = xx->trvTrk; - TraverseTrack2( &xx->trvTrk, xx->direction==0?dist0:-dist0 ); - car1 = train; - dir1 = 0; - GetTrainLength2( &car1, &dir1 ); - dir1 = 1-dir1; - - measured = FALSE; - WALK_CARS_START( car1, xx1, dir1 ); - if ( CarItemIsLoco(xx1->item) && !measured ) { - xx->distance += dist0; - measured = TRUE; - } - WALK_CARS_END( car1, xx1, dir1 ); - - if ( train == followTrain ) { - if ( followCenter.x != mainCenter.x || - followCenter.y != mainCenter.y ) { - if ( curTrainDlg->train == followTrain ) { - curTrainDlg->followMe = FALSE; - ParamLoadControl( curTrainDlg->trainPGp, I_FOLLOW ); - } - followTrain = NULL; - } else if ( OFF_MAIND( xx->trvTrk.pos, xx->trvTrk.pos ) ) { - MoveMainWindow( xx->trvTrk.pos, NormalizeAngle(xx->trvTrk.angle+(xx->direction?180.0:0.0)) ); - followCenter = mainCenter; - } - } - PlaceTrain( train, TRUE, TRUE ); - return TRUE; -} + DIST_T ips, dist0, dist1; + struct extraData *xx, *xx1; + traverseTrack_t trvTrk; + DIST_T length; + track_p car1; + int dir1; + int measured; /* make sure the distance is only measured once per train */ + + if (train == NULL) { + return FALSE; + } + + xx = GetTrkExtraData(train); + + if (xx->speed <= 0) { + return FALSE; + } + + ips = ((xx->speed*5280.0*12.0)/(60.0*60.0*GetScaleRatio(GetLayoutCurScale()))); + dist0 = ips * timeD/1000.0; + length = GetTrainLength(train, xx->direction); + dist1 = length + dist0; + trvTrk = xx->trvTrk; + + if (trvTrk.trk == NULL) { + return FALSE; + } + + LOG(log_trainMove, 1, + ("moveTrain: %s t%ld->%0.3f S%0.3f D%d [%0.3f %0.3f] A%0.3f T%d\n", + CarItemNumber(xx->item), timeD, dist0, xx->speed, xx->direction, + xx->trvTrk.pos.x, xx->trvTrk.pos.y, xx->trvTrk.angle, + xx->trvTrk.trk?GetTrkIndex(xx->trvTrk.trk):-1)) + + if (xx->direction) { + FlipTraverseTrack(&trvTrk); + } + + TraverseTrack(&trvTrk, &dist1); + + if (dist1 > 0.0) { + if (dist1 > dist0) { + /*ErrorMessage( "%s no room: L%0.3f D%0.3f", CarItemNumber(xx->item), length, dist1 );*/ + StopTrain(train, ST_NoRoom); + return FALSE; + } else { + dist0 -= dist1; + LOG(log_trainMove, 1, (" %s STOP D%d [%0.3f %0.3f] A%0.3f D%0.3f\n", + CarItemNumber(xx->item), xx->direction, xx->trvTrk.pos.x, xx->trvTrk.pos.y, + xx->trvTrk.angle, dist0)) + } + + /*ErrorMessage( "%s stopped at End Of Track", CarItemNumber(xx->item) );*/ + if (xx->autoReverse) { + xx->direction = !xx->direction; + SetTrainDirection(train); + } else { + if (xx->speed > maxCouplingSpeed) { + car1 = train; + dir1 = xx->direction; + GetTrainLength2(&car1, &dir1); + CrashTrain(car1, dir1, &trvTrk, (long)xx->speed, FALSE); + return TRUE; + } else { + if (trvTrk.trk && trvTrk.trk->endCnt > 1) //Test for null track after Traverse + StopTrain(train, ST_OpenTurnout ); + else + StopTrain(train, ST_EndOfTrack); + return (FALSE); + } + } + } + + trvTrk = xx->trvTrk; + TraverseTrack2(&xx->trvTrk, xx->direction==0?dist0:-dist0); + car1 = train; + dir1 = 0; + GetTrainLength2(&car1, &dir1); + dir1 = 1-dir1; + measured = FALSE; + WALK_CARS_START(car1, xx1, dir1); + + if (CarItemIsLoco(xx1->item) && !measured) { + xx->distance += dist0; + measured = TRUE; + } + + WALK_CARS_END(car1, xx1, dir1); + + if (train == followTrain) { + if (followCenter.x != mainCenter.x || + followCenter.y != mainCenter.y) { + if (curTrainDlg->train == followTrain) { + curTrainDlg->followMe = FALSE; + ParamLoadControl(curTrainDlg->trainPGp, I_FOLLOW); + } + + followTrain = NULL; + } else if (OFF_MAIND(xx->trvTrk.pos, xx->trvTrk.pos)) { + MoveMainWindow(xx->trvTrk.pos, + NormalizeAngle(xx->trvTrk.angle+(xx->direction?180.0:0.0))); + followCenter = mainCenter; + } + } + + PlaceTrain(train, TRUE, TRUE); + return TRUE; +} + + +static BOOL_T MoveTrains(long timeD) +{ + BOOL_T trains_moved = FALSE; + track_p train; + struct extraData * xx; + for (train=NULL; TrackIterate(&train);) { + if (GetTrkType(train) != T_CAR) { + continue; + } -static BOOL_T MoveTrains( long timeD ) -{ - BOOL_T trains_moved = FALSE; - track_p train; - struct extraData * xx; - - for ( train=NULL; TrackIterate( &train ); ) { - if ( GetTrkType(train) != T_CAR ) continue; - xx = GetTrkExtraData(train); - if ( !CarItemIsLoco(xx->item) ) continue; - if ( !IsLocoMaster(xx) ) continue; - if ( xx->speed == 0 ) continue; - trains_moved |= MoveTrain( train, timeD ); - } + xx = GetTrkExtraData(train); + + if (!CarItemIsLoco(xx->item)) { + continue; + } + + if (!IsLocoMaster(xx)) { + continue; + } - ControllerDialogSyncAll(); + if (xx->speed == 0) { + continue; + } - DrawAllCars(); + trains_moved |= MoveTrain(train, timeD); + } - return trains_moved; + ControllerDialogSyncAll(); + DrawAllCars(); + return trains_moved; } -static void MoveTrainsLoop( void ) +static void MoveTrainsLoop(void) { - long time1, timeD; - static long time0 = 0; + long time1, timeD; + static long time0 = 0; + trainsTimeoutPending = FALSE; - trainsTimeoutPending = FALSE; - if ( trainsState != TRAINS_RUN ) { - time0 = 0; - return; - } - if ( time0 == 0 ) - time0 = wGetTimer(); - time1 = wGetTimer(); - timeD = time1-time0; - time0 = time1; - if ( timeD > 1000 ) - timeD = 1000; - if ( MoveTrains( timeD ) ) { - wAlarm( trainPause, MoveTrainsLoop ); - trainsTimeoutPending = TRUE; - } else { - time0 = 0; - trainsState = TRAINS_IDLE; - TrainTimeEndPause(); - } + if (trainsState != TRAINS_RUN) { + time0 = 0; + return; + } + + if (time0 == 0) { + time0 = wGetTimer(); + } + + time1 = wGetTimer(); + timeD = time1-time0; + time0 = time1; + + if (timeD > 1000) { + timeD = 1000; + } + + if (MoveTrains(timeD)) { + wAlarm(trainPause, MoveTrainsLoop); + trainsTimeoutPending = TRUE; + } else { + time0 = 0; + trainsState = TRAINS_IDLE; + TrainTimeEndPause(); + } } -static void RestartTrains( void ) +static void RestartTrains(void) { - if ( trainsState != TRAINS_RUN ) - TrainTimeStartPause(); - trainsState = TRAINS_RUN; - if ( !trainsTimeoutPending ) - MoveTrainsLoop(); + if (trainsState != TRAINS_RUN) { + TrainTimeStartPause(); + } + + trainsState = TRAINS_RUN; + + if (!trainsTimeoutPending) { + MoveTrainsLoop(); + } } static long trainTime0 = 0; static long playbackTrainPause = 0; static drawCmd_t trainMovieD = { - NULL, - &screenDrawFuncs, - 0, - 16.0, - 0, - {0,0}, {1,1}, - Pix2CoOrd, CoOrd2Pix }; + NULL, + &screenDrawFuncs, + 0, + 16.0, + 0, + {0,0}, {1,1}, + Pix2CoOrd, CoOrd2Pix +}; static long trainMovieFrameDelay; static long trainMovieFrameNext; -static void TrainTimeEndPause( void ) +static void TrainTimeEndPause(void) { - if ( recordF ) { - if (trainTime0 != 0 ) { - long delay; - delay = wGetTimer()-trainTime0; - if ( delay > 0 ) - fprintf( recordF, "TRAINPAUSE %ld\n", delay ); - } - trainTime0 = 0; - } + if (recordF) { + if (trainTime0 != 0) { + long delay; + delay = wGetTimer()-trainTime0; + + if (delay > 0) { + fprintf(recordF, "TRAINPAUSE %ld\n", delay); + } + } + + trainTime0 = 0; + } } -static void TrainTimeStartPause( void ) +static void TrainTimeStartPause(void) { - if ( trainTime0 == 0 ) - trainTime0 = wGetTimer(); + if (trainTime0 == 0) { + trainTime0 = wGetTimer(); + } } -static BOOL_T TrainTimeDoPause( char * line ) +static BOOL_T TrainTimeDoPause(char * line) { - BOOL_T drawCarEnable2; - playbackTrainPause = atol( line ); -LOG( log_trainPlayback, 1, ( "DoPause %ld\n", playbackTrainPause ) ); - trainsState = TRAINS_RUN; - if ( trainMovieFrameDelay > 0 ) { - drawCarEnable2 = drawCarEnable; drawCarEnable = TRUE; - TakeSnapshot( &trainMovieD ); - drawCarEnable = drawCarEnable2; -LOG( log_trainPlayback, 1, ( "SNAP 0\n" ) ); - trainMovieFrameNext = trainMovieFrameDelay; - } - /*MoveTrains();*/ - while ( playbackTrainPause > 0 ) { - if ( playbackTrainPause > trainPause ) { - wPause( trainPause ); - MoveTrains( trainPause ); - playbackTrainPause -= trainPause; - if ( trainMovieFrameDelay > 0 ) - trainMovieFrameNext -= trainPause; - } else { - wPause( playbackTrainPause ); - MoveTrains( playbackTrainPause ); - if ( trainMovieFrameDelay > 0 ) - trainMovieFrameNext -= playbackTrainPause; - playbackTrainPause = 0; - } - if ( trainMovieFrameDelay > 0 && - trainMovieFrameNext <= 0 ) { - drawCarEnable2 = drawCarEnable; drawCarEnable = TRUE; - TakeSnapshot( &trainMovieD ); - drawCarEnable = drawCarEnable2; -LOG( log_trainPlayback, 1, ( "SNAP %ld\n", trainMovieFrameNext ) ); - trainMovieFrameNext = trainMovieFrameDelay; - } - } - return TRUE; -} + BOOL_T drawCarEnable2; + playbackTrainPause = atol(line); + LOG(log_trainPlayback, 1, ("DoPause %ld\n", playbackTrainPause)); + trainsState = TRAINS_RUN; + + if (trainMovieFrameDelay > 0) { + drawCarEnable2 = drawCarEnable; + drawCarEnable = TRUE; + TakeSnapshot(&trainMovieD); + drawCarEnable = drawCarEnable2; + LOG(log_trainPlayback, 1, ("SNAP 0\n")); + trainMovieFrameNext = trainMovieFrameDelay; + } + + /*MoveTrains();*/ + while (playbackTrainPause > 0) { + if (playbackTrainPause > trainPause) { + wPause(trainPause); + MoveTrains(trainPause); + playbackTrainPause -= trainPause; + + if (trainMovieFrameDelay > 0) { + trainMovieFrameNext -= trainPause; + } + } else { + wPause(playbackTrainPause); + MoveTrains(playbackTrainPause); + + if (trainMovieFrameDelay > 0) { + trainMovieFrameNext -= playbackTrainPause; + } + + playbackTrainPause = 0; + } + + if (trainMovieFrameDelay > 0 && + trainMovieFrameNext <= 0) { + drawCarEnable2 = drawCarEnable; + drawCarEnable = TRUE; + TakeSnapshot(&trainMovieD); + drawCarEnable = drawCarEnable2; + LOG(log_trainPlayback, 1, ("SNAP %ld\n", trainMovieFrameNext)); + trainMovieFrameNext = trainMovieFrameDelay; + } + } + + return TRUE; +} + + +static BOOL_T TrainDoMovie(char * line) +{ + /* on/off, scale, orig, size */ + long fps; + if (trainMovieD.dpi == 0) { + trainMovieD.dpi = mainD.dpi; + } -static BOOL_T TrainDoMovie( char * line ) -{ - /* on/off, scale, orig, size */ - long fps; - if ( trainMovieD.dpi == 0 ) - trainMovieD.dpi = mainD.dpi; - if ( !GetArgs( line, "lfpp", &fps, &trainMovieD.scale, &trainMovieD.orig, &trainMovieD.size ) ) - return FALSE; - if ( fps > 0 ) { - trainMovieFrameDelay = 1000/fps; - } else { - trainMovieFrameDelay = 0; - } - trainMovieFrameNext = 0; - return TRUE; + if (!GetArgs(line, "lfpp", &fps, &trainMovieD.scale, &trainMovieD.orig, + &trainMovieD.size)) { + return FALSE; + } + + if (fps > 0) { + trainMovieFrameDelay = 1000/fps; + } else { + trainMovieFrameDelay = 0; + } + + trainMovieFrameNext = 0; + return TRUE; } -EXPORT void AttachTrains( void ) +void AttachTrains(void) { - track_p car; - track_p loco; - struct extraData * xx; - coOrd pos; - track_p trk; - ANGLE_T angle; - EPINX_T ep0, ep1; - int dir; - - for ( car=NULL; TrackIterate( &car ); ) { - ClrTrkBits( car, TB_CARATTACHED ); - if ( GetTrkType(car) != T_CAR ) - continue; - xx = GetTrkExtraData(car); - ClrProcessed(xx); - } - for ( car=NULL; TrackIterate( &car ); ) { - if ( GetTrkType(car) != T_CAR ) - continue; - xx = GetTrkExtraData(car); - if ( IsProcessed(xx) ) - continue; - loco = FindMasterLoco( car, NULL ); - if ( loco != NULL ) - xx = GetTrkExtraData(loco); - else - loco = car; - pos = xx->trvTrk.pos; - if ( xx->status == ST_Crashed ) - continue; - TRK_ITERATE(trk) { - if ( trk == xx->trvTrk.trk ) - break; - } - if ( trk!=NULL && !QueryTrack( trk, Q_ISTRACK ) ) - trk = NULL; - if ( trk==NULL || GetTrkDistance(trk,pos)>trackGauge*2.0 ) - trk = OnTrack2( &pos, FALSE, TRUE, FALSE ); - if ( trk!=NULL ) { - /*if ( trk == xx->trvTrk.trk ) - continue;*/ - angle = GetAngleAtPoint( trk, pos, &ep0, &ep1 ); - if ( NormalizeAngle( xx->trvTrk.angle-angle+90 ) > 180 ) - angle = NormalizeAngle(angle+180); - PlaceTrainInit( loco, trk, pos, angle, TRUE ); - } else { - PlaceTrainInit( loco, NULL, xx->trvTrk.pos, xx->trvTrk.angle, FALSE ); - } - dir = 0; - WALK_CARS_START( loco, xx, dir ) - WALK_CARS_END( loco, xx, dir ) - dir = 1-dir; - WALK_CARS_START( loco, xx, dir ) - SetProcessed(xx); - if ( xx->trvTrk.trk ) { - SetTrkBits( xx->trvTrk.trk, TB_CARATTACHED ); - xx->status = ST_StopManual; - } else { - xx->status = ST_NotOnTrack; - } - WALK_CARS_END( loco, xx, dir ) - } - for ( car=NULL; TrackIterate( &car ); ) { - if ( GetTrkType(car) != T_CAR ) - continue; - xx = GetTrkExtraData(car); - ClrProcessed(xx); - } -} + track_p car; + track_p loco; + struct extraData * xx; + coOrd pos; + track_p trk; + ANGLE_T angle; + EPINX_T ep0, ep1; + int dir; + + for (car=NULL; TrackIterate(&car);) { + ClrTrkBits(car, TB_CARATTACHED); + + if (GetTrkType(car) != T_CAR) { + continue; + } + + xx = GetTrkExtraData(car); + ClrProcessed(xx); + } + + for (car=NULL; TrackIterate(&car);) { + if (GetTrkType(car) != T_CAR) { + continue; + } + + xx = GetTrkExtraData(car); + + if (IsProcessed(xx)) { + continue; + } + + loco = FindMasterLoco(car, NULL); + + if (loco != NULL) { + xx = GetTrkExtraData(loco); + } else { + loco = car; + } + + pos = xx->trvTrk.pos; + + if (xx->status == ST_Crashed) { + continue; + } + + TRK_ITERATE(trk) { + if (trk == xx->trvTrk.trk) { + break; + } + } + + if (trk!=NULL && !QueryTrack(trk, Q_ISTRACK)) { + trk = NULL; + } + if (trk==NULL || GetTrkDistance(trk,&pos)>trackGauge*2.0) { + trk = OnTrack2(&pos, FALSE, TRUE, FALSE, NULL); + } + + if (trk!=NULL) { + /*if ( trk == xx->trvTrk.trk ) + continue;*/ + angle = GetAngleAtPoint(trk, pos, &ep0, &ep1); + + if (NormalizeAngle(xx->trvTrk.angle-angle+90) > 180) { + angle = NormalizeAngle(angle+180); + } + + PlaceTrainInit(loco, trk, pos, angle, TRUE); + } else { + PlaceTrainInit(loco, NULL, xx->trvTrk.pos, xx->trvTrk.angle, FALSE); + } + + dir = 0; + WALK_CARS_START(loco, xx, dir) + WALK_CARS_END(loco, xx, dir) + dir = 1-dir; + WALK_CARS_START(loco, xx, dir) + SetProcessed(xx); + + if (xx->trvTrk.trk) { + SetTrkBits(xx->trvTrk.trk, TB_CARATTACHED); + xx->status = ST_StopManual; + } else { + xx->status = ST_NotOnTrack; + } + + WALK_CARS_END(loco, xx, dir) + } + + for (car=NULL; TrackIterate(&car);) { + if (GetTrkType(car) != T_CAR) { + continue; + } + + xx = GetTrkExtraData(car); + ClrProcessed(xx); + } +} + + +static void UpdateTrainAttachment(void) +{ + track_p trk; + struct extraData * xx; + for (trk=NULL; TrackIterate(&trk);) { + ClrTrkBits(trk, TB_CARATTACHED); + } -static void UpdateTrainAttachment( void ) -{ - track_p trk; - struct extraData * xx; - for ( trk=NULL; TrackIterate( &trk ); ) { - ClrTrkBits( trk, TB_CARATTACHED ); - } - for ( trk=NULL; TrackIterate( &trk ); ) { - if ( GetTrkType(trk) == T_CAR ) { - xx = GetTrkExtraData(trk); - if ( xx->trvTrk.trk != NULL ) - SetTrkBits( xx->trvTrk.trk, TB_CARATTACHED ); - } - } + for (trk=NULL; TrackIterate(&trk);) { + if (GetTrkType(trk) == T_CAR) { + xx = GetTrkExtraData(trk); + + if (xx->trvTrk.trk != NULL) { + SetTrkBits(xx->trvTrk.trk, TB_CARATTACHED); + } + } + } } static BOOL_T TrainOnMovableTrack( - track_p trk, - track_p *trainR ) + track_p trk, + track_p *trainR) { - track_p train; - struct extraData * xx; - int dir; - - for ( train=NULL; TrackIterate(&train); ) { - if ( GetTrkType(train) != T_CAR ) - continue; - xx = GetTrkExtraData(train); - if ( IsOnTrack(xx) ) { - if ( xx->trvTrk.trk == trk ) - break; - } - } - *trainR = train; - if ( train == NULL ) { - return TRUE; - } - dir = 0; - WALK_CARS_START( train, xx, dir ) - WALK_CARS_END( train, xx, dir ) - dir = 1-dir; - WALK_CARS_START( train, xx, dir ) - if ( xx->trvTrk.trk != trk ) { - ErrorMessage( MSG_CANT_MOVE_UNDER_TRAIN ); - return FALSE; - } - WALK_CARS_END( train, xx, dir ) - train = FindMasterLoco( train, NULL ); - if ( train != NULL ) - *trainR = train; - return TRUE; + track_p train; + struct extraData * xx; + int dir; + + for (train=NULL; TrackIterate(&train);) { + if (GetTrkType(train) != T_CAR) { + continue; + } + + xx = GetTrkExtraData(train); + + if (IsOnTrack(xx)) { + if (xx->trvTrk.trk == trk) { + break; + } + } + } + + *trainR = train; + + if (train == NULL) { + return TRUE; + } + + dir = 0; + WALK_CARS_START(train, xx, dir) + WALK_CARS_END(train, xx, dir) + dir = 1-dir; + WALK_CARS_START(train, xx, dir) + + if (xx->trvTrk.trk != trk) { + ErrorMessage(MSG_CANT_MOVE_UNDER_TRAIN); + return FALSE; + } + + WALK_CARS_END(train, xx, dir) + train = FindMasterLoco(train, NULL); + + if (train != NULL) { + *trainR = train; + } + + return TRUE; } /* @@ -2026,320 +2404,358 @@ static track_p trainFuncCar; static coOrd trainFuncPos; static wButton_p trainPauseB; -#ifdef LATER -static char * newCarLabels[3] = { N_("Road"), N_("Number"), NULL }; -#endif - -static STATUS_T CmdTrain( wAction_t action, coOrd pos ) +static STATUS_T CmdTrain(wAction_t action, coOrd pos) { - track_p trk0, trk1; - static track_p currCar; - coOrd pos0, pos1; - static coOrd delta; - ANGLE_T angle1; - EPINX_T ep0, ep1; - int dir; - struct extraData * xx=NULL; - DIST_T dist; - wPos_t w, h; - - switch (action) { - - case C_START: - /*UndoStart( "Trains", "Trains" );*/ - UndoSuspend(); - programMode = MODE_TRAIN; - drawCarEnable = FALSE; - doDrawTurnoutPosition = 1; - DoChangeNotification( CHANGE_PARAMS|CHANGE_TOOLBAR ); - if ( CarAvailableCount() <= 0 ) { - if ( NoticeMessage( MSG_NO_CARS, _("Yes"), _("No") ) > 0 ) { - DoCarDlg(); - DoChangeNotification( CHANGE_PARAMS ); - } - } - EnableCommands(); - if ( curTrainDlg == NULL ) - curTrainDlg = CreateTrainControlDlg(); - curTrainDlg->train = NULL; -#ifdef LATER - if ( trainW == NULL ) - trainW = ParamCreateDialog( MakeWindowTitle(_("Train")), NULL, trainPGp ); - ParamLoadControls( trainPGp ); - wListClear( (wList_p)trainPLs[0].control ); -#endif - wListClear( (wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control ); - Dtrain.state = 0; - trk0 = NULL; - tempSegs_da.cnt = 0; - DYNARR_SET( trkSeg_t, tempSegs_da, 8 ); - /*MainRedraw();*/ - /*wDrawSaveImage( mainD.d );*/ - /*trainEnable = FALSE;*/ - RestartTrains(); - wButtonSetLabel( trainPauseB, (char*)goI ); - trainTime0 = 0; - AttachTrains(); - DrawAllCars(); - curTrainDlg->train = NULL; - curTrainDlg->speed = -1; - wDrawClear( (wDraw_p)curTrainDlg->trainPGp->paramPtr[I_SLIDER].control ); - LocoListInit(); - ControllerDialogSync( curTrainDlg ); - wShow( curTrainDlg->win ); - wControlShow( (wControl_p)newcarB, (toolbarSet&(1<item)/2.0; - Translate( &pos, xx->trvTrk.pos, xx->trvTrk.angle, dist ); - SetTrkEndPoint( currCar, 0, pos, xx->trvTrk.angle ); - Translate( &pos, xx->trvTrk.pos, xx->trvTrk.angle+180.0, dist ); - SetTrkEndPoint( currCar, 1, pos, NormalizeAngle(xx->trvTrk.angle+180.0) ); - /*xx->state |= (xx->item->options&CAR_DESC_BITS);*/ - ClrLocoMaster(xx); - if ( CarItemIsLoco(xx->item) ) { - SetLocoMaster(xx); - LocoListChangeEntry( NULL, currCar ); - if ( currCar == NULL ) { - LOG1( log_error, ( "Train: currCar became NULL 2\n" ) ) - return C_CONTINUE; - } - } -#ifdef LATER - wPrefSetString( "Car Road Name", xx->ITEM->title, newCarRoad ); - number = strtol( CarItemNumber(xx->item), &cp, 10 ); - if ( cp == NULL || *cp != 0 ) - number = -1; - wPrefSetInteger( "Car Number", xx->ITEM->title, number ); -#endif - if( (trk0 = OnTrack( &pos0, FALSE, TRUE ) ) ) { - xx->trvTrk.angle = GetAngleAtPoint( trk0, pos0, &ep0, &ep1 ); - if ( NormalizeAngle( FindAngle( pos, pos0 ) - xx->trvTrk.angle ) > 180.0 ) - xx->trvTrk.angle = NormalizeAngle( xx->trvTrk.angle + 180 ); - xx->status = ST_StopManual; - } else { - xx->trvTrk.angle = 90; - } - PlaceTrainInit( currCar, trk0, pos0, xx->trvTrk.angle, (MyGetKeyState()&WKEY_SHIFT) == 0 ); - /*DrawCars( &tempD, currCar, TRUE );*/ - } else { - currCar = FindCar( &pos ); - delta.x = pos.x - pos0.x; - delta.y = pos.y - pos0.y; - if ( logTable(log_trainMove).level >= 1 ) { - if ( currCar ) { - xx = GetTrkExtraData(currCar); - LogPrintf( "selected %s\n", CarItemNumber(xx->item) ); - for ( dir=0; dir<2; dir++ ) { - int dir1 = dir; - track_p car1 = currCar; - struct extraData * xx1 = GetTrkExtraData(car1); - LogPrintf( "dir=%d\n", dir1 ); - WALK_CARS_START( car1, xx1, dir1 ) - LogPrintf( " %s [%0.3f,%d]\n", CarItemNumber(xx1->item), xx1->trvTrk.angle, dir1 ); - WALK_CARS_END( car1, xx1, dir1 ) - } - } - } - } - if ( currCar == NULL ) - return C_CONTINUE; - trk0 = FindMasterLoco( currCar, NULL ); - if ( trk0 ) - SetCurTrain( trk0 ); - DrawAllCars(); - return C_CONTINUE; - - case C_MOVE: - if ( currCar == NULL ) - return C_CONTINUE; - pos.x += delta.x; - pos.y += delta.y; - pos0 = pos; - /*DrawCars( &tempD, currCar, FALSE );*/ - xx = GetTrkExtraData(currCar); - trk0 = OnTrack( &pos0, FALSE, TRUE ); - if ( /*currCarItemPtr != NULL &&*/ trk0 ) { - angle1 = GetAngleAtPoint( trk0, pos0, &ep0, &ep1 ); - if ( currCarItemPtr != NULL ) { - if ( NormalizeAngle( FindAngle( pos, pos0 ) - angle1 ) > 180.0 ) - angle1 = NormalizeAngle( angle1 + 180 ); - } else { - if ( NormalizeAngle( xx->trvTrk.angle - angle1 + 90.0 ) > 180.0 ) - angle1 = NormalizeAngle( angle1 + 180 ); - } - xx->trvTrk.angle = angle1; - } - tempSegs_da.cnt = 1; - PlaceTrainInit( currCar, trk0, pos0, xx->trvTrk.angle, (MyGetKeyState()&WKEY_SHIFT) == 0 ); - ControllerDialogSync( curTrainDlg ); - DrawAllCars(); - return C_CONTINUE; - - - case C_UP: - if ( currCar != NULL ) { - trk0 = FindMasterLoco( currCar, NULL ); - if ( trk0 ) { - xx = GetTrkExtraData( trk0 ); - if ( !IsOnTrack(xx) || xx->speed <= 0 ) - StopTrain( trk0, ST_StopManual ); - } - Dtrain.state = 1; - /*MainRedraw();*/ - ControllerDialogSync( curTrainDlg ); - } - DrawAllCars(); - InfoSubstituteControls( NULL, NULL ); - currCar = trk0 = NULL; - currCarItemPtr = NULL; - /*trainEnable = TRUE;*/ - if ( trainsState == TRAINS_PAUSE ) { - RestartTrains(); - } - return C_CONTINUE; - - case C_LCLICK: - if ( MyGetKeyState() & WKEY_SHIFT ) { - pos0 = pos; - programMode = MODE_DESIGN; - if ( (trk0=OnTrack(&pos,FALSE,TRUE)) && - QueryTrack( trk0, Q_CAN_NEXT_POSITION ) && - TrainOnMovableTrack( trk0, &trk1) ) { - if ( trk1 ) { - xx = GetTrkExtraData(trk1); - pos1 = xx->trvTrk.pos; - angle1 = xx->trvTrk.angle; - } else { - pos1 = pos0; - angle1 = 0; - } - AdvancePositionIndicator( trk0, pos0, &pos1, &angle1 ); - if ( trk1 ) { - xx->trvTrk.pos = pos1; - xx->trvTrk.angle = angle1; - PlaceTrain( trk1, FALSE, TRUE ); - DrawAllCars(); - } - } - programMode = MODE_TRAIN; - trk0 = NULL; + track_p trk0, trk1; + static track_p currCar; + coOrd pos0, pos1; + static coOrd delta; + ANGLE_T angle1; + EPINX_T ep0, ep1; + int dir; + struct extraData * xx=NULL; + wPos_t w, h; + + switch (action) { + case C_START: + /*UndoStart( "Trains", "Trains" );*/ + UndoSuspend(); + programMode = MODE_TRAIN; + drawCarEnable = FALSE; + doDrawTurnoutPosition = 1; + DoChangeNotification(CHANGE_PARAMS|CHANGE_TOOLBAR); + + if (CarAvailableCount() <= 0) { + if (NoticeMessage(MSG_NO_CARS, _("Yes"), _("No")) > 0) { + DoCarDlg(); + DoChangeNotification(CHANGE_PARAMS); + } + } + + EnableCommands(); + + if (curTrainDlg == NULL) { + curTrainDlg = CreateTrainControlDlg(); + } + + curTrainDlg->train = NULL; + wListClear((wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control); + Dtrain.state = 0; + trk0 = NULL; + tempSegs_da.cnt = 0; + DYNARR_SET(trkSeg_t, tempSegs_da, 8); + RestartTrains(); + wButtonSetLabel(trainPauseB, (char*)goI); + trainTime0 = 0; + AttachTrains(); + DrawAllCars(); + curTrainDlg->train = NULL; + curTrainDlg->speed = -1; + wDrawClear((wDraw_p)curTrainDlg->trainPGp->paramPtr[I_SLIDER].control); + LocoListInit(); + ControllerDialogSync(curTrainDlg); + wShow(curTrainDlg->win); + wControlShow((wControl_p)newcarB, (toolbarSet&(1<item)/2.0; + Translate(&pos, xx->trvTrk.pos, xx->trvTrk.angle, dist); + SetTrkEndPoint(currCar, 0, pos, xx->trvTrk.angle); + Translate(&pos, xx->trvTrk.pos, xx->trvTrk.angle+180.0, dist); + SetTrkEndPoint(currCar, 1, pos, NormalizeAngle(xx->trvTrk.angle+180.0)); + /*xx->state |= (xx->item->options&CAR_DESC_BITS);*/ + ClrLocoMaster(xx); + + if (CarItemIsLoco(xx->item)) { + SetLocoMaster(xx); + LocoListChangeEntry(NULL, currCar); + } + + if ((trk0 = OnTrack(&pos0, FALSE, TRUE))) { + xx->trvTrk.angle = GetAngleAtPoint(trk0, pos0, &ep0, &ep1); + + if (NormalizeAngle(FindAngle(pos, pos0) - xx->trvTrk.angle) > 180.0) { + xx->trvTrk.angle = NormalizeAngle(xx->trvTrk.angle + 180); + } + + xx->status = ST_StopManual; + } else { + xx->trvTrk.angle = 90; + } + + PlaceTrainInit(currCar, trk0, pos0, xx->trvTrk.angle, + (MyGetKeyState()&WKEY_SHIFT) == 0); + /*DrawCars( &tempD, currCar, TRUE );*/ + } else { + currCar = FindCar(&pos); + delta.x = pos.x - pos0.x; + delta.y = pos.y - pos0.y; + + if (logTable(log_trainMove).level >= 1) { + if (currCar) { + xx = GetTrkExtraData(currCar); + LogPrintf("selected %s\n", CarItemNumber(xx->item)); + + for (dir=0; dir<2; dir++) { + int dir1 = dir; + track_p car1 = currCar; + struct extraData * xx1 = GetTrkExtraData(car1); + LogPrintf("dir=%d\n", dir1); + WALK_CARS_START(car1, xx1, dir1) + LogPrintf(" %s [%0.3f,%d]\n", CarItemNumber(xx1->item), xx1->trvTrk.angle, + dir1); + WALK_CARS_END(car1, xx1, dir1) + } + } + } + } + + if (currCar == NULL) { + return C_CONTINUE; + } + + trk0 = FindMasterLoco(currCar, NULL); + + if (trk0) { + SetCurTrain(trk0); + } + + DrawAllCars(); + return C_CONTINUE; + + case C_MOVE: + if (currCar == NULL) { + return C_CONTINUE; + } + + pos.x += delta.x; + pos.y += delta.y; + pos0 = pos; + /*DrawCars( &tempD, currCar, FALSE );*/ + xx = GetTrkExtraData(currCar); + trk0 = OnTrack(&pos0, FALSE, TRUE); + + if (/*currCarItemPtr != NULL &&*/ trk0) { + angle1 = GetAngleAtPoint(trk0, pos0, &ep0, &ep1); + + if (currCarItemPtr != NULL) { + if (NormalizeAngle(FindAngle(pos, pos0) - angle1) > 180.0) { + angle1 = NormalizeAngle(angle1 + 180); + } + } else { + if (NormalizeAngle(xx->trvTrk.angle - angle1 + 90.0) > 180.0) { + angle1 = NormalizeAngle(angle1 + 180); + } + } + + xx->trvTrk.angle = angle1; + } + + tempSegs_da.cnt = 1; + PlaceTrainInit(currCar, trk0, pos0, xx->trvTrk.angle, + (MyGetKeyState()&WKEY_SHIFT) == 0); + ControllerDialogSync(curTrainDlg); + DrawAllCars(); + return C_CONTINUE; + + case C_UP: + if (currCar != NULL) { + trk0 = FindMasterLoco(currCar, NULL); + + if (trk0) { + xx = GetTrkExtraData(trk0); + + if (!IsOnTrack(xx) || xx->speed <= 0) { + StopTrain(trk0, ST_StopManual); + } + } + + Dtrain.state = 1; + /*MainRedraw();*/ + ControllerDialogSync(curTrainDlg); + } + + DrawAllCars(); + InfoSubstituteControls(NULL, NULL); + currCar = trk0 = NULL; + currCarItemPtr = NULL; + + /*trainEnable = TRUE;*/ + if (trainsState == TRAINS_PAUSE) { + RestartTrains(); + } + + return C_CONTINUE; + + case C_LCLICK: + if (MyGetKeyState() & WKEY_SHIFT) { + pos0 = pos; + programMode = MODE_DESIGN; + + if ((trk0=OnTrack(&pos,FALSE,TRUE)) && + QueryTrack(trk0, Q_CAN_NEXT_POSITION) && + TrainOnMovableTrack(trk0, &trk1)) { + if (trk1) { + xx = GetTrkExtraData(trk1); + pos1 = xx->trvTrk.pos; + angle1 = xx->trvTrk.angle; + } else { + pos1 = pos0; + angle1 = 0; + } + + AdvancePositionIndicator(trk0, pos0, &pos1, &angle1); + + if (trk1) { + xx->trvTrk.pos = pos1; + xx->trvTrk.angle = angle1; + PlaceTrain(trk1, FALSE, TRUE); + DrawAllCars(); + } + } + + programMode = MODE_TRAIN; + trk0 = NULL; MainRedraw(); //Make sure track is redrawn after switch thrown - } else { - trk0 = FindCar( &pos ); - if ( trk0 == NULL ) - return C_CONTINUE; - trk0 = FindMasterLoco( trk0, NULL ); - if ( trk0 == NULL ) - return C_CONTINUE; - SetCurTrain( trk0 ); - } - return C_CONTINUE; - - case C_RCLICK: - trainFuncPos = pos; - trainFuncCar = FindCar( &pos ); - if ( trainFuncCar == NULL || - GetTrkType(trainFuncCar) != T_CAR ) - return C_CONTINUE; - xx = GetTrkExtraData( trainFuncCar ); - trk0 = FindMasterLoco(trainFuncCar,NULL); - dir = IsAligned( xx->trvTrk.angle, FindAngle(xx->trvTrk.pos,trainFuncPos) ) ? 0 : 1; - wMenuPushEnable( trainPopupMI[DO_UNCOUPLE], GetTrkEndTrk( trainFuncCar, dir )!=NULL ); - wMenuPushEnable( trainPopupMI[DO_MUMASTER], CarItemIsLoco(xx->item) && !IsLocoMaster(xx) ); - if ( trk0 ) xx = GetTrkExtraData(trk0); - wMenuPushEnable( trainPopupMI[DO_CHANGEDIR], trk0!=NULL ); - wMenuPushEnable( trainPopupMI[DO_STOP], trk0!=NULL && xx->speed>0 ); - /*trainEnable = FALSE;*/ -#ifdef LATER - if ( trainsState == TRAINS_RUN ) - trainsState = TRAINS_PAUSE; -#endif - trk0 = FindMasterLoco( trainFuncCar, NULL ); - if ( trk0 ) - SetCurTrain( trk0 ); - if ( !inPlayback ) - wMenuPopupShow( trainPopupM ); - return C_CONTINUE; - - case C_REDRAW: -#ifdef LATER - if (Dtrain.state == 1 && !suppressTrainRedraw) { - mainD.funcs->options = wDrawOptTemp; - mainD.funcs->options = 0; - } -#endif - wDrawSaveImage(mainD.d); - DrawAllCars(); - wWinGetSize( mainW, &w, &h ); - w -= wControlGetPosX( newCarControls[0] ) + 4; - if ( w > 20 ) - wListSetSize( (wList_p)newCarControls[0], w, wControlGetHeight( newCarControls[0] ) ); - return C_CONTINUE; - - case C_CANCEL: - /*trainEnable = FALSE;*/ - trainsState = TRAINS_STOP; - TrainTimeEndPause(); - LOG( log_trainMove, 1, ( "Train Cancel\n" ) ) - Dtrain.state = 0; - doDrawTurnoutPosition = 0; - drawCarEnable = TRUE; - programMode = MODE_DESIGN; - UpdateTrainAttachment(); - UndoResume(); - DoChangeNotification( CHANGE_PARAMS|CHANGE_TOOLBAR ); - if ( curTrainDlg->win ) - wHide( curTrainDlg->win ); - MainRedraw(); - curTrainDlg->train = NULL; - return C_CONTINUE; - - - case C_CONFIRM: - /*trainEnable = FALSE;*/ - if ( trainsState != TRAINS_STOP ) { - trainsState = TRAINS_STOP; - wButtonSetLabel( trainPauseB, (char*)stopI ); - TrainTimeEndPause(); - } - currCar = NULL; - currCarItemPtr = NULL; - HotBarCancel(); - InfoSubstituteControls( NULL, NULL ); - return C_TERMINATE; - - } - - return C_CONTINUE; - + MapRedraw(); + } else { + trk0 = FindCar(&pos); + + if (trk0 == NULL) { + return C_CONTINUE; + } + + trk0 = FindMasterLoco(trk0, NULL); + + if (trk0 == NULL) { + return C_CONTINUE; + } + + SetCurTrain(trk0); + } + + return C_CONTINUE; + + case C_RCLICK: + trainFuncPos = pos; + trainFuncCar = FindCar(&pos); + + if (trainFuncCar == NULL || + GetTrkType(trainFuncCar) != T_CAR) { + return C_CONTINUE; + } + + xx = GetTrkExtraData(trainFuncCar); + trk0 = FindMasterLoco(trainFuncCar,NULL); + dir = IsAligned(xx->trvTrk.angle, FindAngle(xx->trvTrk.pos, + trainFuncPos)) ? 0 : 1; + wMenuPushEnable(trainPopupMI[DO_UNCOUPLE], GetTrkEndTrk(trainFuncCar, + dir)!=NULL); + wMenuPushEnable(trainPopupMI[DO_MUMASTER], CarItemIsLoco(xx->item) && + !IsLocoMaster(xx)); + + if (trk0) { + xx = GetTrkExtraData(trk0); + } + + wMenuPushEnable(trainPopupMI[DO_CHANGEDIR], trk0!=NULL); + wMenuPushEnable(trainPopupMI[DO_STOP], trk0!=NULL && xx->speed>0); + /*trainEnable = FALSE;*/ + trk0 = FindMasterLoco(trainFuncCar, NULL); + + if (trk0) { + SetCurTrain(trk0); + } + + if (!inPlayback) { + wMenuPopupShow(trainPopupM); + } + + return C_CONTINUE; + + case C_REDRAW: + wDrawSaveImage(mainD.d); + DrawAllCars(); + wWinGetSize(mainW, &w, &h); + w -= wControlGetPosX(newCarControls[0]) + 4; + + if (w > 20) { + wListSetSize((wList_p)newCarControls[0], w, + wControlGetHeight(newCarControls[0])); + } + + return C_CONTINUE; + + case C_CANCEL: + /*trainEnable = FALSE;*/ + trainsState = TRAINS_STOP; + TrainTimeEndPause(); + LOG(log_trainMove, 1, ("Train Cancel\n")) + Dtrain.state = 0; + doDrawTurnoutPosition = 0; + drawCarEnable = TRUE; + programMode = MODE_DESIGN; + UpdateTrainAttachment(); + UndoResume(); + DoChangeNotification(CHANGE_PARAMS|CHANGE_TOOLBAR); + + if (curTrainDlg->win) { + wHide(curTrainDlg->win); + } + + MainRedraw(); + MapRedraw(); + curTrainDlg->train = NULL; + return C_CONTINUE; + + case C_CONFIRM: + + /*trainEnable = FALSE;*/ + if (trainsState != TRAINS_STOP) { + trainsState = TRAINS_STOP; + wButtonSetLabel(trainPauseB, (char*)stopI); + TrainTimeEndPause(); + } + + currCar = NULL; + currCarItemPtr = NULL; + HotBarCancel(); + InfoSubstituteControls(NULL, NULL); + return C_TERMINATE; + } + + return C_CONTINUE; } @@ -2347,11 +2763,11 @@ static STATUS_T CmdTrain( wAction_t action, coOrd pos ) * */ -EXPORT STATUS_T CmdCarDescAction( - wAction_t action, - coOrd pos ) +STATUS_T CmdCarDescAction( + wAction_t action, + coOrd pos) { - return CmdTrain( action, pos ); + return CmdTrain(action, pos); } #include "bitmaps/train.xpm" @@ -2362,225 +2778,269 @@ EXPORT STATUS_T CmdCarDescAction( #include "bitmaps/ballred.xpm" -static void CmdTrainStopGo( void * junk ) +static void CmdTrainStopGo(void * junk) { - wIcon_p icon; - if ( trainsState == TRAINS_STOP ) { - icon = goI; - RestartTrains(); - } else { - trainsState = TRAINS_STOP; - icon = stopI; - TrainTimeEndPause(); - } - ControllerDialogSync( curTrainDlg ); - wButtonSetLabel( trainPauseB, (char*)icon ); - if ( recordF ) - fprintf( recordF, "TRAINSTOPGO %s\n", trainsState==TRAINS_STOP?"STOP":"GO" ); + wIcon_p icon; + + if (trainsState == TRAINS_STOP) { + icon = goI; + RestartTrains(); + } else { + trainsState = TRAINS_STOP; + icon = stopI; + TrainTimeEndPause(); + } + + ControllerDialogSync(curTrainDlg); + wButtonSetLabel(trainPauseB, (char*)icon); + + if (recordF) { + fprintf(recordF, "TRAINSTOPGO %s\n", trainsState==TRAINS_STOP?"STOP":"GO"); + } } -static BOOL_T TrainStopGoPlayback( char * line ) +static BOOL_T TrainStopGoPlayback(char * line) { - while (*line && isspace((unsigned char)*line) ) line++; - if ( (strcasecmp( line, "STOP" ) == 0) != (trainsState == TRAINS_STOP) ) - CmdTrainStopGo(NULL); - return TRUE; + while (*line && isspace((unsigned char)*line)) { + line++; + } + + if ((strcasecmp(line, "STOP") == 0) != (trainsState == TRAINS_STOP)) { + CmdTrainStopGo(NULL); + } + + return TRUE; } -static void CmdTrainExit( void * junk ) +static void CmdTrainExit(void * junk) { - Reset(); - InfoSubstituteControls( NULL, NULL ); - MainRedraw(); + Reset(); + InfoSubstituteControls(NULL, NULL); + MainRedraw(); + MapRedraw(); } static void TrainFunc( - void * action ) + void * action) { - struct extraData * xx, *xx1; - ANGLE_T angle; - int dir; - track_p loco; - track_p temp0, temp1; - coOrd pos0, pos1; - ANGLE_T angle0, angle1; - EPINX_T ep0=-1, ep1=-1; - - if ( trainFuncCar == NULL ) { - fprintf( stderr, "trainFunc: trainFuncCar==NULL\n" ); - return; - } + struct extraData * xx, *xx1; + ANGLE_T angle; + int dir; + track_p loco; + track_p temp0, temp1; + coOrd pos0, pos1; + ANGLE_T angle0, angle1; + EPINX_T ep0=-1, ep1=-1; + + if (trainFuncCar == NULL) { + fprintf(stderr, "trainFunc: trainFuncCar==NULL\n"); + return; + } + + xx = GetTrkExtraData(trainFuncCar); + angle = FindAngle(xx->trvTrk.pos, trainFuncPos); + angle = NormalizeAngle(angle-xx->trvTrk.angle); + dir = (angle>90&&angle<270); + + switch ((int)(long)action) { + case DO_UNCOUPLE: + if (GetTrkEndTrk(trainFuncCar,dir)) { + UncoupleCars(trainFuncCar, GetTrkEndTrk(trainFuncCar,dir)); + } + + break; + + case DO_FLIPCAR: + temp0 = GetTrkEndTrk(trainFuncCar,0); + pos0 = GetTrkEndPos(trainFuncCar,0); + angle0 = GetTrkEndAngle(trainFuncCar,0); + temp1 = GetTrkEndTrk(trainFuncCar,1); + pos1 = GetTrkEndPos(trainFuncCar,1); + angle1 = GetTrkEndAngle(trainFuncCar,1); + + if (temp0) { + ep0 = GetEndPtConnectedToMe(temp0,trainFuncCar); + trainFuncCar->endPt[0].track = NULL; + temp0->endPt[ep0].track = NULL; + } + + if (temp1) { + ep1 = GetEndPtConnectedToMe(temp1,trainFuncCar); + trainFuncCar->endPt[1].track = NULL; + temp1->endPt[ep1].track = NULL; + } + + xx->direction = !xx->direction; + FlipTraverseTrack(&xx->trvTrk); + SetTrkEndPoint(trainFuncCar, 0, pos1, angle1); + SetTrkEndPoint(trainFuncCar, 1, pos0, angle0); + + if (temp0) { + trainFuncCar->endPt[1].track = temp0; + temp0->endPt[ep0].track = trainFuncCar; + } + + if (temp1) { + trainFuncCar->endPt[0].track = temp1; + temp1->endPt[ep1].track = trainFuncCar; + } + + ControllerDialogSync(curTrainDlg); + PlaceCar(trainFuncCar); + break; + + case DO_FLIPTRAIN: + FlipTrain(trainFuncCar); + /*PlaceTrain( trainFuncCar, xx->trk, xx->trvTrk.pos, xx->trvTrk.angle );*/ + break; + + case DO_DELCAR: + for (dir=0; dir<2; dir++) + if (GetTrkEndTrk(trainFuncCar,dir)) { + UncoupleCars(trainFuncCar, GetTrkEndTrk(trainFuncCar,dir)); + } + + if (CarItemIsLoco(xx->item)) { + LocoListChangeEntry(trainFuncCar, NULL); + } + + trainFuncCar->deleted = TRUE; + /*DeleteTrack( trainFuncCar, FALSE );*/ + CarItemUpdate(xx->item); + HotBarCancel(); + InfoSubstituteControls(NULL, NULL); + break; + + case DO_DELTRAIN: + dir = 0; + loco = FindMasterLoco(trainFuncCar, NULL); + WALK_CARS_START(trainFuncCar, xx, dir) + WALK_CARS_END(trainFuncCar, xx, dir) + dir = 1-dir; + temp0 = NULL; + WALK_CARS_START(trainFuncCar, xx, dir) + + if (temp0) { + xx1 = GetTrkExtraData(temp0); + temp0->deleted = TRUE; + /*DeleteTrack( temp0, FALSE );*/ + CarItemUpdate(xx1->item); + } + + temp0 = trainFuncCar; + WALK_CARS_END(trainFuncCar, xx, dir) + + if (temp0) { + xx1 = GetTrkExtraData(temp0); + temp0->deleted = TRUE; + /*DeleteTrack( temp0, FALSE );*/ + CarItemUpdate(xx1->item); + } + + if (loco) { + LocoListChangeEntry(loco, NULL); + } + + HotBarCancel(); + InfoSubstituteControls(NULL, NULL); + break; + + case DO_MUMASTER: + if (CarItemIsLoco(xx->item)) { + loco = FindMasterLoco(trainFuncCar, NULL); + + if (loco != trainFuncCar) { + SetLocoMaster(xx); + LOG(log_trainMove, 1, ("%s gets master\n", CarItemNumber(xx->item))) + + if (loco) { + xx1 = GetTrkExtraData(loco); + ClrLocoMaster(xx1); + LOG(log_trainMove, 1, ("%s looses master\n", CarItemNumber(xx1->item))) + xx->speed = xx1->speed; + xx1->speed = 0; + } + + LocoListChangeEntry(loco, trainFuncCar); + } + } + + break; + + case DO_CHANGEDIR: + loco = FindMasterLoco(trainFuncCar, NULL); + + if (loco) { + xx = GetTrkExtraData(loco); + xx->direction = !xx->direction; + SetTrainDirection(loco); + ControllerDialogSync(curTrainDlg); + } + + break; + + case DO_STOP: + loco = FindMasterLoco(trainFuncCar, NULL); + + if (loco) { + StopTrain(loco, ST_StopManual); + ControllerDialogSync(curTrainDlg); + } + + break; + } - xx = GetTrkExtraData(trainFuncCar); - angle = FindAngle( xx->trvTrk.pos, trainFuncPos ); - angle = NormalizeAngle( angle-xx->trvTrk.angle ); - dir = (angle>90&&angle<270); - - switch ((int)(long)action) { - case DO_UNCOUPLE: - if ( GetTrkEndTrk(trainFuncCar,dir) ) - UncoupleCars( trainFuncCar, GetTrkEndTrk(trainFuncCar,dir) ); - break; - case DO_FLIPCAR: - temp0 = GetTrkEndTrk(trainFuncCar,0); - pos0 = GetTrkEndPos(trainFuncCar,0); - angle0 = GetTrkEndAngle(trainFuncCar,0); - temp1 = GetTrkEndTrk(trainFuncCar,1); - pos1 = GetTrkEndPos(trainFuncCar,1); - angle1 = GetTrkEndAngle(trainFuncCar,1); - if ( temp0 ) { - ep0 = GetEndPtConnectedToMe(temp0,trainFuncCar); - trainFuncCar->endPt[0].track = NULL; - temp0->endPt[ep0].track = NULL; - } - if ( temp1 ) { - ep1 = GetEndPtConnectedToMe(temp1,trainFuncCar); - trainFuncCar->endPt[1].track = NULL; - temp1->endPt[ep1].track = NULL; - } - xx->direction = !xx->direction; - FlipTraverseTrack( &xx->trvTrk ); - SetTrkEndPoint( trainFuncCar, 0, pos1, angle1 ); - SetTrkEndPoint( trainFuncCar, 1, pos0, angle0 ); - if ( temp0 ) { - trainFuncCar->endPt[1].track = temp0; - temp0->endPt[ep0].track = trainFuncCar; - } - if ( temp1 ) { - trainFuncCar->endPt[0].track = temp1; - temp1->endPt[ep1].track = trainFuncCar; - } - ControllerDialogSync( curTrainDlg ); - PlaceCar( trainFuncCar ); - break; - case DO_FLIPTRAIN: - FlipTrain( trainFuncCar ); - /*PlaceTrain( trainFuncCar, xx->trk, xx->trvTrk.pos, xx->trvTrk.angle );*/ - break; - case DO_DELCAR: - for ( dir=0; dir<2; dir++ ) - if ( GetTrkEndTrk(trainFuncCar,dir) ) - UncoupleCars( trainFuncCar, GetTrkEndTrk(trainFuncCar,dir) ); - if ( CarItemIsLoco(xx->item) ) - LocoListChangeEntry( trainFuncCar, NULL ); - trainFuncCar->deleted = TRUE; - /*DeleteTrack( trainFuncCar, FALSE );*/ - CarItemUpdate( xx->item ); - HotBarCancel(); - InfoSubstituteControls( NULL, NULL ); - break; - case DO_DELTRAIN: - dir = 0; - loco = FindMasterLoco( trainFuncCar, NULL ); - WALK_CARS_START( trainFuncCar, xx, dir ) - WALK_CARS_END( trainFuncCar, xx, dir ) - dir = 1-dir; - temp0 = NULL; - WALK_CARS_START( trainFuncCar, xx, dir ) - if ( temp0 ) { - xx1 = GetTrkExtraData(temp0); - temp0->deleted = TRUE; - /*DeleteTrack( temp0, FALSE );*/ - CarItemUpdate( xx1->item ); - } - temp0 = trainFuncCar; - WALK_CARS_END( trainFuncCar, xx, dir ) - if ( temp0 ) { - xx1 = GetTrkExtraData(temp0); - temp0->deleted = TRUE; - /*DeleteTrack( temp0, FALSE );*/ - CarItemUpdate( xx1->item ); - } - if ( loco ) - LocoListChangeEntry( loco, NULL ); - HotBarCancel(); - InfoSubstituteControls( NULL, NULL ); - break; - case DO_MUMASTER: - if ( CarItemIsLoco(xx->item) ) { - loco = FindMasterLoco( trainFuncCar, NULL ); - if ( loco != trainFuncCar ) { - SetLocoMaster(xx); - LOG( log_trainMove, 1, ( "%s gets master\n", CarItemNumber(xx->item) ) ) - if ( loco ) { - xx1 = GetTrkExtraData( loco ); - ClrLocoMaster(xx1); - LOG( log_trainMove, 1, ( "%s looses master\n", CarItemNumber(xx1->item) ) ) - xx->speed = xx1->speed; - xx1->speed = 0; - } - LocoListChangeEntry( loco, trainFuncCar ); - } - } - break; - case DO_CHANGEDIR: - loco = FindMasterLoco( trainFuncCar, NULL ); - if ( loco ) { - xx = GetTrkExtraData(loco); - xx->direction = !xx->direction; - SetTrainDirection(loco); - ControllerDialogSync( curTrainDlg ); - } - break; - case DO_STOP: - loco = FindMasterLoco( trainFuncCar, NULL ); - if ( loco ) { - StopTrain( loco, ST_StopManual ); - ControllerDialogSync( curTrainDlg ); - } - break; - } MainRedraw(); //Redraw if Train altered + MapRedraw(); - if ( trainsState == TRAINS_PAUSE ) { - RestartTrains(); - } else { - DrawAllCars(); - } + if (trainsState == TRAINS_PAUSE) { + RestartTrains(); + } else { + DrawAllCars(); + } } -EXPORT void InitCmdTrain( wMenu_p menu ) +void InitCmdTrain(wMenu_p menu) { - log_trainMove = LogFindIndex( "trainMove" ); - log_trainPlayback = LogFindIndex( "trainPlayback" ); - trainPLs[I_ZERO].winLabel = (char*)wIconCreatePixMap(zero_xpm); - ParamRegister( &trainPG ); - AddMenuButton( menu, CmdTrain, "cmdTrain", _("Train"), wIconCreatePixMap(train_xpm), LEVEL0_50, IC_POPUP2|IC_LCLICK|IC_RCLICK, 0, NULL ); - stopI = wIconCreatePixMap( ballred ); - goI = wIconCreatePixMap( ballgreen ); - trainPauseB = AddToolbarButton( "cmdTrainPause", stopI, IC_MODETRAIN_ONLY, CmdTrainStopGo, NULL ); - AddToolbarButton( "cmdTrainExit", wIconCreatePixMap(exit_xpm), IC_MODETRAIN_ONLY, CmdTrainExit, NULL ); - newcarB = AddToolbarButton( "cmdTrainNewCar", wIconCreatePixMap(newcar_xpm), IC_MODETRAIN_ONLY, CarItemLoadList, NULL ); - - T_CAR = InitObject( &carCmds ); - -#ifdef LATER - trainPGp = ParamCreateGroup( "trainW", "train", 0, trainPLs, sizeof trainPLs/sizeof trainPLs[0], NULL, 0, _("Ok"), trainOk, wHide ); - ParamRegister( trainPGp ); -#endif - - trainPopupM = MenuRegister( "Train Commands" ); - trainPopupMI[DO_UNCOUPLE] = wMenuPushCreate( trainPopupM, "", _("Uncouple"), 0, TrainFunc, (void*)DO_UNCOUPLE ); - trainPopupMI[DO_FLIPCAR] = wMenuPushCreate( trainPopupM, "", _("Flip Car"), 0, TrainFunc, (void*)DO_FLIPCAR ); - trainPopupMI[DO_FLIPTRAIN] = wMenuPushCreate( trainPopupM, "", _("Flip Train"), 0, TrainFunc, (void*)DO_FLIPTRAIN ); - trainPopupMI[DO_MUMASTER] = wMenuPushCreate( trainPopupM, "", _("MU Master"), 0, TrainFunc, (void*)DO_MUMASTER ); - trainPopupMI[DO_CHANGEDIR] = wMenuPushCreate( trainPopupM, "", _("Change Direction"), 0, TrainFunc, (void*)DO_CHANGEDIR ); - trainPopupMI[DO_STOP] = wMenuPushCreate( trainPopupM, "", _("Stop"), 0, TrainFunc, (void*)DO_STOP ); - wMenuSeparatorCreate( trainPopupM ); - trainPopupMI[DO_DELCAR] = wMenuPushCreate( trainPopupM, "", _("Remove Car"), 0, TrainFunc, (void*)DO_DELCAR ); - trainPopupMI[DO_DELTRAIN] = wMenuPushCreate( trainPopupM, "", _("Remove Train"), 0, TrainFunc, (void*)DO_DELTRAIN ); - -#ifdef LATER - ParamRegister( &newCarPG ); - ParamCreateControls( &newCarPG, NULL ); - newCarControls[0] = newCarPLs[0].control; - newCarControls[1] = newCarPLs[1].control; -#endif - AddPlaybackProc( "TRAINSTOPGO", (playbackProc_p)TrainStopGoPlayback, NULL ); - AddPlaybackProc( "TRAINPAUSE", (playbackProc_p)TrainTimeDoPause, NULL ); - AddPlaybackProc( "TRAINMOVIE", (playbackProc_p)TrainDoMovie, NULL ); + log_trainMove = LogFindIndex("trainMove"); + log_trainPlayback = LogFindIndex("trainPlayback"); + trainPLs[I_ZERO].winLabel = (char*)wIconCreatePixMap(zero_xpm); + ParamRegister(&trainPG); + AddMenuButton(menu, CmdTrain, "cmdTrain", _("Train"), + wIconCreatePixMap(train_xpm), LEVEL0_50, IC_POPUP2|IC_LCLICK|IC_RCLICK, 0, + NULL); + stopI = wIconCreatePixMap(ballred); + goI = wIconCreatePixMap(ballgreen); + trainPauseB = AddToolbarButton("cmdTrainPause", stopI, IC_MODETRAIN_ONLY, + CmdTrainStopGo, NULL); + AddToolbarButton("cmdTrainExit", wIconCreatePixMap(exit_xpm), IC_MODETRAIN_ONLY, + CmdTrainExit, NULL); + newcarB = AddToolbarButton("cmdTrainNewCar", wIconCreatePixMap(newcar_xpm), + IC_MODETRAIN_ONLY, CarItemLoadList, NULL); + T_CAR = InitObject(&carCmds); + trainPopupM = MenuRegister("Train Commands"); + trainPopupMI[DO_UNCOUPLE] = wMenuPushCreate(trainPopupM, "", _("Uncouple"), 0, + TrainFunc, (void*)DO_UNCOUPLE); + trainPopupMI[DO_FLIPCAR] = wMenuPushCreate(trainPopupM, "", _("Flip Car"), 0, + TrainFunc, (void*)DO_FLIPCAR); + trainPopupMI[DO_FLIPTRAIN] = wMenuPushCreate(trainPopupM, "", _("Flip Train"), + 0, TrainFunc, (void*)DO_FLIPTRAIN); + trainPopupMI[DO_MUMASTER] = wMenuPushCreate(trainPopupM, "", _("MU Master"), + 0, TrainFunc, (void*)DO_MUMASTER); + trainPopupMI[DO_CHANGEDIR] = wMenuPushCreate(trainPopupM, "", + _("Change Direction"), 0, TrainFunc, (void*)DO_CHANGEDIR); + trainPopupMI[DO_STOP] = wMenuPushCreate(trainPopupM, "", _("Stop"), 0, + TrainFunc, (void*)DO_STOP); + wMenuSeparatorCreate(trainPopupM); + trainPopupMI[DO_DELCAR] = wMenuPushCreate(trainPopupM, "", _("Remove Car"), + 0, TrainFunc, (void*)DO_DELCAR); + trainPopupMI[DO_DELTRAIN] = wMenuPushCreate(trainPopupM, "", + _("Remove Train"), 0, TrainFunc, (void*)DO_DELTRAIN); + AddPlaybackProc("TRAINSTOPGO", (playbackProc_p)TrainStopGoPlayback, NULL); + AddPlaybackProc("TRAINPAUSE", (playbackProc_p)TrainTimeDoPause, NULL); + AddPlaybackProc("TRAINMOVIE", (playbackProc_p)TrainDoMovie, NULL); } diff --git a/app/bin/ctrain.h b/app/bin/ctrain.h index 10f836f..daa083c 100644 --- a/app/bin/ctrain.h +++ b/app/bin/ctrain.h @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/ctrain.h,v 1.1 2005-12-07 15:46:59 rc-flyer Exp $ +/** \file ctrain.h + * Definitions and prototypes for train operations */ /* XTrkCad - Model Railroad CAD @@ -20,6 +20,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef HAVE_CTRAIN_H +#define HAVE_CTRAIN_H + +#include "common.h" +#include "track.h" struct carItem_t; typedef struct carItem_t carItem_t; @@ -53,3 +58,4 @@ int CarAvailableCount( void ); BOOL_T TraverseTrack2( traverseTrack_p, DIST_T ); void FlipTraverseTrack( traverseTrack_p ); +#endif // !HAVE_CTRAIN_H \ No newline at end of file diff --git a/app/bin/cturnout.c b/app/bin/cturnout.c index 55b7a4d..c3125ad 100644 --- a/app/bin/cturnout.c +++ b/app/bin/cturnout.c @@ -1,8 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cturnout.c,v 1.8 2009-08-16 13:07:14 m_fischer Exp $ - * +/** \file cturnout.c * T_TURNOUT - * */ /* XTrkCad - Model Railroad CAD @@ -24,14 +21,24 @@ */ #include -#include "track.h" +#include +#include +#include + #include "ccurve.h" -#include "cstraigh.h" -#include "compound.h" +#include "tbezier.h" #include "cjoin.h" +#include "compound.h" +#include "cstraigh.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" - -#include +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" EXPORT TRKTYP_T T_TURNOUT = -1; @@ -120,6 +127,8 @@ EXPORT turnoutInfo_t * CreateNewTurnout( } to->segCnt = segCnt; to->segs = (trkSeg_p)memdup( segData, (sizeof *segData) * segCnt ); + FixUpBezierSegs(to->segs,to->segCnt); + GetSegBounds( zero, 0.0, segCnt, to->segs, &to->orig, &to->size ); to->endCnt = endPtCnt; to->endPt = (trkEndPt_t*)memdup( endPts, (sizeof *endPts) * to->endCnt ); @@ -154,7 +163,7 @@ EXPORT wIndex_t CheckPaths( PATHPTR_T paths ) { int pc, ps; - PATHPTR_T pp; + PATHPTR_T pp = 0; int inx, inx1; static dynArr_t segMap_da; int segInx[2], segEp[2]; @@ -663,7 +672,7 @@ static ANGLE_T GetAngleTurnout( pos.x -= xx->orig.x; pos.y -= xx->orig.y; Rotate( &pos, zero, -xx->angle ); - angle = GetAngleSegs( segCnt, xx->segs, pos, &segInx ); + angle = GetAngleSegs( segCnt, xx->segs, &pos, &segInx, NULL, NULL, NULL, NULL ); return NormalizeAngle( angle+xx->angle ); } @@ -1202,7 +1211,6 @@ static BOOL_T TraverseTurnout( coOrd pos0, pos1, pos2; DIST_T d, dist; PATHPTR_T path, pathCurr; - BOOL_T backwards=FALSE; trkSeg_p segPtr; EPINX_T ep, epCnt, ep2; int segInx; @@ -1222,10 +1230,6 @@ LOG( log_traverseTurnout, 1, ( "TraverseTurnout( T%d, [%0.3f %0.3f] [%0.3f %0.3f continue; GetSegInxEP( path[0], &segInx, &segEP ); segPtr = xx->segs+segInx; -#ifdef LATER - for ( inx = 0; inxsegCnt; inx++ ) { - segPtr = xx->segs+inx; -#endif segProcData.distance.pos1 = pos0; SegProc( SEGPROC_DISTANCE, segPtr, &segProcData ); if ( segProcData.distance.dd < d ) { @@ -1241,46 +1245,63 @@ LOG( log_traverseTurnout, 1, ( "TraverseTurnout( T%d, [%0.3f %0.3f] [%0.3f %0.3f LOG( log_traverseTurnout, 1, ( " PC=%d ", pathCurr[0] ) ) GetSegInxEP( pathCurr[0], &segInx, &segEP ); segPtr = xx->segs+segInx; -#ifdef LATER - for ( pathCurr = xx->pathCurr+strlen((char*)xx->pathCurr)+1; pathCurr[0] || pathCurr[1]; pathCurr++ ) { - if ( pathCurr[0] == 0 ) - continue; - if ( Abs(pathCurr[0])-1 == currInx ) - break; - } - if ( pathCurr[0] == 0 ) { - fprintf( stderr, "Open turnout [%d]\n", currInx ); - return FALSE; - } - segPtr = xx->segs+currInx; -#endif segProcData.traverse1.pos = pos2; - segProcData.traverse1.angle = xx->angle-trvTrk->angle; + segProcData.traverse1.angle = -xx->angle+trvTrk->angle; SegProc( SEGPROC_TRAVERSE1, segPtr, &segProcData ); dist += segProcData.traverse1.dist; - backwards = segProcData.traverse1.backwards; - if ( segEP ) backwards = !backwards; -LOG( log_traverseTurnout, 2, ( " B%d D%0.3f\n", backwards, dist ) ) - + //Get ready for Traverse2 - copy all Traverse1 first + BOOL_T backwards = segProcData.traverse1.backwards; + BOOL_T segs_backwards = segProcData.traverse1.segs_backwards; + BOOL_T neg = segProcData.traverse1.negative; + int BezSegInx = segProcData.traverse1.BezSegInx; + + // Backwards means universally we going towards EP=0 on this segment. + // But the overall direction we are going can have two types of reversal, + // a curve that is flipped is negative (the end points are reversed) which Traverse1 handles, + // and a path can also be reversed (negative path number) and will have segEP = 1 + BOOL_T turnout_backwards = backwards; + if (segEP) turnout_backwards = !turnout_backwards; //direction modified if path reversed + +LOG( log_traverseTurnout, 2, ( " SI%d TB%d SP%d B%d SB%d N%d BSI%d D%0.3f\n", segInx, turnout_backwards, segEP, backwards, segs_backwards, neg, BezSegInx, dist ) ) while ( *pathCurr ) { + //Set up Traverse2 GetSegInxEP( pathCurr[0], &segInx, &segEP ); segPtr = xx->segs+segInx; - segProcData.traverse2.segDir = (backwards?1-segEP:segEP); + segProcData.traverse2.segDir = backwards; segProcData.traverse2.dist = dist; + segProcData.traverse2.BezSegInx = BezSegInx; + segProcData.traverse2.segs_backwards = segs_backwards; SegProc( SEGPROC_TRAVERSE2, segPtr, &segProcData ); if ( segProcData.traverse2.dist <= 0 ) { *distR = 0; REORIGIN( trvTrk->pos, segProcData.traverse2.pos, xx->angle, xx->orig ); trvTrk->angle = NormalizeAngle( xx->angle+segProcData.traverse2.angle ); +LOG( log_traverseTurnout, 2, ( " -> [%0.3f %0.3f] A%0.3f D%0.3f\n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR )) return TRUE; } - dist = segProcData.traverse2.dist; - pathCurr += (backwards?-1:1); -LOG( log_traverseTurnout, 1, ( " D%0.3f\n", dist ) ) - } - - pathCurr += (backwards?1:-1); - pos1 = MapPathPos( xx, pathCurr[0], (backwards?0:1) ); + dist = segProcData.traverse2.dist; //Remainder after segment + pathCurr += (turnout_backwards?-1:1); //Use master direction for turnout + //Redrive Traverse 1 for each segment for Bezier - to pick up backwards elements + if (pathCurr[0] == '\0') continue; // + //Set up Traverse1 - copy all of Traverse2 values first + GetSegInxEP( pathCurr[0], &segInx, &segEP ); + segPtr = xx->segs+segInx; + ANGLE_T angle = segProcData.traverse2.angle; + coOrd pos = segProcData.traverse2.pos; +LOG( log_traverseTurnout, 1, ( " Loop2-1 SI%d SP%d [%0.3f %0.3f] A%0.3f D%0.3f\n", segInx, segEP, pos.x, pos.y, angle, dist ) ) + segProcData.traverse1.pos = pos; + segProcData.traverse1.angle = angle; + SegProc( SEGPROC_TRAVERSE1, segPtr, &segProcData ); + // dist += segProcData.traverse1.dist; //Add distance from end to pos (could be zero or whole length if backwards) + backwards = segProcData.traverse1.backwards; + segs_backwards = segProcData.traverse1.segs_backwards; + neg = segProcData.traverse1.negative; + BezSegInx = segProcData.traverse1.BezSegInx; +LOG( log_traverseTurnout, 1, ( " Loop1-2 B%d SB%d N%d BSI%d D%0.3f\n", backwards, segs_backwards, neg, BezSegInx, dist ) ) + } + + pathCurr += (turnout_backwards?1:-1); + pos1 = MapPathPos( xx, pathCurr[0], (turnout_backwards?0:1) ); *distR = dist; epCnt = GetTrkEndPtCnt(trk); ep = 0; @@ -1354,10 +1375,25 @@ static STATUS_T ModifyTurnout( track_p trk, wAction_t action, coOrd pos ) static BOOL_T GetParamsTurnout( int inx, track_p trk, coOrd pos, trackParams_t * params ) { - params->type = curveTypeStraight; - params->ep = PickUnconnectedEndPoint( pos, trk ); + + + params->type = curveTypeStraight; //TODO should check if last segment is actually straight + if (inx == PARAMS_CORNU || inx == PARAMS_BEZIER) { + params->arcR = 0.0; + params->arcP = zero; + params->ep = PickEndPoint(pos,trk); //Nearest + if (params->ep>=0) { + params->angle = GetTrkEndAngle(trk,params->ep); + params->track_angle = params->angle + params->ep?0:180; + } else { + params->angle = params-> track_angle = 0; + return FALSE; + } + return TRUE; + } + params->ep = PickUnconnectedEndPointSilent( pos, trk ); if (params->ep == -1) - return FALSE; + return FALSE; params->lineOrig = GetTrkEndPos(trk,params->ep); params->lineEnd = params->lineOrig; params->len = 0.0; @@ -1405,7 +1441,15 @@ static BOOL_T QueryTurnout( track_p trk, int query ) case Q_NOT_PLACE_FROGPOINTS: case Q_HAS_DESC: case Q_MODIFY_REDRAW_DONT_UNDRAW_TRACK: + case Q_CAN_EXTEND: return TRUE; + case Q_MODIFY_CAN_SPLIT: + if (GetTrkEndPtCnt(trk) <= 2) { // allow splitting of simple track und buffers + return TRUE ; + } + else { + return FALSE; + } case Q_CAN_PARALLEL: if( GetTrkEndPtCnt( trk ) == 2 && fabs( GetTrkEndAngle( trk, 0 ) - GetTrkEndAngle( trk, 1 )) == 180.0 ) return TRUE; @@ -1413,6 +1457,8 @@ static BOOL_T QueryTurnout( track_p trk, int query ) return FALSE; case Q_CAN_NEXT_POSITION: return ( GetTrkEndPtCnt(trk) > 2 ); + case Q_CORNU_CAN_MODIFY: + return FALSE; default: return FALSE; } @@ -1663,7 +1709,7 @@ static void TurnoutChange( long changes ) maxTurnoutDim.x = maxTurnoutDim.y = 0.0; if (turnoutInfo_da.cnt <= 0) return; - curTurnout = TurnoutAdd( LABEL_TABBED|LABEL_MANUF|LABEL_PARTNO|LABEL_DESCR, curScaleInx, turnoutListL, &maxTurnoutDim, -1 ); + curTurnout = TurnoutAdd( LABEL_TABBED|LABEL_MANUF|LABEL_PARTNO|LABEL_DESCR, GetLayoutCurScale(), turnoutListL, &maxTurnoutDim, -1 ); wListSetIndex( turnoutListL, 0 ); wControlShow( (wControl_p)turnoutListL, TRUE ); if (curTurnout == NULL) { @@ -1871,6 +1917,9 @@ LOG( log_turnout, 3, ( "placeTurnout T%d (%0.3f %0.3f) A%0.3f\n", } } } + } else { + trk = NULL; + *trkR = NULL; } *connCntR = connCnt; *maxDR = maxD; @@ -1975,14 +2024,6 @@ static void AddTurnout( void ) curTurnout->segs, curTurnout->segCnt, trackGauge, wDrawColorBlack ); UndoStart( _("Place New Turnout"), "addTurnout" ); titleLen = strlen( curTurnout->title ); -#ifdef LATER - newTrk = NewTrack( 0, T_TURNOUT, curTurnout->endCnt, sizeof (*xx) + 1 ); - xx = GetTrkExtraData(newTrk); - xx->orig = Dto.pos; - xx->angle = Dto.angle; - xx->customInfo = curTurnout->customInfo; - xx->segs = MyMalloc( (curTurnout->segCnt)*sizeof curTurnout->segs[0] ); -#endif DYNARR_SET( trkEndPt_t, tempEndPts_da, curTurnout->endCnt ); DYNARR_SET( junk_t, connection_da, curTurnout->endCnt ); @@ -2078,23 +2119,13 @@ LOG( log_turnout, 1, ( " deleting leftover T%d\n", xx->customInfo = curTurnout->customInfo; if (connection((int)curTurnoutEp).trk) { CopyAttributes( connection((int)curTurnoutEp).trk, newTrk ); - SetTrkScale( newTrk, curScaleInx ); + SetTrkScale( newTrk, GetLayoutCurScale()); } xx->special = curTurnout->special; xx->u = curTurnout->u; -#ifdef LATER - xx->segCnt = curTurnout->segCnt; - memcpy( xx->segs, curTurnout->segs, xx->segCnt * sizeof *(trkSeg_p)0 ); - xx->title = curTurnout->title; - xx->paths = xx->pathCurr = curTurnout->paths; - xx->pathLen = curTurnout->pathLen; -#endif /* Make the connections */ -#ifdef LATER - for (i=0; iendCnt; i++) - SetTrkEndPoint( newTrk, i, tempEndPts(i).pos, tempEndPts(i).angle ); -#endif + visible = FALSE; noConnections = TRUE; AuditTracks( "addTurnout T%d before connection", GetTrkIndex(newTrk) ); @@ -2102,6 +2133,9 @@ LOG( log_turnout, 1, ( " deleting leftover T%d\n", if ( connection(i).trk != NULL ) { p0 = GetTrkEndPos( newTrk, i ); p1 = GetTrkEndPos( connection(i).trk, connection(i).ep ); + ANGLE_T a0 = GetTrkEndAngle( newTrk, i); + ANGLE_T a1 = GetTrkEndAngle( connection(i).trk, connection(i).ep ); + ANGLE_T a = NormalizeAngle(a1-a0+180); d = FindDistance( p0, p1 ); if ( d < connectDistance ) { noConnections = FALSE; @@ -2481,7 +2515,7 @@ EXPORT void AddHotBarTurnouts( void ) to = turnoutInfo(inx); if ( !( IsParamValid(to->paramFileIndex) && to->segCnt > 0 && - CompatibleScale( TRUE, to->scaleInx, curScaleInx ) ) ) + CompatibleScale( TRUE, to->scaleInx, GetLayoutCurScale()) ) ) continue; AddHotBarElement( to->contentsLabel, to->size, to->orig, TRUE, to->barScale, to, CmdTurnoutHotBarProc ); } diff --git a/app/bin/cturntbl.c b/app/bin/cturntbl.c index 31f33ed..9264572 100644 --- a/app/bin/cturntbl.c +++ b/app/bin/cturntbl.c @@ -1,8 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cturntbl.c,v 1.4 2008-03-06 19:35:06 m_fischer Exp $ - * +/** \file cturntbl.c * TURNTABLE - * */ /* XTrkCad - Model Railroad CAD @@ -23,9 +20,17 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include +#include + #include "cstraigh.h" +#include "cundo.h" +#include "fileio.h" #include "i18n.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" static TRKTYP_T T_TURNTABLE = -1; @@ -233,7 +238,7 @@ static struct { coOrd orig; DIST_T diameter; long epCnt; - LAYER_T layerNumber; + unsigned int layerNumber; } trntblData; typedef enum { OR, RA, EC, LY } trntblDesc_e; static descData_t trntblDesc[] = { @@ -584,6 +589,26 @@ static STATUS_T ModifyTurntable( track_p trk, wAction_t action, coOrd pos ) return C_ERROR; } +EXPORT BOOL_T ConnectTurntableTracks( + track_p trk1, + EPINX_T ep1, + track_p trk2, + EPINX_T ep2 ) { + coOrd center, pos; + DIST_T radius; + TurntableGetCenter( trk1, ¢er, &radius ); + pos = GetTrkEndPos(trk2,ep2); + ANGLE_T angle = FindAngle(center, GetTrkEndPos(trk2,ep2)); + if (NormalizeAngle(GetTrkEndAngle(trk2,ep2) + 180 - angle) < connectAngle) { + if (FindDistance(center,pos)-radius < connectDistance) { + EPINX_T ep = NewTurntableEndPt(trk1,angle); + ConnectTracks( trk1, ep, trk2, ep2 ); + return TRUE; + } + } + return FALSE; +} + static BOOL_T GetParamsTurntable( int inx, track_p trk, coOrd pos, trackParams_t * params ) { @@ -604,6 +629,8 @@ static BOOL_T GetParamsTurntable( int inx, track_p trk, coOrd pos, trackParams_t params->lineEnd = params->lineOrig; params->len = 0.0; params->arcR = 0.0; + params->ttcenter = center; //Turntable + params->ttradius = radius; //Turntable return TRUE; } @@ -623,11 +650,27 @@ static BOOL_T MoveEndPtTurntable( track_p *trk, EPINX_T *ep, coOrd pos, DIST_T d d -= d0; Translate( &pos, pos, angle0+180, d0 ); } - if (d < r) { + if (small((r-d)/2)) { + Translate( &pos, posCen, angle0+180, r); //Make radius equal if close + } else if (d < r) { ErrorMessage( MSG_POINT_INSIDE_TURNTABLE ); return FALSE; } - *ep = NewTurntableEndPt( *trk, angle0 ); + //Look for empty slot + BOOL_T found = FALSE; + for (*ep=0; *eppos, xx->radius, angle0 ); + SetTrkEndPoint(*trk, *ep, pos1, angle0); //Reuse + } if ((d-r) > connectDistance) { trk1 = NewStraightTrack( GetTrkEndPos(*trk,*ep), pos ); CopyAttributes( *trk, trk1 ); @@ -650,7 +693,12 @@ static BOOL_T QueryTurntable( track_p trk, int query ) case Q_ISTRACK: case Q_NOT_PLACE_FROGPOINTS: case Q_MODIFY_REDRAW_DONT_UNDRAW_TRACK: + case Q_CAN_ADD_ENDPOINTS: + case Q_CAN_EXTEND: return TRUE; + case Q_MODIFY_CAN_SPLIT: + case Q_CORNU_CAN_MODIFY: + return FALSE; default: return FALSE; } diff --git a/app/bin/cundo.c b/app/bin/cundo.c index 13d7af0..e27ee75 100644 --- a/app/bin/cundo.c +++ b/app/bin/cundo.c @@ -24,9 +24,18 @@ #include #include #include +#include + +#include "cselect.h" +#include "custom.h" +#include "fileio.h" +#include "i18n.h" +#include "messages.h" +#include "paths.h" #include "track.h" #include "trackx.h" -#include "i18n.h" +#include "cundo.h" + /***************************************************************************** * @@ -148,10 +157,11 @@ static BOOL_T UndoFail( char * cause, long val, char * fileName, int lineNumber undoStack_p us; FILE * outf; time_t clock; - char temp[STR_SIZE]; + char *temp; NoticeMessage( MSG_UNDO_ASSERT, _("Ok"), NULL, fileName, lineNumber, val, val, cause ); - sprintf( temp, "%s%s%s", workingDir, FILE_SEP_CHAR, sUndoF ); + MakeFullpath(&temp, workingDir, sUndoF, NULL); outf = fopen( temp, "a+" ); + free(temp); if ( outf == NULL ) { NoticeMessage( MSG_OPEN_FAIL, _("Ok"), NULL, _("Undo Trace"), temp, strerror(errno) ); return FALSE; @@ -361,6 +371,7 @@ static BOOL_T ReadObject( stream_p stream, BOOL_T needRedo ) tempTrk.extraData = trk->extraData; if (!ReadStream( stream, tempTrk.extraData, tempTrk.extraSize )) return FALSE; + RebuildTrackSegs(&tempTrk); //If we had an array of Segs - recreate it if (recordUndo) Rprintf( "Restore T%D(%d) @ %lx\n", trk->index, tempTrk.index, (long)trk ); tempTrk.index = trk->index; tempTrk.next = trk->next; diff --git a/app/bin/cundo.h b/app/bin/cundo.h index ef767ae..89beab3 100644 --- a/app/bin/cundo.h +++ b/app/bin/cundo.h @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cundo.h,v 1.1 2005-12-07 15:46:54 rc-flyer Exp $ +/** \file cundo.h + * Function prototypes for undo functionality */ /* XTrkCad - Model Railroad CAD @@ -20,6 +20,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef HAVE_CUNDO_H +#define HAVE_CUNDO_H + +#include "common.h" +#include "track.h" + int UndoUndo( void ); int UndoRedo( void ); void UndoResume( void ); @@ -30,3 +36,5 @@ BOOL_T UndoDelete( track_p ); BOOL_T UndoNew( track_p ); void UndoEnd( void ); void UndoClear( void ); + +#endif // !HAVE_CUNDO_H diff --git a/app/bin/custom.c b/app/bin/custom.c index 766dbd8..618a8ac 100644 --- a/app/bin/custom.c +++ b/app/bin/custom.c @@ -1,6 +1,6 @@ #define RENAME_H -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/custom.c,v 1.14 2010-01-01 13:24:59 m_fischer Exp $ +/** \file custom.c + * */ /* XTrkCad - Model Railroad CAD @@ -40,13 +40,14 @@ #include #include -#include "track.h" -#include "version.h" +#include "cjoin.h" #include "common.h" -#include "misc.h" +#include "custom.h" #include "fileio.h" -#include "cjoin.h" #include "i18n.h" +#include "misc.h" +#include "track.h" +#include "version.h" #define Product "XTrackCAD" #define product "xtrkcad" @@ -73,6 +74,7 @@ char * sClipboardF = product ".clp"; char * sParamQF = product "." KEYCODE "tq"; char * sUndoF = product ".und"; char * sAuditF = product ".aud"; +char * sTipF = product ".tip"; char * sSourceFilePattern = NULL; char * sImportFilePattern = NULL; @@ -126,8 +128,10 @@ void DoStructDesignerRedir( void ) BOOL_T Initialize( void ) { InitTrkCurve(); + InitTrkBezier(); InitTrkStraight(); InitTrkEase(); + InitTrkCornu(); InitTrkTurnout(); InitTrkTurntable(); InitTrkStruct(); diff --git a/app/bin/custom.h b/app/bin/custom.h index b8ab213..a4d335a 100644 --- a/app/bin/custom.h +++ b/app/bin/custom.h @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/custom.h,v 1.7 2010-01-01 13:24:59 m_fischer Exp $ +/** \file custom.h + * */ /* XTrkCad - Model Railroad CAD @@ -23,6 +23,9 @@ #ifndef CUSTOM_H #define CUSTOM_H +#include "wlib.h" +#include "misc.h" + #define ICON_WIDTH (64) #define ICON_HEIGHT (64) @@ -82,12 +85,13 @@ void InitCustom( void ); void CleanupCustom( void ); void InitTrkCurve( void ); +void InitTrkBezier( void ); void InitTrkDraw( void ); void InitTrkEase( void ); +void InitTrkCornu( void ); void InitTrkNote( void ); void InitTrkStraight( void ); void InitTrkStruct( void ); -void InitTrkTableEdge( void ); void InitTrkText( void ); void InitTrkTrack( void ); void InitTrkTurnout( void ); @@ -105,13 +109,13 @@ void InitCmdElevation( wMenu_p menu ); void InitCmdJoin( wMenu_p menu ); void InitCmdProfile( wMenu_p menu ); void InitCmdPull( wMenu_p menu ); -void InitCmdTighten( void ); void InitCmdModify( wMenu_p menu ); void InitCmdMove( wMenu_p menu ); void InitCmdMoveDescription( wMenu_p menu ); void InitCmdStraight( wMenu_p menu ); void InitCmdDescribe( wMenu_p menu ); void InitCmdSelect( wMenu_p menu ); +void InitCmdPan( wMenu_p menu); void InitCmdDelete( void ); void InitCmdSplit( wMenu_p menu ); void InitCmdTunnel( void ); @@ -119,7 +123,6 @@ void InitCmdRuler( wMenu_p menu ); void InitCmdParallel( wMenu_p menu ); wIndex_t InitCmdPrint( wMenu_p menu ); -void InitCmdTableEdge( void ); void InitCmdText( wMenu_p menu ); void InitCmdTrain( wMenu_p menu ); void InitCmdTurnout( wMenu_p menu ); @@ -135,7 +138,6 @@ void InitCmdEasement( void ); char * MakeWindowTitle( char * ); addButtonCallBack_t EasementInit( void ); -addButtonCallBack_t StructDesignerInit( void ); void InitLayers( void ); void InitHotBar( void ); @@ -144,7 +146,7 @@ BOOL_T Initialize( void ); void DoEasementRedir( void ); void DoStructDesignerRedir( void ); void InitNewTurnRedir( wMenu_p ); -void RedrawAbout( wDraw_p, void *, wPos_t, wPos_t ); -void DoKeycheck( char * ); + +void InitAppDefaults(void); #endif diff --git a/app/bin/dbench.c b/app/bin/dbench.c index 4a32360..7e44713 100644 --- a/app/bin/dbench.c +++ b/app/bin/dbench.c @@ -20,9 +20,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" -#include "i18n.h" +#include +#include +#include +#include "i18n.h" +#include "param.h" +#include "track.h" +#include "utility.h" /***************************************************************************** * diff --git a/app/bin/dbitmap.c b/app/bin/dbitmap.c index 1c9c304..340bad1 100644 --- a/app/bin/dbitmap.c +++ b/app/bin/dbitmap.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/dbitmap.c,v 1.3 2008-02-14 19:49:19 m_fischer Exp $ +/** \file dbitmap.c + * Print to Bitmap */ /* XTrkCad - Model Railroad CAD @@ -20,14 +20,17 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include + +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "paths.h" +#include "track.h" -/***************************************************************************** - * - * Print to Bitmap - * - */ static long outputBitMapTogglesV = 3; static double outputBitMapDensity = 10; @@ -87,14 +90,14 @@ static int SaveBitmapFile( if (outputBitMapTogglesV&1) { fp = wStandardFont( F_TIMES, FALSE, FALSE ); fs = 18; - DrawTextSize( &mainD, Title1, fp, fs, FALSE, &textsize ); + DrawTextSize( &mainD, GetLayoutTitle(), fp, fs, FALSE, &textsize ); p[0].x = (bitmap_d.size.x - (textsize.x*bitmap_d.scale))/2.0 + bitmap_d.orig.x; p[0].y = mapD.size.y + (y1+0.30)*bitmap_d.scale; - DrawString( &bitmap_d, p[0], 0.0, Title1, fp, fs*bitmap_d.scale, wDrawColorBlack ); - DrawTextSize( &mainD, Title2, fp, fs, FALSE, &textsize ); + DrawString( &bitmap_d, p[0], 0.0, GetLayoutTitle(), fp, fs*bitmap_d.scale, wDrawColorBlack ); + DrawTextSize( &mainD, GetLayoutSubtitle(), fp, fs, FALSE, &textsize ); p[0].x = (bitmap_d.size.x - (textsize.x*bitmap_d.scale))/2.0 + bitmap_d.orig.x; p[0].y = mapD.size.y + (y1+0.05)*bitmap_d.scale; - DrawString( &bitmap_d, p[0], 0.0, Title2, fp, fs*bitmap_d.scale, wDrawColorBlack ); + DrawString( &bitmap_d, p[0], 0.0, GetLayoutSubtitle(), fp, fs*bitmap_d.scale, wDrawColorBlack ); fp_bi = wStandardFont( F_TIMES, TRUE, TRUE ); DrawTextSize( &mainD, _("Drawn with "), fp, fs, FALSE, &textsize ); DrawTextSize( &mainD, sProdName, fp_bi, fs, FALSE, &textsize1 ); @@ -214,7 +217,7 @@ static void OutputBitMapOk( void * junk ) _("Bitmap files|*.xpm"), #endif SaveBitmapFile, NULL ); - wFilSelect( bitmap_fs, curDirName ); + wFilSelect( bitmap_fs, GetCurrentPath( BITMAPPATHKEY )); } diff --git a/app/bin/dcar.c b/app/bin/dcar.c index c64582f..9236f1b 100644 --- a/app/bin/dcar.c +++ b/app/bin/dcar.c @@ -1,6 +1,5 @@ /** \file dcar.c * TRAIN - * */ /* XTrkCad - Model Railroad CAD @@ -24,14 +23,23 @@ #ifndef WINDOWS #include #endif +#include #include - +#include #include +#include -#include "track.h" +#include "cselect.h" #include "ctrain.h" -#include "i18n.h" +#include "custom.h" #include "fileio.h" +#include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "paths.h" +#include "track.h" +#include "utility.h" static int log_carList; static int log_carInvList; @@ -626,6 +634,8 @@ static carProto_p CarProtoNew( proto->type = type; proto->dim = *dim; proto->segCnt = segCnt; + //if (proto->segPtr) Can't do this because segPtr could be static + // free(proto->segPtr); proto->segPtr = (trkSeg_p)memdup( segPtr, (sizeof *(trkSeg_p)0) * proto->segCnt ); CloneFilledDraw( proto->segCnt, proto->segPtr, FALSE ); GetSegBounds( zero, 0.0, proto->segCnt, proto->segPtr, &proto->orig, &proto->size ); @@ -660,6 +670,8 @@ static BOOL_T CarProtoRead( if ( !ReadSegs() ) return FALSE; CarProtoNew( NULL, curParamFileIndex, desc, options, type, &dim, tempSegs_da.cnt, &tempSegs(0) ); + FreeFilledDraw(tempSegs_da.cnt,&tempSegs(0)); + MyFree(desc); return TRUE; } @@ -1255,7 +1267,7 @@ static BOOL_T CarItemWrite( item->data.purchPrice, item->data.currPrice, item->data.condition, item->data.purchDate, item->data.serviceDate )>0; if ( ( options&CAR_ITEM_ONLAYOUT) ) { CarGetPos( item->car, &pos, &angle ); - rc &= fprintf( f, " %d %d %0.3f %0.3f %0.3f", + rc &= fprintf( f, " %d %u %0.3f %0.3f %0.3f", GetTrkIndex(item->car), GetTrkLayer(item->car), pos.x, pos.y, angle )>0; } rc &= fprintf( f, "\n" )>0; @@ -1614,7 +1626,7 @@ EXPORT int CarAvailableCount( void ) carItem_t * item; for ( inx=0; inx < carItemHotbar_da.cnt; inx ++ ) { item = carItemHotbar(inx); - if ( item->scaleInx != curScaleInx ) + if ( item->scaleInx != GetLayoutCurScale()) continue; cnt++; } @@ -1636,7 +1648,7 @@ EXPORT void AddHotBarCarDesc( void ) item1 = carItemHotbar(inx); if ( item1->car && !IsTrackDeleted(item1->car) ) continue; - if ( item1->scaleInx != curScaleInx ) + if ( item1->scaleInx != GetLayoutCurScale()) continue; if ( (carHotbarModes[carHotbarModeInx]&0xF000)!=0 || ( item0 == NULL || Cmp_carHotbar( &item0, &item1 ) != 0 ) ) { #ifdef DESCFIX @@ -3811,7 +3823,7 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) sprintf( message+strlen(message), "%s: %s %s %s %s %s %s", (partP?_(" and Part"):""), carDlgManufStr, carDlgPartnoStr, carDlgProtoStr, carDlgDescStr, - (carDlgRepmarkStr?carDlgRepmarkStr:carDlgRoadnameStr), carDlgNumberStr ); + (carDlgRepmarkStr[ 0 ]?carDlgRepmarkStr:carDlgRoadnameStr), carDlgNumberStr ); carDlgQuantity = 1; ParamLoadControl( &carDlgPG, I_CD_QTY ); @@ -3836,7 +3848,7 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) RestoreLocale(oldLocale); } reloadRoadnameList = TRUE; - sprintf( message, _("%s Part: %s %s %s %s %s %s"), carDlgUpdatePartPtr==NULL?_("Added new"):_("Updated"), carDlgManufStr, carDlgPartnoStr, carDlgProtoStr, carDlgDescStr, carDlgRepmarkStr?carDlgRepmarkStr:carDlgRoadnameStr, carDlgNumberStr ); + sprintf( message, _("%s Part: %s %s %s %s %s %s"), carDlgUpdatePartPtr==NULL?_("Added new"):_("Updated"), carDlgManufStr, carDlgPartnoStr, carDlgProtoStr, carDlgDescStr, carDlgRepmarkStr[ 0 ]?carDlgRepmarkStr:carDlgRoadnameStr, carDlgNumberStr ); } else if ( S_PROTO ) { if ( carDlgUpdateProtoPtr==NULL ) { @@ -3876,7 +3888,7 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) if ( carDlgUpdateItemPtr==NULL ) { if ( partP ) { TabStringExtract( title, 7, tabs ); - if ( CarDlgLoadLists( TRUE, tabs, curScaleInx ) ) + if ( CarDlgLoadLists( TRUE, tabs, GetLayoutCurScale()) ) currState = S_ItemSel; else currState = S_ItemEnter; @@ -4003,7 +4015,7 @@ static void DoCarPartDlg( carDlgAction_e *actions ) CarDlgLoadRoadnameList(); carProtoSegCnt = 0; carProtoSegPtr = NULL; - carDlgScaleInx = curScaleInx; + carDlgScaleInx = GetLayoutCurScale(); carDlgFlipToggle = FALSE; carDlgChanged = 0; @@ -4135,12 +4147,13 @@ static void CarInvDlgFind( void * junk ) if ( item == NULL || item->car == NULL || IsTrackDeleted(item->car) ) return; CarGetPos( item->car, &pos, &angle ); CarSetVisible( item->car ); - DrawMapBoundingBox( FALSE ); + //DrawMapBoundingBox( FALSE ); mainCenter = pos; mainD.orig.x = pos.x-mainD.size.x/2;; mainD.orig.y = pos.y-mainD.size.y/2;; MainRedraw(); - DrawMapBoundingBox( TRUE ); + MapRedraw(); + //DrawMapBoundingBox( TRUE ); } @@ -4345,7 +4358,7 @@ static void CarInvDlgSaveText( void ) if ( carInvSaveText_fs == NULL ) carInvSaveText_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("List Cars"), "Text|*.txt", CarInvSaveText, NULL ); - wFilSelect( carInvSaveText_fs, curDirName ); + wFilSelect( carInvSaveText_fs, GetCurrentPath(CARSPATHKEY)); } @@ -4630,7 +4643,7 @@ static void CarInvDlgImportCsv( void ) if ( carInvImportCsv_fs == NULL ) carInvImportCsv_fs = wFilSelCreate( mainW, FS_LOAD, 0, _("Import Cars"), _("Comma-Separated-Values|*.csv"), CarInvImportCsv, NULL ); - wFilSelect( carInvImportCsv_fs, curDirName ); + wFilSelect( carInvImportCsv_fs, GetCurrentPath(CARSPATHKEY)); } @@ -4752,7 +4765,7 @@ static void CarInvDlgExportCsv( void ) if ( carInvExportCsv_fs == NULL ) carInvExportCsv_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("Export Cars"), _("Comma-Separated-Values|*.csv"), CarInvExportCsv, NULL ); - wFilSelect( carInvExportCsv_fs, curDirName ); + wFilSelect( carInvExportCsv_fs, GetCurrentPath(CARSPATHKEY)); } diff --git a/app/bin/dcmpnd.c b/app/bin/dcmpnd.c index 2cff06c..8b92e41 100644 --- a/app/bin/dcmpnd.c +++ b/app/bin/dcmpnd.c @@ -1,6 +1,5 @@ /* \file dcmpnd.c * Compound tracks: Turnouts and Structures - * */ /* XTrkCad - Model Railroad CAD @@ -22,11 +21,18 @@ */ #include -#include "track.h" +#include + #include "compound.h" -#include "shrtpath.h" +#include "cundo.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" - +#include "messages.h" +#include "param.h" +#include "shrtpath.h" +#include "track.h" +#include "utility.h" /***************************************************************************** * diff --git a/app/bin/dcontmgm.c b/app/bin/dcontmgm.c index 45fec89..e9e929f 100644 --- a/app/bin/dcontmgm.c +++ b/app/bin/dcontmgm.c @@ -60,11 +60,8 @@ static const char rcsid[] = "@(#) : $Id$"; - - -#include "track.h" #include -#include "i18n.h" +#include #ifdef WINDOWS #include @@ -73,6 +70,14 @@ static const char rcsid[] = "@(#) : $Id$"; #define access _access #endif +#include "cundo.h" +#include "custom.h" +#include "i18n.h" +#include "param.h" +#include "track.h" +#include "wlib.h" + + /***************************************************************************** * * Control List Management diff --git a/app/bin/dcustmgm.c b/app/bin/dcustmgm.c index 86f86b1..ce6bdeb 100644 --- a/app/bin/dcustmgm.c +++ b/app/bin/dcustmgm.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/dcustmgm.c,v 1.4 2009-07-30 16:58:42 m_fischer Exp $ +/** \file dcustmgm.c + * Custom List Management */ /* XTrkCad - Model Railroad CAD @@ -20,22 +20,27 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include #include -#include "i18n.h" +#include #ifdef WINDOWS #include #define F_OK (0) #define W_OK (2) #define access _access +#else +#include #endif -/***************************************************************************** - * - * Custom List Management - * - */ +#include "custom.h" +#include "fileio.h" +#include "i18n.h" +#include "messages.h" +#include "param.h" +#include "paths.h" +#include "track.h" +#include "wlib.h" static void CustomEdit( void * action ); static void CustomDelete( void * action ); @@ -241,7 +246,7 @@ static void CustomExport( void * junk ) if ( customMgmExport_fs == NULL ) customMgmExport_fs = wFilSelCreate( mainW, FS_UPDATE, 0, _("Move To XTP"), _("Parameter File|*.xtp"), CustomDoExport, NULL ); - wFilSelect( customMgmExport_fs, curDirName ); + wFilSelect( customMgmExport_fs, GetCurrentPath(CUSTOMPATHKEY)); } diff --git a/app/bin/dease.c b/app/bin/dease.c index 9b07129..7841857 100644 --- a/app/bin/dease.c +++ b/app/bin/dease.c @@ -1,8 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/dease.c,v 1.3 2008-03-06 19:35:08 m_fischer Exp $ - * +/** \file dease.c * Easement Button Hdlrs - * */ /* XTrkCad - Model Railroad CAD @@ -23,12 +20,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include -#include "track.h" #include "ccurve.h" -#include "cstraigh.h" #include "cjoin.h" +#include "cstraigh.h" +#include "custom.h" #include "i18n.h" +#include "param.h" +#include "track.h" static wButton_p easementB; @@ -42,11 +42,13 @@ static DIST_T oldEasementVal; static wIcon_p enone_bm; static wIcon_p esharp_bm; static wIcon_p egtsharp_bm; +static wIcon_p eltsharp_bm; static wIcon_p enormal_bm; static wIcon_p eltbroad_bm; static wIcon_p ebroad_bm; static wIcon_p egtbroad_bm; - +static wIcon_p ecornu_bm; + /**************************************** * * EASEMENTW @@ -60,14 +62,14 @@ static void SetEasement( DIST_T, void * ); static void EasementOk( void ); static void EasementCancel( void ); -static char *easementChoiceLabels[] = { N_("None"), N_("Sharp"), N_("Normal"), N_("Broad"), NULL }; -static paramFloatRange_t r0o5_2 = { 0.5, 2.0, 60 }; +static char *easementChoiceLabels[] = { N_("None"), N_("Sharp"), N_("Normal"), N_("Broad"), N_("Cornu"), NULL }; +static paramFloatRange_t r0n1_100 = { -1.0, 100.0, 60 }; static paramFloatRange_t r0_100 = { 0.0, 100.0, 60 }; static paramFloatRange_t r0_10 = { 0.0, 10.0, 60 }; static long easeM; static paramData_t easementPLs[] = { #define I_EASEVAL (0) - { PD_FLOAT, &easementVal, "val", PDO_NOPSHUPD, &r0o5_2, N_("Value") }, + { PD_FLOAT, &easementVal, "val", PDO_NOPSHUPD, &r0n1_100, N_("Value") }, { PD_FLOAT, &easeR, "r", PDO_DIM|PDO_DLGRESETMARGIN, &r0_100, N_("R"), BO_READONLY }, { PD_FLOAT, &easeX, "x", PDO_DIM|PDO_DLGHORZ, &r0_10, N_("X"), BO_READONLY }, { PD_FLOAT, &easeL, "l", PDO_DIM|PDO_DLGHORZ, &r0_100, N_("L"), BO_READONLY }, @@ -87,42 +89,57 @@ static void SetEasement( long selVal = -1; wIcon_p bm; - if (val == 0.0) { + if (val < 0.0) { easeX = easeR = easeL = 0.0; - selVal = 0; - bm = enone_bm; - } else if (val <= 1.0) { - z = 1.0/val - 1.0; - easeR = Rvalues[1] - z * (Rvalues[1] - Rvalues[0]); - easeL = Lvalues[1] - z * (Lvalues[1] - Lvalues[0]); - if (easeR != 0.0) - easeX = easeL*easeL/(24*easeR); - else - easeX = 0.0; - if (val == 1.0) { - selVal = 2; - bm = enormal_bm; - } else if (val == 0.5) { - selVal = 1; - bm = esharp_bm; - } else { - bm = egtsharp_bm; - } + selVal = 4; + val = -1; + bm = ecornu_bm; } else { - z = val - 1.0; - easeR = Rvalues[1] + z * (Rvalues[2] - Rvalues[1]); - easeL = Lvalues[1] + z * (Lvalues[2] - Lvalues[1]); - if (easeR != 0.0) - easeX = easeL*easeL/(24*easeR); - else - easeX = 0.0; - if (val == 2.0) { - selVal = 3; - bm = ebroad_bm; - } else if (val < 2.0) { - bm = eltbroad_bm; + if (val == 0.0) { + easeX = easeR = easeL = 0.0; + selVal = 0; + val = 0; + bm = enone_bm; + } else if (val <= 1.0) { + if (val < 0.21) val = 0.21; //Eliminate values that give negative radii + z = 1.0/val - 1.0; + easeR = Rvalues[1] - z * (Rvalues[1] - Rvalues[0]); + easeL = Lvalues[1] - z * (Lvalues[1] - Lvalues[0]); + if (easeR != 0.0) + easeX = easeL*easeL/(24*easeR); + else + easeX = 0.0; + if (val == 1.0) { + selVal = 2; + bm = enormal_bm; + } else if (val == 0.5) { + selVal = 1; + bm = esharp_bm; + } else if (val < 0.5) { + bm = eltsharp_bm; + selVal = 1; + } else { + selVal = 1; + bm = egtsharp_bm; + } } else { - bm = egtbroad_bm; + z = val - 1.0; + easeR = Rvalues[1] + z * (Rvalues[2] - Rvalues[1]); + easeL = Lvalues[1] + z * (Lvalues[2] - Lvalues[1]); + if (easeR != 0.0) + easeX = easeL*easeL/(24*easeR); + else + easeX = 0.0; + if (val == 2.0) { + selVal = 3; + bm = ebroad_bm; + } else if (val < 2.0) { + selVal = 3; + bm = eltbroad_bm; + } else { + selVal = 3; + bm = egtbroad_bm; + } } } @@ -177,6 +194,9 @@ static void EasementSel( case 3: val = 2.0; break; + case 4: + val = -1.0; + break; default: AbortProg( "easementSel: bad value %ld", arg); val = 0.0; @@ -241,10 +261,12 @@ static void EasementChange( long changes ) #include "bitmaps/enone.xpm" #include "bitmaps/esharp.xpm" #include "bitmaps/egtsharp.xpm" +#include "bitmaps/eltsharp.xpm" #include "bitmaps/enormal.xpm" #include "bitmaps/eltbroad.xpm" #include "bitmaps/ebroad.xpm" #include "bitmaps/egtbroad.xpm" +#include "bitmaps/ecornu.xpm" EXPORT addButtonCallBack_t EasementInit( void ) @@ -252,12 +274,14 @@ EXPORT addButtonCallBack_t EasementInit( void ) ParamRegister( &easementPG ); enone_bm = wIconCreatePixMap( enone_xpm ); + eltsharp_bm = wIconCreatePixMap( eltsharp_xpm ); esharp_bm = wIconCreatePixMap( esharp_xpm ); egtsharp_bm = wIconCreatePixMap( egtsharp_xpm ); enormal_bm = wIconCreatePixMap( enormal_xpm ); eltbroad_bm = wIconCreatePixMap( eltbroad_xpm ); ebroad_bm = wIconCreatePixMap( ebroad_xpm ); egtbroad_bm = wIconCreatePixMap( egtbroad_xpm ); + ecornu_bm = wIconCreatePixMap( ecornu_xpm ); easementB = AddToolbarButton( "cmdEasement", enone_bm, 0, (addButtonCallBack_t)DoEasementRedir, NULL ); RegisterChangeNotification( EasementChange ); diff --git a/app/bin/denum.c b/app/bin/denum.c index d27a135..b353627 100644 --- a/app/bin/denum.c +++ b/app/bin/denum.c @@ -20,16 +20,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include +#include #include -#include "track.h" -#include "i18n.h" - -/**************************************************************************** - * - * ENUMERATE - * - */ +#include "custom.h" +#include "fileio.h" +#include "layout.h" +#include "i18n.h" +#include "param.h" +#include "paths.h" +#include "track.h" +#include "utility.h" static wWin_p enumW; @@ -37,6 +39,9 @@ static wWin_p enumW; #define ENUMOP_PRINT (5) #define ENUMOP_CLOSE (6) +#undef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) + static void DoEnumOp( void * ); static long enableListPrices; @@ -83,7 +88,7 @@ static void DoEnumOp( { switch( (int)(long)data ) { case ENUMOP_SAVE: - wFilSelect( enumFile_fs, curDirName ); + wFilSelect( enumFile_fs, GetCurrentPath(PARTLISTPATHKEY) ); break; case ENUMOP_PRINT: wTextPrint( enumT ); @@ -151,13 +156,13 @@ void EnumerateStart(void) message[0] = '\0'; cp = message; - if ( Title1[0] ) { - strcpy( cp, Title1 ); + if ( *GetLayoutTitle() ) { + strcpy( cp, GetLayoutTitle() ); cp += strlen(cp); *cp++ = '\n'; } - if ( Title2[0] ) { - strcpy( cp, Title2 ); + if ( *GetLayoutSubtitle() ) { + strcpy( cp, GetLayoutSubtitle()); cp += strlen(cp); *cp++ = '\n'; } diff --git a/app/bin/dlayer.c b/app/bin/dlayer.c index c79d783..71d151e 100644 --- a/app/bin/dlayer.c +++ b/app/bin/dlayer.c @@ -1,7 +1,5 @@ /** \file dlayer.c * Functions and dialogs for handling layers. - * - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/dlayer.c,v 1.9 2009-06-15 19:29:57 m_fischer Exp $ */ /* XTrkCad - Model Railroad CAD @@ -23,12 +21,17 @@ */ #include - -#include "track.h" -#include "i18n.h" - +#include #include +#include +#include "custom.h" +#include "dynstring.h" +#include "fileio.h" +#include "i18n.h" +#include "messages.h" +#include "param.h" +#include "track.h" /***************************************************************************** * @@ -45,195 +48,208 @@ #define LAYERPREF_COLOR "color" #define LAYERPREF_FLAGS "flags" -EXPORT LAYER_T curLayer; -EXPORT long layerCount = 10; +unsigned int curLayer; +long layerCount = 10; static long newLayerCount = 10; -static LAYER_T layerCurrent = NUM_LAYERS; +static unsigned int layerCurrent = NUM_LAYERS; static BOOL_T layoutLayerChanged = FALSE; -static wIcon_p show_layer_bmps[NUM_BUTTONS]; -/*static wIcon_p hide_layer_bmps[NUM_BUTTONS]; */ +static wIcon_p show_layer_bmps[NUM_BUTTONS]; static wButton_p layer_btns[NUM_BUTTONS]; /**< layer buttons on toolbar */ /** Layer selector on toolbar */ -static wList_p setLayerL; +static wList_p setLayerL; -/*static wMessage_p layerNumM;*/ /** Describe the properties of a layer */ typedef struct { - char name[STR_SHORT_SIZE]; /**< Layer name */ - wDrawColor color; /**< layer color, is an index into a color table */ - BOOL_T frozen; /**< Frozen flag */ - BOOL_T visible; /**< visible flag */ - BOOL_T onMap; /**< is layer shown map */ - long objCount; /**< number of objects on layer */ - } layer_t; - + char name[STR_SHORT_SIZE]; /**< Layer name */ + wDrawColor color; /**< layer color, is an index into a color table */ + BOOL_T frozen; /**< Frozen flag */ + BOOL_T visible; /**< visible flag */ + BOOL_T onMap; /**< is layer shown map */ + long objCount; /**< number of objects on layer */ +} layer_t; + static layer_t layers[NUM_LAYERS]; static layer_t *layers_save = NULL; static int oldColorMap[][3] = { - { 255, 255, 255 }, /* White */ - { 0, 0, 0 }, /* Black */ - { 255, 0, 0 }, /* Red */ - { 0, 255, 0 }, /* Green */ - { 0, 0, 255 }, /* Blue */ - { 255, 255, 0 }, /* Yellow */ - { 255, 0, 255 }, /* Purple */ - { 0, 255, 255 }, /* Aqua */ - { 128, 0, 0 }, /* Dk. Red */ - { 0, 128, 0 }, /* Dk. Green */ - { 0, 0, 128 }, /* Dk. Blue */ - { 128, 128, 0 }, /* Dk. Yellow */ - { 128, 0, 128 }, /* Dk. Purple */ - { 0, 128, 128 }, /* Dk. Aqua */ - { 65, 105, 225 }, /* Royal Blue */ - { 0, 191, 255 }, /* DeepSkyBlue */ - { 125, 206, 250 }, /* LightSkyBlue */ - { 70, 130, 180 }, /* Steel Blue */ - { 176, 224, 230 }, /* Powder Blue */ - { 127, 255, 212 }, /* Aquamarine */ - { 46, 139, 87 }, /* SeaGreen */ - { 152, 251, 152 }, /* PaleGreen */ - { 124, 252, 0 }, /* LawnGreen */ - { 50, 205, 50 }, /* LimeGreen */ - { 34, 139, 34 }, /* ForestGreen */ - { 255, 215, 0 }, /* Gold */ - { 188, 143, 143 }, /* RosyBrown */ - { 139, 69, 19 }, /* SaddleBrown */ - { 245, 245, 220 }, /* Beige */ - { 210, 180, 140 }, /* Tan */ - { 210, 105, 30 }, /* Chocolate */ - { 165, 42, 42 }, /* Brown */ - { 255, 165, 0 }, /* Orange */ - { 255, 127, 80 }, /* Coral */ - { 255, 99, 71 }, /* Tomato */ - { 255, 105, 180 }, /* HotPink */ - { 255, 192, 203 }, /* Pink */ - { 176, 48, 96 }, /* Maroon */ - { 238, 130, 238 }, /* Violet */ - { 160, 32, 240 }, /* Purple */ - { 16, 16, 16 }, /* Gray */ - { 32, 32, 32 }, /* Gray */ - { 48, 48, 48 }, /* Gray */ - { 64, 64, 64 }, /* Gray */ - { 80, 80, 80 }, /* Gray */ - { 96, 96, 96 }, /* Gray */ - { 112, 112, 122 }, /* Gray */ - { 128, 128, 128 }, /* Gray */ - { 144, 144, 144 }, /* Gray */ - { 160, 160, 160 }, /* Gray */ - { 176, 176, 176 }, /* Gray */ - { 192, 192, 192 }, /* Gray */ - { 208, 208, 208 }, /* Gray */ - { 224, 224, 224 }, /* Gray */ - { 240, 240, 240 }, /* Gray */ - { 0, 0, 0 } /* BlackPixel */ - }; - -static void DoLayerOp( void * data ); + { 255, 255, 255 }, /* White */ + { 0, 0, 0 }, /* Black */ + { 255, 0, 0 }, /* Red */ + { 0, 255, 0 }, /* Green */ + { 0, 0, 255 }, /* Blue */ + { 255, 255, 0 }, /* Yellow */ + { 255, 0, 255 }, /* Purple */ + { 0, 255, 255 }, /* Aqua */ + { 128, 0, 0 }, /* Dk. Red */ + { 0, 128, 0 }, /* Dk. Green */ + { 0, 0, 128 }, /* Dk. Blue */ + { 128, 128, 0 }, /* Dk. Yellow */ + { 128, 0, 128 }, /* Dk. Purple */ + { 0, 128, 128 }, /* Dk. Aqua */ + { 65, 105, 225 }, /* Royal Blue */ + { 0, 191, 255 }, /* DeepSkyBlue */ + { 125, 206, 250 }, /* LightSkyBlue */ + { 70, 130, 180 }, /* Steel Blue */ + { 176, 224, 230 }, /* Powder Blue */ + { 127, 255, 212 }, /* Aquamarine */ + { 46, 139, 87 }, /* SeaGreen */ + { 152, 251, 152 }, /* PaleGreen */ + { 124, 252, 0 }, /* LawnGreen */ + { 50, 205, 50 }, /* LimeGreen */ + { 34, 139, 34 }, /* ForestGreen */ + { 255, 215, 0 }, /* Gold */ + { 188, 143, 143 }, /* RosyBrown */ + { 139, 69, 19 }, /* SaddleBrown */ + { 245, 245, 220 }, /* Beige */ + { 210, 180, 140 }, /* Tan */ + { 210, 105, 30 }, /* Chocolate */ + { 165, 42, 42 }, /* Brown */ + { 255, 165, 0 }, /* Orange */ + { 255, 127, 80 }, /* Coral */ + { 255, 99, 71 }, /* Tomato */ + { 255, 105, 180 }, /* HotPink */ + { 255, 192, 203 }, /* Pink */ + { 176, 48, 96 }, /* Maroon */ + { 238, 130, 238 }, /* Violet */ + { 160, 32, 240 }, /* Purple */ + { 16, 16, 16 }, /* Gray */ + { 32, 32, 32 }, /* Gray */ + { 48, 48, 48 }, /* Gray */ + { 64, 64, 64 }, /* Gray */ + { 80, 80, 80 }, /* Gray */ + { 96, 96, 96 }, /* Gray */ + { 112, 112, 122 }, /* Gray */ + { 128, 128, 128 }, /* Gray */ + { 144, 144, 144 }, /* Gray */ + { 160, 160, 160 }, /* Gray */ + { 176, 176, 176 }, /* Gray */ + { 192, 192, 192 }, /* Gray */ + { 208, 208, 208 }, /* Gray */ + { 224, 224, 224 }, /* Gray */ + { 240, 240, 240 }, /* Gray */ + { 0, 0, 0 } /* BlackPixel */ +}; + +static void DoLayerOp(void * data); static void UpdateLayerDlg(void); -/* static void LoadLayerLists(); */ -static void LayerSetCounts(); -static void InitializeLayers( void LayerInitFunc( void ), int newCurrLayer ); -static void LayerPrefSave( void ); -static void LayerPrefLoad( void ); -EXPORT BOOL_T GetLayerVisible( LAYER_T layer ) +static void InitializeLayers(void LayerInitFunc(void), int newCurrLayer); +static void LayerPrefSave(void); +static void LayerPrefLoad(void); + +int IsLayerValid(unsigned int layer) { - if (layer < 0 || layer >= NUM_LAYERS) - return TRUE; - else - return layers[(int)layer].visible; + return (layer <= NUM_LAYERS); } - -EXPORT BOOL_T GetLayerFrozen( LAYER_T layer ) +BOOL_T GetLayerVisible(unsigned int layer) { - if (layer < 0 || layer >= NUM_LAYERS) - return TRUE; - else - return layers[(int)layer].frozen; + if (!IsLayerValid(layer)) { + return TRUE; + } else { + return layers[layer].visible; + } } -EXPORT BOOL_T GetLayerOnMap( LAYER_T layer ) +BOOL_T GetLayerFrozen(unsigned int layer) { - if (layer < 0 || layer >= NUM_LAYERS) - return TRUE; - else - return layers[(int)layer].onMap; + if (!IsLayerValid(layer)) { + return TRUE; + } else { + return layers[layer].frozen; + } } -EXPORT char * GetLayerName( LAYER_T layer ) +BOOL_T GetLayerOnMap(unsigned int layer) { - if (layer < 0 || layer >= NUM_LAYERS) - return NULL; - else - return layers[(int)layer].name; + if (!IsLayerValid(layer)) { + return TRUE; + } else { + return layers[layer].onMap; + } } -EXPORT void NewLayer( void ) +char * GetLayerName(unsigned int layer) { + if (!IsLayerValid(layer)) { + return NULL; + } else { + return layers[layer].name; + } } - -EXPORT wDrawColor GetLayerColor( LAYER_T layer ) +wDrawColor GetLayerColor(unsigned int layer) { - return layers[(int)layer].color; + return layers[layer].color; } -static void FlipLayer( void * arg ) +static void FlipLayer(unsigned int layer) { - LAYER_T l = (LAYER_T)(long)arg; - wBool_t visible; - if ( l < 0 || l >= NUM_LAYERS ) - return; - if ( l == curLayer && layers[(int)l].visible) { - wButtonSetBusy( layer_btns[(int)l], layers[(int)l].visible ); - NoticeMessage( MSG_LAYER_HIDE, _("Ok"), NULL ); - return; - } - RedrawLayer( l, FALSE ); - visible = !layers[(int)l].visible; - layers[(int)l].visible = visible; - if (l= NUM_LAYERS ) - curLayer = 0; - if ( !layers[(int)curLayer].visible ) - FlipLayer( (void*)(intptr_t)inx ); - if ( recordF ) - fprintf( recordF, "SETCURRLAYER %d\n", inx ); + unsigned int newLayer = (unsigned int)inx; + + if (layers[newLayer].frozen) { + NoticeMessage(MSG_LAYER_SEL_FROZEN, _("Ok"), NULL); + wListSetIndex(setLayerL, curLayer); + return; + } + + curLayer = newLayer; + + if (!IsLayerValid(curLayer)) { + curLayer = 0; + } + + if (!layers[curLayer].visible) { + FlipLayer(inx); + } + + if (recordF) { + fprintf(recordF, "SETCURRLAYER %d\n", inx); + } } -static void PlaybackCurrLayer( char * line ) +static void PlaybackCurrLayer(char * line) { - wIndex_t layer; - layer = atoi(line); - wListSetIndex( setLayerL, layer ); - SetCurrLayer( layer, NULL, 0, NULL, NULL ); + wIndex_t layer; + layer = atoi(line); + wListSetIndex(setLayerL, layer); + SetCurrLayer(layer, NULL, 0, NULL, NULL); } /** @@ -243,19 +259,35 @@ static void PlaybackCurrLayer( char * line ) * \param color IN new color */ -static void SetLayerColor( int inx, wDrawColor color ) +static void SetLayerColor(unsigned int inx, wDrawColor color) +{ + if (color != layers[inx].color) { + if (inx < NUM_BUTTONS) { + wIconSetColor(show_layer_bmps[inx], color); + wButtonSetLabel(layer_btns[inx], (char*)show_layer_bmps[inx]); + } + + layers[inx].color = color; + layoutLayerChanged = TRUE; + } +} + +char * +FormatLayerName(unsigned int layerNumber) { - if ( color != layers[inx].color ) { - if (inx < NUM_BUTTONS) { - wIconSetColor( show_layer_bmps[inx], color ); - wButtonSetLabel( layer_btns[inx], (char*)show_layer_bmps[inx] ); - } - layers[inx].color = color; - layoutLayerChanged = TRUE; - } + DynString string;// = NaS; + char *result; + DynStringMalloc(&string, 0); + DynStringPrintf(&string, + "%2d %c %s", + layerNumber + 1, + (layers[layerNumber].objCount > 0 ? '+' : '-'), + layers[layerNumber].name); + result = strdup(DynStringToCStr(&string)); + DynStringFree(&string); + return result; } - #include "bitmaps/l1.xbm" #include "bitmaps/l2.xbm" @@ -359,31 +391,32 @@ static void SetLayerColor( int inx, wDrawColor color ) static char * show_layer_bits[NUM_BUTTONS] = { - l1_bits, l2_bits, l3_bits, l4_bits, l5_bits, l6_bits, l7_bits, l8_bits, l9_bits, l10_bits, - l11_bits, l12_bits, l13_bits, l14_bits, l15_bits, l16_bits, l17_bits, l18_bits, l19_bits, l20_bits, - l21_bits, l22_bits, l23_bits, l24_bits, l25_bits, l26_bits, l27_bits, l28_bits, l29_bits, l30_bits, - l31_bits, l32_bits, l33_bits, l34_bits, l35_bits, l36_bits, l37_bits, l38_bits, l39_bits, l40_bits, - l41_bits, l42_bits, l43_bits, l44_bits, l45_bits, l46_bits, l47_bits, l48_bits, l49_bits, l50_bits, - l51_bits, l52_bits, l53_bits, l54_bits, l55_bits, l56_bits, l57_bits, l58_bits, l59_bits, l60_bits, - l61_bits, l62_bits, l63_bits, l64_bits, l65_bits, l66_bits, l67_bits, l68_bits, l69_bits, l70_bits, - l71_bits, l72_bits, l73_bits, l74_bits, l75_bits, l76_bits, l77_bits, l78_bits, l79_bits, l80_bits, - l81_bits, l82_bits, l83_bits, l84_bits, l85_bits, l86_bits, l87_bits, l88_bits, l89_bits, l90_bits, - l91_bits, l92_bits, l93_bits, l94_bits, l95_bits, l96_bits, l97_bits, l98_bits, l99_bits, + l1_bits, l2_bits, l3_bits, l4_bits, l5_bits, l6_bits, l7_bits, l8_bits, l9_bits, l10_bits, + l11_bits, l12_bits, l13_bits, l14_bits, l15_bits, l16_bits, l17_bits, l18_bits, l19_bits, l20_bits, + l21_bits, l22_bits, l23_bits, l24_bits, l25_bits, l26_bits, l27_bits, l28_bits, l29_bits, l30_bits, + l31_bits, l32_bits, l33_bits, l34_bits, l35_bits, l36_bits, l37_bits, l38_bits, l39_bits, l40_bits, + l41_bits, l42_bits, l43_bits, l44_bits, l45_bits, l46_bits, l47_bits, l48_bits, l49_bits, l50_bits, + l51_bits, l52_bits, l53_bits, l54_bits, l55_bits, l56_bits, l57_bits, l58_bits, l59_bits, l60_bits, + l61_bits, l62_bits, l63_bits, l64_bits, l65_bits, l66_bits, l67_bits, l68_bits, l69_bits, l70_bits, + l71_bits, l72_bits, l73_bits, l74_bits, l75_bits, l76_bits, l77_bits, l78_bits, l79_bits, l80_bits, + l81_bits, l82_bits, l83_bits, l84_bits, l85_bits, l86_bits, l87_bits, l88_bits, l89_bits, l90_bits, + l91_bits, l92_bits, l93_bits, l94_bits, l95_bits, l96_bits, l97_bits, l98_bits, l99_bits, }; -static EXPORT long layerRawColorTab[] = { - wRGB( 0, 0,255), /* blue */ - wRGB( 0, 0,128), /* dk blue */ - wRGB( 0,128, 0), /* dk green */ - wRGB(255,255, 0), /* yellow */ - wRGB( 0,255, 0), /* green */ - wRGB( 0,255,255), /* lt cyan */ - wRGB(128, 0, 0), /* brown */ - wRGB(128, 0,128), /* purple */ - wRGB(128,128, 0), /* green-brown */ - wRGB(255, 0,255)}; /* lt-purple */ -static EXPORT wDrawColor layerColorTab[COUNT(layerRawColorTab)]; +static long layerRawColorTab[] = { + wRGB(0, 0,255), /* blue */ + wRGB(0, 0,128), /* dk blue */ + wRGB(0,128, 0), /* dk green */ + wRGB(255,255, 0), /* yellow */ + wRGB(0,255, 0), /* green */ + wRGB(0,255,255), /* lt cyan */ + wRGB(128, 0, 0), /* brown */ + wRGB(128, 0,128), /* purple */ + wRGB(128,128, 0), /* green-brown */ + wRGB(255, 0,255) +}; /* lt-purple */ +static wDrawColor layerColorTab[COUNT(layerRawColorTab)]; static wWin_p layerW; @@ -392,7 +425,7 @@ static wDrawColor layerColor; static long layerVisible = TRUE; static long layerFrozen = FALSE; static long layerOnMap = TRUE; -static void LayerOk( void * ); +static void LayerOk(void *); static BOOL_T layerRedrawMap = FALSE; #define ENUMLAYER_RELOAD (1) @@ -406,24 +439,24 @@ static paramIntegerRange_t i0_20 = { 0, NUM_BUTTONS }; static paramData_t layerPLs[] = { #define I_LIST (0) - { PD_DROPLIST, NULL, "layer", PDO_LISTINDEX|PDO_DLGNOLABELALIGN, (void*)250 }, + { PD_DROPLIST, NULL, "layer", PDO_LISTINDEX|PDO_DLGNOLABELALIGN, (void*)250 }, #define I_NAME (1) - { PD_STRING, layerName, "name", PDO_NOPREF, (void*)(250-54), N_("Name") }, + { PD_STRING, layerName, "name", PDO_NOPREF, (void*)(250-54), N_("Name") }, #define I_COLOR (2) - { PD_COLORLIST, &layerColor, "color", PDO_NOPREF, NULL, N_("Color") }, + { PD_COLORLIST, &layerColor, "color", PDO_NOPREF, NULL, N_("Color") }, #define I_VIS (3) - { PD_TOGGLE, &layerVisible, "visible", PDO_NOPREF, visibleLabels, N_("Visible"), BC_HORZ|BC_NOBORDER }, + { PD_TOGGLE, &layerVisible, "visible", PDO_NOPREF, visibleLabels, N_("Visible"), BC_HORZ|BC_NOBORDER }, #define I_FRZ (4) - { PD_TOGGLE, &layerFrozen, "frozen", PDO_NOPREF|PDO_DLGHORZ, frozenLabels, N_("Frozen"), BC_HORZ|BC_NOBORDER }, + { PD_TOGGLE, &layerFrozen, "frozen", PDO_NOPREF|PDO_DLGHORZ, frozenLabels, N_("Frozen"), BC_HORZ|BC_NOBORDER }, #define I_MAP (5) - { PD_TOGGLE, &layerOnMap, "onmap", PDO_NOPREF|PDO_DLGHORZ, onMapLabels, N_("On Map"), BC_HORZ|BC_NOBORDER }, + { PD_TOGGLE, &layerOnMap, "onmap", PDO_NOPREF|PDO_DLGHORZ, onMapLabels, N_("On Map"), BC_HORZ|BC_NOBORDER }, #define I_COUNT (6) - { PD_STRING, NULL, "object-count", PDO_NOPREF|PDO_DLGBOXEND, (void*)(80), N_("Count"), BO_READONLY }, - { PD_MESSAGE, N_("Personal Preferences"), NULL, PDO_DLGRESETMARGIN, (void *)180 }, - { PD_BUTTON, (void*)DoLayerOp, "reset", PDO_DLGRESETMARGIN, 0, N_("Load"), 0, (void *)ENUMLAYER_RELOAD }, - { PD_BUTTON, (void*)DoLayerOp, "save", PDO_DLGHORZ, 0, N_("Save"), 0, (void *)ENUMLAYER_SAVE }, - { PD_BUTTON, (void*)DoLayerOp, "clear", PDO_DLGHORZ | PDO_DLGBOXEND, 0, N_("Defaults"), 0, (void *)ENUMLAYER_CLEAR }, - { PD_LONG, &newLayerCount, "button-count", PDO_DLGBOXEND|PDO_DLGRESETMARGIN, &i0_20, N_("Number of Layer Buttons") }, + { PD_STRING, NULL, "object-count", PDO_NOPREF|PDO_DLGBOXEND, (void*)(80), N_("Count"), BO_READONLY }, + { PD_MESSAGE, N_("Personal Preferences"), NULL, PDO_DLGRESETMARGIN, (void *)180 }, + { PD_BUTTON, (void*)DoLayerOp, "reset", PDO_DLGRESETMARGIN, 0, N_("Load"), 0, (void *)ENUMLAYER_RELOAD }, + { PD_BUTTON, (void*)DoLayerOp, "save", PDO_DLGHORZ, 0, N_("Save"), 0, (void *)ENUMLAYER_SAVE }, + { PD_BUTTON, (void*)DoLayerOp, "clear", PDO_DLGHORZ | PDO_DLGBOXEND, 0, N_("Defaults"), 0, (void *)ENUMLAYER_CLEAR }, + { PD_LONG, &newLayerCount, "button-count", PDO_DLGBOXEND|PDO_DLGRESETMARGIN, &i0_20, N_("Number of Layer Buttons") }, }; static paramGroup_t layerPG = { "layer", 0, layerPLs, sizeof layerPLs/sizeof layerPLs[0] }; @@ -433,120 +466,125 @@ static paramGroup_t layerPG = { "layer", 0, layerPLs, sizeof layerPLs/sizeof lay /** * Load the layer settings to hard coded system defaults */ - + void -LayerSystemDefaults( void ) +LayerSystemDefaults(void) { - int inx; - - for ( inx=0;inx0?'+':'-', layers[inx].name ); - wListAddValue( layerL, message, NULL, NULL ); - } - - sprintf( message, "%2d : %s", inx+1, layers[inx].name ); - wListAddValue( setLayerL, message, NULL, NULL ); - } - - /* set current layer to selected */ - wListSetIndex( setLayerL, curLayer ); - if ( layerL ) - wListSetIndex( layerL, curLayer ); + int inx; + /* clear both lists */ + wListClear(setLayerL); + + if (layerL) { + wListClear(layerL); + } + + /* add all layers to both lists */ + for (inx=0; inx= 0 && inx < NUM_LAYERS ) - layers[inx].objCount++; - } + int inx; + track_p trk; + + for (inx=0; inx= 0 && inx < NUM_LAYERS) { + layers[inx].objCount++; + } + } } /** @@ -722,16 +766,16 @@ EXPORT void LayerSetCounts( void ) * from the preferences file. */ -EXPORT void +void DefaultLayerProperties(void) { - InitializeLayers( LayerPrefLoad, 0 ); + InitializeLayers(LayerPrefLoad, 0); + UpdateLayerDlg(); - UpdateLayerDlg(); - if( layoutLayerChanged ) { - MainProc( mainW, wResize_e, NULL ); - layoutLayerChanged = FALSE; - } + if (layoutLayerChanged) { + MainProc(mainW, wResize_e, NULL); + layoutLayerChanged = FALSE; + } } /** @@ -739,158 +783,190 @@ DefaultLayerProperties(void) * */ -static void LayerUpdate( void ) +static void LayerUpdate(void) { - BOOL_T redraw; - ParamLoadData( &layerPG ); - if (layerCurrent < 0 || layerCurrent >= NUM_LAYERS) - return; - if (layerCurrent == curLayer && layerFrozen) { - NoticeMessage( MSG_LAYER_FREEZE, _("Ok"), NULL ); - layerFrozen = FALSE; - ParamLoadControl( &layerPG, I_FRZ ); - } - if (layerCurrent == curLayer && !layerVisible) { - NoticeMessage( MSG_LAYER_HIDE, _("Ok"), NULL ); - layerVisible = TRUE; - ParamLoadControl( &layerPG, I_VIS ); - } - - if( strcmp( layers[(int)layerCurrent].name, layerName ) || - layerColor != layers[(int)layerCurrent].color || - layers[(int)layerCurrent].visible != (BOOL_T)layerVisible || - layers[(int)layerCurrent].frozen != (BOOL_T)layerFrozen || - layers[(int)layerCurrent].onMap != (BOOL_T)layerOnMap ) { - - changed = TRUE; - SetWindowTitle(); - } - - if ( layerL ) { - strncpy( layers[(int)layerCurrent].name, layerName, sizeof layers[(int)layerCurrent].name ); - sprintf( message, "%2d %c %s", (int)layerCurrent+1, layers[(int)layerCurrent].objCount>0?'+':'-', layers[(int)layerCurrent].name ); - wListSetValues( layerL, layerCurrent, message, NULL, NULL ); - } - - sprintf( message, "%2d : %s", (int)layerCurrent+1, layers[(int)layerCurrent].name ); - wListSetValues( setLayerL, layerCurrent, message, NULL, NULL ); - if (layerCurrent < NUM_BUTTONS) { - if (strlen(layers[(int)layerCurrent].name)>0) - wControlSetBalloonText( (wControl_p)layer_btns[(int)layerCurrent], layers[(int)layerCurrent].name ); - else - wControlSetBalloonText( (wControl_p)layer_btns[(int)layerCurrent], _("Show/Hide Layer") ); - } - redraw = ( layerColor != layers[(int)layerCurrent].color || - (BOOL_T)layerVisible != layers[(int)layerCurrent].visible ); - if ( (!layerRedrawMap) && redraw) - RedrawLayer( (LAYER_T)layerCurrent, FALSE ); - - SetLayerColor( layerCurrent, layerColor ); - - if (layerCurrent0) { + wControlSetBalloonText((wControl_p)layer_btns[(int)layerCurrent], + layers[(int)layerCurrent].name); + } else { + wControlSetBalloonText((wControl_p)layer_btns[(int)layerCurrent], + _("Show/Hide Layer")); + } + } + + redraw = (layerColor != layers[(int)layerCurrent].color || + (BOOL_T)layerVisible != layers[(int)layerCurrent].visible); + + if ((!layerRedrawMap) && redraw) { + RedrawLayer((unsigned int)layerCurrent, FALSE); + } + + SetLayerColor(layerCurrent, layerColor); + + if (layerCurrent= NUM_LAYERS) - return; - layerCurrent = (LAYER_T)inx; - strcpy( layerName, layers[inx].name ); - layerVisible = layers[inx].visible; - layerFrozen = layers[inx].frozen; - layerOnMap = layers[inx].onMap; - layerColor = layers[inx].color; - sprintf( message, "%ld", layers[inx].objCount ); - - ParamLoadMessage( &layerPG, I_COUNT, message ); - ParamLoadControls( &layerPG ); + LayerUpdate(); + + if (inx < 0 || inx >= NUM_LAYERS) { + return; + } + + layerCurrent = (unsigned int)inx; + strcpy(layerName, layers[inx].name); + layerVisible = layers[inx].visible; + layerFrozen = layers[inx].frozen; + layerOnMap = layers[inx].onMap; + layerColor = layers[inx].color; + sprintf(message, "%ld", layers[inx].objCount); + ParamLoadMessage(&layerPG, I_COUNT, message); + ParamLoadControls(&layerPG); } -EXPORT void ResetLayers( void ) +void ResetLayers(void) { - int inx; - for ( inx=0;inx NUM_BUTTONS ) - newLayerCount = NUM_BUTTONS; - layerCount = newLayerCount; - } - if (layoutLayerChanged) - MainProc( mainW, wResize_e, NULL ); - wHide( layerW ); + LayerSelect(layerCurrent); + + if (newLayerCount != layerCount) { + layoutLayerChanged = TRUE; + + if (newLayerCount > NUM_BUTTONS) { + newLayerCount = NUM_BUTTONS; + } + + layerCount = newLayerCount; + } + + if (layoutLayerChanged) { + MainProc(mainW, wResize_e, NULL); + } + + wHide(layerW); } static void LayerDlgUpdate( - paramGroup_p pg, - int inx, - void * valueP ) + paramGroup_p pg, + int inx, + void * valueP) { - switch (inx) { - case I_LIST: - LayerSelect( (wIndex_t)*(long*)valueP ); - break; - case I_NAME: - LayerUpdate(); - break; - case I_MAP: - layerRedrawMap = TRUE; - break; - } + switch (inx) { + case I_LIST: + LayerSelect((wIndex_t)*(long*)valueP); + break; + + case I_NAME: + LayerUpdate(); + break; + + case I_MAP: + layerRedrawMap = TRUE; + break; + } } -static void DoLayer( void * junk ) +static void DoLayer(void * junk) { - if (layerW == NULL) - layerW = ParamCreateDialog( &layerPG, MakeWindowTitle(_("Layers")), _("Done"), LayerOk, NULL, TRUE, NULL, 0, LayerDlgUpdate ); + if (layerW == NULL) { + layerW = ParamCreateDialog(&layerPG, MakeWindowTitle(_("Layers")), _("Done"), + LayerOk, NULL, TRUE, NULL, 0, LayerDlgUpdate); + } + + /* set the globals to the values for the current layer */ + UpdateLayerDlg(); + layerRedrawMap = FALSE; + wShow(layerW); + layoutLayerChanged = FALSE; +} - /* set the globals to the values for the current layer */ - UpdateLayerDlg(); - - layerRedrawMap = FALSE; - wShow( layerW ); - layoutLayerChanged = FALSE; +BOOL_T ReadLayers(char * line) +{ + char * name; + int inx, visible, frozen, color, onMap; + unsigned long rgb; + + /* older files didn't support layers */ + + if (paramVersion < 7) { + return TRUE; + } + + /* set the current layer */ + + if (strncmp(line, "CURRENT", 7) == 0) { + curLayer = atoi(line+7); + + if (!IsLayerValid(curLayer)) { + curLayer = 0; + } + + if (layerL) { + wListSetIndex(layerL, curLayer); + } + + if (setLayerL) { + wListSetIndex(setLayerL, curLayer); + } + + return TRUE; + } + + /* get the properties for a layer from the file and update the layer accordingly */ + + if (!GetArgs(line, "ddddu0000q", &inx, &visible, &frozen, &onMap, &rgb, + &name)) { + return FALSE; + } + + if (paramVersion < 9) { + if ((int)rgb < sizeof oldColorMap/sizeof oldColorMap[0]) { + rgb = wRGB(oldColorMap[(int)rgb][0], oldColorMap[(int)rgb][1], + oldColorMap[(int)rgb][2]); + } else { + rgb = 0; + } + } + + if (inx < 0 || inx >= NUM_LAYERS) { + return FALSE; + } + + color = wDrawFindColor(rgb); + SetLayerColor(inx, color); + strncpy(layers[inx].name, name, sizeof layers[inx].name); + layers[inx].visible = visible; + layers[inx].frozen = frozen; + layers[inx].onMap = onMap; + layers[inx].color = color; + + if (inx 0) { + wControlSetBalloonText((wControl_p)layer_btns[(int)inx], layers[inx].name); + } + + wButtonSetBusy(layer_btns[(int)inx], visible); + } + MyFree(name); + + return TRUE; } +/** + * Find out whether layer information should be saved to the layout file. + * Usually only layers where settings are off from the default are written. + * NOTE: as a fix for a problem with XTrkCadReader a layer definition is + * written for each layer that is used. + * + * \param layerNumber IN index of the layer + * \return TRUE if configured, FALSE if not + */ -EXPORT BOOL_T ReadLayers( char * line ) +bool +IsLayerConfigured(unsigned int layerNumber) { - char * name; - int inx, visible, frozen, color, onMap; - unsigned long rgb; - - /* older files didn't support layers */ - - if (paramVersion < 7) - return TRUE; - - /* set the current layer */ - - if ( strncmp( line, "CURRENT", 7 ) == 0 ) { - curLayer = atoi( line+7 ); - if ( curLayer < 0 ) - curLayer = 0; - - if (layerL) - wListSetIndex( layerL, curLayer ); - if (setLayerL) - wListSetIndex( setLayerL, curLayer ); - - return TRUE; - } - - /* get the properties for a layer from the file and update the layer accordingly */ - - if (!GetArgs( line, "ddddu0000q", &inx, &visible, &frozen, &onMap, &rgb, &name )) - return FALSE; - if (paramVersion < 9) { - if ( rgb >= 0 && (int)rgb < sizeof oldColorMap/sizeof oldColorMap[0] ) - rgb = wRGB( oldColorMap[(int)rgb][0], oldColorMap[(int)rgb][1], oldColorMap[(int)rgb][2] ); - else - rgb = 0; - } - if (inx < 0 || inx >= NUM_LAYERS) - return FALSE; - color = wDrawFindColor(rgb); - SetLayerColor( inx, color ); - strncpy( layers[inx].name, name, sizeof layers[inx].name ); - layers[inx].visible = visible; - layers[inx].frozen = frozen; - layers[inx].onMap = onMap; - layers[inx].color = color; - if (inx 0) { - wControlSetBalloonText( (wControl_p)layer_btns[(int)inx], layers[inx].name ); - } - wButtonSetBusy( layer_btns[(int)inx], visible ); - } - return TRUE; + return (!layers[layerNumber].visible || + layers[layerNumber].frozen || + !layers[layerNumber].onMap || + layers[layerNumber].color != + layerColorTab[layerNumber % (COUNT(layerColorTab))] || + layers[layerNumber].name[0] || + layers[layerNumber].objCount); } +/** + * Save the layer information to the file. + * + * \paran f IN open file handle + * \return always TRUE + */ -EXPORT BOOL_T WriteLayers( FILE * f ) +BOOL_T WriteLayers(FILE * f) { - int inx; - BOOL_T rc = TRUE; - for (inx=0; inx0; - rc &= fprintf( f, "LAYERS CURRENT %d\n", curLayer )>0; - return TRUE; + unsigned int inx; + + for (inx = 0; inx < NUM_LAYERS; inx++) { + if (IsLayerConfigured(inx)) { + fprintf(f, "LAYERS %u %d %d %d %ld %d %d %d %d \"%s\"\n", + inx, + layers[inx].visible, + layers[inx].frozen, + layers[inx].onMap, + wDrawGetRGB(layers[inx].color), + 0, 0, 0, 0, + PutTitle(layers[inx].name)); + } + } + + fprintf(f, "LAYERS CURRENT %u\n", curLayer); + return TRUE; } -EXPORT void InitLayers( void ) +void InitLayers(void) { - int i; - - wPrefGetInteger( PREFSECT, "layer-button-count", &layerCount, layerCount ); - for ( i = 0; i -#include "track.h" + #include "ccurve.h" +#include "cselect.h" +#include "custom.h" #include "i18n.h" +#include "messages.h" +#include "param.h" +#include "track.h" static paramIntegerRange_t i0_64 = { 0, 64 }; static paramIntegerRange_t i1_64 = { 1, 64 }; @@ -36,17 +41,16 @@ static paramIntegerRange_t i10_100 = { 10, 100 }; static paramFloatRange_t r0o1_1 = { 0.1, 1 }; static paramFloatRange_t r1_10 = { 1, 10 }; static paramFloatRange_t r1_1000 = { 1, 1000 }; -static paramFloatRange_t r1_10000 = { 1, 10000 }; -static paramFloatRange_t r0_90 = { 0, 90 }; static paramFloatRange_t r0_180 = { 0, 180 }; -static paramFloatRange_t r1_9999999 = { 1, 9999999 }; static void UpdatePrefD( void ); +static void UpdateMeasureFmt(void); + +static wIndex_t distanceFormatInx; EXPORT long enableBalloonHelp = 1; -static long GetChanges( - paramGroup_p pg ) +long GetChanges( paramGroup_p pg ) { long changes; long changed; @@ -73,8 +77,13 @@ static void OptionDlgUpdate( quickMove = *(long*)valueP; UpdateQuickMove(NULL); quickMove = quickMoveOld; - } else if ( pg->paramPtr[inx].valueP == &units ) { - UpdatePrefD(); + } else { + if (pg->paramPtr[inx].valueP == &units) { + UpdatePrefD(); + } + if (pg->paramPtr[inx].valueP == &distanceFormatInx) { + UpdateMeasureFmt(); + } } } @@ -86,121 +95,6 @@ static void OptionDlgCancel( wHide( win ); } -/**************************************************************************** - * - * Layout Dialog - * - */ - -static wWin_p layoutW; -static coOrd newSize; - -static paramData_t layoutPLs[] = { - { PD_FLOAT, &newSize.x, "roomsizeX", PDO_NOPREF|PDO_DIM|PDO_NOPSHUPD|PDO_DRAW, &r1_9999999, N_("Room Width"), 0, (void*)(CHANGE_MAIN|CHANGE_MAP) }, - { PD_FLOAT, &newSize.y, "roomsizeY", PDO_NOPREF|PDO_DIM|PDO_NOPSHUPD|PDO_DRAW|PDO_DLGHORZ, &r1_9999999, N_(" Height"), 0, (void*)(CHANGE_MAIN|CHANGE_MAP) }, - { PD_STRING, &Title1, "title1", PDO_NOPSHUPD, NULL, N_("Layout Title") }, - { PD_STRING, &Title2, "title2", PDO_NOPSHUPD, NULL, N_("Subtitle") }, - { PD_DROPLIST, &curScaleDescInx, "scale", PDO_NOPREF|PDO_NOPSHUPD|PDO_NORECORD|PDO_NOUPDACT, (void *)120, N_("Scale"), 0, (void*)(CHANGE_SCALE) }, - { PD_DROPLIST, &curGaugeInx, "gauge", PDO_NOPREF |PDO_NOPSHUPD|PDO_NORECORD|PDO_NOUPDACT|PDO_DLGHORZ, (void *)120, N_(" Gauge"), 0, (void *)(CHANGE_SCALE) }, - { PD_FLOAT, &minTrackRadius, "mintrackradius", PDO_DIM|PDO_NOPSHUPD|PDO_NOPREF, &r1_10000, N_("Min Track Radius"), 0, (void*)(CHANGE_MAIN|CHANGE_LIMITS) }, - { PD_FLOAT, &maxTrackGrade, "maxtrackgrade", PDO_NOPSHUPD|PDO_DLGHORZ, &r0_90 , N_(" Max Track Grade"), 0, (void*)(CHANGE_MAIN) } - }; - - -static paramGroup_t layoutPG = { "layout", PGO_RECORD|PGO_PREFMISC, layoutPLs, sizeof layoutPLs/sizeof layoutPLs[0] }; - -static void LayoutDlgUpdate( paramGroup_p pg, int inx, void * valueP ); - - -static void LayoutOk( void * junk ) -{ - long changes; - char prefString[ 30 ]; - - changes = GetChanges( &layoutPG ); - - /* [mf Nov. 15, 2005] Get the gauge/scale settings */ - if (changes & CHANGE_SCALE) { - SetScaleGauge( curScaleDescInx, curGaugeInx ); - } - /* [mf Nov. 15, 2005] end */ - - if (changes & CHANGE_MAP) { - SetRoomSize( newSize ); - } - - wHide( layoutW ); - DoChangeNotification(changes); - - if( changes & CHANGE_LIMITS ) { - // now set the minimum track radius - sprintf( prefString, "minTrackRadius-%s", curScaleName ); - wPrefSetFloat( "misc", prefString, minTrackRadius ); - } -} - - -static void LayoutChange( long changes ) -{ - if (changes & (CHANGE_SCALE|CHANGE_UNITS)) - if (layoutW != NULL && wWinIsVisible(layoutW) ) - ParamLoadControls( &layoutPG ); -} - - -static void DoLayout( void * junk ) -{ - newSize = mapD.size; - if (layoutW == NULL) { - layoutW = ParamCreateDialog( &layoutPG, MakeWindowTitle(_("Layout Options")), _("Ok"), LayoutOk, wHide, TRUE, NULL, 0, LayoutDlgUpdate ); - LoadScaleList( (wList_p)layoutPLs[4].control ); - } - LoadGaugeList( (wList_p)layoutPLs[5].control, curScaleDescInx ); /* set correct gauge list here */ - ParamLoadControls( &layoutPG ); - wShow( layoutW ); -} - - - -EXPORT addButtonCallBack_t LayoutInit( void ) -{ - ParamRegister( &layoutPG ); - RegisterChangeNotification( LayoutChange ); - return &DoLayout; -} - -/* [mf Nov. 15, 2005] Catch changes done in the LayoutDialog */ -static void -LayoutDlgUpdate( - paramGroup_p pg, - int inx, - void * valueP ) -{ - char prefString[ 100 ]; - char scaleDesc[ 100 ]; - - /* did the scale change ? */ - if( inx == 4 ) { - LoadGaugeList( (wList_p)layoutPLs[5].control, *((int *)valueP) ); - // set the first entry as default, usually the standard gauge for a scale - wListSetIndex( (wList_p)layoutPLs[5].control, 0 ); - - // get the minimum radius - // get the selected scale first - wListGetValues((wList_p)layoutPLs[4].control, scaleDesc, 99, NULL, NULL ); - // split of the name from the scale - strtok( scaleDesc, " " ); - - // now get the minimum track radius - sprintf( prefString, "minTrackRadius-%s", scaleDesc ); - wPrefGetFloat( "misc", prefString, &minTrackRadius, 0.0 ); - - // put the scale's minimum value into the dialog - wStringSetValue( (wString_p)layoutPLs[6].control, FormatDistance( minTrackRadius ) ); - } -} - -/* [mf Nov. 15, 2005] end */ /**************************************************************************** * @@ -213,6 +107,7 @@ static wWin_p displayW; static char * autoPanLabels[] = { N_("Auto Pan"), NULL }; static char * drawTunnelLabels[] = { N_("Hide"), N_("Dash"), N_("Normal"), NULL }; static char * drawEndPtLabels3[] = { N_("None"), N_("Turnouts"), N_("All"), NULL }; +static char * drawEndPtUnconnectedSize[] = { N_("Normal"), N_("Thick"), N_("Exception"), NULL }; static char * tiedrawLabels[] = { N_("None"), N_("Outline"), N_("Solid"), NULL }; static char * drawCenterCircle[] = { N_("Off"), N_("On"), NULL }; static char * labelEnableLabels[] = { N_("Track Descriptions"), N_("Lengths"), N_("EndPt Elevations"), N_("Track Elevations"), N_("Cars"), NULL }; @@ -221,6 +116,7 @@ static char * listLabelsLabels[] = { N_("Manuf"), N_("Part No"), N_("Descr"), NU static char * colorLayersLabels[] = { N_("Tracks"), N_("Other"), NULL }; static char * liveMapLabels[] = { N_("Live Map"), NULL }; static char * hideTrainsInTunnelsLabels[] = { N_("Hide Trains On Hidden Track"), NULL }; +static char * zoomCornerLabels[] = {N_("Zoom keeps lower corner in view"), NULL}; extern long trainPause; @@ -228,10 +124,12 @@ static paramData_t displayPLs[] = { { PD_TOGGLE, &colorLayers, "color-layers", PDO_NOPSHUPD|PDO_DRAW, colorLayersLabels, N_("Color Layers"), BC_HORZ, (void*)(CHANGE_MAIN) }, { PD_RADIO, &drawTunnel, "tunnels", PDO_NOPSHUPD|PDO_DRAW, drawTunnelLabels, N_("Draw Tunnel"), BC_HORZ, (void*)(CHANGE_MAIN) }, { PD_RADIO, &drawEndPtV, "endpt", PDO_NOPSHUPD|PDO_DRAW, drawEndPtLabels3, N_("Draw EndPts"), BC_HORZ, (void*)(CHANGE_MAIN) }, + { PD_RADIO, &drawUnconnectedEndPt, "unconnected-endpt", PDO_NOPSHUPD|PDO_DRAW, drawEndPtUnconnectedSize, N_("Draw Unconnected EndPts"), BC_HORZ, (void*)(CHANGE_MAIN) }, { PD_RADIO, &tieDrawMode, "tiedraw", PDO_NOPSHUPD|PDO_DRAW, tiedrawLabels, N_("Draw Ties"), BC_HORZ, (void*)(CHANGE_MAIN) }, { PD_RADIO, ¢erDrawMode, "centerdraw", PDO_NOPSHUPD|PDO_DRAW, drawCenterCircle, N_("Draw Centers"), BC_HORZ, (void*)(CHANGE_MAIN | CHANGE_MAP) }, { PD_LONG, &twoRailScale, "tworailscale", PDO_NOPSHUPD, &i1_64, N_("Two Rail Scale"), 0, (void*)(CHANGE_MAIN) }, { PD_LONG, &mapScale, "mapscale", PDO_NOPSHUPD, &i1_256, N_("Map Scale"), 0, (void*)(CHANGE_MAP) }, + { PD_TOGGLE, &zoomCorner, "zoom-corner", PDO_NOPSHUPD, zoomCornerLabels, "", BC_HORZ }, { PD_TOGGLE, &liveMap, "livemap", PDO_NOPSHUPD, liveMapLabels, "", BC_HORZ }, { PD_TOGGLE, &autoPan, "autoPan", PDO_NOPSHUPD, autoPanLabels, "", BC_HORZ }, { PD_TOGGLE, &labelEnable, "labelenable", PDO_NOPSHUPD, labelEnableLabels, N_("Label Enable"), 0, (void*)(CHANGE_MAIN) }, @@ -241,7 +139,7 @@ static paramData_t displayPLs[] = { { PD_TOGGLE, &layoutLabels, "layoutlabels", PDO_NOPSHUPD, listLabelsLabels, N_("Layout Labels"), BC_HORZ, (void*)(CHANGE_MAIN) }, { PD_TOGGLE, &listLabels, "listlabels", PDO_NOPSHUPD, listLabelsLabels, N_("List Labels"), BC_HORZ, (void*)(CHANGE_PARAMS) }, /* ATTENTION: update the define below if you add entries above */ -#define I_HOTBARLABELS (15) +#define I_HOTBARLABELS (17) { PD_DROPLIST, &carHotbarModeInx, "carhotbarlabels", PDO_NOPSHUPD|PDO_DLGUNDERCMDBUTT|PDO_LISTINDEX, (void*)250, N_("Car Labels"), 0, (void*)CHANGE_SCALE }, { PD_LONG, &trainPause, "trainpause", PDO_NOPSHUPD, &i10_1000 , N_("Train Update Delay"), 0, 0 }, { PD_TOGGLE, &hideTrainsInTunnels, "hideTrainsInTunnels", PDO_NOPSHUPD, hideTrainsInTunnelsLabels, "", BC_HORZ } @@ -312,7 +210,7 @@ static char * moveQlabels[] = { N_("End-Points"), NULL }; -static char * preSelectLabels[] = { N_("Describe"), N_("Select"), NULL }; +static char * preSelectLabels[] = { N_("Properties"), N_("Select"), NULL }; #ifdef HIDESELECTIONWINDOW static char * hideSelectionWindowLabels[] = { N_("Hide"), NULL }; @@ -374,7 +272,6 @@ EXPORT addButtonCallBack_t CmdoptInit( void ) static wWin_p prefW; static long displayUnits; -static wIndex_t distanceFormatInx; static char * unitsLabels[] = { N_("English"), N_("Metric"), NULL }; static char * angleSystemLabels[] = { N_("Polar"), N_("Cartesian"), NULL }; static char * enableBalloonHelpLabels[] = { N_("Balloon Help"), NULL }; @@ -384,14 +281,14 @@ static paramData_t prefPLs[] = { { PD_RADIO, &angleSystem, "anglesystem", PDO_NOPSHUPD, angleSystemLabels, N_("Angles"), BC_HORZ }, { PD_RADIO, &units, "units", PDO_NOPSHUPD|PDO_NOUPDACT, unitsLabels, N_("Units"), BC_HORZ, (void*)(CHANGE_MAIN|CHANGE_UNITS) }, #define I_DSTFMT (2) - { PD_DROPLIST, &distanceFormatInx, "dstfmt", PDO_NOPSHUPD|PDO_LISTINDEX, (void*)150, N_("Length Format"), 0, (void*)(CHANGE_MAIN|CHANGE_UNITS) }, + { PD_DROPLIST, &distanceFormatInx, "dstfmt", PDO_DIM|PDO_NOPSHUPD|PDO_LISTINDEX, (void*)150, N_("Length Format"), 0, (void*)(CHANGE_MAIN|CHANGE_UNITS) }, { PD_FLOAT, &minLength, "minlength", PDO_DIM|PDO_SMALLDIM|PDO_NOPSHUPD, &r0o1_1, N_("Min Track Length") }, { PD_FLOAT, &connectDistance, "connectdistance", PDO_DIM|PDO_SMALLDIM|PDO_NOPSHUPD, &r0o1_1, N_("Connection Distance"), }, { PD_FLOAT, &connectAngle, "connectangle", PDO_NOPSHUPD, &r1_10, N_("Connection Angle") }, { PD_FLOAT, &turntableAngle, "turntable-angle", PDO_NOPSHUPD, &r0_180, N_("Turntable Angle") }, { PD_LONG, &maxCouplingSpeed, "coupling-speed-max", PDO_NOPSHUPD, &i10_100, N_("Max Coupling Speed"), 0 }, { PD_TOGGLE, &enableBalloonHelp, "balloonhelp", PDO_NOPSHUPD, enableBalloonHelpLabels, "", BC_HORZ }, - { PD_LONG, &dragPixels, "dragpixels", PDO_NOPSHUPD|PDO_DRAW, &r1_1000, N_("Drag Distance") }, + { PD_LONG, &dragPixels, "dragpixels", PDO_NOPSHUPD|PDO_DRAW, &i1_1000, N_("Drag Distance") }, { PD_LONG, &dragTimeout, "dragtimeout", PDO_NOPSHUPD|PDO_DRAW, &i1_1000, N_("Drag Timeout") }, { PD_LONG, &minGridSpacing, "mingridspacing", PDO_NOPSHUPD|PDO_DRAW, &i1_100, N_("Min Grid Spacing"), 0, 0 }, { PD_LONG, &checkPtInterval, "checkpoint", PDO_NOPSHUPD|PDO_FILE, &i0_10000, N_("Check Point") }, @@ -458,6 +355,10 @@ static void LoadDstFmtList( void ) wListAddValue( (wList_p)prefPLs[I_DSTFMT].control, _(dstFmts[units][inx].name), NULL, (void*)dstFmts[units][inx].fmt ); } +/** +* Handle changing of measurement system. The list of number formats is loaded +* and the first entry is selected as default value. +*/ static void UpdatePrefD( void ) { @@ -467,41 +368,75 @@ static void UpdatePrefD( void ) if ( prefW==NULL || (!wWinIsVisible(prefW)) || prefPLs[1].control==NULL ) return; newUnits = wRadioGetValue( (wChoice_p)prefPLs[1].control ); - if ( newUnits == displayUnits ) - return; - oldUnits = units; - units = newUnits; - for ( inx = 0; inx 10.0) { + connectAngle = 10.0; + resetValuesHigh = TRUE; } if (connectDistance < 0.1) { connectDistance = 0.1; - resetValues = TRUE; + resetValuesLow = TRUE; + } else if (connectDistance > 1.0) { + connectDistance = 1.0; + resetValuesHigh = TRUE; } if (minLength < 0.1) { minLength = 0.1; - resetValues = TRUE; + resetValuesLow = TRUE; + } else if (minLength > 1.0) { + minLength = 1.0; + resetValuesHigh = TRUE; } - if ( resetValues ) { + if ( resetValuesLow ) { NoticeMessage2( 0, MSG_CONN_PARAMS_TOO_SMALL, _("Ok"), NULL ) ; } + if ( resetValuesHigh ) { + NoticeMessage2( 0, MSG_CONN_PARAMS_TOO_BIG, _("Ok"), NULL ) ; + } + wHide( prefW ); DoChangeNotification(changes); diff --git a/app/bin/dpricels.c b/app/bin/dpricels.c index 7e17121..87df88b 100644 --- a/app/bin/dpricels.c +++ b/app/bin/dpricels.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/dpricels.c,v 1.2 2008-01-20 23:29:15 mni77 Exp $ +/** \file dpricels.c + * Price List Dialog */ /* XTrkCad - Model Railroad CAD @@ -19,16 +19,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include -#include "track.h" #include "compound.h" +#include "custom.h" #include "i18n.h" - -/***************************************************************************** - * - * Price List Dialog - * - */ +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "track.h" static wWin_p priceListW; @@ -115,8 +114,8 @@ static void PriceListChange( long changes ) priceListW == NULL || !wWinIsVisible( priceListW ) ) return; wListClear( priceListSelL ); - to1 = TurnoutAdd( listLabels|LABEL_COST, curScaleInx, priceListSelL, NULL, -1 ); - to2 = StructAdd( listLabels|LABEL_COST, curScaleInx, priceListSelL, NULL ); + to1 = TurnoutAdd( listLabels|LABEL_COST, GetLayoutCurScale(), priceListSelL, NULL, -1 ); + to2 = StructAdd( listLabels|LABEL_COST, GetLayoutCurScale(), priceListSelL, NULL ); if (to1 == NULL) to1 = to2; priceListCurrent = NULL; diff --git a/app/bin/dprmfile.c b/app/bin/dprmfile.c index e9cfc80..24250e7 100644 --- a/app/bin/dprmfile.c +++ b/app/bin/dprmfile.c @@ -20,19 +20,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include "track.h" -#include "i18n.h" - +#include #include +#include +#include -#define PARAM_SUBDIR FILE_SEP_CHAR "params" - -/**************************************************************************** - * - * Param File Management - * - */ +#include "custom.h" +#include "fileio.h" +#include "i18n.h" +#include "messages.h" +#include "param.h" +#include "paths.h" +#include "track.h" typedef struct { char * name; @@ -83,8 +82,9 @@ static BOOL_T UpdateParamFiles( void ) long updateTime; long lastTime; - sprintf( message, "%s%sxtrkcad.upd", libDir, FILE_SEP_CHAR ); - updateF = fopen( message, "r" ); + MakeFullpath(&fileNameP, libDir, "xtrkcad.upd", NULL); + updateF = fopen( fileNameP, "r" ); + free(fileNameP); if ( updateF == NULL ) return FALSE; if ( fgets( message, sizeof message, updateF ) == NULL ) { @@ -95,14 +95,15 @@ static BOOL_T UpdateParamFiles( void ) updateTime = atol( message ); if ( lastTime >= updateTime ) return FALSE; - sprintf( fileName, "%s%sparams%s", libDir, FILE_SEP_CHAR, FILE_SEP_CHAR ); - fileNameP = fileName+strlen(fileName); - while ( ( fgets( fileNameP, (fileName+sizeof fileName)-fileNameP, updateF ) ) != NULL ) { - Stripcr( fileNameP ); - InfoMessage( _("Updating %s"), fileNameP ); - paramF = fopen( fileName, "r" ); + + while ( ( fgets( fileName, STR_LONG_SIZE, updateF ) ) != NULL ) { + Stripcr( fileName ); + InfoMessage( _("Updating %s"), fileName ); + MakeFullpath(&fileNameP, libDir, "params", fileName, NULL); + paramF = fopen( fileNameP, "r" ); if ( paramF == NULL ) { - NoticeMessage( MSG_PRMFIL_OPEN_NEW, _("Ok"), NULL, fileName ); + NoticeMessage( MSG_PRMFIL_OPEN_NEW, _("Ok"), NULL, fileNameP ); + free(fileNameP); continue; } contents = NULL; @@ -115,25 +116,29 @@ static BOOL_T UpdateParamFiles( void ) } fclose( paramF ); if (contents == NULL) { - NoticeMessage( MSG_PRMFIL_NO_CONTENTS, _("Ok"), NULL, fileName ); + NoticeMessage( MSG_PRMFIL_NO_CONTENTS, _("Ok"), NULL, fileNameP ); + free(fileNameP); continue; } cp = wPrefGetString( "Parameter File Map", contents ); - wPrefSetString( "Parameter File Map", contents, fileName ); + wPrefSetString( "Parameter File Map", contents, fileNameP ); if (cp!=NULL && *cp!='\0') { /* been there, done that */ + free(fileNameP); continue; } DYNARR_APPEND( paramFileInfo_t, paramFileInfo_da, 10 ); curParamFileIndex = paramFileInfo_da.cnt-1; - paramFileInfo(curParamFileIndex).name = MyStrdup( fileName ); + paramFileInfo(curParamFileIndex).name = MyStrdup( fileNameP ); curContents = curSubContents = NULL; paramFileInfo(curParamFileIndex).deleted = FALSE; paramFileInfo(curParamFileIndex).valid = TRUE; paramFileInfo(curParamFileIndex).deletedShadow = - paramFileInfo(curParamFileIndex).deleted = !ReadParams( 0, NULL, fileName ); + paramFileInfo(curParamFileIndex).deleted = !ReadParams( 0, NULL, fileNameP ); paramFileInfo(curParamFileIndex).contents = curContents; + + free(fileNameP); } wPrefSetInteger( "file", "updatetime", updateTime ); return TRUE; @@ -194,6 +199,7 @@ EXPORT void RememberParamFiles( void ) *cp = ' '; } wPrefSetString( "Parameter File Names", message, contents ); + wPrefSetString("Parameter File Map", contents, paramFileInfo(fileInx).name); } } sprintf( message, "File%d", fileNo++ ); @@ -278,8 +284,6 @@ EXPORT int LoadParamFile( char ** fileName, void * data ) { - char * cp; - char *name; wIndex_t inx; int i = 0; @@ -354,8 +358,6 @@ static void UpdateParamFileButton( wIndex_t selcnt = wListGetSelectedCount( paramFileL ); wIndex_t inx, cnt; - void * data; - // set the default wButtonSetLabel( paramFileActionB, _("Unload")); paramFilePLs[ I_PRMFILACTION ].context = FALSE; @@ -400,7 +402,6 @@ static void ParamFileAction( void * action ) wIndex_t selcnt = wListGetSelectedCount( paramFileL ); wIndex_t inx, cnt; wIndex_t fileInx; - void * data; unsigned newDeletedState; if( action ) @@ -522,8 +523,10 @@ static void DoParamFiles( void * junk ) strcpy( curParamDir, dir ); else { // in case there is no preference setting, use the installation's param directory as default - strcpy( curParamDir, libDir ); - strcat( curParamDir, PARAM_SUBDIR ); + char *str; + MakeFullpath(&str, libDir, PARAM_SUBDIR, NULL); + strcpy( curParamDir, str ); + free(str); } mtbox_bm = wIconCreateBitMap( mtbox_width, mtbox_height, mtbox_bits, drawColorBlack ); chkbox_bm = wIconCreateBitMap( chkbox_width, chkbox_height, chkbox_bits, drawColorBlack ); diff --git a/app/bin/draw.c b/app/bin/draw.c index 92814e0..3f25830 100644 --- a/app/bin/draw.c +++ b/app/bin/draw.c @@ -1,7 +1,5 @@ /** \file draw.c * Basic drawing functions. - * - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/draw.c,v 1.17 2009-12-12 17:20:59 m_fischer Exp $ */ /* XTrkCad - Model Railroad CAD @@ -24,6 +22,8 @@ #include #include +#include + #ifdef HAVE_MALLOC_C #include #endif @@ -40,12 +40,16 @@ #include #endif -#include "track.h" -#include "utility.h" -#include "misc.h" +#include "cselect.h" +#include "custom.h" #include "draw.h" -#include "i18n.h" #include "fileio.h" +#include "i18n.h" +#include "messages.h" +#include "misc.h" +#include "param.h" +#include "track.h" +#include "utility.h" static void DrawRoomWalls( wBool_t ); EXPORT void DrawMarkers( void ); @@ -57,6 +61,8 @@ static int log_mouse = 0; static wFontSize_t drawMaxTextFontSize = 100; +extern long zoomCorner; + /**************************************************************************** * * EXPORTED VARIABLES @@ -67,6 +73,7 @@ static wFontSize_t drawMaxTextFontSize = 100; #define INIT_MAP_SCALE (64.0) #define MAX_MAIN_SCALE (256.0) #define MIN_MAIN_SCALE (1.0) +#define MIN_MAIN_MACRO (0.10) // static char FAR message[STR_LONG_SIZE]; @@ -94,6 +101,7 @@ EXPORT DIST_T pixelBins = 80; */ static wPos_t infoHeight; +static wPos_t textHeight; EXPORT wWin_p mapW; EXPORT BOOL_T mapVisible; @@ -111,11 +119,11 @@ EXPORT wDrawColor exceptionColor; static wFont_p rulerFp; static struct { - wMessage_p scale_m; - wMessage_p count_m; - wMessage_p posX_m; - wMessage_p posY_m; - wMessage_p info_m; + wStatus_p scale_m; + wStatus_p count_m; + wStatus_p posX_m; + wStatus_p posY_m; + wStatus_p info_m; wPos_t scale_w; wPos_t count_w; wPos_t pos_w; @@ -462,33 +470,55 @@ EXPORT void DrawMultiString( coOrd * hi) { char * cp; + char * cp1; POS_T lineH, lineW; - coOrd size, textsize; + coOrd size, textsize, posl, orig; POS_T descent; + char *line; - DrawTextSize2( &mainD, "Aqjlp", fp, fs, TRUE, &textsize, &descent ); - lineH = textsize.y+descent; + if (!text || !*text) { + return; //No string or blank + } + line = malloc(strlen(text) + 1); + + DrawTextSize2( &mainD, "Aqjlp", fp, fs, TRUE, &textsize, &descent); + POS_T ascent = textsize.y-descent; + lineH = ascent+descent*1.5; size.x = 0.0; size.y = 0.0; - while (1) { - cp = message; + orig.x = pos.x; + orig.y = pos.y; + cp = line; // Build up message to hold all of the strings separated by nulls + while (*text) { + cp1 = cp; while (*text != '\0' && *text != '\n') *cp++ = *text++; *cp = '\0'; - DrawTextSize2( &mainD, message, fp, fs, TRUE, &textsize, &descent ); + DrawTextSize2( &mainD, cp1, fp, fs, TRUE, &textsize, &descent); lineW = textsize.x; if (lineW>size.x) size.x = lineW; - DrawString( d, pos, 0.0, message, fp, fs, color ); + posl.x = pos.x; + posl.y = pos.y; + Rotate( &posl, orig, a); + DrawString( d, posl, a, cp1, fp, fs, color ); pos.y -= lineH; size.y += lineH; - if (*text) + if (*text == '\0') break; text++; + cp++; + } + if (lo) { + lo->x = posl.x; + lo->y = posl.y-descent; + } + if (hi) { + hi->x = posl.x+size.x; + hi->y = posl.y+ascent; } - *lo = pos; - hi->x = pos.x; - hi->y = pos.y+size.y; + + free(line); } @@ -613,6 +643,52 @@ EXPORT void DrawTextSize( DrawTextSize2( dp, text, fp, fs, relative, size, &descent ); } +EXPORT void DrawMultiLineTextSize( + drawCmd_p dp, + char * text, + wFont_p fp, + wFontSize_t fs, + BOOL_T relative, + coOrd * size, + coOrd * lastline ) +{ + POS_T descent, lineW, lineH; + coOrd textsize, blocksize; + + char *cp; + char *line = malloc(strlen(text) + 1); + + DrawTextSize2( &mainD, "Aqlip", fp, fs, TRUE, &textsize, &descent); + POS_T ascent = textsize.y-descent; + lineH = ascent+descent*1.5; + blocksize.x = 0; + blocksize.y = 0; + lastline->x = 0; + lastline->y = 0; + while (text && *text != '\0' ) { + cp = line; + while (*text != '\0' && *text != '\n') + *cp++ = *text++; + *cp = '\0'; + blocksize.y += lineH; + DrawTextSize2( &mainD, line, fp, fs, TRUE, &textsize, &descent); + lineW = textsize.x; + if (lineW>blocksize.x) + blocksize.x = lineW; + lastline->x = textsize.x; + if (*text =='\n') { + lastline->y -= lineH; + lastline->x = 0; + } + if (*text == '\0') + break; + text++; + } + size->x = blocksize.x; + size->y = blocksize.y; + free(line); +} + static void DDrawBitMap( drawCmd_p d, coOrd p, wDrawBitMap_p bm, wDrawColor color) { @@ -689,7 +765,7 @@ static void TempSegString( tempSegs(tempSegs_da.cnt-1).u.t.angle = a; tempSegs(tempSegs_da.cnt-1).u.t.fontP = fp; tempSegs(tempSegs_da.cnt-1).u.t.fontSize = fontSize; - tempSegs(tempSegs_da.cnt-1).u.t.string = s; + tempSegs(tempSegs_da.cnt-1).u.t.string = MyStrdup(s); } @@ -792,6 +868,8 @@ static wPos_t info_yb_offset = 2; static wPos_t info_ym_offset = 3; static wPos_t six = 2; static wPos_t info_xm_offset = 2; +static wPos_t messageOrControlX = 0; +static wPos_t messageOrControlY = 0; #define NUM_INFOCTL (4) static wControl_p curInfoControl[NUM_INFOCTL]; static wPos_t curInfoLabelWidth[NUM_INFOCTL]; @@ -827,9 +905,9 @@ static wPos_t GetInfoPosWidth( void ) dist = 9.0*12.0+11.0+3.0/4.0-1.0/64.0; } - labelWidth = (wLabelWidth( xLabel ) > wLabelWidth( yLabel ) ? wLabelWidth( xLabel ):wLabelWidth( yLabel )); + labelWidth = (wStatusGetWidth( xLabel ) > wStatusGetWidth( yLabel ) ? wStatusGetWidth( xLabel ):wStatusGetWidth( yLabel )); - return wLabelWidth( FormatDistance(dist) ) + labelWidth; + return wStatusGetWidth( FormatDistance(dist) ) + labelWidth; } /** @@ -841,35 +919,43 @@ EXPORT void InitInfoBar( void ) { wPos_t width, height, y, yb, ym, x, boxH; wWinGetSize( mainW, &width, &height ); - infoHeight = 3 + wMessageGetHeight( 0L ) + 3; - y = height - infoHeight; + infoHeight = 3 + wStatusGetHeight( COMBOBOX ) + 3; + textHeight = wStatusGetHeight(0L); + y = height - max(infoHeight,textHeight)-10; + +#ifdef WINDOWS y -= 19; /* Kludge for MSW */ - infoD.pos_w = GetInfoPosWidth() + 2; - infoD.scale_w = wLabelWidth( "999:1" ) + wLabelWidth( zoomLabel ) + 6; - /* we do not use the count label for the moment */ - infoD.count_w = 0; - infoD.info_w = width - infoD.pos_w*2 - infoD.scale_w - infoD.count_w - 45; +#endif + + infoD.pos_w = GetInfoPosWidth() + 2; + infoD.scale_w = wStatusGetWidth( "999:1" ) + wStatusGetWidth( zoomLabel ) + 6; + /* we do not use the count label for the moment */ + infoD.count_w = 0; + infoD.info_w = width - 20 - infoD.pos_w*2 - infoD.scale_w - infoD.count_w - 45; // Allow Window to resize down if (infoD.info_w <= 0) { infoD.info_w = 10; } yb = y+info_yb_offset; - ym = y+info_ym_offset; - boxH = infoHeight-5; - x = 0; + ym = y+(infoHeight-textHeight)/2; + boxH = infoHeight; + x = 2; infoD.scale_b = wBoxCreate( mainW, x, yb, NULL, wBoxBelow, infoD.scale_w, boxH ); - infoD.scale_m = wMessageCreate( mainW, x+info_xm_offset, ym, "infoBarScale", infoD.scale_w-six, zoomLabel ); + infoD.scale_m = wStatusCreate( mainW, x+info_xm_offset, ym, "infoBarScale", infoD.scale_w-six, zoomLabel); x += infoD.scale_w + 10; infoD.posX_b = wBoxCreate( mainW, x, yb, NULL, wBoxBelow, infoD.pos_w, boxH ); - infoD.posX_m = wMessageCreate( mainW, x+info_xm_offset, ym, "infoBarPosX", infoD.pos_w-six, xLabel ); + infoD.posX_m = wStatusCreate( mainW, x+info_xm_offset, ym, "infoBarPosX", infoD.pos_w-six, xLabel ); x += infoD.pos_w + 5; infoD.posY_b = wBoxCreate( mainW, x, yb, NULL, wBoxBelow, infoD.pos_w, boxH ); - infoD.posY_m = wMessageCreate( mainW, x+info_xm_offset, ym, "infoBarPosY", infoD.pos_w-six, yLabel ); + infoD.posY_m = wStatusCreate( mainW, x+info_xm_offset, ym, "infoBarPosY", infoD.pos_w-six, yLabel ); x += infoD.pos_w + 10; + messageOrControlX = x+info_xm_offset; //Remember Position + messageOrControlY = ym; infoD.info_b = wBoxCreate( mainW, x, yb, NULL, wBoxBelow, infoD.info_w, boxH ); - infoD.info_m = wMessageCreate( mainW, x+info_xm_offset, ym, "infoBarStatus", infoD.info_w-six, "" ); + infoD.info_m = wStatusCreate( mainW, x+info_xm_offset, ym, "infoBarStatus", infoD.info_w-six, "" ); } + static void SetInfoBar( void ) { wPos_t width, height, y, yb, ym, x, boxH; @@ -877,23 +963,23 @@ static void SetInfoBar( void ) static long oldDistanceFormat = -1; long newDistanceFormat; wWinGetSize( mainW, &width, &height ); - y = height - infoHeight; + y = height - max(infoHeight,textHeight)-10; newDistanceFormat = GetDistanceFormat(); if ( newDistanceFormat != oldDistanceFormat ) { infoD.pos_w = GetInfoPosWidth() + 2; wBoxSetSize( infoD.posX_b, infoD.pos_w, infoHeight-5 ); - wMessageSetWidth( infoD.posX_m, infoD.pos_w-six ); + wStatusSetWidth( infoD.posX_m, infoD.pos_w-six ); wBoxSetSize( infoD.posY_b, infoD.pos_w, infoHeight-5 ); - wMessageSetWidth( infoD.posY_m, infoD.pos_w-six ); + wStatusSetWidth( infoD.posY_m, infoD.pos_w-six ); } - infoD.info_w = width - infoD.pos_w*2 - infoD.scale_w - infoD.count_w - 40 + 4; + infoD.info_w = width - 20 - infoD.pos_w*2 - infoD.scale_w - infoD.count_w - 40 + 4; if (infoD.info_w <= 0) { infoD.info_w = 10; } yb = y+info_yb_offset; - ym = y+info_ym_offset; - boxH = infoHeight-5; - wWinClear( mainW, 0, y, width, infoHeight ); + ym = y+(infoHeight-textHeight)/2; + boxH = infoHeight; + wWinClear( mainW, 0, y, width-20, infoHeight ); x = 0; wControlSetPos( (wControl_p)infoD.scale_b, x, yb ); wControlSetPos( (wControl_p)infoD.scale_m, x+info_xm_offset, ym ); @@ -907,18 +993,18 @@ static void SetInfoBar( void ) wControlSetPos( (wControl_p)infoD.info_b, x, yb ); wControlSetPos( (wControl_p)infoD.info_m, x+info_xm_offset, ym ); wBoxSetSize( infoD.info_b, infoD.info_w, boxH ); - wMessageSetWidth( infoD.info_m, infoD.info_w-six ); + wStatusSetWidth( infoD.info_m, infoD.info_w-six ); + messageOrControlX = x+info_xm_offset; + messageOrControlY = ym; if (curInfoControl[0]) { - x = wControlGetPosX( (wControl_p)infoD.info_m ); -#ifndef WINDOWS - yb -= 2; -#endif for ( inx=0; curInfoControl[inx]; inx++ ) { x += curInfoLabelWidth[inx]; - wControlSetPos( curInfoControl[inx], x, yb ); + int y_this = ym + (textHeight/2) - (wControlGetHeight( curInfoControl[inx] )/2); + wControlSetPos( curInfoControl[inx], x, y_this ); x += wControlGetWidth( curInfoControl[inx] )+3; wControlShow( curInfoControl[inx], TRUE ); } + wControlSetPos( (wControl_p)infoD.info_m, x+info_xm_offset, ym ); //Move to end } } @@ -929,7 +1015,7 @@ static void InfoScale( void ) sprintf( message, "%s%0.0f:1", zoomLabel, mainD.scale ); else sprintf( message, "%s1:%0.0f", zoomLabel, floor(1/mainD.scale+0.5) ); - wMessageSetValue( infoD.scale_m, message ); + wStatusSetValue( infoD.scale_m, message ); } EXPORT void InfoCount( wIndex_t count ) @@ -942,38 +1028,13 @@ EXPORT void InfoCount( wIndex_t count ) EXPORT void InfoPos( coOrd pos ) { -#ifdef LATER - wPos_t ww, hh; - DIST_T w, h; -#endif - wPos_t x, y; - + DrawMarkers(); sprintf( message, "%s%s", xLabel, FormatDistance(pos.x) ); - wMessageSetValue( infoD.posX_m, message ); + wStatusSetValue( infoD.posX_m, message ); sprintf( message, "%s%s", yLabel, FormatDistance(pos.y) ); - wMessageSetValue( infoD.posY_m, message ); -#ifdef LATER - wDrawGetSize( mainD.d, &ww, &hh ); - w = (DIST_T)(ww/mainD.dpi); - h = (DIST_T)(hh/mainD.dpi); - /*wDrawClip( mainD.d, 0, 0, w, h );*/ -#endif - mainD.CoOrd2Pix(&mainD,oldMarker,&x,&y); - wDrawLine( mainD.d, 0, y, (wPos_t)(LBORDER), y, - 0, wDrawLineSolid, markerColor, wDrawOptTemp ); - wDrawLine( mainD.d, x, 0, x, (wPos_t)(BBORDER), - 0, wDrawLineSolid, markerColor, wDrawOptTemp ); - - mainD.CoOrd2Pix(&mainD,pos,&x,&y); - wDrawLine( mainD.d, 0, y, (wPos_t)(LBORDER), y, - 0, wDrawLineSolid, markerColor, wDrawOptTemp ); - wDrawLine( mainD.d, x, 0, x, (wPos_t)(BBORDER), - 0, wDrawLineSolid, markerColor, wDrawOptTemp ); -#ifdef LATER - /*wDrawClip( mainD.d, LBORDER, BBORDER, - w-(LBORDER+RBORDER), h-(BBORDER+TBORDER) );*/ -#endif + wStatusSetValue( infoD.posY_m, message ); oldMarker = pos; + DrawMarkers(); } static wControl_p deferSubstituteControls[NUM_INFOCTL+1]; @@ -998,94 +1059,34 @@ EXPORT void InfoSubstituteControls( memcpy( deferSubstituteLabels, labels, sizeof deferSubstituteLabels ); } if ( inError || controls == NULL || controls[0]==NULL ) { + wControlSetPos( (wControl_p)infoD.info_m, messageOrControlX, messageOrControlY); wControlShow( (wControl_p)infoD.info_m, TRUE ); return; } - x = wControlGetPosX( (wControl_p)infoD.info_m ); - y = wControlGetPosY( (wControl_p)infoD.info_m ); -#ifndef WINDOWS - y -= 3; -#endif - wMessageSetValue( infoD.info_m, "" ); + //x = wControlGetPosX( (wControl_p)infoD.info_m ); + x = messageOrControlX; + y = messageOrControlY; + wStatusSetValue( infoD.info_m, "" ); wControlShow( (wControl_p)infoD.info_m, FALSE ); for ( inx=0; controls[inx]; inx++ ) { curInfoLabelWidth[inx] = wLabelWidth(_(labels[inx])); x += curInfoLabelWidth[inx]; - wControlSetPos( controls[inx], x, y ); + int y_this = y + (textHeight/2) - (wControlGetHeight( controls[inx] )/2); + wControlSetPos( controls[inx], x, y_this ); x += wControlGetWidth( controls[inx] ); wControlSetLabel( controls[inx], _(labels[inx]) ); wControlShow( controls[inx], TRUE ); curInfoControl[inx] = controls[inx]; x += 3; } + wControlSetPos( (wControl_p)infoD.info_m, x, y ); curInfoControl[inx] = NULL; deferSubstituteControls[0] = NULL; } - -#ifdef LATER -EXPORT void InfoSubstituteControl( - wControl_p control1, - char * label1, - wControl_p control2, - char * label2 ) -{ - wControl_p controls[3]; - wPos_t widths[2]; - - if (control1 == NULL) { - InfoSubstituteControls( NULL, NULL ); - } else { - controls[0] = control1; - controls[1] = control2; - controls[2] = NULL; - widths[0] = wLabelWidth( label1 ); - if (label2) - widths[1] = wLabelWidth( label2 ); - else - widths[1] = 0; - InfoSubstituteControls( controls, widths ); -#ifdef LATER - if (curInfoControl[0]) { - wControlShow( curInfoControl[0], FALSE ); - curInfoControl[0] = NULL; - } - if (curInfoControl[1]) { - wControlShow( curInfoControl[1], FALSE ); - curInfoControl[1] = NULL; - } - wControlShow( (wControl_p)infoD.info_m, TRUE ); - } else { - if (curInfoControl[0]) - wControlShow( curInfoControl[0], FALSE ); - if (curInfoControl[1]) - wControlShow( curInfoControl[1], FALSE ); - x = wControlGetPosX( (wControl_p)infoD.info_m ); - y = wControlGetPosY( (wControl_p)infoD.info_m ); - curInfoLabelWidth[0] = wLabelWidth( label1 ); - x += curInfoLabelWidth[0]; - wControlShow( (wControl_p)infoD.info_m, FALSE ); - wControlSetPos( control1, x, y ); - wControlShow( control1, TRUE ); - curInfoControl[0] = control1; - curInfoControl[1] = NULL; - if (control2 != NULL) { - curInfoLabelWidth[1] = wLabelWidth( label2 ); - x = wControlBeside( curInfoControl[0] ) + 10; - x += curInfoLabelWidth[1]+10; - wControlSetPos( control2, x, y ); - wControlShow( control2, TRUE ); - curInfoControl[1] = control2; - } -#endif - } -} -#endif - - EXPORT void SetMessage( char * msg ) { - wMessageSetValue( infoD.info_m, msg ); + wStatusSetValue( infoD.info_m, msg ); } @@ -1289,8 +1290,15 @@ lprintf("mainRedraw\n"); wDrawDelayUpdate( mainD.d, FALSE ); } +/** + * The wlib event handler for the main window. + * + * \param win wlib window information + * \param e the wlib event + * \param data additional data (unused) + */ -EXPORT void MainProc( wWin_p win, winProcEvent e, void * data ) +void MainProc( wWin_p win, winProcEvent e, void * data ) { wPos_t width, height; switch( e ) { @@ -1300,31 +1308,28 @@ EXPORT void MainProc( wWin_p win, winProcEvent e, void * data ) DrawMapBoundingBox( FALSE ); wWinGetSize( mainW, &width, &height ); LayoutToolBar(); - height -= (toolbarHeight+infoHeight); + height -= (toolbarHeight+max(infoHeight,textHeight)+10); if (height >= 0) { - wDrawSetSize( mainD.d, width, height ); + wDrawSetSize( mainD.d, width-20, height ); wControlSetPos( (wControl_p)mainD.d, 0, toolbarHeight ); SetMainSize(); ConstraintOrig( &mainD.orig, mainD.size ); tempD.orig = mainD.orig; SetInfoBar(); MainRedraw(); + MapRedraw(); wPrefSetInteger( "draw", "mainwidth", width ); wPrefSetInteger( "draw", "mainheight", height ); - } - DrawMapBoundingBox( TRUE ); + } else DrawMapBoundingBox( TRUE ); + break; + case wState_e: + wPrefSetInteger( "draw", "maximized", wWinIsMaximized(win) ); break; case wQuit_e: - if (changed && - NoticeMessage( MSG_SAVE_CHANGES, _("Save"), _("Quit"))) - DoSave(NULL); - - CleanupFiles(); - SaveState(); CleanupCustom(); break; case wClose_e: - /* shutdown the application */ + /* shutdown the application via "close window" button */ DoQuit(); break; default: @@ -1380,9 +1385,7 @@ static void DrawRoomWalls( wBool_t t ) if (mainD.d == NULL) return; -#ifdef LATER - wDrawGetDim( mainD.d, &w, &h ); -#endif + DrawTicks( &mainD, mapD.size ); p01.x = p10.y = 0.0; @@ -1390,10 +1393,7 @@ static void DrawRoomWalls( wBool_t t ) p01.y = p11.y = mapD.size.y; DrawLine( &mainD, p01, p11, 3, t?borderColor:wDrawColorWhite ); DrawLine( &mainD, p11, p10, 3, t?borderColor:wDrawColorWhite ); -#ifdef LATER - /*wDrawClip( mainD.d, LBORDER, BBORDER, - w-(LBORDER+RBORDER), h-(BBORDER+TBORDER) );*/ -#endif + } @@ -1591,6 +1591,7 @@ EXPORT void DrawTicks( drawCmd_p d, coOrd size ) DIST_T offset; offset = 0.0; + if ( d->orig.x<0.0 ) offset = d->orig.x; p0.x = 0.0/*d->orig.x*/; p1.x = size.x; @@ -1599,6 +1600,7 @@ EXPORT void DrawTicks( drawCmd_p d, coOrd size ) p0.y = p1.y = min(d->orig.y + d->size.y, size.y); DrawRuler( d, p0, p1, offset, FALSE, TRUE, borderColor ); offset = 0.0; + if ( d->orig.y<0.0 ) offset = d->orig.y; p0.y = 0.0/*d->orig.y*/; p1.y = max(size.y,0.0); @@ -1630,6 +1632,7 @@ static void ConstraintOrig( coOrd * orig, coOrd size ) LOG( log_pan, 2, ( "ConstraintOrig [ %0.3f, %0.3f ] RoomSize(%0.3f %0.3f), WxH=%0.3fx%0.3f", orig->x, orig->y, mapD.size.x, mapD.size.y, size.x, size.y ) ) + if (orig->x+size.x > mapD.size.x ) { orig->x = mapD.size.x-size.x; orig->x += (units==UNITS_ENGLISH?1.0:(1.0/2.54)); @@ -1639,17 +1642,26 @@ LOG( log_pan, 2, ( "ConstraintOrig [ %0.3f, %0.3f ] RoomSize(%0.3f %0.3f), WxH=% if (orig->y+size.y > mapD.size.y ) { orig->y = mapD.size.y-size.y; orig->y += (units==UNITS_ENGLISH?1.0:1.0/2.54); - + } if (orig->y < 0) orig->y = 0; + if (mainD.scale >= 1.0) { if (units == UNITS_ENGLISH) { - orig->x = floor(orig->x); - orig->y = floor(orig->y); + orig->x = floor(orig->x*4)/4; //>1:1 = 1/4 inch + orig->y = floor(orig->y*4)/4; } else { - orig->x = floor(orig->x*2.54)/2.54; - orig->y = floor(orig->y*2.54)/2.54; + orig->x = floor(orig->x*2.54*2)/(2.54*2); //>1:1 = 0.5 cm + orig->y = floor(orig->y*2.54*2)/(2.54*2); + } + } else { + if (units == UNITS_ENGLISH) { + orig->x = floor(orig->x*64)/64; //<1:1 = 1/64 inch + orig->y = floor(orig->y*64)/64; + } else { + orig->x = floor(orig->x*25.4*2)/(25.4*2); //>1:1 = 0.5 mm + orig->y = floor(orig->y*25.4*2)/(25.4*2); } } orig->x = (long)(orig->x*pixelBins+0.5)/pixelBins; @@ -1719,11 +1731,27 @@ static int ScaleInx( DIST_T scale ) for ( inx=0; inx= 0 && i < ( sizeof zoomList/sizeof zoomList[0] - 1 )) - DoNewScale( zoomList[ i + 1 ].value ); + if (i < 0) i = NearestScaleInx(mainD.scale, TRUE); + if( i>= 0 && i < ( sizeof zoomList/sizeof zoomList[0] - 1 )) { + InfoMessage(_("Use Shift+PageUp to jump to preset Zoom Out")); + DoNewScale( zoomList[ i + 1 ].value ); + } else + InfoMessage(_("At Maximum Zoom Out")); + } else if ( (MyGetKeyState()&WKEY_CTRL) == 0 ) { wPrefGetInteger( "misc", "zoomout", &newScale, 16 ); + InfoMessage(_("Preset Zoom Out Value selected. Shift+Ctrl+PageUp to reset value")); DoNewScale( newScale ); } else { wPrefSetInteger( "misc", "zoomout", (long)mainD.scale ); - InfoMessage( _("Zoom Out Program Value %ld:1"), (long)mainD.scale ); + InfoMessage( _("Zoom Out Program Value %ld:1 set, Shift+PageUp to use"), (long)mainD.scale ); } } @@ -1911,12 +1956,6 @@ LOG( log_pan, 2, ( "NEW = [ %0.3f, %0.3f ] \n", pos.x, pos.y ) ) if (!liveMap) MainRedraw(); LOG( log_pan, 1, ( "FINAL = [ %0.3f, %0.3f ]\n", pos.x, pos.y ) ) -#ifdef LATER - if (recordF) { - fprintf( recordF, "ORIG %0.3f %0.3f %0.3f\n", - mainD.scale, mainD.orig.x, mainD.orig.y ); - } -#endif mode = noPan; break; @@ -1928,11 +1967,6 @@ LOG( log_pan, 1, ( "FINAL = [ %0.3f, %0.3f ]\n", pos.x, pos.y ) ) DrawHilight( &mapD, mainD.orig, mainD.size ); newOrig = pos; oldOrig = newOrig; -#ifdef LATER - xscale = INIT_MAP_SCALE; - size.x = mapD.size.x/xscale; - size.y = mapD.size.y/xscale; -#endif xscale = 1; size.x = mainD.size.x/mainD.scale; size.y = mainD.size.y/mainD.scale; @@ -2001,43 +2035,48 @@ LOG( log_pan, 1, ( "FINAL = [ %0.3f, %0.3f ]\n", pos.x, pos.y ) ) return; case wAccelKey_F5: MainRedraw(); + MapRedraw(); return; #endif case wAccelKey_Right: - DrawHilight( &mapD, mainD.orig, mainD.size ); + //DrawHilight( &mapD, mainD.orig, mainD.size ); mainD.orig.x += mainD.size.x/2; ConstraintOrig( &mainD.orig, mainD.size ); mainCenter.x = mainD.orig.x + mainD.size.x/2.0; mainCenter.y = mainD.orig.y + mainD.size.y/2.0; MainRedraw(); - DrawHilight( &mapD, mainD.orig, mainD.size ); + MapRedraw(); + //DrawHilight( &mapD, mainD.orig, mainD.size ); break; case wAccelKey_Left: - DrawHilight( &mapD, mainD.orig, mainD.size ); + //DrawHilight( &mapD, mainD.orig, mainD.size ); mainD.orig.x -= mainD.size.x/2; ConstraintOrig( &mainD.orig, mainD.size ); mainCenter.x = mainD.orig.x + mainD.size.x/2.0; mainCenter.y = mainD.orig.y + mainD.size.y/2.0; MainRedraw(); - DrawHilight( &mapD, mainD.orig, mainD.size ); + MapRedraw(); + //DrawHilight( &mapD, mainD.orig, mainD.size ); break; case wAccelKey_Up: - DrawHilight( &mapD, mainD.orig, mainD.size ); + //DrawHilight( &mapD, mainD.orig, mainD.size ); mainD.orig.y += mainD.size.y/2; ConstraintOrig( &mainD.orig, mainD.size ); mainCenter.x = mainD.orig.x + mainD.size.x/2.0; mainCenter.y = mainD.orig.y + mainD.size.y/2.0; MainRedraw(); - DrawHilight( &mapD, mainD.orig, mainD.size ); + MapRedraw(); + //DrawHilight( &mapD, mainD.orig, mainD.size ); break; case wAccelKey_Down: - DrawHilight( &mapD, mainD.orig, mainD.size ); + //DrawHilight( &mapD, mainD.orig, mainD.size ); mainD.orig.y -= mainD.size.y/2; ConstraintOrig( &mainD.orig, mainD.size ); mainCenter.x = mainD.orig.x + mainD.size.x/2.0; mainCenter.y = mainD.orig.y + mainD.size.y/2.0; MainRedraw(); - DrawHilight( &mapD, mainD.orig, mainD.size ); + MapRedraw(); + //DrawHilight( &mapD, mainD.orig, mainD.size ); break; default: return; @@ -2167,6 +2206,12 @@ static void DoMouse( wAction_t action, coOrd pos ) break; case wActionExtKey: mainD.CoOrd2Pix(&mainD,pos,&x,&y); + if ((MyGetKeyState() & + (WKEY_SHIFT | WKEY_CTRL)) == (WKEY_SHIFT | WKEY_CTRL)) break; //Allow SHIFT+CTRL for Move + if (((action>>8)&0xFF) == wAccelKey_LineFeed) { + action = C_TEXT+((int)(0x0A<<8)); + break; + } switch ((wAccelKey_e)(action>>8)) { case wAccelKey_Del: SelectDelete(); @@ -2180,40 +2225,56 @@ static void DoMouse( wAction_t action, coOrd pos ) break; #endif case wAccelKey_Right: - DrawHilight( &mapD, mainD.orig, mainD.size ); - mainD.orig.x += mainD.size.x/2; + //DrawHilight( &mapD, mainD.orig, mainD.size ); + if ((MyGetKeyState() & WKEY_SHIFT) != 0) + mainD.orig.x += 0.25*mainD.scale; //~1cm in 1::1, 1ft in 30:1, 1mm in 10:1 + else + mainD.orig.x += mainD.size.x/2; ConstraintOrig( &mainD.orig, mainD.size ); mainCenter.x = mainD.orig.x + mainD.size.x/2.0; mainCenter.y = mainD.orig.y + mainD.size.y/2.0; MainRedraw(); - DrawHilight( &mapD, mainD.orig, mainD.size ); + MapRedraw(); + //DrawHilight( &mapD, mainD.orig, mainD.size ); break; case wAccelKey_Left: - DrawHilight( &mapD, mainD.orig, mainD.size ); - mainD.orig.x -= mainD.size.x/2; + //DrawHilight( &mapD, mainD.orig, mainD.size ); + if ((MyGetKeyState() & WKEY_SHIFT) != 0) + mainD.orig.x -= 0.25*mainD.scale; + else + mainD.orig.x -= mainD.size.x/2; ConstraintOrig( &mainD.orig, mainD.size ); mainCenter.x = mainD.orig.x + mainD.size.x/2.0; mainCenter.y = mainD.orig.y + mainD.size.y/2.0; MainRedraw(); - DrawHilight( &mapD, mainD.orig, mainD.size ); + MapRedraw(); + //DrawHilight( &mapD, mainD.orig, mainD.size ); break; case wAccelKey_Up: - DrawHilight( &mapD, mainD.orig, mainD.size ); - mainD.orig.y += mainD.size.y/2; + //DrawHilight( &mapD, mainD.orig, mainD.size ); + if ((MyGetKeyState() & WKEY_SHIFT) != 0) + mainD.orig.y += 0.25*mainD.scale; + else + mainD.orig.y += mainD.size.x/2; ConstraintOrig( &mainD.orig, mainD.size ); mainCenter.x = mainD.orig.x + mainD.size.x/2.0; mainCenter.y = mainD.orig.y + mainD.size.y/2.0; MainRedraw(); - DrawHilight( &mapD, mainD.orig, mainD.size ); + MapRedraw(); + //DrawHilight( &mapD, mainD.orig, mainD.size ); break; case wAccelKey_Down: - DrawHilight( &mapD, mainD.orig, mainD.size ); - mainD.orig.y -= mainD.size.y/2; + //DrawHilight( &mapD, mainD.orig, mainD.size ); + if ((MyGetKeyState() & WKEY_SHIFT) != 0) + mainD.orig.y -= 0.25*mainD.scale; + else + mainD.orig.y -= mainD.size.x/2; ConstraintOrig( &mainD.orig, mainD.size ); mainCenter.x = mainD.orig.x + mainD.size.x/2.0; mainCenter.y = mainD.orig.y + mainD.size.y/2.0; MainRedraw(); - DrawHilight( &mapD, mainD.orig, mainD.size ); + MapRedraw(); + //DrawHilight( &mapD, mainD.orig, mainD.size ); break; default: return; @@ -2222,9 +2283,9 @@ static void DoMouse( wAction_t action, coOrd pos ) InfoPos( pos ); return; case C_TEXT: - if ((action>>8) == 0x0D) + if ((action>>8) == 0x0D) { action = C_OK; - else if ((action>>8) == 0x1B) { + } else if ((action>>8) == 0x1B) { ConfirmReset( TRUE ); return; } @@ -2321,11 +2382,12 @@ static void DoMousew( wDraw_p d, void * context, wAction_t action, wPos_t x, wPo } ConstraintOrig( &orig, mainD.size ); if ( orig.x != mainD.orig.x || orig.y != mainD.orig.y ) { - DrawMapBoundingBox( FALSE ); + //DrawMapBoundingBox( FALSE ); mainD.orig = orig; MainRedraw(); + MapRedraw(); /*DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack );*/ - DrawMapBoundingBox( TRUE ); + //DrawMapBoundingBox( TRUE ); wFlush(); } } @@ -2384,8 +2446,10 @@ static void MapDlgUpdate( static void DrawChange( long changes ) { - if (changes & CHANGE_MAIN) + if (changes & CHANGE_MAIN) { MainRedraw(); + MapRedraw(); + } if (changes &CHANGE_UNITS) SetInfoBar(); if (changes & CHANGE_MAP) @@ -2397,9 +2461,10 @@ EXPORT void DrawInit( int initialZoom ) { wPos_t w, h; + wWinGetSize( mainW, &w, &h ); /*LayoutToolBar();*/ - h -= toolbarHeight+infoHeight; + h = h - (toolbarHeight+max(textHeight,infoHeight)+10); if ( w <= 0 ) w = 1; if ( h <= 0 ) h = 1; tempD.d = mainD.d = wDrawCreate( mainW, 0, toolbarHeight, "", BD_TICKS, @@ -2454,3 +2519,170 @@ EXPORT void DrawInit( int initialZoom ) wAttachAccelKey( wAccelKey_Pgdn, 0, (wAccelKeyCallBack_p)doZoomDown, NULL ); #endif } + +#include "bitmaps/pan.xpm" + +static STATUS_T CmdPan( + wAction_t action, + coOrd pos ) +{ + static enum { PAN, ZOOM, NONE } panmode; + + static coOrd base, size; + + DIST_T scale_x,scale_y; + + static coOrd start_pos; + if ( action == C_DOWN ) { + panmode = PAN; + } else if ( action == C_RDOWN) { + panmode = ZOOM; + } + + switch (action&0xFF) { + case C_START: + start_pos = zero; + panmode = NONE; InfoMessage(_("Left Drag to Pan, Right Drag to Zoom, 0 to set Origin to 0,0, 1-9 to Zoom#, e to set to Extent")); + break; + case C_DOWN: + panmode = PAN; + start_pos = pos; + InfoMessage(_("Pan Mode - drag point to new position")); + break; + case C_RDOWN: + panmode = ZOOM; + start_pos = pos; + base = pos; + size = zero; + InfoMessage(_("Zoom Mode - drag Area to Zoom")); + break; + case C_MOVE: + if (panmode == PAN) { + double min_inc; + if (mainD.scale >= 1.0) { + if (units == UNITS_ENGLISH) { + min_inc = 1/4; //>1:1 = 1/4 inch + } else { + min_inc = 1/(2.54*2); //>1:1 = 0.5 cm + } + } else { + if (units == UNITS_ENGLISH) { + min_inc = 1/64; //<1:1 = 1/64 inch + } else { + min_inc = 1/(25.4*2); //>1:1 = 0.5 mm + } + } + if ((fabs(pos.x-start_pos.x) > min_inc) || (fabs(pos.y-start_pos.y) > min_inc)) { + DrawMapBoundingBox( TRUE ); + mainD.orig.x -= (pos.x - start_pos.x); + mainD.orig.y -= (pos.y - start_pos.y); + ConstraintOrig( &mainD.orig, mainD.size ); + tempD.orig = mainD.orig; + mainCenter.x = mainD.orig.x + mainD.size.x/2.0; + mainCenter.y = mainD.orig.y + mainD.size.y/2.0; + DrawMapBoundingBox( TRUE ); + } + } + MainRedraw(); + break; + case C_RMOVE: + if (panmode == ZOOM) { + base = start_pos; + size.x = pos.x - base.x; + if (size.x < 0) { + size.x = - size.x ; + base.x = pos.x; + } + size.y = pos.y - base.y; + if (size.y < 0) { + size.y = - size.y; + base.y = pos.y; + } + } + MainRedraw(); + break; + case C_RUP: + + scale_x = size.x/mainD.size.x*mainD.scale; + scale_y = size.y/mainD.size.y*mainD.scale; + + if (scale_x1) scale_x = ceil( scale_x ); + else scale_x = 1/(ceil(1/scale_x)); + + if (scale_x > MAX_MAIN_SCALE) scale_x = MAX_MAIN_SCALE; + if (scale_x < MIN_MAIN_MACRO) scale_x = MIN_MAIN_MACRO; + + mainCenter.x = base.x + size.x/2.0; //Put center for scale in center of square + mainCenter.y = base.y + size.y/2.0; + mainD.orig.x = base.x; + mainD.orig.y = base.y; + + panmode = NONE; + DoNewScale(scale_x); + MapRedraw(); + break; + case C_UP: + panmode = NONE; + break; + case C_REDRAW: + if (panmode == ZOOM) { + if (base.x && base.y && size.x && size.y) + DrawHilight( &mainD, base, size ); + } + break; + case C_CANCEL: + base = zero; + return C_TERMINATE; + case C_TEXT: + panmode = NONE; + if ((action>>8) == 0x65) { //"e" + scale_x = mapD.size.x/(mainD.size.x/mainD.scale); + scale_y = mapD.size.y/(mainD.size.y/mainD.scale); + if (scale_x MAX_MAIN_SCALE) scale_x = MAX_MAIN_SCALE; + mainD.orig = zero; + mainCenter.x = mainD.orig.x + mapD.size.x/2.0; + mainCenter.y = mainD.orig.y + mapD.size.y/2.0; + DoNewScale(scale_x); + ConstraintOrig( &mainD.orig, mainD.size ); + mainCenter.x = mainD.orig.x + mainD.size.x/2.0; + mainCenter.y = mainD.orig.y + mainD.size.y/2.0; + MapRedraw(); + MainRedraw(); + } + if ((action>>8) == 0x30) { //"0" + mainD.orig = zero; + ConstraintOrig( &mainD.orig, mainD.size ); + mainCenter.x = mainD.orig.x + mainD.size.x/2.0; + mainCenter.y = mainD.orig.y + mainD.size.y/2.0; + MapRedraw(); + MainRedraw(); + } + if ((action>>8) >= 0x31 && (action>>8) <= 0x39) { //"1" to "9" + scale_x = (action>>8)&0x0F; + DoNewScale(scale_x); + MapRedraw(); + MainRedraw(); + } + if ((action>>8) == 0x0D) { + return C_TERMINATE; + } + else if ((action>>8) == 0x1B) { + return C_TERMINATE; + } + break; + } + + return C_CONTINUE; +} + +EXPORT void InitCmdPan( wMenu_p menu ) +{ + panCmdInx = AddMenuButton( menu, CmdPan, "cmdPan", _("Pan/Zoom"), wIconCreatePixMap(pan_xpm), + LEVEL0, IC_CANCEL|IC_POPUP|IC_LCLICK|IC_RCLICK|IC_CMDMENU, ACCL_PAN, NULL ); +} diff --git a/app/bin/draw.h b/app/bin/draw.h index db8d91a..6a7d806 100644 --- a/app/bin/draw.h +++ b/app/bin/draw.h @@ -1,5 +1,5 @@ /** \file draw.h - * + * Definitions and prototypes for drawing operations */ /* XTrkCad - Model Railroad CAD @@ -23,8 +23,8 @@ #ifndef DRAW_H #define DRAW_H -#define MSG_BASE (1000) -#include "messages.h" +#include "common.h" +#include "wlib.h" #define DC_TICKS (1<<1) #define DC_PRINT (1<<2) @@ -106,6 +106,7 @@ extern long drawCount; extern BOOL_T drawEnable; extern long currRedraw; + extern wDrawColor drawColorBlack; extern wDrawColor drawColorWhite; extern wDrawColor drawColorRed; @@ -117,6 +118,7 @@ extern wDrawColor drawColorGold; #define wDrawColorBlack drawColorBlack #define wDrawColorWhite drawColorWhite #define wDrawColorBlue drawColorBlue +#define wDrawColorRed drawColorRed extern wDrawColor markerColor; extern wDrawColor borderColor; @@ -167,8 +169,10 @@ void DrawHilightPolygon( drawCmd_p, coOrd *, int ); #define BOX_ARROW (4) #define BOX_BACKGROUND (5) void DrawBoxedString( int, drawCmd_p, coOrd, char *, wFont_p, wFontSize_t, wDrawColor, ANGLE_T ); -void DrawTextSize2( drawCmd_p, char *, wFont_p, wFontSize_t, BOOL_T, coOrd *, POS_T * ); +void DrawMultiLineTextSize(drawCmd_p dp, char * text, wFont_p fp, wFontSize_t fs, BOOL_T relative, coOrd * size, coOrd * lastline ); +void DrawTextSize2( drawCmd_p, char *, wFont_p, wFontSize_t, BOOL_T, coOrd *, POS_T *); void DrawTextSize( drawCmd_p, char *, wFont_p, wFontSize_t, BOOL_T, coOrd * ); +void DrawMultiString(drawCmd_p d, coOrd pos, char * text, wFont_p fp, wFontSize_t fs, wDrawColor color, ANGLE_T a, coOrd * lo, coOrd * hi); BOOL_T SetRoomSize( coOrd ); void GetRoomSize( coOrd * ); void DoRedraw( void ); @@ -192,6 +196,8 @@ void InfoPos( coOrd ); void InfoCount( wIndex_t ); void SetMessage( char * ); +wIndex_t panCmdInx; + void InfoSubstituteControls( wControl_p *, char * * ); void MapGrid( coOrd, coOrd, ANGLE_T, coOrd, ANGLE_T, POS_T, POS_T, int *, int *, int *, int * ); diff --git a/app/bin/drawgeom.c b/app/bin/drawgeom.c index 8ef31e8..6d4b237 100644 --- a/app/bin/drawgeom.c +++ b/app/bin/drawgeom.c @@ -17,14 +17,22 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include -#include "track.h" +#include + #include "ccurve.h" +#include "cbezier.h" #include "compound.h" +#include "cundo.h" #include "drawgeom.h" +#include "fileio.h" #include "i18n.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" -/*EXPORT drawContext_t * drawContext;*/ static long drawGeomCurveMode; #define contextSegs(N) DYNARR_N( trkSeg_t, context->Segs_da, N ) @@ -68,6 +76,7 @@ static void EndPoly( drawContext_t * context, int cnt ) segPtr->u.p.pts = pts; segPtr->u.p.angle = 0.0; segPtr->u.p.orig = zero; + segPtr->u.p.polyType = FREEFORM; UndoStart( _("Create Lines"), "newDraw" ); trk = MakeDrawFromSeg( zero, 0.0, segPtr ); DrawNewTrack( trk ); @@ -133,19 +142,38 @@ STATUS_T DrawGeomMouse( case wActionLDown: context->Started = TRUE; + if (context->State == 0) { //First Down only + switch (context->Op) { //Snap pos to nearest line end point if this is end and just shift is depressed for lines and some curves + case OP_LINE: + case OP_CURVE1: + if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_SHIFT ) { + coOrd p = pos; + track_p t; + if ((t=OnTrack(&p,FALSE,FALSE))) { + if (GetClosestEndPt(t,&p)) { + pos = p; + } + } + }; + break; + default: + ; + } + } if ((context->Op == OP_CURVE1 || context->Op == OP_CURVE2 || context->Op == OP_CURVE3 || context->Op == OP_CURVE4) && context->State == 1) { ; } else { - if ( (MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_CTRL ) + if ( (MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_CTRL ) // Control snaps to nearest track (not necessarily the end) OnTrack( &pos, FALSE, FALSE ); pos0 = pos; pos1 = pos; } + switch (context->Op) { case OP_LINE: case OP_DIMLINE: case OP_BENCH: - if ( lastValid && ( MyGetKeyState() & WKEY_SHIFT ) ) { + if ( lastValid && ( MyGetKeyState() & WKEY_CTRL ) ) { pos = pos0 = lastPos; } DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); @@ -166,7 +194,7 @@ STATUS_T DrawGeomMouse( context->message( _("Drag to place next end point") ); break; case OP_TBLEDGE: - if ( lastValid && ( MyGetKeyState() & WKEY_SHIFT ) ) { + if ( lastValid && ( MyGetKeyState() & WKEY_CTRL ) ) { pos = pos0 = lastPos; } OnTableEdgeEndPt( NULL, &pos ); @@ -278,8 +306,8 @@ STATUS_T DrawGeomMouse( break; case OP_CURVE1: case OP_CURVE2: case OP_CURVE3: case OP_CURVE4: if (context->State == 0) { + CreateCurve( C_MOVE, pos, FALSE, context->Color, width, drawGeomCurveMode, context->message ); pos0x = pos; - CreateCurve( C_MOVE, pos, TRUE, context->Color, width, drawGeomCurveMode, context->message ); } else { PlotCurve( drawGeomCurveMode, pos0, pos0x, pos1, &context->ArcData, FALSE ); tempSegs(0).color = context->Color; @@ -346,6 +374,7 @@ STATUS_T DrawGeomMouse( else DrawSegs( context->D, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); context->D->funcs->options = oldOptions; + if (context->Op == OP_DIMLINE) MainRedraw(); //Wipe Out Text return C_CONTINUE; case wActionLUp: @@ -355,6 +384,45 @@ STATUS_T DrawGeomMouse( DrawSegs( context->D, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); lastValid = FALSE; createTrack = FALSE; + if ((context->State == 0 && (context->Op == OP_LINE )) || //first point release for line, + (context->State == 1 && context->Op == OP_CURVE1)) { //second point for curve from end + switch (context->Op) { //Snap pos to nearest line end point if this is on a line and just shift is depressed for lines and some curves + case OP_CURVE1: + case OP_LINE: + if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_SHIFT ) { + coOrd p = pos1; + track_p t; + if ((t=OnTrack(&p,FALSE,FALSE))) { + if (GetClosestEndPt(t,&p)) { + pos1 = p; + if (context->Op == OP_LINE) { + tempSegs(0).u.l.pos[1] = p; + } else { + PlotCurve( drawGeomCurveMode, pos0, pos0x, pos1, &context->ArcData, FALSE ); + if (context->ArcData.type == curveTypeStraight) { + tempSegs(0).type = SEG_STRLIN; + tempSegs(0).u.l.pos[0] = pos0; + tempSegs(0).u.l.pos[1] = context->ArcData.pos1; + tempSegs_da.cnt = 1; + } else if (context->ArcData.type == curveTypeNone) { + tempSegs_da.cnt = 0; + } else if (context->ArcData.type == curveTypeCurve) { + tempSegs(0).type = SEG_CRVLIN; + tempSegs(0).u.c.center = context->ArcData.curvePos; + tempSegs(0).u.c.radius = context->ArcData.curveRadius; + tempSegs(0).u.c.a0 = context->ArcData.a0; + tempSegs(0).u.c.a1 = context->ArcData.a1; + tempSegs_da.cnt = 1; + } + } + } + } + }; + break; + default: + ; + } + } switch ( context->Op ) { case OP_LINE: case OP_DIMLINE: @@ -368,7 +436,7 @@ STATUS_T DrawGeomMouse( context->State = 1; context->ArcAngle = FindAngle( pos0, pos1 ); pos0x = pos1; - CreateCurve( C_UP, pos, TRUE, context->Color, width, drawGeomCurveMode, context->message ); + CreateCurve( C_UP, pos, FALSE, context->Color, width, drawGeomCurveMode, context->message ); DrawSegs( context->D, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); segCnt = tempSegs_da.cnt; context->message( _("Drag on Red arrows to adjust curve") ); @@ -417,17 +485,16 @@ STATUS_T DrawGeomMouse( break; case OP_BOX: case OP_FILLBOX: - if ( context->Op == OP_FILLBOX ) { - pts = (coOrd*)MyMalloc( 4 * sizeof *(coOrd*)NULL ); - for ( inx=0; inx<4; inx++ ) - pts[inx] = tempSegs(inx).u.l.pos[0]; - tempSegs(0).type = SEG_FILPOLY; - tempSegs(0).u.p.cnt = 4; - tempSegs(0).u.p.pts = pts; - tempSegs(0).u.p.angle = 0.0; - tempSegs(0).u.p.orig = zero; - tempSegs_da.cnt = 1; - } + pts = (coOrd*)MyMalloc( 4 * sizeof *(coOrd*)NULL ); + for ( inx=0; inx<4; inx++ ) + pts[inx] = tempSegs(inx).u.l.pos[0]; + tempSegs(0).type = (context->Op == OP_FILLBOX)?SEG_FILPOLY:SEG_POLY; + tempSegs(0).u.p.cnt = 4; + tempSegs(0).u.p.pts = pts; + tempSegs(0).u.p.angle = 0.0; + tempSegs(0).u.p.orig = zero; + tempSegs(0).u.p.polyType = RECTANGLE; + tempSegs_da.cnt = 1; /*drawContext = context; DrawGeomOp( (void*)context->Op );*/ break; @@ -445,6 +512,7 @@ STATUS_T DrawGeomMouse( return C_TERMINATE; case wActionText: + if ( ((action>>8)&0xFF) == 0x0D || ((action>>8)&0xFF) == ' ' ) { EndPoly(context, segCnt); @@ -453,6 +521,7 @@ STATUS_T DrawGeomMouse( return C_TERMINATE; case C_CANCEL: + oldOptions = context->D->funcs->options; context->D->funcs->options |= wDrawOptTemp; DrawSegs( context->D, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); @@ -487,18 +556,21 @@ STATUS_T DrawGeomModify( { ANGLE_T a; coOrd p0, p1, pc; + static coOrd start_pos; static wIndex_t segInx; static EPINX_T segEp; static ANGLE_T segA1; - static int polyInx; - int inx; - DIST_T d, dd; + static int polyInx, inx_other, inx_line, inx_origin; + static BOOL_T corner_mode; + int inx, inx1, inx2; + DIST_T d, d1, d2, dd; coOrd * newPts; int mergePoints; - + tempSegs_da.cnt = 1; switch ( action ) { case C_DOWN: segInx = -1; + corner_mode = FALSE; DistanceSegs( orig, angle, segCnt, segPtr, &pos, &segInx ); if (segInx == -1) return C_ERROR; @@ -523,7 +595,7 @@ STATUS_T DrawGeomModify( REORIGIN( pc, segPtr[segInx].u.c.center, angle, orig ) tempSegs(0).type = segPtr[segInx].type; tempSegs(0).u.c.center = pc; - tempSegs(0).u.c.radius = segPtr[segInx].u.c.radius; + tempSegs(0).u.c.radius = fabs(segPtr[segInx].u.c.radius); if (segPtr[segInx].u.c.a1 >= 360.0) { tempSegs(0).u.c.a0 = 0.0; tempSegs(0).u.c.a1 = 360.0; @@ -531,8 +603,8 @@ STATUS_T DrawGeomModify( tempSegs(0).u.c.a0 = NormalizeAngle( segPtr[segInx].u.c.a0+angle ); tempSegs(0).u.c.a1 = segPtr[segInx].u.c.a1; segA1 = NormalizeAngle( segPtr[segInx].u.c.a0 + segPtr[segInx].u.c.a1 + angle ); - PointOnCircle( &p0, pc, segPtr[segInx].u.c.radius, segPtr[segInx].u.c.a0+angle ); - PointOnCircle( &p1, pc, segPtr[segInx].u.c.radius, segPtr[segInx].u.c.a0+segPtr[segInx].u.c.a1+angle ); + PointOnCircle( &p0, pc, fabs(segPtr[segInx].u.c.radius), segPtr[segInx].u.c.a0+angle ); + PointOnCircle( &p1, pc, fabs(segPtr[segInx].u.c.radius), segPtr[segInx].u.c.a0+segPtr[segInx].u.c.a1+angle ); } break; @@ -542,6 +614,7 @@ STATUS_T DrawGeomModify( tempSegs(0).u.p.cnt = segPtr[segInx].u.p.cnt; tempSegs(0).u.p.angle = 0.0; tempSegs(0).u.p.orig = zero; + tempSegs(0).u.p.polyType = segPtr[segInx].u.p.polyType; DYNARR_SET( coOrd, points_da, segPtr[segInx].u.p.cnt+1 ); tempSegs(0).u.p.pts = &points(0); d = 10000; @@ -557,28 +630,61 @@ STATUS_T DrawGeomModify( polyInx = inx; } } - inx = (polyInx==0?segPtr[segInx].u.p.cnt-1:polyInx-1); - d = FindDistance( points(inx), pos ); - dd = FindDistance( points(inx), points(polyInx) ); - if ( d < 0.25*dd ) { - polyInx = inx; - } else if ( d > 0.75*dd ) { - ; - } else { - tempSegs(0).u.p.cnt++; - for (inx=points_da.cnt-1; inx>polyInx; inx-- ) { - points(inx) = points(inx-1); + if (segPtr[segInx].u.p.polyType == RECTANGLE) { + d1 = FindDistance( points(polyInx), pos ); + d2 = FindDistance( points(polyInx==0?segPtr[segInx].u.p.cnt-1:polyInx-1), pos ); + if (d2 0.75*dd ) { + ; + } else { + tempSegs(0).u.p.cnt++; + for (inx=points_da.cnt-1; inx>polyInx; inx-- ) { + points(inx) = points(inx-1); + } /*fprintf( stderr, "Inserting vertix before %d\n", polyInx );*/ + } + points(polyInx) = pos; } - points(polyInx) = pos; p1=p0; break; - default: - ASSERT( FALSE ); /* CHECKME */ case SEG_TEXT: segInx = -1; return C_ERROR; + default: + ASSERT( FALSE ); /* CHECKME */ + } if ( FindDistance( p0, pos ) < FindDistance( p1, pos ) ) segEp = 0; @@ -586,7 +692,6 @@ STATUS_T DrawGeomModify( segEp = 1; switch ( segPtr[segInx].type ) { case SEG_TBLEDGE: - case SEG_STRLIN: case SEG_DIMLIN: case SEG_BENCH: @@ -596,7 +701,6 @@ STATUS_T DrawGeomModify( ; } } - tempSegs_da.cnt = 1; return C_CONTINUE; case C_MOVE: if (segInx == -1) @@ -608,6 +712,9 @@ STATUS_T DrawGeomModify( } else if ( (MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_CTRL ) { OnTrack( &pos, FALSE, FALSE ); } + int prior_pnt, next_pnt, orig_pnt; + ANGLE_T prior_angle, next_angle, line_angle; + tempSegs_da.cnt = 1; switch (tempSegs(0).type) { case SEG_TBLEDGE: @@ -617,12 +724,6 @@ STATUS_T DrawGeomModify( tempSegs(0).u.l.pos[segEp] = pos; InfoMessage( _("Length = %0.3f Angle = %0.3f"), FindDistance( tempSegs(0).u.l.pos[segEp], tempSegs(0).u.l.pos[1-segEp] ), FindAngle( tempSegs(0).u.l.pos[1-segEp], tempSegs(0).u.l.pos[segEp] ) ); break; - pos.x -= orig.x; - pos.y -= orig.y; - pos.x -= orig.x; - pos.y -= orig.y; - Rotate( &pos, zero, -angle ); - Rotate( &pos, zero, -angle ); case SEG_CRVLIN: case SEG_FILCRCL: if (tempSegs(0).u.c.a1 >= 360.0) { @@ -639,12 +740,50 @@ STATUS_T DrawGeomModify( break; case SEG_POLY: case SEG_FILPOLY: - points(polyInx) = pos; + switch (tempSegs(0).u.p.polyType) { + case RECTANGLE: + if (!corner_mode) { + /* Constrain movement to be perpendicular */ + d = FindDistance(start_pos, pos); + line_angle = NormalizeAngle(FindAngle(points(inx_line),points(polyInx))-90); + a = FindAngle(pos,start_pos); + Translate( &pos, start_pos, line_angle, - d*cos(D2R(line_angle-a))); + } + d = FindDistance(start_pos,pos); + a = FindAngle(start_pos, pos); + start_pos = pos; + prior_pnt = (polyInx == 0)?3:polyInx-1; + next_pnt = (polyInx == 3)?0:polyInx+1; + orig_pnt = (prior_pnt == 0)?3:prior_pnt-1; + Translate( &points(polyInx), points(polyInx), a, d); + d = FindDistance(points(orig_pnt),points(polyInx)); + a = FindAngle(points(orig_pnt),points(polyInx)); + prior_angle = FindAngle(points(orig_pnt),points(prior_pnt)); + Translate( &points(prior_pnt), points(orig_pnt), prior_angle, d*cos(D2R(prior_angle-a))); + next_angle = FindAngle(points(orig_pnt),points(next_pnt)); + Translate( &points(next_pnt), points(orig_pnt), next_angle, d*cos(D2R(next_angle-a))); + if (!corner_mode) { + pos.x = (points(polyInx).x + points(inx_line).x)/2; + pos.y = (points(polyInx).y + points(inx_line).y)/2; + DrawArrowHeads( &tempSegs(1), pos, FindAngle(points(polyInx),points(inx_line))+90, TRUE, wDrawColorRed ); + tempSegs_da.cnt = 6; + InfoMessage( _("Drag to Move Edge")); + } else { + pos = points(polyInx); + DrawArrowHeads( &tempSegs(1), pos, FindAngle(points(polyInx),points(inx_origin)), TRUE, wDrawColorRed ); + tempSegs_da.cnt = 6; + InfoMessage( _("Drag to Move Corner Point")); + } + break; + default: + points(polyInx) = pos; + } + break; default: ; } - tempSegs_da.cnt = 1; + return C_CONTINUE; case C_UP: if (segInx == -1) @@ -664,7 +803,7 @@ STATUS_T DrawGeomModify( case SEG_CRVLIN: case SEG_FILCRCL: if ( tempSegs(0).u.c.a1 >= 360.0 ) { - segPtr[segInx].u.c.radius = tempSegs(0).u.c.radius; + segPtr[segInx].u.c.radius = fabs(tempSegs(0).u.c.radius); } else { a = FindAngle( tempSegs(0).u.c.center, pos ); a = NormalizeAngle( a-angle ); @@ -676,39 +815,54 @@ STATUS_T DrawGeomModify( break; case SEG_POLY: case SEG_FILPOLY: - mergePoints = FALSE; - if ( IsClose( FindDistance( pos, points( polyInx==0?tempSegs(0).u.p.cnt-1:polyInx-1 ) ) ) || - IsClose( FindDistance( pos, points( (polyInx==tempSegs(0).u.p.cnt-1)?0:polyInx+1 ) ) ) ) { - mergePoints = TRUE; - if (segPtr[segInx].u.p.cnt <= 3) { - ErrorMessage( MSG_POLY_SHAPES_3_SIDES ); - break; + switch(tempSegs(0).u.p.polyType) { + case RECTANGLE: + for (int i=0;i<4;i++) { + pos = points(i); + pos.x -= orig.x; + pos.y -= orig.y; + Rotate( &pos, zero, -angle ); + segPtr[segInx].u.p.pts[i] = pos; + } + break; + default: + mergePoints = FALSE; + if ( IsClose( FindDistance( pos, points( polyInx==0?tempSegs(0).u.p.cnt-1:polyInx-1 ) ) ) || + IsClose( FindDistance( pos, points( (polyInx==tempSegs(0).u.p.cnt-1)?0:polyInx+1 ) ) ) ) { + mergePoints = TRUE; + if (segPtr[segInx].u.p.cnt <= 3) { + ErrorMessage( MSG_POLY_SHAPES_3_SIDES ); + break; + } } - } - newPts = (coOrd*)MyMalloc( tempSegs(0).u.p.cnt * sizeof *(coOrd*)0 ); - memcpy( newPts, segPtr[segInx].u.p.pts, (segPtr[segInx].u.p.cnt) * sizeof *(coOrd*)0 ); - segPtr[segInx].u.p.pts = newPts; + coOrd * oldPts = segPtr[segInx].u.p.pts; + newPts = (coOrd*)MyMalloc( tempSegs(0).u.p.cnt * sizeof *(coOrd*)0 ); + memcpy( newPts, segPtr[segInx].u.p.pts, (segPtr[segInx].u.p.cnt) * sizeof *(coOrd*)0 ); + segPtr[segInx].u.p.pts = newPts; + MyFree(oldPts); - if ( tempSegs(0).u.p.cnt > segPtr[segInx].u.p.cnt ) { - ASSERT( tempSegs(0).u.p.cnt == segPtr[segInx].u.p.cnt+1 ); - for (inx=tempSegs(0).u.p.cnt-1; inx>polyInx; inx--) - segPtr[segInx].u.p.pts[inx] = segPtr[segInx].u.p.pts[inx-1]; - segPtr[segInx].u.p.cnt++; - } + + if ( tempSegs(0).u.p.cnt > segPtr[segInx].u.p.cnt ) { + ASSERT( tempSegs(0).u.p.cnt == segPtr[segInx].u.p.cnt+1 ); + for (inx=tempSegs(0).u.p.cnt-1; inx>polyInx; inx--) + segPtr[segInx].u.p.pts[inx] = segPtr[segInx].u.p.pts[inx-1]; + segPtr[segInx].u.p.cnt++; + } - pos = points(polyInx); - if ( mergePoints ) { - for (inx=polyInx+1; inx #include - #if _MSC_VER >=1400 - #define strdup _strdup - #endif #else #include #endif @@ -36,11 +33,18 @@ #include #include #include -#include "track.h" -#include "i18n.h" + #include +#include "cselect.h" +#include "custom.h" #include "dxfformat.h" +#include "fileio.h" +#include "i18n.h" +#include "messages.h" +#include "paths.h" +#include "track.h" +#include "utility.h" static struct wFilSel_t * exportDXFFile_fs; @@ -224,7 +228,7 @@ void DoExportDXF(void) exportDXFFile_fs = wFilSelCreate(mainW, FS_SAVE, 0, _("Export to DXF"), sDXFFilePattern, DoExportDXFTracks, NULL); - wFilSelect(exportDXFFile_fs, curDirName); + wFilSelect(exportDXFFile_fs, GetCurrentPath(DXFPATHKEY)); } diff --git a/app/bin/elev.c b/app/bin/elev.c index ec232a4..6b86bc1 100644 --- a/app/bin/elev.c +++ b/app/bin/elev.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/elev.c,v 1.1 2005-12-07 15:47:20 rc-flyer Exp $ +/** \file elev.c + * */ /* XTrkCad - Model Railroad CAD @@ -19,11 +19,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include -#include "track.h" -#include "shrtpath.h" #include "ccurve.h" - +#include "cundo.h" +#include "messages.h" +#include "param.h" +#include "shrtpath.h" +#include "track.h" +#include "utility.h" +#include "string.h" EXPORT long oldElevationEvaluation = 0; static int log_fillElev = 0; diff --git a/app/bin/fileio.c b/app/bin/fileio.c index da0de68..4e2a21d 100644 --- a/app/bin/fileio.c +++ b/app/bin/fileio.c @@ -35,9 +35,9 @@ #ifdef WINDOWS #include #include - #if _MSC_VER >=1400 - #define strdup _strdup - #endif + //#if _MSC_VER >=1400 + // #define strdup _strdup + //#endif #else #endif #include @@ -48,14 +48,23 @@ #include -#include "track.h" -#include "version.h" #include "common.h" -#include "utility.h" -#include "draw.h" -#include "misc.h" #include "compound.h" +#include "cselect.h" +#include "cundo.h" +#include "custom.h" +#include "draw.h" +#include "fileio.h" #include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "misc.h" +#include "param.h" +#include "paths.h" +#include "track.h" +#include "utility.h" +#include "version.h" + /*#define TIME_READTRACKFILE*/ @@ -65,67 +74,10 @@ EXPORT const char * libDir; static char * customPath = NULL; static char * customPathBak = NULL; -EXPORT char curPathName[STR_LONG_SIZE]; -EXPORT char * curFileName; -EXPORT char curDirName[STR_LONG_SIZE]; - EXPORT char * clipBoardN; -EXPORT wBool_t executableOk = FALSE; - static int log_paramFile; -/** - * Get the directory from the current file and store it as current directory - * in a global variable and the preferences - * - * \param pathType IN possible enhancement for file type specific directorys - * \param fileName IN fully qualified filename - * \return - * - * \todo split directory and keep directory part - */ - -void SetCurrentPath( - const char * pathType, - const char * fileName ) -{ - char *path; - char *copy; - - assert( fileName != NULL ); - assert( pathType != NULL ); - - copy = strdup( fileName ); - path = strrchr(copy, FILE_SEP_CHAR[ 0 ] ); - if ( path ) - { - *path = '\0'; - strcpy( curDirName, copy ); - wPrefSetString( "file", "directory", curDirName ); - } - free( copy ); -} - -/** - * Find the filename/extension piece in a fully qualified path - * - * \param path IN the full path - * \return pointer to the filename part - */ - -char *FindName( char *path ) -{ - char *name; - name = strrchr( path, FILE_SEP_CHAR[0] ); - if (name) { - name++; - } else { - name = path; - } - return(name ); -} - #ifdef WINDOWS #define rename( F1, F2 ) Copyfile( F1, F2 ) @@ -197,7 +149,7 @@ RestoreLocale( char * locale ) */ EXPORT FILE * paramFile = NULL; -EXPORT char paramFileName[STR_LONG_SIZE]; +char *paramFileName; EXPORT wIndex_t paramLineNum = 0; EXPORT char paramLine[STR_LONG_SIZE]; EXPORT char * curContents; @@ -568,11 +520,9 @@ EXPORT BOOL_T ReadParams( char *oldLocale = NULL; if (dirName) { - strcpy( paramFileName, dirName ); - strcat( paramFileName, FILE_SEP_CHAR ); - strcat( paramFileName, fileName ); + MakeFullpath(¶mFileName, dirName, fileName, NULL); } else { - strcpy( paramFileName, fileName ); + MakeFullpath(¶mFileName, fileName, NULL); } paramLineNum = 0; curBarScale = -1; @@ -628,11 +578,9 @@ LOG1( log_paramFile, ("ReadParam( %s )\n", fileName ) ) paramLineNum = oldLineNum; paramCheckSum = oldCheckSum; if (dirName) { - strcpy( paramFileName, dirName ); - strcat( paramFileName, FILE_SEP_CHAR ); - strcat( paramFileName, fileName ); + MakeFullpath(¶mFileName, dirName, fileName, NULL); } else { - strcpy( paramFileName, fileName ); + MakeFullpath(¶mFileName, fileName); } } else if (strncmp( paramLine, "CONTENTS ", 9) == 0 ) { curContents = MyStrdup( paramLine+9 ); @@ -665,7 +613,8 @@ LOG1( log_paramFile, ("ReadParam( %s )\n", fileName ) ) } } if (paramFile)fclose( paramFile ); - + free(paramFileName); + paramFileName = NULL; RestoreLocale( oldLocale ); return TRUE; @@ -675,9 +624,7 @@ LOG1( log_paramFile, ("ReadParam( %s )\n", fileName ) ) static void ReadCustom( void ) { FILE * f; - customPath = - (char*)MyMalloc( strlen(workingDir) + 1 + strlen(sCustomF) + 1 ); - sprintf( customPath, "%s%s%s", workingDir, FILE_SEP_CHAR, sCustomF ); + MakeFullpath(&customPath, workingDir, sCustomF, NULL); customPathBak = MyStrdup( customPath ); customPathBak[ strlen(customPathBak)-1 ] = '1'; f = fopen( customPath, "r" ); @@ -741,10 +688,14 @@ EXPORT char * PutTitle( char * cp ) void SetWindowTitle( void ) { + char *filename; + if ( changed > 2 || inPlayback ) return; + + filename = GetLayoutFilename(); sprintf( message, "%s%s - %s(%s)", - (curFileName==NULL||curFileName[0]=='\0')?_("Unnamed Trackplan"):curFileName, + (filename && filename[0])?filename: _("Unnamed Trackplan"), changed>0?"*":"", sProdName, sVersion ); wWinSetTitle( mainW, message ); } @@ -805,7 +756,7 @@ static BOOL_T ReadTrackFile( } paramLineNum = 0; - strcpy( paramFileName, fileName ); + paramFileName = strdup( fileName ); InfoMessage("0"); count = 0; @@ -853,13 +804,9 @@ static BOOL_T ReadTrackFile( if( !(ret = InputError( "unknown command", TRUE ))) break; } else if (strncmp( paramLine, "TITLE1 ", 7 ) == 0) { - strncpy( Title1, ¶mLine[7], TITLEMAXLEN ); - Title1[ TITLEMAXLEN - 1 ] = '\0'; - /*wStringSetValue( title1PD.control, Title1 );*/ + SetLayoutTitle(paramLine + 7); } else if (strncmp( paramLine, "TITLE2 ", 7 ) == 0) { - strncpy( Title2, ¶mLine[7], TITLEMAXLEN ); - Title2[ TITLEMAXLEN - 1 ] = '\0'; - /*wStringSetValue( title2PD.control, Title2 );*/ + SetLayoutSubtitle(paramLine + 7); } else if (strncmp( paramLine, "ROOMSIZE", 8 ) == 0) { if ( ParseRoomSize( paramLine+8, &roomSize ) ) { SetRoomSize( roomSize ); @@ -895,8 +842,10 @@ static BOOL_T ReadTrackFile( SetCurrentPath( LAYOUTPATHKEY, fileName ); if (full) { - strcpy( curPathName, pathName ); - curFileName = &curPathName[fileName-pathName]; +// SetCurrentPath(LAYOUTPATHKEY, pathName); + SetLayoutFullPath(pathName); + //strcpy(curPathName, pathName); + //curFileName = &curPathName[fileName-pathName]; SetWindowTitle(); } } @@ -904,6 +853,9 @@ static BOOL_T ReadTrackFile( RestoreLocale( oldLocale ); paramFile = NULL; + + free(paramFileName); + paramFileName = NULL; InfoMessage( "%d", count ); return ret; } @@ -921,9 +873,8 @@ EXPORT int LoadTracks( assert( fileName != NULL ); assert( cnt == 1 ); - //if (fileName == NULL || cnt == 0 ) - // return TRUE; + SetCurrentPath(LAYOUTPATHKEY, fileName[0]); paramVersion = -1; wSetCursor( wCursorWait ); Reset(); @@ -935,7 +886,7 @@ EXPORT int LoadTracks( #ifdef TIME_READTRACKFILE time0 = wGetTimer(); #endif - nameOfFile = FindName( fileName[ 0 ] ); + nameOfFile = FindFilename( fileName[ 0 ] ); if (ReadTrackFile( fileName[ 0 ], nameOfFile, TRUE, FALSE, TRUE )) { wMenuListAdd( fileList_ml, 0, nameOfFile, MyStrdup(fileName[0]) ); @@ -949,6 +900,7 @@ EXPORT int LoadTracks( DoChangeNotification( CHANGE_ALL ); DoUpdateTitles(); LoadLayerLists(); + LayerSetCounts(); } UndoResume(); Reset(); @@ -997,10 +949,10 @@ static BOOL_T DoSaveTracks( time(&clock); rc &= fprintf(f,"#%s Version: %s, Date: %s\n", sProdName, sVersion, ctime(&clock) )>0; rc &= fprintf(f, "VERSION %d %s\n", iParamVersion, PARAMVERSIONVERSION )>0; - Stripcr( Title1 ); - Stripcr( Title2 ); - rc &= fprintf(f, "TITLE1 %s\n", Title1 )>0; - rc &= fprintf(f, "TITLE2 %s\n", Title2 )>0; + Stripcr( GetLayoutTitle() ); + Stripcr( GetLayoutSubtitle() ); + rc &= fprintf(f, "TITLE1 %s\n", GetLayoutTitle())>0; + rc &= fprintf(f, "TITLE2 %s\n", GetLayoutSubtitle())>0; rc &= fprintf(f, "MAPSCALE %ld\n", (long)mapD.scale )>0; rc &= fprintf(f, "ROOMSIZE %0.6f x %0.6f\n", mapD.size.x, mapD.size.y )>0; rc &= fprintf(f, "SCALE %s\n", curScaleName )>0; @@ -1032,17 +984,15 @@ static int SaveTracks( assert( fileName != NULL ); assert( cnt == 1 ); - SetCurrentPath( LAYOUTPATHKEY, fileName[ 0 ] ); + SetCurrentPath(LAYOUTPATHKEY, fileName[0]); DoSaveTracks( fileName[ 0 ] ); - nameOfFile = FindName( fileName[ 0 ] ); + nameOfFile = FindFilename( fileName[ 0 ] ); wMenuListAdd( fileList_ml, 0, nameOfFile, MyStrdup(fileName[ 0 ]) ); checkPtMark = changed = 0; - if (strcmp(curPathName, fileName[ 0 ])) - strcpy( curPathName, fileName[ 0 ] ); - curFileName = FindName( curPathName ); - + SetLayoutFullPath(fileName[0]); + if (doAfterSave) doAfterSave(); doAfterSave = NULL; @@ -1053,13 +1003,13 @@ static int SaveTracks( EXPORT void DoSave( doSaveCallBack_p after ) { doAfterSave = after; - if (curPathName[0] == '\0') { + if (*(GetLayoutFilename()) == '\0') { if (saveFile_fs == NULL) saveFile_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("Save Tracks"), sSourceFilePattern, SaveTracks, NULL ); - wFilSelect( saveFile_fs, curDirName ); + wFilSelect( saveFile_fs, GetCurrentPath(LAYOUTPATHKEY)); } else { - char *temp = curPathName; + char *temp = GetLayoutFullPath(); SaveTracks( 1, &temp, NULL ); } SetWindowTitle(); @@ -1071,7 +1021,7 @@ EXPORT void DoSaveAs( doSaveCallBack_p after ) if (saveFile_fs == NULL) saveFile_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("Save Tracks As"), sSourceFilePattern, SaveTracks, NULL ); - wFilSelect( saveFile_fs, curDirName ); + wFilSelect( saveFile_fs, GetCurrentPath(LAYOUTPATHKEY)); SetWindowTitle(); } @@ -1079,7 +1029,7 @@ EXPORT void DoLoad( void ) { loadFile_fs = wFilSelCreate( mainW, FS_LOAD, 0, _("Open Tracks"), sSourceFilePattern, LoadTracks, NULL ); - wFilSelect( loadFile_fs, curDirName ); + wFilSelect( loadFile_fs, GetCurrentPath(LAYOUTPATHKEY)); } @@ -1133,45 +1083,16 @@ EXPORT void CleanupFiles( void ) EXPORT int ExistsCheckpoint( void ) { - int len; - char *pattern = sCheckPointF; - char *search; - struct stat fileStat; - len = strlen( workingDir ) + 1 + strlen( sCheckPointF ) + 1; - checkPtFileName1 = (char*)MyMalloc(len); - sprintf( checkPtFileName1, "%s%s%s", workingDir, FILE_SEP_CHAR, sCheckPointF ); - checkPtFileName2 = (char*)MyMalloc(len); - sprintf( checkPtFileName2, "%s%s%s", workingDir, FILE_SEP_CHAR, sCheckPoint1F ); - - len = strlen( workingDir ) + 1 + strlen( pattern ) + 1; - search = (char*)MyMalloc(len); - sprintf( search, "%s%s%s", workingDir, FILE_SEP_CHAR, pattern ); - - if( !stat( search, &fileStat ) ) { - MyFree( search ); - return TRUE; - } else { - MyFree( search ); - return FALSE; - } - + MakeFullpath(&checkPtFileName1, workingDir, sCheckPointF, NULL); + MakeFullpath(&checkPtFileName2, workingDir, sCheckPoint1F, NULL); -#ifdef LATER - DIR *dir; - - dir = opendir( search ); - MyFree( search ); - - if( dir ) { - closedir( dir ); + if( !stat( checkPtFileName1, &fileStat ) ) { return TRUE; } else { return FALSE; } -#endif - } /** @@ -1183,16 +1104,12 @@ EXPORT int ExistsCheckpoint( void ) EXPORT int LoadCheckpoint( void ) { - int len; char *search; paramVersion = -1; wSetCursor( wCursorWait ); - len = strlen( workingDir ) + 1 + strlen( sCheckPointF ) + 1; - search = (char*)MyMalloc(len); - sprintf( search, "%s%s%s", workingDir, FILE_SEP_CHAR, sCheckPointF ); - + MakeFullpath(&search, workingDir, sCheckPointF, NULL); UndoSuspend(); if (ReadTrackFile( search, search + strlen(search) - strlen( sCheckPointF ), TRUE, TRUE, TRUE )) { @@ -1209,11 +1126,10 @@ EXPORT int LoadCheckpoint( void ) wSetCursor( wCursorNormal ); - strcpy( curPathName, "" ); - curFileName = curPathName; + SetLayoutFullPath(""); SetWindowTitle(); changed = TRUE; - MyFree( search ); + free( search ); return TRUE; } @@ -1238,7 +1154,7 @@ static int ImportTracks( assert( fileName != NULL ); assert( cnt == 1 ); - nameOfFile = FindName(fileName[ 0 ]); + nameOfFile = FindFilename(fileName[ 0 ]); paramVersion = -1; wSetCursor( wCursorWait ); Reset(); @@ -1265,7 +1181,7 @@ EXPORT void DoImport( void ) importFile_fs = wFilSelCreate( mainW, FS_LOAD, 0, _("Import Tracks"), sImportFilePattern, ImportTracks, NULL ); - wFilSelect( importFile_fs, curDirName ); + wFilSelect( importFile_fs, GetCurrentPath(LAYOUTPATHKEY)); } @@ -1326,7 +1242,7 @@ EXPORT void DoExport( void ) exportFile_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("Export Tracks"), sImportFilePattern, DoExportTracks, NULL ); - wFilSelect( exportFile_fs, curDirName ); + wFilSelect( exportFile_fs, GetCurrentPath(LAYOUTPATHKEY)); } @@ -1412,20 +1328,11 @@ EXPORT BOOL_T EditPaste( void ) EXPORT void FileInit( void ) { - const char * pref; - if ( (libDir = wGetAppLibDir()) == NULL ) { abort(); } if ( (workingDir = wGetAppWorkDir()) == NULL ) AbortProg( "wGetAppWorkDir()" ); - - pref = wPrefGetString( "file", "directory" ); - if (pref != NULL) { - strcpy( curDirName, pref ); - } else { - sprintf( curDirName, "%s%sexamples", libDir, FILE_SEP_CHAR ); - } } EXPORT BOOL_T ParamFileInit( void ) @@ -1441,10 +1348,8 @@ EXPORT BOOL_T ParamFileInit( void ) ReadCustom(); } - curPathName[0] = '\0'; - - clipBoardN = (char*)MyMalloc( strlen(workingDir) + 1 + strlen(sClipboardF) + 1 ); - sprintf( clipBoardN, "%s%s%s", workingDir, FILE_SEP_CHAR, sClipboardF ); + SetLayoutFullPath(""); + MakeFullpath(&clipBoardN, workingDir, sClipboardF, NULL); return TRUE; } diff --git a/app/bin/fileio.h b/app/bin/fileio.h index f574126..4f5aa8d 100644 --- a/app/bin/fileio.h +++ b/app/bin/fileio.h @@ -1,5 +1,4 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/fileio.h,v 1.4 2008-01-15 11:46:03 mni77 Exp $ +/** \file fileio.h */ /* XTrkCad - Model Railroad CAD @@ -23,8 +22,13 @@ #ifndef FILEIO_H #define FILEIO_H +#include + +#include "common.h" +#include "misc.h" + FILE * paramFile; -char paramFileName[STR_LONG_SIZE]; +extern char *paramFileName; wIndex_t paramLineNum; char paramLine[STR_LONG_SIZE]; char * curContents; @@ -37,10 +41,6 @@ typedef BOOL_T (*readParam_t) ( char * ); extern const char * workingDir; extern const char * libDir; -extern char curPathName[STR_LONG_SIZE]; -extern char * curFileName; -extern char curDirName[STR_LONG_SIZE]; - #define PARAM_CUSTOM (-2) #define PARAM_LAYOUT (-3) extern int curParamFileIndex; @@ -57,6 +57,8 @@ int curDemo; wMenuList_p fileList_ml; +#define PARAM_SUBDIR "params" + #define LAYOUTPATHKEY "layout" #define BITMAPPATHKEY "bitmap" #define DXFPATHKEY "dxf" @@ -65,8 +67,7 @@ wMenuList_p fileList_ml; #define PARAMETERPATHKEY "params" #define IMPORTPATHKEY "import" #define MACROPATHKEY "macro" - -void SetCurrentPath( const char *, const char * ); +#define CUSTOMPATHKEY "custom" void Stripcr( char * ); char * GetNextLine( void ); diff --git a/app/bin/i18n.c b/app/bin/i18n.c index ff4e28d..a8ed631 100644 --- a/app/bin/i18n.c +++ b/app/bin/i18n.c @@ -19,11 +19,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "i18n.h" -#include "wlib.h" - #include #include +#include + +#include "i18n.h" +#include "wlib.h" /** * Initialize gettext environment. By default, the language files are installed diff --git a/app/bin/layout.c b/app/bin/layout.c new file mode 100644 index 0000000..0328474 --- /dev/null +++ b/app/bin/layout.c @@ -0,0 +1,375 @@ +/** \file layout.c + * Layout data and dialog + */ + +/* XTrkCad - Model Railroad CAD + * Copyright (C) 2017 Martin Fischer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include +#include + +#include "custom.h" +#include "i18n.h" +#include "layout.h" +#include "misc2.h" +#include "param.h" +#include "paths.h" +#include "track.h" +#include "wlib.h" + +#define MINTRACKRADIUSPREFS "minTrackRadius" + +struct sLayoutProps { + char title1[TITLEMAXLEN]; + char title2[TITLEMAXLEN]; + SCALEINX_T curScaleInx; + SCALEDESCINX_T curScaleDescInx; + GAUGEINX_T curGaugeInx; + DIST_T minTrackRadius; + DIST_T maxTrackGrade; + coOrd roomSize; +}; + +struct sDataLayout { + struct sLayoutProps props; + DynString fullFileName; + struct sLayoutProps *copyOfLayoutProps; +}; + +struct sDataLayout thisLayout = { + { "", "", -1, 0, 0, 0.0, 5.0, {0.0, 0.0} }, + NaS, + NULL, +}; + +static paramFloatRange_t r0_90 = { 0, 90 }; +static paramFloatRange_t r1_10000 = { 1, 10000 }; +static paramFloatRange_t r1_9999999 = { 1, 9999999 }; + +static void LayoutDlgUpdate(paramGroup_p pg, int inx, void * valueP); + +/** +* Update the full file name. Do not do anything if the new filename is identical to the old one. +* +* \param filename IN the new filename +*/ + +void +SetLayoutFullPath(const char *fileName) +{ + if (DynStringToCStr(&thisLayout.fullFileName) != fileName) { + if (isnas(&thisLayout.fullFileName)) { + DynStringMalloc(&thisLayout.fullFileName, strlen(fileName) + 1); + } else { + DynStringClear(&thisLayout.fullFileName); + } + + DynStringCatCStr(&thisLayout.fullFileName, fileName); + } +} + +/** +* Set the minimum radius for the selected scale/gauge into the dialog +* +* \param scaleName IN name of the scale/gauge eg. HOn3 +* \param defaltValue IN default value will be used if no preference is set +*/ + +void +LoadLayoutMinRadiusPref(char *scaleName, double defaultValue) +{ + DynString prefString = { NULL }; + + DynStringPrintf(&prefString, MINTRACKRADIUSPREFS "-%s", scaleName); + wPrefGetFloat("misc", DynStringToCStr(&prefString), + &thisLayout.props.minTrackRadius, defaultValue); + DynStringFree(&prefString); +} + +static void +CopyLayoutTitle(char* dest, char *src) +{ + strncpy(dest, src, TITLEMAXLEN); + *(dest + TITLEMAXLEN - 1) = '\0'; +} + +void +SetLayoutTitle(char *title) +{ + CopyLayoutTitle(thisLayout.props.title1, title); +} + +void +SetLayoutSubtitle(char *title) +{ + CopyLayoutTitle(thisLayout.props.title2, title); +} + +void +SetLayoutMinTrackRadius(DIST_T radius) +{ + thisLayout.props.minTrackRadius = radius; +} + +void +SetLayoutMaxTrackGrade(ANGLE_T angle) +{ + thisLayout.props.maxTrackGrade = angle; +} + + +void +SetLayoutRoomSize(coOrd size) +{ + thisLayout.props.roomSize = size; +} + +void +SetLayoutCurScale(SCALEINX_T scale) +{ + thisLayout.props.curScaleInx = scale; +} + +void +SetLayoutCurScaleDesc(SCALEDESCINX_T desc) +{ + thisLayout.props.curScaleDescInx = desc; +} + +void +SetLayoutCurGauge(GAUGEINX_T gauge) +{ + thisLayout.props.curGaugeInx = gauge; +} + +/** +* Return the full filename. +* +* \return pointer to the full filename, should not be modified or freed +*/ + +char * +GetLayoutFullPath() +{ + return (DynStringToCStr(&thisLayout.fullFileName)); +} + +/** +* Return the filename part of the full path +* +* \return pointer to the filename part, NULL is no filename is set +*/ + +char * +GetLayoutFilename() +{ + char *string = DynStringToCStr(&thisLayout.fullFileName); + + if (string) { + return (FindFilename(string)); + } else { + return (NULL); + } +} + +char * +GetLayoutTitle() +{ + return (thisLayout.props.title1); +} + +char * +GetLayoutSubtitle() +{ + return (thisLayout.props.title2); +} + +DIST_T +GetLayoutMinTrackRadius() +{ + return (thisLayout.props.minTrackRadius); +} + +ANGLE_T +GetLayoutMaxTrackGrade() +{ + return (thisLayout.props.maxTrackGrade); +} + +SCALEDESCINX_T +GetLayoutCurScaleDesc() +{ + return (thisLayout.props.curScaleDescInx); +} + +SCALEINX_T +GetLayoutCurScale() +{ + return (thisLayout.props.curScaleInx); +} +/**************************************************************************** +* +* Layout Dialog +* +*/ + +static wWin_p layoutW; + +static paramData_t layoutPLs[] = { + { PD_FLOAT, &thisLayout.props.roomSize.x, "roomsizeX", PDO_NOPREF | PDO_DIM | PDO_NOPSHUPD | PDO_DRAW, &r1_9999999, N_("Room Width"), 0, (void*)(CHANGE_MAIN | CHANGE_MAP) }, + { PD_FLOAT, &thisLayout.props.roomSize.y, "roomsizeY", PDO_NOPREF | PDO_DIM | PDO_NOPSHUPD | PDO_DRAW | PDO_DLGHORZ, &r1_9999999, N_(" Height"), 0, (void*)(CHANGE_MAIN | CHANGE_MAP) }, + { PD_STRING, &thisLayout.props.title1, "title1", PDO_NOPSHUPD, NULL, N_("Layout Title"), 0, (void *)sizeof(thisLayout.props.title1) }, + { PD_STRING, &thisLayout.props.title2, "title2", PDO_NOPSHUPD, NULL, N_("Subtitle"), 0, (void *)sizeof(thisLayout.props.title2) }, +#define SCALEINX (4) + { PD_DROPLIST, &thisLayout.props.curScaleDescInx, "scale", PDO_NOPREF | PDO_NOPSHUPD | PDO_NORECORD | PDO_NOUPDACT, (void *)120, N_("Scale"), 0, (void*)(CHANGE_SCALE) }, +#define GAUGEINX (5) + { PD_DROPLIST, &thisLayout.props.curGaugeInx, "gauge", PDO_NOPREF | PDO_NOPSHUPD | PDO_NORECORD | PDO_NOUPDACT | PDO_DLGHORZ, (void *)120, N_(" Gauge"), 0, (void *)(CHANGE_SCALE) }, +#define MINRADIUSENTRY (6) + { PD_FLOAT, &thisLayout.props.minTrackRadius, "mintrackradius", PDO_DIM | PDO_NOPSHUPD | PDO_NOPREF, &r1_10000, N_("Min Track Radius"), 0, (void*)(CHANGE_MAIN | CHANGE_LIMITS) }, + { PD_FLOAT, &thisLayout.props.maxTrackGrade, "maxtrackgrade", PDO_NOPSHUPD | PDO_DLGHORZ, &r0_90, N_(" Max Track Grade (%)"), 0, (void*)(CHANGE_MAIN) } +}; + +static paramGroup_t layoutPG = { "layout", PGO_RECORD | PGO_PREFMISC, layoutPLs, sizeof layoutPLs / sizeof layoutPLs[0] }; + +/** +* Apply the changes entered to settings +* +* \param junk IN unused +*/ + +static void LayoutOk(void * junk) +{ + long changes; + + changes = GetChanges(&layoutPG); + + /* [mf Nov. 15, 2005] Get the gauge/scale settings */ + if (changes & CHANGE_SCALE) { + SetScaleGauge(thisLayout.props.curScaleDescInx, thisLayout.props.curGaugeInx); + } + + /* [mf Nov. 15, 2005] end */ + + if (changes & CHANGE_MAP) { + SetRoomSize(thisLayout.props.roomSize); + } + + DoChangeNotification(changes); + + if (changes & CHANGE_LIMITS) { + char prefString[30]; + // now set the minimum track radius + sprintf(prefString, "minTrackRadius-%s", curScaleName); + wPrefSetFloat("misc", prefString, thisLayout.props.minTrackRadius); + } + + free(thisLayout.copyOfLayoutProps); + wHide(layoutW); +} + +/** +* Discard the changes entered and replace with earlier values +* +* \param junk IN unused +*/ + +static void LayoutCancel(struct wWin_t *junk) +{ + thisLayout.props = *(thisLayout.copyOfLayoutProps); + ParamLoadControls(&layoutPG); + LayoutOk(junk); +} + +static void LayoutChange(long changes) +{ + if (changes & (CHANGE_SCALE | CHANGE_UNITS)) + if (layoutW != NULL && wWinIsVisible(layoutW)) { + ParamLoadControls(&layoutPG); + } +} + +void DoLayout(void * junk) +{ + thisLayout.props.roomSize = mapD.size; + + if (layoutW == NULL) { + layoutW = ParamCreateDialog(&layoutPG, MakeWindowTitle(_("Layout Options")), + _("Ok"), LayoutOk, LayoutCancel, TRUE, NULL, 0, LayoutDlgUpdate); + LoadScaleList((wList_p)layoutPLs[4].control); + } + + LoadGaugeList((wList_p)layoutPLs[5].control, + thisLayout.props.curScaleDescInx); /* set correct gauge list here */ + thisLayout.copyOfLayoutProps = malloc(sizeof(struct sLayoutProps)); + + if (!thisLayout.copyOfLayoutProps) { + exit(1); + } + + *(thisLayout.copyOfLayoutProps) = thisLayout.props; + + ParamLoadControls(&layoutPG); + wShow(layoutW); +} + +EXPORT addButtonCallBack_t LayoutInit(void) +{ + ParamRegister(&layoutPG); + RegisterChangeNotification(LayoutChange); + return &DoLayout; +} + +/** +* Update the dialog when scale was changed. The list of possible gauges for the selected scale is +* updated and the first entry is selected (usually standard gauge). After this the minimum gauge +* is set from the preferences. +* +* \param pg IN dialog +* \param inx IN changed entry field +* \param valueP IN new value +*/ + +static void +LayoutDlgUpdate( + paramGroup_p pg, + int inx, + void * valueP) +{ + /* did the scale change ? */ + if (inx == SCALEINX) { + char prefString[100]; + char scaleDesc[100]; + + LoadGaugeList((wList_p)layoutPLs[GAUGEINX].control, *((int *)valueP)); + // set the first entry as default, usually the standard gauge for a scale + wListSetIndex((wList_p)layoutPLs[GAUGEINX].control, 0); + + // get the minimum radius + // get the selected scale first + wListGetValues((wList_p)layoutPLs[SCALEINX].control, scaleDesc, 99, NULL, NULL); + strtok(scaleDesc, " "); + + // now get the minimum track radius + sprintf(prefString, "minTrackRadius-%s", scaleDesc); + wPrefGetFloat("misc", prefString, &thisLayout.props.minTrackRadius, 0.0); + + // put the scale's minimum value into the dialog + wStringSetValue((wString_p)layoutPLs[MINRADIUSENTRY].control, + FormatDistance(thisLayout.props.minTrackRadius)); + } +} diff --git a/app/bin/layout.h b/app/bin/layout.h new file mode 100644 index 0000000..4a581df --- /dev/null +++ b/app/bin/layout.h @@ -0,0 +1,56 @@ +/** \file layout.h + * Layout data + */ + +/* XTrkCad - Model Railroad CAD + * Copyright (C) 2017 Martin Fischer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef HAVE_LAYOUT_H +#define HAVE_LAYOUT_H + +#include "common.h" +#include "misc.h" + + +void SetLayoutFullPath(const char *fileName); +void LoadLayoutMinRadiusPref(char *scaleName, double defaultValue); +void SetLayoutTitle(char *title); +void SetLayoutSubtitle(char *title); +void SetLayoutMinTrackRadius(DIST_T radius); +void SetLayoutMaxTrackGrade(ANGLE_T angle); +void SetLayoutRoomSize(coOrd size); +void SetLayoutCurScale(SCALEINX_T scale); +void SetLayoutCurScaleDesc(SCALEDESCINX_T desc); +void SetLayoutCurGauge(GAUGEINX_T gauge); +void SetLayoutScaleGauge(SCALEDESCINX_T desc, GAUGEINX_T gauge); + +char *GetLayoutFullPath(void); +char *GetLayoutFilename(void); +char *GetLayoutTitle(void); +char *GetLayoutSubtitle(void); +DIST_T GetLayoutMinTrackRadius(void); +SCALEINX_T GetLayoutCurScale(void ); +SCALEDESCINX_T GetLayoutCurScaleDesc(void); +//GAUGEINX_T GetLayoutCurGauge(void); + + +ANGLE_T GetLayoutMaxTrackGrade(void); +SCALEDESCINX_T GetLayoutCurScaleDesc(void); + +void DoLayout(void * junk); +#endif \ No newline at end of file diff --git a/app/bin/lprintf.c b/app/bin/lprintf.c index c0f1c00..217d904 100644 --- a/app/bin/lprintf.c +++ b/app/bin/lprintf.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/lprintf.c,v 1.2 2006-05-26 17:31:44 m_fischer Exp $ +/** \file lprintf.c + * Logging functions */ /* XTrkCad - Model Railroad CAD @@ -23,6 +23,7 @@ #include #include #include +#include #include #ifndef WINDOWS #include @@ -30,8 +31,14 @@ #include #include #endif + +#include "custom.h" +#include "fileio.h" +#include "messages.h" +#include "paths.h" #include "track.h" + /**************************************************************************** * * LPRINTF @@ -72,8 +79,7 @@ static void LogDoOpen( void ) { if ( logFileName == NULL ) { #ifdef WINDOWS - logFileName = (char*)MyMalloc( strlen(wGetAppWorkDir()) + 1 + strlen("xtclog.txt") + 1); - sprintf( logFileName, "%s%s%s", wGetAppWorkDir(), FILE_SEP_CHAR, "xtclog.txt" ); + MakeFullpath(&logFileName, wGetAppWorkDir(), "xtclog.txt", NULL); #else logFile = stdout; #endif @@ -115,7 +121,7 @@ EXPORT void LogSet( char * name, int level ) EXPORT int LogFindIndex( char * name ) { int inx; - for ( inx=11; inx #include #include #ifndef WINDOWS @@ -47,14 +48,20 @@ #include -#include "track.h" -#include "version.h" #include "common.h" -#include "utility.h" -#include "draw.h" -#include "misc.h" #include "compound.h" +#include "cundo.h" +#include "custom.h" +#include "draw.h" +#include "fileio.h" #include "i18n.h" +#include "messages.h" +#include "misc.h" +#include "param.h" +#include "paths.h" +#include "track.h" +#include "utility.h" +#include "version.h" EXPORT long adjTimer; static void DemoInitValues( void ); @@ -268,7 +275,7 @@ EXPORT void DoRecord( void * context ) recordFile_fs = wFilSelCreate( mainW, FS_SAVE, 0, title, sRecordFilePattern, StartRecord, NULL ); } wTextClear( recordT ); - wFilSelect( recordFile_fs, curDirName ); + wFilSelect( recordFile_fs, GetCurrentPath(MACROPATHKEY )); } /***************************************************************************** @@ -716,11 +723,7 @@ EXPORT void TakeSnapshot( drawCmd_t * d ) wBitMapDelete( d->d ); documentSnapshotNum++; if (documentCopy && documentFile) { - cp = strrchr( message, FILE_SEP_CHAR[0] ); - if (cp == 0) - cp = message; - else - cp++; + cp = FindFilename(message); cp[strlen(cp)-4] = 0; fprintf( documentFile, "\n?G%s\n", cp ); } @@ -802,6 +805,7 @@ static void Playback( void ) static wBool_t demoWinOnTop = FALSE; coOrd roomSize; char * cp, * cq; + char *demoFileName = NULL; useCurrentLayer = FALSE; inPlayback = TRUE; @@ -829,13 +833,13 @@ static void Playback( void ) Reset(); if (curDemo < 0 || curDemo >= demoList_da.cnt) break; - strcpy( paramFileName, demoList(curDemo).fileName ); - paramFile = fopen( paramFileName, "r" ); + demoFileName = strdup(demoList(curDemo).fileName ); + paramFile = fopen( demoFileName, "r" ); if ( paramFile == NULL ) { - NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Demo"), paramFileName, strerror(errno) ); + NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Demo"), demoFileName, strerror(errno) ); return; } - + playbackColor=wDrawColorBlack; paramLineNum = 0; wWinSetTitle( demoW, demoList( curDemo ).title ); @@ -848,11 +852,13 @@ static void Playback( void ) DoChangeNotification( CHANGE_ALL ); CompoundClearDemoDefns(); if ( fgets(paramLine, STR_LONG_SIZE, paramFile) == NULL ) { - NoticeMessage( MSG_CANT_READ_DEMO, _("Continue"), NULL, sProdName, paramFileName ); + NoticeMessage( MSG_CANT_READ_DEMO, _("Continue"), NULL, sProdName, demoFileName ); fclose( paramFile ); paramFile = NULL; return; } + free(demoFileName); + demoFileName = NULL; } if (paramLineNum == 0) { documentSnapshotNum = 1; @@ -950,38 +956,15 @@ static void Playback( void ) tempD.orig = mainD.orig; tempD.size = mainD.size; tempD.scale = mainD.scale; -#ifdef LATER - ResolveIndex(); - RecomputeElevations(); -#endif + DoRedraw(); if (playbackD != NULL && playbackBm != NULL) MacroDrawBitMap( playbackD, playbackBm, playbackX, playbackY, wDrawColorBlack ); -#ifdef LATER - } else if (strncmp( paramLine, "POSITION ", 9 ) == 0) { - if ( !GetArgs( paramLine+9, "ff", &x, &y ) ) - continue; - MovePlaybackCursor( &mainD, x, y ); -#endif + } else if (strncmp( paramLine, "PAUSE ", 6 ) == 0) { paramTogglePlaybackHilite = TRUE; didPause = TRUE; -#ifdef DOPAUSE - if (lastCmd == mouseCmd) { - thisCmd = pauseCmd; - } else { - if ( !GetArgs( paramLine+6, "l", &timeout ) ) - continue; -#ifdef LATER - wFlush(); - wAlarm( timeout*playbackDelay/100, playback ); - return; -#else - if (playbackTimer == 0) - wPause( timeout*playbackDelay/100 ); -#endif - } -#endif + if ( !GetArgs( paramLine+6, "l", &timeout ) ) continue; if (timeout > 10000) @@ -996,18 +979,13 @@ static void Playback( void ) } else if (strncmp( paramLine, "BIGPAUSE ", 6 ) == 0) { paramTogglePlaybackHilite = TRUE; didPause = FALSE; -#ifdef LATER - wFlush(); - wAlarm( bigPause*playbackDelay/100, playback ); - return; -#else + if (playbackTimer == 0) { timeout = bigPause*playbackDelay/100; if (timeout <= dragTimeout) timeout = dragTimeout+1; wPause( timeout ); } -#endif } else if (strncmp( paramLine, "KEYSTATE ", 9 ) == 0 ) { playbackKeyState = atoi( paramLine+9 ); } else if (strncmp( paramLine, "TIMESTART", 9 ) == 0 ) { @@ -1059,49 +1037,9 @@ static void Playback( void ) DemoInitValues(); } else { if (strncmp( paramLine, "MOUSE ", 6 ) == 0) { -#ifdef LATER - if ( GetArgs( paramLine+6, "dff", &rc, &pos.x, &pos.y) ) { - pos.x = pos.x / mainD.scale - mainD.orig.x; - pos.y = pos.y / mainD.scale - mainD.orig.y; -#ifdef DOPAUSE - if (lastCmd == pauseCmd) { -#endif - d = sqrt( (pos.x-mainPos.x)*(pos.x-mainPos.x) + - (pos.y-mainPos.y)*(pos.y-mainPos.y) ); - d *= mainD.dpi; - timeout = (long)(MSEC_PER_PIXEL * d); - if (timeout > 2) - if (playbackTimer == 0) - wPause( timeout ); -#ifdef DOPAUSE - } -#endif - mainPos = pos; - } -#endif thisCmd = mouseCmd; } if (strncmp( paramLine, "MAP ", 6 ) == 0) { -#ifdef LATER - if ( GetArgs( paramLine+6, "dff", &rc, &pos.x, &pos.y ) ) { - pos.x = pos.x / mapD.scale - mapD.orig.x; - pos.y = pos.y / mapD.scale - mapD.orig.y; -#ifdef DOPAUSE - if (lastCmd == pauseCmd) { -#endif - d = sqrt( (pos.x-mapPos.y)*(pos.x-mapPos.x) + - (pos.y-mapPos.y)*(pos.y-mapPos.y) ); - d *= mapD.dpi; - timeout = (long)(MSEC_PER_PIXEL * d); - if (timeout > 2) - if (playbackTimer == 0) - wPause( timeout ); -#ifdef DOPAUSE - } -#endif - mapPos = pos; - } -#endif thisCmd = mouseCmd; } for ( inx=0; inx #endif +#include #include - #include -#include "track.h" +#include "cjoin.h" #include "common.h" -#include "utility.h" +#include "compound.h" +#include "cselect.h" +#include "cundo.h" +#include "custom.h" #include "draw.h" +#include "fileio.h" +#include "i18n.h" +#include "layout.h" +#include "messages.h" #include "misc.h" -#include "cjoin.h" -#include "compound.h" +#include "param.h" +#include "paths.h" #include "smalldlg.h" -#include "i18n.h" -#include +#include "track.h" +#include "utility.h" #define DEFAULT_SCALE ("N") @@ -89,7 +96,7 @@ EXPORT wWin_p mainW; EXPORT wIndex_t changed = 0; -EXPORT char FAR message[STR_LONG_SIZE]; +EXPORT char message[STR_LONG_SIZE]; static char message2[STR_LONG_SIZE]; EXPORT REGION_T curRegion = 0; @@ -107,6 +114,7 @@ EXPORT wButton_p redoB; EXPORT wButton_p zoomUpB; EXPORT wButton_p zoomDownB; +wButton_p mapShowB; EXPORT wIndex_t checkPtMark = 0; @@ -286,6 +294,95 @@ EXPORT char * MyStrdup( const char * str ) return ret; } +/* + * Convert Text into the equivalent form that can be written to a file or put in a text box by adding escape characters + * + * The following special characters are produced - + * \n for LineFeed 0x0A + * \t for Tab 0x09 + * "" for " This is so that a CSV conformant type program can interpret the file output + * + */ +EXPORT char * ConvertToEscapedText(const char * text) { + int text_i=0; + int add = 0; //extra chars for escape + while(text[text_i]) { + switch (text[text_i]) { + case '\n': add++; break; + case '\t': add++; break; + case '\\': add++; break; + case '\"': add++; break; + } + text_i++; + } + char * cout = MyMalloc(strlen(text)+1+add); + int cout_i = 0; + text_i = 0; + while(text[text_i]) { + char c = text[text_i]; + switch (c) { + case '\n': cout[cout_i] = '\\'; cout_i++; cout[cout_i] = 'n'; cout_i++; break; // Line Feed + case '\t': cout[cout_i] = '\\'; cout_i++; cout[cout_i] = 't'; cout_i++; break; // Tab + case '\\': cout[cout_i] = '\\'; cout_i++; cout[cout_i] = '\\'; cout_i++; break; // BackSlash + case '\"': cout[cout_i] = '\"'; cout_i++; cout[cout_i] = '\"'; cout_i++; break; // Double Quotes + default: cout[cout_i] = c; cout_i++; + } + text_i++; + } + cout[cout_i] = '\0'; + return cout; +} + +/* + * Convert Text that has embedded escape characters into the equivalent form that can be shown on the screen + * + * The following special characters are supported - + * \n = LineFeed 0x0A + * \t = Tab 0x09 + * \\ = \ The way to still produce backslash + * "" = " Take out quotes included so that other (CSV-like) programs could read the files + * + */ +EXPORT char * ConvertFromEscapedText(const char * text) { + enum { CHARACTER, ESCAPE, QUOTE } state = CHARACTER; + char * cout = MyMalloc(strlen(text)+1); //always equal to or shorter than + int text_i = 0; + int cout_i = 0; + int c; + while (text[text_i]) { + c = text[text_i]; + switch (state) { + case CHARACTER: + if (c == '\\') { + state = ESCAPE; + } else if (c == '\"') { + state = QUOTE; + } else { + cout[cout_i] = c; + cout_i++; + } + break; + + case ESCAPE: + switch (c) { + case '\\': cout[cout_i] = '\\'; cout_i++; break; // "\\" = "\" + case 'n': cout[cout_i] = '\n'; cout_i++; break; // LF + case 't': cout[cout_i] = '\t'; cout_i++; break; // TAB + } + state = CHARACTER; + break; + case QUOTE: + switch(c) { + case '\"': cout[cout_i] = c; cout_i++; break; //One quote = NULL, Two quotes = 1 quote + } + state = CHARACTER; + } + text_i++; + } + cout[cout_i] = '\0'; + return cout; +} + EXPORT void AbortProg( char * msg, @@ -482,7 +579,8 @@ static void ChkRevert( void ) _("&Revert"), _("&Cancel") ); if( rc ) { /* load the file */ - LoadTracks( 1, &curFileName, NULL ); + char *filename = GetLayoutFullPath(); + LoadTracks( 1, &filename, NULL ); } } } @@ -518,7 +616,7 @@ EXPORT void SaveState( void ) RememberParamFiles(); ParamUpdatePrefs(); - wPrefSetString( "misc", "lastlayout", curPathName ); + wPrefSetString( "misc", "lastlayout", GetLayoutFullPath()); if ( fileList_ml ) { strcpy( file, "file" ); @@ -537,17 +635,14 @@ EXPORT void SaveState( void ) } /* - * Clean up befor quitting + * Clean up before quitting */ -static int quitting; static void DoQuitAfter( void ) { changed = 0; SaveState(); CleanupFiles(); - - quitting = TRUE; } /** * Process shutdown request. This function is called when the user requests @@ -557,28 +652,26 @@ static void DoQuitAfter( void ) void DoQuit( void ) { Confirm(_("Quit"), DoQuitAfter ); - if ( quitting ) { #ifdef CHECK_UNUSED_BALLOONHELP - ShowUnusedBalloonHelp(); + ShowUnusedBalloonHelp(); #endif - LogClose(); - wExit(0); - } + LogClose(); + wExit(0); } static void DoClearAfter( void ) { + ClearTracks(); /* set all layers to their default properties and set current layer to 0 */ DefaultLayerProperties(); - + DoLayout(NULL); checkPtMark = 0; Reset(); DoChangeNotification( CHANGE_MAIN|CHANGE_MAP ); EnableCommands(); - curPathName[0] = '\0'; - curFileName = curPathName; + SetLayoutFullPath(""); SetWindowTitle(); } @@ -591,24 +684,29 @@ static void DoClear( void ) * Toggle visibility state of map window. */ -void MapWindowToggleShow( void ) +void MapWindowToggleShow(void) { - MapWindowShow( !mapVisible ); + MapWindowShow(!mapVisible); } /** * Set visibility state of map window. + * + * \param state IN TRUE if visible, FALSE if hidden */ -void MapWindowShow( int state ) +void MapWindowShow(int state) { - mapVisible = state; - wPrefSetInteger( "misc", "mapVisible", mapVisible ); - wMenuToggleSet( mapShowMI, mapVisible ); - if( mapVisible ) - DoChangeNotification( CHANGE_MAP ); + mapVisible = state; + wPrefSetInteger("misc", "mapVisible", mapVisible); + wMenuToggleSet(mapShowMI, mapVisible); - wWinShow( mapW, mapVisible ); + if (mapVisible) { + DoChangeNotification(CHANGE_MAP); + } + + wWinShow(mapW, mapVisible); + wButtonSetBusy(mapShowB, (wBool_t)mapVisible); } static void DoShowWindow( @@ -619,6 +717,7 @@ static void DoShowWindow( if (data == mapW) { if (mapVisible == FALSE) { MapWindowShow( TRUE ); + return; } } wWinShow( (wWin_p)data, TRUE ); @@ -717,25 +816,6 @@ EXPORT void SelectFont( void ) #define BUTTON_MAX (170) #define NUM_CMDMENUS (4) -#ifdef LATER -static struct { - addButtonCallBack_t actionProc; - procCommand_t cmdProc; - char * helpStr; - wControl_p control; - char * labelStr; - int reqLevel; - wBool_t enabled; - wPos_t x, y; - long options; - long stickyMask; - int group; - long acclKey; - wMenuPush_p menu[NUM_CMDMENUS]; - void * context; - } commandList[COMMAND_MAX]; -#endif - static struct { wControl_p control; wBool_t enabled; @@ -873,6 +953,7 @@ LOG( log_command, 2, ( "COMMAND CANCEL %s\n", commandList[curCommand].helpKey ) checkPtMark = changed; } MainRedraw(); + MapRedraw(); EnableCommands(); ResetMouseState(); LOG( log_command, 1, ( "COMMAND RESET %s\n", commandList[curCommand].helpKey ) ) @@ -1011,7 +1092,10 @@ LOG( log_command, 4, ( " COMMAND returns %d\n", rc ) ) (commandList[curCommand].stickyMask & stickySet) ) { tempSegs_da.cnt = 0; UpdateAllElevations(); - MainRedraw(); + if (action != C_REDRAW) { + MainRedraw(); + MapRedraw(); + } if (commandList[curCommand].options & IC_NORESTART) { return C_CONTINUE; } @@ -1197,7 +1281,7 @@ EXPORT void LayoutSetPos( lastGroup = 0; wWinGetSize( mainW, &width, &h ); gap = 5; - toolbarWidth = width+5; + toolbarWidth = width-20+5; layerButtCnt = 0; toolbarHeight = 0; } @@ -1224,7 +1308,7 @@ EXPORT void LayoutSetPos( h = wControlGetHeight( buttonList[inx].control ); if ( inxwidth) { + if (toolbarWidth+w>width-20) { toolbarWidth = 0; toolbarHeight += h + 5; } @@ -1405,74 +1489,6 @@ EXPORT void ButtonGroupEnd( void ) } -#ifdef LATER -EXPORT wIndex_t AddCommandControl( - procCommand_t command, - char * helpKey, - char * nameStr, - wControl_p control, - int reqLevel, - long options, - long acclKey, - void * context ) -{ - wIndex_t buttInx = -1; - wIndex_t cmdInx; - BOOL_T newButtonGroup = FALSE; - wMenu_p tm, p1m, p2m; - static wIcon_p openbuttIcon = NULL; - static wMenu_p commandsSubmenu; - static wMenu_p popup1Submenu; - static wMenu_p popup2Submenu; - - AddToolbarControl( control, options ); - - buttonList[buttInx].cmdInx = commandCnt; - cmdInx = AddCommand( command, helpKey, nameStr, NULL, reqLevel, options, acclKey, context ); - commandList[cmdInx].buttInx = buttInx; - if (nameStr[0] == '\0') - return cmdInx; - if (commandList[cmdInx].options&IC_STICKY) { - if ( buttonGroupPopupM==NULL || newButtonGroup ) { - if ( stickyCnt > 32 ) - AbortProg( "stickyCnt>32" ); - stickyCnt++; - } - if ( buttonGroupPopupM==NULL) { - stickyLabels[stickyCnt-1] = nameStr; - } else { - stickyLabels[stickyCnt-1] = buttonGroupStickyLabel; - } - stickyLabels[stickyCnt] = NULL; - commandList[cmdInx].stickyMask = 1L<<(stickyCnt-1); - } - if ( buttonGroupPopupM ) { - commandList[cmdInx].menu[0] = - wMenuPushCreate( buttonGroupPopupM, helpKey, GetBalloonHelpStr(helpKey), 0, DoCommandB, (void*)cmdInx ); - tm = commandsSubmenu; - p1m = popup1Submenu; - p2m = popup2Submenu; - } else { - tm = commandsM; - p1m = (options&IC_POPUP2)?popup1aM:popup1M; - p2m = (options&IC_POPUP2)?popup2aM:popup2M; - } - commandList[cmdInx].menu[1] = - wMenuPushCreate( tm, helpKey, nameStr, acclKey, DoCommandB, (void*)cmdInx ); - if ( (options & (IC_POPUP|IC_POPUP2)) ) { - if ( !(options & IC_SELECTED) ) { - commandList[cmdInx].menu[2] = - wMenuPushCreate( p1m, helpKey, nameStr, 0, DoCommandB, (void*)cmdInx ); - } - commandList[cmdInx].menu[3] = - wMenuPushCreate( p2m, helpKey, nameStr, 0, DoCommandB, (void*)cmdInx ); - } - - return cmdInx; -} -#endif - - EXPORT wIndex_t AddMenuButton( wMenu_p menu, procCommand_t command, @@ -1730,7 +1746,7 @@ static char *AllToolbarLabels[] = { N_("Create Track Buttons"), N_("Layout Control Elements"), N_("Modify Track Buttons"), - N_("Describe/Select"), + N_("Properties/Select"), N_("Track Group Buttons"), N_("Train Group Buttons"), N_("Create Misc Buttons"), @@ -1826,15 +1842,26 @@ static void ShowAddElevations( void ) /*--------------------------------------------------------------------*/ static wWin_p rotateW; +static wWin_p moveW; static long rotateValue; +static coOrd moveValue; static rotateDialogCallBack_t rotateDialogCallBack; +static moveDialogCallBack_t moveDialogCallBack; static void RotateEnterOk( void * ); + static paramIntegerRange_t rn360_360 = { -360, 360, 80 }; static paramData_t rotatePLs[] = { { PD_LONG, &rotateValue, "rotate", PDO_ANGLE, &rn360_360, N_("Angle:") } }; static paramGroup_t rotatePG = { "rotate", 0, rotatePLs, sizeof rotatePLs/sizeof rotatePLs[0] }; +static paramFloatRange_t r_1000_1000 = { -1000.0, 1000.0, 80 }; +static void MoveEnterOk( void * ); +static paramData_t movePLs[] = { + { PD_FLOAT, &moveValue.x, "moveX", PDO_DIM, &r_1000_1000, N_("Move X:") }, + { PD_FLOAT, &moveValue.y, "moveY", PDO_DIM, &r_1000_1000, N_("Move Y:") } }; +static paramGroup_t movePG = { "move", 0, movePLs, sizeof movePLs/sizeof movePLs[0] }; + EXPORT void StartRotateDialog( rotateDialogCallBack_t func ) { @@ -1845,6 +1872,22 @@ EXPORT void StartRotateDialog( rotateDialogCallBack_t func ) wShow( rotateW ); } +EXPORT void StartMoveDialog( moveDialogCallBack_t func ) +{ + if ( moveW == NULL ) + moveW = ParamCreateDialog( &movePG, MakeWindowTitle(_("Move")), _("Ok"), MoveEnterOk, wHide, FALSE, NULL, 0, NULL ); + ParamLoadControls( &movePG ); + moveDialogCallBack = func; + moveValue = zero; + wShow( moveW ); +} + +static void MoveEnterOk( void * junk ) +{ + ParamLoadData( &movePG ); + moveDialogCallBack( (void*) &moveValue ); + wHide( moveW ); +} static void RotateEnterOk( void * junk ) { @@ -1862,6 +1905,17 @@ static void RotateDialogInit( void ) ParamRegister( &rotatePG ); } +static void MoveDialogInit (void) +{ + ParamRegister( &movePG ); +} + + +EXPORT void AddMoveMenu( + wMenu_p m, + moveDialogCallBack_t func ) { + wMenuPushCreate( m, "", _("Enter Move ..."), 0, (wMenuCallBack_p)StartMoveDialog, (void*)func ); +} EXPORT void AddRotateMenu( wMenu_p m, @@ -1904,6 +1958,7 @@ static void CreateDebugW( void ) debugPG.paramCnt = debugCnt; ParamRegister( &debugPG ); debugW = ParamCreateDialog( &debugPG, MakeWindowTitle(_("Debug")), _("Ok"), DebugOk, NULL, FALSE, NULL, 0, NULL ); + wHide(debugW); } @@ -1974,7 +2029,9 @@ static char * accelKeyNames[] = { "F9", "F10", "F11", - "F12" }; + "F12", + "NumpadAdd", + "NumpadSub"}; static void SetAccelKey( char * prefName, @@ -2020,12 +2077,12 @@ static void SetAccelKey( #include "bitmaps/document-save.xpm" #include "bitmaps/document-open.xpm" #include "bitmaps/document-print.xpm" +#include "bitmaps/map.xpm" static void CreateMenus( void ) { wMenu_p fileM, editM, viewM, optionM, windowM, macroM, helpM, toolbarM, messageListM, manageM, addM, changeM, drawM; wMenu_p zoomM, zoomSubM; -// wIcon_p bm_p; wMenuPush_p zoomInM, zoomOutM; @@ -2055,10 +2112,13 @@ static void CreateMenus( void ) wMenuPushCreate( popup2M, "cmdZoomOut", _("Zoom Out"), 0, (wMenuCallBack_p)DoZoomDown, (void*)1 ); MiscMenuItemCreate( popup1M, popup2M, "cmdGridEnable", _("SnapGrid Enable"), 0, (void*)(wMenuCallBack_p)SnapGridEnable, 0, (void *)0 ); MiscMenuItemCreate( popup1M, popup2M, "cmdGridShow", _("SnapGrid Show"), 0, (void*)(wMenuCallBack_p)SnapGridShow, 0, (void *)0 ); + MiscMenuItemCreate( popup1M, popup2M, "cmdMapShow", _("Show/Hide Map"), 0, (void*)(wMenuCallBack_p)MapWindowToggleShow, 0, (void *)0); wMenuSeparatorCreate( popup1M ); wMenuSeparatorCreate( popup2M ); MiscMenuItemCreate( popup2M, NULL, "cmdCopy", _("Copy"), 0, (void*)(wMenuCallBack_p)EditCopy, 0, (void *)0 ); MiscMenuItemCreate( popup1M, popup2M, "cmdPaste", _("Paste"), 0, (void*)(wMenuCallBack_p)EditPaste, 0, (void *)0 ); + MiscMenuItemCreate( popup1M, popup2M, "cmdSelectAll", _("Select All"), 0, (void*)(wMenuCallBack_p)SetAllTrackSelect, 0, (void *)1 ); + MiscMenuItemCreate( popup1M, popup2M, "cmdSelectCurrentLayer", _("Select Current Layer"), 0, (void*)(wMenuCallBack_p)SelectCurrentLayer, 0, (void *)0 ); MiscMenuItemCreate( popup2M, NULL, "cmdDeselectAll", _("Deselect All"), 0, (void*)(wMenuCallBack_p)SetAllTrackSelect, 0, (void *)0 ); wMenuPushCreate( popup2M, "cmdMove", _("Move"), 0, (wMenuCallBack_p)DoCommandBIndirect, &moveCmdInx ); wMenuPushCreate( popup2M, "cmdRotate", _("Rotate"), 0, (wMenuCallBack_p)DoCommandBIndirect, &rotateCmdInx ); @@ -2074,7 +2134,6 @@ static void CreateMenus( void ) AddToolbarButton( "menuFile-clear", wIconCreatePixMap(document_new), IC_MODETRAIN_TOO, (addButtonCallBack_t)DoClear, NULL ); AddToolbarButton( "menuFile-load", wIconCreatePixMap(document_open), IC_MODETRAIN_TOO, (addButtonCallBack_t)ChkLoad, NULL ); AddToolbarButton( "menuFile-save", wIconCreatePixMap(document_save), IC_MODETRAIN_TOO, (addButtonCallBack_t)DoSave, NULL ); -// AddToolbarButton( "menuFile-print", wIconCreatePixMap(document_print_xpm), IC_MODETRAIN_TOO, (addButtonCallBack_t)DoPrint, NULL ); cmdGroup = BG_ZOOM; zoomUpB = AddToolbarButton( "cmdZoomIn", wIconCreatePixMap(zoomin_xpm), IC_MODETRAIN_TOO, @@ -2097,7 +2156,7 @@ static void CreateMenus( void ) /* * FILE MENU */ - MiscMenuItemCreate( fileM, NULL, "menuFile-clear", _("&New"), ACCL_NEW, (void*)(wMenuCallBack_p)DoClear, 0, (void *)0 ); + MiscMenuItemCreate( fileM, NULL, "menuFile-clear", _("&New ..."), ACCL_NEW, (void*)(wMenuCallBack_p)DoClear, 0, (void *)0 ); wMenuPushCreate( fileM, "menuFile-load", _("&Open ..."), ACCL_OPEN, (wMenuCallBack_p)ChkLoad, NULL ); wMenuSeparatorCreate( fileM ); @@ -2179,8 +2238,10 @@ static void CreateMenus( void ) // visibility toggle for map window // get the start value - wPrefGetInteger( "misc", "mapVisible", (long *)&mapVisible, 1 ); - mapShowMI = wMenuToggleCreate( viewM, "cmdMapShow", _("Show Map"), ACCL_MAPSHOW, + long mapVisible_long; + wPrefGetInteger( "misc", "mapVisible", (long *)&mapVisible_long, 1 ); + mapVisible = mapVisible_long?TRUE:FALSE; + mapShowMI = wMenuToggleCreate( viewM, "cmdMapShow", _("Show/Hide Map"), ACCL_MAPSHOW, mapVisible, (wMenuToggleCallBack_p)MapWindowToggleShow, NULL ); wMenuSeparatorCreate( viewM ); @@ -2193,6 +2254,10 @@ static void CreateMenus( void ) cmdGroup = BG_SNAP; InitSnapGridButtons(); + mapShowB = AddToolbarButton("cmdMapShow", wIconCreatePixMap(map_xpm), IC_MODETRAIN_TOO, + (addButtonCallBack_t)MapWindowToggleShow, NULL); + wControlLinkedSet((wControl_p)mapShowMI, (wControl_p)mapShowB); + wButtonSetBusy(mapShowB, (wBool_t)mapVisible); /* * ADD MENU @@ -2221,6 +2286,7 @@ static void CreateMenus( void ) cmdGroup = BG_SELECT; InitCmdDescribe( changeM ); InitCmdSelect( changeM ); + InitCmdPan( changeM ); wMenuSeparatorCreate( changeM ); cmdGroup = BG_TRKGRP; @@ -2324,7 +2390,7 @@ static void CreateMenus( void ) InitNewTurn( wMenuMenuCreate( manageM, "cmdTurnoutNew", _("Tur&nout Designer...") ) ); - MiscMenuItemCreate( manageM, NULL, "smdContmgm", _("Layout &Control Elements"), ACCL_CONTMGM,(void*)ControlMgrInit(),0,(void*) 0); + MiscMenuItemCreate( manageM, NULL, "cmdContmgm", _("Layout &Control Elements"), ACCL_CONTMGM,(void*)ControlMgrInit(),0,(void*) 0); MiscMenuItemCreate( manageM, NULL, "cmdGroup", _("&Group"), ACCL_GROUP, (void*)(wMenuCallBack_p)DoGroup, IC_SELECTED, (void *)0 ); MiscMenuItemCreate( manageM, NULL, "cmdUngroup", _("&Ungroup"), ACCL_UNGROUP, (void*)(wMenuCallBack_p)DoUngroup, IC_SELECTED, (void *)0 ); @@ -2361,13 +2427,15 @@ static void CreateMenus( void ) #endif SetAccelKey( "zoomUp", wAccelKey_Pgdn, 0, (wAccelKeyCallBack_p)DoZoomUp, (void*)1 ); SetAccelKey( "zoomDown", wAccelKey_Pgup, 0, (wAccelKeyCallBack_p)DoZoomDown, (void*)1 ); - SetAccelKey( "redraw", wAccelKey_F5, 0, (wAccelKeyCallBack_p)MainRedraw, (void*)1 ); + SetAccelKey( "redraw", wAccelKey_F5, 0, (wAccelKeyCallBack_p)MainRedraw, (void*)1 ); SetAccelKey( "delete", wAccelKey_Del, 0, (wAccelKeyCallBack_p)SelectDelete, (void*)1 ); SetAccelKey( "copy", wAccelKey_Ins, WKEY_CTRL, (wAccelKeyCallBack_p)EditCopy, 0 ); SetAccelKey( "paste", wAccelKey_Ins, WKEY_SHIFT, (wAccelKeyCallBack_p)EditPaste, 0 ); SetAccelKey( "undo", wAccelKey_Back, WKEY_SHIFT, (wAccelKeyCallBack_p)UndoUndo, 0 ); SetAccelKey( "cut", wAccelKey_Del, WKEY_SHIFT, (wAccelKeyCallBack_p)EditCut, 0 ); SetAccelKey( "nextWindow", wAccelKey_F6, 0, (wAccelKeyCallBack_p)NextWindow, 0 ); + SetAccelKey( "zoomUp", wAccelKey_Numpad_Add, WKEY_CTRL, (wAccelKeyCallBack_p)DoZoomUp, (void*)1 ); + SetAccelKey( "zoomDown", wAccelKey_Numpad_Subtract, WKEY_CTRL, (wAccelKeyCallBack_p)DoZoomDown, (void*)1 ); InitBenchDialog(); } @@ -2386,9 +2454,9 @@ static void LoadFileList( void ) if (!cp) continue; pathName = MyStrdup(cp); - fileName = strrchr( pathName, FILE_SEP_CHAR[0] ); + fileName = FindFilename((char *)pathName); if (fileName) - wMenuListAdd( fileList_ml, 0, fileName+1, pathName ); + wMenuListAdd( fileList_ml, 0, fileName, pathName ); } } @@ -2408,13 +2476,13 @@ EXPORT void InitCmdExport( void ) * the option to load the checkpoint file to continue working after a crash. * * \param none - * \return none + * \return TRUE for resume, FALSE otherwise * */ -static void OfferCheckpoint( void ) +static int OfferCheckpoint( void ) { - int ret; + int ret = FALSE; /* sProdName */ ret = wNoticeEx( NT_INFORMATION, @@ -2423,8 +2491,9 @@ static void OfferCheckpoint( void ) if( ret ) { /* load the checkpoint file */ LoadCheckpoint(); + ret = TRUE; } - + return ret; } @@ -2433,6 +2502,7 @@ EXPORT wWin_p wMain( char * argv[] ) { int c; + int resumeWork; char * logFileName = NULL; int log_init = 0; int initialZoom = 0; @@ -2445,6 +2515,8 @@ EXPORT wWin_p wMain( char *oldLocale = NULL; char buffer[ STR_SIZE ]; unsigned int i; + wPos_t displayWidth; + wPos_t displayHeight; strcpy( buffer, sProdNameLower ); @@ -2527,15 +2599,19 @@ LOG1( log_init, ( "initCustom\n" ) ) * MAIN WINDOW */ LOG1( log_init, ( "create main window\n" ) ) - strcpy( Title1, sProdName ); + SetLayoutTitle( sProdName ); sprintf( message, _("Unnamed Trackplan - %s(%s)"), sProdName, sVersion ); wSetBalloonHelp( balloonHelp ); - mainW = wWinMainCreate( buffer, 600, 350, "xtrkcadW", message, "main", + + wGetDisplaySize(&displayWidth, &displayHeight); + mainW = wWinMainCreate( buffer, (displayWidth*2)/3, (displayHeight*2)/3, "xtrkcadW", message, "main", F_RESIZE|F_MENUBAR|F_NOTAB|F_RECALLPOS|F_HIDE, MainProc, NULL ); if ( mainW == NULL ) return NULL; + InitAppDefaults(); + drawColorBlack = wDrawFindColor( wRGB( 0, 0, 0) ); drawColorWhite = wDrawFindColor( wRGB(255,255,255) ); drawColorRed = wDrawFindColor( wRGB(255, 0, 0) ); @@ -2593,6 +2669,7 @@ LOG1( log_init, ( "misc2Init\n" ) ) Misc2Init(); RotateDialogInit(); + MoveDialogInit(); wSetSplashInfo( _("Initializing commands") ); LOG1( log_init, ( "paramInit\n" ) ) @@ -2687,19 +2764,21 @@ LOG1( log_init, ( "Initialization complete\n" ) ) ShowTip(SHOWTIP_NEXTTIP); - /* if work is to be resumed and no filename was given on startup, load last layout */ - if( (onStartup == 0) && (!initialFile || !strlen(initialFile))) { - initialFile = (char*)wPrefGetString( "misc", "lastlayout" ); - } - - if (initialFile && strlen(initialFile)) { - DoFileList( 0, NULL, initialFile ); - } - /* check for existing checkpoint file */ + resumeWork = FALSE; if (ExistsCheckpoint()) - OfferCheckpoint(); + resumeWork = OfferCheckpoint(); + if (!resumeWork) { + /* if work is to be resumed and no filename was given on startup, load last layout */ + if ((onStartup == 0) && (!initialFile || !strlen(initialFile))) { + initialFile = (char*)wPrefGetString("misc", "lastlayout"); + } + + if (initialFile && strlen(initialFile)) { + DoFileList(0, NULL, initialFile); + } + } inMainW = FALSE; return mainW; } diff --git a/app/bin/misc.h b/app/bin/misc.h index 1747189..2a26b0c 100644 --- a/app/bin/misc.h +++ b/app/bin/misc.h @@ -25,12 +25,15 @@ #define EXPORT +#include + #include "acclkeys.h" +#include "common.h" +#include "draw.h" +#include "wlib.h" typedef void (*addButtonCallBack_t)(void*); -#include "custom.h" - #ifdef WINDOWS /* suppress warning from *.bmp about conversion of int to char */ #pragma warning( disable : 4305) @@ -72,8 +75,7 @@ extern DIST_T connectDistance; extern ANGLE_T connectAngle; extern long twoRailScale; extern long mapScale; -extern char Title1[40]; -extern char Title2[40]; +extern long zoomCorner; extern long checkPtInterval; extern long liveMap; extern long preSelect; @@ -84,9 +86,6 @@ extern long descriptionFontSize; extern long units; extern long onStartup; extern long angleSystem; -extern SCALEINX_T curScaleInx; -extern GAUGEINX_T curGaugeInx; -extern SCALEDESCINX_T curScaleDescInx; extern DIST_T trackGauge; extern DIST_T curScaleRatio; extern char * curScaleName; @@ -181,7 +180,7 @@ extern wPos_t DlgSepFrmBottom; extern wWin_p mainW; extern wPos_t toolbarHeight; extern wIndex_t changed; -extern char FAR message[STR_LONG_SIZE]; +extern char message[STR_LONG_SIZE]; extern REGION_T curRegion; extern long paramVersion; extern coOrd zero; @@ -199,8 +198,11 @@ extern wMenu_p popup1M, popup2M; #define wControlBeside( B ) (wControlGetPosX((wControl_p)(B))+wControlGetWidth((wControl_p)(B))) typedef void (*rotateDialogCallBack_t) ( void * ); +typedef void (*moveDialogCallBack_t) (void *); extern void AddRotateMenu( wMenu_p, rotateDialogCallBack_t ); +extern void AddMoveMenu( wMenu_p, moveDialogCallBack_t ); extern void StartRotateDialog( rotateDialogCallBack_t ); +extern void StartMoveDialog(moveDialogCallBack_t ); /* * Safe Memory etc */ @@ -219,6 +221,9 @@ int NoticeMessage( char *, char*, char *, ... ); int NoticeMessage2( int, char *, char*, char *, ... ); void DoQuit( void ); +char * ConvertFromEscapedText(const char * text); +char * ConvertToEscapedText(const char * text); + void wShow( wWin_p ); void wHide( wWin_p ); void CloseDemoWindows( void ); @@ -282,10 +287,6 @@ typedef void (*changeNotificationCallBack_t)( long ); void RegisterChangeNotification( changeNotificationCallBack_t ); void DoChangeNotification( long ); -#include "param.h" -#include "misc2.h" -#include "fileio.h" - /* foreign externs */ extern drawCmd_t mapD; extern STATUS_T CmdEnumerate( wAction_t, coOrd ); @@ -386,6 +387,11 @@ BOOL_T CarCustomSave(FILE*); typedef int (*contMgmCallBack_p) (int, void *); void ContMgmLoad (wIcon_p,contMgmCallBack_p,void *); +/* dlayer.c */ +void LayerSetCounts(); +void DecrementLayerObjects(unsigned int index); +void IncrementLayerObjects(unsigned int index); + /* doption.c */ long GetDistanceFormat( void ); diff --git a/app/bin/misc2.c b/app/bin/misc2.c index 2c7644b..0dbb57d 100644 --- a/app/bin/misc2.c +++ b/app/bin/misc2.c @@ -36,27 +36,32 @@ #include -#include "track.h" -#include "common.h" -#include "utility.h" -#include "draw.h" -#include "misc.h" #include "cjoin.h" +#include "common.h" #include "compound.h" +#include "custom.h" +#include "draw.h" +#include "fileio.h" #include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "misc.h" +#include "param.h" +#include "track.h" +#include "utility.h" + -EXPORT long units = 0; /**< measurement units: 0 = English, 1 = metric */ +EXPORT long units = 0; /**< measurement units: 0 = English, 1 = metric */ EXPORT long checkPtInterval = 10; EXPORT DIST_T curScaleRatio; EXPORT char * curScaleName; EXPORT DIST_T trackGauge; -EXPORT char Title1[TITLEMAXLEN] = ""; -EXPORT char Title2[TITLEMAXLEN] = "Title line 2"; EXPORT long labelScale = 8; EXPORT long labelEnable = ((1<<0)|LABELENABLE_LENGTHS|LABELENABLE_ENDPT_ELEV|LABELENABLE_CARS); EXPORT long labelWhen = 2; EXPORT long colorLayers = 0; +EXPORT long zoomCorner = 0; EXPORT long hideSelectionWindow = 0; EXPORT long angleSystem = 0; EXPORT DIST_T minLength = 0.1; @@ -65,13 +70,15 @@ EXPORT ANGLE_T connectAngle = 1.0; EXPORT long twoRailScale = 16; EXPORT long mapScale = 64; EXPORT long liveMap = 0; -EXPORT long preSelect = 0; +EXPORT long preSelect = 0; /**< default command 0 = Describe 1 = Select */ EXPORT long listLabels = 7; EXPORT long layoutLabels = 1; EXPORT long descriptionFontSize = 72; EXPORT long enableListPrices = 1; EXPORT void ScaleLengthEnd(void); -static char minTrackRadiusPrefS[STR_SHORT_SIZE] = "minTrackRadius"; + +static BOOL_T SetScaleDescGauge(SCALEINX_T scaleInx); + /**************************************************************************** * @@ -173,7 +180,7 @@ static tieData_t tieData_demo = { 16.0/160.0, 32.0/160.0 }; -EXPORT SCALEINX_T curScaleInx = -1; +//EXPORT SCALEINX_T curScaleInx = -1; static scaleInfo_p curScale; EXPORT long includeSameGaugeTurnouts = FALSE; static SCALEINX_T demoScaleInx = -1; @@ -188,8 +195,6 @@ typedef struct { EXPORT typedef gaugeInfo_t * gaugeInfo_p; -EXPORT GAUGEINX_T curGaugeInx = 0; - /** this struct holds a scale description */ typedef struct { char *scaleDesc; /** ptr to textual description eg. 'HO' */ @@ -202,7 +207,6 @@ EXPORT typedef scaleDesc_t *scaleDesc_p; static dynArr_t scaleDesc_da; #define scaleDesc(N) DYNARR_N( scaleDesc_t, scaleDesc_da, N ) -EXPORT SCALEDESCINX_T curScaleDescInx; /** * Get the ratio from a scale description. Each member in the list of scale descriptions is @@ -307,6 +311,48 @@ EXPORT char *GetGaugeDesc( SCALEDESCINX_T scaleInx, GAUGEINX_T gaugeInx ) return g->gauge; } +void +SetScaleGauge(SCALEDESCINX_T desc, GAUGEINX_T gauge) +{ + dynArr_t gauges_da; + + gauges_da = (scaleDesc(desc)).gauges_da; + SetLayoutCurScale(((gaugeInfo_p)gauges_da.ptr)[gauge].scale); +} + +static BOOL_T +SetScaleDescGauge(SCALEINX_T scaleInx) +{ + int i, j; + char *scaleName = GetScaleName(scaleInx); + DIST_T scaleRatio = GetScaleRatio(scaleInx); + dynArr_t gauges_da; + + for (i = 0; i < scaleDesc_da.cnt; i++) { + char *t = strchr(scaleDesc(i).scaleDesc, ' '); + /* are the first characters (which describe the scale) identical? */ + if (!strncmp(scaleDesc(i).scaleDesc, scaleName, t - scaleDesc(i).scaleDesc)) { + /* if yes, are we talking about the same ratio */ + if (scaleInfo(scaleDesc(i).scale).ratio == scaleRatio) { + /* yes, we found the right scale descriptor, so now look for the gauge */ + SetLayoutCurScaleDesc( i ); + gauges_da = scaleDesc(i).gauges_da; + SetLayoutCurGauge(0); + for (j = 0; j < gauges_da.cnt; j++) { + gaugeInfo_p ptr = &(DYNARR_N(gaugeInfo_t, gauges_da, j)); + if (scaleInfo(ptr->scale).gauge == GetScaleTrackGauge(scaleInx)) { + SetLayoutCurGauge( j ); + break; + } + } + break; + } + } + } + + return TRUE; +} + EXPORT SCALEINX_T LookupScale( const char * name ) { wIndex_t si; @@ -411,21 +457,20 @@ SetScale( SCALEINX_T newScaleInx ) NoticeMessage( MSG_BAD_SCALE_INDEX, _("Ok"), NULL, (int)newScaleInx ); return; } - curScaleInx = (SCALEINX_T)newScaleInx; - curScale = &scaleInfo(curScaleInx); + SetLayoutCurScale((SCALEINX_T)newScaleInx ); + curScale = &scaleInfo(newScaleInx); trackGauge = curScale->gauge; curScaleRatio = curScale->ratio; curScaleName = curScale->scale; - curScaleDescInx = 0; + SetLayoutCurScaleDesc( 0 ); - GetScaleGauge( curScaleInx, &curScaleDescInx, &curGaugeInx ); + SetScaleDescGauge((SCALEINX_T)newScaleInx); wPrefSetString( "misc", "scale", curScaleName ); // now load the minimum radius for the newly selected scale - sprintf( minTrackRadiusPrefS, "minTrackRadius-%s", curScaleName ); - wPrefGetFloat( "misc", minTrackRadiusPrefS, &minTrackRadius, curScale->R[0] ); + LoadLayoutMinRadiusPref(curScaleName, curScale->R[0]); } /** @@ -449,7 +494,7 @@ EXPORT BOOL_T DoSetScale( while (isspace((unsigned char)*newScale)) newScale++; for (scale = 0; scale -#endif +#include "common.h" +#include "misc.h" +#include "time.h" #define LABEL_MANUF (1<<0) #define LABEL_PARTNO (1<<1) @@ -76,27 +76,25 @@ void GetScaleEasementValues( DIST_T *, DIST_T * ); tieData_p GetScaleTieData( SCALEINX_T ); SCALEINX_T LookupScale( const char * ); BOOL_T GetScaleGauge( SCALEINX_T scaleInx, SCALEDESCINX_T *scaleDescInx, GAUGEINX_T *gaugeInx); - +void SetScaleGauge(SCALEDESCINX_T desc, GAUGEINX_T gauge); BOOL_T DoSetScale( char * ); -static void SetScale( SCALEINX_T ); -void SetScaleGauge( SCALEDESCINX_T, GAUGEINX_T ); void ScaleLengthIncrement( SCALEINX_T, DIST_T ); void LoadScaleList( wList_p ); void LoadGaugeList( wList_p, SCALEDESCINX_T ); BOOL_T CompatibleScale( BOOL_T, SCALEINX_T, SCALEINX_T ); BOOL_T DoSetScaleDesc( void ); -typedef int LAYER_T; -LAYER_T curLayer; + +unsigned int curLayer; long layerCount; -wDrawColor GetLayerColor( LAYER_T ); -BOOL_T GetLayerVisible( LAYER_T ); -BOOL_T GetLayerFrozen( LAYER_T ); -BOOL_T GetLayerOnMap( LAYER_T ); -char * GetLayerName( LAYER_T ); +wDrawColor GetLayerColor( unsigned int ); +BOOL_T GetLayerVisible( unsigned int ); +BOOL_T GetLayerFrozen( unsigned int ); +BOOL_T GetLayerOnMap( unsigned int ); +char * GetLayerName( unsigned int ); BOOL_T ReadLayers( char * ); BOOL_T WriteLayers( FILE * ); - +char * FormatLayerName(unsigned int layerNumber); /* dlayers.c */ void UpdateLayerLists( void ); void DefaultLayerProperties(void); diff --git a/app/bin/param.c b/app/bin/param.c index 27c558f..e513bc3 100644 --- a/app/bin/param.c +++ b/app/bin/param.c @@ -21,6 +21,7 @@ */ #include +#include #include #ifndef WINDOWS #include @@ -45,12 +46,17 @@ #include #include #include -#include "track.h" + #include "common.h" -#include "utility.h" -#include "misc.h" #include "compound.h" +#include "custom.h" +#include "fileio.h" #include "i18n.h" +#include "messages.h" +#include "misc.h" +#include "param.h" +#include "track.h" +#include "utility.h" /* Bogus reg vars */ @@ -65,10 +71,6 @@ EXPORT char *PREFSECT = "DialogItem"; static int paramCheckErrorCount = 0; static BOOL_T paramCheckShowErrors = FALSE; -static int log_hotspot; -static int hotspotOffsetX = 5; -static int hotspotOffsetY = 19; - static int log_paramLayout; @@ -168,88 +170,119 @@ static int GetNumberStr( char ** cpp, FLOAT_T * numP, BOOL_T * hasFract ) } //extern wIndex_t distanceFormatInx; // distanceFormatInx -static BOOL_T GetDistance( char ** cpp, FLOAT_T * distP ) +static BOOL_T GetDistance(char ** cpp, FLOAT_T * distP) { - FLOAT_T n1, n2; - BOOL_T neg = FALSE; - BOOL_T hasFract; - BOOL_T expectInch = FALSE; - long distanceFormat; - - while ( isspace((unsigned char)**cpp) ) (*cpp)++; - if ( (*cpp)[0] == '\0' ) { - *distP = 0.0; - return TRUE; - } - if ( (*cpp)[0] == '-' ) { - neg = TRUE; - (*cpp)++; - } - if ( !GetNumberStr( cpp, &n1, &hasFract ) ) return FALSE; - - distanceFormat = GetDistanceFormat(); - - - if ( (*cpp)[0] == '\0' ) { /* EOL */ - if ( units==UNITS_METRIC ) - { - n1 = n1/2.54; - if ((distanceFormat & DISTFMT_FMT) == DISTFMT_FMT_MM) - n1 /= 10; - if ((distanceFormat & DISTFMT_FMT) == DISTFMT_FMT_M) - n1 *= 100; - } else { - if (((distanceFormat & DISTFMT_FMT) == DISTFMT_FMT_SHRT) || ((distanceFormat & DISTFMT_FMT) == DISTFMT_FMT_LONG)) - n1 *= 12; - } - if ( neg ) - n1 = -n1; - *distP = n1; - return TRUE; - } - if ( (*cpp)[0] == '\'' ) { - n1 *= 12.0; - (*cpp) += 1; - expectInch = !hasFract; - } else if ( tolower((unsigned char)(*cpp)[0]) == 'f' && tolower((unsigned char)(*cpp)[1]) == 't' ) { - n1 *= 12.0; - (*cpp) += 2; - expectInch = !hasFract; - } else if ( tolower((unsigned char)(*cpp)[0]) == 'c' && tolower((unsigned char)(*cpp)[1]) == 'm' ) { - n1 /= 2.54; - (*cpp) += 2; - } else if ( tolower((unsigned char)(*cpp)[0]) == 'm' && tolower((unsigned char)(*cpp)[1]) == 'm' ) { - n1 /= 25.4; - (*cpp) += 2; - } else if ( tolower((unsigned char)(*cpp)[0]) == 'm' ) { - n1 *= 100.0/2.54; - (*cpp) += 1; - } else if ( (*cpp)[0] == '"' ) { - (*cpp) += 1; - } else if ( tolower((unsigned char)(*cpp)[0]) == 'i' && tolower((unsigned char)(*cpp)[1]) == 'n' ) { - (*cpp) += 2; - } else { - getNumberError = N_("Invalid Units Indicator"); - return FALSE; - } - while ( isspace((unsigned char)**cpp) ) (*cpp)++; - if ( expectInch && isdigit( (unsigned char)**cpp ) ) { - if ( !GetNumberStr( cpp, &n2, &hasFract ) ) return FALSE; - n1 += n2; - if ( (*cpp)[0] == '"' ) - (*cpp) += 1; - else if ( tolower((unsigned char)(*cpp)[0]) == 'i' && tolower((unsigned char)(*cpp)[1]) == 'n' ) - (*cpp) += 2; - while ( isspace((unsigned char)**cpp) ) (*cpp)++; - } - if ( **cpp ) { - getNumberError = N_("Expected End Of String"); - return FALSE; - } - if ( neg ) - n1 = -n1; - *distP = n1; - return TRUE; + FLOAT_T n1, n2; + BOOL_T neg = FALSE; + BOOL_T hasFract; + BOOL_T expectInch = FALSE; + long distanceFormat; + + while (isspace((unsigned char)**cpp)) { + (*cpp)++; + } + + if ((*cpp)[0] == '\0') { + *distP = 0.0; + return TRUE; + } + + if ((*cpp)[0] == '-') { + neg = TRUE; + (*cpp)++; + } + + if (!GetNumberStr(cpp, &n1, &hasFract)) { + return FALSE; + } + + distanceFormat = GetDistanceFormat(); + + if ((*cpp)[0] == '\0') { /* EOL */ + if (units==UNITS_METRIC) { + n1 = n1/2.54; + + if ((distanceFormat & DISTFMT_FMT) == DISTFMT_FMT_MM) { + n1 /= 10; + } + + if ((distanceFormat & DISTFMT_FMT) == DISTFMT_FMT_M) { + n1 *= 100; + } + } + + if (neg) { + n1 = -n1; + } + + *distP = n1; + return TRUE; + } + + if ((*cpp)[0] == '\'') { + n1 *= 12.0; + (*cpp) += 1; + expectInch = !hasFract; + } else if (tolower((unsigned char)(*cpp)[0]) == 'f' && + tolower((unsigned char)(*cpp)[1]) == 't') { + n1 *= 12.0; + (*cpp) += 2; + expectInch = !hasFract; + } else if (tolower((unsigned char)(*cpp)[0]) == 'c' && + tolower((unsigned char)(*cpp)[1]) == 'm') { + n1 /= 2.54; + (*cpp) += 2; + } else if (tolower((unsigned char)(*cpp)[0]) == 'm' && + tolower((unsigned char)(*cpp)[1]) == 'm') { + n1 /= 25.4; + (*cpp) += 2; + } else if (tolower((unsigned char)(*cpp)[0]) == 'm') { + n1 *= 100.0/2.54; + (*cpp) += 1; + } else if ((*cpp)[0] == '"') { + (*cpp) += 1; + } else if (tolower((unsigned char)(*cpp)[0]) == 'i' && + tolower((unsigned char)(*cpp)[1]) == 'n') { + (*cpp) += 2; + } else { + getNumberError = N_("Invalid Units Indicator"); + return FALSE; + } + + while (isspace((unsigned char)**cpp)) { + (*cpp)++; + } + + if (expectInch && isdigit((unsigned char)**cpp)) { + if (!GetNumberStr(cpp, &n2, &hasFract)) { + return FALSE; + } + + n1 += n2; + + if ((*cpp)[0] == '"') { + (*cpp) += 1; + } else if (tolower((unsigned char)(*cpp)[0]) == 'i' && + tolower((unsigned char)(*cpp)[1]) == 'n') { + (*cpp) += 2; + } + + while (isspace((unsigned char)**cpp)) { + (*cpp)++; + } + } + + if (**cpp) { + getNumberError = N_("Expected End Of String"); + return FALSE; + } + + if (neg) { + n1 = -n1; + } + + *distP = n1; + return TRUE; } @@ -279,46 +312,57 @@ EXPORT FLOAT_T DecodeFloat( } -EXPORT FLOAT_T DecodeDistance( - wString_p strCtrl, - BOOL_T * validP ) +FLOAT_T DecodeDistance( + wString_p strCtrl, + BOOL_T * validP) { - FLOAT_T valF; - char *cp0, *cp1, *cpN, c1; - - cp0 = cp1 = cpN = CAST_AWAY_CONST wStringGetValue( strCtrl ); - cpN += strlen(cpN)-1; - while (cpN > cp1 && isspace((unsigned char)*cpN) ) cpN--; - c1 = *cpN; - switch ( c1 ) { - case '=': - case 's': - case 'S': - case 'p': - case 'P': - *cpN = '\0'; - break; - default: - cpN = NULL; - } - *validP = ( GetDistance( &cp1, &valF ) ); - if ( cpN ) - *cpN = c1; - if ( *validP ) { -/*fprintf( stderr, "gd=%0.6f\n", valF );*/ - if ( c1 == 's' || c1 == 'S' ) - valF *= curScaleRatio; - else if ( c1 == 'p' || c1 == 'P' ) - valF /= curScaleRatio; - if ( cpN ) - wStringSetValue( strCtrl, FormatDistance( valF ) ); - } else { -/*fprintf( stderr, "Gd( @%s ) error=%s\n", cp1, getNumberError );*/ - sprintf( decodeErrorStr, "%s @ %s", _(getNumberError), *cp1?cp1:_("End Of String") ); - /*wStringSetHilight( strCtrl, cp1-cp0, -1 ); */ - valF = 0.0; - } - return valF; + FLOAT_T valF; + char *cp0, *cp1, *cpN, c1; + cp0 = cp1 = cpN = CAST_AWAY_CONST wStringGetValue(strCtrl); + cpN += strlen(cpN)-1; + + while (cpN > cp1 && isspace((unsigned char)*cpN)) { + cpN--; + } + + c1 = *cpN; + + switch (c1) { + case '=': + case 's': + case 'S': + case 'p': + case 'P': + *cpN = '\0'; + break; + + default: + cpN = NULL; + } + + *validP = (GetDistance(&cp1, &valF)); + + if (cpN) { + *cpN = c1; + } + + if (*validP) { + if (c1 == 's' || c1 == 'S') { + valF *= curScaleRatio; + } else if (c1 == 'p' || c1 == 'P') { + valF /= curScaleRatio; + } + + if (cpN) { + wStringSetValue(strCtrl, FormatDistance(valF)); + } + } else { + sprintf(decodeErrorStr, "%s @ %s", _(getNumberError), + *cp1?cp1:_("End Of String")); + valF = 0.0; + } + + return valF; } @@ -542,10 +586,18 @@ EXPORT void ParamLoadControl( p->oldD.f = tmpR; break; case PD_STRING: - wStringSetValue( (wString_p)p->control, (char*)p->valueP ); if (p->oldD.s) MyFree( p->oldD.s ); - p->oldD.s = MyStrdup( (char*)p->valueP ); + if (p->context) { + p->oldD.s = MyMalloc((intptr_t)p->context); + strncpy(p->oldD.s, (char*)p->valueP, (intptr_t)p->context); + *(p->oldD.s + (intptr_t)p->context - 1) = '\0'; + wStringSetValue((wString_p)p->control, (char*)p->oldD.s); + } + else { + p->oldD.s = MyStrdup((char *)p->valueP); + wStringSetValue((wString_p)p->control, (char*)p->valueP); + } break; case PD_MESSAGE: wMessageSetValue( (wMessage_p)p->control, _((char*)p->valueP) ); @@ -558,6 +610,7 @@ EXPORT void ParamLoadControl( case PD_DRAW: case PD_MENU: case PD_MENUITEM: + case PD_BITMAP: break; } } @@ -677,8 +730,20 @@ EXPORT long ParamUpdate( if (p->oldD.s) MyFree( p->oldD.s ); p->oldD.s = MyStrdup( stringV ); - if ( /*(p->option&PDO_NOUPDUPD)==0 &&*/ p->valueP) - strcpy( (char*)p->valueP, stringV ); + if ( /*(p->option&PDO_NOUPDUPD)==0 &&*/ p->valueP) { + if (p->context) { + strncpy((char*)p->valueP, stringV, (intptr_t)p->context); + ((char *)p->valueP)[(intptr_t)p->context - 1] = '\0'; + if (strlen(stringV) > (uintptr_t)p->context) { + NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, (intptr_t)p->context); + } + + } + else { + strcpy((char*)p->valueP, stringV); + } + } + if ( (p->option&PDO_NOUPDACT)==0 && pg->changeProc) pg->changeProc( pg, inx, CAST_AWAY_CONST stringV ); change |= (1L<option&PDO_LISTINDEX) ) { if (!wPrefGetInteger( PREFSECT, prefName1, &valL, *(wIndex_t*)p->valueP )) - wPrefGetInteger( prefSect2, prefName2, &valL, *(wIndex_t*)p->valueP ); + wPrefGetInteger( prefSect2, prefName2, &valL, valL ); if ( p->control ) wListSetIndex( (wList_p)p->control, (wIndex_t)valL ); *(wIndex_t*)p->valueP = (wIndex_t)valL; @@ -1185,6 +1254,7 @@ EXPORT void ParamGroupRecord( case PD_TEXT: case PD_MENU: case PD_MENUITEM: + case PD_BITMAP: break; } } @@ -1517,7 +1587,7 @@ EXPORT void ParamChange( paramData_p p ) case PD_DROPLIST: case PD_COMBOLIST: if (recordF && (p->option&PDO_NORECORD)==0 && p->group->nameStr && p->nameStr) { - fprintf( recordF, "PARAMETER %s %s %d %s\n", p->group->nameStr, p->nameStr, *(wIndex_t*)p->valueP, ??? ); + fprintf( recordF, "PARAMETER %s %s %d %s\n", p->group->nameStr, p->nameStr, *(wIndex_t*)p->valueP, "???" ); } #ifdef LATER if ( p->control && (p->option&PDO_NOCONTUPD) == 0 ) @@ -1776,6 +1846,7 @@ static void ParamPlayback( char * line ) case PD_MESSAGE: case PD_TEXT: case PD_MENU: + case PD_BITMAP: break; case PD_MENUITEM: if (p->valueP) { @@ -1926,6 +1997,7 @@ static void ParamCheck( char * line ) case PD_TEXT: case PD_MENU: case PD_MENUITEM: + case PD_BITMAP: break; } if ( hasError ) { @@ -1965,7 +2037,6 @@ static void ParamCreateControl( paramTextData_t * textDataP; paramListData_t * listDataP; wIcon_p iconP; - wDrawColor color = wDrawColorBlack; wWin_p win; wPos_t w; @@ -2049,8 +2120,8 @@ static void ParamCreateControl( listDataP->height = wControlGetHeight( pd->control ); break; case PD_COLORLIST: - pd->control = (wControl_p)wColorSelectButtonCreate( win, xx, yy, helpStr, _(pd->winLabel), pd->winOption, 0, &color, ParamColorSelectPush, pd ); - break; + pd->control = (wControl_p)wColorSelectButtonCreate( win, xx, yy, helpStr, _(pd->winLabel), pd->winOption, 0, NULL, ParamColorSelectPush, pd ); + break; case PD_MESSAGE: if ( pd->winData != 0 ) w = (wPos_t)(long)pd->winData; @@ -2312,10 +2383,6 @@ static void LayoutControls( char * cp; strcpy( message, pd->nameStr ); for ( cp=message; *cp; cp++ ) if ( *cp == '-' ) *cp = '_'; - LOG( log_hotspot, 1, ( "popup %d %d %d %d _%s_%s\n", - controlK.orig.x+hotspotOffsetX, controlK.orig.y+hotspotOffsetY, - controlSize_x, controlSize_y, - group->nameStr, message ) ) } /* * Set column term @@ -2437,9 +2504,21 @@ static void ParamDlgProc( } } +/** + * Create a dialog box from data definition. + * + * \param IN group data definition for the dialog + * \param IN title title of the new dialog + * \param IN okLabel text for the affirmative button + * \param IN okProc subroutine to call when ok is pressed + * \param IN cancelProc if not NULL a subroutine for Cancel event. If NULL no cancel button is created + * \param IN needHelpButton if TRUE a help button is created + * \param IN layoutProc ??? + * \param IN winOption ??? + * \param IN changeProc ??? + */ - -EXPORT wWin_p ParamCreateDialog( +wWin_p ParamCreateDialog( paramGroup_p group, char * title, char * okLabel, @@ -2452,7 +2531,6 @@ EXPORT wWin_p ParamCreateDialog( { char helpStr[STR_SHORT_SIZE]; wPos_t w0, h0; - wButton_p lastB = NULL; char * cancelLabel = (winOption&PD_F_ALT_CANCELLABEL?_("Close"):_("Cancel")); winOption &= ~PD_F_ALT_CANCELLABEL; @@ -2465,34 +2543,22 @@ EXPORT wWin_p ParamCreateDialog( if ( (winOption&F_RESIZE) != 0 ) winOption |= F_RECALLSIZE; - sprintf( helpStr, "cmd%s", group->nameStr ); - helpStr[3] = toupper((unsigned char)helpStr[3]); - group->win = wWinPopupCreate( mainW, DlgSepRight, DlgSepFrmBottom, helpStr, title, group->nameStr, F_AUTOSIZE|winOption, ParamDlgProc, group ); if ( okLabel && okProc ) { sprintf( helpStr, "%s-ok", group->nameStr ); - lastB = group->okB = wButtonCreate( group->win, 0, 0, helpStr, okLabel, BB_DEFAULT, 0, (wButtonCallBack_p)ParamButtonOk, group ); + group->okB = wButtonCreate( group->win, 0, 0, helpStr, okLabel, BB_DEFAULT, 0, (wButtonCallBack_p)ParamButtonOk, group ); } if ( group->cancelProc ) { - lastB = group->cancelB = wButtonCreate( group->win, 0, 0, NULL, cancelLabel, BB_CANCEL, 0, (wButtonCallBack_p)ParamButtonCancel, group ); + group->cancelB = wButtonCreate( group->win, 0, 0, NULL, cancelLabel, BB_CANCEL, 0, (wButtonCallBack_p)ParamButtonCancel, group ); } if ( needHelpButton ) { sprintf( helpStr, "cmd%s", group->nameStr ); helpStr[3] = toupper((unsigned char)helpStr[3]); - lastB = group->helpB = wButtonCreate( group->win, 0, 0, NULL, _("Help"), BB_HELP, 0, (wButtonCallBack_p)wHelp, MyStrdup(helpStr) ); + group->helpB = wButtonCreate( group->win, 0, 0, NULL, _("Help"), BB_HELP, 0, (wButtonCallBack_p)wHelp, MyStrdup(helpStr) ); } - LOG( log_hotspot, 1, ( "mkshg ${PNG2DIR}/%s.png ${SHGDIR}/%s.shg << EOF\n", group->nameStr, group->nameStr ) ) LayoutControls( group, ParamCreateControl, &group->origW, &group->origH ); - if ( group->okB ) - LOG( log_hotspot, 1, ( "popup %d %d %d %d _%s_%s\n", - wControlGetPosX((wControl_p)(group->okB))+hotspotOffsetX, - wControlGetPosY((wControl_p)(group->okB))+hotspotOffsetY, - wControlGetWidth((wControl_p)(group->okB)), - wControlGetHeight((wControl_p)(group->okB)), - group->nameStr, "ok" ) ) - LOG( log_hotspot, 1, ( "EOF\n" ) ) group->origW += DlgSepRight; group->origH += DlgSepBottom; @@ -2502,11 +2568,9 @@ EXPORT wWin_p ParamCreateDialog( group->origH != h0 ) { LayoutControls( group, ParamPositionControl, NULL, NULL ); } - } else if ( group->origW > w0 || group->origH > h0 ) { - if ( group->origW > w0 ) - w0 = group->origW; - if ( group->origH > h0 ) - h0 = group->origH; + } else { + w0 = max(group->origW, w0); + h0 = max(group->origH, h0); wWinSetSize( group->win, w0, h0 ); } @@ -2566,6 +2630,5 @@ EXPORT void ParamInit( void ) { AddPlaybackProc( "PARAMETER", ParamPlayback, NULL ); AddPlaybackProc( "PARAMCHECK", ParamCheck, NULL ); - log_hotspot = LogFindIndex( "hotspot" ); log_paramLayout = LogFindIndex( "paramlayout" ); } diff --git a/app/bin/param.h b/app/bin/param.h index 02d259c..355f3e7 100644 --- a/app/bin/param.h +++ b/app/bin/param.h @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/param.h,v 1.6 2009-09-21 18:24:33 m_fischer Exp $ +/** \file param.h + * Definitions for parameter dialog handling */ /* XTrkCad - Model Railroad CAD @@ -23,6 +23,10 @@ #ifndef PARAM_H #define PARAM_H +#include "common.h" +#include "wlib.h" +#include "draw.h" + typedef struct turnoutInfo_t * turnoutInfo_p; typedef enum { @@ -214,12 +218,15 @@ extern int paramLen; extern unsigned long paramKey; extern BOOL_T paramTogglePlaybackHilite; +long GetChanges(paramGroup_p pg); + + #define ParamMenuPushCreate( PD, M, HS, NS, AK, FUNC ) \ wMenuPushCreate( M, HS, NS, AK, paramMenuPush, &PD ); \ (PD).valueP = FUNC; \ if ( HS ) GetBalloonHelpStr(HS); -#define PD_F_ALT_CANCELLABEL (1L<<30) +#define PD_F_ALT_CANCELLABEL (1L<<30) /** +#include +#include +#include + +#ifdef WINDOWS +#include +#endif + +#include +#include +#include "track.h" +#include "common.h" +#include "utility.h" +#include "misc.h" +#include "i18n.h" +#include "uthash.h" +#include "paths.h" + +struct pathTable { + char type[ PATH_TYPE_SIZE]; /**< type of path */ + DynString path; /**< path */ + UT_hash_handle hh; /**< makes this structure hashable */ +}; + +static struct pathTable *paths; + +static void AddPath(const char *type, char*path); +static struct pathTable *FindPath(const char *type); + +#define PATHS_SECTION "paths" + +/** +* Find the path for a given type in the hash table +* +* \param type IN the searched type +* \param entry OUT the table entry +* \return +*/ + +static struct pathTable * +FindPath(const char *type) +{ + struct pathTable *entry; + HASH_FIND_STR(paths, type, entry); + return (entry); +} + +/** + * Add a path to the table. If it already exists, the value ist updated. + * + * \param type IN type of path + * \param path IN path + */ +static void +AddPath(const char *type, char*path) +{ + struct pathTable *tableEntry; + tableEntry = FindPath(type); + + if (tableEntry) { + DynStringClear(&(tableEntry->path)); + } else { + tableEntry = malloc(sizeof(struct pathTable)); + DynStringMalloc(&tableEntry->path, 16); + strcpy(tableEntry->type, type); + HASH_ADD_STR(paths, type, tableEntry); + } + + DynStringCatCStr(&(tableEntry->path), path); +} + +/** + * Update the current directory for a specific filetype. Get the directory part from the current file. + * XTrackCAD keeps seprate directories for different filetypes.(for trackplans, bitmaps and DXF files). + * The paths are stored in a hash table using the file type as the hash. + * + * \param pathType IN file type + * \param fileName IN fully qualified filename + * \return + * + */ + +void SetCurrentPath( + const char * pathType, + const char * fileName) +{ + char *path; + char *copy; + assert(fileName != NULL); + assert(pathType != NULL); + copy = strdup(fileName); + path = strrchr(copy, FILE_SEP_CHAR[0]); + + if (path) { + *path = '\0'; + AddPath(pathType, copy); + wPrefSetString(PATHS_SECTION, pathType, copy); + } + + free(copy); +} + +/** + * Get the current path for a given file type. Following options are searched: + * 1. the hash array + * 2. the preferences file for this type + * 3. the older general setting (for backwards compatibility) + * 4. the user's home directory as default + * Search is finished when one of the options returns a valid path + * + * \param IN pathType the type + * \return pointer to path of NULL if not existing + */ + +char *GetCurrentPath( + const char *pathType) +{ + struct pathTable *currentPath; + const char *path; + assert(pathType != NULL); + currentPath = FindPath(pathType); + + if (currentPath) { + return (DynStringToCStr(&(currentPath->path))); + } + + path = wPrefGetString(PATHS_SECTION, pathType); + + if (!path) { + path = wPrefGetString("file", "directory"); + } + + if (!path) { + path = wGetUserHomeDir(); + } + + AddPath(pathType, (char *)path); + return ((char *)path); +} + +/** +* Find the filename/extension piece in a fully qualified path +* +* \param path IN the full path +* \return pointer to the filename part +*/ + +char *FindFilename(char *path) +{ + char *name; + name = strrchr(path, FILE_SEP_CHAR[0]); + + if (name) { + name++; + } else { + name = path; + } + + return (name); +} + +/** +* Make a full path definition from directorys and filenames. The individual pieces are +* concatinated. Where necessary a path delimiter is added. A pointer to the resulting +* string is returned. This memory should be free'd when no longer needed. +* Windows: to construct an absolute path, a leading backslash has to be included after +* the drive delimiter ':' or at the beginning of the first directory name. +* +* \param str OUT pointer to the complete path +* \param ... IN one or more parts of the path, terminate with NULL +*/ + +void +MakeFullpath(char **str, ...) +{ + va_list valist; + const char *part; + char *separator = FILE_SEP_CHAR; + char lastchar = '\0'; + DynString path; + DynStringMalloc(&path, 0); + va_start(valist, str); + + while ((part = va_arg(valist, const char *))) { + if (part[0] !=separator[0] && lastchar && lastchar != separator[0] && + lastchar != ':') { + DynStringNCatCStr(&path, 1, separator); + } + + DynStringCatCStr(&path, part); + lastchar = part[strlen(part) - 1]; + } + + *str = strdup(DynStringToCStr(&path)); + DynStringFree(&path); + va_end(valist); +} diff --git a/app/bin/paths.h b/app/bin/paths.h new file mode 100644 index 0000000..1e3c98a --- /dev/null +++ b/app/bin/paths.h @@ -0,0 +1,32 @@ +/** \file paths.h +* Path and file name handling functions. +*/ + +/* XTrkCad - Model Railroad CAD + * Copyright (C) 2017 Martin Fischer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef HAVE_PATHS_H +#define HAVE_PATHS_H + +#define PATH_TYPE_SIZE 10 + +void SetCurrentPath( const char * pathType, const char * fileName ); +char *GetCurrentPath(const char *pathType); +char *FindFilename(char *path); +void MakeFullpath(char **str, ...); +#endif diff --git a/app/bin/shrtpath.c b/app/bin/shrtpath.c index fa48408..b8fbe1e 100644 --- a/app/bin/shrtpath.c +++ b/app/bin/shrtpath.c @@ -20,8 +20,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include + #include "shrtpath.h" +#include "track.h" EXPORT int log_shortPath; static int log_shortPathInitted; diff --git a/app/bin/shrtpath.h b/app/bin/shrtpath.h index a8236e6..165717f 100644 --- a/app/bin/shrtpath.h +++ b/app/bin/shrtpath.h @@ -1,4 +1,6 @@ -/* $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/shrtpath.h,v 1.1 2005-12-07 15:46:54 rc-flyer Exp $ */ +/** \file shrtpath.h + * + */ /* XTrkCad - Model Railroad CAD * Copyright (C) 2005 Dave Bullis @@ -17,6 +19,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef HAVE_SHRTPATH_H +#define HAVE_SHRTPATH_H + +#include "common.h" +#include "track.h" typedef enum { SPTC_MATCH, /* trk:ep is end of path? */ @@ -31,3 +38,4 @@ typedef int (*shortestPathFunc_p)( SPTF_CMD cmd, track_p, EPINX_T, EPINX_T, DIST int FindShortestPath( track_p, EPINX_T, BOOL_T, shortestPathFunc_p, void * ); extern int log_shortPath; +#endif //HAVE_SHRTPATH_H \ No newline at end of file diff --git a/app/bin/smalldlg.c b/app/bin/smalldlg.c index e4213a5..7828912 100644 --- a/app/bin/smalldlg.c +++ b/app/bin/smalldlg.c @@ -1,7 +1,5 @@ /** \file smalldlg.c * Several simple and smaller dialogs. - * - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/smalldlg.c,v 1.6 2009-09-21 18:24:33 m_fischer Exp $ */ /* XTrkCad - Model Railroad CAD @@ -38,23 +36,22 @@ #ifdef WINDOWS #include #include -#if _MSC_VER >1300 - #define strdup _strdup -#endif #else #include #endif -#include "wlib.h" #include "common.h" +#include "custom.h" #include "draw.h" +#include "fileio.h" +#include "i18n.h" #include "misc.h" -#include "custom.h" +#include "paths.h" #include "param.h" - #include "smalldlg.h" -#include "i18n.h" +#include "wlib.h" +extern char *sTipF; wWin_p aboutW; static wWin_p tipW; /**< window handle for tip dialog */ @@ -86,13 +83,14 @@ static void CreateTipW( void ) { FILE * tipF; char buff[4096]; + char *filename; char * cp; tipW = ParamCreateDialog( &tipPG, MakeWindowTitle(_("Tip of the Day")), _("Ok"), (paramActionOkProc)wHide, NULL, FALSE, NULL, F_CENTER, NULL ); /* open the tip file */ - sprintf( buff, "%s%s%s.tip", libDir, FILE_SEP_CHAR, sProdNameLower ); - tipF = fopen( buff, "r" ); + MakeFullpath(&filename, libDir, sTipF, NULL); + tipF = fopen( filename, "r" ); /* if tip file could not be opened, the only tip is an error message for the situation */ if (tipF == NULL) { @@ -146,6 +144,7 @@ static void CreateTipW( void ) tips(tips_da.cnt-1) = strdup( buff ); } } + free(filename); } /** @@ -221,11 +220,12 @@ void CreateAboutW( void *ptr ) aboutW = ParamCreateDialog( &aboutPG, MakeWindowTitle(_("About")), _("Ok"), (paramActionOkProc)wHide, NULL, FALSE, NULL, F_TOP|F_CENTER, NULL ); ParamLoadMessage( &aboutPG, I_ABOUTVERSION, sAboutProd ); wTextAppend( COPYRIGHT_T, DESCRIPTION ); - wTextAppend( COPYRIGHT_T, "\n\nXTrackCAD is Copyright 2003 by Sillub Technology and 2007 by Martin Fischer and Bob Blackwell." ); - wTextAppend( COPYRIGHT_T, "\n\nIcons by: Tango Desktop Project (http://tango.freedesktop.org)"); - wTextAppend( COPYRIGHT_T, "\n\nContributions by: Robert Heller, Mikko Nissinen, Timothy M. Shead, Daniel Luis Spagnol" ); - wTextAppend( COPYRIGHT_T, "\n\nParameter Files by: Ralph Boyd, Dwayne Ward" ); - wTextAppend( COPYRIGHT_T, "\n\nuthash Copyright notice:" ); + wTextAppend( COPYRIGHT_T, "\n\nXTrackCAD is Copyright 2003 by Sillub Technology and 2017 by Bob Blackwell, Martin Fischer and Adam Richards." ); + wTextAppend( COPYRIGHT_T, "\nIcons by: Tango Desktop Project (http://tango.freedesktop.org)"); + wTextAppend( COPYRIGHT_T, "\nContributions by: Robert Heller, Mikko Nissinen, Timothy M. Shead, Daniel Luis Spagnol" ); + wTextAppend( COPYRIGHT_T, "\nParameter Files by: Ralph Boyd, Dwayne Ward" ); + wTextAppend( COPYRIGHT_T, "\nCornu Algorithm and Implementation by: Raph Levien"); + wTextAppend( COPYRIGHT_T, "\nuthash Copyright notice:" ); wTextAppend( COPYRIGHT_T, "\nCopyright (c) 2005-2015, Troy D. Hanson http://troydhanson.github.com/uthash/"); wTextAppend( COPYRIGHT_T, "\nAll rights reserved."); } diff --git a/app/bin/smalldlg.h b/app/bin/smalldlg.h index 2bcb3bc..df54063 100644 --- a/app/bin/smalldlg.h +++ b/app/bin/smalldlg.h @@ -1,7 +1,5 @@ /** \file smalldlg.h * Definitions and declarations for the small dialog box functions. - * - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/smalldlg.h,v 1.2 2009-09-21 18:24:33 m_fischer Exp $ */ /* XTrkCad - Model Railroad CAD @@ -25,6 +23,8 @@ #ifndef SMALLDLG_H #define SMALLDLG_H +#include "wlib.h" + #define SHOWTIP_NEXTTIP (0L) #define SHOWTIP_PREVTIP (1L) #define SHOWTIP_FORCESHOW (2L) diff --git a/app/bin/tbezier.c b/app/bin/tbezier.c new file mode 100644 index 0000000..8d7ca6c --- /dev/null +++ b/app/bin/tbezier.c @@ -0,0 +1,1629 @@ +/** \file tbezier.c + * XTrkCad - Model Railroad CAD + * Copyright (C) 2005 Dave Bullis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + ***************************************************************************** + * BEZIER TRACK (and LINE) + * + * tbezier.c has all the Track functions (for both T_BEZIER and T_BEZLIN) but all the heavy-math-lifting is delegated to cbezier.c + * + * Both Bezier Tracks and Lines are defined with two end points and two control points. Each end and control point pair is joined by a control arm. + * The angle between the control and end point (arm angle) determines the angle at the end point. + * The way the curve moves in between the ends is driven by the relative lengths of the two control arms. + * In general, lengthening one arm while keeping the other arm length fixed results in a curve that changes more slowly from the lengthened end and more swiftly from the other. + * Very un-prototypical track curves are easy to draw with Bezier, so beware! + * + * Another large user of tbezier.c is the Cornu function by way of its support for Bezier segments, which are used to approximate Cornu curves. + * + * In XTrkcad, Bezier curves are rendered into a set of Curved and Straight segments for display. This set is also saved, although the code recalculates a fresh set upon reload. + * + */ + + +#include "track.h" +#include "draw.h" +#include "tbezier.h" +#include "cbezier.h" +#include "ccurve.h" +#include "cstraigh.h" +#include "cjoin.h" +#include "utility.h" +#include "i18n.h" +#include "param.h" +#include "math.h" +#include "string.h" +#include "cundo.h" +#include "layout.h" +#include "fileio.h" +#include "assert.h" + +EXPORT TRKTYP_T T_BEZIER = -1; +EXPORT TRKTYP_T T_BZRLIN = -1; + + +struct extraData { + BezierData_t bezierData; + }; + +static int log_bezier = 0; + +static DIST_T GetLengthBezier( track_p ); + +/**************************************** + * + * UTILITIES + * + */ + +/* + * Run after any changes to the Bezier points + */ +EXPORT void FixUpBezier(coOrd pos[4], struct extraData* xx, BOOL_T track) { + xx->bezierData.a0 = NormalizeAngle(FindAngle(pos[1], pos[0])); + xx->bezierData.a1 = NormalizeAngle(FindAngle(pos[2], pos[3])); + + ConvertToArcs(pos, &xx->bezierData.arcSegs, track, xx->bezierData.segsColor, + xx->bezierData.segsWidth); + xx->bezierData.minCurveRadius = BezierMinRadius(pos, + xx->bezierData.arcSegs); + xx->bezierData.length = BezierLength(pos, xx->bezierData.arcSegs); +} + +/* + * Run after any changes to the Bezier points for a Segment + */ +EXPORT void FixUpBezierSeg(coOrd pos[4], trkSeg_p p, BOOL_T track) { + p->u.b.angle0 = NormalizeAngle(FindAngle(pos[1], pos[0])); + p->u.b.angle3 = NormalizeAngle(FindAngle(pos[2], pos[3])); + ConvertToArcs(pos, &p->bezSegs, track, p->color, + p->width); + p->u.b.minRadius = BezierMinRadius(pos, + p->bezSegs); + p->u.b.length = BezierLength(pos, p->bezSegs); +} + +EXPORT void FixUpBezierSegs(trkSeg_p p,int segCnt) { + for (int i=0;itype == SEG_BEZTRK || p->type == SEG_BEZLIN) { + FixUpBezierSeg(p->u.b.pos,p,p->type == SEG_BEZTRK); + } + } +} + + +static void GetBezierAngles( ANGLE_T *a0, ANGLE_T *a1, track_p trk ) +{ + assert( trk != NULL ); + + *a0 = NormalizeAngle( GetTrkEndAngle(trk,0) ); + *a1 = NormalizeAngle( GetTrkEndAngle(trk,1) ); + + LOG( log_bezier, 4, ( "getBezierAngles: = %0.3f %0.3f\n", *a0, *a1 ) ) +} + + +static void ComputeBezierBoundingBox( track_p trk, struct extraData * xx ) +{ + coOrd hi, lo; + hi.x = lo.x = xx->bezierData.pos[0].x; + hi.y = lo.y = xx->bezierData.pos[0].y; + + for (int i=1; i<=3;i++) { + hi.x = hi.x < xx->bezierData.pos[i].x ? xx->bezierData.pos[i].x : hi.x; + hi.y = hi.y < xx->bezierData.pos[i].y ? xx->bezierData.pos[i].y : hi.y; + lo.x = lo.x > xx->bezierData.pos[i].x ? xx->bezierData.pos[i].x : lo.x; + lo.y = lo.y > xx->bezierData.pos[i].y ? xx->bezierData.pos[i].y : lo.y; + } + SetBoundingBox( trk, hi, lo ); +} + + +DIST_T BezierDescriptionDistance( + coOrd pos, + track_p trk ) +{ + struct extraData *xx = GetTrkExtraData(trk); + coOrd p1; + + if ( GetTrkType( trk ) != T_BEZIER || ( GetTrkBits( trk ) & TB_HIDEDESC ) != 0 ) + return 100000; + + p1.x = xx->bezierData.pos[0].x + ((xx->bezierData.pos[3].x-xx->bezierData.pos[0].x)/2) + xx->bezierData.descriptionOff.x; + p1.y = xx->bezierData.pos[0].y + ((xx->bezierData.pos[3].y-xx->bezierData.pos[0].y)/2) + xx->bezierData.descriptionOff.y; + + return FindDistance( p1, pos ); +} + + +static void DrawBezierDescription( + track_p trk, + drawCmd_p d, + wDrawColor color ) +{ + struct extraData *xx = GetTrkExtraData(trk); + wFont_p fp; + coOrd pos; + + if (layoutLabels == 0) + return; + if ((labelEnable&LABELENABLE_TRKDESC)==0) + return; + pos.x = xx->bezierData.pos[0].x + ((xx->bezierData.pos[3].x - xx->bezierData.pos[0].x)/2); + pos.y = xx->bezierData.pos[0].y + ((xx->bezierData.pos[3].y - xx->bezierData.pos[0].y)/2); + pos.x += xx->bezierData.descriptionOff.x; + pos.y += xx->bezierData.descriptionOff.y; + fp = wStandardFont( F_TIMES, FALSE, FALSE ); + sprintf( message, _("Bezier Curve: length=%s min radius=%s"), + FormatDistance(xx->bezierData.length), FormatDistance(xx->bezierData.minCurveRadius)); + DrawBoxedString( BOX_BOX, d, pos, message, fp, (wFontSize_t)descriptionFontSize, color, 0.0 ); +} + + +STATUS_T BezierDescriptionMove( + track_p trk, + wAction_t action, + coOrd pos ) +{ + struct extraData *xx = GetTrkExtraData(trk); + static coOrd p0,p1; + static BOOL_T editState; + wDrawColor color; + if (GetTrkType(trk) != T_BEZIER) return C_TERMINATE; + p0.x = xx->bezierData.pos[0].x + ((xx->bezierData.pos[3].x - xx->bezierData.pos[0].x)/2); + p0.y = xx->bezierData.pos[0].y + ((xx->bezierData.pos[3].y - xx->bezierData.pos[0].y)/2); + switch (action) { + case C_DOWN: + case C_MOVE: + case C_UP: + editState = TRUE; + p1 = pos; + color = GetTrkColor( trk, &mainD ); + DrawLine( &mainD, p0, pos, 0, wDrawColorBlack ); + xx->bezierData.descriptionOff.x = pos.x - p0.x; + xx->bezierData.descriptionOff.y = pos.y - p0.y; + if (action == C_UP) { + editState = FALSE; + } + MainRedraw(); + MapRedraw(); + return action==C_UP?C_TERMINATE:C_CONTINUE; + case C_REDRAW: + if (editState) + DrawLine( &mainD, p1, p0, 0, wDrawColorBlack ); + break; + + + } + return C_CONTINUE; +} + +/**************************************** + * + * GENERIC FUNCTIONS + * + */ + +static struct { + coOrd pos[4]; + FLOAT_T elev[2]; + FLOAT_T length; + DIST_T minRadius; + FLOAT_T grade; + unsigned int layerNumber; + ANGLE_T angle[2]; + DIST_T radius[2]; + coOrd center[2]; + dynArr_t segs; + long width; + wDrawColor color; + } bezData; +typedef enum { P0, A0, R0, C0, Z0, CP1, CP2, P1, A1, R1, C1, Z1, RA, LN, GR, LY, WI, CO } crvDesc_e; +static descData_t bezDesc[] = { +/*P0*/ { DESC_POS, N_("End Pt 1: X,Y"), &bezData.pos[0] }, +/*A0*/ { DESC_ANGLE, N_("End Angle"), &bezData.angle[0] }, +/*R0*/ { DESC_DIM, N_("Radius"), &bezData.radius[0] }, +/*C0*/ { DESC_POS, N_("Center X,Y"), &bezData.center[0]}, +/*Z0*/ { DESC_DIM, N_("Z1"), &bezData.elev[0] }, +/*CP1*/ { DESC_POS, N_("Ctl Pt 1: X,Y"), &bezData.pos[1] }, +/*CP2*/ { DESC_POS, N_("Ctl Pt 2: X,Y"), &bezData.pos[2] }, +/*P1*/ { DESC_POS, N_("End Pt 2: X,Y"), &bezData.pos[3] }, +/*A1*/ { DESC_ANGLE, N_("End Angle"), &bezData.angle[1] }, +/*R1*/ { DESC_DIM, N_("Radius"), &bezData.radius[1] }, +/*C1*/ { DESC_POS, N_("Center X,Y"), &bezData.center[1]}, +/*Z1*/ { DESC_DIM, N_("Z2"), &bezData.elev[1] }, +/*RA*/ { DESC_DIM, N_("MinRadius"), &bezData.radius }, +/*LN*/ { DESC_DIM, N_("Length"), &bezData.length }, +/*GR*/ { DESC_FLOAT, N_("Grade"), &bezData.grade }, +/*LY*/ { DESC_LAYER, N_("Layer"), &bezData.layerNumber }, +/*WI*/ { DESC_LONG, N_("Line Width"), &bezData.width}, +/*CO*/ { DESC_COLOR, N_("Line Color"), &bezData.color}, + { DESC_NULL } }; + +static void UpdateBezier( track_p trk, int inx, descData_p descUpd, BOOL_T final ) +{ + struct extraData *xx = GetTrkExtraData(trk); + BOOL_T updateEndPts; + EPINX_T ep; + ANGLE_T angle1, angle2; + + if ( inx == -1 ) + return; + updateEndPts = FALSE; + switch ( inx ) { + case P0: + if (GetTrkEndTrk(trk,0)) break; + updateEndPts = TRUE; + xx->bezierData.pos[0] = bezData.pos[0]; + bezDesc[P0].mode |= DESC_CHANGE; + /* no break */ + case P1: + if (GetTrkEndTrk(trk,0) && GetTrkEndTrk(trk,1)) break; + updateEndPts = TRUE; + xx->bezierData.pos[3]= bezData.pos[3]; + bezDesc[P1].mode |= DESC_CHANGE; + break; + case A0: + case A1: + break; + case CP1: + if (GetTrkEndTrk(trk,0)) { + angle1 = NormalizeAngle(GetTrkEndAngle(trk,0)); + angle2 = NormalizeAngle(FindAngle(bezData.pos[1], xx->bezierData.pos[0])-angle1); + if (angle2 > 90.0 && angle2 < 270.0) + Translate( &bezData.pos[1], xx->bezierData.pos[0], angle1, -FindDistance( xx->bezierData.pos[0], bezData.pos[1] )*cos(D2R(angle2))); + } + xx->bezierData.pos[1] = bezData.pos[1]; + bezDesc[CP1].mode |= DESC_CHANGE; + updateEndPts = TRUE; + break; + case CP2: + if (GetTrkEndTrk(trk,1)) { + angle1 = NormalizeAngle(GetTrkEndAngle(trk,1)); + angle2 = NormalizeAngle(FindAngle(bezData.pos[2], xx->bezierData.pos[3])-angle1); + if (angle2 > 90.0 && angle2 < 270.0) + Translate( &bezData.pos[2], xx->bezierData.pos[3], angle1, -FindDistance( xx->bezierData.pos[3], bezData.pos[0] )*cos(D2R(angle2))); + } + xx->bezierData.pos[2] = bezData.pos[2]; + bezDesc[CP2].mode |= DESC_CHANGE; + updateEndPts = TRUE; + break; + case Z0: + case Z1: + ep = (inx==Z0?0:1); + UpdateTrkEndElev( trk, ep, GetTrkEndElevUnmaskedMode(trk,ep), bezData.elev[ep], NULL ); + ComputeElev( trk, 1-ep, FALSE, &bezData.elev[1-ep], NULL ); + if ( bezData.length > minLength ) + bezData.grade = fabs( (bezData.elev[0]-bezData.elev[1])/bezData.length )*100.0; + else + bezData.grade = 0.0; + bezDesc[GR].mode |= DESC_CHANGE; + bezDesc[inx==Z0?Z1:Z0].mode |= DESC_CHANGE; + return; + case LY: + SetTrkLayer( trk, bezData.layerNumber); + break; + case WI: + xx->bezierData.segsWidth = bezData.width/mainD.dpi; + break; + case CO: + xx->bezierData.segsColor = bezData.color; + break; + default: + AbortProg( "updateBezier: Bad inx %d", inx ); + } + ConvertToArcs(xx->bezierData.pos, &xx->bezierData.arcSegs, IsTrack(trk)?TRUE:FALSE, xx->bezierData.segsColor, xx->bezierData.segsWidth); + trackParams_t params; + for (int i=0;i<2;i++) { + GetTrackParams(0,trk,xx->bezierData.pos[i],¶ms); + bezData.radius[i] = params.arcR; + bezData.center[i] = params.arcP; + } + if (updateEndPts) { + if ( GetTrkEndTrk(trk,0) == NULL ) { + SetTrkEndPoint( trk, 0, bezData.pos[0], NormalizeAngle( FindAngle(bezData.pos[0], bezData.pos[1]) ) ); + bezData.angle[0] = GetTrkEndAngle(trk,0); + bezDesc[A0].mode |= DESC_CHANGE; + GetTrackParams(PARAMS_CORNU,trk,xx->bezierData.pos[0],¶ms); + bezData.radius[0] = params.arcR; + bezData.center[0] = params.arcP; + } + if ( GetTrkEndTrk(trk,1) == NULL ) { + SetTrkEndPoint( trk, 1, bezData.pos[3], NormalizeAngle( FindAngle(bezData.pos[2], bezData.pos[3]) ) ); + bezData.angle[1] = GetTrkEndAngle(trk,1); + bezDesc[A1].mode |= DESC_CHANGE; + GetTrackParams(PARAMS_CORNU,trk,xx->bezierData.pos[1],¶ms); + bezData.radius[1] = params.arcR; + bezData.center[1] = params.arcP; + } + } + + FixUpBezier(xx->bezierData.pos, xx, IsTrack(trk)); + ComputeBezierBoundingBox(trk, xx); + DrawNewTrack( trk ); +} + +static void DescribeBezier( track_p trk, char * str, CSIZE_T len ) +{ + struct extraData *xx = GetTrkExtraData(trk); + DIST_T d; + int fix0, fix1 = 0; + + d = xx->bezierData.length; + sprintf( str, _("Bezier %s(%d): Layer=%u MinRadius=%s Length=%s EP=[%0.3f,%0.3f] [%0.3f,%0.3f] CP1=[%0.3f,%0.3f] CP2=[%0.3f, %0.3f]"), + GetTrkType(trk)==T_BEZIER?"Track":"Line", + GetTrkIndex(trk), + GetTrkLayer(trk)+1, + FormatDistance(xx->bezierData.minCurveRadius), + FormatDistance(d), + PutDim(xx->bezierData.pos[0].x),PutDim(xx->bezierData.pos[0].y), + PutDim(xx->bezierData.pos[3].x),PutDim(xx->bezierData.pos[3].y), + PutDim(xx->bezierData.pos[1].x),PutDim(xx->bezierData.pos[1].y), + PutDim(xx->bezierData.pos[2].x),PutDim(xx->bezierData.pos[2].y)); + + if (GetTrkType(trk) == T_BEZIER) { + fix0 = GetTrkEndTrk(trk,0)!=NULL; + fix1 = GetTrkEndTrk(trk,1)!=NULL; + } + + bezData.length = GetLengthBezier(trk); + bezData.minRadius = xx->bezierData.minCurveRadius; + if (bezData.minRadius >= 100000.00) bezData.minRadius = 0; + bezData.layerNumber = GetTrkLayer(trk); + bezData.pos[0] = xx->bezierData.pos[0]; + bezData.pos[1] = xx->bezierData.pos[1]; + bezData.pos[2] = xx->bezierData.pos[2]; + bezData.pos[3] = xx->bezierData.pos[3]; + bezData.angle[0] = xx->bezierData.a0; + bezData.angle[1] = xx->bezierData.a1; + trackParams_t params; + GetTrackParams(PARAMS_CORNU,trk,xx->bezierData.pos[0],¶ms); + bezData.radius[0] = params.arcR; + bezData.center[0] = params.arcP; + GetTrackParams(PARAMS_CORNU,trk,xx->bezierData.pos[3],¶ms); + bezData.radius[1] = params.arcR; + bezData.center[1] = params.arcP; + + if (GetTrkType(trk) == T_BEZIER) { + ComputeElev( trk, 0, FALSE, &bezData.elev[0], NULL ); + ComputeElev( trk, 1, FALSE, &bezData.elev[1], NULL ); + + if ( bezData.length > minLength ) + bezData.grade = fabs( (bezData.elev[0]-bezData.elev[1])/bezData.length )*100.0; + else + bezData.grade = 0.0; + } + + bezDesc[P0].mode = fix0?DESC_RO:0; + bezDesc[P1].mode = fix1?DESC_RO:0; + bezDesc[LN].mode = DESC_RO; + bezDesc[CP1].mode = 0; + bezDesc[CP2].mode = 0; + if (GetTrkType(trk) == T_BEZIER) { + bezDesc[Z0].mode = EndPtIsDefinedElev(trk,0)?0:DESC_RO; + bezDesc[Z1].mode = EndPtIsDefinedElev(trk,1)?0:DESC_RO; + } + else + bezDesc[Z0].mode = bezDesc[Z1].mode = DESC_IGNORE; + bezDesc[A0].mode = DESC_RO; + bezDesc[A1].mode = DESC_RO; + bezDesc[C0].mode = DESC_RO; + bezDesc[C1].mode = DESC_RO; + bezDesc[R0].mode = DESC_RO; + bezDesc[R1].mode = DESC_RO; + bezDesc[GR].mode = DESC_RO; + bezDesc[RA].mode = DESC_RO; + bezDesc[LY].mode = DESC_NOREDRAW; + bezData.width = (long)floor(xx->bezierData.segsWidth*mainD.dpi+0.5); + bezDesc[WI].mode = GetTrkType(trk) == T_BEZIER?DESC_IGNORE:0; + bezData.color = xx->bezierData.segsColor; + bezDesc[CO].mode = GetTrkType(trk) == T_BEZIER?DESC_IGNORE:0; + + if (GetTrkType(trk) == T_BEZIER) + DoDescribe( _("Bezier Track"), trk, bezDesc, UpdateBezier ); + else + DoDescribe( _("Bezier Line"), trk, bezDesc, UpdateBezier ); + +} + +static DIST_T DistanceBezier( track_p t, coOrd * p ) +{ + struct extraData *xx = GetTrkExtraData(t); + + DIST_T d = 100000.0; + coOrd p2 = xx->bezierData.pos[0]; //Set initial point + segProcData_t segProcData; + for (int i = 0;ibezierData.arcSegs.cnt;i++) { + segProcData.distance.pos1 = * p; + SegProc(SEGPROC_DISTANCE,&DYNARR_N(trkSeg_t,xx->bezierData.arcSegs,i),&segProcData); + if (segProcData.distance.ddbezierData.arcSegs.ptr,xx->bezierData.arcSegs.cnt, 0.0, color, 0); + return; + } + + if (GetTrkWidth(t) == 2) + widthOptions |= DTS_THICK2; + if (GetTrkWidth(t) == 3) + widthOptions |= DTS_THICK3; + + + if ( ((d->funcs->options&wDrawOptTemp)==0) && + (labelWhen == 2 || (labelWhen == 1 && (d->options&DC_PRINT))) && + labelScale >= d->scale && + ( GetTrkBits( t ) & TB_HIDEDESC ) == 0 ) { + DrawBezierDescription( t, d, color ); + } + DIST_T scale2rail = (d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale; + if ( tieDrawMode!=TIEDRAWMODE_NONE && + d!=&mapD && + (d->options&DC_TIES)!=0 && + d->scalebezierData.arcSegs.ptr,xx->bezierData.arcSegs.cnt, GetTrkGauge(t), color, widthOptions|DTS_TIES); + DrawSegsO(d,t,zero,0.0,xx->bezierData.arcSegs.ptr,xx->bezierData.arcSegs.cnt, GetTrkGauge(t), color, widthOptions); + if ( (d->funcs->options & wDrawOptTemp) == 0 && + (d->options&DC_QUICK) == 0 ) { + DrawEndPt( d, t, 0, color ); + DrawEndPt( d, t, 1, color ); + } +} + +static void DeleteBezier( track_p t ) +{ + struct extraData *xx = GetTrkExtraData(t); + + for (int i=0;ibezierData.arcSegs.cnt;i++) { + trkSeg_t s = DYNARR_N(trkSeg_t,xx->bezierData.arcSegs,i); + if (s.type == SEG_BEZTRK || s.type == SEG_BEZLIN) { + if (s.bezSegs.ptr) MyFree(s.bezSegs.ptr); + s.bezSegs.max = 0; + s.bezSegs.cnt = 0; + } + } + if (xx->bezierData.arcSegs.ptr && !xx->bezierData.arcSegs.max) + MyFree(xx->bezierData.arcSegs.ptr); + xx->bezierData.arcSegs.max = 0; + xx->bezierData.arcSegs.cnt = 0; + xx->bezierData.arcSegs.ptr = NULL; +} + +static BOOL_T WriteBezier( track_p t, FILE * f ) +{ + struct extraData *xx = GetTrkExtraData(t); + long options; + BOOL_T rc = TRUE; + BOOL_T track =(GetTrkType(t)==T_BEZIER); + options = GetTrkWidth(t) & 0x0F; + if ( ( GetTrkBits(t) & TB_HIDEDESC ) == 0 ) options |= 0x80; + rc &= fprintf(f, "%s %d %u %ld %ld %0.6f %s %d %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f 0 %0.6f %0.6f \n", + track?"BEZIER":"BZRLIN",GetTrkIndex(t), GetTrkLayer(t), (long)options, wDrawGetRGB(xx->bezierData.segsColor), xx->bezierData.segsWidth, + GetTrkScaleName(t), GetTrkVisible(t), + xx->bezierData.pos[0].x, xx->bezierData.pos[0].y, + xx->bezierData.pos[1].x, xx->bezierData.pos[1].y, + xx->bezierData.pos[2].x, xx->bezierData.pos[2].y, + xx->bezierData.pos[3].x, xx->bezierData.pos[3].y, + xx->bezierData.descriptionOff.x, xx->bezierData.descriptionOff.y )>0; + if (track) { + rc &= WriteEndPt( f, t, 0 ); + rc &= WriteEndPt( f, t, 1 ); + } + rc &= WriteSegs( f, xx->bezierData.arcSegs.cnt, xx->bezierData.arcSegs.ptr ); + return rc; +} + +static void ReadBezier( char * line ) +{ + struct extraData *xx; + track_p t; + wIndex_t index; + BOOL_T visible; + coOrd p0, c1, c2, p1, dp; + char scale[10]; + wIndex_t layer; + long options; + char * cp = NULL; + unsigned long rgb; + DIST_T width; + + if (!GetArgs( line+6, "dLluwsdpppp0p", + &index, &layer, &options, &rgb, &width, scale, &visible, &p0, &c1, &c2, &p1, &dp ) ) { + return; + } + if (strncmp(line,"BEZIER",6)==0) + t = NewTrack( index, T_BEZIER, 0, sizeof *xx ); + else + t = NewTrack( index, T_BZRLIN, 0, sizeof *xx ); + xx = GetTrkExtraData(t); + SetTrkVisible(t, visible); + SetTrkScale(t, LookupScale(scale)); + SetTrkLayer(t, layer ); + SetTrkWidth(t, (int)(options&0x0F)); + if ( ( options & 0x80 ) == 0 ) SetTrkBits(t,TB_HIDEDESC); + xx->bezierData.pos[0] = p0; + xx->bezierData.pos[1] = c1; + xx->bezierData.pos[2] = c2; + xx->bezierData.pos[3] = p1; + xx->bezierData.descriptionOff = dp; + xx->bezierData.segsWidth = width; + xx->bezierData.segsColor = wDrawFindColor( rgb ); + ReadSegs(); + FixUpBezier(xx->bezierData.pos,xx,GetTrkType(t) == T_BEZIER); + ComputeBezierBoundingBox(t,xx); + if (GetTrkType(t) == T_BEZIER) { + SetEndPts(t,2); + } +} + +static void MoveBezier( track_p trk, coOrd orig ) +{ + struct extraData *xx = GetTrkExtraData(trk); + UndoModify(trk); + for (int i=0;i<4;i++) { + xx->bezierData.pos[i].x += orig.x; + xx->bezierData.pos[i].y += orig.y; + } + FixUpBezier(xx->bezierData.pos,xx,IsTrack(trk)); + ComputeBezierBoundingBox(trk,xx); + +} + +static void RotateBezier( track_p trk, coOrd orig, ANGLE_T angle ) +{ + struct extraData *xx = GetTrkExtraData(trk); + UndoModify(trk); + for (int i=0;i<5;i++) { + Rotate( &xx->bezierData.pos[i], orig, angle ); + } + FixUpBezier(xx->bezierData.pos,xx,IsTrack(trk)); + ComputeBezierBoundingBox(trk,xx); + +} + +static void RescaleBezier( track_p trk, FLOAT_T ratio ) +{ + struct extraData *xx = GetTrkExtraData(trk); + UndoModify(trk); + xx->bezierData.pos[0].x *= ratio; + xx->bezierData.pos[0].y *= ratio; + xx->bezierData.pos[1].x *= ratio; + xx->bezierData.pos[1].y *= ratio; + xx->bezierData.pos[2].x *= ratio; + xx->bezierData.pos[2].y *= ratio; + xx->bezierData.pos[3].x *= ratio; + xx->bezierData.pos[3].y *= ratio; + FixUpBezier(xx->bezierData.pos,xx,IsTrack(trk)); + ComputeBezierBoundingBox(trk,xx); + +} + +EXPORT void AdjustBezierEndPt( track_p trk, EPINX_T inx, coOrd pos ) { + struct extraData *xx = GetTrkExtraData(trk); + UndoModify(trk); + if (inx ==0 ) { + xx->bezierData.pos[1].x += -xx->bezierData.pos[0].x+pos.x; + xx->bezierData.pos[1].y += -xx->bezierData.pos[0].y+pos.y; + xx->bezierData.pos[0] = pos; + } + else { + xx->bezierData.pos[2].x += -xx->bezierData.pos[3].x+pos.x; + xx->bezierData.pos[2].y += -xx->bezierData.pos[3].y+pos.y; + xx->bezierData.pos[3] = pos; + } + FixUpBezier(xx->bezierData.pos, xx, IsTrack(trk)); + ComputeBezierBoundingBox(trk,xx); + SetTrkEndPoint( trk, inx, pos, inx==0?xx->bezierData.a0:xx->bezierData.a1); +} + + +/** + * Split the Track at approximately the point pos. + */ +static BOOL_T SplitBezier( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, EPINX_T * ep0, EPINX_T * ep1 ) +{ + struct extraData *xx = GetTrkExtraData(trk); + track_p trk1; + double t; + BOOL_T track; + track = IsTrack(trk); + + coOrd current[4], newl[4], newr[4]; + + double dd = DistanceBezier(trk, &pos); + if (dd>minLength) return FALSE; + + BezierMathDistance(&pos, xx->bezierData.pos, 500, &t); //Find t value + + for (int i=0;i<4;i++) { + current[i] = xx->bezierData.pos[i]; + } + + BezierSplit(current, newl, newr, t); + + if (track) { + trk1 = NewBezierTrack(ep?newr:newl,NULL,0); + } else + trk1 = NewBezierLine(ep?newr:newl,NULL,0, xx->bezierData.segsColor,xx->bezierData.segsWidth); + UndoModify(trk); + for (int i=0;i<4;i++) { + xx->bezierData.pos[i] = ep?newl[i]:newr[i]; + } + FixUpBezier(xx->bezierData.pos,xx,track); + ComputeBezierBoundingBox(trk,xx); + SetTrkEndPoint( trk, ep, xx->bezierData.pos[ep?3:0], ep?xx->bezierData.a1:xx->bezierData.a0); + + *leftover = trk1; + *ep0 = 1-ep; + *ep1 = ep; + + return TRUE; +} + +static int log_traverseBezier = 0; +static int log_bezierSegments = 0; +/* + * TraverseBezier is used to position a train/car. + * We find a new position and angle given a current pos, angle and a distance to travel. + * + * The output can be TRUE -> we have moved the point to a new point or to the start/end of the next track + * FALSE -> we have not found that point because pos was not on/near the track + * + * If true we supply the remaining distance to go (always positive). + * We detect the movement direction by comparing the current angle to the angle of the track at the point. + * + * Each segment may be processed forwards or in reverse (this really only applies to curved segments). + * So for each segment we call traverse1 to get the direction and extra distance to go to get to the current point + * and then use that for traverse2 to actually move to the new point + * + * If we exceed the current point's segment we move on to the next until the end of this track or we have found the spot. + * + */ +static BOOL_T TraverseBezier( traverseTrack_p trvTrk, DIST_T * distR ) +{ + track_p trk = trvTrk->trk; + struct extraData *xx = GetTrkExtraData(trk); + DIST_T dist = *distR; + segProcData_t segProcData; + BOOL_T segs_backwards= FALSE; + DIST_T d = 10000; + coOrd pos2 = trvTrk->pos; + ANGLE_T a1,a2; + int inx,segInx = 0; + EPINX_T ep; + BOOL_T back,neg; + trkSeg_p segPtr = (trkSeg_p)xx->bezierData.arcSegs.ptr; + + a2 = GetAngleSegs( //Find correct Segment and nearest point in it + xx->bezierData.arcSegs.cnt,segPtr, + &pos2, &segInx, &d , &back, NULL, &neg ); //d = how far pos2 from old pos2 = trvTrk->pos + + if ( d > 10 ) { + ErrorMessage( "traverseBezier: Position is not near track: %0.3f", d ); + return FALSE; //This means the input pos is not on or close to the track. + } + if (back) a2 = NormalizeAngle(a2+180); //GetAngleSegs has reversed angle for backwards + a1 = NormalizeAngle(a2-trvTrk->angle); //Establish if we are going fwds or backwards globally + if (a1 <270 && a1>90) { //Must add 180 if the seg is reversed or inverted (but not both) + segs_backwards = TRUE; + ep = 0; + } else { + segs_backwards = FALSE; + ep = 1; + } + if ( neg ) { + segs_backwards = !segs_backwards; //neg implies all the segs are reversed + ep = 1-ep; //other end + } + + segProcData.traverse1.pos = pos2; //actual point on curve + segProcData.traverse1.angle = trvTrk->angle; //direction car is going for Traverse 1 has to be reversed... +LOG( log_traverseBezier, 1, ( " TraverseBezier [%0.3f %0.3f] D%0.3f A%0.3f SB%d \n", trvTrk->pos.x, trvTrk->pos.y, dist, trvTrk->angle, segs_backwards ) ) + inx = segInx; + while (inx >=0 && inxbezierData.arcSegs.cnt) { + segPtr = (trkSeg_p)xx->bezierData.arcSegs.ptr+inx; //move in to the identified segment + SegProc( SEGPROC_TRAVERSE1, segPtr, &segProcData ); //Backwards or forwards for THIS segment - note that this can differ from segs_backward!! + BOOL_T backwards = segProcData.traverse1.backwards; //Are we going to EP0? + BOOL_T reverse_seg = segProcData.traverse1.reverse_seg; //is it a backwards segment (we don't actually care as Traverse1 takes care of it) + + dist += segProcData.traverse1.dist; + segProcData.traverse2.dist = dist; + segProcData.traverse2.segDir = backwards; +LOG( log_traverseBezier, 2, ( " TraverseBezierT1 D%0.3f B%d RS%d \n", dist, backwards, reverse_seg ) ) + SegProc( SEGPROC_TRAVERSE2, segPtr, &segProcData ); //Angle at pos2 + if ( segProcData.traverse2.dist <= 0 ) { //-ve or zero distance left over so stop there + *distR = 0; + trvTrk->pos = segProcData.traverse2.pos; + trvTrk->angle = segProcData.traverse2.angle; +LOG( log_traverseBezier, 1, ( " -> [%0.3f %0.3f] A%0.3f D%0.3f\n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR ) ) + return TRUE; + } //NOTE Traverse1 and Traverse2 are overlays so get all out before storing + dist = segProcData.traverse2.dist; //How far left? + coOrd pos = segProcData.traverse2.pos; //Will be at seg end + ANGLE_T angle = segProcData.traverse2.angle; //Angle of end + segProcData.traverse1.angle = angle; //Reverse to suit Traverse1 + segProcData.traverse1.pos = pos; + inx = segs_backwards?inx-1:inx+1; //Here's where the global segment direction comes in +LOG( log_traverseBezier, 2, ( " TraverseBezierL D%0.3f A%0.3f\n", dist, angle ) ) + } + *distR = dist; //Tell caller what is left + //Must be at one end or another + trvTrk->pos = GetTrkEndPos(trk,ep); + trvTrk->angle = NormalizeAngle(GetTrkEndAngle(trk, ep)+(segs_backwards?180:0)); + trvTrk->trk = GetTrkEndTrk(trk,ep); //go to next track + if (trvTrk->trk==NULL) { + trvTrk->pos = pos2; + return TRUE; + } + +LOG( log_traverseBezier, 1, ( " -> [%0.3f %0.3f] A%0.3f D%0.3f\n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR ) ) + return TRUE; + +} + + +static BOOL_T MergeBezier( + track_p trk0, + EPINX_T ep0, + track_p trk1, + EPINX_T ep1 ) +{ + struct extraData *xx0 = GetTrkExtraData(trk0); + struct extraData *xx1 = GetTrkExtraData(trk1); + track_p trk2 = NULL; + EPINX_T ep2=-1; + BOOL_T tracks = FALSE; + + if (IsTrack(trk0) && IsTrack(trk1) ) tracks = TRUE; + if (GetTrkType(trk0) != GetTrkType(trk1)) return FALSE; + + if (ep0 == ep1) + return FALSE; + + UndoStart( _("Merge Bezier"), "MergeBezier( T%d[%d] T%d[%d] )", GetTrkIndex(trk0), ep0, GetTrkIndex(trk1), ep1 ); + UndoModify( trk0 ); + UndrawNewTrack( trk0 ); + if (tracks) { + trk2 = GetTrkEndTrk( trk1, 1-ep1 ); + if (trk2) { + ep2 = GetEndPtConnectedToMe( trk2, trk1 ); + DisconnectTracks( trk1, 1-ep1, trk2, ep2 ); + } + } + if (ep0 == 0) { + xx0->bezierData.pos[3] = xx1->bezierData.pos[3]; + xx0->bezierData.pos[2] = xx1->bezierData.pos[2]; + } else { + xx0->bezierData.pos[0] = xx1->bezierData.pos[0]; + xx0->bezierData.pos[1] = xx1->bezierData.pos[1]; + } + FixUpBezier(xx0->bezierData.pos,xx0,tracks); + ComputeBezierBoundingBox(trk0,xx0); + DeleteTrack( trk1, FALSE ); + if (tracks && trk2) { + if (ep0 == 1) + SetTrkEndPoint( trk2, 1, xx0->bezierData.pos[0], xx0->bezierData.a0); + else + SetTrkEndPoint( trk2, 2, xx0->bezierData.pos[3], xx0->bezierData.a1); + ConnectTracks( trk0, ep0, trk2, ep2 ); + } + DrawNewTrack( trk0 ); + + + return TRUE; +} + + +static BOOL_T EnumerateBezier( track_p trk ) +{ + + if (trk != NULL) { + DIST_T d; + struct extraData *xx = GetTrkExtraData(trk); + d = xx->bezierData.length; + ScaleLengthIncrement( GetTrkScale(trk), d ); + } + return TRUE; +} + +static DIST_T GetLengthBezier( track_p trk ) +{ + struct extraData *xx = GetTrkExtraData(trk); + DIST_T length = 0.0; + segProcData_t segProcData; + for(int i=0;ibezierData.arcSegs.cnt;i++) { + SegProc(SEGPROC_LENGTH,&(DYNARR_N(trkSeg_t,xx->bezierData.arcSegs,i)), &segProcData); + length += segProcData.length.length; + } + return length; +} + + +static BOOL_T GetParamsBezier( int inx, track_p trk, coOrd pos, trackParams_t * params ) +{ + int segInx; + BOOL_T back,negative; + DIST_T d; + + params->type = curveTypeBezier; + struct extraData *xx = GetTrkExtraData(trk); + for (int i=0;i<4;i++) params->bezierPoints[i] = xx->bezierData.pos[i]; + params->len = xx->bezierData.length; + params->track_angle = GetAngleSegs( //Find correct Segment and nearest point in it + xx->bezierData.arcSegs.cnt,xx->bezierData.arcSegs.ptr, + &pos, &segInx, &d , &back, NULL, &negative ); + if ( negative != back ) params->track_angle = NormalizeAngle(params->track_angle+180); //Bezier is in reverse + trkSeg_p segPtr = &DYNARR_N(trkSeg_t,xx->bezierData.arcSegs,segInx); + if (segPtr->type == SEG_STRLIN) { + params->arcR = 0.0; + } else { + params->arcR = fabs(segPtr->u.c.radius); + params->arcP = segPtr->u.c.center; + params->arcA0 = segPtr->u.c.a0; + params->arcA1 = segPtr->u.c.a1; + } + if ( inx == PARAMS_PARALLEL ) { + params->ep = 0; + } else if (inx == PARAMS_CORNU ){ + params->ep = PickEndPoint( pos, trk); + } else { + params->ep = PickUnconnectedEndPointSilent( pos, trk); + } + if (params->ep>=0) + params->angle = GetTrkEndAngle(trk, params->ep); + return TRUE; + +} + +static BOOL_T TrimBezier( track_p trk, EPINX_T ep, DIST_T dist ) { + DeleteTrack(trk, TRUE); + return TRUE; +} + + + +static BOOL_T QueryBezier( track_p trk, int query ) +{ + struct extraData * xx = GetTrkExtraData(trk); + switch ( query ) { + case Q_CAN_GROUP: + return FALSE; + break; + case Q_FLIP_ENDPTS: + case Q_HAS_DESC: + return TRUE; + break; + case Q_EXCEPTION: + return GetTrkType(trk) == T_BEZIER?xx->bezierData.minCurveRadius < (GetLayoutMinTrackRadius()-EPSILON):FALSE; + break; + case Q_CAN_MODIFY_CONTROL_POINTS: + return TRUE; + break; + case Q_CANNOT_PLACE_TURNOUT: + return FALSE; + break; + case Q_ISTRACK: + return GetTrkType(trk) == T_BEZIER?TRUE:FALSE; + break; + case Q_CAN_PARALLEL: + return (GetTrkType(trk) == T_BEZIER); + break; + case Q_MODIFY_CAN_SPLIT: + case Q_CORNU_CAN_MODIFY: + return (GetTrkType(trk) == T_BEZIER); + default: + return FALSE; + } +} + + +static void FlipBezier( + track_p trk, + coOrd orig, + ANGLE_T angle ) +{ + struct extraData * xx = GetTrkExtraData(trk); + FlipPoint( &xx->bezierData.pos[0], orig, angle ); + FlipPoint( &xx->bezierData.pos[1], orig, angle ); + FlipPoint( &xx->bezierData.pos[2], orig, angle ); + FlipPoint( &xx->bezierData.pos[3], orig, angle ); + FixUpBezier(xx->bezierData.pos,xx,IsTrack(trk)); + ComputeBezierBoundingBox(trk,xx); + +} + +static ANGLE_T GetAngleBezier( + track_p trk, + coOrd pos, + EPINX_T * ep0, + EPINX_T * ep1 ) +{ + struct extraData * xx = GetTrkExtraData(trk); + ANGLE_T angle; + BOOL_T back, neg; + int indx; + angle = GetAngleSegs( xx->bezierData.arcSegs.cnt, (trkSeg_p)xx->bezierData.arcSegs.ptr, &pos, &indx, NULL, &back, NULL, &neg ); + if (!back) angle = NormalizeAngle(angle+180); //Make CCW + if ( ep0 ) *ep0 = neg?1:0; + if ( ep1 ) *ep1 = neg?0:1; + return angle; +} + +BOOL_T GetBezierSegmentFromTrack(track_p trk, trkSeg_p seg_p) { + struct extraData * xx = GetTrkExtraData(trk); + + seg_p->type = IsTrack(trk)?SEG_BEZTRK:SEG_BEZLIN; + for (int i=0;i<4;i++) seg_p->u.b.pos[i] = xx->bezierData.pos[i]; + seg_p->color = xx->bezierData.segsColor; + seg_p->bezSegs.cnt = 0; + if (seg_p->bezSegs.ptr) MyFree(seg_p->bezSegs.ptr); + seg_p->bezSegs.max = 0; + FixUpBezierSeg(seg_p->u.b.pos,seg_p,seg_p->type == SEG_BEZTRK); + return TRUE; + +} + + +static BOOL_T MakeParallelBezier( + track_p trk, + coOrd pos, + DIST_T sep, + track_p * newTrkR, + coOrd * p0R, + coOrd * p1R ) +{ + struct extraData * xx = GetTrkExtraData(trk); + coOrd np[4], p; + ANGLE_T a,a2; + + //Produce bezier that is translated parallel to the existing Bezier + // - not a precise result if the bezier end angles are not in the same general direction. + // The expectation is that the user will have to adjust it - unless and until we produce + // a new algo to adjust the control points to be parallel to the endpoints. + + a = FindAngle(xx->bezierData.pos[0],xx->bezierData.pos[3]); + p = pos; + DistanceBezier(trk, &p); + a2 = NormalizeAngle(FindAngle(pos,p)-a); + //find parallel move x and y for points + for (int i =0; i<4;i++) { + np[i] = xx->bezierData.pos[i]; + } + + if ( a2 > 180 ) { + Translate(&np[0],np[0],a+90,sep); + Translate(&np[1],np[1],a+90,sep); + Translate(&np[2],np[2],a+90,sep); + Translate(&np[3],np[3],a+90,sep); + } else { + Translate(&np[0],np[0],a-90,sep); + Translate(&np[1],np[1],a-90,sep); + Translate(&np[2],np[2],a-90,sep); + Translate(&np[3],np[3],a-90,sep); + } + + if ( newTrkR ) { + *newTrkR = NewBezierTrack( np, NULL, 0); + } else { + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); + tempSegs(0).color = wDrawColorBlack; + tempSegs(0).width = 0; + tempSegs_da.cnt = 1; + tempSegs(0).type = SEG_BEZTRK; + if (tempSegs(0).bezSegs.ptr) MyFree(tempSegs(0).bezSegs.ptr); + tempSegs(0).bezSegs.max = 0; + tempSegs(0).bezSegs.cnt = 0; + for (int i=0;i<4;i++) tempSegs(0).u.b.pos[i] = np[i]; + FixUpBezierSeg(tempSegs(0).u.b.pos,&tempSegs(0),TRUE); + } + if ( p0R ) *p0R = np[0]; + if ( p1R ) *p1R = np[1]; + return TRUE; +} + +/* + * When an undo is run, the array of segs is missing - they are not saved to the Undo log. So Undo calls this routine to + * ensure + * - that the Segs are restored and + * - other fields reset. + */ +BOOL_T RebuildBezier (track_p trk) +{ + struct extraData *xx; + xx = GetTrkExtraData(trk); + xx->bezierData.arcSegs.cnt = 0; + FixUpBezier(xx->bezierData.pos,xx,IsTrack(trk)); + ComputeBezierBoundingBox(trk, xx); + return TRUE; +} + +BOOL_T MoveBezierEndPt ( track_p *trk, EPINX_T *ep, coOrd pos, DIST_T d0 ) { + track_p trk2; + struct extraData *xx; + if (SplitTrack(*trk,pos,*ep,&trk2,TRUE)) { + if (trk2) DeleteTrack(trk2,TRUE); + xx = GetTrkExtraData(*trk); + SetTrkEndPoint( *trk, *ep, *ep?xx->bezierData.pos[3]:xx->bezierData.pos[0], *ep?xx->bezierData.a1:xx->bezierData.a0 ); + return TRUE; + } + return FALSE; +} + +static trackCmd_t bezlinCmds = { + "BZRLIN", + DrawBezier, + DistanceBezier, + DescribeBezier, + DeleteBezier, + WriteBezier, + ReadBezier, + MoveBezier, + RotateBezier, + RescaleBezier, + NULL, + GetAngleBezier, + SplitBezier, + NULL, + NULL, + NULL, /* redraw */ + NULL, /* trim */ + MergeBezier, + NULL, /* modify */ + GetLengthBezier, + GetParamsBezier, + NULL, /* Move EndPt */ + QueryBezier, + NULL, /* ungroup */ + FlipBezier, + NULL, + NULL, + NULL, + NULL, + NULL, + RebuildBezier + }; + +static trackCmd_t bezierCmds = { + "BEZIER", + DrawBezier, + DistanceBezier, + DescribeBezier, + DeleteBezier, + WriteBezier, + ReadBezier, + MoveBezier, + RotateBezier, + RescaleBezier, + NULL, + GetAngleBezier, + SplitBezier, + TraverseBezier, + EnumerateBezier, + NULL, /* redraw */ + TrimBezier, /* trim */ + MergeBezier, + NULL, /* modify */ + GetLengthBezier, + GetParamsBezier, + MoveBezierEndPt, /* Move EndPt */ + QueryBezier, + NULL, /* ungroup */ + FlipBezier, + NULL, + NULL, + NULL, + MakeParallelBezier, + NULL, + RebuildBezier + }; + + +EXPORT void BezierSegProc( + segProc_e cmd, + trkSeg_p segPtr, + segProcData_p data ) +{ + ANGLE_T a1, a2; + DIST_T d, dd; + coOrd p0,p2 ; + segProcData_t segProcData; + trkSeg_p subSegsPtr; + coOrd temp0,temp1,temp2,temp3; + int inx,segInx; + BOOL_T back, segs_backwards, neg; +#define bezSegs(N) DYNARR_N( trkSeg_t, segPtr->bezSegs, N ) + + switch (cmd) { + + case SEGPROC_TRAVERSE1: //Work out how much extra dist and what direction + if (segPtr->type != SEG_BEZTRK) { + data->traverse1.dist = 0; + return; + } + d = data->traverse1.dist; + p0 = data->traverse1.pos; +LOG( log_bezierSegments, 1, ( " BezTr1-Enter P[%0.3f %0.3f] A%0.3f\n", p0.x, p0.y, data->traverse1.angle )) + a2 = GetAngleSegs(segPtr->bezSegs.cnt,segPtr->bezSegs.ptr,&p0,&segInx,&d,&back, NULL, &neg); //Find right seg and pos + inx = segInx; + data->traverse1.BezSegInx = segInx; + data->traverse1.reverse_seg = FALSE; + data->traverse1.backwards = FALSE; + if (d>10) { + data->traverse1.dist = 0; + return; + } + + if (back) a2 = NormalizeAngle(a2+180); + a1 = NormalizeAngle(a2-data->traverse1.angle); //Establish if we are going fwds or backwards globally + if (a1<270 && a1>90) { //Must add 180 if the seg is reversed or inverted (but not both) + segs_backwards = TRUE; + } else { + segs_backwards = FALSE; + } + if ( neg ) { + segs_backwards = !segs_backwards; //neg implies all the segs are reversed + } + segProcData.traverse1.pos = data->traverse1.pos = p0; //actual point on curve + segProcData.traverse1.angle = data->traverse1.angle; //Angle of car + LOG( log_bezierSegments, 1, ( " BezTr1-GSA I%d P[%0.3f %0.3f] N%d SB%d\n", segInx, p0.x, p0.y, neg, segs_backwards )) + subSegsPtr = (trkSeg_p)segPtr->bezSegs.ptr+inx; + SegProc( SEGPROC_TRAVERSE1, subSegsPtr, &segProcData ); + data->traverse1.reverse_seg = segProcData.traverse1.reverse_seg; //which way is curve (info) + data->traverse1.backwards = segProcData.traverse1.backwards; //Pass through Train direction + data->traverse1.dist = segProcData.traverse1.dist; //Get last seg partial dist + data->traverse1.segs_backwards = segs_backwards; //Get last + data->traverse1.negative = segProcData.traverse1.negative; //Is curve flipped (info) + data->traverse1.BezSegInx = inx; //Copy up Index +LOG( log_bezierSegments, 1, ( " BezTr1-Exit -> A%0.3f B%d R%d N%d D%0.3f\n", a2, segProcData.traverse1.backwards, segProcData.traverse1.reverse_seg, segProcData.traverse1.negative, segProcData.traverse1.dist )) + break; + + case SEGPROC_TRAVERSE2: + if (segPtr->type != SEG_BEZTRK) return; //Not SEG_BEZLIN +LOG( log_bezierSegments, 1, ( " BezTr2-Enter D%0.3f SD%d SI%d SB%d\n", data->traverse2.dist, data->traverse2.segDir, data->traverse2.BezSegInx, data->traverse2.segs_backwards)) + if (data->traverse2.dist <= segPtr->u.b.length) { + + segProcData.traverse2.pos = data->traverse2.pos; + DIST_T dist = data->traverse2.dist; + segProcData.traverse2.dist = data->traverse2.dist; + segProcData.traverse2.angle = data->traverse2.angle; + segProcData.traverse2.segDir = data->traverse2.segDir; + segs_backwards = data->traverse2.segs_backwards; + BOOL_T backwards = data->traverse2.segDir; + inx = data->traverse2.BezSegInx; //Special from Traverse1 + while (inx>=0 && inxbezSegs.cnt) { + subSegsPtr = (trkSeg_p)segPtr->bezSegs.ptr+inx; + SegProc(SEGPROC_TRAVERSE2, subSegsPtr, &segProcData); + if (segProcData.traverse2.dist<=0) { //Done + data->traverse2.angle = segProcData.traverse2.angle; + data->traverse2.dist = 0; + data->traverse2.pos = segProcData.traverse2.pos; +LOG( log_bezierSegments, 1, ( " BezTr2-Exit1 -> A%0.3f P[%0.3f %0.3f] \n", data->traverse2.angle, data->traverse2.pos.x, data->traverse2.pos.y )) + return; + } else dist = segProcData.traverse2.dist; + p2 = segProcData.traverse2.pos; + a2 = segProcData.traverse2.angle; +LOG( log_bezierSegments, 2, ( " BezTr2-Tr2 D%0.3f P[%0.3f %0.3f] A%0.3f\n", dist, p2.x, p2.y, a2 )) + + segProcData.traverse1.pos = p2; + segProcData.traverse1.angle = a2; + inx = segs_backwards?inx-1:inx+1; + if (inx<0 || inx>=segPtr->bezSegs.cnt) break; + subSegsPtr = (trkSeg_p)segPtr->bezSegs.ptr+inx; + SegProc(SEGPROC_TRAVERSE1, subSegsPtr, &segProcData); + BOOL_T reverse_seg = segProcData.traverse1.reverse_seg; //For Info only + backwards = segProcData.traverse1.backwards; + dist += segProcData.traverse1.dist; //Add extra if needed - this is if we have to go from the other end of this seg + segProcData.traverse2.dist = dist; //distance left + segProcData.traverse2.segDir = backwards; //which way + segProcData.traverse2.pos = p2; + segProcData.traverse2.angle = a2; +LOG( log_bezierSegments, 2, ( " BezTr2-Loop A%0.3f P[%0.3f %0.3f] D%0.3f SI%d B%d RS%d\n", a2, p2.x, p2.y, dist, inx, backwards, reverse_seg )) + } + data->traverse2.dist = dist; + } else data->traverse2.dist -= segPtr->u.b.length; //we got here because the desired point is not inside the segment + if (segs_backwards) { + data->traverse2.pos = segPtr->u.b.pos[0]; // Backwards so point 0 + data->traverse2.angle = segPtr->u.b.angle0; + } else { + data->traverse2.pos = segPtr->u.b.pos[3]; // Forwards so point 3 + data->traverse2.angle = segPtr->u.b.angle3; + } +LOG( log_bezierSegments, 1, ( " BezTr-Exit2 --> SI%d A%0.3f P[%0.3f %0.3f] D%0.3f\n", inx, data->traverse2.angle, data->traverse2.pos.x, data->traverse2.pos.y, data->traverse2.dist)) + break; + + case SEGPROC_DRAWROADBEDSIDE: + //TODO - needs parallel bezier problem solved... + break; + + case SEGPROC_DISTANCE: + + dd = 100000.00; //Just find one distance + p0 = data->distance.pos1; + + //initialize p2 + p2 = segPtr->u.b.pos[0]; + for(int i=0;ibezSegs.cnt;i++) { + segProcData.distance.pos1 = p0; + SegProc(SEGPROC_DISTANCE,&(DYNARR_N(trkSeg_t,segPtr->bezSegs,i)),&segProcData); + d = segProcData.distance.dd; + if (ddistance.dd = dd; + data->distance.pos1 = p2; + break; + + case SEGPROC_FLIP: + + temp0 = segPtr->u.b.pos[0]; + temp1 = segPtr->u.b.pos[1]; + temp2 = segPtr->u.b.pos[2]; + temp3 = segPtr->u.b.pos[3]; + segPtr->u.b.pos[0] = temp3; + segPtr->u.b.pos[1] = temp2; + segPtr->u.b.pos[2] = temp1; + segPtr->u.b.pos[3] = temp0; + FixUpBezierSeg(segPtr->u.b.pos,segPtr,segPtr->type == SEG_BEZTRK); + break; + + case SEGPROC_NEWTRACK: + data->newTrack.trk = NewBezierTrack( segPtr->u.b.pos, (trkSeg_t *)segPtr->bezSegs.ptr, segPtr->bezSegs.cnt); + data->newTrack.ep[0] = 0; + data->newTrack.ep[1] = 1; + break; + + case SEGPROC_LENGTH: + data->length.length = 0; + for(int i=0;ibezSegs.cnt;i++) { + SegProc(cmd,&(DYNARR_N(trkSeg_t,segPtr->bezSegs,i)),&segProcData); + data->length.length += segProcData.length.length; + } + break; + + case SEGPROC_SPLIT: + //TODO Split + break; + + case SEGPROC_GETANGLE: + inx = 0; + back = FALSE; + subSegsPtr = (trkSeg_p) segPtr->bezSegs.ptr; + coOrd pos = data->getAngle.pos; +LOG( log_bezierSegments, 1, ( " BezGA-In P[%0.3f %0.3f] \n", pos.x, pos.y)) + data->getAngle.angle = GetAngleSegs(segPtr->bezSegs.cnt,subSegsPtr, &pos, &inx, NULL, &back, NULL, NULL); + //Recurse for Bezier sub-segs (only straights and curves) + + data->getAngle.negative_radius = FALSE; + data->getAngle.backwards = back; + data->getAngle.pos = pos; + data->getAngle.bezSegInx = inx; + subSegsPtr +=inx; + if (subSegsPtr->type == SEG_CRVTRK || subSegsPtr->type == SEG_CRVLIN ) { + data->getAngle.radius = fabs(subSegsPtr->u.c.radius); + if (subSegsPtr->u.c.radius<0 ) data->getAngle.negative_radius = TRUE; + data->getAngle.center = subSegsPtr->u.c.center; + } + else data->getAngle.radius = 0.0; +LOG( log_bezierSegments, 1, ( " BezGA-Out SI%d A%0.3f P[%0.3f %0.3f] B%d\n", inx, data->getAngle.angle, pos.x, pos.y, back)) + break; + + } + +} + + +/**************************************** + * + * GRAPHICS COMMANDS + * + */ + + +track_p NewBezierTrack(coOrd pos[4], trkSeg_t * tempsegs, int count) +{ + struct extraData *xx; + track_p p; + p = NewTrack( 0, T_BEZIER, 2, sizeof *xx ); + xx = GetTrkExtraData(p); + xx->bezierData.pos[0] = pos[0]; + xx->bezierData.pos[1] = pos[1]; + xx->bezierData.pos[2] = pos[2]; + xx->bezierData.pos[3] = pos[3]; + xx->bezierData.segsColor = wDrawColorBlack; + xx->bezierData.segsWidth = 0; + FixUpBezier(pos, xx, TRUE); +LOG( log_bezier, 1, ( "NewBezierTrack( EP1 %0.3f, %0.3f, CP1 %0.3f, %0.3f, CP2 %0.3f, %0.3f, EP2 %0.3f, %0.3f ) = %d\n", pos[0].x, pos[0].y, pos[1].x, pos[1].y, pos[2].x, pos[2].y, pos[3].x, pos[3].y, GetTrkIndex(p) ) ) + ComputeBezierBoundingBox( p, xx ); + SetTrkEndPoint( p, 0, pos[0], xx->bezierData.a0); + SetTrkEndPoint( p, 1, pos[3], xx->bezierData.a1); + CheckTrackLength( p ); + SetTrkBits( p, TB_HIDEDESC ); + return p; +} + +EXPORT track_p NewBezierLine( coOrd pos[4], trkSeg_t * tempsegs, int count, wDrawColor color, DIST_T width ) +{ + struct extraData *xx; + track_p p; + p = NewTrack( 0, T_BZRLIN, 2, sizeof *xx ); + xx = GetTrkExtraData(p); + xx->bezierData.pos[0] = pos[0]; + xx->bezierData.pos[1] = pos[1]; + xx->bezierData.pos[2] = pos[2]; + xx->bezierData.pos[3] = pos[3]; + xx->bezierData.segsColor = color; + xx->bezierData.segsWidth = width; + FixUpBezier(pos, xx, FALSE); +LOG( log_bezier, 1, ( "NewBezierLine( EP1 %0.3f, %0.3f, CP1 %0.3f, %0.3f, CP2 %0.3f, %0.3f, EP2 %0.3f, %0.3f) = %d\n", pos[0].x, pos[0].y, pos[1].x, pos[1].y, pos[2].x, pos[2].y, pos[3].x, pos[3].y, GetTrkIndex(p) ) ) + ComputeBezierBoundingBox( p, xx ); + return p; +} + + + +EXPORT void InitTrkBezier( void ) +{ + T_BEZIER = InitObject( &bezierCmds ); + T_BZRLIN = InitObject( &bezlinCmds ); + log_bezier = LogFindIndex( "Bezier" ); + log_traverseBezier = LogFindIndex( "traverseBezier" ); + log_bezierSegments = LogFindIndex( "traverseBezierSegs"); +} + +/******************************************************************************** + * + * Bezier Functions + * + ********************************************************************************/ + + +/** + * Return point on Bezier using "t" (from 0 to 1) + */ +extern coOrd BezierPointByParameter(coOrd p[4], double t) +{ + + double a,b,c,d; + double mt = 1-t; + double mt2 = mt*mt; + double t2 = t*t; + + a = mt2*mt; + b = mt2*t*3; + c = mt*t2*3; + d = t*t2; + + coOrd o; + o.x = a*p[0].x+b*p[1].x+c*p[2].x+d*p[3].x; + o.y = a*p[0].y+b*p[1].y+c*p[2].y+d*p[3].y; + + return o; + +} +/** + * Find distance from point to Bezier. Return also the "t" value of that closest point. + */ +extern DIST_T BezierMathDistance( coOrd * pos, coOrd p[4], int segments, double * t_value) +{ + DIST_T dd = 10000.0; + double t = 0.0; + coOrd pt; + coOrd save_pt = p[0]; + for (int i=0; i<=segments; i++) { + pt = BezierPointByParameter(p, (double)i/segments); + if (FindDistance(*pos,pt) < dd) { + dd = FindDistance(*pos,pt); + t = (double)i/segments; + save_pt = pt; + } + } + if (t_value) *t_value = t; + * pos = save_pt; + return dd; +} + +extern coOrd BezierMathFindNearestPoint(coOrd *pos, coOrd p[4], int segments) { + double t = 0.0; + BezierMathDistance(pos, p, segments, &t); + return BezierPointByParameter(p, t); +} + +void BezierSlice(coOrd input[], coOrd output[], double t) { + coOrd p1,p12,p2,p23,p3,p34,p4; + coOrd p123, p234, p1234; + + p1 = input[0]; + p2 = input[1]; + p3 = input[2]; + p4 = input[3]; + + p12.x = (p2.x-p1.x)*t+p1.x; + p12.y = (p2.y-p1.y)*t+p1.y; + + p23.x = (p3.x-p2.x)*t+p2.x; + p23.y = (p3.y-p2.y)*t+p2.y; + + p34.x = (p4.x-p3.x)*t+p3.x; + p34.y = (p4.y-p3.y)*t+p3.y; + + p123.x = (p23.x-p12.x)*t+p12.x; + p123.y = (p23.y-p12.y)*t+p12.y; + + p234.x = (p34.x-p23.x)*t+p23.x; + p234.y = (p34.y-p23.y)*t+p23.y; + + p1234.x = (p234.x-p123.x)*t+p123.x; + p1234.y = (p234.y-p123.y)*t+p123.y; + + output[0]= p1; + output[1] = p12; + output[2] = p123; + output[3] = p1234; + +}; + +/** + * Split bezier into two parts + */ +extern void BezierSplit(coOrd input[], coOrd left[], coOrd right[] , double t) { + + BezierSlice(input,left,t); + + coOrd back[4],backright[4]; + + for (int i = 0;i<4;i++) { + back[i] = input[3-i]; + } + BezierSlice(back,backright,1-t); + for (int i = 0;i<4;i++) { + right[i] = backright[3-i]; + } + +} + + +/** + * If close enough (length of control polygon exceeds chord by < error) add length of polygon. + * Else split and recurse + */ +double BezierAddLengthIfClose(coOrd start[4], double error) { + coOrd left[4], right[4]; /* bez poly splits */ + double len = 0.0; /* arc length */ + double chord; /* chord length */ + int index; /* misc counter */ + + for (index = 0; index <= 2; index++) + len = len + FindDistance(start[index],start[index+1]); //add up control polygon + + chord = FindDistance(start[0],start[3]); //find chord length + + if((len-chord) > error) { // If error too large - + BezierSplit(start,left,right,0.5); /* split in two */ + len = BezierAddLengthIfClose(left, error); /* recurse left side */ + len += BezierAddLengthIfClose(right, error); /* recurse right side */ + } + return len; // Add length of this curve + +} + +/** + * Use recursive splitting to get close approximation ot length of bezier + * + */ +extern double BezierMathLength(coOrd p[4], double error) +{ + if (error == 0.0) error = 0.01; + return BezierAddLengthIfClose(p, error); /* kick off recursion */ + +} + +coOrd BezierFirstDerivative(coOrd p[4], double t) +{ + //checkParameterT(t); + + double tSquared = t * t; + double s0 = -3 + 6 * t - 3 * tSquared; + double s1 = 3 - 12 * t + 9 * tSquared; + double s2 = 6 * t - 9 * tSquared; + double s3 = 3 * tSquared; + double resultX = p[0].x * s0 + p[1].x * s1 + p[2].x * s2 + p[3].x * s3; + double resultY = p[0].y * s0 + p[1].y * s1 + p[2].y * s2 + p[3].y * s3; + + coOrd v; + + v.x = resultX; + v.y = resultY; + return v; +} + +/** + * Gets 2nd derivate wrt t of a Bezier curve at a point + + */ +coOrd BezierSecondDerivative(coOrd p[4], double t) +{ + //checkParameterT(t); + + double s0 = 6 - 6 * t; + double s1 = -12 + 18 * t; + double s2 = 6 - 18 * t; + double s3 = 6 * t; + double resultX = p[0].x * s0 + p[1].x * s1 + p[2].x * s2 + p[3].x * s3; + double resultY = p[0].y * s0 + p[1].y * s1 + p[2].y * s2 + p[3].y * s3; + + coOrd v; + v.x = resultX; + v.y = resultY; + return v; +} + +/** + * Get curvature of a Bezier at a point +*/ +extern double BezierCurvature(coOrd p[4], double t, coOrd * center) +{ + //checkParameterT(t); + + coOrd d1 = BezierFirstDerivative(p, t); + coOrd d2 = BezierSecondDerivative(p, t); + + if (center) { + double curvnorm = (d1.x * d1.x + d1.y* d1.y)/(d1.x * d2.y - d2.x * d1.y); + coOrd p = BezierPointByParameter(&p, t); + center->x = p.x-d1.y*curvnorm; + center->y = p.y+d1.x*curvnorm; + } + + double r1 = sqrt(pow(d1.x * d1.x + d1.y* d1.y, 3.0)); + double r2 = fabs(d1.x * d2.y - d2.x * d1.y); + return r2 / r1; +} + +/** + * Get Maximum Curvature + */ +extern double BezierMaxCurve(coOrd p[4]) { + double max = 0; + for (int t = 0;t<100;t++) { + double curv = BezierCurvature(p, t/100, NULL); + if (max= 1000.0 || curv <= 0.001 ) return 0.0; + return 1/curv; +} + diff --git a/app/bin/tbezier.h b/app/bin/tbezier.h new file mode 100644 index 0000000..1e8b915 --- /dev/null +++ b/app/bin/tbezier.h @@ -0,0 +1,57 @@ +/* + * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/tbezier.h,v 1.1 2005-12-07 15:47:36 rc-flyer Exp $ + */ + +/* XTrkCad - Model Railroad CAD + * Copyright (C) 2005 Dave Bullis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "common.h" +#include "track.h" + +typedef struct { + coOrd pos[4]; + DIST_T minCurveRadius; + ANGLE_T a0, a1; + DIST_T length; + dynArr_t arcSegs; + coOrd descriptionOff; + DIST_T segsWidth; + wDrawColor segsColor; + } BezierData_t; + + +void BezierSplit(coOrd[4], coOrd[4], coOrd[4] , double ); +coOrd BezierPointByParameter(coOrd[4], double); +double BezierMathLength(coOrd[4], double); +coOrd BezierFirstDerivative(coOrd p[4], double); +coOrd BezierSecondDerivative(coOrd p[4], double); +double BezierCurvature(coOrd[4], double , coOrd *); +double BezierMaxCurve(coOrd[4]); +double BezierMathMinRadius(coOrd[4]); +coOrd BezierMathFindNearestPoint(coOrd *, coOrd[4] , int ); +track_p NewBezierTrack(coOrd[4], trkSeg_t * , int ); +track_p NewBezierLine(coOrd[4], trkSeg_t * , int, wDrawColor, DIST_T); +DIST_T BezierMathDistance( coOrd *, coOrd[4], int , double * ); +void FixUpBezier(coOrd[4], struct extraData*, BOOL_T); +void FixUpBezierSeg(coOrd[4], trkSeg_p , BOOL_T); +void FixUpBezierSegs(trkSeg_p p,int segCnt); +BOOL_T GetBezierSegmentFromTrack(track_p, trkSeg_p); + +DIST_T BezierDescriptionDistance(coOrd pos,track_p trk ); +STATUS_T BezierDescriptionMove(track_p trk,wAction_t action,coOrd pos ); + diff --git a/app/bin/tcornu.c b/app/bin/tcornu.c new file mode 100644 index 0000000..9d9587a --- /dev/null +++ b/app/bin/tcornu.c @@ -0,0 +1,1321 @@ +/** \file tcornu.c + * + * CORNU SPIRAL TRACK + * + * A Cornu is a spiral arc defined by a polynomial that has the property + * that curvature varies linearly with distance along the curve. It is a family + * of curves that include Euler spirals. + * + * In order to be useful in XtrkCAD it is defined as a set of Bezier curves each of + * which is defined as a set of circular arcs and lines. + * + * The derivation of the Beziers is done by the Cornu library which must be recalled + * whenever a change is made in the end conditions. + * + * A cornu has a minimum radius and a maximum rate of change of radius. + * + * Acknowledgment is given to Dr. Raph Levien whose seminal PhD work on Cornu curves and + * generous open-sourcing of his libraries both inspired and powers this function. + * + * + * XTrkCad - Model Railroad CAD + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + +#include "track.h" +#include "draw.h" +#include "cbezier.h" +#include "tbezier.h" +#include "tcornu.h" +#include "ccornu.h" +#include "ccurve.h" +#include "cstraigh.h" +#include "cjoin.h" +#include "utility.h" +#include "common.h" +#include "i18n.h" +#include "param.h" +#include "math.h" +#include "string.h" +#include "cundo.h" +#include "layout.h" +#include "fileio.h" +#include "assert.h" + +EXPORT TRKTYP_T T_CORNU = -1; + +struct extraData { + cornuData_t cornuData; + }; + +static int log_cornu = 0; + +static DIST_T GetLengthCornu( track_p ); + +/**************************************** + * + * UTILITIES + * + */ + +/* + * Run after any changes to the Cornu points + */ +void SetUpCornuParmFromTracks(track_p trk[2],cornuParm_t * cp, struct extraData* xx) { + if (!trk[0]) { + cp->center[0] = xx->cornuData.c[0]; + cp->angle[0] = xx->cornuData.a[0]; + cp->radius[0] = xx->cornuData.r[0]; + } + if (!trk[1]) { + cp->center[1] = xx->cornuData.c[1]; + cp->angle[1] = xx->cornuData.a[1]; + cp->radius[1] = xx->cornuData.r[1]; + } +} + +EXPORT BOOL_T FixUpCornu(coOrd pos[2], track_p trk[2], EPINX_T ep[2], struct extraData* xx) { + + cornuParm_t cp; + + SetUpCornuParmFromTracks(trk,&cp,xx); + + if (!CallCornu(pos, trk, ep, &xx->cornuData.arcSegs, &cp)) return FALSE; + + xx->cornuData.r[0] = cp.radius[0]; + if (cp.radius[0]==0) { + xx->cornuData.a[0] = cp.angle[0]; + } else { + xx->cornuData.c[0] = cp.center[0]; + } + xx->cornuData.r[1] = cp.radius[1]; + if (cp.radius[1]==0) { + xx->cornuData.a[1] = cp.angle[1]; + } else { + xx->cornuData.c[1] = cp.center[1]; + } + + xx->cornuData.minCurveRadius = CornuMinRadius(pos,xx->cornuData.arcSegs); + xx->cornuData.windingAngle = CornuTotalWindingArc(pos,xx->cornuData.arcSegs); + DIST_T last_c; + if (xx->cornuData.r[0] == 0) last_c = 0; + else last_c = 1/xx->cornuData.r[0]; + xx->cornuData.maxRateofChange = CornuMaxRateofChangeofCurvature(pos,xx->cornuData.arcSegs,&last_c); + xx->cornuData.length = CornuLength(pos, xx->cornuData.arcSegs); + return TRUE; +} + +EXPORT BOOL_T FixUpCornu0(coOrd pos[2],coOrd center[2],ANGLE_T angle[2],DIST_T radius[2],struct extraData* xx) { + DIST_T last_c; + if (!CallCornu0(pos, center, angle, radius,&xx->cornuData.arcSegs,FALSE)) return FALSE; + xx->cornuData.minCurveRadius = CornuMinRadius(pos, + xx->cornuData.arcSegs); + if (xx->cornuData.r[0] == 0) last_c = 0; + else last_c = 1/xx->cornuData.r[0]; + xx->cornuData.maxRateofChange = CornuMaxRateofChangeofCurvature(pos,xx->cornuData.arcSegs,&last_c); + xx->cornuData.length = CornuLength(pos, xx->cornuData.arcSegs); + xx->cornuData.windingAngle = CornuTotalWindingArc(pos,xx->cornuData.arcSegs); + return TRUE; +} + +EXPORT char * CreateSegPathList(track_p trk) { + char * cp = "\0\0"; + if (GetTrkType(trk) != T_CORNU) return cp; + struct extraData *xx = GetTrkExtraData(trk); + if (xx->cornuData.cornuPath) free(xx->cornuData.cornuPath); + xx->cornuData.cornuPath = malloc(xx->cornuData.arcSegs.cnt+2); + int j= 0; + for (int i = 0;icornuData.arcSegs.cnt;i++,j++) { + xx->cornuData.cornuPath[j] = i+1; + } + xx->cornuData.cornuPath[j] = cp[0]; + xx->cornuData.cornuPath[j+1] = cp[0]; + return xx->cornuData.cornuPath; +} + + +static void GetCornuAngles( ANGLE_T *a0, ANGLE_T *a1, track_p trk ) +{ + assert( trk != NULL ); + + *a0 = NormalizeAngle( GetTrkEndAngle(trk,0) ); + *a1 = NormalizeAngle( GetTrkEndAngle(trk,1) ); + + LOG( log_cornu, 4, ( "getCornuAngles: = %0.3f %0.3f\n", *a0, *a1 ) ) +} + + +static void ComputeCornuBoundingBox( track_p trk, struct extraData * xx ) +{ + coOrd orig, size; + + GetSegBounds(zero,0,xx->cornuData.arcSegs.cnt,xx->cornuData.arcSegs.ptr, &orig, &size); + + coOrd hi, lo; + + lo.x = orig.x; + lo.y = orig.y; + hi.x = orig.x+size.x; + hi.y = orig.y+size.y; + + SetBoundingBox( trk, hi, lo ); +} + + +DIST_T CornuDescriptionDistance( + coOrd pos, + track_p trk ) +{ + struct extraData *xx = GetTrkExtraData(trk); + coOrd p1; + + if ( GetTrkType( trk ) != T_CORNU || ( GetTrkBits( trk ) & TB_HIDEDESC ) != 0 ) + return 100000; + + p1.x = xx->cornuData.pos[0].x + ((xx->cornuData.pos[1].x-xx->cornuData.pos[0].x)/2) + xx->cornuData.descriptionOff.x; + p1.y = xx->cornuData.pos[0].y + ((xx->cornuData.pos[1].y-xx->cornuData.pos[0].y)/2) + xx->cornuData.descriptionOff.y; + + return FindDistance( p1, pos ); +} + + +static void DrawCornuDescription( + track_p trk, + drawCmd_p d, + wDrawColor color ) +{ + struct extraData *xx = GetTrkExtraData(trk); + wFont_p fp; + coOrd pos; + + if (layoutLabels == 0) + return; + if ((labelEnable&LABELENABLE_TRKDESC)==0) + return; + pos.x = xx->cornuData.pos[0].x + ((xx->cornuData.pos[1].x - xx->cornuData.pos[0].x)/2); + pos.y = xx->cornuData.pos[0].y + ((xx->cornuData.pos[1].y - xx->cornuData.pos[0].y)/2); + pos.x += xx->cornuData.descriptionOff.x; + pos.y += xx->cornuData.descriptionOff.y; + fp = wStandardFont( F_TIMES, FALSE, FALSE ); + sprintf( message, _("Cornu Curve: length=%0.3f min radius=%0.3f"), + xx->cornuData.length, xx->cornuData.minCurveRadius); + DrawBoxedString( BOX_BOX, d, pos, message, fp, (wFontSize_t)descriptionFontSize, color, 0.0 ); +} + + +STATUS_T CornuDescriptionMove( + track_p trk, + wAction_t action, + coOrd pos ) +{ + struct extraData *xx = GetTrkExtraData(trk); + static coOrd p0,p1; + static BOOL_T editState; + wDrawColor color; + + if (GetTrkType(trk) != T_CORNU) return C_TERMINATE; + + p0.x = xx->cornuData.pos[0].x + ((xx->cornuData.pos[1].x - xx->cornuData.pos[0].x)/2); + p0.y = xx->cornuData.pos[0].y + ((xx->cornuData.pos[1].y - xx->cornuData.pos[0].y)/2); + + switch (action) { + case C_DOWN: + case C_MOVE: + case C_UP: + editState = TRUE; + p1 = pos; + color = GetTrkColor( trk, &mainD ); + xx->cornuData.descriptionOff.x = pos.x - p0.x; + xx->cornuData.descriptionOff.y = pos.y - p0.y; + DrawCornuDescription( trk, &mainD, color ); + if (action == C_UP) { + editState = FALSE; + } + MainRedraw(); + MapRedraw(); + return action==C_UP?C_TERMINATE:C_CONTINUE; + + case C_REDRAW: + if (editState) + DrawLine( &mainD, p1, p0, 0, wDrawColorBlack ); + break; + + } + return C_CONTINUE; +} + +/**************************************** + * + * GENERIC FUNCTIONS + * + */ + +static struct { + coOrd pos[2]; + ANGLE_T angle[2]; + DIST_T radius[2]; + coOrd center[2]; + FLOAT_T elev[2]; + FLOAT_T length; + FLOAT_T grade; + DIST_T minRadius; + DIST_T maxRateOfChange; + ANGLE_T windingAngle; + unsigned int layerNumber; + dynArr_t segs; + long width; + wDrawColor color; + } cornData; + +typedef enum { P0, A0, R0, C0, Z0, P1, A1, R1, C1, Z1, RA, RR, WA, LN, GR, LY } cornuDesc_e; +static descData_t cornuDesc[] = { +/*P0*/ { DESC_POS, N_("End Pt 1: X,Y"), &cornData.pos[0] }, +/*A0*/ { DESC_ANGLE, N_("End Angle"), &cornData.angle[0] }, +/*R0*/ { DESC_DIM, N_("Radius "), &cornData.radius[0] }, +/*C0*/ { DESC_POS, N_("Center X,Y"), &cornData.center[0] }, +/*Z0*/ { DESC_DIM, N_("Z1"), &cornData.elev[0] }, +/*P1*/ { DESC_POS, N_("End Pt 2: X,Y"), &cornData.pos[1] }, +/*A1*/ { DESC_ANGLE, N_("End Angle"), &cornData.angle[1] }, +/*R1*/ { DESC_DIM, N_("Radius"), &cornData.radius[1] }, +/*C1*/ { DESC_POS, N_("Center X,Y"), &cornData.center[1] }, +/*Z1*/ { DESC_DIM, N_("Z2"), &cornData.elev[1] }, +/*RA*/ { DESC_DIM, N_("Minimum Radius"), &cornData.minRadius }, +/*RR*/ { DESC_DIM, N_("Maximum Rate Of Change Of Curvature"), &cornData.maxRateOfChange }, +/*WA*/ { DESC_ANGLE, N_("Total Winding Angle"), &cornData.windingAngle }, +/*LN*/ { DESC_DIM, N_("Length"), &cornData.length }, +/*GR*/ { DESC_FLOAT, N_("Grade"), &cornData.grade }, +/*LY*/ { DESC_LAYER, N_("Layer"), &cornData.layerNumber }, + { DESC_NULL } }; + + +static void UpdateCornu( track_p trk, int inx, descData_p descUpd, BOOL_T final ) +{ + struct extraData *xx = GetTrkExtraData(trk); + BOOL_T updateEndPts; + EPINX_T ep; + + cornuParm_t cp; + + + if ( inx == -1 ) + return; + updateEndPts = FALSE; + switch ( inx ) { + case P0: + if (GetTrkEndTrk(trk,0)) break; + updateEndPts = TRUE; + xx->cornuData.pos[0] = cornData.pos[0]; + cornuDesc[P0].mode |= DESC_CHANGE; + /* no break */ + case P1: + if (GetTrkEndTrk(trk,1)) break; + updateEndPts = TRUE; + xx->cornuData.pos[1]= cornData.pos[1]; + cornuDesc[P1].mode |= DESC_CHANGE; + break; + case A0: + if (GetTrkEndTrk(trk,0)) break; + updateEndPts = TRUE; + xx->cornuData.a[0] = cornData.angle[0]; + cornuDesc[A0].mode |= DESC_CHANGE; + break; + case A1: + if (GetTrkEndTrk(trk,1)) break; + updateEndPts = TRUE; + xx->cornuData.a[1]= cornData.angle[1]; + cornuDesc[A1].mode |= DESC_CHANGE; + break; + case C0: + if (GetTrkEndTrk(trk,0)) break; + updateEndPts = TRUE; + xx->cornuData.c[0] = cornData.center[0]; + cornuDesc[C0].mode |= DESC_CHANGE; + break; + case C1: + if (GetTrkEndTrk(trk,1)) break; + updateEndPts = TRUE; + xx->cornuData.c[1] = cornData.center[1]; + cornuDesc[C1].mode |= DESC_CHANGE; + break; + case R0: + if (GetTrkEndTrk(trk,0)) break; + updateEndPts = TRUE; + xx->cornuData.r[0] = cornData.radius[0]; + cornuDesc[R0].mode |= DESC_CHANGE; + break; + case R1: + if (GetTrkEndTrk(trk,1)) break; + updateEndPts = TRUE; + xx->cornuData.r[1]= cornData.radius[1]; + cornuDesc[R1].mode |= DESC_CHANGE; + break; + case Z0: + case Z1: + ep = (inx==Z0?0:1); + UpdateTrkEndElev( trk, ep, GetTrkEndElevUnmaskedMode(trk,ep), cornData.elev[ep], NULL ); + ComputeElev( trk, 1-ep, FALSE, &cornData.elev[1-ep], NULL ); + if ( cornData.length > minLength ) + cornData.grade = fabs( (cornData.elev[0]-cornData.elev[1])/cornData.length )*100.0; + else + cornData.grade = 0.0; + cornuDesc[GR].mode |= DESC_CHANGE; + cornuDesc[inx==Z0?Z1:Z0].mode |= DESC_CHANGE; + return; + case LY: + SetTrkLayer( trk, cornData.layerNumber); + break; + default: + AbortProg( "updateCornu: Bad inx %d", inx ); + } + track_p tracks[2]; + tracks[0] = GetTrkEndTrk(trk,0); + tracks[1] = GetTrkEndTrk(trk,1); + + if (updateEndPts) { + if ( GetTrkEndTrk(trk,0) == NULL ) { + SetTrkEndPoint( trk, 0, cornData.pos[0], xx->cornuData.a[0]); + cornuDesc[A0].mode |= DESC_CHANGE; + } + if ( GetTrkEndTrk(trk,1) == NULL ) { + SetTrkEndPoint( trk, 1, cornData.pos[1], xx->cornuData.a[1]); + cornuDesc[A1].mode |= DESC_CHANGE; + } + } + + EPINX_T new_ep[2]; + track_p ts[2]; + ts[0] = GetTrkEndTrk(trk,0); + ts[1] = GetTrkEndTrk(trk,1); + SetUpCornuParmFromTracks(ts,&cp,xx); + CallCornu(xx->cornuData.pos, tracks, new_ep, &xx->cornuData.arcSegs, &cp); + + + //FixUpCornu(xx->bezierData.pos, xx, IsTrack(trk)); + ComputeCornuBoundingBox(trk, xx); + DrawNewTrack( trk ); +} + + +static void DescribeCornu( track_p trk, char * str, CSIZE_T len ) +{ + struct extraData *xx = GetTrkExtraData(trk); + DIST_T d; + + d = xx->cornuData.length; + sprintf( str, _("Cornu Track(%d): Layer=%u MinRadius=%s Length=%s EP=[%0.3f,%0.3f] [%0.3f,%0.3f]"), + GetTrkIndex(trk), + GetTrkLayer(trk)+1, + FormatDistance(xx->cornuData.minCurveRadius), + FormatDistance(d), + PutDim(xx->cornuData.pos[0].x),PutDim(xx->cornuData.pos[0].y), + PutDim(xx->cornuData.pos[1].x),PutDim(xx->cornuData.pos[1].y) + ); + + cornData.length = xx->cornuData.length; + cornData.minRadius = xx->cornuData.minCurveRadius; + cornData.maxRateOfChange = xx->cornuData.maxRateofChange; + cornData.windingAngle = xx->cornuData.windingAngle; + cornData.layerNumber = GetTrkLayer(trk); + cornData.pos[0] = xx->cornuData.pos[0]; + cornData.pos[1] = xx->cornuData.pos[1]; + cornData.angle[0] = xx->cornuData.a[0]; + cornData.angle[1] = xx->cornuData.a[1]; + cornData.center[0] = xx->cornuData.c[0]; + cornData.center[1] = xx->cornuData.c[1]; + cornData.radius[0] = xx->cornuData.r[0]; + cornData.radius[1] = xx->cornuData.r[1]; + if (GetTrkType(trk) == T_CORNU) { + ComputeElev( trk, 0, FALSE, &cornData.elev[0], NULL ); + ComputeElev( trk, 1, FALSE, &cornData.elev[1], NULL ); + + if ( cornData.length > minLength ) + cornData.grade = fabs( (cornData.elev[0]-cornData.elev[1])/cornData.length )*100.0; + else + cornData.grade = 0.0; + } + BOOL_T trk0 = (GetTrkEndTrk(trk,0)!=NULL); + BOOL_T trk1 = (GetTrkEndTrk(trk,1)!=NULL); + + cornuDesc[P0].mode = !trk0?0:DESC_RO; + cornuDesc[P1].mode = !trk1?0:DESC_RO; + cornuDesc[LN].mode = DESC_RO; + cornuDesc[Z0].mode = EndPtIsDefinedElev(trk,0)?0:DESC_RO; + cornuDesc[Z1].mode = EndPtIsDefinedElev(trk,1)?0:DESC_RO; + + + cornuDesc[A0].mode = !trk0?0:DESC_RO; + cornuDesc[A1].mode = !trk1?0:DESC_RO; + cornuDesc[C0].mode = !trk0?0:DESC_RO; + cornuDesc[C1].mode = !trk1?0:DESC_RO; + cornuDesc[R0].mode = !trk0?0:DESC_RO; + cornuDesc[R1].mode = !trk1?0:DESC_RO; + cornuDesc[GR].mode = DESC_RO; + cornuDesc[RA].mode = DESC_RO; + cornuDesc[RR].mode = DESC_RO; + cornuDesc[WA].mode = DESC_RO; + cornuDesc[LY].mode = DESC_NOREDRAW; + + DoDescribe( _("Cornu Track"), trk, cornuDesc, UpdateCornu ); + + +} + + +static DIST_T DistanceCornu( track_p t, coOrd * p ) +{ + struct extraData *xx = GetTrkExtraData(t); + //return BezierMathDistance(p,xx->bezierData.pos,100, &s); + + DIST_T d = 100000.0; + coOrd p2 = xx->cornuData.pos[0]; //Set initial point + segProcData_t segProcData; + for (int i = 0;icornuData.arcSegs.cnt;i++) { + trkSeg_t seg = DYNARR_N(trkSeg_t,xx->cornuData.arcSegs,i); + if (seg.type == SEG_FILCRCL) continue; + segProcData.distance.pos1 = * p; + SegProc(SEGPROC_DISTANCE,&seg,&segProcData); + if (segProcData.distance.ddbezierData.pos[0], xx->bezierData.pos[1], xx->bezierData.pos[2], xx->bezierData.pos[1], 100, NULL ); + * p = p2; + return d; +} + +static void DrawCornu( track_p t, drawCmd_p d, wDrawColor color ) +{ + struct extraData *xx = GetTrkExtraData(t); + long widthOptions = DTS_LEFT|DTS_RIGHT; + + if (GetTrkWidth(t) == 2) + widthOptions |= DTS_THICK2; + if (GetTrkWidth(t) == 3) + widthOptions |= DTS_THICK3; + + + if ( ((d->funcs->options&wDrawOptTemp)==0) && + (labelWhen == 2 || (labelWhen == 1 && (d->options&DC_PRINT))) && + labelScale >= d->scale && + ( GetTrkBits( t ) & TB_HIDEDESC ) == 0 ) { + DrawCornuDescription( t, d, color ); + } + DIST_T scale2rail = (d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale; + if ( tieDrawMode!=TIEDRAWMODE_NONE && + d!=&mapD && + (d->options&DC_TIES)!=0 && + d->scalecornuData.arcSegs.ptr,xx->cornuData.arcSegs.cnt, GetTrkGauge(t), color, widthOptions|DTS_TIES); + DrawSegsO(d,t,zero,0.0,xx->cornuData.arcSegs.ptr,xx->cornuData.arcSegs.cnt, GetTrkGauge(t), color, widthOptions); + if ( (d->funcs->options & wDrawOptTemp) == 0 && + (d->options&DC_QUICK) == 0 ) { + DrawEndPt( d, t, 0, color ); + DrawEndPt( d, t, 1, color ); + } +} + +void FreeSubSegs(trkSeg_t* s) { + if (s->type == SEG_BEZTRK || s->type == SEG_BEZLIN) { + if (s->bezSegs.ptr) { + MyFree(s->bezSegs.ptr); + } + s->bezSegs.max = 0; + s->bezSegs.cnt = 0; + s->bezSegs.ptr = NULL; + } +} + +static void DeleteCornu( track_p t ) +{ + struct extraData *xx = GetTrkExtraData(t); + + for (int i=0;icornuData.arcSegs.cnt;i++) { + trkSeg_t s = DYNARR_N(trkSeg_t,xx->cornuData.arcSegs,i); + FreeSubSegs(&s); + } + if (xx->cornuData.arcSegs.ptr) + MyFree(xx->cornuData.arcSegs.ptr); + xx->cornuData.arcSegs.max = 0; + xx->cornuData.arcSegs.cnt = 0; + xx->cornuData.arcSegs.ptr = NULL; +} + +static BOOL_T WriteCornu( track_p t, FILE * f ) +{ + struct extraData *xx = GetTrkExtraData(t); + long options; + BOOL_T rc = TRUE; + BOOL_T track =(GetTrkType(t)==T_CORNU); + options = GetTrkWidth(t) & 0x0F; + if ( ( GetTrkBits(t) & TB_HIDEDESC ) == 0 ) options |= 0x80; + rc &= fprintf(f, "%s %d %d %ld 0 0 %s %d %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f \n", + "CORNU",GetTrkIndex(t), GetTrkLayer(t), (long)options, + GetTrkScaleName(t), GetTrkVisible(t), + xx->cornuData.pos[0].x, xx->cornuData.pos[0].y, + xx->cornuData.a[0], + xx->cornuData.r[0], + xx->cornuData.c[0].x,xx->cornuData.c[0].y, + xx->cornuData.pos[1].x, xx->cornuData.pos[1].y, + xx->cornuData.a[1], + xx->cornuData.r[1], + xx->cornuData.c[1].x,xx->cornuData.c[1].y )>0; + if (track) { + rc &= WriteEndPt( f, t, 0 ); + rc &= WriteEndPt( f, t, 1 ); + } + rc &= WriteSegs( f, xx->cornuData.arcSegs.cnt, xx->cornuData.arcSegs.ptr ); + //rc &= fprintf(f, "\tEND\n" )>0; + return rc; +} + +static void ReadCornu( char * line ) +{ + struct extraData *xx; + track_p t; + wIndex_t index; + BOOL_T visible; + DIST_T r0,r1; + ANGLE_T a0,a1; + coOrd p0, p1, c0, c1; + char scale[10]; + wIndex_t layer; + long options; + char * cp = NULL; + + if (!GetArgs( line+6, "dLl00sdpffppffp", + &index, &layer, &options, scale, &visible, &p0, &a0, &r0, &c0, &p1, &a1, &r1, &c1 ) ) { + return; + } + t = NewTrack( index, T_CORNU, 0, sizeof *xx ); + + xx = GetTrkExtraData(t); + SetTrkVisible(t, visible); + SetTrkScale(t, LookupScale(scale)); + SetTrkLayer(t, layer ); + SetTrkWidth(t, (int)(options&0x0F)); + if ( ( options & 0x80 ) == 0 ) SetTrkBits(t,TB_HIDEDESC); + xx->cornuData.pos[0] = p0; + xx->cornuData.pos[1] = p1; + xx->cornuData.a[0] = a0; + xx->cornuData.r[0] = r0; + xx->cornuData.a[1] = a1; + xx->cornuData.c[0] = c0; + xx->cornuData.c[1] = c1; + xx->cornuData.r[1] = r1; + xx->cornuData.descriptionOff.x = xx->cornuData.descriptionOff.y = 0.0; + ReadSegs(); + FixUpCornu0(xx->cornuData.pos,xx->cornuData.c,xx->cornuData.a, xx->cornuData.r, xx); + ComputeCornuBoundingBox(t,xx); + SetEndPts(t,2); +} + +static void MoveCornu( track_p trk, coOrd orig ) +{ + struct extraData *xx = GetTrkExtraData(trk); + UndoModify(trk); + for (int i=0;i<2;i++) { + xx->cornuData.pos[i].x += orig.x; + xx->cornuData.pos[i].y += orig.y; + xx->cornuData.c[i].x += orig.x; + xx->cornuData.c[i].y += orig.y; + } + RebuildCornu(trk); +} + +static void RotateCornu( track_p trk, coOrd orig, ANGLE_T angle ) +{ + struct extraData *xx = GetTrkExtraData(trk); + UndoModify(trk); + for (int i=0;i<2;i++) { + Rotate( &xx->cornuData.pos[i], orig, angle ); + Rotate( &xx->cornuData.c[i], orig, angle); + xx->cornuData.a[i] = NormalizeAngle(xx->cornuData.a[i]+angle); + } + RebuildCornu(trk); +} + +static void RescaleCornu( track_p trk, FLOAT_T ratio ) +{ + struct extraData *xx = GetTrkExtraData(trk); + UndoModify(trk); + for (int i=0;i<2;i++) { + xx->cornuData.pos[i].x *= ratio; + xx->cornuData.pos[i].y *= ratio; + } + RebuildCornu(trk); + +} + +EXPORT BOOL_T SetCornuEndPt(track_p trk, EPINX_T inx, coOrd pos, coOrd center, ANGLE_T angle, DIST_T radius) { + struct extraData *xx = GetTrkExtraData(trk); + + xx->cornuData.pos[inx] = pos; + xx->cornuData.c[inx] = center; + xx->cornuData.a[inx] = angle; + xx->cornuData.r[inx] = radius; + if (!RebuildCornu(trk)) return FALSE; + SetTrkEndPoint( trk, inx, xx->cornuData.pos[inx], xx->cornuData.a[inx]); + return TRUE; +} + + +/** + * Split the Track at approximately the point pos. + */ +static BOOL_T SplitCornu( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, EPINX_T * ep0, EPINX_T * ep1 ) +{ + struct extraData *xx = GetTrkExtraData(trk); + track_p trk1; + DIST_T radius = 0.0; + coOrd center; + int inx; + BOOL_T track; + track = IsTrack(trk); + + cornuParm_t new; + + double dd = DistanceCornu(trk, &pos); + if (dd>minLength) return FALSE; + BOOL_T back, neg; + + ANGLE_T angle = GetAngleSegs(xx->cornuData.arcSegs.cnt,(trkSeg_t *)(xx->cornuData.arcSegs.ptr),&pos,&inx,NULL,&back,NULL,&neg); + + trkSeg_p segPtr = &DYNARR_N(trkSeg_t, xx->cornuData.arcSegs, inx); + + GetAngleSegs(segPtr->bezSegs.cnt,(trkSeg_t *)(segPtr->bezSegs.ptr),&pos,&inx,NULL,&back,NULL,&neg); + segPtr = &DYNARR_N(trkSeg_t, segPtr->bezSegs, inx); + + if (segPtr->type == SEG_STRTRK) { + radius = 0.0; + center = zero; + } else if (segPtr->type == SEG_CRVTRK) { + center = segPtr->u.c.center; + radius = fabs(segPtr->u.c.radius); + } + if (ep) { + new.pos[0] = pos; + new.pos[1] = xx->cornuData.pos[1]; + new.angle[0] = NormalizeAngle(angle+(neg==back?180:0)); + new.angle[1] = xx->cornuData.a[1]; + new.center[0] = center; + new.center[1] = xx->cornuData.c[1]; + new.radius[0] = radius; + new.radius[1] = xx->cornuData.r[1]; + } else { + new.pos[1] = pos; + new.pos[0] = xx->cornuData.pos[0]; + new.angle[1] = NormalizeAngle(angle+(neg==back?0:180)); + new.angle[0] = xx->cornuData.a[0]; + new.center[1] = center; + new.center[0] = xx->cornuData.c[0]; + new.radius[1] = radius; + new.radius[0] = xx->cornuData.r[0]; + } + + trk1 = NewCornuTrack(new.pos,new.center,new.angle,new.radius,NULL,0); + if (trk1==NULL) { + wBeep(); + InfoMessage(_("Cornu Create Failed for p1[%0.3f,%0.3f] p2[%0.3f,%0.3f], c1[%0.3f,%0.3f] c2[%0.3f,%0.3f], a1=%0.3f a2=%0.3f, r1=%s r2=%s"), + new.pos[0].x,new.pos[0].y, + new.pos[1].x,new.pos[1].y, + new.center[0].x,new.center[0].y, + new.center[1].x,new.center[1].y, + new.angle[0],new.angle[1], + FormatDistance(new.radius[0]),FormatDistance(new.radius[1])); + UndoEnd(); + return FALSE; + } + + UndoModify(trk); + xx->cornuData.pos[ep] = pos; + xx->cornuData.a[ep] = NormalizeAngle(new.angle[1-ep]+180); + xx->cornuData.r[ep] = new.radius[1-ep]; + xx->cornuData.c[ep] = new.center[1-ep]; + + RebuildCornu(trk); + + SetTrkEndPoint(trk, ep, xx->cornuData.pos[ep], xx->cornuData.a[ep]); + + *leftover = trk1; + *ep0 = 1-ep; + *ep1 = ep; + + return TRUE; +} + +BOOL_T MoveCornuEndPt ( track_p *trk, EPINX_T *ep, coOrd pos, DIST_T d0 ) { + track_p trk2; + if (SplitTrack(*trk,pos,*ep,&trk2,TRUE)) { + struct extraData *xx = GetTrkExtraData(*trk); + if (trk2) DeleteTrack(trk2,TRUE); + SetTrkEndPoint( *trk, *ep, *ep?xx->cornuData.pos[1]:xx->cornuData.pos[0], *ep?xx->cornuData.a[1]:xx->cornuData.a[0] ); + return TRUE; + } + return FALSE; +} +static int log_traverseCornu = 0; +/* + * TraverseCornu is used to position a train/car. + * We find a new position and angle given a current pos, angle and a distance to travel. + * + * The output can be TRUE -> we have moved the point to a new point or to the start/end of the next track + * FALSE -> we have not found that point because pos was not on/near the track + * + * If true we supply the remaining distance to go (always positive). + * We detect the movement direction by comparing the current angle to the angle of the track at the point. + * + * The entire Cornu may be reversed or forwards depending on the way it was drawn. + * + * Each Bezier segment within that Cornu structure therefore may be processed forwards or in reverse. + * So for each segment we call traverse1 to get the direction and extra distance to go to get to the current point + * and then use that for traverse2 to actually move to the new point + * + * If we exceed the current point's segment we move on to the next until the end of this track or we have found the spot. + * + */ +static BOOL_T TraverseCornu( traverseTrack_p trvTrk, DIST_T * distR ) +{ + track_p trk = trvTrk->trk; + struct extraData *xx = GetTrkExtraData(trk); + DIST_T dist = *distR; + segProcData_t segProcData; + BOOL_T cornu_backwards= FALSE; + BOOL_T neg = FALSE; + DIST_T d = 10000; + coOrd pos1 = trvTrk->pos, pos2 = trvTrk->pos; + ANGLE_T a1,a2; + int inx, segInx = 0; + EPINX_T ep; + BOOL_T back; +LOG( log_traverseCornu, 1, ( "TravCornu-In [%0.3f %0.3f] A%0.3f D%0.3f \n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR )) + trkSeg_p segPtr = (trkSeg_p)xx->cornuData.arcSegs.ptr; + + a2 = GetAngleSegs( //Find correct Segment and nearest point in it + xx->cornuData.arcSegs.cnt,segPtr, + &pos2, &segInx, &d , &back , NULL, &neg); //d = how far pos2 from old pos2 = trvTrk->pos + + if ( d > 10 ) { + ErrorMessage( "traverseCornu: Position is not near track: %0.3f", d ); + return FALSE; //This means the input pos is not on or close to the track. + } + if (back) a2 = NormalizeAngle(a2+180); //If reverse segs - reverse angle + a1 = NormalizeAngle(a2-trvTrk->angle); //Establish if we are going fwds or backwards globally + if (a1<270 && a1>90) { //Must add 180 if the seg is reversed or inverted (but not both) + cornu_backwards = TRUE; + ep = 0; + } else { + cornu_backwards = FALSE; + ep = 1; + } + if (neg) { + cornu_backwards = !cornu_backwards; //Reversed direction + ep = 1-ep; + } + segProcData.traverse1.pos = pos2; //actual point on curve + segProcData.traverse1.angle = trvTrk->angle; //direction car is going for Traverse 1 +LOG( log_traverseCornu, 1, ( " TravCornu-GetSubA A%0.3f I%d N%d B%d CB%d\n", a2, segInx, neg, back, cornu_backwards )) + inx = segInx; + while (inx >=0 && inxcornuData.arcSegs.cnt) { + segPtr = (trkSeg_p)xx->cornuData.arcSegs.ptr+inx; //move in to the identified Bezier segment + SegProc( SEGPROC_TRAVERSE1, segPtr, &segProcData ); + BOOL_T backwards = segProcData.traverse1.backwards; //do we process this segment backwards? + BOOL_T reverse_seg = segProcData.traverse1.reverse_seg; //Info only + int BezSegInx = segProcData.traverse1.BezSegInx; //Which subSeg was it? + BOOL_T segs_backwards = segProcData.traverse1.segs_backwards; + + dist += segProcData.traverse1.dist; //Add in the part of the Bezier to get to pos + + segProcData.traverse2.dist = dist; //Set up Traverse2 + segProcData.traverse2.segDir = backwards; + segProcData.traverse2.BezSegInx = BezSegInx; + segProcData.traverse2.segs_backwards = segs_backwards; +LOG( log_traverseCornu, 2, ( " TravCornu-Tr1 SI%d D%0.3f B%d RS%d \n", BezSegInx, dist, backwards, reverse_seg ) ) + SegProc( SEGPROC_TRAVERSE2, segPtr, &segProcData ); //Angle at pos2 + if ( segProcData.traverse2.dist <= 0 ) { //-ve or zero distance left over so stop there + *distR = 0; + trvTrk->pos = segProcData.traverse2.pos; //Use finishing pos + trvTrk->angle = segProcData.traverse2.angle; //Use finishing angle +LOG( log_traverseCornu, 1, ( "TravCornu-Ex1 -> [%0.3f %0.3f] A%0.3f D%0.3f\n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR ) ) + return TRUE; + } + dist = segProcData.traverse2.dist; //How far left? + coOrd pos = segProcData.traverse2.pos; //Will always be at a Bezseg end + ANGLE_T angle = segProcData.traverse2.angle; //Angle of end therefore + + segProcData.traverse1.angle = angle; //Set up Traverse1 + segProcData.traverse1.pos = pos; + inx = cornu_backwards?inx-1:inx+1; //Here's where the global segment direction comes in +LOG( log_traverseCornu, 2, ( " TravCornu-Loop D%0.3f A%0.3f I%d \n", dist, angle, inx ) ) + } + //Ran out of Bez-Segs so punt to next Track + *distR = dist; //Tell caller what dist is left + + trvTrk->pos = GetTrkEndPos(trk,ep); //Which end were we heading for? + trvTrk->angle = NormalizeAngle(GetTrkEndAngle(trk, ep)+(cornu_backwards?180:0)); + trvTrk->trk = GetTrkEndTrk(trk,ep); //go onto next track (or NULL) + + if (trvTrk->trk==NULL) { + trvTrk->pos = pos1; + return TRUE; + } +LOG( log_traverseCornu, 1, ( "TravCornu-Ex2 --> [%0.3f %0.3f] A%0.3f D%0.3f\n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR ) ) + return TRUE; + +} + + +static BOOL_T EnumerateCornu( track_p trk ) +{ + + if (trk != NULL) { + struct extraData *xx = GetTrkExtraData(trk); + DIST_T d; + d = xx->cornuData.length; + ScaleLengthIncrement( GetTrkScale(trk), d ); + } + return TRUE; +} + +static BOOL_T MergeCornu( + track_p trk0, + EPINX_T ep0, + track_p trk1, + EPINX_T ep1 ) +{ + struct extraData *xx0 = GetTrkExtraData(trk0); + struct extraData *xx1 = GetTrkExtraData(trk1); + track_p trk_after,trk_before; + EPINX_T ep_before,ep_after=-1; + coOrd p[2]; + coOrd c[2]; + ANGLE_T a[2]; + DIST_T r[2]; + + + if (!IsTrack(trk0) || !IsTrack(trk1) ) return FALSE; + if (GetTrkType(trk0) != GetTrkType(trk1)) return FALSE; + if (GetEndPtConnectedToMe(trk0,trk1) != ep0) return FALSE; + if (GetEndPtConnectedToMe(trk1,trk0) != ep1) return FALSE; + + if (ep0 == ep1) + return FALSE; + + UndoStart( _("Merge Cornu"), "MergeCornu( T%d[%d] T%d[%d] )", GetTrkIndex(trk0), ep0, GetTrkIndex(trk1), ep1 ); + p[0] = xx0->cornuData.pos[0]; + p[1] = xx1->cornuData.pos[1]; + a[0] = xx0->cornuData.a[0]; + a[1] = xx1->cornuData.a[1]; + c[0] = xx0->cornuData.c[0]; + c[1] = xx1->cornuData.c[1]; + r[0] = xx0->cornuData.r[0]; + r[1] = xx1->cornuData.r[1]; + track_p trk3 = NewCornuTrack(p,c,a,r,NULL,0); + if (trk3==NULL) { + wBeep(); + InfoMessage(_("Cornu Create Failed for p1[%0.3f,%0.3f] p2[%0.3f,%0.3f], c1[%0.3f,%0.3f] c2[%0.3f,%0.3f], a1=%0.3f a2=%0.3f, r1=%s r2=%s"), + p[0].x,p[0].y, + p[1].x,p[1].y, + c[0].x,c[0].y, + c[1].x,c[1].y, + a[0],a[1], + FormatDistance(r[0]),FormatDistance(r[1])); + UndoEnd(); + return FALSE; + } + + UndoModify( trk0 ); + UndoModify( trk1 ); + UndrawNewTrack( trk0 ); + UndrawNewTrack( trk1 ); + trk_after = GetTrkEndTrk( trk1, 1-ep1 ); + if (trk_after) { + ep_after = GetEndPtConnectedToMe( trk_after, trk1 ); + DisconnectTracks( trk1, 1-ep1, trk_after, ep_after ); + } + trk_before = GetTrkEndTrk( trk0, 1-ep0 ); + if (trk_before) { + ep_before = GetEndPtConnectedToMe( trk_before, trk0 ); + DisconnectTracks( trk0, 1-ep1, trk_before, ep_before ); + } + + DeleteTrack( trk1, TRUE ); + DeleteTrack( trk0, TRUE ); + if (trk_after) { + SetTrkEndPoint( trk_after, ep_after, xx0->cornuData.pos[1], NormalizeAngle(xx0->cornuData.a[1]+180)); + ConnectTracks( trk3, 1, trk_after, ep_after); + } + if (trk_before) { + SetTrkEndPoint( trk_before, ep_before, xx0->cornuData.pos[0], NormalizeAngle(xx0->cornuData.a[0]+180)); + ConnectTracks( trk3, 0, trk_before, ep_before); + } + DrawNewTrack( trk3 ); + UndoEnd(); + + + return TRUE; +} + +BOOL_T GetBezierSegmentsFromCornu(track_p trk, dynArr_t * segs) { + struct extraData * xx = GetTrkExtraData(trk); + for (int i=0;icornuData.arcSegs.cnt;i++) { + DYNARR_APPEND(trkSeg_t, * segs, 10); + trkSeg_p segPtr = &DYNARR_N(trkSeg_t,* segs,segs->cnt-1); + segPtr->type = SEG_BEZTRK; + segPtr->color = wDrawColorBlack; + segPtr->width = 0; + if (segPtr->bezSegs.ptr) MyFree(segPtr->bezSegs.ptr); + segPtr->bezSegs.cnt = 0; + segPtr->bezSegs.max = 0; + segPtr->bezSegs.ptr = NULL; + trkSeg_p p = (trkSeg_t *) xx->cornuData.arcSegs.ptr+i; + for (int j=0;j<4;j++) segPtr->u.b.pos[j] = p->u.b.pos[j]; + FixUpBezierSeg(segPtr->u.b.pos,segPtr,TRUE); + } + return TRUE; +} + +static DIST_T GetLengthCornu( track_p trk ) +{ + struct extraData *xx = GetTrkExtraData(trk); + DIST_T length = 0.0; + segProcData_t segProcData; + for(int i=0;icornuData.arcSegs.cnt;i++) { + trkSeg_t seg = DYNARR_N(trkSeg_t,xx->cornuData.arcSegs,i); + if (seg.type == SEG_FILCRCL) continue; + SegProc(SEGPROC_LENGTH, &seg, &segProcData); + length += segProcData.length.length; + } + return length; +} + + +static BOOL_T GetParamsCornu( int inx, track_p trk, coOrd pos, trackParams_t * params ) +{ + int segInx, segInx2; + BOOL_T back, negative; + DIST_T d; + struct extraData *xx = GetTrkExtraData(trk); + params->type = curveTypeCornu; + params->track_angle = GetAngleSegs( //Find correct Segment and nearest point in it + xx->cornuData.arcSegs.cnt,xx->cornuData.arcSegs.ptr, + &pos, &segInx, &d , &back, &segInx2, &negative ); + trkSeg_p segPtr = &DYNARR_N(trkSeg_t,xx->cornuData.arcSegs,segInx); + if (negative != back) params->track_angle = NormalizeAngle(params->track_angle+180); //Cornu is in reverse + if (segPtr->type == SEG_STRTRK) { + params->arcR = 0.0; + } else if (segPtr->type == SEG_CRVTRK) { + params->arcR = fabs(segPtr->u.c.radius); + params->arcP = segPtr->u.c.center; + params->arcA0 = segPtr->u.c.a0; + params->arcA1 = segPtr->u.c.a1; + } else if (segPtr->type == SEG_BEZTRK) { + trkSeg_p segPtr2 = &DYNARR_N(trkSeg_t,segPtr->bezSegs,segInx2); + if (segPtr2->type == SEG_STRTRK) { + params->arcR = 0.0; + } else if (segPtr2->type == SEG_CRVTRK) { + params->arcR = fabs(segPtr2->u.c.radius); + params->arcP = segPtr2->u.c.center; + params->arcA0 = segPtr2->u.c.a0; + params->arcA1 = segPtr2->u.c.a1; + } + } + for (int i=0;i<2;i++) { + params->cornuEnd[i] = xx->cornuData.pos[i]; + params->cornuAngle[i] = xx->cornuData.a[i]; + params->cornuRadius[i] = xx->cornuData.r[i]; + params->cornuCenter[i] = xx->cornuData.c[i]; + } + params->len = xx->cornuData.length; + if ( inx == PARAMS_PARALLEL ) { + params->ep = 0; + } else if (inx == PARAMS_CORNU) { + params->ep = PickEndPoint( pos, trk); + } else { + params->ep = PickUnconnectedEndPointSilent( pos, trk ); + } + if (params->ep>=0) { + params->angle = GetTrkEndAngle(trk,params->ep); + } + + return TRUE; + +} + + + +static BOOL_T QueryCornu( track_p trk, int query ) +{ + struct extraData * xx = GetTrkExtraData(trk); + switch ( query ) { + case Q_CAN_GROUP: + return FALSE; + break; + case Q_FLIP_ENDPTS: + case Q_HAS_DESC: + return TRUE; + break; + case Q_EXCEPTION: + return xx->cornuData.minCurveRadius < (GetLayoutMinTrackRadius()-EPSILON); + break; + case Q_IS_CORNU: + return TRUE; + break; + case Q_ISTRACK: + return TRUE; + break; + case Q_CAN_PARALLEL: + return TRUE; + break; + // case Q_MODIFY_CANT_SPLIT: Remove Split Restriction + // case Q_CANNOT_BE_ON_END: Remove Restriction - Can have Cornu with no ends + case Q_CANNOT_PLACE_TURNOUT: + return TRUE; + break; + case Q_IGNORE_EASEMENT_ON_EXTEND: + return TRUE; + break; + case Q_MODIFY_CAN_SPLIT: + case Q_CAN_EXTEND: + return TRUE; + default: + return FALSE; + } +} + + +static void FlipCornu( + track_p trk, + coOrd orig, + ANGLE_T angle ) +{ + struct extraData * xx = GetTrkExtraData(trk); + FlipPoint( &xx->cornuData.pos[0], orig, angle ); + FlipPoint( &xx->cornuData.pos[1], orig, angle ); + FlipPoint( &xx->cornuData.c[0], orig, angle); + FlipPoint( &xx->cornuData.c[1], orig, angle); + xx->cornuData.a[0] = NormalizeAngle( 2*angle - xx->cornuData.a[0] ); + xx->cornuData.a[1] = NormalizeAngle( 2*angle - xx->cornuData.a[1] ); + + RebuildCornu(trk); + +} + +static ANGLE_T GetAngleCornu( + track_p trk, + coOrd pos, + EPINX_T * ep0, + EPINX_T * ep1 ) +{ + struct extraData * xx = GetTrkExtraData(trk); + ANGLE_T angle; + BOOL_T back, neg; + int indx; + angle = GetAngleSegs( xx->cornuData.arcSegs.cnt, (trkSeg_p)xx->cornuData.arcSegs.ptr, &pos, &indx, NULL, &back, NULL, &neg ); + if ( ep0 ) *ep0 = -1; + if ( ep1 ) *ep1 = -1; + return angle; +} + +BOOL_T GetCornuSegmentFromTrack(track_p trk, trkSeg_p seg_p) { + //TODO If we support Group + return TRUE; +} + + +static BOOL_T MakeParallelCornu( + track_p trk, + coOrd pos, + DIST_T sep, + track_p * newTrkR, + coOrd * p0R, + coOrd * p1R ) +{ + struct extraData * xx = GetTrkExtraData(trk); + coOrd np[4], p, nc[2]; + ANGLE_T atrk, diff_a, na[2]; + DIST_T nr[2]; + + + //Produce cornu that is translated parallel to the existing Cornu + // - not a precise result if the cornu end angles are not in the same general direction. + // The expectation is that the user will have to adjust it - unless and until we produce + // a new algo to adjust the control points to be parallel to the endpoints. + + p = pos; + DistanceCornu(trk, &p); //Find nearest point on curve + atrk = GetAngleSegs(xx->cornuData.arcSegs.cnt,(trkSeg_t *)(xx->cornuData.arcSegs.ptr),&p,NULL,NULL,NULL,NULL, NULL); + diff_a = NormalizeAngle(FindAngle(pos,p)-atrk); //we know it will be +/-90... + //find parallel move x and y for points + BOOL_T above = FALSE; + if ( diff_a < 180 ) above = TRUE; //Above track + if (xx->cornuData.a[0] <180) above = !above; + Translate(&np[0],xx->cornuData.pos[0],xx->cornuData.a[0]+(above?90:-90),sep); + Translate(&np[1],xx->cornuData.pos[1],xx->cornuData.a[1]+(above?-90:90),sep); + na[0]=xx->cornuData.a[0]; + na[1]=xx->cornuData.a[1]; + if (xx->cornuData.r[0]) { + //Find angle between center and end angle of track + ANGLE_T ea0 = + NormalizeAngle(FindAngle(xx->cornuData.c[0],xx->cornuData.pos[0])-xx->cornuData.a[0]); + DIST_T sep0 = sep; + if (ea0>180) sep0 = -sep; + nr[0]=xx->cornuData.r[0]+(above?sep0:-sep0); //Needs adjustment + nc[0]=xx->cornuData.c[0]; + } else { + nr[0] = 0; + nc[0] = zero; + } + + if (xx->cornuData.r[1]) { + ANGLE_T ea1 = + NormalizeAngle(FindAngle(xx->cornuData.c[1],xx->cornuData.pos[1])-xx->cornuData.a[1]); + DIST_T sep1 = sep; + if (ea1<180) sep1 = -sep; + nr[1]=xx->cornuData.r[1]+(above?sep1:-sep1); //Needs adjustment + nc[1]=xx->cornuData.c[1]; + } else { + nr[1] = 0; + nc[1] = zero; + } + + if ( newTrkR ) { + *newTrkR = NewCornuTrack( np, nc, na, nr, NULL, 0); + if (*newTrkR==NULL) { + wBeep(); + InfoMessage(_("Cornu Create Failed for p1[%0.3f,%0.3f] p2[%0.3f,%0.3f], c1[%0.3f,%0.3f] c2[%0.3f,%0.3f], a1=%0.3f a2=%0.3f, r1=%s r2=%s"), + np[0].x,np[0].y, + np[1].x,np[1].y, + nc[0].x,nc[0].y, + nc[1].x,nc[1].y, + na[0],na[1], + FormatDistance(nr[0]),FormatDistance(nr[1])); + return FALSE; + } + + } else { + tempSegs_da.cnt = 0; + CallCornu0(np,nc,na,nr,&tempSegs_da,FALSE); + } + if ( p0R ) *p0R = np[0]; + if ( p1R ) *p1R = np[1]; + return TRUE; +} + +/* + * When an undo is run, the array of segs is missing - they are not saved to the Undo log. So Undo calls this routine to + * ensure + * - that the Segs are restored and + * - other fields reset. + */ +EXPORT BOOL_T RebuildCornu (track_p trk) +{ + struct extraData *xx; + xx = GetTrkExtraData(trk); + xx->cornuData.arcSegs.max = 0; + xx->cornuData.arcSegs.cnt = 0; + //if (xx->cornuData.arcSegs.ptr) MyFree(xx->cornuData.arcSegs.ptr); + xx->cornuData.arcSegs.ptr = NULL; + if (!FixUpCornu0(xx->cornuData.pos,xx->cornuData.c,xx->cornuData.a,xx->cornuData.r, xx)) return FALSE; + ComputeCornuBoundingBox(trk, xx); + return TRUE; +} + + +static trackCmd_t cornuCmds = { + "CORNU", + DrawCornu, + DistanceCornu, + DescribeCornu, + DeleteCornu, + WriteCornu, + ReadCornu, + MoveCornu, + RotateCornu, + RescaleCornu, + NULL, + GetAngleCornu, + SplitCornu, + TraverseCornu, + EnumerateCornu, + NULL, /* redraw */ + NULL, /* trim */ + MergeCornu, + NULL, /* modify */ + GetLengthCornu, + GetParamsCornu, + MoveCornuEndPt, /* Move EndPt */ + QueryCornu, + NULL, /* ungroup */ + FlipCornu, + NULL, + NULL, + NULL, + MakeParallelCornu, + NULL, + RebuildCornu + }; + + + + + +/**************************************** + * + * GRAPHICS COMMANDS + * + */ + + + + +track_p NewCornuTrack(coOrd pos[2], coOrd center[2],ANGLE_T angle[2], DIST_T radius[2], trkSeg_t * tempsegs, int count) +{ + struct extraData *xx; + track_p p; + p = NewTrack( 0, T_CORNU, 2, sizeof *xx ); + xx = GetTrkExtraData(p); + xx->cornuData.pos[0] = pos[0]; + xx->cornuData.pos[1] = pos[1]; + xx->cornuData.a[0] = angle[0]; + xx->cornuData.a[1] = angle[1]; + xx->cornuData.r[0] = radius[0]; + xx->cornuData.r[1] = radius[1]; + xx->cornuData.c[0] = center[0]; + xx->cornuData.c[1] = center[1]; + + if (!FixUpCornu0(xx->cornuData.pos,xx->cornuData.c,xx->cornuData.a,xx->cornuData.r, xx)) { + ErrorMessage("Create Cornu Failed"); + return NULL; + } +LOG( log_cornu, 1, ( "NewCornuTrack( EP1 %0.3f, %0.3f, EP2 %0.3f, %0.3f ) = %d\n", pos[0].x, pos[0].y, pos[1].x, pos[1].y, GetTrkIndex(p) ) ) + ComputeCornuBoundingBox( p, xx ); + SetTrkEndPoint( p, 0, pos[0], xx->cornuData.a[0]); + SetTrkEndPoint( p, 1, pos[1], xx->cornuData.a[1]); + CheckTrackLength( p ); + SetTrkBits( p, TB_HIDEDESC ); + return p; +} + + +EXPORT void InitTrkCornu( void ) +{ + T_CORNU = InitObject( &cornuCmds ); + log_cornu = LogFindIndex( "Cornu" ); + log_traverseCornu = LogFindIndex( "traverseCornu" ); +} + diff --git a/app/bin/tcornu.h b/app/bin/tcornu.h new file mode 100644 index 0000000..c41d381 --- /dev/null +++ b/app/bin/tcornu.h @@ -0,0 +1,66 @@ +/* + * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/tcornu.h,v 1.1 2005-12-07 15:47:36 rc-flyer Exp $ + */ + +/* XTrkCad - Model Railroad CAD + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ +typedef struct { + coOrd pos[2]; + coOrd c[2]; + ANGLE_T a[2]; + DIST_T r[2]; + DIST_T minCurveRadius; + DIST_T maxRateofChange; + DIST_T length; + ANGLE_T windingAngle; + dynArr_t arcSegs; + coOrd descriptionOff; + char * cornuPath; + } cornuData_t; + +typedef struct { + coOrd pos[2]; //All values for end if trk[end] = NULL + DIST_T radius[2]; //0.0 if straight + ANGLE_T angle[2]; //Set if straight + coOrd center[2]; //Set if radius >0 + } cornuParm_t; + + +double CornuMaxCurve(coOrd[2],ANGLE_T[2],DIST_T[2]); +double BezierMathMinRadius(coOrd[4]); +coOrd BezierMathFindNearestPoint(coOrd *, coOrd[4] , int ); +track_p NewCornuTrack(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T radius[2], trkSeg_t * tempsegs, int count); +DIST_T CornuDistance( coOrd *, coOrd[2], ANGLE_T[2], DIST_T[2], trkSeg_t * ,int , double * ); +BOOL_T FixUpCornu(coOrd pos[2], track_p [2], EPINX_T ep[2], struct extraData* xx); +BOOL_T FixUpCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T radius[2], struct extraData* xx); +BOOL_T GetCornuSegmentsFromTrack(track_p, trkSeg_p); +BOOL_T SetCornuEndPt(track_p trk, EPINX_T inx, coOrd pos, coOrd center, ANGLE_T angle, DIST_T radius); +BOOL_T RebuildCornu (track_p trk); + +STATUS_T CornuDescriptionMove(track_p trk,wAction_t action,coOrd pos ); +DIST_T CornuDescriptionDistance(coOrd pos,track_p trk ); + + +BOOL_T CallCornu(coOrd[2],track_p[2],EPINX_T[2],dynArr_t *,cornuParm_t *); +BOOL_T CallCornu0(coOrd[2], coOrd[2], ANGLE_T[2], DIST_T[2], dynArr_t *,BOOL_T); + +BOOL_T GetBezierSegmentsFromCornu(track_p, dynArr_t *); + +char * CreateSegPathList(track_p trk); + + + diff --git a/app/bin/tcurve.c b/app/bin/tcurve.c index 7e9fc90..7233ebf 100644 --- a/app/bin/tcurve.c +++ b/app/bin/tcurve.c @@ -1,8 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/tcurve.c,v 1.3 2009-06-15 19:29:57 m_fischer Exp $ - * +/** \file tcurve.c * CURVE - * */ /* XTrkCad - Model Railroad CAD @@ -23,11 +20,20 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include +#include + #include "ccurve.h" -#include "cstraigh.h" #include "cjoin.h" +#include "cstraigh.h" +#include "cundo.h" +#include "fileio.h" #include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" static TRKTYP_T T_CURVE = -1; @@ -43,6 +49,7 @@ struct extraData { #define xcircle extraData->circle static int log_curve = 0; +static int log_curveSegs = 0; static DIST_T GetLengthCurve( track_p ); @@ -261,26 +268,28 @@ STATUS_T CurveDescriptionMove( coOrd pos ) { struct extraData *xx = GetTrkExtraData(trk); - static coOrd p0; + static coOrd p0,p1; + static BOOL_T editMode; wDrawColor color; ANGLE_T a, a0, a1; DIST_T d; + p0 = xx->pos; + switch (action) { case C_DOWN: case C_MOVE: case C_UP: + editMode = TRUE; color = GetTrkColor( trk, &mainD ); - DrawCurveDescription( trk, &tempD, color ); if ( xx->helixTurns > 0 ) { - if (action != C_DOWN) - DrawLine( &tempD, xx->pos, p0, 0, wDrawColorBlack ); xx->descriptionOff.x = (pos.x-xx->pos.x); xx->descriptionOff.y = (pos.y-xx->pos.y); - p0 = pos; + p1 = pos; if (action != C_UP) - DrawLine( &tempD, xx->pos, p0, 0, wDrawColorBlack ); + DrawLine( &tempD, p0, p1, 0, wDrawColorBlack ); } else { + p1 = pos; GetCurveAngles( &a0, &a1, trk ); if ( a1 < 1 ) a1 = 1.0; a = FindAngle( xx->pos, pos ); @@ -301,14 +310,18 @@ STATUS_T CurveDescriptionMove( if ( d < 0.1 ) d = 0.1; xx->descriptionOff.y = d * 2.0 - 1.0; + GetCurveAngles( &a0, &a1, trk ); + a = a0 + (0.5 * a1); + PointOnCircle( &p0, xx->pos, xx->radius/2, a ); } - DrawCurveDescription( trk, &tempD, color ); - MainRedraw(); + if (action == C_UP) editMode = FALSE; + MainRedraw(); + MapRedraw(); return action==C_UP?C_TERMINATE:C_CONTINUE; case C_REDRAW: - if ( xx->helixTurns > 0 ) { - DrawLine( &tempD, xx->pos, p0, 0, wDrawColorBlack ); + if (editMode) { + DrawLine( &tempD, p1, p0, 0, wDrawColorBlack ); } break; @@ -335,15 +348,15 @@ static struct { ANGLE_T angle; FLOAT_T grade; descPivot_t pivot; - LAYER_T layerNumber; + unsigned int layerNumber; } crvData; typedef enum { E0, Z0, E1, Z1, CE, RA, TU, SE, LN, AL, A1, A2, GR, PV, LY } crvDesc_e; static descData_t crvDesc[] = { -/*E0*/ { DESC_POS, N_("End Pt 1: X"), &crvData.endPt[0] }, +/*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &crvData.endPt[0] }, /*Z0*/ { DESC_DIM, N_("Z"), &crvData.elev[0] }, -/*E1*/ { DESC_POS, N_("End Pt 2: X"), &crvData.endPt[1] }, +/*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &crvData.endPt[1] }, /*Z1*/ { DESC_DIM, N_("Z"), &crvData.elev[1] }, -/*CE*/ { DESC_POS, N_("Center: X"), &crvData.center }, +/*CE*/ { DESC_POS, N_("Center: X,Y"), &crvData.center }, /*RA*/ { DESC_DIM, N_("Radius"), &crvData.radius }, /*TU*/ { DESC_LONG, N_("Turns"), &crvData.turns }, /*SE*/ { DESC_DIM, N_("Separation"), &crvData.separation }, @@ -380,6 +393,10 @@ static void UpdateCurve( track_p trk, int inx, descData_p descUpd, BOOL_T final ErrorMessage( MSG_RADIUS_GTR_0 ); crvData.radius = xx0.radius; crvDesc[RA].mode |= DESC_CHANGE; + } else if (crvData.radius > 10000) { + ErrorMessage( MSG_RADIUS_GTR_10000 ); + crvData.radius = xx0.radius; + crvDesc[RA].mode |= DESC_CHANGE; } else { if ( crvData.pivot == DESC_PIVOT_FIRST || GetTrkEndTrk(trk,0) ) { Translate( &xx0.pos, xx0.pos, a0, xx0.radius-crvData.radius ); @@ -1164,6 +1181,10 @@ static BOOL_T GetParamsCurve( int inx, track_p trk, coOrd pos, trackParams_t * p params->type = curveTypeCurve; GetTrkCurveCenter( trk, ¶ms->arcP, ¶ms->arcR); GetCurveAngles( ¶ms->arcA0, ¶ms->arcA1, trk ); + ANGLE_T angle1 = FindAngle(params->arcP,pos); + + params->track_angle = NormalizeAngle(FindAngle(params->arcP,pos)+90); + if ( easeR > 0.0 && params->arcR < easeR ) { ErrorMessage( MSG_RADIUS_LSS_EASE_MIN, FormatDistance( params->arcR ), FormatDistance( easeR ) ); @@ -1184,12 +1205,20 @@ static BOOL_T GetParamsCurve( int inx, track_p trk, coOrd pos, trackParams_t * p params->arcA1 = 360.0; } } else { - if ( IsCurveCircle( trk ) ) + params->circleOrHelix = FALSE; + if ( IsCurveCircle( trk ) ) { params->ep = PickArcEndPt( params->arcP, /*Dj.inp[0].*/pos, pos ); - else - params->ep = PickUnconnectedEndPoint( pos, trk ); + params->angle = params->track_angle; + params->circleOrHelix = TRUE; + return TRUE; + } else if (inx == PARAMS_CORNU ) { + params->ep = PickEndPoint(pos, trk); + } else { + params->ep = PickUnconnectedEndPointSilent( pos, trk ); + } if (params->ep == -1) return FALSE; + params->angle = GetTrkEndAngle(trk,params->ep); ; } return TRUE; } @@ -1224,11 +1253,27 @@ static BOOL_T QueryCurve( track_p trk, int query ) case Q_FLIP_ENDPTS: case Q_ISTRACK: case Q_HAS_DESC: + case Q_CORNU_CAN_MODIFY: + case Q_MODIFY_CAN_SPLIT: return TRUE; + break; case Q_EXCEPTION: - return xx->radius < minTrackRadius; + return xx->radius < GetLayoutMinTrackRadius() - EPSILON; + break; case Q_NOT_PLACE_FROGPOINTS: return IsCurveCircle( trk ); + break; + //case Q_CAN_EXTEND: + // if (xx->helixTurns > 0) return FALSE; + // return TRUE; + // break; + case Q_CANNOT_PLACE_TURNOUT: + return (xx->helixTurns > 0); + break; + case Q_HAS_VARIABLE_ENDPOINTS: + if ((xx->helixTurns >0) || xx->circle) return TRUE; + return FALSE; + break; default: return FALSE; } @@ -1337,38 +1382,61 @@ EXPORT void CurveSegProc( case SEGPROC_TRAVERSE1: a1 = FindAngle( segPtr->u.c.center, data->traverse1.pos ); - a1 += (segPtr->u.c.radius>0?90.0:-90.0); - a2 = NormalizeAngle( data->traverse1.angle+a1 ); - data->traverse1.backwards = (a2 < 270 && a2 > 90 ); + a1 = NormalizeAngle(a1+90); // ClockWise angle + // work out within this segment which way we are going + a2 = NormalizeAngle( a1 - data->traverse1.angle ); + data->traverse1.backwards = ((a2 < 270) && (a2 > 90 )); + //Find angular distance from end opposite to direction of travel a2 = FindAngle( segPtr->u.c.center, data->traverse1.pos ); - if ( data->traverse1.backwards == (segPtr->u.c.radius<0) ) { - a2 = NormalizeAngle( a2-segPtr->u.c.a0 ); + //A segment may be fractionally too short - limit to angles within segment! + int res = AngleInRange(a2,segPtr->u.c.a0,segPtr->u.c.a1); + if (res == 1 ) { +LOG( log_curveSegs, 1, ("CrvSegsAngle miss A%0.3f S%0.3f E%0.3f R%d B%d \n",a2,segPtr->u.c.a0,segPtr->u.c.a1,res,data->traverse1.backwards)) + a2 = segPtr->u.c.a0; + } else if (res == -1) { +LOG( log_curveSegs, 1, ("CrvSegsAngle miss A%0.3f S%0.3f E%0.3f R%d B%d \n",a2,segPtr->u.c.a0,segPtr->u.c.a1,res,data->traverse1.backwards)) + a2 = segPtr->u.c.a1+segPtr->u.c.a0; + } + //Fix issue of angles passing through zero - + if ( !data->traverse1.backwards ) { + a2 = NormalizeAngle(DifferenceBetweenAngles(segPtr->u.c.a0,a2)); } else { - a2 = NormalizeAngle( segPtr->u.c.a0+segPtr->u.c.a1-a2 ); + a2 = NormalizeAngle(DifferenceBetweenAngles(a2,segPtr->u.c.a0+segPtr->u.c.a1)); } - data->traverse1.dist = a2/360.0*2*M_PI*fabs(segPtr->u.c.radius); + + //Make sure backwards means going towards EP0 + if (segPtr->u.c.radius<0) data->traverse1.backwards = !data->traverse1.backwards; + data->traverse1.dist = a2/360.0*2*M_PI*fabs(segPtr->u.c.radius); //Distance from end in direction of travel + data->traverse1.reverse_seg = ((segPtr->u.c.a0>=90) && (segPtr->u.c.a0<270)); + data->traverse1.negative = (segPtr->u.c.radius < 0); + data->traverse1.segs_backwards = FALSE; + data->traverse1.BezSegInx = 0; +LOG( log_curveSegs, 2, (" CrvSegs D=%0.3f A%0.3f B%d \n",data->traverse1.dist,data->traverse1.backwards)) break; case SEGPROC_TRAVERSE2: circum = 2*M_PI*segPtr->u.c.radius; if ( circum < 0 ) circum = - circum; - d = segPtr->u.c.a1/360.0*circum; + d = (segPtr->u.c.a1*circum)/360; if ( d > data->traverse2.dist ) { - a2 = (data->traverse2.dist)/circum*360.0; - if ( data->traverse2.segDir == (segPtr->u.c.radius<0) ) { - a2 = NormalizeAngle( segPtr->u.c.a0+a2 ); - a1 = a2+90; - } else { - a2 = NormalizeAngle( segPtr->u.c.a0+segPtr->u.c.a1-a2 ); - a1 = a2-90; - } - PointOnCircle( &data->traverse2.pos, segPtr->u.c.center, fabs(segPtr->u.c.radius), a2 ); + a2 = (data->traverse2.dist*360.0)/circum; data->traverse2.dist = 0; - data->traverse2.angle = a1; } else { + a2 = segPtr->u.c.a1; data->traverse2.dist -= d; } + if (segPtr->u.c.radius<0) data->traverse2.segDir = !data->traverse2.segDir; + if ( !data->traverse2.segDir ) { + a2 = NormalizeAngle( segPtr->u.c.a0+a2 ); + a1 = NormalizeAngle(a2+90); + } else { + a2 = NormalizeAngle( segPtr->u.c.a0+segPtr->u.c.a1-a2 ); + a1 = NormalizeAngle(a2-90); + } + PointOnCircle( &data->traverse2.pos, segPtr->u.c.center, fabs(segPtr->u.c.radius), a2 ); + data->traverse2.angle = a1; + break; case SEGPROC_DRAWROADBEDSIDE: @@ -1429,8 +1497,14 @@ EXPORT void CurveSegProc( data->split.newSeg[s1].u.c.a1 -= a2; break; + case SEGPROC_GETANGLE: - data->getAngle.angle = NormalizeAngle( FindAngle( data->getAngle.pos, segPtr->u.c.center ) + 90 ); + data->getAngle.angle = NormalizeAngle( FindAngle( segPtr->u.c.center, data->getAngle.pos ) + 90 ); + data->getAngle.negative_radius = segPtr->u.c.radius<0; + data->getAngle.radius = fabs(segPtr->u.c.radius); + data->getAngle.center = segPtr->u.c.center; + data->getAngle.backwards = segPtr->u.c.a0>=90 && segPtr->u.c.a0<270; + if (data->getAngle.backwards) data->getAngle.angle = NormalizeAngle(data->getAngle.angle+180); break; } } @@ -1457,13 +1531,14 @@ EXPORT void PlotCurve( coOrd posx; switch ( mode ) { + case crvCmdFromCornu: case crvCmdFromEP1: angle = FindAngle( pos0, pos1 ); d0 = FindDistance( pos0, pos2 )/2.0; a0 = FindAngle( pos0, pos2 ); a1 = NormalizeAngle( a0 - angle ); LOG( log_curve, 3, ( "P1 = [%0.3f %0.3f] D=%0.3f A0=%0.3f A1=%0.3f\n", pos2.x, pos2.y, d0, a0, a1 ) ) - if (fabs(d0*sin(D2R(a1))) < (4.0/75.0)*mainD.scale) { + if ((fabs(d0*sin(D2R(a1))) < (4.0/75.0)*mainD.scale) & (mode == crvCmdFromEP1)) { LOG( log_curve, 3, ( "Straight: %0.3f < %0.3f\n", d0*sin(D2R(a1)), (4.0/75.0)*mainD.scale ) ) curveData->pos1.x = pos0.x + d0*2.0*sin(D2R(angle)); curveData->pos1.y = pos0.y + d0*2.0*cos(D2R(angle)); @@ -1485,7 +1560,7 @@ LOG( log_curve, 3, ( "Straight: %0.3f < %0.3f\n", d0*sin(D2R(a1)), (4.0/75.0)*ma else curveData->curveRadius = d0/sin(D2R(-a1)); } - if (curveData->curveRadius > 1000) { + if (curveData->curveRadius > 1000 && mode == crvCmdFromEP1) { LOG( log_curve, 3, ( "Straight %0.3f > 1000\n", curveData->curveRadius ) ) curveData->pos1.x = pos0.x + d0*2.0*sin(D2R(angle)); curveData->pos1.y = pos0.y + d0*2.0*cos(D2R(angle)); @@ -1498,9 +1573,11 @@ LOG( log_curve, 3, ( "Straight: %0.3f < %0.3f\n", d0*sin(D2R(a1)), (4.0/75.0)*ma if (a1 > 0.0) { curveData->a0 = NormalizeAngle( a2-180 ); curveData->a1 = a1 * 2.0; + curveData->negative = FALSE; } else { curveData->a1 = (-a1) * 2.0; curveData->a0 = NormalizeAngle( a2-180-curveData->a1 ); + curveData->negative = TRUE; } curveData->type = curveTypeCurve; } @@ -1551,9 +1628,11 @@ LOG( log_curve, 3, ( "Straight: %0.3f < %0.3f\n", d0*sin(D2R(a1)), (4.0/75.0)*ma if ( r > 0 ) { curveData->a0 = a0; curveData->a1 = NormalizeAngle(a1-a0); + curveData->negative = FALSE; } else { curveData->a0 = a1; curveData->a1 = NormalizeAngle(a0-a1); + curveData->negative = TRUE; } curveData->type = curveTypeCurve; break; @@ -1584,4 +1663,5 @@ EXPORT void InitTrkCurve( void ) { T_CURVE = InitObject( &curveCmds ); log_curve = LogFindIndex( "curve" ); + log_curveSegs = LogFindIndex( "curveSegs"); } diff --git a/app/bin/tease.c b/app/bin/tease.c index 3667fe1..ad281df 100644 --- a/app/bin/tease.c +++ b/app/bin/tease.c @@ -1,8 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/tease.c,v 1.2 2008-01-20 23:29:15 mni77 Exp $ - * +/** \file tease.c * TRANSISTION-CURVES (JOINTS) - * */ /* XTrkCad - Model Railroad CAD @@ -63,12 +60,20 @@ For a better representation of this, build 'testjoin' and do 'testjoin psplot 10 10 40 1 | lpr -Ppostscript' */ +#include -#include "track.h" #include "ccurve.h" +#include "cselect.h" #include "cstraigh.h" #include "cjoin.h" +#include "cundo.h" +#include "fileio.h" #include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" static TRKTYP_T T_EASEMENT = -1; @@ -404,7 +409,7 @@ static track_p NewJoint( static coOrd qZero = { 0.0, 0.0 }; ANGLE_T az0, a01, b, b01, b1, d, d1; trk = NewTrack( 0, T_EASEMENT, 2, sizeof *xx ); - SetTrkScale( trk, curScaleInx ); + SetTrkScale( trk, GetLayoutCurScale() ); xx = GetTrkExtraData( trk ); SetTrkEndPoint( trk, 0, pos0, NormalizeAngle(angle0+180.0) ); SetTrkEndPoint( trk, 1, pos1, NormalizeAngle(angle1+180.0) ); @@ -491,15 +496,15 @@ static struct { DIST_T l1; FLOAT_T grade; descPivot_t pivot; - LAYER_T layerNumber; + unsigned int layerNumber; } jointData; typedef enum { E0, Z0, E1, Z1, OR, AL, RR, LL, L0, L1, GR, PV, LY } jointDesc_e; static descData_t jointDesc[] = { -/*E0*/ { DESC_POS, N_("End Pt 1: X"), &jointData.endPt[0] }, +/*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &jointData.endPt[0] }, /*Z0*/ { DESC_DIM, N_("Z"), &jointData.elev[0] }, -/*E1*/ { DESC_POS, N_("End Pt 2: X"), &jointData.endPt[1] }, +/*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &jointData.endPt[1] }, /*Z1*/ { DESC_DIM, N_("Z"), &jointData.elev[1] }, -/*OR*/ { DESC_POS, N_("Origin: X"), &jointData.orig }, +/*OR*/ { DESC_POS, N_("Origin: X,Y"), &jointData.orig }, /*AL*/ { DESC_ANGLE, N_("Angle"), &jointData.angle }, /*RR*/ { DESC_DIM, N_("R"), &jointData.r }, /*LL*/ { DESC_DIM, N_("L"), &jointData.l }, @@ -1289,7 +1294,7 @@ static BOOL_T MergeJoint( static BOOL_T GetParamsJoint( int inx, track_p trk, coOrd pos, trackParams_t * params ) { params->type = curveTypeStraight; - params->ep = PickUnconnectedEndPoint( pos, trk ); + params->ep = PickUnconnectedEndPointSilent( pos, trk ); if (params->ep == -1) return FALSE; params->lineOrig = GetTrkEndPos(trk,params->ep); @@ -1516,8 +1521,11 @@ EXPORT void JointSegProc( else data->traverse1.dist = JoinD( segPtr->u.j.l1, segPtr->u.j.R, segPtr->u.j.L ) + JoinD( l, segPtr->u.j.R, segPtr->u.j.L ); } - if ( segPtr->u.j.flip ) + data->traverse1.reverse_seg = FALSE; + if ( segPtr->u.j.flip ) { data->traverse1.backwards = !data->traverse1.backwards; + data->traverse1.reverse_seg = TRUE; + } LOG( log_traverseJoint, 1, ( "TJ0: ?[%0.3f %0.3f] A=%0.3f l=%0.3f J[%0.3f %0.3f] A=%0.3f l0=%0.3f l1=%0.3f R=%0.3f L=%0.3f N:%d F:%d S:%d = a=%0.3f D=%0.3f B=%d\n", data->traverse1.pos.x, data->traverse1.pos.y, data->traverse1.angle, l, @@ -1525,6 +1533,9 @@ LOG( log_traverseJoint, 1, ( "TJ0: ?[%0.3f %0.3f] A=%0.3f l=%0.3f J[%0.3f %0.3f] segPtr->u.j.l0, segPtr->u.j.l1, segPtr->u.j.R, segPtr->u.j.L, segPtr->u.j.negate, segPtr->u.j.flip, segPtr->u.j.Scurve, a, data->traverse1.dist, data->traverse1.backwards ) ); + data->traverse1.negative = FALSE; + data->traverse1.BezSegInx = 0; + data->traverse1.segs_backwards = FALSE; break; case SEGPROC_TRAVERSE2: @@ -1632,6 +1643,7 @@ LOG( log_traverseJoint, 1, ( "TJ0: ?[%0.3f %0.3f] A=%0.3f l=%0.3f J[%0.3f %0.3f] } } data->getAngle.angle = a; + data->getAngle.radius = 0.0; break; } } diff --git a/app/bin/track.c b/app/bin/track.c index bbbf48a..22af292 100644 --- a/app/bin/track.c +++ b/app/bin/track.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/track.c,v 1.7 2009-07-05 15:11:02 m_fischer Exp $ +/** \file track.c + * Track */ /* XTrkCad - Model Railroad CAD @@ -20,17 +20,29 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include #include -#include "track.h" +#include + #include "ccurve.h" -#include "cstraigh.h" #include "cjoin.h" #include "compound.h" -#include "i18n.h" +#include "cselect.h" +#include "cstraigh.h" +#include "cundo.h" +#include "custom.h" #include "draw.h" +#include "fileio.h" +#include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "paths.h" +#include "track.h" +#include "utility.h" #ifndef TRACKDEP #ifndef FASTTRACK @@ -64,8 +76,10 @@ static int log_readTracks = 0; EXPORT wIndex_t trackCount; EXPORT long drawEndPtV = 2; +EXPORT long drawUnconnectedEndPt = 0; /**< How do we draw Unconnected EndPts */ EXPORT long centerDrawMode = FALSE; /**< flag to control drawing of circle centers */ +EXPORT long printCenterLines = FALSE; /**< flag to control drawing of centerline in Print */ static BOOL_T exportingTracks = FALSE; @@ -78,15 +92,15 @@ static dynArr_t trackCmds_da; EXPORT BOOL_T useCurrentLayer = FALSE; -EXPORT LAYER_T curTrackLayer; +EXPORT unsigned int curTrackLayer; EXPORT coOrd descriptionOff; EXPORT DIST_T roadbedWidth = 0.0; EXPORT DIST_T roadbedLineWidth = 3.0/75.0; -EXPORT DIST_T minTrackRadius; -EXPORT DIST_T maxTrackGrade = 5.0; +//EXPORT DIST_T minTrackRadius; +//EXPORT DIST_T maxTrackGrade = 5.0; static int suspendElevUpdates = FALSE; @@ -115,9 +129,9 @@ EXPORT void DescribeTrack( track_cp trk, char * str, CSIZE_T len ) } -EXPORT DIST_T GetTrkDistance( track_cp trk, coOrd pos ) +EXPORT DIST_T GetTrkDistance( track_cp trk, coOrd * pos ) { - return trackCmds( GetTrkType(trk) )->distance( trk, &pos ); + return trackCmds( GetTrkType(trk) )->distance( trk, pos ); } /** @@ -133,7 +147,7 @@ EXPORT DIST_T GetTrkDistance( track_cp trk, coOrd pos ) * \return NULL if there is no track, pointer to track otherwise */ -EXPORT track_p OnTrack2( coOrd * fp, BOOL_T complain, BOOL_T track, BOOL_T ignoreHidden ) +EXPORT track_p OnTrack2( coOrd * fp, BOOL_T complain, BOOL_T track, BOOL_T ignoreHidden, track_p t ) { track_p trk; DIST_T distance, closestDistance = 1000000; @@ -148,6 +162,7 @@ EXPORT track_p OnTrack2( coOrd * fp, BOOL_T complain, BOOL_T track, BOOL_T ignor TRK_ITERATE( trk ) { if ( track && !IsTrack(trk) ) continue; + if (trk == t) continue; if (trk->hi.x < q0.x || trk->lo.x > q1.x || trk->hi.y < q0.y || @@ -186,7 +201,11 @@ EXPORT track_p OnTrack2( coOrd * fp, BOOL_T complain, BOOL_T track, BOOL_T ignor EXPORT track_p OnTrack( coOrd * fp, BOOL_T complain, BOOL_T track ) { - return OnTrack2( fp, complain, track, TRUE ); + return OnTrack2( fp, complain, track, TRUE, NULL ); +} + +EXPORT track_p OnTrackIgnore (coOrd * fp, BOOL_T complain, BOOL_T track, track_p t ) { + return OnTrack2(fp, complain, track, TRUE, t); } @@ -316,7 +335,7 @@ EXPORT void SetTrkScale( track_p trk, SCALEINX_T si ) trk->scale = (char)si; } -EXPORT LAYER_T GetTrkLayer( track_p trk ) +EXPORT unsigned int GetTrkLayer( track_p trk ) { return trk->layer; } @@ -490,13 +509,22 @@ EXPORT void SetTrkEndPtCnt( track_p trk, EPINX_T cnt ) memset( &trk->endPt[oldCnt], 0, (cnt-oldCnt) * sizeof *trk->endPt ); } - -EXPORT void SetTrkLayer( track_p trk, int layer ) +/** + * Set the layer for a track. + * + * \param trk IN the layer to change the layer for + * \param layer IN the new layer for the track + */ +void SetTrkLayer( track_p trk, int layer ) { + DecrementLayerObjects(trk->layer); + if (useCurrentLayer) - trk->layer = (LAYER_T)curLayer; + trk->layer = (unsigned int)curLayer; else - trk->layer = (LAYER_T)layer; + trk->layer = (unsigned int)layer; + + IncrementLayerObjects(trk->layer); } @@ -580,27 +608,36 @@ EXPORT BOOL_T WriteEndPt( FILE * f, track_cp trk, EPINX_T ep ) assert ( endPt != NULL ); if (endPt->track == NULL || ( exportingTracks && !GetTrkSelected(endPt->track) ) ) { - rc &= fprintf( f, "\tE " )>0; + rc &= fprintf( f, "\tE4 " )>0; } else { - rc &= fprintf( f, "\tT %d ", endPt->track->index )>0; + rc &= fprintf( f, "\tT4 %d ", endPt->track->index )>0; } rc &= fprintf( f, "%0.6f %0.6f %0.6f", endPt->pos.x, endPt->pos.y, endPt->angle )>0; option = (endPt->option<<8) | (endPt->elev.option&0xFF); if ( option != 0 ) { rc &= fprintf( f, " %ld %0.6f %0.6f", option, endPt->elev.doff.x, endPt->elev.doff.y )>0; - if ( (endPt->elev.option&ELEV_MASK) != ELEV_NONE ) { - switch ( endPt->elev.option&ELEV_MASK ) { - case ELEV_DEF: - rc &= fprintf( f, " %0.6f", endPt->elev.u.height )>0; - break; - case ELEV_STATION: - rc &= fprintf( f, " \"%s\"", PutTitle( endPt->elev.u.name ) )>0; - break; - default: - ; - } + switch ( endPt->elev.option&ELEV_MASK ) { + case ELEV_DEF: + rc &= fprintf( f, " %0.6f ", endPt->elev.u.height )>0; + break; + case ELEV_STATION: + rc &= fprintf( f, " \"%s\" ", PutTitle( endPt->elev.u.name ) )>0; + break; + default: + rc &= fprintf( f, " 0.0 ")>0; } + } else { + rc &= fprintf( f, " 0 0.0 0.0 0.0 ")>0; } + if ((endPt->elev.option&ELEV_MASK) == ELEV_DEF) + rc &= fprintf( f, "%0.6f ",endPt->elev.u.height)>0; + else + rc &= fprintf( f, "0.0 ")>0; + long elevVisible = (endPt->elev.option&ELEV_VISIBLE)?1:0; + long elevType = endPt->elev.option&ELEV_MASK; + long gapType = endPt->option; + rc &= fprintf( f, "%ld %ld %ld ", elevVisible, elevType, gapType)>0; + rc &= fprintf( f, "%0.6f ", trk->elev)>0; rc &= fprintf( f, "\n" )>0; return rc; } @@ -652,6 +689,28 @@ EXPORT EPINX_T PickUnconnectedEndPoint( coOrd p, track_cp trk ) return inx; } +EXPORT EPINX_T PickUnconnectedEndPointSilent( coOrd p, track_cp trk ) +{ + EPINX_T inx, i; + DIST_T d=10000.0, dd; + coOrd pos; + inx = -1; + + for ( i=0; iendCnt; i++ ) { + if (trk->endPt[i].track == NULL) { + pos = trk->endPt[i].pos; + dd=FindDistance(p, pos); + if (inx == -1 || dd <= d) { + d = dd; + inx = i; + } + } + } + + return inx; +} + + EXPORT EPINX_T GetEndPtConnectedToMe( track_p trk, track_p me ) { @@ -805,6 +864,15 @@ EXPORT BOOL_T MakeParallelTrack( return FALSE; } +EXPORT BOOL_T RebuildTrackSegs( + track_p trk) +{ + if (trackCmds(trk->type)->rebuildSegs) + return trackCmds(trk->type)->rebuildSegs(trk); + return FALSE; +} + + /***************************************************************************** * @@ -855,7 +923,7 @@ LOG( log_track, 1, ( "NewTrack( T%d, t%d, E%d, X%ld)\n", index, type, endCnt, ex trk->index = index; trk->type = type; trk->layer = curLayer; - trk->scale = (char)curScaleInx; + trk->scale = (char)GetLayoutCurScale(); trk->bits = TB_VISIBLE; trk->elevMode = ELEV_ALONE; trk->elev = 0; @@ -874,6 +942,7 @@ LOG( log_track, 1, ( "NewTrack( T%d, t%d, E%d, X%ld)\n", index, type, endCnt, ex trk->extraSize = extraSize; UndoNew( trk ); trackCount++; + IncrementLayerObjects(curLayer); InfoCount( trackCount ); return trk; } @@ -971,10 +1040,12 @@ LOG( log_track, 4, ( "DeleteTrack(T%d)\n", GetTrkIndex(trk) ) ) } CheckDeleteSwitchmotor( trk ); CheckDeleteBlock( trk ); - UndoDelete( trk ); - MainRedraw(); + DecrementLayerObjects(trk->layer); trackCount--; AuditTracks( "deleteTrack T%d", trk->index); + UndoDelete(trk); /**< Attention: trk is invalidated during that call */ + MainRedraw(); + MapRedraw(); InfoCount( trackCount ); return TRUE; } @@ -1296,8 +1367,10 @@ static void AuditPrint( char * msg ) { time_t clock; if (auditFile == NULL) { - sprintf( message, "%s%s%s", workingDir, FILE_SEP_CHAR, sAuditF ); - auditFile = fopen( message, "a+" ); + char *path; + MakeFullpath(&path, workingDir, sAuditF, NULL); + auditFile = fopen( path, "a+" ); + free(path); if (auditFile == NULL) { NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Audit"), message, strerror(errno) ); auditIgnore = TRUE; @@ -1524,6 +1597,7 @@ EXPORT STATUS_T EndPtDescriptionMove( if (action != C_UP) DrawLine( &tempD, p0, p1, 0, wDrawColorBlack ); MainRedraw(); + MapRedraw(); return action==C_UP?C_TERMINATE:C_CONTINUE; case C_REDRAW: @@ -1697,9 +1771,11 @@ EXPORT BOOL_T SplitTrack( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, *leftover = NULL; LOG( log_track, 2, ( "SplitTrack( T%d[%d], (%0.3f %0.3f)\n", trk->index, ep, pos.x, pos.y ) ) - if ((splitCmd = trackCmds(trk->type)->split) == NULL) { - ErrorMessage( MSG_CANT_SPLIT_TRK, trackCmds(trk->type)->name ); - return FALSE; + if (((splitCmd = trackCmds(trk->type)->split) == NULL)) { + if (!(FindDistance( trk->endPt[ep].pos, pos) <= minLength)) { + ErrorMessage( MSG_CANT_SPLIT_TRK, trackCmds(trk->type)->name ); + return FALSE; + } } UndrawNewTrack( trk ); UndoModify( trk ); @@ -1720,11 +1796,6 @@ LOG( log_track, 2, ( "SplitTrack( T%d[%d], (%0.3f %0.3f)\n", trk->index, ep, pos *leftover = trk2; DrawNewTrack( trk ); -#ifdef LATER - } else if ( IsTurnout(trk) ) { - ErrorMessage( MSG_CANT_SPLIT_TRK, _("Turnout") ); - return FALSE; -#endif } else if ( epCnt == 2 && (d = FindDistance( trk->endPt[1-ep].pos, pos )) <= minLength) { @@ -1737,15 +1808,9 @@ LOG( log_track, 2, ( "SplitTrack( T%d[%d], (%0.3f %0.3f)\n", trk->index, ep, pos DisconnectTracks( trk, 1-ep, trk2, ep2 ); LOG( log_track, 2, ( " at endPt with T%d[%d]\n", trk2->index, ep2 ) ) DrawNewTrack( trk2 ); -#ifdef LATER - *trk = trk2; - *ep = ep1; - *leftover = trk; -#endif + } else { -#ifdef LATER - *trk = NULL; -#endif + LOG( log_track, 2, ( " at endPt (no connection)\n") ) } DrawNewTrack( trk ); @@ -1833,6 +1898,7 @@ EXPORT BOOL_T TraverseTrack( return FALSE; trvTrk->length = -1; trvTrk->dist = 0.0; + } return TRUE; } @@ -1954,22 +2020,6 @@ EXPORT BOOL_T GetTrackParams( int inx, track_p trk, coOrd pos, trackParams_t * p return trackCmds(trk->type)->getTrackParams( inx, trk, pos, params ); } else { ASSERT( FALSE ); /* CHECKME */ -#ifdef LATER - switch ( inx ) { - case PARAMS_1ST_JOIN: - case PARAMS_2ND_JOIN: - ErrorMessage( MSG_JOIN_TRK, (inx==PARAMS_1ST_JOIN?_("First"):_("Second")) ); - break; - case PARAMS_EXTEND: - ErrorMessage( MSG_CANT_EXTEND ); - break; - case PARAMS_PARALLEL: - ErrorMessage( MSG_INV_TRK_PARALLEL ); - break; - default: - ErrorMessage( MSG_INVALID_TRK ); - } -#endif return FALSE; } } @@ -2113,15 +2163,7 @@ EXPORT void DrawTie( Translate( &p[2], pos, angle+180, length ); Translate( &p[3], p[2], angle-90, width ); Translate( &p[2], p[2], angle+90, width ); -#ifdef LATER - lo = hi = p[0]; - for ( i=1; i<4; i++ ) { - if ( p[i].x < lo.x ) lo.x = p[i].x; - if ( p[i].y < lo.y ) lo.y = p[i].y; - if ( p[i].x > hi.x ) hi.x = p[i].x; - if ( p[i].y > hi.y ) hi.y = p[i].y; - } -#endif + if ( d == &mainD ) { lo.x -= RBORDER/mainD.dpi*mainD.scale; lo.y -= TBORDER/mainD.dpi*mainD.scale; @@ -2150,7 +2192,7 @@ EXPORT void DrawCurvedTies( ANGLE_T a1, wDrawColor color ) { - tieData_p td = GetScaleTieData(GetTrkScale(trk)); + tieData_p td; DIST_T len; ANGLE_T ang, dang; coOrd pos; @@ -2160,6 +2202,9 @@ EXPORT void DrawCurvedTies( return; if ( trk == NULL ) return; + + td = GetScaleTieData(GetTrkScale(trk)); + if ( (!GetTrkVisible(trk)) && drawTunnel!=DRAW_TUNNEL_SOLID ) return; if (color == wDrawColorBlack) @@ -2235,7 +2280,8 @@ LOG( log_track, 4, ( "DST( (%0.3f %0.3f) R%0.3f A%0.3f..%0.3f)\n", } else if (d->options & DC_QUICK) { DrawArc( d, p, r, a0, a1, ((d->scale<32) && centerDrawMode && !(options&DTS_NOCENTER)) ? 1 : 0, 0, color ); } else { - if ( (d->scale <= 1 && (d->options&DC_SIMPLE)==0) || (d->options&DC_CENTERLINE)!=0 ) { + if ( (d->scale <= 1 && (d->options&DC_SIMPLE)==0) || (d->options&DC_CENTERLINE)!=0 + || (d->scale <= scale2rail/2 && d->options&DC_PRINT && printCenterLines)) { // if printing two rails respect print CenterLine option long options = d->options; d->options |= DC_DASH; DrawArc( d, p, r, a0, a1, 0, 0, color ); @@ -2263,7 +2309,7 @@ EXPORT void DrawStraightTies( coOrd p1, wDrawColor color ) { - tieData_p td = GetScaleTieData(GetTrkScale(trk)); + tieData_p td; DIST_T tieOff0=0.0, tieOff1=0.0; DIST_T len, dlen; coOrd pos; @@ -2274,6 +2320,8 @@ EXPORT void DrawStraightTies( return; if ( trk == NULL ) return; + + td = GetScaleTieData(GetTrkScale(trk)); if ( (!GetTrkVisible(trk)) && drawTunnel!=DRAW_TUNNEL_SOLID ) return; if ( color == wDrawColorBlack ) @@ -2350,7 +2398,8 @@ LOG( log_track, 4, ( "DST( (%0.3f %0.3f) .. (%0.3f..%0.3f)\n", } else if (d->options&DC_QUICK) { DrawLine( d, p0, p1, 0, color ); } else { - if ( (d->scale <= 1 && (d->options&DC_SIMPLE)==0) || (d->options&DC_CENTERLINE)!=0 ) { + if ( (d->scale <= 1 && (d->options&DC_SIMPLE)==0) || (d->options&DC_CENTERLINE)!=0 + || (d->scale <= scale2rail/2 && d->options&DC_PRINT && printCenterLines)) { // if printing two rails respect print CenterLine option long options = d->options; d->options |= DC_DASH; DrawLine( d, p0, p1, 0, color ); @@ -2393,7 +2442,7 @@ EXPORT wDrawColor GetTrkColor( track_p trk, drawCmd_p d ) } } if ( (d->options&(DC_GROUP)) == 0 ) { - if ( grade > maxTrackGrade ) + if ( grade > GetLayoutMaxTrackGrade()) return exceptionColor; if ( QueryTrack( trk, Q_EXCEPTION ) ) return exceptionColor; @@ -2406,7 +2455,7 @@ EXPORT wDrawColor GetTrkColor( track_p trk, drawCmd_p d ) } if ( (d->options&(DC_GROUP)) == 0 ) { if ( (IsTrack(trk)?(colorLayers&1):(colorLayers&2)) ) - return GetLayerColor((LAYER_T)curTrackLayer); + return GetLayerColor((unsigned int)curTrackLayer); } return wDrawColorBlack; } @@ -2434,7 +2483,7 @@ EXPORT void DrawTrack( track_cp trk, drawCmd_p d, wDrawColor color ) return; if ( (IsTrack(trk)?(colorLayers&1):(colorLayers&2)) && d != &mapD && color == wDrawColorBlack ) - color = GetLayerColor((LAYER_T)curTrackLayer); + color = GetLayerColor((unsigned int)curTrackLayer); scale2rail = (d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale; if ( (!inDrawTracks) && tieDrawMode!=TIEDRAWMODE_NONE && @@ -2516,11 +2565,11 @@ static void DrawUnconnectedEndPt( drawCmd_p d, coOrd p, ANGLE_T a, DIST_T trackG Translate( &p0, p, a, trackGauge ); Translate( &p1, p, a-180.0, trackGauge ); DrawLine( d, p0, p1, 0, color ); - if (d->scale < 8) { + if (d->scale < 8 || drawUnconnectedEndPt > 0) { Translate( &p, p, a+90.0, 0.2 ); Translate( &p0, p, a, trackGauge ); Translate( &p1, p, a-180.0, trackGauge ); - DrawLine( d, p0, p1, 0, color ); + DrawLine( d, p0, p1, (drawUnconnectedEndPt>0)?4:0, (drawUnconnectedEndPt>1)?exceptionColor:color ); } } @@ -2605,7 +2654,7 @@ EXPORT void DrawEndPt( EPINX_T ep, wDrawColor color ) { - coOrd p, pp; + coOrd p; ANGLE_T a; track_p trk1; coOrd p0, p1, p2; @@ -2630,11 +2679,8 @@ EXPORT void DrawEndPt( if (labelScale >= d->scale) DrawEndElev( d, trk, ep, color ); - if ( d->scale >= ((d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale) ) - return; - trk1 = GetTrkEndTrk(trk,ep); - pp = p = GetTrkEndPos( trk, ep ); + p = GetTrkEndPos( trk, ep ); a = GetTrkEndAngle( trk, ep ) + 90.0; trackGauge = GetTrkGauge(trk); @@ -2643,6 +2689,9 @@ EXPORT void DrawEndPt( return; } + if ( d->scale >= ((d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale) ) + return; + sepBoundary = FALSE; if ((d->options&DC_PRINT)==0 && importTrack == NULL && GetTrkSelected(trk) && (!GetTrkSelected(trk1))) { DIST_T len; @@ -2734,14 +2783,13 @@ EXPORT void DrawTracks( drawCmd_p d, DIST_T scale, coOrd orig, coOrd size ) { track_cp trk; TRKINX_T inx; - wIndex_t count; + wIndex_t count = 0; coOrd lo, hi; BOOL_T doSelectRecount = FALSE; inDrawTracks = TRUE; - count = 0; InfoCount( 0 ); - count = 0; + d->options |= DC_TIES; TRK_ITERATE( trk ) { if ( (d->options&DC_PRINT) != 0 && @@ -2779,43 +2827,11 @@ EXPORT void DrawTracks( drawCmd_p d, DIST_T scale, coOrd orig, coOrd size ) } -EXPORT void RedrawLayer( LAYER_T l, BOOL_T draw ) +EXPORT void RedrawLayer( unsigned int l, BOOL_T draw ) { MainRedraw(); -#ifdef LATER - track_cp trk; - track_cp trk1; - EPINX_T ep; - wIndex_t count; - coOrd hi, lo; + MapRedraw(); - count = 0; - InfoCount( 0 ); - TRK_ITERATE( trk ) { - if (GetTrkLayer(trk) != l) - continue; - GetBoundingBox( trk, &hi, &lo ); - if ( !OFF_MAIND( lo, hi ) ) { - if ( GetLayerVisible( l ) ) { - DrawTrack( trk, &mainD, draw?wDrawColorBlack:wDrawColorWhite ); - } - for (ep=0; ep -#include -#include -#ifndef WINDOWS -#include -#endif -#include -#ifdef HAVE_MALLOC_H -#include -#endif -#include - -#include "wlib.h" #include "common.h" -#include "utility.h" #include "draw.h" -#include "misc.h" - +#include "misc2.h" extern TRKTYP_T T_NOTRACK; @@ -51,19 +36,19 @@ extern track_p tempTrack; extern wIndex_t trackCount; extern long drawTunnel; extern long drawEndPtV; +extern long drawUnconnectedEndPt; extern long centerDrawMode; extern wDrawColor selectedColor; extern wDrawColor normalColor; extern BOOL_T useCurrentLayer; -extern LAYER_T curTrackLayer; +extern unsigned int curTrackLayer; extern coOrd descriptionOff; extern DIST_T roadbedWidth; extern DIST_T roadbedLineWidth; +extern long printCenterLines; extern long drawElevations; extern wDrawColor elevColorIgnore; extern wDrawColor elevColorDefined; -extern DIST_T minTrackRadius; -extern DIST_T maxTrackGrade; extern wDrawColor exceptionColor; #define TIEDRAWMODE_NONE (0) #define TIEDRAWMODE_OUTLINE (1) @@ -81,24 +66,36 @@ extern int pathMax; extern BOOL_T onTrackInSplit; -typedef enum { curveTypeNone, curveTypeCurve, curveTypeStraight } curveType_e; +typedef enum { curveTypeNone, curveTypeCurve, curveTypeStraight, curveTypeBezier, curveTypeCornu } curveType_e; #define PARAMS_1ST_JOIN (0) #define PARAMS_2ND_JOIN (1) #define PARAMS_EXTEND (2) #define PARAMS_PARALLEL (3) +#define PARAMS_BEZIER (4) //Not used (yet) +#define PARAMS_CORNU (5) //Called to get end characteristics typedef struct { - curveType_e type; - EPINX_T ep; - DIST_T len; - ANGLE_T angle; - coOrd lineOrig; - coOrd lineEnd; - coOrd arcP; - DIST_T arcR; - ANGLE_T arcA0, arcA1; + curveType_e type; //Straight, Curve, Bezier, Cornu + EPINX_T ep; //End point that is nearby pos + DIST_T len; //Length of track + ANGLE_T angle; //Angle at end of track + coOrd lineOrig; //Start of straight + coOrd lineEnd; //End of Straight (or zero for Turnout) + coOrd arcP; //center or zero + DIST_T arcR; //radius or zero + ANGLE_T arcA0, arcA1; //Start angle and angular length (clockwise) long helixTurns; + ANGLE_T track_angle; + BOOL_T circleOrHelix; //Track is circle or Helix + coOrd bezierPoints[4]; //Bezier Ends and CPs + coOrd cornuEnd[2]; //Cornu Ends + ANGLE_T cornuAngle[2]; //Angle at Cornu Ends + DIST_T cornuRadius[2]; //Radius at Cornu Ends + coOrd cornuCenter[2]; //Center at Cornu Ends + coOrd ttcenter; //Turntable + DIST_T ttradius; //Turntable + } trackParams_t; #define Q_CANNOT_BE_ON_END (1) @@ -118,13 +115,20 @@ typedef struct { #define Q_NOT_PLACE_FROGPOINTS (15) #define Q_HAS_DESC (16) #define Q_MODIFY_REDRAW_DONT_UNDRAW_TRACK (17) +#define Q_CAN_MODIFY_CONTROL_POINTS (18) // Is T_BEZIER or T_BEZLIN +#define Q_IS_CORNU (19) // Is T_CORNU +#define Q_MODIFY_CAN_SPLIT (20) // Is able to be Split +#define Q_CAN_EXTEND (21) // Add extra curve or straight in CORNU MODIFY +#define Q_CAN_ADD_ENDPOINTS (22) // Is T_TURNTABLE +#define Q_HAS_VARIABLE_ENDPOINTS (23) // Is Helix or Circle +#define Q_CORNU_CAN_MODIFY (24) // can be modified by CORNU MODIFY typedef struct { - track_p trk; - DIST_T length; - DIST_T dist; - coOrd pos; - ANGLE_T angle; + track_p trk; // IN Current Track OUT Next Track + DIST_T length; // IN How far to go + DIST_T dist; // OUT how far left = 0 if found + coOrd pos; // IN/OUT - where we are, where we will be // IN/OUT - where we are now + ANGLE_T angle; // IN/OUT - angle now } traverseTrack_t, *traverseTrack_p; @@ -159,6 +163,7 @@ typedef struct { BOOL_T (*checkTraverse)( track_p, coOrd ); BOOL_T (*makeParallel)( track_p, coOrd, DIST_T, track_p *, coOrd *, coOrd * ); void (*drawDesc)( track_p, drawCmd_p, wDrawColor ); + BOOL_T (*rebuildSegs)(track_p); } trackCmd_t; @@ -187,17 +192,29 @@ typedef struct { dynArr_t tempEndPts_da; #define tempEndPts(N) DYNARR_N( trkEndPt_t, tempEndPts_da, N ) +typedef enum { FREEFORM, RECTANGLE +} PolyType_e; typedef struct { char type; wDrawColor color; DIST_T width; + dynArr_t bezSegs; //placed here to avoid overwrites union { struct { - coOrd pos[2]; + coOrd pos[4]; ANGLE_T angle; long option; } l; + struct { + coOrd pos[4]; + ANGLE_T angle0; + ANGLE_T angle3; + DIST_T minRadius; + DIST_T radius0; + DIST_T radius3; + DIST_T length; + } b; struct { coOrd center; ANGLE_T a0, a1; @@ -224,14 +241,17 @@ typedef struct { coOrd * pts; coOrd orig; ANGLE_T angle; + PolyType_e polyType; } p; } u; } trkSeg_t, * trkSeg_p; #define SEG_STRTRK ('S') #define SEG_CRVTRK ('C') +#define SEG_BEZTRK ('W') #define SEG_STRLIN ('L') #define SEG_CRVLIN ('A') +#define SEG_BEZLIN ('H') #define SEG_JNTTRK ('J') #define SEG_FILCRCL ('G') #define SEG_POLY ('Y') @@ -247,7 +267,7 @@ typedef struct { #define SEG_DIMLIN ('M') #define SEG_TBLEDGE ('Q') -#define IsSegTrack( S ) ( (S)->type == SEG_STRTRK || (S)->type == SEG_CRVTRK || (S)->type == SEG_JNTTRK ) +#define IsSegTrack( S ) ( (S)->type == SEG_STRTRK || (S)->type == SEG_CRVTRK || (S)->type == SEG_JNTTRK || (S)->type == SEG_BEZTRK) dynArr_t tempSegs_da; #define tempSegs(N) DYNARR_N( trkSeg_t, tempSegs_da, N ) @@ -295,24 +315,31 @@ void DrawSegsO( DIST_T trackGauge, wDrawColor color, long options ); -ANGLE_T GetAngleSegs( wIndex_t, trkSeg_p, coOrd, wIndex_t * ); +ANGLE_T GetAngleSegs( wIndex_t, trkSeg_p, coOrd *, wIndex_t *, DIST_T *, BOOL_T *, wIndex_t *, BOOL_T * ); void RecolorSegs( wIndex_t, trkSeg_p, wDrawColor ); BOOL_T ReadSegs( void ); BOOL_T WriteSegs( FILE * f, wIndex_t segCnt, trkSeg_p segs ); +BOOL_T WriteSegsEnd(FILE * f, wIndex_t segCnt, trkSeg_p segs, BOOL_T writeEnd); typedef union { struct { - coOrd pos; /* IN */ - ANGLE_T angle; - DIST_T dist; /* OUT */ - BOOL_T backwards; - } traverse1; + coOrd pos; /* IN the point to get to */ + ANGLE_T angle; /* IN is the angle that the object starts at (-ve for forwards) */ + DIST_T dist; /* OUT is how far it is along the track to get to pos*/ + BOOL_T backwards; /* OUT which way are we going? */ + BOOL_T reverse_seg; /* OUT the seg is backwards curve */ + BOOL_T negative; /* OUT the curve is negative */ + int BezSegInx; /* OUT for Bezier Seg - the segment we are on in Bezier */ + BOOL_T segs_backwards; /* OUT for Bezier Seg - the direction of the overall Bezier */ + } traverse1; // Find dist between pos and end of track that starts with angle set backwards struct { - EPINX_T segDir; /* IN */ - DIST_T dist; /* IN/OUT */ - coOrd pos; /* OUT */ - ANGLE_T angle; - } traverse2; + BOOL_T segDir; /* IN Direction to go in this seg*/ + int BezSegInx; /* IN for Bezier Seg which element to start with*/ + BOOL_T segs_backwards; /* IN for Bezier Seg which way to go down the array*/ + DIST_T dist; /* IN/OUT In = distance to go, Out = distance left */ + coOrd pos; /* OUT = point reached if dist = 0 */ + ANGLE_T angle; /* OUT = angle at point */ + } traverse2; //Return distance left (or 0) and angle and pos when going dist from segDir end struct { int first, last; /* IN */ ANGLE_T side; @@ -324,15 +351,15 @@ typedef union { drawCmd_p d; } drawRoadbedSide; struct { - coOrd pos1; /* IN/OUT */ - DIST_T dd; /* OUT */ + coOrd pos1; /* IN pos to find */ + DIST_T dd; /* OUT distance from nearest point in seg to input pos */ } distance; struct { track_p trk; /* OUT */ EPINX_T ep[2]; } newTrack; struct { - DIST_T length; + DIST_T length; /* OUT */ } length; struct { coOrd pos; /* IN */ @@ -340,9 +367,14 @@ typedef union { trkSeg_t newSeg[2]; } split; struct { - coOrd pos; /* IN */ - ANGLE_T angle; /* OUT */ - } getAngle; + coOrd pos; /* IN Pos to find nearest to - OUT found pos on curve*/ + ANGLE_T angle; /* OUT angle at pos - (-ve if backwards)*/ + BOOL_T negative_radius; /* OUT Radius <0? */ + BOOL_T backwards; /* OUT Seg is backwards */ + DIST_T radius; /* OUT radius at pos */ + coOrd center; /* OUT center of curvature at pos (0 = straight)*/ + int bezSegInx; /* OUT if a bezier proc, the index of the sub segment */ + } getAngle; // Get pos on seg nearest, angle at that (-ve for forwards) } segProcData_t, *segProcData_p; typedef enum { SEGPROC_TRAVERSE1, @@ -359,6 +391,8 @@ void SegProc( segProc_e, trkSeg_p, segProcData_p ); void StraightSegProc( segProc_e, trkSeg_p, segProcData_p ); void CurveSegProc( segProc_e, trkSeg_p, segProcData_p ); void JointSegProc( segProc_e, trkSeg_p, segProcData_p ); +void BezierSegProc( segProc_e, trkSeg_p, segProcData_p ); //Used in Cornu join +void CleanSegs( dynArr_t *); @@ -416,7 +450,7 @@ void SetTrkScale( track_p, SCALEINX_T ); BOOL_T GetTrkSelected( track_p ); BOOL_T GetTrkVisible( track_p ); void SetTrkVisible( track_p, BOOL_T ); -LAYER_T GetTrkLayer( track_p ); +unsigned int GetTrkLayer( track_p ); void SetBoundingBox( track_p, coOrd, coOrd ); void GetBoundingBox( track_p, coOrd*, coOrd* ); EPINX_T GetTrkEndPtCnt( track_p ); @@ -465,6 +499,7 @@ void SetTrkEndPtCnt( track_p, EPINX_T ); BOOL_T WriteEndPt( FILE *, track_cp, EPINX_T ); EPINX_T PickEndPoint( coOrd, track_cp ); EPINX_T PickUnconnectedEndPoint( coOrd, track_cp ); +EPINX_T PickUnconnectedEndPointSilent( coOrd, track_cp ); void AuditTracks( char *, ... ); void CheckTrackLength( track_cp ); @@ -501,9 +536,10 @@ void DrawStraightTies( drawCmd_p, track_p, coOrd, coOrd, wDrawColor ); void DrawStraightTrack( drawCmd_p, coOrd, coOrd, ANGLE_T, track_p, DIST_T, wDrawColor, long ); ANGLE_T GetAngleAtPoint( track_p, coOrd, EPINX_T *, EPINX_T * ); -DIST_T GetTrkDistance( track_cp, coOrd ); +DIST_T GetTrkDistance( track_cp, coOrd *); track_p OnTrack( coOrd *, INT_T, BOOL_T ); -track_p OnTrack2( coOrd *, INT_T, BOOL_T, BOOL_T ); +track_p OnTrackIgnore(coOrd *, INT_T, BOOL_T , track_p ); +track_p OnTrack2( coOrd *, INT_T, BOOL_T, BOOL_T, track_p ); void ComputeRectBoundingBox( track_p, coOrd, coOrd ); void ComputeBoundingBox( track_p ); @@ -513,7 +549,7 @@ void DrawEndElev( drawCmd_p, track_p, EPINX_T, wDrawColor ); wDrawColor GetTrkColor( track_p, drawCmd_p ); void DrawTrack( track_cp, drawCmd_p, wDrawColor ); void DrawTracks( drawCmd_p, DIST_T, coOrd, coOrd ); -void RedrawLayer( LAYER_T, BOOL_T ); +void RedrawLayer( unsigned int, BOOL_T ); void DrawNewTrack( track_cp ); void DrawOneTrack( track_cp, drawCmd_p ); void UndrawNewTrack( track_cp ); @@ -547,6 +583,7 @@ void ConnectTracks( track_p, EPINX_T, track_p, EPINX_T ); BOOL_T ReconnectTrack( track_p, EPINX_T, track_p, EPINX_T ); void DisconnectTracks( track_p, EPINX_T, track_p, EPINX_T ); BOOL_T ConnectAbuttingTracks( track_p, EPINX_T, track_p, EPINX_T ); +BOOL_T ConnectTurntableTracks(track_p, EPINX_T, track_p, EPINX_T ); BOOL_T SplitTrack( track_p, coOrd, EPINX_T, track_p *leftover, BOOL_T ); BOOL_T TraverseTrack( traverseTrack_p, DIST_T * ); BOOL_T RemoveTrack( track_p*, EPINX_T*, DIST_T* ); @@ -560,6 +597,7 @@ BOOL_T QueryTrack( track_p, int ); void UngroupTrack( track_p ); BOOL_T IsTrack( track_p ); char * GetTrkTypeName( track_p ); +BOOL_T RebuildTrackSegs(track_p); DIST_T GetFlexLength( track_p, EPINX_T, coOrd * ); void LabelLengths( drawCmd_p, track_p, wDrawColor ); @@ -576,8 +614,6 @@ void AdvancePositionIndicator( track_p, coOrd, coOrd *, ANGLE_T * ); BOOL_T MakeParallelTrack( track_p, coOrd, DIST_T, track_p *, coOrd *, coOrd * ); -#include "cundo.h" -#include "cselect.h" /* cmisc.c */ wIndex_t describeCmdInx; @@ -600,7 +636,7 @@ typedef struct { wControl_p control0; wControl_p control1; wPos_t posy; - } descData_t, * descData_p; + } descData_t, * descData_p; typedef void (*descUpdate_t)( track_p, int, descData_p, BOOL_T ); void DoDescribe( char *, track_p, descData_p, descUpdate_t ); void DescribeCancel( void ); @@ -632,6 +668,7 @@ void DrawTrackElev( track_p, drawCmd_p, BOOL_T ); /* cdraw.c */ track_p MakeDrawFromSeg( coOrd, ANGLE_T, trkSeg_p ); BOOL_T OnTableEdgeEndPt( track_p, coOrd * ); +BOOL_T GetClosestEndPt( track_p, coOrd * ); BOOL_T ReadTableEdge( char * ); BOOL_T ReadText( char * ); diff --git a/app/bin/trackx.h b/app/bin/trackx.h index 6b46140..9f24e7c 100644 --- a/app/bin/trackx.h +++ b/app/bin/trackx.h @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/trackx.h,v 1.1 2005-12-07 15:47:39 rc-flyer Exp $ +/** \file trackx.h + * */ /* XTrkCad - Model Railroad CAD @@ -24,13 +24,16 @@ #ifndef TRACKX_H #define TRACKX_H +#include "common.h" +#include "track.h" + struct extraData; typedef struct track_t { struct track_t *next; TRKINX_T index; TRKTYP_T type; - LAYER_T layer; + unsigned int layer; signed char scale; BOOL_T modified:1; BOOL_T deleted:1; diff --git a/app/bin/trkseg.c b/app/bin/trkseg.c index 972463f..9517a09 100644 --- a/app/bin/trkseg.c +++ b/app/bin/trkseg.c @@ -1,5 +1,5 @@ -/** \file trkseg.c - * Modification and drawing of track segments +/* + * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/trkseg.c,v 1.2 2006-05-30 16:11:55 m_fischer Exp $ */ /* XTrkCad - Model Railroad CAD @@ -20,18 +20,44 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include +#include #include #include "track.h" +#include +#include +#include + +#include + #include "cjoin.h" +#include "fileio.h" +#include "param.h" +#include "track.h" +#include "utility.h" +#include "misc.h" + /***************************************************************************** * * TRACK SEGMENTS * + * Notes: Segments are used + * 1. as temporary elements during editing operations + * 2. as a means of grouping primitives for compounds + * 3. as the way of drawing and operating on Bezier curves + * + * They are stored as dynamic arrays which can be displayed and operated on as sets. + * */ + +/* + * Build a Segment that has a radius and passes through two points. This uses the knowledge + * that the center of curve is always on an orthogonal line through the bisection of a chord. + */ EXPORT void ComputeCurvedSeg( trkSeg_p s, DIST_T radius, @@ -66,7 +92,7 @@ EXPORT coOrd GetSegEndPt( ANGLE_T * angleR ) { coOrd pos; - ANGLE_T angle, a, a0, a1; + ANGLE_T angle, a, a0, a1 = 0.0; DIST_T r; POS_T x0, y0, x1, y1; @@ -114,7 +140,12 @@ EXPORT coOrd GetSegEndPt( case SEG_JNTTRK: pos = GetJointSegEndPos( segPtr->u.j.pos, segPtr->u.j.angle, segPtr->u.j.l0, segPtr->u.j.l1, segPtr->u.j.R, segPtr->u.j.L, segPtr->u.j.negate, segPtr->u.j.flip, segPtr->u.j.Scurve, ep, &angle ); break; - default: + case SEG_BEZTRK: + case SEG_BEZLIN: + if (ep ==1) pos = segPtr->u.b.pos[3]; //For Bezier, use the End Points of the overall curve + else pos = segPtr->u.b.pos[0]; + break; + default: AbortProg("GetSegCntPt(%c)", segPtr->type ); } if ( angleR ) @@ -123,7 +154,7 @@ EXPORT coOrd GetSegEndPt( } /** - * Caclulate the bounding box for a string. + * Calculate the bounding box for a string. * * \param coOrd IN position of text * \param angle IN text angle @@ -131,9 +162,7 @@ EXPORT coOrd GetSegEndPt( * \param fs IN size of font * \param loR OUT bottom left corner * \param hiR OUT top right corner - * \return describe the return value */ - EXPORT void GetTextBounds( coOrd pos, ANGLE_T angle, @@ -142,29 +171,44 @@ EXPORT void GetTextBounds( coOrd * loR, coOrd * hiR ) { + coOrd size; - POS_T descent; + POS_T descent = 0.0; coOrd lo, hi; coOrd p[4]; + coOrd lastL; int i; - DrawTextSize2( &mainD, str, NULL, fs, FALSE, &size, &descent ); - + DrawMultiLineTextSize(&mainD, str, NULL, fs, FALSE, &size, &lastL); // set up the corners of the rectangle p[0].x = p[3].x = 0.0; p[1].x = p[2].x = size.x; - p[0].y = p[1].y = -descent; + DrawTextSize2(&mainD, "A", NULL, fs, FALSE, &size, &descent); + p[0].y = p[1].y = lastL.y - descent; p[2].y = p[3].y = size.y; lo = hi = zero; // rotate each point - for ( i=1; i<4; i++ ) { - Rotate( &p[i], zero, angle ); - if ( p[i].x < lo.x ) lo.x = p[i].x; - if ( p[i].y < lo.y ) lo.y = p[i].y; - if ( p[i].x > hi.x ) hi.x = p[i].x; - if ( p[i].y > hi.y ) hi.y = p[i].y; + for (i=0; i<4; i++) + { + Rotate(&p[i], zero, angle); + + if (p[i].x < lo.x) { + lo.x = p[i].x; + } + + if (p[i].y < lo.y) { + lo.y = p[i].y; + } + + if (p[i].x > hi.x) { + hi.x = p[i].x; + } + + if (p[i].y > hi.y) { + hi.y = p[i].y; + } } // now recaclulate the corners @@ -178,7 +222,7 @@ EXPORT void GetTextBounds( static void Get1SegBounds( trkSeg_p segPtr, coOrd xlat, ANGLE_T angle, coOrd *lo, coOrd *hi ) { int inx; - coOrd p0, p1, pc; + coOrd p0, p1, pBez[4], pc; ANGLE_T a0, a1; coOrd width; DIST_T radius; @@ -266,15 +310,31 @@ static void Get1SegBounds( trkSeg_p segPtr, coOrd xlat, ANGLE_T angle, coOrd *lo break; case SEG_FILCRCL: REORIGIN( p0, segPtr->u.c.center, angle, xlat ) - lo->x = p0.x - segPtr->u.c.radius; - hi->x = p0.x + segPtr->u.c.radius; - lo->y = p0.y - segPtr->u.c.radius; - hi->y = p0.y + segPtr->u.c.radius; + lo->x = p0.x - fabs(segPtr->u.c.radius); + hi->x = p0.x + fabs(segPtr->u.c.radius); + lo->y = p0.y - fabs(segPtr->u.c.radius); + hi->y = p0.y + fabs(segPtr->u.c.radius); break; case SEG_TEXT: REORIGIN( p0, segPtr->u.t.pos, angle, xlat ) GetTextBounds( p0, angle+segPtr->u.t.angle, segPtr->u.t.string, segPtr->u.t.fontSize, lo, hi ); break; + case SEG_BEZLIN: + case SEG_BEZTRK: //Bezier control arms form a "tent" around the curve + REORIGIN( pBez[0], segPtr->u.b.pos[0], angle, xlat ) + REORIGIN( pBez[1], segPtr->u.b.pos[1], angle, xlat ) + REORIGIN( pBez[2], segPtr->u.b.pos[2], angle, xlat ) + REORIGIN( pBez[3], segPtr->u.b.pos[3], angle, xlat ) + lo->x = hi->x = pBez[0].x; + lo->y = hi->y = pBez[0].y; + for (int i=1;i<4;i++) { + lo->x = lo->x>pBez[i].x?pBez[i].x:lo->x; + lo->y = lo->y>pBez[i].y?pBez[i].y:lo->y; + hi->x = hi->xx; + hi->y = hi->yy; + } + width.x = width.y = segPtr->width/2.0; + break; default: ; } @@ -379,6 +439,14 @@ EXPORT void MoveSegs( s->u.j.pos.x += orig.x; s->u.j.pos.y += orig.y; break; + case SEG_BEZTRK: + case SEG_BEZLIN: + for (inx=0;inx<4;inx++) { + s->u.b.pos[inx].x +=orig.x; + s->u.b.pos[inx].y +=orig.y; + } + FixUpBezierSeg(s->u.b.pos,s,s->type == SEG_BEZTRK); + break; } } } @@ -423,11 +491,18 @@ EXPORT void RotateSegs( Rotate( &s->u.j.pos, orig, angle ); s->u.j.angle = NormalizeAngle( s->u.j.angle+angle ); break; - } + case SEG_BEZLIN: + case SEG_BEZTRK: + Rotate( &s->u.b.pos[0], orig, angle ); + Rotate( &s->u.b.pos[1], orig, angle ); + Rotate( &s->u.b.pos[2], orig, angle ); + Rotate( &s->u.b.pos[3], orig, angle ); + FixUpBezierSeg(s->u.b.pos,s,s->type == SEG_BEZTRK); + break; + } } } - EXPORT void FlipSegs( wIndex_t segCnt, trkSeg_p segs, @@ -468,12 +543,21 @@ EXPORT void FlipSegs( for (inx=0; inxu.p.cnt; inx++) { s->u.p.pts[inx].y = -s->u.p.pts[inx].y; } + MyFree(pts); break; case SEG_JNTTRK: s->u.j.pos.y = - s->u.j.pos.y; s->u.j.angle = NormalizeAngle( 180.0 - s->u.j.angle ); s->u.j.negate = ! s->u.j.negate; break; + case SEG_BEZTRK: + case SEG_BEZLIN: + s->u.b.pos[0].y = -s->u.b.pos[0].y; + s->u.b.pos[1].y = -s->u.b.pos[1].y; + s->u.b.pos[2].y = -s->u.b.pos[2].y; + s->u.b.pos[3].y = -s->u.b.pos[3].y; + FixUpBezierSeg(s->u.b.pos,s,s->type == SEG_BEZTRK); + break; } } } @@ -529,6 +613,20 @@ EXPORT void RescaleSegs( s->u.j.l0 *= scale_w; s->u.j.l1 *= scale_w; break; + case SEG_BEZTRK: + case SEG_BEZLIN: + s->u.b.pos[0].y *= scale_y; + s->u.b.pos[0].x *= scale_x; + s->u.b.pos[1].x *= scale_x; + s->u.b.pos[1].y *= scale_y; + s->u.b.pos[2].y *= scale_y; + s->u.b.pos[2].x *= scale_x; + s->u.b.pos[3].x *= scale_x; + s->u.b.pos[3].y *= scale_y; + FixUpBezierSeg(s->u.b.pos,s,s->type == SEG_BEZTRK); + + break; + } } } @@ -556,10 +654,20 @@ EXPORT void CloneFilledDraw( } else { memcpy( newPts, sp->u.p.pts, sp->u.p.cnt * sizeof *(coOrd*)0 ); } + //if (sp->u.p.pts) Can't do this a pts could be pointing at static + // free(sp->u.p.pts); sp->u.p.pts = newPts; break; case SEG_TEXT: - sp->u.t.string = MyStrdup( sp->u.t.string ); + sp->u.t.string = strdup( sp->u.t.string); + break; + case SEG_BEZTRK: + case SEG_BEZLIN: + sp->bezSegs.cnt = 0; + if (sp->bezSegs.ptr) MyFree(sp->bezSegs.ptr); + sp->bezSegs.ptr = NULL; + sp->bezSegs.max = 0; + FixUpBezierSeg(sp->u.b.pos,sp,sp->type == SEG_BEZTRK); break; default: break; @@ -583,8 +691,8 @@ EXPORT void FreeFilledDraw( sp->u.p.pts = NULL; break; case SEG_TEXT: - if ( sp->u.t.string ) - MyFree( sp->u.t.string ); + if (sp->u.t.string) + MyFree(sp->u.t.string); sp->u.t.string = NULL; break; default: @@ -593,6 +701,13 @@ EXPORT void FreeFilledDraw( } } +/* + * DistanceSegs + * + * Find the closest point on the Segs to the point pos. + * Return the distance to the point, the point on the curve and the index of the segment that contains it. + * + */ EXPORT DIST_T DistanceSegs( coOrd orig, @@ -606,6 +721,7 @@ EXPORT DIST_T DistanceSegs( coOrd p0, p1, p2, pt, lo, hi; BOOL_T found = FALSE; wIndex_t inx, lin; + segProcData_t segProcData2; p0 = *pos; Rotate( &p0, orig, -angle ); p0.x -= orig.x; @@ -645,27 +761,41 @@ EXPORT DIST_T DistanceSegs( } } break; + case SEG_BEZTRK: + case SEG_BEZLIN: + dd = 100000.0; + pt = p0; + for (int i = 0;ibezSegs.cnt;i++) { + segProcData2.distance.pos1 = pt; + SegProc(SEGPROC_DISTANCE,&DYNARR_N(trkSeg_t,segPtr->bezSegs,i),&segProcData2); + if (segProcData2.distance.ddu.t.pos, angle+segPtr->u.t.angle, segPtr->u.t.string, segPtr->u.t.fontSize, &lo, &hi );*/ - GetTextBounds( zero, 0, segPtr->u.t.string, segPtr->u.t.fontSize, &lo, &hi ); - Rotate( &p0, segPtr->u.t.pos, segPtr->u.t.angle ); + GetTextBounds( zero, 0, segPtr->u.t.string, segPtr->u.t.fontSize, &lo, &hi ); //lo and hi are relative to seg origin p0.x -= segPtr->u.t.pos.x; p0.y -= segPtr->u.t.pos.y; - if ( p0.x < hi.x && p0.y < hi.y ) { - DIST_T dx, dy; + Rotate( &p0, zero, -segPtr->u.t.angle ); + if (p0.x > lo.x && p0.x < hi.x && p0.y >lo.y && p0.y < hi.y) { //Within rectangle - therefore small dist hi.x /= 2.0; hi.y /= 2.0; - p0.x -= hi.x; - p0.y -= hi.y; - dx = fabs(p0.x/hi.x); - dy = fabs(p0.y/hi.y); - if ( dx > dy ) - dd = dx; - else - dd = dy; - dd *= 0.25*mainD.scale; - /*printf( "dx=%0.4f dy=%0.4f dd=%0.3f\n", dx, dy, dd );*/ + dd = 0.1*FindDistance(hi, p0)/FindDistance(lo,hi); // Proportion to mean that the closer we to the center or the smaller the target in overlapping cases, the more likely we pick it + break; } + hi.x /= 2.0; // rough center of rectangle + hi.y /= 2.0; + if (fabs((p0.x-hi.x)/hi.x) hi.x) dd = (p0.x - hi.x); + else dd = fabs(p0.x-hi.x); + } else { // Closer to y + if (p0.y > hi.y) dd = (p0.y - hi.y); + else dd = fabs(p0.y-hi.y); + } + /*printf( "dx=%0.4f dy=%0.4f dd=%0.3f\n", dx, dy, dd );*/ /* if ( p0.x >= lo.x && p0.x <= hi.x && p0.y >= lo.y && p0.y <= hi.y ) { @@ -698,22 +828,35 @@ EXPORT DIST_T DistanceSegs( return d; } - +/* + * Get the angle at a point on the segments closest to pos1 + * Optionally return the index of the segment and the distance to that point + * + */ EXPORT ANGLE_T GetAngleSegs( wIndex_t segCnt, trkSeg_p segPtr, - coOrd pos, - wIndex_t * segInxR ) + coOrd * pos1, // Now IN/OUT OUT = + wIndex_t * segInxR, + DIST_T * dist, + BOOL_T * seg_backwards, + wIndex_t * subSegInxR, + BOOL_T * negative_radius) { wIndex_t inx; ANGLE_T angle = 0.0; coOrd p0; DIST_T d, dd; segProcData_t segProcData; + coOrd pos2 = * pos1; + BOOL_T negative = FALSE; + BOOL_T backwards = FALSE; + if (subSegInxR) *subSegInxR = -1; - DistanceSegs( zero, 0.0, segCnt, segPtr, &pos, &inx ); + d = DistanceSegs( zero, 0.0, segCnt, segPtr, &pos2, &inx ); // + if (dist) * dist = d; segPtr += inx; - segProcData.getAngle.pos = pos; + segProcData.getAngle.pos = pos2; switch ( segPtr->type ) { case SEG_STRTRK: case SEG_STRLIN: @@ -728,18 +871,28 @@ EXPORT ANGLE_T GetAngleSegs( case SEG_FILCRCL: CurveSegProc( SEGPROC_GETANGLE, segPtr, &segProcData ); angle = segProcData.getAngle.angle; + negative = segProcData.getAngle.negative_radius; + backwards = segProcData.getAngle.backwards; break; case SEG_JNTTRK: JointSegProc( SEGPROC_GETANGLE, segPtr, &segProcData ); angle = segProcData.getAngle.angle; break; + case SEG_BEZTRK: + case SEG_BEZLIN: + BezierSegProc( SEGPROC_GETANGLE, segPtr, &segProcData ); + angle = segProcData.getAngle.angle; + negative = segProcData.getAngle.negative_radius; + backwards = segProcData.getAngle.backwards; + if (subSegInxR) *subSegInxR = segProcData.getAngle.bezSegInx; + break; case SEG_POLY: case SEG_FILPOLY: - p0 = pos; + p0 = pos2; dd = LineDistance( &p0, segPtr->u.p.pts[segPtr->u.p.cnt-1], segPtr->u.p.pts[0] ); angle = FindAngle( segPtr->u.p.pts[segPtr->u.p.cnt-1], segPtr->u.p.pts[0] ); for ( inx=0; inxu.p.cnt-1; inx++ ) { - p0 = pos; + p0 = pos2; d = LineDistance( &p0, segPtr->u.p.pts[inx], segPtr->u.p.pts[inx+1] ); if ( d < dd ) { dd = d; @@ -754,6 +907,10 @@ EXPORT ANGLE_T GetAngleSegs( AbortProg( "GetAngleSegs(%d)", segPtr->type ); } if ( segInxR ) *segInxR = inx; + if (seg_backwards) *seg_backwards = backwards; + if (negative_radius) *negative_radius = negative; + + * pos1 = pos2; return angle; } @@ -970,12 +1127,17 @@ EXPORT BOOL_T ReadSegs( void ) BOOL_T rc=FALSE; trkSeg_p s; trkEndPt_p e; - unsigned long rgb; + long rgb; int i; DIST_T elev0, elev1; BOOL_T hasElev; + BOOL_T isPolyV2; + BOOL_T improvedEnds; + FLOAT_T ignoreFloat; char type; - long option; + char * plain_text; + long option, option2; + BOOL_T subsegs = FALSE; descriptionOff = zero; tempSpecial[0] = '\0'; @@ -984,12 +1146,22 @@ EXPORT BOOL_T ReadSegs( void ) DYNARR_RESET( trkEndPt_t, tempEndPts_da ); pathCnt = 0; while ( (cp = GetNextLine()) != NULL ) { - while (isspace((unsigned char)*cp)) cp++; + while (isspace(*cp)) cp++; hasElev = FALSE; + improvedEnds = FALSE; if ( strncmp( cp, "END", 3 ) == 0 ) { rc = TRUE; + subsegs = FALSE; break; } + if ( strncmp(cp, "SUBSEGS", 7) == 0) { + subsegs = TRUE; + continue; + } + if (strncmp (cp, "SUBSEND", 7) == 0) { + subsegs = FALSE; + continue; + } if ( *cp == '\n' || *cp == '#' ) { continue; } @@ -999,13 +1171,20 @@ EXPORT BOOL_T ReadSegs( void ) cp++; hasElev = TRUE; } + isPolyV2 = FALSE; + if (*cp == '4') { + cp++; + hasElev = TRUE; + isPolyV2 = TRUE; + improvedEnds = TRUE; + } switch (type) { case SEG_STRLIN: case SEG_TBLEDGE: DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 ); s = &tempSegs(tempSegs_da.cnt-1); s->type = type; - if ( !GetArgs( cp, hasElev?"uwpfpf":"uwpYpY", + if ( !GetArgs( cp, hasElev?"lwpfpf":"lwpYpY", &rgb, &s->width, &s->u.l.pos[0], &elev0, &s->u.l.pos[1], &elev1 ) ) { rc = FALSE; break; @@ -1018,7 +1197,7 @@ EXPORT BOOL_T ReadSegs( void ) DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 ); s = &tempSegs(tempSegs_da.cnt-1); s->type = type; - if ( !GetArgs( cp, hasElev?"uwpfpfl":"uwpYpYZ", + if ( !GetArgs( cp, hasElev?"lwpfpfl":"lwpYpYZ", &rgb, &s->width, &s->u.l.pos[0], &elev0, &s->u.l.pos[1], &elev1, &option ) ) { rc = FALSE; break; @@ -1033,7 +1212,7 @@ EXPORT BOOL_T ReadSegs( void ) DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 ); s = &tempSegs(tempSegs_da.cnt-1); s->type = SEG_CRVLIN; - if ( !GetArgs( cp, hasElev?"uwfpfff":"uwfpYff", + if ( !GetArgs( cp, hasElev?"lwfpfff":"lwfpYff", &rgb, &s->width, &s->u.c.radius, &s->u.c.center, @@ -1048,20 +1227,27 @@ EXPORT BOOL_T ReadSegs( void ) DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 ); s = &tempSegs(tempSegs_da.cnt-1); s->type = SEG_STRTRK; - if ( !GetArgs( cp, hasElev?"uwpfpf":"uwpYpY", + s->bezSegs.max = 0; + s->bezSegs.cnt = 0; + s->bezSegs.ptr = NULL; + if ( !GetArgs( cp, hasElev?"lwpfpf":"lwpYpY", &rgb, &s->width, &s->u.l.pos[0], &elev0, &s->u.l.pos[1], &elev1 ) ) { rc = FALSE; break; } + rgb = 0; s->color = wDrawFindColor( rgb ); break; case SEG_CRVTRK: DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 ); s = &tempSegs(tempSegs_da.cnt-1); s->type = SEG_CRVTRK; - if ( !GetArgs( cp, hasElev?"uwfpfff":"uwfpYff", + s->bezSegs.max = 0; + s->bezSegs.cnt = 0; + s->bezSegs.ptr = NULL; + if ( !GetArgs( cp, hasElev?"lwfpfff":"lwfpYff", &rgb, &s->width, &s->u.c.radius, &s->u.c.center, @@ -1070,13 +1256,14 @@ EXPORT BOOL_T ReadSegs( void ) rc = FALSE; break; } + rgb = 0; s->color = wDrawFindColor( rgb ); break; case SEG_JNTTRK: DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 ); s = &tempSegs(tempSegs_da.cnt-1); s->type = SEG_JNTTRK; - if ( !GetArgs( cp, hasElev?"uwpffffffl":"uwpYfffffl", + if ( !GetArgs( cp, hasElev?"lwpffffffl":"lwpYfffffl", &rgb, &s->width, &s->u.j.pos, &elev0, @@ -1092,13 +1279,51 @@ EXPORT BOOL_T ReadSegs( void ) s->u.j.negate = ( option&1 )!=0; s->u.j.flip = ( option&2 )!=0; s->u.j.Scurve = ( option&4 )!=0; + rgb = 0; s->color = wDrawFindColor( rgb ); break; + case SEG_BEZTRK: + DYNARR_APPEND( trkSeg_t, tempSegs_da, 10); + s = &tempSegs(tempSegs_da.cnt-1); + s->type=SEG_BEZTRK; + s->bezSegs.max=0; + s->bezSegs.ptr= NULL; + s->bezSegs.cnt=0; + if ( !GetArgs( cp, "lwpppp", + &rgb, &s->width, + &s->u.b.pos[0], + &s->u.b.pos[1], + &s->u.b.pos[2], + &s->u.b.pos[3])) { + rc = FALSE; + break; + } + rgb = 0; + s->color = wDrawFindColor( rgb ); + break; + case SEG_BEZLIN: + DYNARR_APPEND( trkSeg_t, tempSegs_da, 10); + s = &tempSegs(tempSegs_da.cnt-1); + s->type=SEG_BEZLIN; + s->bezSegs.max=0; + s->bezSegs.ptr= NULL; + s->bezSegs.cnt=0; + if ( !GetArgs( cp, "lwpppp", + &rgb, &s->width, + &s->u.b.pos[0], + &s->u.b.pos[1], + &s->u.b.pos[2], + &s->u.b.pos[3])) { + rc = FALSE; + break; + } + s->color = wDrawFindColor( rgb ); + break; case SEG_FILCRCL: DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 ); s = &tempSegs(tempSegs_da.cnt-1); s->type = SEG_FILCRCL; - if ( !GetArgs( cp, hasElev?"uwfpf":"uwfpY", + if ( !GetArgs( cp, hasElev?"lwfpf":"lwfpY", &rgb, &s->width, &s->u.c.radius, &s->u.c.center, @@ -1115,11 +1340,20 @@ EXPORT BOOL_T ReadSegs( void ) DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 ); s = &tempSegs(tempSegs_da.cnt-1); s->type = type; - if ( !GetArgs( cp, "uwd", - &rgb, &s->width, - &s->u.p.cnt ) ) { - rc = FALSE; - /*??*/break; + if (isPolyV2) { + if ( !GetArgs( cp, "lwdd", + &rgb, &s->width, + &s->u.p.cnt, &s->u.p.polyType) ) { + rc = FALSE; + /*??*/break; + } + } else { + if ( !GetArgs( cp, "lwd", + &rgb, &s->width, + &s->u.p.cnt) ) { + rc = FALSE; + /*??*/break; + } } s->color = wDrawFindColor( rgb ); s->u.p.pts = (coOrd*)MyMalloc( s->u.p.cnt * sizeof *(coOrd*)NULL ); @@ -1138,10 +1372,14 @@ EXPORT BOOL_T ReadSegs( void ) s = &tempSegs(tempSegs_da.cnt-1); s->type = type; s->u.t.fontP = NULL; - if ( !GetArgs( cp, "upf0fq", &rgb, &s->u.t.pos, &s->u.t.angle, &s->u.t.fontSize, &s->u.t.string ) ) { + char * expandedText; + if ( !GetArgs( cp, "lpf0fq", &rgb, &s->u.t.pos, &s->u.t.angle, &s->u.t.fontSize, &expandedText ) ) { rc = FALSE; /*??*/break; } + plain_text = ConvertFromEscapedText(expandedText); + s->u.t.string = plain_text; + MyFree(expandedText); s->color = wDrawFindColor( rgb ); break; case SEG_UNCEP: @@ -1150,8 +1388,8 @@ EXPORT BOOL_T ReadSegs( void ) e = &tempEndPts(tempEndPts_da.cnt-1); if (type == SEG_CONEP) { if ( !GetArgs( cp, "dc", &e->index, &cp ) ) { - rc = FALSE; - /*??*/break; + rc = FALSE; + /*??*/break; } } else { e->index = -1; @@ -1165,6 +1403,27 @@ EXPORT BOOL_T ReadSegs( void ) e->elev.u.height = 0.0; e->elev.doff = zero; e->option = 0; + if (improvedEnds) { //E4 and T4 + if (!GetArgs( cp, "lpc", &option, &e->elev.doff, &cp )) { + rc = FALSE; + /*??*/break; + } + switch (option&ELEV_MASK) { + case ELEV_STATION: + GetArgs( cp, "qc", &e->elev.u.name, &cp); + break; + default: + GetArgs( cp, "fc", &e->elev.u.height, &cp); //First height + } + DIST_T height2; + if (!GetArgs( cp, "flLlc", &height2, &option2, &e->elev.option, &e->option, &cp ) ) { + rc = FALSE; + break; + } + if (option2) e->elev.option |= ELEV_VISIBLE; + GetArgs(cp, "fc", &ignoreFloat, &cp); + break; + } if ( cp != NULL ) { if (paramVersion < 7) { GetArgs( cp, "dfp", &e->elev.option, &e->elev.u.height, &e->elev.doff, &cp ); @@ -1188,7 +1447,7 @@ EXPORT BOOL_T ReadSegs( void ) } break; case SEG_PATH: - while (isspace((unsigned char)*cp)) cp++; + while (isspace(*cp)) cp++; if (*cp == '\"') cp++; while ( *cp != '\"') AppendPath((signed char)*cp++); AppendPath(0); @@ -1220,55 +1479,34 @@ EXPORT BOOL_T ReadSegs( void ) } } AppendPath( 0 ); - -#ifdef LATER - if ( logTable(log_readTracks).level >= 4 ) { - for (s=&tempSegs(0); s<&tempSegs(tempSegs_da.cnt); s++) { - switch (s->type) { - case SEG_STRTRK: - case SEG_STRLIN: - case SEG_DIMLIN: - case SEG_BENCH: - case SEG_TBLEDGE: - LogPrintf( "seg[%d] = %c [%0.3f %0.3f] [%0.3f %0.3f]\n", - tempSegs_da.cnt, s->type, - s->u.l.pos[0].x, s->u.l.pos[0].y, - s->u.l.pos[1].x, s->u.l.pos[1].y ); - break; - case SEG_CRVTRK: - case SEG_CRVLIN: - LogPrintf( "seg[%d] = %c R=%0.3f A0=%0.3f A1=%0.3f [%0.3f %0.3f]\n", - tempSegs_da.cnt, s->type, - s->u.c.radius, - s->u.c.center.x, s->u.c.center.y, - s->u.c.a0, s->u.c.a1 ); - break; - case SEG_JNTTRK: - LogPrintf( "seg[%d] = %c\n", - tempSegs_da.cnt, s->type ); - break; - } - } - } -#endif return rc; } - EXPORT BOOL_T WriteSegs( FILE * f, wIndex_t segCnt, trkSeg_p segs ) +{ + return WriteSegsEnd(f,segCnt,segs,TRUE); +} + + +EXPORT BOOL_T WriteSegsEnd( + FILE * f, + wIndex_t segCnt, + trkSeg_p segs, BOOL_T writeEnd) + { int i, j; BOOL_T rc = TRUE; long option; + char * escaped_text; for ( i=0; i 0; break; @@ -1294,16 +1532,16 @@ EXPORT BOOL_T WriteSegs( BenchOutputOption(segs[i].u.l.option) ) > 0; break; case SEG_CRVTRK: - rc &= fprintf( f, "\t%c %ld %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f\n", - segs[i].type, wDrawGetRGB(segs[i].color), segs[i].width, + rc &= fprintf( f, "\t%c 0 %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f\n", + segs[i].type, segs[i].width, segs[i].u.c.radius, segs[i].u.c.center.x, segs[i].u.c.center.y, segs[i].u.c.a0, segs[i].u.c.a1 ) > 0; break; case SEG_JNTTRK: option = (segs[i].u.j.negate?1:0) + (segs[i].u.j.flip?2:0) + (segs[i].u.j.Scurve?4:0); - rc &= fprintf( f, "\t%c %ld %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %ld\n", - segs[i].type, wDrawGetRGB(segs[i].color), segs[i].width, + rc &= fprintf( f, "\t%c 0 %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %ld\n", + segs[i].type, segs[i].width, segs[i].u.j.pos.x, segs[i].u.j.pos.y, segs[i].u.j.angle, segs[i].u.j.l0, @@ -1312,12 +1550,25 @@ EXPORT BOOL_T WriteSegs( segs[i].u.j.L, option )>0; break; + case SEG_BEZTRK: + case SEG_BEZLIN: + rc &= fprintf( f, "\t%c3 0 %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f\n", + segs[i].type, segs[i].width, + segs[i].u.l.pos[0].x, segs[i].u.l.pos[0].y, + segs[i].u.l.pos[1].x, segs[i].u.l.pos[1].y, + segs[i].u.l.pos[2].x, segs[i].u.l.pos[2].y, + segs[i].u.l.pos[3].x, segs[i].u.l.pos[3].y ) > 0; + rc &= fprintf(f,"\tSUBSEGS\n"); + rc &= WriteSegsEnd(f,segs[i].bezSegs.cnt,segs[i].bezSegs.ptr,FALSE); + rc &= fprintf(f,"\tSUBSEND\n"); + break; case SEG_CRVLIN: rc &= fprintf( f, "\t%c3 %ld %0.6f %0.6f %0.6f %0.6f 0 %0.6f %0.6f\n", segs[i].type, wDrawGetRGB(segs[i].color), segs[i].width, segs[i].u.c.radius, segs[i].u.c.center.x, segs[i].u.c.center.y, segs[i].u.c.a0, segs[i].u.c.a1 ) > 0; + break; case SEG_FILCRCL: rc &= fprintf( f, "\t%c3 %ld %0.6f %0.6f %0.6f %0.6f 0\n", @@ -1327,22 +1578,24 @@ EXPORT BOOL_T WriteSegs( break; case SEG_POLY: case SEG_FILPOLY: - rc &= fprintf( f, "\t%c3 %ld %0.6f %d\n", + rc &= fprintf( f, "\t%c4 %ld %0.6f %d %d \n", segs[i].type, wDrawGetRGB(segs[i].color), segs[i].width, - segs[i].u.p.cnt ) > 0; + segs[i].u.p.cnt, segs[i].u.p.polyType ) > 0; for ( j=0; j 0; break; case SEG_TEXT: /* 0pf0fq */ + escaped_text = ConvertToEscapedText(segs[i].u.t.string); rc &= fprintf( f, "\t%c %ld %0.6f %0.6f %0.6f 0 %0.6f \"%s\"\n", segs[i].type, wDrawGetRGB(segs[i].color), segs[i].u.t.pos.x, segs[i].u.t.pos.y, segs[i].u.t.angle, - segs[i].u.t.fontSize, PutTitle(segs[i].u.t.string) ) > 0; + segs[i].u.t.fontSize, escaped_text ) > 0; + MyFree(escaped_text); break; } } - rc &= fprintf( f, "\tEND\n" )>0; + if (writeEnd) rc &= fprintf( f, "\tEND\n" )>0; return rc; } @@ -1354,20 +1607,27 @@ EXPORT void SegProc( { switch (segPtr->type) { case SEG_STRTRK: + case SEG_STRLIN: StraightSegProc( cmd, segPtr, data ); break; case SEG_CRVTRK: + case SEG_CRVLIN: CurveSegProc( cmd, segPtr, data ); break; case SEG_JNTTRK: JointSegProc( cmd, segPtr, data ); break; - default: + case SEG_BEZTRK: + case SEG_BEZLIN: + BezierSegProc( cmd, segPtr, data); + break; + default: AbortProg( "SegProg( %d )", segPtr->type ); break; } } + /* * Draw Segs @@ -1456,6 +1716,10 @@ EXPORT void DrawDimLine( DrawLine( d, p, p1, 0, color ); } +/* + * Display the array of segments. + * Note that Bezier segments in particular contain sub-arrays of Curve and Straight segments. + */ EXPORT void DrawSegsO( drawCmd_p d, track_p trk, @@ -1468,13 +1732,12 @@ EXPORT void DrawSegsO( long options ) { wIndex_t i, j; - coOrd p0, p1, c; + coOrd p0, p1, p2, p3, c; ANGLE_T a0; wDrawColor color1, color2; DIST_T factor = d->dpi/d->scale; trkSeg_p tempPtr; - static dynArr_t tempPts_da; -#define tempPts(N) DYNARR_N( coOrd, tempPts_da, N ) + long option; wFontSize_t fs; @@ -1503,13 +1766,33 @@ EXPORT void DrawSegsO( REORIGIN( p0, segPtr->u.j.pos, angle, orig ); DrawJointTrack( d, p0, NormalizeAngle(segPtr->u.j.angle+angle), segPtr->u.j.l0, segPtr->u.j.l1, segPtr->u.j.R, segPtr->u.j.L, segPtr->u.j.negate, segPtr->u.j.flip, segPtr->u.j.Scurve, trk, -1, -1, trackGauge, color1, options ); break; - } + case SEG_BEZTRK: + REORIGIN(p0, segPtr->u.b.pos[0], angle, orig); + REORIGIN(p1, segPtr->u.b.pos[1], angle, orig); + REORIGIN(p2, segPtr->u.b.pos[2], angle, orig); + REORIGIN(p3, segPtr->u.b.pos[3], angle, orig); + tempPtr = segPtr->bezSegs.ptr; + for(int j=0;jbezSegs.cnt;j++,tempPtr++) { //Loop through sub parts (only Trks supported) + if (tempPtr->type == SEG_CRVTRK) { + a0 = NormalizeAngle(tempPtr->u.c.a0 + angle); + REORIGIN( c, tempPtr->u.c.center, angle, orig ); + DrawCurvedTies( d, trk, c, fabs(tempPtr->u.c.radius), a0, tempPtr->u.c.a1, color ); + } + if (tempPtr->type == SEG_STRTRK) { + REORIGIN( p0, tempPtr->u.l.pos[0], angle, orig ) + REORIGIN( p1, tempPtr->u.l.pos[1], angle, orig ) + DrawStraightTies( d, trk, p0, p1, color ); + } + } + break; + } continue; } switch (segPtr->type) { case SEG_STRTRK: case SEG_CRVTRK: case SEG_JNTTRK: + case SEG_BEZTRK: case SEG_TEXT: break; default: @@ -1593,24 +1876,79 @@ EXPORT void DrawSegsO( FALSE, (wDrawWidth)floor(segPtr->width*factor+0.5), color1 ); } break; + case SEG_BEZTRK: + case SEG_BEZLIN: + if (segPtr->type == SEG_BEZTRK) { + if (color1 == wDrawColorBlack) + color1 = normalColor; + if ( segPtr->color == wDrawColorWhite ) + break; + } + REORIGIN(p0, segPtr->u.b.pos[0], angle, orig); + REORIGIN(p1, segPtr->u.b.pos[1], angle, orig); + REORIGIN(p2, segPtr->u.b.pos[2], angle, orig); + REORIGIN(p3, segPtr->u.b.pos[3], angle, orig); + + for(int j=0;jbezSegs.cnt;j++) { //Loop through sub Segs + tempPtr = &DYNARR_N(trkSeg_t,segPtr->bezSegs,j); + switch (tempPtr->type) { + case SEG_CRVTRK: + case SEG_CRVLIN: + a0 = NormalizeAngle(tempPtr->u.c.a0 + angle); + REORIGIN( c, tempPtr->u.c.center, angle, orig ); + if (tempPtr->type == SEG_CRVTRK) { + if (color1 == wDrawColorBlack) color1 = normalColor; + if ( tempPtr->color == wDrawColorWhite ) break; + p0.x = p0.y = p1.x = p1.y = 0; + DrawCurvedTrack( d, + c, + fabs(tempPtr->u.c.radius), + a0, tempPtr->u.c.a1, + p0, p1, + NULL, trackGauge, color1, options ); + } else if (tempPtr->type == SEG_CRVLIN) { + DrawArc( d, c, fabs(tempPtr->u.c.radius), a0, tempPtr->u.c.a1, + FALSE, (wDrawWidth)floor(tempPtr->width*factor+0.5), color1 ); + } + break; + case SEG_STRTRK: + if (color1 == wDrawColorBlack) color1 = normalColor; + if ( tempPtr->color == wDrawColorWhite ) break; + REORIGIN(p0,tempPtr->u.l.pos[0], angle, orig); + REORIGIN(p1,tempPtr->u.l.pos[1], angle, orig); + DrawStraightTrack( d, + p0, p1, + FindAngle(p0, p1 ), + NULL, trackGauge, color1, options ); + break; + case SEG_STRLIN: + REORIGIN(p0,tempPtr->u.l.pos[0], angle, orig); + REORIGIN(p1,tempPtr->u.l.pos[1], angle, orig); + DrawLine( d, p0, p1, (wDrawWidth)floor(tempPtr->width*factor+0.5), color1 ); + break; + } + } + break; case SEG_JNTTRK: REORIGIN( p0, segPtr->u.j.pos, angle, orig ); DrawJointTrack( d, p0, NormalizeAngle(segPtr->u.j.angle+angle), segPtr->u.j.l0, segPtr->u.j.l1, segPtr->u.j.R, segPtr->u.j.L, segPtr->u.j.negate, segPtr->u.j.flip, segPtr->u.j.Scurve, NULL, -1, -1, trackGauge, color1, options ); break; case SEG_TEXT: REORIGIN( p0, segPtr->u.t.pos, angle, orig ) - DrawString( d, p0, NormalizeAngle(angle+segPtr->u.t.angle), segPtr->u.t.string, segPtr->u.t.fontP, segPtr->u.t.fontSize, color1 ); + DrawMultiString( d, p0, segPtr->u.t.string, segPtr->u.t.fontP, segPtr->u.t.fontSize, color1, NormalizeAngle(angle + segPtr->u.t.angle), NULL, NULL ); break; case SEG_FILPOLY: if ( (d->options&DC_GROUP) == 0 && d->funcs != &tempSegDrawFuncs ) { /* Note: if we call tempSegDrawFillPoly we get a nasty bug /+ because we don't make a private copy of p.pts */ - DYNARR_SET( coOrd, tempPts_da, segPtr->u.p.cnt ); - for ( j=0; ju.p.cnt; j++ ) { - REORIGIN( tempPts(j), segPtr->u.p.pts[j], angle, orig ) + coOrd *tempPts = malloc(sizeof(coOrd)*segPtr->u.p.cnt); +// coOrd tempPts[segPtr->u.p.cnt]; + for (j=0;ju.p.cnt;j++) { + REORIGIN( tempPts[j], segPtr->u.p.pts[j], angle, orig ); } - DrawFillPoly( d, segPtr->u.p.cnt, &tempPts(0), color1 ); + DrawFillPoly( d, segPtr->u.p.cnt, tempPts, color1 ); + free(tempPts); break; } /* else fall thru */ case SEG_POLY: @@ -1646,6 +1984,9 @@ EXPORT void DrawSegsO( } +/* + * Draw Segments without setting DTS_ options. + */ EXPORT void DrawSegs( drawCmd_p d, @@ -1659,4 +2000,24 @@ EXPORT void DrawSegs( DrawSegsO( d, NULL, orig, angle, segPtr, segCnt, trackGauge, color, 0 ); } +/* + * Free dynamic storage added to each of an array of Track Segments. + */ +EXPORT void CleanSegs(dynArr_t * seg_p) { + if (seg_p->cnt ==0) return; + for (int i=0;icnt;i++) { + trkSeg_t t = DYNARR_N(trkSeg_t,* seg_p,i); + if (t.type == SEG_BEZLIN || t.type == SEG_BEZTRK) { + if (t.bezSegs.ptr) MyFree(t.bezSegs.ptr); + t.bezSegs.cnt = 0; + t.bezSegs.max = 0; + t.bezSegs.ptr = NULL; + } + } + seg_p->cnt = 0; + if (seg_p->ptr) MyFree(seg_p->ptr); + seg_p->ptr = NULL; + seg_p->max = 0; +} + diff --git a/app/bin/tstraigh.c b/app/bin/tstraigh.c index 0f5f273..5cf1cda 100644 --- a/app/bin/tstraigh.c +++ b/app/bin/tstraigh.c @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/tstraigh.c,v 1.2 2008-01-20 23:29:15 mni77 Exp $ +/** \file tstraigh.c + * Straight track */ /* XTrkCad - Model Railroad CAD @@ -20,9 +20,17 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "track.h" +#include + #include "cstraigh.h" +#include "cundo.h" +#include "fileio.h" #include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "param.h" +#include "track.h" +#include "utility.h" /******************************************************************************* * @@ -70,13 +78,13 @@ static struct { ANGLE_T angle; FLOAT_T grade; descPivot_t pivot; - LAYER_T layerNumber; + unsigned int layerNumber; } strData; typedef enum { E0, Z0, E1, Z1, LN, AN, GR, PV, LY } strDesc_e; static descData_t strDesc[] = { -/*E0*/ { DESC_POS, N_("End Pt 1: X"), &strData.endPt[0] }, +/*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &strData.endPt[0] }, /*Z0*/ { DESC_DIM, N_("Z"), &strData.elev[0] }, -/*E1*/ { DESC_POS, N_("End Pt 2: X"), &strData.endPt[1] }, +/*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &strData.endPt[1] }, /*Z1*/ { DESC_DIM, N_("Z"), &strData.elev[1] }, /*LN*/ { DESC_DIM, N_("Length"), &strData.length }, /*AN*/ { DESC_ANGLE, N_("Angle"), &strData.angle }, @@ -420,7 +428,7 @@ static BOOL_T TrimStraight( track_p trk, EPINX_T ep, DIST_T dist ) AdjustStraightEndPt( trk, ep, pos ); DrawNewTrack( trk ); } else - DeleteTrack( trk, FALSE ); + DeleteTrack( trk, TRUE ); return TRUE; } @@ -548,6 +556,7 @@ static STATUS_T ModifyStraight( track_p trk, wAction_t action, coOrd pos ) InfoMessage( _("Straight: Length=%s Angle=%0.3f"), FormatDistance( d ), PutAngle( GetTrkEndAngle( trk, ep ) ) ); MainRedraw(); + MapRedraw(); return C_CONTINUE; case C_UP: @@ -556,6 +565,7 @@ static STATUS_T ModifyStraight( track_p trk, wAction_t action, coOrd pos ) tempSegs_da.cnt = 0; DrawNewTrack( trk ); MainRedraw(); + MapRedraw(); return C_TERMINATE; default: @@ -576,14 +586,19 @@ static BOOL_T GetParamsStraight( int inx, track_p trk, coOrd pos, trackParams_t params->type = curveTypeStraight; if ( inx == PARAMS_PARALLEL ) { params->ep = 0; + } else if (inx == PARAMS_CORNU ){ + params->ep = PickEndPoint( pos, trk); + params->arcP = zero; + params->arcR = 0.0; } else { - params->ep = PickUnconnectedEndPoint( pos, trk ); - if (params->ep == -1) - return FALSE; + params->ep = PickUnconnectedEndPointSilent( pos, trk ); } + if (params->ep == -1) + return FALSE; params->lineOrig = GetTrkEndPos(trk,1-params->ep); params->lineEnd = GetTrkEndPos(trk,params->ep); params->len = FindDistance( params->lineOrig, params->lineEnd ); + params->track_angle = FindAngle( params->lineOrig, params->lineEnd); params->angle = GetTrkEndAngle(trk,params->ep); params->arcR = 0.0; return TRUE; @@ -610,6 +625,8 @@ static BOOL_T QueryStraight( track_p trk, int query ) case Q_CAN_MODIFYRADIUS: case Q_CAN_GROUP: case Q_ISTRACK: + case Q_CORNU_CAN_MODIFY: + case Q_MODIFY_CAN_SPLIT: return TRUE; default: return FALSE; @@ -703,9 +720,13 @@ EXPORT void StraightSegProc( case SEGPROC_TRAVERSE1: a1 = FindAngle( segPtr->u.l.pos[0], segPtr->u.l.pos[1] ); - a2 = NormalizeAngle( data->traverse1.angle+a1 ); - data->traverse1.backwards = (a2 < 270 && a2 > 90 ); + a2 = NormalizeAngle( a1-data->traverse1.angle ); + data->traverse1.backwards = ((a2 < 270) && (a2 > 90)); data->traverse1.dist = FindDistance( segPtr->u.l.pos[data->traverse1.backwards?1:0], data->traverse1.pos ); + data->traverse1.reverse_seg = FALSE; + data->traverse1.negative = FALSE; + data->traverse1.segs_backwards = FALSE; + data->traverse1.BezSegInx = 0; break; case SEGPROC_TRAVERSE2: @@ -716,7 +737,10 @@ EXPORT void StraightSegProc( data->traverse2.dist = 0; data->traverse2.angle = a1; } else { + a1 = FindAngle( segPtr->u.l.pos[data->traverse2.segDir], segPtr->u.l.pos[1-data->traverse2.segDir] ); + Translate( &data->traverse2.pos, segPtr->u.l.pos[data->traverse2.segDir], a1, d ); data->traverse2.dist -= d; + data->traverse2.angle = a1; } break; @@ -768,9 +792,12 @@ EXPORT void StraightSegProc( data->split.newSeg[1] = *segPtr; data->split.newSeg[0].u.l.pos[1] = data->split.newSeg[1].u.l.pos[0] = p0; break; - + /* + * Note GetAngle always gives a positive angle because p0 is always left of p1 + */ case SEGPROC_GETANGLE: data->getAngle.angle = FindAngle( segPtr->u.l.pos[0], segPtr->u.l.pos[1] ); + data->getAngle.radius = 0.0; break; } } @@ -788,7 +815,7 @@ track_p NewStraightTrack( coOrd p0, coOrd p1 ) track_p t; ANGLE_T a; t = NewTrack( 0, T_STRAIGHT, 2, 0 ); - SetTrkScale( t, curScaleInx ); + SetTrkScale( t, GetLayoutCurScale() ); a = FindAngle( p1, p0 ); SetTrkEndPoint( t, 0, p0, a ); SetTrkEndPoint( t, 1, p1, NormalizeAngle( a+180.0 ) ); diff --git a/app/bin/unittest/CMakeLists.txt b/app/bin/unittest/CMakeLists.txt index b6d2bc5..32e2ddb 100644 --- a/app/bin/unittest/CMakeLists.txt +++ b/app/bin/unittest/CMakeLists.txt @@ -9,4 +9,23 @@ target_link_libraries(dxfformattest dynstring ${LIBS}) -add_test(DXFOutputTest dxfformattest) \ No newline at end of file +add_test(DXFOutputTest dxfformattest) + +add_executable( pathstest + pathstest.c + ) + +target_link_libraries(pathstest + dynstring + ${LIBS}) + +add_test(PathsTest pathstest) + +add_executable( defaultstest + defaultstest.c + ) + +target_link_libraries(defaultstest + ${LIBS}) + +add_test(DefaultsTest defaultstest) diff --git a/app/bin/unittest/defaultstest.c b/app/bin/unittest/defaultstest.c new file mode 100644 index 0000000..d877f46 --- /dev/null +++ b/app/bin/unittest/defaultstest.c @@ -0,0 +1,110 @@ +/** \file PathsTest.c +* Unit tests for the paths module +*/ + +#include +#include +#include +#include +#include +#include + +#include "common.h" + +#include "../appdefaults.c" + +struct appDefault tests[] = { + {"akey"}, + {"hkey"}, + {"mkey"}, + {"zkey"} +}; + + +const char *libDir ="Parameter/directory/"; + +/** + * A dummy for the real MakePath function + */ + +void +MakeFullpath( char **result, ...) +{ + *result = libDir; +} + +#define TESTARRAYSIZE (sizeof(tests) / sizeof(tests[0]) ) + +struct appDefault test1[] = { + { "akey" } +}; + +#define TEST1ARRAYSIZE (sizeof(test1) / sizeof(test1[0]) ) + + +int +wPrefGetIntegerBasic(const char *section, const char *name, long *result, long defaultValue) +{ + *result = defaultValue; + return(TRUE); +} + +int +wPrefGetFloatBasic(const char *section, const char *name, double *result, double defaultValue) +{ + *result = defaultValue; + return(TRUE); +} + +const char * wPrefGetStringBasic(const char *section, const char *name) +{ + return(NULL); +} + +static void BinarySearch(void **state) +{ + int result; + (void)state; + + result = binarySearch(tests, 0, TESTARRAYSIZE-1, "nokey"); + assert_int_equal(result, -1); + + result = binarySearch(tests, 0, TESTARRAYSIZE-1, "akey"); + assert_int_equal(result, 0); + + result = binarySearch(tests, 1, TESTARRAYSIZE-1, "mkey"); + assert_int_equal(result, 2); + + result = binarySearch(tests, 0, TESTARRAYSIZE-1, "zkey"); + assert_int_equal(result, 3); + + result = binarySearch(test1, 0, TEST1ARRAYSIZE-1, "akey"); + assert_int_equal(result, 0); + + result = binarySearch(test1, 0, TEST1ARRAYSIZE-1, "zkey"); + assert_int_equal(result, -1); + +} + +static void GetDefaults(void **state) +{ + double value = 0.0; + long intValue = 0; + (void)state; + + wPrefGetIntegerExt("DialogItem", "cmdopt-preselect", &intValue, 2); + assert_int_equal(intValue, 1); + + wPrefGetIntegerExt("DialogItem", "cmdopt-preselect", &intValue, 2); + assert_int_equal(intValue, 2); + +} + +int main(void) +{ + const struct CMUnitTest tests[] = { + cmocka_unit_test(BinarySearch), + cmocka_unit_test(GetDefaults) + }; + return cmocka_run_group_tests(tests, NULL, NULL); +} diff --git a/app/bin/unittest/pathstest.c b/app/bin/unittest/pathstest.c new file mode 100644 index 0000000..b7e792e --- /dev/null +++ b/app/bin/unittest/pathstest.c @@ -0,0 +1,121 @@ +/** \file PathsTest.c +* Unit tests for the paths module +*/ + +#include +#include +#include +#include +#include +#include + +#include +#include "../paths.h" + +#ifdef WINDOWS +#define TESTPATH "C:\\Test\\Path" +#define TESTFILENAME "file.test" +#define TESTFILE TESTPATH "\\" TESTFILENAME +#define TESTPATH2 "D:\\Root" +#define TESTFILE2 TESTPATH2 "\\file2." + +#define TESTRELATIVEPATH "Test\\Path" +#define DEFAULTPATH "C:\\Default\\Path" +#else +#define TESTPATH "/Test/Path" +#define TESTFILENAME "file.test" +#define TESTFILE TESTPATH "/" TESTFILENAME +#define TESTPATH2 "/Root" +#define TESTFILE2 TESTPATH2 "/file2." + +#define TESTRELATIVEPATH "Test/Path" +#define DEFAULTPATH "/Default/Path" + +#endif //WINDOWS +void +wPrefSetString(const char *section, const char *key, const char *value) +{} + +char *wPrefGetStringExt(const char *section, const char *key) +{ + return(NULL); +} + +const char *wGetUserHomeDir(void) +{ + return(DEFAULTPATH); +} + +#include "../paths.c" + +static void SetGetPath(void **state) +{ + char *string; + (void)state; + + string = GetCurrentPath("Test"); + assert_string_equal(string, DEFAULTPATH); + + SetCurrentPath("Test", TESTFILE ); + string = GetCurrentPath("Test"); + assert_string_equal(string, TESTPATH); + + SetCurrentPath("Test", TESTFILE2); + string = GetCurrentPath("Test"); + assert_string_equal(string, TESTPATH2); +} + +static void Makepath(void **state) +{ + (void)state; + char *path; + +#ifdef WINDOWS + MakeFullpath(&path, + "C:", + TESTRELATIVEPATH, + TESTFILENAME, + NULL); + + assert_string_equal(path, "C:" TESTRELATIVEPATH "\\" TESTFILENAME); +#else + MakeFullpath(&path, + TESTRELATIVEPATH, + TESTFILENAME, + NULL); + + assert_string_equal(path, TESTRELATIVEPATH "/" TESTFILENAME); +#endif // WINDOWS + + free(path); + +#ifdef WINDOWS + MakeFullpath(&path, + "C:", + "test", + "\\subdir", + TESTFILENAME, + NULL); + assert_string_equal(path, "C:test\\subdir\\" TESTFILENAME); +#else + MakeFullpath(&path, + "test", + "/subdir", + TESTFILENAME, + NULL); + assert_string_equal(path, "test/subdir/" TESTFILENAME); + +#endif // WINDOWS + + + free(path); +} + +int main(void) +{ + const struct CMUnitTest tests[] = { + cmocka_unit_test(SetGetPath), + cmocka_unit_test(Makepath), + }; + return cmocka_run_group_tests(tests, NULL, NULL); +} diff --git a/app/bin/uthash.h b/app/bin/uthash.h new file mode 100644 index 0000000..39fd891 --- /dev/null +++ b/app/bin/uthash.h @@ -0,0 +1,960 @@ +/* +Copyright (c) 2003-2014, Troy D. Hanson http://troydhanson.github.com/uthash/ +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef UTHASH_H +#define UTHASH_H + +#include /* memcmp,strlen */ +#include /* ptrdiff_t */ +#include /* exit() */ + +/* These macros use decltype or the earlier __typeof GNU extension. + As decltype is only available in newer compilers (VS2010 or gcc 4.3+ + when compiling c++ source) this code uses whatever method is needed + or, for VS2008 where neither is available, uses casting workarounds. */ +#if defined(_MSC_VER) /* MS compiler */ +#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */ +#define DECLTYPE(x) (decltype(x)) +#else /* VS2008 or older (or VS2010 in C mode) */ +#define NO_DECLTYPE +#define DECLTYPE(x) +#endif +#elif defined(__BORLANDC__) || defined(__LCC__) || defined(__WATCOMC__) +#define NO_DECLTYPE +#define DECLTYPE(x) +#else /* GNU, Sun and other compilers */ +#define DECLTYPE(x) (__typeof(x)) +#endif + +#ifdef NO_DECLTYPE +#define DECLTYPE_ASSIGN(dst,src) \ +do { \ + char **_da_dst = (char**)(&(dst)); \ + *_da_dst = (char*)(src); \ +} while(0) +#else +#define DECLTYPE_ASSIGN(dst,src) \ +do { \ + (dst) = DECLTYPE(dst)(src); \ +} while(0) +#endif + +/* a number of the hash function use uint32_t which isn't defined on Pre VS2010 */ +#if defined (_WIN32) +#if defined(_MSC_VER) && _MSC_VER >= 1600 +#include +#elif defined(__WATCOMC__) +#include +#else +typedef unsigned int uint32_t; +typedef unsigned char uint8_t; +#endif +#else +#include +#endif + +#define UTHASH_VERSION 1.9.9 + +#ifndef uthash_fatal +#define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */ +#endif +#ifndef uthash_malloc +#define uthash_malloc(sz) malloc(sz) /* malloc fcn */ +#endif +#ifndef uthash_free +#define uthash_free(ptr,sz) free(ptr) /* free fcn */ +#endif + +#ifndef uthash_noexpand_fyi +#define uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */ +#endif +#ifndef uthash_expand_fyi +#define uthash_expand_fyi(tbl) /* can be defined to log expands */ +#endif + +/* initial number of buckets */ +#define HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */ +#define HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */ +#define HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */ + +/* calculate the element whose hash handle address is hhe */ +#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho))) + +#define HASH_FIND(hh,head,keyptr,keylen,out) \ +do { \ + out=NULL; \ + if (head) { \ + unsigned _hf_bkt,_hf_hashv; \ + HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt); \ + if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) { \ + HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \ + keyptr,keylen,out); \ + } \ + } \ +} while (0) + +#ifdef HASH_BLOOM +#define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM) +#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0) +#define HASH_BLOOM_MAKE(tbl) \ +do { \ + (tbl)->bloom_nbits = HASH_BLOOM; \ + (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN); \ + if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \ + memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \ + (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \ +} while (0) + +#define HASH_BLOOM_FREE(tbl) \ +do { \ + uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN); \ +} while (0) + +#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8))) +#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8))) + +#define HASH_BLOOM_ADD(tbl,hashv) \ + HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) + +#define HASH_BLOOM_TEST(tbl,hashv) \ + HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) + +#else +#define HASH_BLOOM_MAKE(tbl) +#define HASH_BLOOM_FREE(tbl) +#define HASH_BLOOM_ADD(tbl,hashv) +#define HASH_BLOOM_TEST(tbl,hashv) (1) +#define HASH_BLOOM_BYTELEN 0 +#endif + +#define HASH_MAKE_TABLE(hh,head) \ +do { \ + (head)->hh.tbl = (UT_hash_table*)uthash_malloc( \ + sizeof(UT_hash_table)); \ + if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \ + memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \ + (head)->hh.tbl->tail = &((head)->hh); \ + (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \ + (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \ + (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \ + (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \ + HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ + if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \ + memset((head)->hh.tbl->buckets, 0, \ + HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ + HASH_BLOOM_MAKE((head)->hh.tbl); \ + (head)->hh.tbl->signature = HASH_SIGNATURE; \ +} while(0) + +#define HASH_ADD(hh,head,fieldname,keylen_in,add) \ + HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add) + +#define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \ +do { \ + replaced=NULL; \ + HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced); \ + if (replaced!=NULL) { \ + HASH_DELETE(hh,head,replaced); \ + } \ + HASH_ADD(hh,head,fieldname,keylen_in,add); \ +} while(0) + +#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \ +do { \ + unsigned _ha_bkt; \ + (add)->hh.next = NULL; \ + (add)->hh.key = (char*)(keyptr); \ + (add)->hh.keylen = (unsigned)(keylen_in); \ + if (!(head)) { \ + head = (add); \ + (head)->hh.prev = NULL; \ + HASH_MAKE_TABLE(hh,head); \ + } else { \ + (head)->hh.tbl->tail->next = (add); \ + (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \ + (head)->hh.tbl->tail = &((add)->hh); \ + } \ + (head)->hh.tbl->num_items++; \ + (add)->hh.tbl = (head)->hh.tbl; \ + HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets, \ + (add)->hh.hashv, _ha_bkt); \ + HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \ + HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv); \ + HASH_EMIT_KEY(hh,head,keyptr,keylen_in); \ + HASH_FSCK(hh,head); \ +} while(0) + +#define HASH_TO_BKT( hashv, num_bkts, bkt ) \ +do { \ + bkt = ((hashv) & ((num_bkts) - 1)); \ +} while(0) + +/* delete "delptr" from the hash table. + * "the usual" patch-up process for the app-order doubly-linked-list. + * The use of _hd_hh_del below deserves special explanation. + * These used to be expressed using (delptr) but that led to a bug + * if someone used the same symbol for the head and deletee, like + * HASH_DELETE(hh,users,users); + * We want that to work, but by changing the head (users) below + * we were forfeiting our ability to further refer to the deletee (users) + * in the patch-up process. Solution: use scratch space to + * copy the deletee pointer, then the latter references are via that + * scratch pointer rather than through the repointed (users) symbol. + */ +#define HASH_DELETE(hh,head,delptr) \ +do { \ + struct UT_hash_handle *_hd_hh_del; \ + if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \ + uthash_free((head)->hh.tbl->buckets, \ + (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ + HASH_BLOOM_FREE((head)->hh.tbl); \ + uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ + head = NULL; \ + } else { \ + unsigned _hd_bkt; \ + _hd_hh_del = &((delptr)->hh); \ + if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \ + (head)->hh.tbl->tail = \ + (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ + (head)->hh.tbl->hho); \ + } \ + if ((delptr)->hh.prev) { \ + ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ + (head)->hh.tbl->hho))->next = (delptr)->hh.next; \ + } else { \ + DECLTYPE_ASSIGN(head,(delptr)->hh.next); \ + } \ + if (_hd_hh_del->next) { \ + ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \ + (head)->hh.tbl->hho))->prev = \ + _hd_hh_del->prev; \ + } \ + HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \ + HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \ + (head)->hh.tbl->num_items--; \ + } \ + HASH_FSCK(hh,head); \ +} while (0) + + +/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */ +#define HASH_FIND_STR(head,findstr,out) \ + HASH_FIND(hh,head,findstr,(unsigned)strlen(findstr),out) +#define HASH_ADD_STR(head,strfield,add) \ + HASH_ADD(hh,head,strfield[0],strlen(add->strfield),add) +#define HASH_REPLACE_STR(head,strfield,add,replaced) \ + HASH_REPLACE(hh,head,strfield[0],(unsigned)strlen(add->strfield),add,replaced) +#define HASH_FIND_INT(head,findint,out) \ + HASH_FIND(hh,head,findint,sizeof(int),out) +#define HASH_ADD_INT(head,intfield,add) \ + HASH_ADD(hh,head,intfield,sizeof(int),add) +#define HASH_REPLACE_INT(head,intfield,add,replaced) \ + HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) +#define HASH_FIND_PTR(head,findptr,out) \ + HASH_FIND(hh,head,findptr,sizeof(void *),out) +#define HASH_ADD_PTR(head,ptrfield,add) \ + HASH_ADD(hh,head,ptrfield,sizeof(void *),add) +#define HASH_REPLACE_PTR(head,ptrfield,add,replaced) \ + HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) +#define HASH_DEL(head,delptr) \ + HASH_DELETE(hh,head,delptr) + +/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined. + * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined. + */ +#ifdef HASH_DEBUG +#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0) +#define HASH_FSCK(hh,head) \ +do { \ + struct UT_hash_handle *_thh; \ + if (head) { \ + unsigned _bkt_i; \ + unsigned _count; \ + char *_prev; \ + _count = 0; \ + for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \ + unsigned _bkt_count = 0; \ + _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \ + _prev = NULL; \ + while (_thh) { \ + if (_prev != (char*)(_thh->hh_prev)) { \ + HASH_OOPS("invalid hh_prev %p, actual %p\n", \ + _thh->hh_prev, _prev ); \ + } \ + _bkt_count++; \ + _prev = (char*)(_thh); \ + _thh = _thh->hh_next; \ + } \ + _count += _bkt_count; \ + if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \ + HASH_OOPS("invalid bucket count %u, actual %u\n", \ + (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \ + } \ + } \ + if (_count != (head)->hh.tbl->num_items) { \ + HASH_OOPS("invalid hh item count %u, actual %u\n", \ + (head)->hh.tbl->num_items, _count ); \ + } \ + /* traverse hh in app order; check next/prev integrity, count */ \ + _count = 0; \ + _prev = NULL; \ + _thh = &(head)->hh; \ + while (_thh) { \ + _count++; \ + if (_prev !=(char*)(_thh->prev)) { \ + HASH_OOPS("invalid prev %p, actual %p\n", \ + _thh->prev, _prev ); \ + } \ + _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \ + _thh = ( _thh->next ? (UT_hash_handle*)((char*)(_thh->next) + \ + (head)->hh.tbl->hho) : NULL ); \ + } \ + if (_count != (head)->hh.tbl->num_items) { \ + HASH_OOPS("invalid app item count %u, actual %u\n", \ + (head)->hh.tbl->num_items, _count ); \ + } \ + } \ +} while (0) +#else +#define HASH_FSCK(hh,head) +#endif + +/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to + * the descriptor to which this macro is defined for tuning the hash function. + * The app can #include to get the prototype for write(2). */ +#ifdef HASH_EMIT_KEYS +#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \ +do { \ + unsigned _klen = fieldlen; \ + write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \ + write(HASH_EMIT_KEYS, keyptr, fieldlen); \ +} while (0) +#else +#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) +#endif + +/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */ +#ifdef HASH_FUNCTION +#define HASH_FCN HASH_FUNCTION +#else +#define HASH_FCN HASH_JEN +#endif + +/* The Bernstein hash function, used in Perl prior to v5.6. Note (x<<5+x)=x*33. */ +#define HASH_BER(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned _hb_keylen=keylen; \ + const char *_hb_key=(const char*)(key); \ + (hashv) = 0; \ + while (_hb_keylen--) { (hashv) = (((hashv) << 5) + (hashv)) + *_hb_key++; } \ + bkt = (hashv) & (num_bkts-1); \ +} while (0) + + +/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at + * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */ +#define HASH_SAX(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned _sx_i; \ + const char *_hs_key=(const char*)(key); \ + hashv = 0; \ + for(_sx_i=0; _sx_i < keylen; _sx_i++) \ + hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \ + bkt = hashv & (num_bkts-1); \ +} while (0) +/* FNV-1a variation */ +#define HASH_FNV(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned _fn_i; \ + const char *_hf_key=(const char*)(key); \ + hashv = 2166136261UL; \ + for(_fn_i=0; _fn_i < keylen; _fn_i++) { \ + hashv = hashv ^ _hf_key[_fn_i]; \ + hashv = hashv * 16777619; \ + } \ + bkt = hashv & (num_bkts-1); \ +} while(0) + +#define HASH_OAT(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned _ho_i; \ + const char *_ho_key=(const char*)(key); \ + hashv = 0; \ + for(_ho_i=0; _ho_i < keylen; _ho_i++) { \ + hashv += _ho_key[_ho_i]; \ + hashv += (hashv << 10); \ + hashv ^= (hashv >> 6); \ + } \ + hashv += (hashv << 3); \ + hashv ^= (hashv >> 11); \ + hashv += (hashv << 15); \ + bkt = hashv & (num_bkts-1); \ +} while(0) + +#define HASH_JEN_MIX(a,b,c) \ +do { \ + a -= b; a -= c; a ^= ( c >> 13 ); \ + b -= c; b -= a; b ^= ( a << 8 ); \ + c -= a; c -= b; c ^= ( b >> 13 ); \ + a -= b; a -= c; a ^= ( c >> 12 ); \ + b -= c; b -= a; b ^= ( a << 16 ); \ + c -= a; c -= b; c ^= ( b >> 5 ); \ + a -= b; a -= c; a ^= ( c >> 3 ); \ + b -= c; b -= a; b ^= ( a << 10 ); \ + c -= a; c -= b; c ^= ( b >> 15 ); \ +} while (0) + +#define HASH_JEN(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned _hj_i,_hj_j,_hj_k; \ + unsigned const char *_hj_key=(unsigned const char*)(key); \ + hashv = 0xfeedbeef; \ + _hj_i = _hj_j = 0x9e3779b9; \ + _hj_k = (unsigned)(keylen); \ + while (_hj_k >= 12) { \ + _hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \ + + ( (unsigned)_hj_key[2] << 16 ) \ + + ( (unsigned)_hj_key[3] << 24 ) ); \ + _hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \ + + ( (unsigned)_hj_key[6] << 16 ) \ + + ( (unsigned)_hj_key[7] << 24 ) ); \ + hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \ + + ( (unsigned)_hj_key[10] << 16 ) \ + + ( (unsigned)_hj_key[11] << 24 ) ); \ + \ + HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ + \ + _hj_key += 12; \ + _hj_k -= 12; \ + } \ + hashv += keylen; \ + switch ( _hj_k ) { \ + case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); \ + case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); \ + case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); \ + case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); \ + case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); \ + case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); \ + case 5: _hj_j += _hj_key[4]; \ + case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); \ + case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); \ + case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); \ + case 1: _hj_i += _hj_key[0]; \ + } \ + HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ + bkt = hashv & (num_bkts-1); \ +} while(0) + +/* The Paul Hsieh hash function */ +#undef get16bits +#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ + || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) +#define get16bits(d) (*((const uint16_t *) (d))) +#endif + +#if !defined (get16bits) +#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \ + +(uint32_t)(((const uint8_t *)(d))[0]) ) +#endif +#define HASH_SFH(key,keylen,num_bkts,hashv,bkt) \ +do { \ + unsigned const char *_sfh_key=(unsigned const char*)(key); \ + uint32_t _sfh_tmp, _sfh_len = keylen; \ + \ + int _sfh_rem = _sfh_len & 3; \ + _sfh_len >>= 2; \ + hashv = 0xcafebabe; \ + \ + /* Main loop */ \ + for (;_sfh_len > 0; _sfh_len--) { \ + hashv += get16bits (_sfh_key); \ + _sfh_tmp = (uint32_t)(get16bits (_sfh_key+2)) << 11 ^ hashv; \ + hashv = (hashv << 16) ^ _sfh_tmp; \ + _sfh_key += 2*sizeof (uint16_t); \ + hashv += hashv >> 11; \ + } \ + \ + /* Handle end cases */ \ + switch (_sfh_rem) { \ + case 3: hashv += get16bits (_sfh_key); \ + hashv ^= hashv << 16; \ + hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)] << 18); \ + hashv += hashv >> 11; \ + break; \ + case 2: hashv += get16bits (_sfh_key); \ + hashv ^= hashv << 11; \ + hashv += hashv >> 17; \ + break; \ + case 1: hashv += *_sfh_key; \ + hashv ^= hashv << 10; \ + hashv += hashv >> 1; \ + } \ + \ + /* Force "avalanching" of final 127 bits */ \ + hashv ^= hashv << 3; \ + hashv += hashv >> 5; \ + hashv ^= hashv << 4; \ + hashv += hashv >> 17; \ + hashv ^= hashv << 25; \ + hashv += hashv >> 6; \ + bkt = hashv & (num_bkts-1); \ +} while(0) + +#ifdef HASH_USING_NO_STRICT_ALIASING +/* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads. + * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error. + * MurmurHash uses the faster approach only on CPU's where we know it's safe. + * + * Note the preprocessor built-in defines can be emitted using: + * + * gcc -m64 -dM -E - < /dev/null (on gcc) + * cc -## a.c (where a.c is a simple test file) (Sun Studio) + */ +#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)) +#define MUR_GETBLOCK(p,i) p[i] +#else /* non intel */ +#define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 0x3) == 0) +#define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 0x3) == 1) +#define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 0x3) == 2) +#define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 0x3) == 3) +#define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL)) +#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__)) +#define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24)) +#define MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16)) +#define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8)) +#else /* assume little endian non-intel */ +#define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24)) +#define MUR_TWO_TWO(p) ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16)) +#define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) << 8)) +#endif +#define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) : \ + (MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \ + (MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) : \ + MUR_ONE_THREE(p)))) +#endif +#define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) +#define MUR_FMIX(_h) \ +do { \ + _h ^= _h >> 16; \ + _h *= 0x85ebca6b; \ + _h ^= _h >> 13; \ + _h *= 0xc2b2ae35l; \ + _h ^= _h >> 16; \ +} while(0) + +#define HASH_MUR(key,keylen,num_bkts,hashv,bkt) \ +do { \ + const uint8_t *_mur_data = (const uint8_t*)(key); \ + const int _mur_nblocks = (keylen) / 4; \ + uint32_t _mur_h1 = 0xf88D5353; \ + uint32_t _mur_c1 = 0xcc9e2d51; \ + uint32_t _mur_c2 = 0x1b873593; \ + uint32_t _mur_k1 = 0; \ + const uint8_t *_mur_tail; \ + const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+_mur_nblocks*4); \ + int _mur_i; \ + for(_mur_i = -_mur_nblocks; _mur_i; _mur_i++) { \ + _mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i); \ + _mur_k1 *= _mur_c1; \ + _mur_k1 = MUR_ROTL32(_mur_k1,15); \ + _mur_k1 *= _mur_c2; \ + \ + _mur_h1 ^= _mur_k1; \ + _mur_h1 = MUR_ROTL32(_mur_h1,13); \ + _mur_h1 = _mur_h1*5+0xe6546b64; \ + } \ + _mur_tail = (const uint8_t*)(_mur_data + _mur_nblocks*4); \ + _mur_k1=0; \ + switch((keylen) & 3) { \ + case 3: _mur_k1 ^= _mur_tail[2] << 16; \ + case 2: _mur_k1 ^= _mur_tail[1] << 8; \ + case 1: _mur_k1 ^= _mur_tail[0]; \ + _mur_k1 *= _mur_c1; \ + _mur_k1 = MUR_ROTL32(_mur_k1,15); \ + _mur_k1 *= _mur_c2; \ + _mur_h1 ^= _mur_k1; \ + } \ + _mur_h1 ^= (keylen); \ + MUR_FMIX(_mur_h1); \ + hashv = _mur_h1; \ + bkt = hashv & (num_bkts-1); \ +} while(0) +#endif /* HASH_USING_NO_STRICT_ALIASING */ + +/* key comparison function; return 0 if keys equal */ +#define HASH_KEYCMP(a,b,len) memcmp(a,b,len) + +/* iterate over items in a known bucket to find desired item */ +#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \ +do { \ + if (head.hh_head) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,head.hh_head)); \ + else out=NULL; \ + while (out) { \ + if ((out)->hh.keylen == keylen_in) { \ + if ((HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) break; \ + } \ + if ((out)->hh.hh_next) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,(out)->hh.hh_next)); \ + else out = NULL; \ + } \ +} while(0) + +/* add an item to a bucket */ +#define HASH_ADD_TO_BKT(head,addhh) \ +do { \ + head.count++; \ + (addhh)->hh_next = head.hh_head; \ + (addhh)->hh_prev = NULL; \ + if (head.hh_head) { (head).hh_head->hh_prev = (addhh); } \ + (head).hh_head=addhh; \ + if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH) \ + && (addhh)->tbl->noexpand != 1) { \ + HASH_EXPAND_BUCKETS((addhh)->tbl); \ + } \ +} while(0) + +/* remove an item from a given bucket */ +#define HASH_DEL_IN_BKT(hh,head,hh_del) \ + (head).count--; \ + if ((head).hh_head == hh_del) { \ + (head).hh_head = hh_del->hh_next; \ + } \ + if (hh_del->hh_prev) { \ + hh_del->hh_prev->hh_next = hh_del->hh_next; \ + } \ + if (hh_del->hh_next) { \ + hh_del->hh_next->hh_prev = hh_del->hh_prev; \ + } + +/* Bucket expansion has the effect of doubling the number of buckets + * and redistributing the items into the new buckets. Ideally the + * items will distribute more or less evenly into the new buckets + * (the extent to which this is true is a measure of the quality of + * the hash function as it applies to the key domain). + * + * With the items distributed into more buckets, the chain length + * (item count) in each bucket is reduced. Thus by expanding buckets + * the hash keeps a bound on the chain length. This bounded chain + * length is the essence of how a hash provides constant time lookup. + * + * The calculation of tbl->ideal_chain_maxlen below deserves some + * explanation. First, keep in mind that we're calculating the ideal + * maximum chain length based on the *new* (doubled) bucket count. + * In fractions this is just n/b (n=number of items,b=new num buckets). + * Since the ideal chain length is an integer, we want to calculate + * ceil(n/b). We don't depend on floating point arithmetic in this + * hash, so to calculate ceil(n/b) with integers we could write + * + * ceil(n/b) = (n/b) + ((n%b)?1:0) + * + * and in fact a previous version of this hash did just that. + * But now we have improved things a bit by recognizing that b is + * always a power of two. We keep its base 2 log handy (call it lb), + * so now we can write this with a bit shift and logical AND: + * + * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0) + * + */ +#define HASH_EXPAND_BUCKETS(tbl) \ +do { \ + unsigned _he_bkt; \ + unsigned _he_bkt_i; \ + struct UT_hash_handle *_he_thh, *_he_hh_nxt; \ + UT_hash_bucket *_he_new_buckets, *_he_newbkt; \ + _he_new_buckets = (UT_hash_bucket*)uthash_malloc( \ + 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ + if (!_he_new_buckets) { uthash_fatal( "out of memory"); } \ + memset(_he_new_buckets, 0, \ + 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ + tbl->ideal_chain_maxlen = \ + (tbl->num_items >> (tbl->log2_num_buckets+1)) + \ + ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0); \ + tbl->nonideal_items = 0; \ + for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \ + { \ + _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \ + while (_he_thh) { \ + _he_hh_nxt = _he_thh->hh_next; \ + HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt); \ + _he_newbkt = &(_he_new_buckets[ _he_bkt ]); \ + if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \ + tbl->nonideal_items++; \ + _he_newbkt->expand_mult = _he_newbkt->count / \ + tbl->ideal_chain_maxlen; \ + } \ + _he_thh->hh_prev = NULL; \ + _he_thh->hh_next = _he_newbkt->hh_head; \ + if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev = \ + _he_thh; \ + _he_newbkt->hh_head = _he_thh; \ + _he_thh = _he_hh_nxt; \ + } \ + } \ + uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ + tbl->num_buckets *= 2; \ + tbl->log2_num_buckets++; \ + tbl->buckets = _he_new_buckets; \ + tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \ + (tbl->ineff_expands+1) : 0; \ + if (tbl->ineff_expands > 1) { \ + tbl->noexpand=1; \ + uthash_noexpand_fyi(tbl); \ + } \ + uthash_expand_fyi(tbl); \ +} while(0) + + +/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */ +/* Note that HASH_SORT assumes the hash handle name to be hh. + * HASH_SRT was added to allow the hash handle name to be passed in. */ +#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn) +#define HASH_SRT(hh,head,cmpfcn) \ +do { \ + unsigned _hs_i; \ + unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \ + struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \ + if (head) { \ + _hs_insize = 1; \ + _hs_looping = 1; \ + _hs_list = &((head)->hh); \ + while (_hs_looping) { \ + _hs_p = _hs_list; \ + _hs_list = NULL; \ + _hs_tail = NULL; \ + _hs_nmerges = 0; \ + while (_hs_p) { \ + _hs_nmerges++; \ + _hs_q = _hs_p; \ + _hs_psize = 0; \ + for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \ + _hs_psize++; \ + _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ + ((void*)((char*)(_hs_q->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + if (! (_hs_q) ) break; \ + } \ + _hs_qsize = _hs_insize; \ + while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) { \ + if (_hs_psize == 0) { \ + _hs_e = _hs_q; \ + _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ + ((void*)((char*)(_hs_q->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + _hs_qsize--; \ + } else if ( (_hs_qsize == 0) || !(_hs_q) ) { \ + _hs_e = _hs_p; \ + if (_hs_p){ \ + _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ + ((void*)((char*)(_hs_p->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + } \ + _hs_psize--; \ + } else if (( \ + cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \ + DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \ + ) <= 0) { \ + _hs_e = _hs_p; \ + if (_hs_p){ \ + _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ + ((void*)((char*)(_hs_p->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + } \ + _hs_psize--; \ + } else { \ + _hs_e = _hs_q; \ + _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ + ((void*)((char*)(_hs_q->next) + \ + (head)->hh.tbl->hho)) : NULL); \ + _hs_qsize--; \ + } \ + if ( _hs_tail ) { \ + _hs_tail->next = ((_hs_e) ? \ + ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \ + } else { \ + _hs_list = _hs_e; \ + } \ + if (_hs_e) { \ + _hs_e->prev = ((_hs_tail) ? \ + ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \ + } \ + _hs_tail = _hs_e; \ + } \ + _hs_p = _hs_q; \ + } \ + if (_hs_tail){ \ + _hs_tail->next = NULL; \ + } \ + if ( _hs_nmerges <= 1 ) { \ + _hs_looping=0; \ + (head)->hh.tbl->tail = _hs_tail; \ + DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \ + } \ + _hs_insize *= 2; \ + } \ + HASH_FSCK(hh,head); \ + } \ +} while (0) + +/* This function selects items from one hash into another hash. + * The end result is that the selected items have dual presence + * in both hashes. There is no copy of the items made; rather + * they are added into the new hash through a secondary hash + * hash handle that must be present in the structure. */ +#define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ +do { \ + unsigned _src_bkt, _dst_bkt; \ + void *_last_elt=NULL, *_elt; \ + UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \ + ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \ + if (src) { \ + for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \ + for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \ + _src_hh; \ + _src_hh = _src_hh->hh_next) { \ + _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \ + if (cond(_elt)) { \ + _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho); \ + _dst_hh->key = _src_hh->key; \ + _dst_hh->keylen = _src_hh->keylen; \ + _dst_hh->hashv = _src_hh->hashv; \ + _dst_hh->prev = _last_elt; \ + _dst_hh->next = NULL; \ + if (_last_elt_hh) { _last_elt_hh->next = _elt; } \ + if (!dst) { \ + DECLTYPE_ASSIGN(dst,_elt); \ + HASH_MAKE_TABLE(hh_dst,dst); \ + } else { \ + _dst_hh->tbl = (dst)->hh_dst.tbl; \ + } \ + HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \ + HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \ + (dst)->hh_dst.tbl->num_items++; \ + _last_elt = _elt; \ + _last_elt_hh = _dst_hh; \ + } \ + } \ + } \ + } \ + HASH_FSCK(hh_dst,dst); \ +} while (0) + +#define HASH_CLEAR(hh,head) \ +do { \ + if (head) { \ + uthash_free((head)->hh.tbl->buckets, \ + (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket)); \ + HASH_BLOOM_FREE((head)->hh.tbl); \ + uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ + (head)=NULL; \ + } \ +} while(0) + +#define HASH_OVERHEAD(hh,head) \ + ((head) ? ( \ + (size_t)((((head)->hh.tbl->num_items * sizeof(UT_hash_handle)) + \ + ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket)) + \ + (sizeof(UT_hash_table)) + \ + (HASH_BLOOM_BYTELEN)))) : 0) + +#ifdef NO_DECLTYPE +#define HASH_ITER(hh,head,el,tmp) \ +for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL); \ + el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL)) +#else +#define HASH_ITER(hh,head,el,tmp) \ +for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL); \ + el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL)) +#endif + +/* obtain a count of items in the hash */ +#define HASH_COUNT(head) HASH_CNT(hh,head) +#define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0) + +typedef struct UT_hash_bucket { + struct UT_hash_handle *hh_head; + unsigned count; + + /* expand_mult is normally set to 0. In this situation, the max chain length + * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If + * the bucket's chain exceeds this length, bucket expansion is triggered). + * However, setting expand_mult to a non-zero value delays bucket expansion + * (that would be triggered by additions to this particular bucket) + * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH. + * (The multiplier is simply expand_mult+1). The whole idea of this + * multiplier is to reduce bucket expansions, since they are expensive, in + * situations where we know that a particular bucket tends to be overused. + * It is better to let its chain length grow to a longer yet-still-bounded + * value, than to do an O(n) bucket expansion too often. + */ + unsigned expand_mult; + +} UT_hash_bucket; + +/* random signature used only to find hash tables in external analysis */ +#define HASH_SIGNATURE 0xa0111fe1 +#define HASH_BLOOM_SIGNATURE 0xb12220f2 + +typedef struct UT_hash_table { + UT_hash_bucket *buckets; + unsigned num_buckets, log2_num_buckets; + unsigned num_items; + struct UT_hash_handle *tail; /* tail hh in app order, for fast append */ + ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */ + + /* in an ideal situation (all buckets used equally), no bucket would have + * more than ceil(#items/#buckets) items. that's the ideal chain length. */ + unsigned ideal_chain_maxlen; + + /* nonideal_items is the number of items in the hash whose chain position + * exceeds the ideal chain maxlen. these items pay the penalty for an uneven + * hash distribution; reaching them in a chain traversal takes >ideal steps */ + unsigned nonideal_items; + + /* ineffective expands occur when a bucket doubling was performed, but + * afterward, more than half the items in the hash had nonideal chain + * positions. If this happens on two consecutive expansions we inhibit any + * further expansion, as it's not helping; this happens when the hash + * function isn't a good fit for the key domain. When expansion is inhibited + * the hash will still work, albeit no longer in constant time. */ + unsigned ineff_expands, noexpand; + + uint32_t signature; /* used only to find hash tables in external analysis */ +#ifdef HASH_BLOOM + uint32_t bloom_sig; /* used only to test bloom exists in external analysis */ + uint8_t *bloom_bv; + char bloom_nbits; +#endif + +} UT_hash_table; + +typedef struct UT_hash_handle { + struct UT_hash_table *tbl; + void *prev; /* prev element in app order */ + void *next; /* next element in app order */ + struct UT_hash_handle *hh_prev; /* previous hh in bucket order */ + struct UT_hash_handle *hh_next; /* next hh in bucket order */ + void *key; /* ptr to enclosing struct's key */ + unsigned keylen; /* enclosing struct's key len */ + unsigned hashv; /* result of hash-fcn(key) */ +} UT_hash_handle; + +#endif /* UTHASH_H */ diff --git a/app/bin/utility.c b/app/bin/utility.c index 9708ac4..d1f798c 100644 --- a/app/bin/utility.c +++ b/app/bin/utility.c @@ -82,6 +82,22 @@ double NormalizeAngle( double a ) return a; } +double DifferenceBetweenAngles(double a, double b) { + double difference = b - a; + while (difference < -180) difference += 360; + while (difference > 180) difference -= 360; + return difference; +} + +int AngleInRange(double a, double start, double size) { + if (DifferenceBetweenAngles(start+size,a)<=0.0) { + if (DifferenceBetweenAngles(start,a)>=0.0) + return 0; + else return 1; + } + return -1; +} + int IsAligned( double a1, double a2 ) diff --git a/app/bin/utility.h b/app/bin/utility.h index ccf85e4..8666e6b 100644 --- a/app/bin/utility.h +++ b/app/bin/utility.h @@ -1,5 +1,5 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/utility.h,v 1.1 2005-12-07 15:47:39 rc-flyer Exp $ +/** \file utility.h + * Prototypes for misc utility functions */ /* XTrkCad - Model Railroad CAD @@ -23,6 +23,8 @@ #ifndef UTILITY_H #define UTILITY_H +#include "common.h" + #ifndef TRUE #define TRUE 1 #define FALSE 0 @@ -43,6 +45,8 @@ double min( double a, double b ); #endif double FindDistance( coOrd p0, coOrd p1 ); double NormalizeAngle( double a ); +double DifferenceBetweenAngles(double a, double b); +int AngleInRange(double a, double start, double size); int IsAligned( double a1, double a2 ); double D2R( double D ); double R2D( double R ); diff --git a/app/bin/version.h b/app/bin/version.h index 3441687..2b2e6ff 100644 --- a/app/bin/version.h +++ b/app/bin/version.h @@ -1,4 +1,5 @@ -/* $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/version.h,v 1.9 2008-01-29 04:10:23 tshead Exp $ +/** \file version.h + * */ /* XTrkCad - Model Railroad CAD @@ -19,6 +20,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef HAVE_VERSION_H +#define HAVE_VERSION_H #ifdef XTRKCAD_CMAKE_BUILD #include "xtrkcad-config.h" @@ -36,4 +39,4 @@ #define MINPARAMVERSION (1) #endif - +#endif //HAVE_VERSION_H diff --git a/app/cornu/CMakeLists.txt b/app/cornu/CMakeLists.txt new file mode 100644 index 0000000..b54fc80 --- /dev/null +++ b/app/cornu/CMakeLists.txt @@ -0,0 +1,27 @@ +PROJECT(cornu) + +FILE(GLOB HEADERS *.h) + +SET(SOURCES + bezctx.c + bezctx_xtrkcad.c + spiroentrypoints.c + spiro.c + ) + +SET(HEADERS + spiro.h + ) + + +INCLUDE_DIRECTORIES(${XTrkCAD_BINARY_DIR}) +INCLUDE_DIRECTORIES(${XTrkCAD_SOURCE_DIR}) +INCLUDE_DIRECTORIES(${wlib_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${help_BINARY_DIR}) + +ADD_LIBRARY(xtrkcad-cornu ${HEADERS} ${SOURCES}) + + + + + diff --git a/app/cornu/bezctx.c b/app/cornu/bezctx.c new file mode 100644 index 0000000..722f5db --- /dev/null +++ b/app/cornu/bezctx.c @@ -0,0 +1,48 @@ +/* +ppedit - A pattern plate editor for Spiro splines. +Copyright (C) 2007 Raph Levien + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. + +*/ +#include "bezctx.h" + +void bezctx_moveto(bezctx *bc, double x, double y, int is_open) +{ + bc->moveto(bc, x, y, is_open); +} + +void bezctx_lineto(bezctx *bc, double x, double y) +{ + bc->lineto(bc, x, y); +} + +void bezctx_quadto(bezctx *bc, double x1, double y1, double x2, double y2) +{ + bc->quadto(bc, x1, y1, x2, y2); +} + +void bezctx_curveto(bezctx *bc, double x1, double y1, double x2, double y2, + double x3, double y3) +{ + bc->curveto(bc, x1, y1, x2, y2, x3, y3); +} + +void bezctx_mark_knot(bezctx *bc, int knot_idx) +{ + if (bc->mark_knot) + bc->mark_knot(bc, knot_idx); +} diff --git a/app/cornu/bezctx.h b/app/cornu/bezctx.h new file mode 100644 index 0000000..1216be9 --- /dev/null +++ b/app/cornu/bezctx.h @@ -0,0 +1,13 @@ +#ifndef _BEZCTX_H +#define _BEZCTX_H +#include "bezctx_intf.h" + +struct _bezctx { + void (*moveto)(bezctx *bc, double x, double y, int is_open); + void (*lineto)(bezctx *bc, double x, double y); + void (*quadto)(bezctx *bc, double x1, double y1, double x2, double y2); + void (*curveto)(bezctx *bc, double x1, double y1, double x2, double y2, + double x3, double y3); + void (*mark_knot)(bezctx *bc, int knot_idx); +}; +#endif diff --git a/app/cornu/bezctx_intf.h b/app/cornu/bezctx_intf.h new file mode 100644 index 0000000..4e488c6 --- /dev/null +++ b/app/cornu/bezctx_intf.h @@ -0,0 +1,23 @@ +#ifndef _BEZCTX_INTF_H +#define _BEZCTX_INTF_H +typedef struct _bezctx bezctx; + +bezctx * +new_bezctx(void); + +void +bezctx_moveto(bezctx *bc, double x, double y, int is_open); + +void +bezctx_lineto(bezctx *bc, double x, double y); + +void +bezctx_quadto(bezctx *bc, double x1, double y1, double x2, double y2); + +void +bezctx_curveto(bezctx *bc, double x1, double y1, double x2, double y2, + double x3, double y3); + +void +bezctx_mark_knot(bezctx *bc, int knot_idx); +#endif diff --git a/app/cornu/bezctx_xtrkcad.c b/app/cornu/bezctx_xtrkcad.c new file mode 100644 index 0000000..1b902b2 --- /dev/null +++ b/app/cornu/bezctx_xtrkcad.c @@ -0,0 +1,217 @@ +/* +xtrkcad_spiro - An adapter for Spiro splines within XtrkCAD. + +Copyright (C) XtrkCad.org, based on the Spiro Toolkit of Ralph Levien. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. + +*/ + + +#include "zmisc.h" +#include "common.h" +#include "bezctx.h" +#include "bezctx_xtrkcad.h" +#include "track.h" +#include "tbezier.h" +#include "i18n.h" +#include "math.h" +#include "utility.h" + +#define trkSeg(N) DYNARR_N(trkSeg_t,* bc->segsArray, N ); + + +typedef struct { + bezctx base; + dynArr_t * segsArray; + BOOL_T track; + BOOL_T is_open; + BOOL_T has_NAN; + BOOL_T draw_spots; + coOrd last_pos; // For moveTo + int ends[2]; //Start and End knot number + +} bezctx_xtrkcad; + +static void +bezctx_xtrkcad_moveto(bezctx *z, double x, double y, int is_open) { + bezctx_xtrkcad *bc = (bezctx_xtrkcad *)z; + bc->last_pos.x = x; + bc->last_pos.y = y; + if (!(isfinite(x) && isfinite(y))) { + bc->has_NAN = TRUE; + return; + } +} + +static void +bezctx_xtrkcad_lineto(bezctx *z, double x, double y) { + + bezctx_xtrkcad *bc = (bezctx_xtrkcad *)z; + if (!(isfinite(x) && isfinite(y))) { + bc->has_NAN = TRUE; + } + if (!bc->is_open || bc->has_NAN) { + bc->last_pos.x = x; + bc->last_pos.y = y; + return; + } + DYNARR_APPEND(trkSeg_t,* bc->segsArray,10); + trkSeg_p seg = &trkSeg(bc->segsArray->cnt-1); + seg->u.l.pos[0].x = bc->last_pos.x; + seg->u.l.pos[0].y = bc->last_pos.y; + seg->u.l.pos[1].x = x; + seg->u.l.pos[1].y = y; + seg->u.l.option = 0; + seg->width = 0.0; + seg->color = wDrawColorBlack; + seg->type = SEG_STRTRK; + if (seg->bezSegs.ptr) MyFree(seg->bezSegs.ptr); + seg->bezSegs.max =0; + seg->bezSegs.cnt = 0; + seg->bezSegs.ptr = NULL; + seg->u.l.angle = FindAngle(seg->u.l.pos[0],seg->u.l.pos[1]); + bc->last_pos.x = x; + bc->last_pos.y = y; + + +} + +static void +bezctx_xtrkcad_quadto(bezctx *z, double x1, double y1, double x2, double y2) +{ + bezctx_xtrkcad *bc = (bezctx_xtrkcad *)z; + if ((!isfinite(x1) || !isfinite(y1) + || !isfinite(x2) || !isfinite(y2))) { + bc->has_NAN = TRUE; + } + if (!bc->is_open || bc->has_NAN) { + bc->last_pos.x = x2; + bc->last_pos.y = y2; + return; + } + DYNARR_APPEND(trkSeg_t,* bc->segsArray,10); + trkSeg_p seg = &trkSeg(bc->segsArray->cnt-1); + seg->u.b.pos[0] = bc->last_pos; + seg->u.b.pos[1].x = x1; + seg->u.b.pos[1].y = y1; + seg->u.b.pos[2].x = x1; + seg->u.b.pos[2].y = y1; + seg->u.b.pos[3].x = x2; + seg->u.b.pos[3].y = y2; + seg->width = 0.0; + seg->color = wDrawColorBlack; + seg->type = SEG_BEZTRK; + if (seg->bezSegs.ptr) MyFree(seg->bezSegs.ptr); + seg->bezSegs.max =0; + seg->bezSegs.cnt = 0; + seg->bezSegs.ptr = NULL; + bc->last_pos.x = x2; + bc->last_pos.y = y2; + + FixUpBezierSeg(seg->u.b.pos,seg,bc->track); +} + +static void + bezctx_xtrkcad_curveto(bezctx *z, double x1, double y1, double x2, double y2, + double x3, double y3) +{ + bezctx_xtrkcad *bc = (bezctx_xtrkcad *)z; + if (!(isfinite(x1) && isfinite(y1) + && isfinite(x2) && isfinite(y2) + && isfinite(x3) && isfinite(y3))) { + bc->has_NAN = TRUE; + } + if (!bc->is_open || bc->has_NAN) { + bc->last_pos.x = x3; + bc->last_pos.y = y3; + return; + } + DYNARR_APPEND(trkSeg_t,* bc->segsArray,10); + trkSeg_p seg = &trkSeg(bc->segsArray->cnt-1); + seg->u.b.pos[0].x = bc->last_pos.x; + seg->u.b.pos[0].y = bc->last_pos.y; + seg->u.b.pos[1].x = x1; + seg->u.b.pos[1].y = y1; + seg->u.b.pos[2].x = x2; + seg->u.b.pos[2].y = y2; + seg->u.b.pos[3].x = x3; + seg->u.b.pos[3].y = y3; + seg->width = 0.0; + seg->color = wDrawColorBlack; + seg->type = SEG_BEZTRK; + if (seg->bezSegs.ptr) MyFree(seg->bezSegs.ptr); + seg->bezSegs.max = 0; + seg->bezSegs.cnt = 0; + seg->bezSegs.ptr = NULL; + bc->last_pos.x = x3; + bc->last_pos.y = y3; + + FixUpBezierSeg(seg->u.b.pos,seg,bc->track); + + if (bc->draw_spots) { + DYNARR_APPEND(trkSeg_t,* bc->segsArray,10); + seg = &trkSeg(bc->segsArray->cnt-1); + seg->type=SEG_FILCRCL; + seg->u.c.center.x = bc->last_pos.x; + seg->u.c.center.y = bc->last_pos.y; + seg->u.c.radius = 0.25; + seg->width = 0.0; + seg->color = wDrawColorBlack; + } + +} + +void +bezctx_xtrkcad_mark_knot(bezctx *z, int knot_idx) { + + bezctx_xtrkcad *bc = (bezctx_xtrkcad *)z; + if (knot_idx >= bc->ends[0]) bc->is_open = TRUE; //Only worry about segs inside our gap + if (knot_idx >= bc->ends[1]) bc->is_open = FALSE; + +} + + + +bezctx * +new_bezctx_xtrkcad(dynArr_t * segArray, int ends[2], BOOL_T spots) { + + bezctx_xtrkcad *result = znew(bezctx_xtrkcad, 1); + + result->segsArray = segArray; + result->ends[0] = ends[0]; + result->ends[1] = ends[1]; + + result->base.moveto = bezctx_xtrkcad_moveto; + result->base.lineto = bezctx_xtrkcad_lineto; + result->base.quadto = bezctx_xtrkcad_quadto; + result->base.curveto = bezctx_xtrkcad_curveto; + result->base.mark_knot = bezctx_xtrkcad_mark_knot; + result->is_open = FALSE; + result->has_NAN = FALSE; + result->draw_spots = spots; + result->track = TRUE; + + return &result->base; +} + +BOOL_T bezctx_xtrkcad_close(bezctx *z) { + bezctx_xtrkcad *bc = (bezctx_xtrkcad *)z; + if (bc->has_NAN) return FALSE; + return TRUE; +} + + diff --git a/app/cornu/bezctx_xtrkcad.h b/app/cornu/bezctx_xtrkcad.h new file mode 100644 index 0000000..4117870 --- /dev/null +++ b/app/cornu/bezctx_xtrkcad.h @@ -0,0 +1,4 @@ +bezctx * new_bezctx_xtrkcad(dynArr_t * segs, int ends[2], BOOL_T spots); + +void bezctx_to_xtrkcad(bezctx *bc); +BOOL_T bezctx_xtrkcad_close(bezctx *bc); diff --git a/app/cornu/ppedit_gtk1.c b/app/cornu/ppedit_gtk1.c new file mode 100644 index 0000000..b81299e --- /dev/null +++ b/app/cornu/ppedit_gtk1.c @@ -0,0 +1,930 @@ +/* +ppedit - A pattern plate editor for Spiro splines. +Copyright (C) 2007 Raph Levien + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. + +*/ +#include +#include +#include +#include +#include +#include + +#include "zmisc.h" +#include "bezctx.h" +#include "bezctx_libart.h" +#include "bezctx_ps.h" +#include "cornu.h" +#include "spiro.h" +#include "plate.h" +#include "image.h" + +int n_iter = 10; + +typedef struct { + const char *description; + plate *p; +} undo_record; + +typedef struct { + GtkWidget *da; + const char *description; + plate *p; + int undo_n; + int undo_i; + undo_record undo_buf[16]; + int undo_xn_state; + + GtkWidget *undo_me; + GtkWidget *redo_me; + + GtkWidget *show_knots_me; + GtkWidget *show_bg_me; + int show_knots; + int show_bg; + + image *bg_image; +} plate_edit; + +int +quit_func(GtkWidget *widget, gpointer dummy) +{ + gtk_main_quit(); + return TRUE; +} + +#define C1 0.55228 +static void +draw_dot(art_u8 *buf, int x0, int y0, int x1, int y1, int rowstride, + double x, double y, double r, guint32 rgba) +{ + ArtBpath bp[6]; + ArtVpath *vp; + ArtSVP *svp; + + bp[0].code = ART_MOVETO; + bp[0].x3 = x + r; + bp[0].y3 = y; + bp[1].code = ART_CURVETO; + bp[1].x1 = x + r; + bp[1].y1 = y - C1 * r; + bp[1].x2 = x + C1 * r; + bp[1].y2 = y - r; + bp[1].x3 = x; + bp[1].y3 = y - r; + bp[2].code = ART_CURVETO; + bp[2].x1 = x - C1 * r; + bp[2].y1 = y - r; + bp[2].x2 = x - r; + bp[2].y2 = y - C1 * r; + bp[2].x3 = x - r; + bp[2].y3 = y; + bp[3].code = ART_CURVETO; + bp[3].x1 = x - r; + bp[3].y1 = y + C1 * r; + bp[3].x2 = x - C1 * r; + bp[3].y2 = y + r; + bp[3].x3 = x; + bp[3].y3 = y + r; + bp[4].code = ART_CURVETO; + bp[4].x1 = x + C1 * r; + bp[4].y1 = y + r; + bp[4].x2 = x + r; + bp[4].y2 = y + C1 * r; + bp[4].x3 = x + r; + bp[4].y3 = y; + bp[5].code = ART_END; + + vp = art_bez_path_to_vec(bp, 0.25); + svp = art_svp_from_vpath(vp); + art_free(vp); + + art_rgb_svp_alpha(svp, x0, y0, x1, y1, rgba, buf, rowstride, NULL); + art_svp_free(svp); +} + +static void +draw_raw_rect(art_u8 *buf, int x0, int y0, int x1, int y1, int rowstride, + double rx0, double ry0, double rx1, double ry1, guint32 rgba) +{ + ArtVpath vp[6]; + ArtSVP *svp; + + vp[0].code = ART_MOVETO; + vp[0].x = rx0; + vp[0].y = ry1; + vp[1].code = ART_LINETO; + vp[1].x = rx1; + vp[1].y = ry1; + vp[2].code = ART_LINETO; + vp[2].x = rx1; + vp[2].y = ry0; + vp[3].code = ART_LINETO; + vp[3].x = rx0; + vp[3].y = ry0; + vp[4].code = ART_LINETO; + vp[4].x = rx0; + vp[4].y = ry1; + vp[5].code = ART_END; + + svp = art_svp_from_vpath(vp); + + art_rgb_svp_alpha(svp, x0, y0, x1, y1, rgba, buf, rowstride, NULL); + art_svp_free(svp); +} + +static void +draw_rect(art_u8 *buf, int x0, int y0, int x1, int y1, int rowstride, + double x, double y, double r, guint32 rgba) +{ + draw_raw_rect(buf, x0, y0, x1, y1, rowstride, + x - r, y - r, x + r, y + r, rgba); +} + +static void +draw_half(art_u8 *buf, int x0, int y0, int x1, int y1, int rowstride, + double x, double y, double r, double th, guint32 rgba) +{ + ArtBpath bp[6]; + ArtVpath *vp; + ArtSVP *svp; + double c = cos(th); + double s = sin(th); + + bp[0].code = ART_MOVETO; + bp[0].x3 = x + c * r; + bp[0].y3 = y + s * r; + bp[1].code = ART_CURVETO; + bp[1].x1 = x + c * r + C1 * s * r; + bp[1].y1 = y + s * r - C1 * c * r; + bp[1].x2 = x + s * r + C1 * c * r; + bp[1].y2 = y - c * r + C1 * s * r; + bp[1].x3 = x + s * r; + bp[1].y3 = y - c * r; + bp[2].code = ART_CURVETO; + bp[2].x1 = x + s * r - C1 * c * r; + bp[2].y1 = y - c * r - C1 * s * r; + bp[2].x2 = x - c * r + C1 * s * r; + bp[2].y2 = y - s * r - C1 * c * r; + bp[2].x3 = x - c * r; + bp[2].y3 = y - s * r; + bp[3].code = ART_LINETO; + bp[3].x3 = x + c * r; + bp[3].y3 = y + s * r; + bp[4].code = ART_END; + + vp = art_bez_path_to_vec(bp, 0.25); + svp = art_svp_from_vpath(vp); + art_free(vp); + + art_rgb_svp_alpha(svp, x0, y0, x1, y1, rgba, buf, rowstride, NULL); + art_svp_free(svp); +} + +static ArtVpath * +bezctx_to_vpath(bezctx *bc) +{ + ArtBpath *bp = bezctx_to_bpath(bc); + ArtVpath *vp = art_bez_path_to_vec(bp, .25); + + g_free(bp); + if (vp[0].code == ART_END || vp[1].code == ART_END) { + g_free(vp); + vp = NULL; + } + return vp; +} + +static void +draw_plate(art_u8 *buf, int x0, int y0, int x1, int y1, int rowstride, + plate_edit *pe) +{ + plate *p = pe->p; + int i, j; + + /* find an existing point to select, if any */ + for (i = 0; i < p->n_sp; i++) { + bezctx *bc = new_bezctx_libart(); + subpath *sp = &p->sp[i]; + spiro_seg *s = draw_subpath(sp, bc); + ArtVpath *vp = bezctx_to_vpath(bc); + + if (vp != NULL) { + ArtSVP *svp = art_svp_vpath_stroke(vp, ART_PATH_STROKE_JOIN_MITER, + ART_PATH_STROKE_CAP_BUTT, + 1.5, 4.0, 0.25); + + art_free(vp); + art_rgb_svp_alpha(svp, x0, y0, x1, y1, 0x000000ff, buf, rowstride, + NULL); + art_svp_free(svp); + } + + for (j = 0; j < sp->n_kt; j++) { + if (pe->show_knots) { + knot *kt = &sp->kt[j]; + kt_flags kf = kt->flags; + if ((kf & KT_SELECTED) && (kf & KT_OPEN)) { + draw_dot(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 3, 0x000000ff); + draw_dot(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 1.5, 0xffffffff); + } else if ((kf & KT_SELECTED) && (kf & KT_CORNER)) { + draw_rect(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 3, 0x000000ff); + draw_rect(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 1.5, 0xffffffff); + } else if (!(kf & KT_SELECTED) && (kf & KT_CORNER)) { + draw_rect(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 2.5, 0x000080ff); + } else if ((kf & KT_SELECTED) && (kf & KT_CORNU)) { + draw_rect(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 3, 0xc000c0ff); + draw_rect(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 1.5, 0xffffffff); + } else if (!(kf & KT_SELECTED) && (kf & KT_CORNU)) { + draw_rect(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 2.5, 0x800080ff); + } else if ((kf & KT_LEFT) || (kf & KT_RIGHT)) { + double th = 1.5708 + (s ? get_knot_th(s, j) : 0); + if (kf & KT_LEFT) + th += 3.1415926; + if (kf & KT_SELECTED) { + draw_half(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 4, th, 0x000000ff); + draw_half(buf, x0, y0, x1, y1, rowstride, + kt->x + sin(th), kt->y - cos(th), + 2, th, 0xffffffff); + } else { + draw_half(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 3, th, 0x000080ff); + } + } else { + draw_dot(buf, x0, y0, x1, y1, rowstride, kt->x, kt->y, + 2, 0x000080ff); + } + } + } + free_spiro(s); + } +} + +static void +draw_selection(art_u8 *buf, int x0, int y0, int x1, int y1, int rowstride, + plate_edit *pe) +{ + plate *p = pe->p; + + if (p->motmode == MOTION_MODE_SELECT) { + double rx0 = p->sel_x0; + double ry0 = p->sel_y0; + double rx1 = p->x0; + double ry1 = p->y0; + if (rx0 > rx1) { + double tmp = rx1; + rx1 = rx0; + rx0 = tmp; + } + if (ry0 > ry1) { + double tmp = ry1; + ry1 = ry0; + ry0 = tmp; + } + if (rx1 > rx0 && ry1 > ry0) + draw_raw_rect(buf, x0, y0, x1, y1, rowstride, + rx0, ry0, rx1, ry1, 0x0000ff20); + } +} + +static void +render_bg_layer(guchar *buf, int rowstride, int x0, int y0, int x1, int y1, + plate_edit *pe) +{ + const double affine[6] = { 1, 0, 0, 1, 0, 0 }; + + if (pe->show_bg && pe->bg_image) + render_image(pe->bg_image, affine, + buf, rowstride, x0, y0, x1, y1); + else + memset(buf, 255, (y1 - y0) * rowstride); +} + +static gint +data_expose (GtkWidget *widget, GdkEventExpose *event, void *data) +{ + plate_edit *pe = (plate_edit *)data; + int x0 = event->area.x; + int y0 = event->area.y; + int width = event->area.width; + int height = event->area.height; + guchar *rgb; + int rowstride = (width * 3 + 3) & -4; + + rgb = g_new (guchar, event->area.height * rowstride); + + render_bg_layer(rgb, rowstride, x0, y0, x0 + width, y0 + height, pe); + + draw_plate(rgb, x0, y0, x0 + width, y0 + height, rowstride, pe); + + draw_selection(rgb, x0, y0, x0 + width, y0 + height, rowstride, pe); + + gdk_draw_rgb_image(widget->window, + widget->style->black_gc, + x0, y0, width, height, + GDK_RGB_DITHER_NONE, rgb, + rowstride); + g_free(rgb); + return FALSE; +} + +/* Make sure there's room for at least one more undo record. */ +static void +makeroom_undo(plate_edit *pe) +{ + const int undo_max = sizeof(pe->undo_buf) / sizeof(undo_record); + + if (pe->undo_n == undo_max) { + free_plate(pe->undo_buf[0].p); + memmove(pe->undo_buf, pe->undo_buf + 1, (undo_max - 1) * sizeof(undo_record)); + pe->undo_i--; + pe->undo_n--; + } +} + +static void +set_undo_menuitem(GtkWidget *me, const char *name, const char *desc) +{ + char str[256]; + + if (desc) { + sprintf(str, "%s %s", name, desc); + } else { + strcpy(str, name); + } + gtk_container_foreach(GTK_CONTAINER(me), + (GtkCallback)gtk_label_set_text, + str); + gtk_widget_set_sensitive(me, desc != NULL); +} + +static void +set_undo_state(plate_edit *pe, const char *undo_desc, const char *redo_desc) +{ + set_undo_menuitem(pe->undo_me, "Undo", undo_desc); + set_undo_menuitem(pe->redo_me, "Redo", redo_desc); +} + +static void +begin_undo_xn(plate_edit *pe) +{ + int i; + + if (pe->undo_xn_state != 1) { + for (i = pe->undo_i; i < pe->undo_n; i++) + free_plate(pe->undo_buf[i].p); + pe->undo_n = pe->undo_i; + makeroom_undo(pe); + i = pe->undo_i; + pe->undo_buf[i].description = pe->description; + pe->undo_buf[i].p = copy_plate(pe->p); + pe->undo_n = i + 1; + pe->undo_xn_state = 1; + } +} + +static void +dirty_undo_xn(plate_edit *pe, const char *description) +{ + if (pe->undo_xn_state == 0) { + g_warning("dirty_undo_xn: not in begin_undo_xn state"); + begin_undo_xn(pe); + } + if (description == NULL) + description = pe->p->description; + if (pe->undo_xn_state == 1) { + pe->undo_i++; + pe->undo_xn_state = 2; + set_undo_state(pe, description, NULL); + } + pe->description = description; +} + +static void +begindirty_undo_xn(plate_edit *pe, const char *description) +{ + begin_undo_xn(pe); + dirty_undo_xn(pe, description); +} + +static void +end_undo_xn(plate_edit *pe) +{ + if (pe->undo_xn_state == 0) { + g_warning("end_undo_xn: not in undo xn"); + } + pe->undo_xn_state = 0; +} + +static int +undo(plate_edit *pe) +{ + if (pe->undo_i == 0) + return 0; + + if (pe->undo_i == pe->undo_n) { + makeroom_undo(pe); + pe->undo_buf[pe->undo_i].description = pe->description; + pe->undo_buf[pe->undo_i].p = pe->p; + pe->undo_n++; + } else { + free_plate(pe->p); + } + pe->undo_i--; + pe->description = pe->undo_buf[pe->undo_i].description; + set_undo_state(pe, + pe->undo_i > 0 ? pe->description : NULL, + pe->undo_buf[pe->undo_i + 1].description); + g_print("undo: %d of %d\n", pe->undo_i, pe->undo_n); + pe->p = copy_plate(pe->undo_buf[pe->undo_i].p); + return 1; +} + +static int +redo(plate_edit *pe) +{ + if (pe->undo_i >= pe->undo_n - 1) + return 0; + free_plate(pe->p); + pe->undo_i++; + set_undo_state(pe, + pe->undo_buf[pe->undo_i].description, + pe->undo_i < pe->undo_n - 1 ? + pe->undo_buf[pe->undo_i + 1].description : NULL); + pe->description = pe->undo_buf[pe->undo_i].description; + pe->p = copy_plate(pe->undo_buf[pe->undo_i].p); + g_print("redo: %d of %d\n", pe->undo_i, pe->undo_n); + return 1; +} + +static gint +data_button_press (GtkWidget *widget, GdkEventButton *event, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + plate *p = pe->p; + double x, y; + press_mod mods = 0; + +#define noVERBOSE +#ifdef VERBOSE + g_print ("button press %f %f %f %d\n", + event->x, event->y, event->pressure, event->type); + +#endif + x = event->x; + y = event->y; + if (event->state & GDK_SHIFT_MASK) mods |= PRESS_MOD_SHIFT; + if (event->state & GDK_CONTROL_MASK) mods |= PRESS_MOD_CTRL; + if (event->type == GDK_2BUTTON_PRESS) mods |= PRESS_MOD_DOUBLE; + if (event->type == GDK_3BUTTON_PRESS) mods |= PRESS_MOD_TRIPLE; + + begin_undo_xn(pe); + p->description = NULL; + plate_press(p, x, y, mods); + if (p->description) dirty_undo_xn(pe, NULL); + gtk_widget_queue_draw(widget); + + return TRUE; +} + +static gint +data_motion_move (GtkWidget *widget, GdkEventMotion *event, plate_edit *pe) +{ + double x, y; + x = event->x; + y = event->y; + + plate_motion_move(pe->p, x, y); + dirty_undo_xn(pe, NULL); + + gtk_widget_queue_draw(widget); + + return TRUE; +} + +static gint +data_motion_select (GtkWidget *widget, GdkEventMotion *event, plate_edit *pe) +{ + double x, y; + + x = event->x; + y = event->y; + + plate_motion_select(pe->p, x, y); + gtk_widget_queue_draw(widget); + + return TRUE; +} + +static gint +data_motion (GtkWidget *widget, GdkEventMotion *event, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + +#ifdef VERBOSE + g_print ("motion %f %f %f\n", event->x, event->y, event->pressure); + +#endif + if (pe->p->motmode == MOTION_MODE_MOVE) + return data_motion_move(widget, event, pe); + else if (pe->p->motmode == MOTION_MODE_SELECT) + return data_motion_select(widget, event, pe); + return TRUE; +} + +static gint +data_button_release (GtkWidget *widget, GdkEventMotion *event, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + int need_redraw; + + need_redraw = (pe->p->motmode == MOTION_MODE_SELECT); + + plate_unpress(pe->p); + + gtk_widget_queue_draw(widget); + + return TRUE; +} + +static gboolean +key_press(GtkWidget *widget, GdkEventKey *event, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + int delta = event->state & 4 ? 10 : 1; + int old_n_iter = n_iter; + double dx = 0, dy = 0; + gboolean did_something = FALSE; + + g_print("key press %d %s %d\n", event->keyval, event->string, event->state); + + if (event->keyval == '<') { + did_something = TRUE; + n_iter -= delta; + } else if (event->keyval == '>') { + n_iter += delta; + } + if (n_iter < 0) n_iter = 0; + if (n_iter != old_n_iter) + g_print("n_iter = %d\n", n_iter); + + if (event->keyval == GDK_Left) + dx = -1; + else if (event->keyval == GDK_Right) + dx = 1; + else if (event->keyval == GDK_Up) + dy = -1; + else if (event->keyval == GDK_Down) + dy = 1; + if (event->state & GDK_SHIFT_MASK) { + dx *= 10; + dy *= 10; + } else if (event->state & GDK_CONTROL_MASK) { + dx *= .1; + dy *= .1; + } + if (dx != 0 || dy != 0) { + begindirty_undo_xn(pe, "Keyboard move"); + plate_motion_move(pe->p, pe->p->x0 + dx, pe->p->y0 + dy); + end_undo_xn(pe); + did_something = TRUE; + } + + if (did_something) { + gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "key-press-event"); + gtk_widget_queue_draw(widget); + } + + return did_something; +} + +static gint +toggle_corner_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + begindirty_undo_xn(pe, "Toggle Corner"); + plate_toggle_corner(pe->p); + end_undo_xn(pe); + gtk_widget_queue_draw(pe->da); + + return TRUE; +} + +static gint +delete_pt_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + begindirty_undo_xn(pe, "Delete Point"); + plate_delete_pt(pe->p); + end_undo_xn(pe); + gtk_widget_queue_draw(pe->da); + + return TRUE; +} + +static gint +set_select_mode_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + pe->p->mmode = MOUSE_MODE_SELECT; + return TRUE; +} + +static gint +set_curve_mode_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + pe->p->mmode = MOUSE_MODE_ADD_CURVE; + pe->p->last_curve_mmode = pe->p->mmode; + return TRUE; +} + +static gint +set_corner_mode_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + pe->p->mmode = MOUSE_MODE_ADD_CORNER; + return TRUE; +} + +static gint +set_left_mode_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + pe->p->mmode = MOUSE_MODE_ADD_LEFT; + return TRUE; +} + +static gint +set_right_mode_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + pe->p->mmode = MOUSE_MODE_ADD_RIGHT; + return TRUE; +} + +static gint +set_cornu_mode_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + pe->p->mmode = MOUSE_MODE_ADD_CORNU; + pe->p->last_curve_mmode = pe->p->mmode; + return TRUE; +} + +static gint +undo_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + undo(pe); + gtk_widget_queue_draw(pe->da); + + return TRUE; +} + +static gint +redo_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + redo(pe); + gtk_widget_queue_draw(pe->da); + + return TRUE; +} + +static gint +save_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + file_write_plate("plate", pe->p); + + return TRUE; +} + +static gint +toggle_show_knots_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + pe->show_knots = !pe->show_knots; + gtk_container_foreach(GTK_CONTAINER(pe->show_knots_me), + (GtkCallback)gtk_label_set_text, + pe->show_knots ? "Hide Knots" : "Show Knots"); + gtk_widget_queue_draw(pe->da); + return TRUE; +} + +static gint +toggle_show_bg_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + + pe->show_bg = !pe->show_bg; + gtk_container_foreach(GTK_CONTAINER(pe->show_bg_me), + (GtkCallback)gtk_label_set_text, + pe->show_bg ? "Hide BG" : "Show BG"); + gtk_widget_queue_draw(pe->da); + return TRUE; +} + +static gint +print_func(GtkWidget *widget, gpointer data) +{ + plate_edit *pe = (plate_edit *)data; + plate *p = pe->p; + int i; + FILE *f = fopen("/tmp/foo.ps", "w"); + bezctx *bc = new_bezctx_ps(f); + + fputs(ps_prolog, f); + for (i = 0; i < p->n_sp; i++) { + subpath *sp = &p->sp[i]; + free_spiro(draw_subpath(sp, bc)); + } + bezctx_ps_close(bc); + fputs(ps_postlog, f); + fclose(f); + return TRUE; +} + +static GtkWidget * +add_menuitem(GtkWidget *menu, const char *name, GtkSignalFunc callback, + gpointer callback_data, GtkAccelGroup *ag, const char *accel) +{ + GtkWidget *menuitem; + + menuitem = gtk_menu_item_new_with_label(name); + gtk_menu_append(GTK_MENU(menu), menuitem); + gtk_widget_show(menuitem); + if (accel != NULL) { + guint accel_key, accel_mods; + + gtk_accelerator_parse(accel, &accel_key, &accel_mods); + gtk_widget_add_accelerator(menuitem, "activate", ag, + accel_key, accel_mods, GTK_ACCEL_VISIBLE); + } + gtk_signal_connect(GTK_OBJECT(menuitem), "activate", + (GtkSignalFunc)callback, callback_data); + return (menuitem); +} + +static void +create_mainwin(plate_edit *p) +{ + GtkWidget *mainwin; + GtkWidget *eb; + GtkWidget *da; + GtkWidget *vbox; + GtkWidget *menubar; + GtkWidget *menu; + GtkWidget *menuitem; + GtkAccelGroup *ag; + void *data = p; + + mainwin = gtk_widget_new(gtk_window_get_type(), + "GtkWindow::type", GTK_WINDOW_TOPLEVEL, + "GtkWindow::title", "pattern plate editor", + NULL); + gtk_signal_connect(GTK_OBJECT(mainwin), "destroy", + (GtkSignalFunc)quit_func, NULL); + + vbox = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(mainwin), vbox); + + menubar = gtk_menu_bar_new(); + ag = gtk_accel_group_new(); + gtk_window_add_accel_group(GTK_WINDOW(mainwin), ag); + gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0); + + menu = gtk_menu_new(); + menuitem = gtk_menu_item_new_with_label("File"); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu); + gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem); + gtk_widget_show(menuitem); + gtk_menu_set_accel_group(GTK_MENU(menu), ag); + add_menuitem(menu, "Save", (GtkSignalFunc)save_func, data, ag, "S"); + add_menuitem(menu, "Quit", (GtkSignalFunc)quit_func, data, ag, "Q"); + add_menuitem(menu, "Print", (GtkSignalFunc)print_func, data, ag, "P"); + + menu = gtk_menu_new(); + menuitem = gtk_menu_item_new_with_label("Edit"); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu); + gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem); + gtk_widget_show(menuitem); + gtk_menu_set_accel_group(GTK_MENU(menu), ag); + p->undo_me = add_menuitem(menu, "Undo", (GtkSignalFunc)undo_func, data, ag, "Z"); + p->redo_me = add_menuitem(menu, "Redo", (GtkSignalFunc)redo_func, data, ag, "Y"); + set_undo_state(p, NULL, NULL); + add_menuitem(menu, "Toggle Corner", (GtkSignalFunc)toggle_corner_func, data, ag, "T"); + add_menuitem(menu, "Delete Point", (GtkSignalFunc)delete_pt_func, data, ag, "D"); + add_menuitem(menu, "Selection Mode", (GtkSignalFunc)set_select_mode_func, data, ag, "1"); + add_menuitem(menu, "Add Curve Mode", (GtkSignalFunc)set_curve_mode_func, data, ag, "2"); + add_menuitem(menu, "Add Corner Mode", (GtkSignalFunc)set_corner_mode_func, data, ag, "3"); + add_menuitem(menu, "Add Left Mode", (GtkSignalFunc)set_left_mode_func, data, ag, "4"); + add_menuitem(menu, "Add Right Mode", (GtkSignalFunc)set_right_mode_func, data, ag, "5"); + add_menuitem(menu, "Add Cornu Mode", (GtkSignalFunc)set_cornu_mode_func, data, ag, "6"); + + + menu = gtk_menu_new(); + menuitem = gtk_menu_item_new_with_label("View"); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu); + gtk_menu_bar_append(GTK_MENU_BAR(menubar), menuitem); + gtk_widget_show(menuitem); + gtk_menu_set_accel_group(GTK_MENU(menu), ag); + p->show_knots_me = add_menuitem(menu, "Hide Knots", + (GtkSignalFunc)toggle_show_knots_func, + data, ag, "K"); + p->show_bg_me = add_menuitem(menu, "Hide BG", + (GtkSignalFunc)toggle_show_bg_func, + data, ag, "B"); + + eb = gtk_event_box_new (); + GTK_WIDGET_SET_FLAGS(eb, GTK_CAN_FOCUS); + gtk_box_pack_start(GTK_BOX(vbox), eb, TRUE, TRUE, 0); + gtk_widget_set_extension_events (eb, GDK_EXTENSION_EVENTS_ALL); + gtk_signal_connect(GTK_OBJECT (eb), "button-press-event", + (GtkSignalFunc) data_button_press, data); + gtk_signal_connect(GTK_OBJECT (eb), "motion-notify-event", + (GtkSignalFunc) data_motion, data); + gtk_signal_connect(GTK_OBJECT (eb), "button-release-event", + (GtkSignalFunc) data_button_release, data); + gtk_signal_connect(GTK_OBJECT(eb), "key-press-event", + (GtkSignalFunc)key_press, data); + + da = gtk_drawing_area_new(); + p->da = da; + gtk_window_set_default_size(GTK_WINDOW(mainwin), 512, 512); + gtk_container_add(GTK_CONTAINER(eb), da); + gtk_signal_connect(GTK_OBJECT (da), "expose-event", + (GtkSignalFunc) data_expose, data); +#if 0 + gtk_widget_set_double_buffered(da, FALSE); +#endif + + gtk_widget_grab_focus(eb); + gtk_widget_show(da); + gtk_widget_show(eb); + gtk_widget_show(menubar); + gtk_widget_show(vbox); + gtk_widget_show(mainwin); +} + +int main(int argc, char **argv) +{ + plate_edit pe; + plate *p = NULL; + gtk_init(&argc, &argv); + gtk_widget_set_default_colormap(gdk_rgb_get_cmap()); + gtk_widget_set_default_visual(gdk_rgb_get_visual()); + char *reason; + + if (argc > 1) + p = file_read_plate(argv[1]); + if (p == NULL) + p = new_plate(); + pe.p = p; + pe.undo_n = 0; + pe.undo_i = 0; + pe.undo_xn_state = 0; + pe.show_knots = 1; + pe.show_bg = 1; + pe.bg_image = load_image_file("/tmp/foo.ppm", &reason); + create_mainwin(&pe); + gtk_main(); + return 0; +} diff --git a/app/cornu/spiro.c b/app/cornu/spiro.c new file mode 100644 index 0000000..5aae665 --- /dev/null +++ b/app/cornu/spiro.c @@ -0,0 +1,1099 @@ +/* +ppedit - A pattern plate editor for Spiro splines. +Copyright (C) 2007 Raph Levien + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. + +*/ +/* C implementation of third-order polynomial spirals. */ + +#include +#include +#include + +#include "bezctx_intf.h" +#include "spiro.h" + +struct spiro_seg_s { + double x; + double y; + char ty; + double bend_th; + double ks[4]; + double seg_ch; + double seg_th; + double l; +}; + +typedef struct { + double a[11]; /* band-diagonal matrix */ + double al[5]; /* lower part of band-diagonal decomposition */ +} bandmat; + +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif + +int n = 4; + +#ifndef ORDER +#define ORDER 12 +#endif + +/* Integrate polynomial spiral curve over range -.5 .. .5. */ +void +integrate_spiro(const double ks[4], double xy[2]) +{ +#if 0 + int n = 1024; +#endif + double th1 = ks[0]; + double th2 = .5 * ks[1]; + double th3 = (1./6) * ks[2]; + double th4 = (1./24) * ks[3]; + double x, y; + double ds = 1. / n; + double ds2 = ds * ds; + double ds3 = ds2 * ds; + double k0 = ks[0] * ds; + double k1 = ks[1] * ds; + double k2 = ks[2] * ds; + double k3 = ks[3] * ds; + int i; + double s = .5 * ds - .5; + + x = 0; + y = 0; + + for (i = 0; i < n; i++) { + +#if ORDER > 2 + double u, v; + double km0, km1, km2, km3; + + if (n == 1) { + km0 = k0; + km1 = k1 * ds; + km2 = k2 * ds2; + } else { + km0 = (((1./6) * k3 * s + .5 * k2) * s + k1) * s + k0; + km1 = ((.5 * k3 * s + k2) * s + k1) * ds; + km2 = (k3 * s + k2) * ds2; + } + km3 = k3 * ds3; +#endif + + { + +#if ORDER == 4 + double km0_2 = km0 * km0; + u = 24 - km0_2; + v = km1; +#endif + +#if ORDER == 6 + double km0_2 = km0 * km0; + double km0_4 = km0_2 * km0_2; + u = 24 - km0_2 + (km0_4 - 4 * km0 * km2 - 3 * km1 * km1) * (1./80); + v = km1 + (km3 - 6 * km0_2 * km1) * (1./80); +#endif + +#if ORDER == 8 + double t1_1 = km0; + double t1_2 = .5 * km1; + double t1_3 = (1./6) * km2; + double t1_4 = (1./24) * km3; + double t2_2 = t1_1 * t1_1; + double t2_3 = 2 * (t1_1 * t1_2); + double t2_4 = 2 * (t1_1 * t1_3) + t1_2 * t1_2; + double t2_5 = 2 * (t1_1 * t1_4 + t1_2 * t1_3); + double t2_6 = 2 * (t1_2 * t1_4) + t1_3 * t1_3; + double t3_4 = t2_2 * t1_2 + t2_3 * t1_1; + double t3_6 = t2_2 * t1_4 + t2_3 * t1_3 + t2_4 * t1_2 + t2_5 * t1_1; + double t4_4 = t2_2 * t2_2; + double t4_5 = 2 * (t2_2 * t2_3); + double t4_6 = 2 * (t2_2 * t2_4) + t2_3 * t2_3; + double t5_6 = t4_4 * t1_2 + t4_5 * t1_1; + double t6_6 = t4_4 * t2_2; + u = 1; + v = 0; + v += (1./12) * t1_2 + (1./80) * t1_4; + u -= (1./24) * t2_2 + (1./160) * t2_4 + (1./896) * t2_6; + v -= (1./480) * t3_4 + (1./2688) * t3_6; + u += (1./1920) * t4_4 + (1./10752) * t4_6; + v += (1./53760) * t5_6; + u -= (1./322560) * t6_6; +#endif + +#if ORDER == 10 + double t1_1 = km0; + double t1_2 = .5 * km1; + double t1_3 = (1./6) * km2; + double t1_4 = (1./24) * km3; + double t2_2 = t1_1 * t1_1; + double t2_3 = 2 * (t1_1 * t1_2); + double t2_4 = 2 * (t1_1 * t1_3) + t1_2 * t1_2; + double t2_5 = 2 * (t1_1 * t1_4 + t1_2 * t1_3); + double t2_6 = 2 * (t1_2 * t1_4) + t1_3 * t1_3; + double t2_7 = 2 * (t1_3 * t1_4); + double t2_8 = t1_4 * t1_4; + double t3_4 = t2_2 * t1_2 + t2_3 * t1_1; + double t3_6 = t2_2 * t1_4 + t2_3 * t1_3 + t2_4 * t1_2 + t2_5 * t1_1; + double t3_8 = t2_4 * t1_4 + t2_5 * t1_3 + t2_6 * t1_2 + t2_7 * t1_1; + double t4_4 = t2_2 * t2_2; + double t4_5 = 2 * (t2_2 * t2_3); + double t4_6 = 2 * (t2_2 * t2_4) + t2_3 * t2_3; + double t4_7 = 2 * (t2_2 * t2_5 + t2_3 * t2_4); + double t4_8 = 2 * (t2_2 * t2_6 + t2_3 * t2_5) + t2_4 * t2_4; + double t5_6 = t4_4 * t1_2 + t4_5 * t1_1; + double t5_8 = t4_4 * t1_4 + t4_5 * t1_3 + t4_6 * t1_2 + t4_7 * t1_1; + double t6_6 = t4_4 * t2_2; + double t6_7 = t4_4 * t2_3 + t4_5 * t2_2; + double t6_8 = t4_4 * t2_4 + t4_5 * t2_3 + t4_6 * t2_2; + double t7_8 = t6_6 * t1_2 + t6_7 * t1_1; + double t8_8 = t6_6 * t2_2; + u = 1; + v = 0; + v += (1./12) * t1_2 + (1./80) * t1_4; + u -= (1./24) * t2_2 + (1./160) * t2_4 + (1./896) * t2_6 + (1./4608) * t2_8; + v -= (1./480) * t3_4 + (1./2688) * t3_6 + (1./13824) * t3_8; + u += (1./1920) * t4_4 + (1./10752) * t4_6 + (1./55296) * t4_8; + v += (1./53760) * t5_6 + (1./276480) * t5_8; + u -= (1./322560) * t6_6 + (1./1.65888e+06) * t6_8; + v -= (1./1.16122e+07) * t7_8; + u += (1./9.28973e+07) * t8_8; +#endif + +#if ORDER == 12 + double t1_1 = km0; + double t1_2 = .5 * km1; + double t1_3 = (1./6) * km2; + double t1_4 = (1./24) * km3; + double t2_2 = t1_1 * t1_1; + double t2_3 = 2 * (t1_1 * t1_2); + double t2_4 = 2 * (t1_1 * t1_3) + t1_2 * t1_2; + double t2_5 = 2 * (t1_1 * t1_4 + t1_2 * t1_3); + double t2_6 = 2 * (t1_2 * t1_4) + t1_3 * t1_3; + double t2_7 = 2 * (t1_3 * t1_4); + double t2_8 = t1_4 * t1_4; + double t3_4 = t2_2 * t1_2 + t2_3 * t1_1; + double t3_6 = t2_2 * t1_4 + t2_3 * t1_3 + t2_4 * t1_2 + t2_5 * t1_1; + double t3_8 = t2_4 * t1_4 + t2_5 * t1_3 + t2_6 * t1_2 + t2_7 * t1_1; + double t3_10 = t2_6 * t1_4 + t2_7 * t1_3 + t2_8 * t1_2; + double t4_4 = t2_2 * t2_2; + double t4_5 = 2 * (t2_2 * t2_3); + double t4_6 = 2 * (t2_2 * t2_4) + t2_3 * t2_3; + double t4_7 = 2 * (t2_2 * t2_5 + t2_3 * t2_4); + double t4_8 = 2 * (t2_2 * t2_6 + t2_3 * t2_5) + t2_4 * t2_4; + double t4_9 = 2 * (t2_2 * t2_7 + t2_3 * t2_6 + t2_4 * t2_5); + double t4_10 = 2 * (t2_2 * t2_8 + t2_3 * t2_7 + t2_4 * t2_6) + t2_5 * t2_5; + double t5_6 = t4_4 * t1_2 + t4_5 * t1_1; + double t5_8 = t4_4 * t1_4 + t4_5 * t1_3 + t4_6 * t1_2 + t4_7 * t1_1; + double t5_10 = t4_6 * t1_4 + t4_7 * t1_3 + t4_8 * t1_2 + t4_9 * t1_1; + double t6_6 = t4_4 * t2_2; + double t6_7 = t4_4 * t2_3 + t4_5 * t2_2; + double t6_8 = t4_4 * t2_4 + t4_5 * t2_3 + t4_6 * t2_2; + double t6_9 = t4_4 * t2_5 + t4_5 * t2_4 + t4_6 * t2_3 + t4_7 * t2_2; + double t6_10 = t4_4 * t2_6 + t4_5 * t2_5 + t4_6 * t2_4 + t4_7 * t2_3 + t4_8 * t2_2; + double t7_8 = t6_6 * t1_2 + t6_7 * t1_1; + double t7_10 = t6_6 * t1_4 + t6_7 * t1_3 + t6_8 * t1_2 + t6_9 * t1_1; + double t8_8 = t6_6 * t2_2; + double t8_9 = t6_6 * t2_3 + t6_7 * t2_2; + double t8_10 = t6_6 * t2_4 + t6_7 * t2_3 + t6_8 * t2_2; + double t9_10 = t8_8 * t1_2 + t8_9 * t1_1; + double t10_10 = t8_8 * t2_2; + u = 1; + v = 0; + v += (1./12) * t1_2 + (1./80) * t1_4; + u -= (1./24) * t2_2 + (1./160) * t2_4 + (1./896) * t2_6 + (1./4608) * t2_8; + v -= (1./480) * t3_4 + (1./2688) * t3_6 + (1./13824) * t3_8 + (1./67584) * t3_10; + u += (1./1920) * t4_4 + (1./10752) * t4_6 + (1./55296) * t4_8 + (1./270336) * t4_10; + v += (1./53760) * t5_6 + (1./276480) * t5_8 + (1./1.35168e+06) * t5_10; + u -= (1./322560) * t6_6 + (1./1.65888e+06) * t6_8 + (1./8.11008e+06) * t6_10; + v -= (1./1.16122e+07) * t7_8 + (1./5.67706e+07) * t7_10; + u += (1./9.28973e+07) * t8_8 + (1./4.54164e+08) * t8_10; + v += (1./4.08748e+09) * t9_10; + u -= (1./4.08748e+10) * t10_10; +#endif + +#if ORDER == 14 + double t1_1 = km0; + double t1_2 = .5 * km1; + double t1_3 = (1./6) * km2; + double t1_4 = (1./24) * km3; + double t2_2 = t1_1 * t1_1; + double t2_3 = 2 * (t1_1 * t1_2); + double t2_4 = 2 * (t1_1 * t1_3) + t1_2 * t1_2; + double t2_5 = 2 * (t1_1 * t1_4 + t1_2 * t1_3); + double t2_6 = 2 * (t1_2 * t1_4) + t1_3 * t1_3; + double t2_7 = 2 * (t1_3 * t1_4); + double t2_8 = t1_4 * t1_4; + double t3_4 = t2_2 * t1_2 + t2_3 * t1_1; + double t3_6 = t2_2 * t1_4 + t2_3 * t1_3 + t2_4 * t1_2 + t2_5 * t1_1; + double t3_8 = t2_4 * t1_4 + t2_5 * t1_3 + t2_6 * t1_2 + t2_7 * t1_1; + double t3_10 = t2_6 * t1_4 + t2_7 * t1_3 + t2_8 * t1_2; + double t3_12 = t2_8 * t1_4; + double t4_4 = t2_2 * t2_2; + double t4_5 = 2 * (t2_2 * t2_3); + double t4_6 = 2 * (t2_2 * t2_4) + t2_3 * t2_3; + double t4_7 = 2 * (t2_2 * t2_5 + t2_3 * t2_4); + double t4_8 = 2 * (t2_2 * t2_6 + t2_3 * t2_5) + t2_4 * t2_4; + double t4_9 = 2 * (t2_2 * t2_7 + t2_3 * t2_6 + t2_4 * t2_5); + double t4_10 = 2 * (t2_2 * t2_8 + t2_3 * t2_7 + t2_4 * t2_6) + t2_5 * t2_5; + double t4_11 = 2 * (t2_3 * t2_8 + t2_4 * t2_7 + t2_5 * t2_6); + double t4_12 = 2 * (t2_4 * t2_8 + t2_5 * t2_7) + t2_6 * t2_6; + double t5_6 = t4_4 * t1_2 + t4_5 * t1_1; + double t5_8 = t4_4 * t1_4 + t4_5 * t1_3 + t4_6 * t1_2 + t4_7 * t1_1; + double t5_10 = t4_6 * t1_4 + t4_7 * t1_3 + t4_8 * t1_2 + t4_9 * t1_1; + double t5_12 = t4_8 * t1_4 + t4_9 * t1_3 + t4_10 * t1_2 + t4_11 * t1_1; + double t6_6 = t4_4 * t2_2; + double t6_7 = t4_4 * t2_3 + t4_5 * t2_2; + double t6_8 = t4_4 * t2_4 + t4_5 * t2_3 + t4_6 * t2_2; + double t6_9 = t4_4 * t2_5 + t4_5 * t2_4 + t4_6 * t2_3 + t4_7 * t2_2; + double t6_10 = t4_4 * t2_6 + t4_5 * t2_5 + t4_6 * t2_4 + t4_7 * t2_3 + t4_8 * t2_2; + double t6_11 = t4_4 * t2_7 + t4_5 * t2_6 + t4_6 * t2_5 + t4_7 * t2_4 + t4_8 * t2_3 + t4_9 * t2_2; + double t6_12 = t4_4 * t2_8 + t4_5 * t2_7 + t4_6 * t2_6 + t4_7 * t2_5 + t4_8 * t2_4 + t4_9 * t2_3 + t4_10 * t2_2; + double t7_8 = t6_6 * t1_2 + t6_7 * t1_1; + double t7_10 = t6_6 * t1_4 + t6_7 * t1_3 + t6_8 * t1_2 + t6_9 * t1_1; + double t7_12 = t6_8 * t1_4 + t6_9 * t1_3 + t6_10 * t1_2 + t6_11 * t1_1; + double t8_8 = t6_6 * t2_2; + double t8_9 = t6_6 * t2_3 + t6_7 * t2_2; + double t8_10 = t6_6 * t2_4 + t6_7 * t2_3 + t6_8 * t2_2; + double t8_11 = t6_6 * t2_5 + t6_7 * t2_4 + t6_8 * t2_3 + t6_9 * t2_2; + double t8_12 = t6_6 * t2_6 + t6_7 * t2_5 + t6_8 * t2_4 + t6_9 * t2_3 + t6_10 * t2_2; + double t9_10 = t8_8 * t1_2 + t8_9 * t1_1; + double t9_12 = t8_8 * t1_4 + t8_9 * t1_3 + t8_10 * t1_2 + t8_11 * t1_1; + double t10_10 = t8_8 * t2_2; + double t10_11 = t8_8 * t2_3 + t8_9 * t2_2; + double t10_12 = t8_8 * t2_4 + t8_9 * t2_3 + t8_10 * t2_2; + double t11_12 = t10_10 * t1_2 + t10_11 * t1_1; + double t12_12 = t10_10 * t2_2; + u = 1; + v = 0; + v += (1./12) * t1_2 + (1./80) * t1_4; + u -= (1./24) * t2_2 + (1./160) * t2_4 + (1./896) * t2_6 + (1./4608) * t2_8; + v -= (1./480) * t3_4 + (1./2688) * t3_6 + (1./13824) * t3_8 + (1./67584) * t3_10 + (1./319488) * t3_12; + u += (1./1920) * t4_4 + (1./10752) * t4_6 + (1./55296) * t4_8 + (1./270336) * t4_10 + (1./1.27795e+06) * t4_12; + v += (1./53760) * t5_6 + (1./276480) * t5_8 + (1./1.35168e+06) * t5_10 + (1./6.38976e+06) * t5_12; + u -= (1./322560) * t6_6 + (1./1.65888e+06) * t6_8 + (1./8.11008e+06) * t6_10 + (1./3.83386e+07) * t6_12; + v -= (1./1.16122e+07) * t7_8 + (1./5.67706e+07) * t7_10 + (1./2.6837e+08) * t7_12; + u += (1./9.28973e+07) * t8_8 + (1./4.54164e+08) * t8_10 + (1./2.14696e+09) * t8_12; + v += (1./4.08748e+09) * t9_10 + (1./1.93226e+10) * t9_12; + u -= (1./4.08748e+10) * t10_10 + (1./1.93226e+11) * t10_12; + v -= (1./2.12549e+12) * t11_12; + u += (1./2.55059e+13) * t12_12; +#endif + +#if ORDER == 16 + double t1_1 = km0; + double t1_2 = .5 * km1; + double t1_3 = (1./6) * km2; + double t1_4 = (1./24) * km3; + double t2_2 = t1_1 * t1_1; + double t2_3 = 2 * (t1_1 * t1_2); + double t2_4 = 2 * (t1_1 * t1_3) + t1_2 * t1_2; + double t2_5 = 2 * (t1_1 * t1_4 + t1_2 * t1_3); + double t2_6 = 2 * (t1_2 * t1_4) + t1_3 * t1_3; + double t2_7 = 2 * (t1_3 * t1_4); + double t2_8 = t1_4 * t1_4; + double t3_4 = t2_2 * t1_2 + t2_3 * t1_1; + double t3_6 = t2_2 * t1_4 + t2_3 * t1_3 + t2_4 * t1_2 + t2_5 * t1_1; + double t3_8 = t2_4 * t1_4 + t2_5 * t1_3 + t2_6 * t1_2 + t2_7 * t1_1; + double t3_10 = t2_6 * t1_4 + t2_7 * t1_3 + t2_8 * t1_2; + double t3_12 = t2_8 * t1_4; + double t4_4 = t2_2 * t2_2; + double t4_5 = 2 * (t2_2 * t2_3); + double t4_6 = 2 * (t2_2 * t2_4) + t2_3 * t2_3; + double t4_7 = 2 * (t2_2 * t2_5 + t2_3 * t2_4); + double t4_8 = 2 * (t2_2 * t2_6 + t2_3 * t2_5) + t2_4 * t2_4; + double t4_9 = 2 * (t2_2 * t2_7 + t2_3 * t2_6 + t2_4 * t2_5); + double t4_10 = 2 * (t2_2 * t2_8 + t2_3 * t2_7 + t2_4 * t2_6) + t2_5 * t2_5; + double t4_11 = 2 * (t2_3 * t2_8 + t2_4 * t2_7 + t2_5 * t2_6); + double t4_12 = 2 * (t2_4 * t2_8 + t2_5 * t2_7) + t2_6 * t2_6; + double t4_13 = 2 * (t2_5 * t2_8 + t2_6 * t2_7); + double t4_14 = 2 * (t2_6 * t2_8) + t2_7 * t2_7; + double t5_6 = t4_4 * t1_2 + t4_5 * t1_1; + double t5_8 = t4_4 * t1_4 + t4_5 * t1_3 + t4_6 * t1_2 + t4_7 * t1_1; + double t5_10 = t4_6 * t1_4 + t4_7 * t1_3 + t4_8 * t1_2 + t4_9 * t1_1; + double t5_12 = t4_8 * t1_4 + t4_9 * t1_3 + t4_10 * t1_2 + t4_11 * t1_1; + double t5_14 = t4_10 * t1_4 + t4_11 * t1_3 + t4_12 * t1_2 + t4_13 * t1_1; + double t6_6 = t4_4 * t2_2; + double t6_7 = t4_4 * t2_3 + t4_5 * t2_2; + double t6_8 = t4_4 * t2_4 + t4_5 * t2_3 + t4_6 * t2_2; + double t6_9 = t4_4 * t2_5 + t4_5 * t2_4 + t4_6 * t2_3 + t4_7 * t2_2; + double t6_10 = t4_4 * t2_6 + t4_5 * t2_5 + t4_6 * t2_4 + t4_7 * t2_3 + t4_8 * t2_2; + double t6_11 = t4_4 * t2_7 + t4_5 * t2_6 + t4_6 * t2_5 + t4_7 * t2_4 + t4_8 * t2_3 + t4_9 * t2_2; + double t6_12 = t4_4 * t2_8 + t4_5 * t2_7 + t4_6 * t2_6 + t4_7 * t2_5 + t4_8 * t2_4 + t4_9 * t2_3 + t4_10 * t2_2; + double t6_13 = t4_5 * t2_8 + t4_6 * t2_7 + t4_7 * t2_6 + t4_8 * t2_5 + t4_9 * t2_4 + t4_10 * t2_3 + t4_11 * t2_2; + double t6_14 = t4_6 * t2_8 + t4_7 * t2_7 + t4_8 * t2_6 + t4_9 * t2_5 + t4_10 * t2_4 + t4_11 * t2_3 + t4_12 * t2_2; + double t7_8 = t6_6 * t1_2 + t6_7 * t1_1; + double t7_10 = t6_6 * t1_4 + t6_7 * t1_3 + t6_8 * t1_2 + t6_9 * t1_1; + double t7_12 = t6_8 * t1_4 + t6_9 * t1_3 + t6_10 * t1_2 + t6_11 * t1_1; + double t7_14 = t6_10 * t1_4 + t6_11 * t1_3 + t6_12 * t1_2 + t6_13 * t1_1; + double t8_8 = t6_6 * t2_2; + double t8_9 = t6_6 * t2_3 + t6_7 * t2_2; + double t8_10 = t6_6 * t2_4 + t6_7 * t2_3 + t6_8 * t2_2; + double t8_11 = t6_6 * t2_5 + t6_7 * t2_4 + t6_8 * t2_3 + t6_9 * t2_2; + double t8_12 = t6_6 * t2_6 + t6_7 * t2_5 + t6_8 * t2_4 + t6_9 * t2_3 + t6_10 * t2_2; + double t8_13 = t6_6 * t2_7 + t6_7 * t2_6 + t6_8 * t2_5 + t6_9 * t2_4 + t6_10 * t2_3 + t6_11 * t2_2; + double t8_14 = t6_6 * t2_8 + t6_7 * t2_7 + t6_8 * t2_6 + t6_9 * t2_5 + t6_10 * t2_4 + t6_11 * t2_3 + t6_12 * t2_2; + double t9_10 = t8_8 * t1_2 + t8_9 * t1_1; + double t9_12 = t8_8 * t1_4 + t8_9 * t1_3 + t8_10 * t1_2 + t8_11 * t1_1; + double t9_14 = t8_10 * t1_4 + t8_11 * t1_3 + t8_12 * t1_2 + t8_13 * t1_1; + double t10_10 = t8_8 * t2_2; + double t10_11 = t8_8 * t2_3 + t8_9 * t2_2; + double t10_12 = t8_8 * t2_4 + t8_9 * t2_3 + t8_10 * t2_2; + double t10_13 = t8_8 * t2_5 + t8_9 * t2_4 + t8_10 * t2_3 + t8_11 * t2_2; + double t10_14 = t8_8 * t2_6 + t8_9 * t2_5 + t8_10 * t2_4 + t8_11 * t2_3 + t8_12 * t2_2; + double t11_12 = t10_10 * t1_2 + t10_11 * t1_1; + double t11_14 = t10_10 * t1_4 + t10_11 * t1_3 + t10_12 * t1_2 + t10_13 * t1_1; + double t12_12 = t10_10 * t2_2; + double t12_13 = t10_10 * t2_3 + t10_11 * t2_2; + double t12_14 = t10_10 * t2_4 + t10_11 * t2_3 + t10_12 * t2_2; + double t13_14 = t12_12 * t1_2 + t12_13 * t1_1; + double t14_14 = t12_12 * t2_2; + u = 1; + u -= 1./24 * t2_2 + 1./160 * t2_4 + 1./896 * t2_6 + 1./4608 * t2_8; + u += 1./1920 * t4_4 + 1./10752 * t4_6 + 1./55296 * t4_8 + 1./270336 * t4_10 + 1./1277952 * t4_12 + 1./5898240 * t4_14; + u -= 1./322560 * t6_6 + 1./1658880 * t6_8 + 1./8110080 * t6_10 + 1./38338560 * t6_12 + 1./176947200 * t6_14; + u += 1./92897280 * t8_8 + 1./454164480 * t8_10 + 4.6577500191e-10 * t8_12 + 1.0091791708e-10 * t8_14; + u -= 2.4464949595e-11 * t10_10 + 5.1752777990e-12 * t10_12 + 1.1213101898e-12 * t10_14; + u += 3.9206649992e-14 * t12_12 + 8.4947741650e-15 * t12_14; + u -= 4.6674583324e-17 * t14_14; + v = 0; + v += 1./12 * t1_2 + 1./80 * t1_4; + v -= 1./480 * t3_4 + 1./2688 * t3_6 + 1./13824 * t3_8 + 1./67584 * t3_10 + 1./319488 * t3_12; + v += 1./53760 * t5_6 + 1./276480 * t5_8 + 1./1351680 * t5_10 + 1./6389760 * t5_12 + 1./29491200 * t5_14; + v -= 1./11612160 * t7_8 + 1./56770560 * t7_10 + 1./268369920 * t7_12 + 8.0734333664e-10 * t7_14; + v += 2.4464949595e-10 * t9_10 + 5.1752777990e-11 * t9_12 + 1.1213101898e-11 * t9_14; + v -= 4.7047979991e-13 * t11_12 + 1.0193728998e-13 * t11_14; + v += 6.5344416654e-16 * t13_14; +#endif + + } + + if (n == 1) { +#if ORDER == 2 + x = 1; + y = 0; +#else + x = u; + y = v; +#endif + } else { + double th = (((th4 * s + th3) * s + th2) * s + th1) * s; + double cth = cos(th); + double sth = sin(th); + +#if ORDER == 2 + x += cth; + y += sth; +#else + x += cth * u - sth * v; + y += cth * v + sth * u; +#endif + s += ds; + } + } + +#if ORDER == 4 || ORDER == 6 + xy[0] = x * (1./24 * ds); + xy[1] = y * (1./24 * ds); +#else + xy[0] = x * ds; + xy[1] = y * ds; +#endif +} + +static double +compute_ends(const double ks[4], double ends[2][4], double seg_ch) +{ + double xy[2]; + double ch, th; + double l, l2, l3; + double th_even, th_odd; + double k0_even, k0_odd; + double k1_even, k1_odd; + double k2_even, k2_odd; + + integrate_spiro(ks, xy); + ch = hypot(xy[0], xy[1]); + th = atan2(xy[1], xy[0]); + l = ch / seg_ch; + + th_even = .5 * ks[0] + (1./48) * ks[2]; + th_odd = .125 * ks[1] + (1./384) * ks[3] - th; + ends[0][0] = th_even - th_odd; + ends[1][0] = th_even + th_odd; + k0_even = l * (ks[0] + .125 * ks[2]); + k0_odd = l * (.5 * ks[1] + (1./48) * ks[3]); + ends[0][1] = k0_even - k0_odd; + ends[1][1] = k0_even + k0_odd; + l2 = l * l; + k1_even = l2 * (ks[1] + .125 * ks[3]); + k1_odd = l2 * .5 * ks[2]; + ends[0][2] = k1_even - k1_odd; + ends[1][2] = k1_even + k1_odd; + l3 = l2 * l; + k2_even = l3 * ks[2]; + k2_odd = l3 * .5 * ks[3]; + ends[0][3] = k2_even - k2_odd; + ends[1][3] = k2_even + k2_odd; + + return l; +} + +static void +compute_pderivs(const spiro_seg *s, double ends[2][4], double derivs[4][2][4], + int jinc) +{ + double recip_d = 2e6; + double delta = 1./ recip_d; + double try_ks[4]; + double try_ends[2][4]; + int i, j, k; + + compute_ends(s->ks, ends, s->seg_ch); + for (i = 0; i < jinc; i++) { + for (j = 0; j < 4; j++) + try_ks[j] = s->ks[j]; + try_ks[i] += delta; + compute_ends(try_ks, try_ends, s->seg_ch); + for (k = 0; k < 2; k++) + for (j = 0; j < 4; j++) + derivs[j][k][i] = recip_d * (try_ends[k][j] - ends[k][j]); + } +} + +static double +mod_2pi(double th) +{ + double u = th / (2 * M_PI); + return 2 * M_PI * (u - floor(u + 0.5)); +} + +static spiro_seg * +setup_path(const spiro_cp *src, int n) +{ + int n_seg = src[0].ty == '{' ? n - 1 : n; + spiro_seg *r = (spiro_seg *)malloc((n_seg + 1) * sizeof(spiro_seg)); + int i; + int ilast; + + for (i = 0; i < n_seg; i++) { + r[i].x = src[i].x; + r[i].y = src[i].y; + r[i].ty = src[i].ty; + r[i].ks[0] = 0.; + r[i].ks[1] = 0.; + r[i].ks[2] = 0.; + r[i].ks[3] = 0.; + } + r[n_seg].x = src[n_seg % n].x; + r[n_seg].y = src[n_seg % n].y; + r[n_seg].ty = src[n_seg % n].ty; + + for (i = 0; i < n_seg; i++) { + double dx = r[i + 1].x - r[i].x; + double dy = r[i + 1].y - r[i].y; + r[i].seg_ch = hypot(dx, dy); + r[i].seg_th = atan2(dy, dx); + } + + ilast = n_seg - 1; + for (i = 0; i < n_seg; i++) { + if (r[i].ty == '{' || r[i].ty == '}' || r[i].ty == 'v') + r[i].bend_th = 0.; + else + r[i].bend_th = mod_2pi(r[i].seg_th - r[ilast].seg_th); + ilast = i; + } + return r; +} + +static void +bandec11(bandmat *m, int *perm, int n) +{ + int i, j, k; + int l; + + /* pack top triangle to the left. */ + for (i = 0; i < 5; i++) { + for (j = 0; j < i + 6; j++) + m[i].a[j] = m[i].a[j + 5 - i]; + for (; j < 11; j++) + m[i].a[j] = 0.; + } + l = 5; + for (k = 0; k < n; k++) { + int pivot = k; + double pivot_val = m[k].a[0]; + double pivot_scale; + + l = l < n ? l + 1 : n; + + for (j = k + 1; j < l; j++) + if (fabs(m[j].a[0]) > fabs(pivot_val)) { + pivot_val = m[j].a[0]; + pivot = j; + } + + perm[k] = pivot; + if (pivot != k) { + for (j = 0; j < 11; j++) { + double tmp = m[k].a[j]; + m[k].a[j] = m[pivot].a[j]; + m[pivot].a[j] = tmp; + } + } + + if (fabs(pivot_val) < 1e-12) pivot_val = 1e-12; + pivot_scale = 1. / pivot_val; + for (i = k + 1; i < l; i++) { + double x = m[i].a[0] * pivot_scale; + m[k].al[i - k - 1] = x; + for (j = 1; j < 11; j++) + m[i].a[j - 1] = m[i].a[j] - x * m[k].a[j]; + m[i].a[10] = 0.; + } + } +} + +static void +banbks11(const bandmat *m, const int *perm, double *v, int n) +{ + int i, k, l; + + /* forward substitution */ + l = 5; + for (k = 0; k < n; k++) { + i = perm[k]; + if (i != k) { + double tmp = v[k]; + v[k] = v[i]; + v[i] = tmp; + } + if (l < n) l++; + for (i = k + 1; i < l; i++) + v[i] -= m[k].al[i - k - 1] * v[k]; + } + + /* back substitution */ + l = 1; + for (i = n - 1; i >= 0; i--) { + double x = v[i]; + for (k = 1; k < l; k++) + x -= m[i].a[k] * v[k + i]; + v[i] = x / m[i].a[0]; + if (l < 11) l++; + } +} + +int compute_jinc(char ty0, char ty1) +{ + if (ty0 == 'o' || ty1 == 'o' || + ty0 == ']' || ty1 == '[') + return 4; + else if (ty0 == 'c' && ty1 == 'c') + return 2; + else if (((ty0 == '{' || ty0 == 'v' || ty0 == '[') && ty1 == 'c') || + (ty0 == 'c' && (ty1 == '}' || ty1 == 'v' || ty1 == ']'))) + return 1; + else + return 0; +} + +int count_vec(const spiro_seg *s, int nseg) +{ + int i; + int n = 0; + + for (i = 0; i < nseg; i++) + n += compute_jinc(s[i].ty, s[i + 1].ty); + return n; +} + +static void +add_mat_line(bandmat *m, double *v, + double derivs[4], double x, double y, int j, int jj, int jinc, + int nmat) +{ + int k; + + if (jj >= 0) { + int joff = (j + 5 - jj + nmat) % nmat; + if (nmat < 6) { + joff = j + 5 - jj; + } else if (nmat == 6) { + joff = 2 + (j + 3 - jj + nmat) % nmat; + } +#ifdef VERBOSE + printf("add_mat_line j=%d jj=%d jinc=%d nmat=%d joff=%d\n", j, jj, jinc, nmat, joff); +#endif + v[jj] += x; + for (k = 0; k < jinc; k++) + m[jj].a[joff + k] += y * derivs[k]; + } +} + +static double +spiro_iter(spiro_seg *s, bandmat *m, int *perm, double *v, int n) +{ + int cyclic = s[0].ty != '{' && s[0].ty != 'v'; + int i, j, jj; + int nmat = count_vec(s, n); + double norm; + int n_invert; + + for (i = 0; i < nmat; i++) { + v[i] = 0.; + for (j = 0; j < 11; j++) + m[i].a[j] = 0.; + for (j = 0; j < 5; j++) + m[i].al[j] = 0.; + } + + j = 0; + if (s[0].ty == 'o') + jj = nmat - 2; + else if (s[0].ty == 'c') + jj = nmat - 1; + else + jj = 0; + for (i = 0; i < n; i++) { + char ty0 = s[i].ty; + char ty1 = s[i + 1].ty; + int jinc = compute_jinc(ty0, ty1); + double th = s[i].bend_th; + double ends[2][4]; + double derivs[4][2][4]; + int jthl = -1, jk0l = -1, jk1l = -1, jk2l = -1; + int jthr = -1, jk0r = -1, jk1r = -1, jk2r = -1; + + compute_pderivs(&s[i], ends, derivs, jinc); + + /* constraints crossing left */ + if (ty0 == 'o' || ty0 == 'c' || ty0 == '[' || ty0 == ']') { + jthl = jj++; + jj %= nmat; + jk0l = jj++; + } + if (ty0 == 'o') { + jj %= nmat; + jk1l = jj++; + jk2l = jj++; + } + + /* constraints on left */ + if ((ty0 == '[' || ty0 == 'v' || ty0 == '{' || ty0 == 'c') && + jinc == 4) { + if (ty0 != 'c') + jk1l = jj++; + jk2l = jj++; + } + + /* constraints on right */ + if ((ty1 == ']' || ty1 == 'v' || ty1 == '}' || ty1 == 'c') && + jinc == 4) { + if (ty1 != 'c') + jk1r = jj++; + jk2r = jj++; + } + + /* constraints crossing right */ + if (ty1 == 'o' || ty1 == 'c' || ty1 == '[' || ty1 == ']') { + jthr = jj; + jk0r = (jj + 1) % nmat; + } + if (ty1 == 'o') { + jk1r = (jj + 2) % nmat; + jk2r = (jj + 3) % nmat; + } + + add_mat_line(m, v, derivs[0][0], th - ends[0][0], 1, j, jthl, jinc, nmat); + add_mat_line(m, v, derivs[1][0], ends[0][1], -1, j, jk0l, jinc, nmat); + add_mat_line(m, v, derivs[2][0], ends[0][2], -1, j, jk1l, jinc, nmat); + add_mat_line(m, v, derivs[3][0], ends[0][3], -1, j, jk2l, jinc, nmat); + add_mat_line(m, v, derivs[0][1], -ends[1][0], 1, j, jthr, jinc, nmat); + add_mat_line(m, v, derivs[1][1], -ends[1][1], 1, j, jk0r, jinc, nmat); + add_mat_line(m, v, derivs[2][1], -ends[1][2], 1, j, jk1r, jinc, nmat); + add_mat_line(m, v, derivs[3][1], -ends[1][3], 1, j, jk2r, jinc, nmat); + j += jinc; + } + if (cyclic) { + memcpy(m + nmat, m, sizeof(bandmat) * nmat); + memcpy(m + 2 * nmat, m, sizeof(bandmat) * nmat); + memcpy(v + nmat, v, sizeof(double) * nmat); + memcpy(v + 2 * nmat, v, sizeof(double) * nmat); + n_invert = 3 * nmat; + j = nmat; + } else { + n_invert = nmat; + j = 0; + } +/* +#define VERBOSE +*/ +#ifdef VERBOSE + for (i = 0; i < n; i++) { + int k; + for (k = 0; k < 11; k++) + printf(" %2.4f", m[i].a[k]); + printf(": %2.4f\n", v[i]); + } + printf("---\n"); +#endif + bandec11(m, perm, n_invert); + banbks11(m, perm, v, n_invert); + norm = 0.; + for (i = 0; i < n; i++) { + char ty0 = s[i].ty; + char ty1 = s[i + 1].ty; + int jinc = compute_jinc(ty0, ty1); + int k; + + for (k = 0; k < jinc; k++) { + double dk = v[j++]; + +#ifdef VERBOSE + printf("s[%d].ks[%d] += %f\n", i, k, dk); +#endif + s[i].ks[k] += dk; + norm += dk * dk; + } + } + return norm; +} + +int +solve_spiro(spiro_seg *s, int nseg) +{ + bandmat *m; + double *v; + int *perm; + int nmat = count_vec(s, nseg); + int n_alloc = nmat; + double norm; + int i; + + if (nmat == 0) + return 0; + if (s[0].ty != '{' && s[0].ty != 'v') + n_alloc *= 3; + if (n_alloc < 5) + n_alloc = 5; + m = (bandmat *)malloc(sizeof(bandmat) * n_alloc); + v = (double *)malloc(sizeof(double) * n_alloc); + perm = (int *)malloc(sizeof(int) * n_alloc); + + for (i = 0; i < 10; i++) { + norm = spiro_iter(s, m, perm, v, nseg); +#ifdef VERBOSE + printf("%% norm = %g\n", norm); +#endif + if (norm < 1e-12) break; + } + + free(m); + free(v); + free(perm); + return 0; +} + +static void +spiro_seg_to_bpath(const double ks[4], + double x0, double y0, double x1, double y1, + bezctx *bc, int depth) +{ + double bend = fabs(ks[0]) + fabs(.5 * ks[1]) + fabs(.125 * ks[2]) + + fabs((1./48) * ks[3]); + + if (!(bend > 1e-8)) { + bezctx_lineto(bc, x1, y1); + } else { + double seg_ch = hypot(x1 - x0, y1 - y0); + double seg_th = atan2(y1 - y0, x1 - x0); + double xy[2]; + double ch, th; + double scale, rot; + double th_even, th_odd; + double ul, vl; + double ur, vr; + + integrate_spiro(ks, xy); + ch = hypot(xy[0], xy[1]); + th = atan2(xy[1], xy[0]); + scale = seg_ch / ch; + rot = seg_th - th; + if (depth > 10 || bend < 0.5) { + th_even = (1./384) * ks[3] + (1./8) * ks[1] + rot; + th_odd = (1./48) * ks[2] + .5 * ks[0]; + ul = (scale * (1./3)) * cos(th_even - th_odd); + vl = (scale * (1./3)) * sin(th_even - th_odd); + ur = (scale * (1./3)) * cos(th_even + th_odd); + vr = (scale * (1./3)) * sin(th_even + th_odd); + bezctx_curveto(bc, x0 + ul, y0 + vl, x1 - ur, y1 - vr, x1, y1); + } else { + /* subdivide */ + double ksub[4]; + double thsub; + double xysub[2]; + double xmid, ymid; + double cth, sth; + + ksub[0] = .5 * ks[0] - .125 * ks[1] + (1./64) * ks[2] - (1./768) * ks[3]; + ksub[1] = .25 * ks[1] - (1./16) * ks[2] + (1./128) * ks[3]; + ksub[2] = .125 * ks[2] - (1./32) * ks[3]; + ksub[3] = (1./16) * ks[3]; + thsub = rot - .25 * ks[0] + (1./32) * ks[1] - (1./384) * ks[2] + (1./6144) * ks[3]; + cth = .5 * scale * cos(thsub); + sth = .5 * scale * sin(thsub); + integrate_spiro(ksub, xysub); + xmid = x0 + cth * xysub[0] - sth * xysub[1]; + ymid = y0 + cth * xysub[1] + sth * xysub[0]; + spiro_seg_to_bpath(ksub, x0, y0, xmid, ymid, bc, depth + 1); + ksub[0] += .25 * ks[1] + (1./384) * ks[3]; + ksub[1] += .125 * ks[2]; + ksub[2] += (1./16) * ks[3]; + spiro_seg_to_bpath(ksub, xmid, ymid, x1, y1, bc, depth + 1); + } + } +} + +spiro_seg * +run_spiro(const spiro_cp *src, int n) +{ + int nseg = src[0].ty == '{' ? n - 1 : n; + spiro_seg *s = setup_path(src, n); + if (nseg > 1) + solve_spiro(s, nseg); + return s; +} + +void +free_spiro(spiro_seg *s) +{ + free(s); +} + +void +spiro_to_bpath(const spiro_seg *s, int n, bezctx *bc) +{ + int i; + int nsegs = s[n - 1].ty == '}' ? n - 1 : n; + + for (i = 0; i < nsegs; i++) { + double x0 = s[i].x; + double y0 = s[i].y; + double x1 = s[i + 1].x; + double y1 = s[i + 1].y; + + if (i == 0) + bezctx_moveto(bc, x0, y0, s[0].ty == '{'); + bezctx_mark_knot(bc, i); + spiro_seg_to_bpath(s[i].ks, x0, y0, x1, y1, bc, 0); + } +} + +double +get_knot_th(const spiro_seg *s, int i) +{ + double ends[2][4]; + + if (i == 0) { + compute_ends(s[i].ks, ends, s[i].seg_ch); + return s[i].seg_th - ends[0][0]; + } else { + compute_ends(s[i - 1].ks, ends, s[i - 1].seg_ch); + return s[i - 1].seg_th + ends[1][0]; + } +} + +#ifdef UNIT_TEST +#include +#include /* for gettimeofday */ + +static double +get_time (void) +{ + struct timeval tv; + struct timezone tz; + + gettimeofday (&tv, &tz); + + return tv.tv_sec + 1e-6 * tv.tv_usec; +} + +int +test_integ(void) { + double ks[] = {1, 2, 3, 4}; + double xy[2]; + double xynom[2]; + double ch, th; + int i, j; + int nsubdiv; + + n = ORDER < 6 ? 4096 : 1024; + integrate_spiro(ks, xynom); + nsubdiv = ORDER < 12 ? 8 : 7; + for (i = 0; i < nsubdiv; i++) { + double st, en; + double err; + int n_iter = (1 << (20 - i)); + + n = 1 << i; + st = get_time(); + for (j = 0; j < n_iter; j++) + integrate_spiro(ks, xy); + en = get_time(); + err = hypot(xy[0] - xynom[0], xy[1] - xynom[1]); +#ifdef VERBOSE + printf("%d %d %g %g\n", ORDER, n, (en - st) / n_iter, err); +#endif + ch = hypot(xy[0], xy[1]); + th = atan2(xy[1], xy[0]); +#if 0 + printf("n = %d: integ(%g %g %g %g) = %g %g, ch = %g, th = %g\n", n, + ks[0], ks[1], ks[2], ks[3], xy[0], xy[1], ch, th); + printf("%d: %g %g\n", n, xy[0] - xynom[0], xy[1] - xynom[1]); +#endif + } + return 0; +} + +void +print_seg(const double ks[4], double x0, double y0, double x1, double y1) +{ + double bend = fabs(ks[0]) + fabs(.5 * ks[1]) + fabs(.125 * ks[2]) + + fabs((1./48) * ks[3]); + + if (bend < 1e-8) { +#ifdef VERBOSE + printf("%g %g lineto\n", x1, y1); +#endif + } else { + double seg_ch = hypot(x1 - x0, y1 - y0); + double seg_th = atan2(y1 - y0, x1 - x0); + double xy[2]; + double ch, th; + double scale, rot; + double th_even, th_odd; + double ul, vl; + double ur, vr; + + integrate_spiro(ks, xy); + ch = hypot(xy[0], xy[1]); + th = atan2(xy[1], xy[0]); + scale = seg_ch / ch; + rot = seg_th - th; + if (bend < 1.) { + th_even = (1./384) * ks[3] + (1./8) * ks[1] + rot; + th_odd = (1./48) * ks[2] + .5 * ks[0]; + ul = (scale * (1./3)) * cos(th_even - th_odd); + vl = (scale * (1./3)) * sin(th_even - th_odd); + ur = (scale * (1./3)) * cos(th_even + th_odd); + vr = (scale * (1./3)) * sin(th_even + th_odd); +#ifdef VERBOSE + printf("%g %g %g %g %g %g curveto\n", + x0 + ul, y0 + vl, x1 - ur, y1 - vr, x1, y1); +#endif + + } else { + /* subdivide */ + double ksub[4]; + double thsub; + double xysub[2]; + double xmid, ymid; + double cth, sth; + + ksub[0] = .5 * ks[0] - .125 * ks[1] + (1./64) * ks[2] - (1./768) * ks[3]; + ksub[1] = .25 * ks[1] - (1./16) * ks[2] + (1./128) * ks[3]; + ksub[2] = .125 * ks[2] - (1./32) * ks[3]; + ksub[3] = (1./16) * ks[3]; + thsub = rot - .25 * ks[0] + (1./32) * ks[1] - (1./384) * ks[2] + (1./6144) * ks[3]; + cth = .5 * scale * cos(thsub); + sth = .5 * scale * sin(thsub); + integrate_spiro(ksub, xysub); + xmid = x0 + cth * xysub[0] - sth * xysub[1]; + ymid = y0 + cth * xysub[1] + sth * xysub[0]; + print_seg(ksub, x0, y0, xmid, ymid); + ksub[0] += .25 * ks[1] + (1./384) * ks[3]; + ksub[1] += .125 * ks[2]; + ksub[2] += (1./16) * ks[3]; + print_seg(ksub, xmid, ymid, x1, y1); + } + } +} + +void +print_segs(const spiro_seg *segs, int nsegs) +{ + int i; + + for (i = 0; i < nsegs; i++) { + double x0 = segs[i].x; + double y0 = segs[i].y; + double x1 = segs[i + 1].x; + double y1 = segs[i + 1].y; + + if (i == 0) + printf("%g %g moveto\n", x0, y0); + printf("%% ks = [ %g %g %g %g ]\n", + segs[i].ks[0], segs[i].ks[1], segs[i].ks[2], segs[i].ks[3]); + print_seg(segs[i].ks, x0, y0, x1, y1); + } + printf("stroke\n"); +} + +int +test_curve(void) +{ + spiro_cp path[] = { + {334, 117, 'v'}, + {305, 176, 'v'}, + {212, 142, 'c'}, + {159, 171, 'c'}, + {224, 237, 'c'}, + {347, 335, 'c'}, + {202, 467, 'c'}, + {81, 429, 'v'}, + {114, 368, 'v'}, + {201, 402, 'c'}, + {276, 369, 'c'}, + {218, 308, 'c'}, + {91, 211, 'c'}, + {124, 111, 'c'}, + {229, 82, 'c'} + }; + spiro_seg *segs; + int i; + + n = 1; + for (i = 0; i < 1000; i++) { + segs = setup_path(path, 15); + solve_spiro(segs, 15); + } + printf("100 800 translate 1 -1 scale 1 setlinewidth\n"); + print_segs(segs, 15); + printf("showpage\n"); + return 0; +} + +int main(int argc, char **argv) +{ + return test_curve(); +} +#endif diff --git a/app/cornu/spiro.h b/app/cornu/spiro.h new file mode 100644 index 0000000..1bcca37 --- /dev/null +++ b/app/cornu/spiro.h @@ -0,0 +1,22 @@ +#ifndef _SPIRO_H +#define _SPIRO_H +#include "bezctx_intf.h" +typedef struct { + double x; + double y; + char ty; +} spiro_cp; + +typedef struct spiro_seg_s spiro_seg; + +spiro_seg * +run_spiro(const spiro_cp *src, int n); + +void +free_spiro(spiro_seg *s); + +void +spiro_to_bpath(const spiro_seg *s, int n, bezctx *bc); + +double get_knot_th(const spiro_seg *s, int i); +#endif diff --git a/app/cornu/spiroentrypoints.c b/app/cornu/spiroentrypoints.c new file mode 100644 index 0000000..0128115 --- /dev/null +++ b/app/cornu/spiroentrypoints.c @@ -0,0 +1,60 @@ +/* +libspiro - conversion between spiro control points and bezier's +Copyright (C) 2007 Raph Levien + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. + +*/ +/* Interface routines to Raph's spiro package. */ + +#include "spiroentrypoints.h" + +void +SpiroCPsToBezier(spiro_cp *spiros,int n,int isclosed,bezctx *bc) +{ + spiro_seg *s; + + if ( n<1 ) +return; + if ( !isclosed ) { + char oldty_start = spiros[0].ty; + char oldty_end = spiros[n-1].ty; + spiros[0].ty = '{'; + spiros[n-1].ty = '}'; + s = run_spiro(spiros,n); + spiros[n-1].ty = oldty_end; + spiros[0].ty = oldty_start; + } else + s = run_spiro(spiros,n); + spiro_to_bpath(s,n,bc); + free_spiro(s); +} + +void +TaggedSpiroCPsToBezier(spiro_cp *spiros,bezctx *bc) +{ + spiro_seg *s; + int n; + + for ( n=0; spiros[n].ty!='z' && spiros[n].ty!='}'; ++n ); + if ( spiros[n].ty == '}' ) ++n; + + if ( n<1 ) +return; + s = run_spiro(spiros,n); + spiro_to_bpath(s,n,bc); + free_spiro(s); +} diff --git a/app/cornu/spiroentrypoints.h b/app/cornu/spiroentrypoints.h new file mode 100644 index 0000000..006804c --- /dev/null +++ b/app/cornu/spiroentrypoints.h @@ -0,0 +1,31 @@ +#ifndef _SPIROENTRYPOINTS_H +# define _SPIROENTRYPOINTS_H +# include "bezctx_intf.h" +# include "spiro.h" + + /* Possible values of the "ty" field. */ +#define SPIRO_CORNER 'v' +#define SPIRO_G4 'o' +#define SPIRO_G2 'c' +#define SPIRO_LEFT '[' +#define SPIRO_RIGHT ']' + + /* For a closed contour add an extra cp with a ty set to */ +#define SPIRO_END 'z' + /* For an open contour the first cp must have a ty set to*/ +#define SPIRO_OPEN_CONTOUR '{' + /* For an open contour the last cp must have a ty set to */ +#define SPIRO_END_OPEN_CONTOUR '}' + +/* The spiros array should indicate it's own end... So */ +/* Open contours must have the ty field of the first cp set to '{' */ +/* and have the ty field of the last cp set to '}' */ +/* Closed contours must have an extra cp at the end whose ty is 'z' */ +/* the x&y values of this extra cp are ignored */ +extern void TaggedSpiroCPsToBezier(spiro_cp *spiros,bezctx *bc); + +/* The first argument is an array of spiro control points. */ +/* Open contours do not need to start with '{', nor to end with '}' */ +/* Close contours do not need to end with 'z' */ +extern void SpiroCPsToBezier(spiro_cp *spiros,int n,int isclosed,bezctx *bc); +#endif diff --git a/app/cornu/zmisc.h b/app/cornu/zmisc.h new file mode 100644 index 0000000..ce3d4d3 --- /dev/null +++ b/app/cornu/zmisc.h @@ -0,0 +1,12 @@ +/** + * Misc portability and convenience macros. + **/ + +#include + +#define zalloc malloc +#define zrealloc realloc +#define zfree free + +#define znew(type, n) (type *)zalloc(sizeof(type) * (n)) +#define zrenew(type, p, n) (type *)zrealloc((p), sizeof(type) * (n)) diff --git a/app/doc/CMakeLists.txt b/app/doc/CMakeLists.txt index 03ac14b..a01d7af 100644 --- a/app/doc/CMakeLists.txt +++ b/app/doc/CMakeLists.txt @@ -89,7 +89,7 @@ IF(XTRKCAD_USE_GTK) ) INSTALL( FILES xtrkcad_osx.css - DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}/XTrackCAD.help/Contents/Resources/en.lproj + DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}/XTrackCAD.help/Contents/Resources/en.lproj/sty ) ENDIF(APPLE) diff --git a/app/doc/ChangeLog b/app/doc/ChangeLog deleted file mode 100644 index f04fcd6..0000000 --- a/app/doc/ChangeLog +++ /dev/null @@ -1,24 +0,0 @@ -Jul 25, 2009 - ENH: Martin Fischer - intro.but.in: add description of command line arguments, - update for new directory layout. - -Jun 09, 2009: - ENH: Martin Fischer - update.but: update release description - -Jun 06, 2009 - ENH: Martin Fischer - intro.but.in: updated Linux installation information - -Mar 21, 2008 - IMPROVEMENT: Bob Blackwell - updated doc for option dialogs - -Dec 02, 2007 - IMPROVEMENT: Bob Blackwell - Spelling and formatting Corrections - Move messages to appendix - Split appendix in to individual files to allow - messages.but to be included during build - diff --git a/app/doc/addm.but b/app/doc/addm.but index cee8896..724e5fd 100644 --- a/app/doc/addm.but +++ b/app/doc/addm.but @@ -52,19 +52,19 @@ The \f{Add Menu} has all the actions related to adding track pieces to the layou \u000 -\dd \f{Block} - Create, edit or delete a block. +\dd \f{Block} - Create a block. \u000 -\dd \f{Switchmotor} - Create, edit or delete a switchmotor. +\dd \f{Switchmotor} - Create a switchmotor. \u000 -\dd \f{Signal} - Create, edit or delete a signal. +\dd \f{Signal} - Create a signal. \u000 -\dd \f{Control} - Create a signal. +\dd \f{Control} - Create a control. \u000 @@ -100,26 +100,36 @@ You can join to and from circles, after which they become curved tracks. \rule - \S{cmdCurve} Curved Track \G{png.d/bcurve.png} Creating a curve is a two step operation. The four methods (with their Shortcut keys) used to create a Curved Track are: -\dd \G{png.d/bcurve1.png} (\c{Control-4}) Drag from one endpoint in the direction of the Curve at that point and release. Click and Drag to position the second endpoint. +\dd \G{png.d/bcurve1.png} (\c{Control-4}) Drag from one endpoint in the direction of the Curve at that point and release. Click and Drag the red arrows to position the second endpoint. +If Shift is held down when the first endpoint is being placed and the cursor is on a track, the new curve end will "Snap" to the nearest open track endpoint and you can drag out the second end aligned to that track. After a track is competed, the new track will be connected to this first track. \u000 \dd \G{png.d/bcurve2.png} (\c{Control-5}) Drag from one of the endpoints to the Center of the Curved track and release. Click and Drag to position the second endpoint. +If Shift is held down when the first endpoint is being placed and the cursor is on a track, the new curve end will "Snap" to the nearest open track endpoint and you can drag out the center at right angles aligned to that end. After a track is competed, the new track will be connected to this first track. \u000 \dd \G{png.d/bcurve3.png} (\c{Control-6}) Drag from the Center of the Curved track to one of the endpoints and release. Click and Drag to position the second endpoint. +Shift has no effect. \u000 \dd \G{png.d/bcurve4.png} (\c{Control-7}) Drag from one endpoint to the other endpoint to form the Chord of the Curve and release. Click on the center of the track and Drag to form the Curve. +Shift has no effect. + +\u000 + +\dd \G{png.d/bezier.png} Place one endpoint and drag out the first control point and release, Place the second Endpoint and drag out the second control point and release. Once all 4 points are placed, you can pick one at a time and drag it to move it. Complete the Curve by pressing Enter, or Reject it with Esc. +If Shift is held down when either endpoint is being placed it will "Snap" to an open track endpoint of the track underneath the cursor and you can only drag out the control point aligned to the end of the track. After the new track is competed, it will be connected to this existing track. + +\u000 A drop down menu, which allows selection of the Curved Track creation method, is invoked from the down arrow button (\G{png.d/bmenu.png}) located on the right side the Curved track button. Dependent upon previous selection, the Curved Track button will look like \G{png.d/bcurve1.png}, \G{png.d/bcurve2.png}, \G{png.d/bcurve3.png} or \G{png.d/bcurve4.png}. @@ -127,7 +137,7 @@ A drop down menu, which allows selection of the Curved Track creation method, is \dd \e{Curved Track Button Menu} -In all cases, two Red arrow heads will be drawn after the first step to indicate where you can Drag to complete the second step. +In all but the bezier case, two Red arrow heads will be drawn after the first step to indicate where you can Drag to complete the second step. A straight track will be created if the second endpoint is lined up with the first endpoint. @@ -135,6 +145,10 @@ If the Snap Grid (\K{cmdGrid}) is enabled then the endpoints will be constrained Optionally, the curve center point and radius can be displayed for the Curve. This is enabled by the Move Label (\K{cmdMoveLabel}) command. +For Beziers, the active control point will be drawn in red and the available endpoints are shown with circles. + +\f{Note:} You can also create Straight and Curved tracks using \k{cmdModify} by dragging out extra track from an open end-point. + \rule @@ -165,8 +179,6 @@ Note: the drawing is an approximation to show the location of the \e{Points} and \S{cmdHelix} Helix Track -\G{png.d/bhelix.png} - A helix track is used to change the elevation of track in a restricted space. A helix is drawn as a circle of track, but in 3 dimensions it would resemble a cork screw or the pattern of threads on a bolt. \G{png.d/ahelix.png} @@ -216,6 +228,7 @@ It is possible to create tracks that abut (the endpoints are very close and alig \G{png.d/bstraigh.png} Straight track is a created by selecting the first endpoint then dragging the cursor to the point where you want the second endpoint to be. +If Shift is held down when the first endpoint is being placed and the cursor is on a track, the new straight end will "Snap" to the nearest open track endpoint and you can drag out the second end aligned to that track. After a track is competed, the new track will be connected to the existing track. If the Snap Grid (\K{cmdGrid}) is enabled then the endpoints will be constrained to the grid. diff --git a/app/doc/changem.but b/app/doc/changem.but index 2bcd90b..c8cb189 100644 --- a/app/doc/changem.but +++ b/app/doc/changem.but @@ -20,7 +20,7 @@ The \f{Change Menu} has all functions related to modifying objects that exist on \u000 -\dd \f{Connect Sectional Tracks} - creates a connection between sectional track pieces by slightly moving the select piece(s) and the pieces they connect to. +\dd \f{Connect Two Tracks} - creates a connection between track pieces with an option to slightly move the select piece(s) and the pieces they connect to. (\K{cmdConnect}). \u000 @@ -28,39 +28,43 @@ The \f{Change Menu} has all functions related to modifying objects that exist on \u000 -\dd \f{Flip} - turn selected object(s) over or around. +\dd \f{Flip} - turn selected object(s) over or around. (\K{cmdFlip}). \u000 -\dd \f{Join} - connect two separate pieces of track. This command can be used to move one of the pieces of track to the endpoint of the other or to create a connection by laying a stretch of flex-track. +\dd \f{Join} - connect two separate pieces of track. This command can be used to move one of the pieces of track to the endpoint of the other or to create a connection by laying a stretch of flex-track. (\K{cmdJoin}). \u000 -\dd \f{Modify} - modify an existing track. +\dd \f{Modify} - modify an existing track, or lines. (\K{cmdModify}). \u000 -\dd \f{Move} - move selected object(s). +\dd \f{Move} - move selected object(s). (\K{cmdMove}). \u000 -\dd \f{Move Description} - move the endpoint description of a track piece to another location. +\dd \f{Move Description} - move the endpoint description of a track piece to another location. (\K{cmdMoveLabel}). \u000 +\dd \f{Pan/Zoom} - move or resize the viewport using the mouse. + +\u000 + \dd \f{Profile} - display the elevation profile of a definable stretch of track (\K{cmdProfile}). \u000 -\dd \f{Properties} - sets \e{XTrackCAD} into \e{Describe} mode. Whenever an object is clicked on while in this mode, the \f{Properties} dialog is opened. This dialog allows direct manipulation of settings such as the objects length, position or orientation. +\dd \f{Properties} - sets \e{XTrackCAD} into \e{Describe} mode. Whenever an object is clicked on while in this mode, the \f{Properties} dialog is opened. This dialog allows direct manipulation of settings such as the objects length, position or orientation. (\K{cmdDescribe}). \u000 -\dd \f{Raise/Lower Elevations} - raise or lower elevation of selected tracks. +\dd \f{Raise/Lower Elevations} - raise or lower elevation of selected tracks. (\K{cmdRaiseElev}). \u000 -\dd \f{Rotate} - rotate selected object(s). +\dd \f{Rotate} - rotate selected object(s). (\K{cmdRotate}). \u000 @@ -68,11 +72,11 @@ The \f{Change Menu} has all functions related to modifying objects that exist on \u000 -\dd \f{Select} - sets \e{XTrackCAD} into \e{Select} mode. Whenever an object is clicked on while in this mode, this selection state of this object is reversed. If an object was unselected it becomes selected, and vice versa. To unselect all objects press the ESC key, use \f{Deselect All} from the \f{Edit} (\K{editM}) menu or \f{Deselect All} from the \f{Pop-up} menu (\K{mouseBcmd}). +\dd \f{Select} - sets \e{XTrackCAD} into \e{Select} mode. Whenever an object is clicked on while in this mode, this selection state of this object is reversed. If an object was unselected it becomes selected, and vice versa. To unselect all objects press the ESC key, use \f{Deselect All} from the \f{Edit} (\K{editM}) menu or \f{Deselect All} from the \f{Pop-up} menu (\K{mouseBcmd}). (\K{cmdSelect}). \u000 -\dd \f{Split Track} - the \f{Split Track} command can be used in one of two ways; +\dd \f{Split Track} - the \f{Split Track} (\K{cmdSplitTrack}) command can be used in one of two ways; \lcont{ @@ -115,17 +119,27 @@ Using the \f{Select} command, select the track that is to have its elevation set \rule -\S{cmdConnect} Connect Sectional Tracks +\S{cmdConnect} Connect Tracks \G{png.d/bconnect.png} -This command is used exclusively with \e{Sectional Track}. +This command is frequently used with \e{Sectional Track}. But it can be useful to reattach ordinary track which has become disconected or split. + +There are three modes, + +\u000 + +\b a \f{Left} click on a track near a disconnected end-point followed by a second on a close-by disconnected end-point on another track will try to join two tracks -Occasionally pieces of sectional track do not line up exactly, especially when creating figure-8's or passing sidings. When laying out the actual track you can compensate for this by adjusting the individual tracks to provide a bit of slack. This command simulates that process. +\b a \f{Shift-Left} click on a connected track will "Tighten Tracks" moving other tracks connected to this track to reduce any small distance or angle differences -Click on the endpoint of each track you're trying to connect. Tracks will move slightly in an attempt to overcome the gap. If the gap is too large, the connection will fail. If this occurs, try using other track pieces in your layout. +\b selecting a set of tracks followed by a \f{Right} click will prompt for confirmation that all selected tracks with unconnected endpoints should be joined to nearby selected track at an unconnected end point. This mode allows for an entire layout to be reconnected after a Select-All. -\e{XTrackCAD} adjusts the positions of tracks connected to the tracks up to a track with more than two connections. See the Demo for details. +\f{Notes for two track mode:} Occasionally pieces of sectional track do not line up exactly, especially when creating figure-8's or passing sidings. When laying out the actual track you can compensate for this by adjusting the individual tracks to provide a bit of slack. This command simulates that process. + +Click on the endpoint of each track you're trying to connect. XtrkCAD will move the tracks slightly in an attempt to overcome the gap. If the gap is too large, the connection will fail. If this occurs, try using other track pieces in your layout. + +\e{XTrackCAD} adjusts the positions of tracks connected to the tracks up to a track with more than two connections. See the Demo for details. If one (or both) the selected tracks is an adjustable section (such as Kato's Adjustable Track #20-050) then the length of the track is changed to fill the gap. @@ -160,7 +174,7 @@ An endpoint can have one of several elevation types: \b \f{Station} - assigns a name to the endpoint. -\f{Note:} Only one of these attributes can be assigned to an endpoint. For example, an endpoint can not be defined as a Grade and a Station at the same time. +\f{Note:} Only one of these attributes can be assigned to an endpoint. For example, an endpoint can not be defined as a Grade and a Station at the same time. When an endpoint is selected on the layout by \e{Left-Click}, it is highlighted by a large red dot and its elevation type and values are displayed in the dialog. @@ -266,7 +280,9 @@ For detail about; \S2{joinTrackCurve} Using Curved Flex-Track -This method of joining track may be used where tracks are joined with a 'simple curve', e.g. one which uses a curve in a single direction as opposed to using reverse curves (\K{generalTerms}). +This method of joining track may be used using Normal Easments where tracks are either joined with a 'simple curve'\k{joinNormalEasment}, e.g. one which uses a curve in a single direction as opposed to using reverse curves (\K{generalTerms}) or using complex curves if Easement is set to Cornu \K{joinCornu}. + +\S2{joinNormalEasment} Join with Normal Easement \u000 @@ -344,6 +360,63 @@ For detail about; \dd Moving one segment of track to join with another refer to \K{joinTrackMove}. +\S2{joinCornu} \i{Creating a Cornu} \i{Cornu Easements} Join with Cornu Easement + +\u000 + +\n First, ensure that the Easement type option is set to Cornu - see \k{cmdEasement} + +\n Start the join process by clicking on the Join button (\G{png.d/bjoin.png}). + +\lcont{ + +\u000 + +\G{png.d/joincornu1.png} + +\u000 + +} + +\dd \e{Left-Click} the open endpoint of one of the two tracks being joined. A red dot within a red circle will appear at the end of the join. + +\u000 + +\dd \e{Left-Drag} the endpoint to where you want it and release the button. The point will only move along the piece of track with the open endpoint (if this track type can be split) as far as the opposite end, or as an extension of that track at the selected end with the same curvature (if this track can be extended). Note that you will be able to fine-tune the end positions later. + +\lcont{ + +\u000 + +\G{png.d/joincornu2.png} + +\u000 + +} + +\dd \e{Left-Click} the endpoint of the other track being joined. Another red dot within a circle will appear at that end of the join. + +\u000 + +\dd \e{Left-Drag} the endpoint to where you want it and release the button. The second endpoint can only be moved along the second track as far as the other end (if it can be split) or as an extension beyond the end of this track (if it can be extended). The initial curve will be drawn - it will be red if the minimum radius is smaller than the minimum radius option. + +\lcont{ + +\u000 + +\G{png.d/joincornu3.png} + +\u000 + +} + +\dd You are now in "Select Points" mode. You can select one end point at a time with \e{Left-Click} and move it with \e{Left-Drag}. + +\u000 + +\dd Once you are happy, hit \e{Enter} or the \e{SpaceBar} to finish editing the easement. Or hit \e{Esc} to cancel. + +\dd If you want to modify the Cornu later (even if it is joined at both ends) see \k{chgCornu} \rule @@ -396,7 +469,7 @@ Any tracks created during the \f{Join} command will have the following propertie Turnouts and Sectional (\K{cmdHotBar}) tracks can be joined to other tracks. \e{XTrackCAD} extends the selected endpoint with a straight track when making the connection. -A Turntable (\K{cmdTurntable}) can be joined however it must be used as the second endpoint. +A Turntable (\K{cmdTurntable}) can be joined however it must be used as the second endpoint for normal easements but can be connected to either end with Cornu. For detail about; @@ -473,17 +546,19 @@ For detail about; \G{png.d/bmodify.png} -The \f{Modify} command is used to change characteristics of or extend existing track by adding new track. This command works with any unconnected track endpoint. +The \f{Modify} command is used to change characteristics of or extend existing track by adding new track. This command works with any unconnected track endpoint, or with a \e{Cornu} or \e{Bezier} track even if connected The \f{Modify} command can be invoked using the \f{Change>Modify} menu item, the \f{Modify} button or the menu raised by a \e{Right-Click} over the \f{Main Canvas}. Either the left mouse button (for changing length or creating a tangent track) or the right mouse button (for extending with a new track) is used to modify the unconnected endpoint. -The endpoints of a \e{Line}, \e{Dimension Line}, \e{Table Edge} or \e{Bench-work} can be dragged to new positions. A \e{Box} is treated as 4 Lines. +The endpoints of a \e{Line}, \e{Dimension Line}, \e{Table Edge} or \e{Bench-work} can be dragged to new positions. A \e{Box} or a \e{FilledBox} can be modified by selecting a corner and dragging in two dimensions, or a side and dragging it orthogonally. These modifications preserve a 4-sided rectangle. + +The controlpoints of a \e{Cornu Track}, \e{Bezier Track} or \e{Bezier Line} can be changed. \e{Curved Lines} are modified in same manner as curved track. -Selecting a corner of a \e{Poly Line}, \e{Filled Box} or \e{Polygon} moves that corner to a new position, and if moved close to a neighboring corner will merge the two corners and delete the edge between them. Selecting an edge will create a corner that can be dragged to a new position. +Selecting a corner of a \e{Poly Line} or \e{Polygon} moves that corner to a new position, and if moved close to a neighboring corner will merge the two corners and delete the edge between them. Selecting an edge will create a corner that can be dragged to a new position. Any tracks created during the \f{Modify} command will have the following properties inherited from the first track: selected state, hidden state, scale, track gauge and Layer. @@ -503,6 +578,14 @@ For detail about; \dd Extending track length refer to \K{extendTrack} +\u000 + +\dd Modifying a Cornu refer to \K{chgCornu} + +\u000 + +\dd Modifying a Bezier refer to \K{chgBezier} + \rule @@ -633,6 +716,57 @@ For detail about; \rule +\S2{chgCornu} \i{Cornu Easements} Modifying a Cornu + +Because a Cornu is defined by its end points position, angle and radius - it can only be directly modified by dragging an end point along a track. + +\n Click the \f{Modify} button (\G{png.d/bmodify.png}) to activate the \f{Modify} function. + +\lcont{\u000} + +\n Click on the Cornu track. The track ends will turn into roundels + +\lcont{\u000} + +\n \e{Left-Click} the endpoint and \e{Left-Drag} it to move the endpoint along the connected track, or beyond it if you want that track extended ( but this only works in the direction of the Cornu). + +\lcont{\u000} + +\n Repeat with the other end-pint if desired + +\lcont{\u000} + +\n Once you are happy, hit the \e{spacebar} or \e{Enter}, or to cancel hit \e{Escape}. + +\f{Note:} A Cornu can also be modified by moving or rotating a connected track. + +\rule + +\S2{chgBezier} Modifying a Bezier + +Because a Bezier is defined by its control points position - its shape can only be modified by dragging an control point. + +\n Click the \f{Modify} button (\G{png.d/bmodify.png}) to activate the \f{Modify} function. + +\lcont{\u000} + +\n Click on the track. The control points will appear + +\lcont{\u000} + +\n \e{Left-Click} a control point and \e{Left-Drag} it to move it. + +\lcont{\u000} + +\n Repeat for another end point if desired + +\lcont{\u000} + +\n Once you are happy, hit the \e{spacebar} or \e{Enter}, or to cancel hit \e{Escape}. + +\f{Note: } A Bezier's end point will only be modifyable if it is not connected. Both internal control points can be modified even if the track is connected. + +\rule \S{cmdMove} Move @@ -645,13 +779,21 @@ The \f{Move} command can be invoked using the \f{Change>Move} menu item or the \ Successful use of this command requires selection of the object(s) to be moved before attempting to move it. An object is selected by using the \e{Left-Click} command. A group of connected objects can be selected using the \e{Shift+Left-Click} command. -A pop-up menu with commands controlling how objects are drawn during moves can be activated by entering a \e{Shift+Right-Click} command while hovering over the \f{Main Canvas} +A move can be achieved using one of the following methods; -\G{png.d/mmovedraw.png} +\u000 -\e{Left+Drag} is used to move the selected object(s) around the layout. +\dd \e{Left+Drag} using the mouse. See \K{moveByMouse} for detail. -\f{Note:} The \f{Draw Moving Tracks} Radio box on the \f{Command Options} (\K{cmdCmdopt}) dialog can also be used to select how objects are drawn during drags to move or rotate objects. The options for this feature are: +\u000 + +\dd Selecting fixed or specified amounts of translation in the X and Y directions using a \e{Right-Click} menu. See \K{moveByMenu} for detail. + +\u000 + +\rule + +A pop-up menu with commands controlling how objects are drawn during moves can be activated by entering a \e{Shift+Right-Click} command while hovering over the \f{Main Canvas} \b \f{Normal} - objects are drawn normally. This can be time-consuming when using a slow machine and moving a large number of objects. @@ -663,6 +805,54 @@ A pop-up menu with commands controlling how objects are drawn during moves can b \b \f{Endpoints} - only the endpoints are drawn (as stars). +\G{png.d/mmovedraw.png} + +\rule + +\f{Note:} If the moved track is connected but the track it is connect to is not moved, it will be disconnected, unless that track or the last selected track is a Cornu, in which case the Cornu concenred will be modified (if possible) to remain connected. + +\f{Note:} Cornu tracks connected to a turntable will be modified if it is moved or rotated. They remain connected at the point on the radius where they started, so it may be desireable to delete and redraw them if the rotation is large. + +\f{Note:} The \f{Draw Moving Tracks} Radio box on the \f{Command Options} (\K{cmdCmdopt}) dialog can also be used to select how objects are drawn during drags to move or rotate objects. The options for this feature are: + +\rule + +\S2{moveByMouse} Using Mouse + +Once object(s) are selected, \e{Left+Drag} is used to move them around the layout using the mouse. + +Alternatively, \e{Shift+Ctrl+Arrow} can be used to micro-move the selected object(s). The amount micro-moved is dependent on the zoom in use. To move by smaller increments, zoom in further. My moving to macro-zoom modes extremely fine adjustments can be made. + +Remember that unattached objects can also be moved to exact positions using the \K{cmdDescribe} Command or by the \K{moveByMenu}. + +\S2{moveByMenu} Using Values of X and Y Translation + +Move An Object Using Fixed or Specified amounts of X and Y Translation. + +A pop-up menu with additional menu items allows you to \f{Move} the selected object(s) through through any amount you specify. + +\G{png.d/mmovevariable.png} + +The \f{Move} command is executed as follows; + +\n \f{Select} the object(s) to be moved. + +\lcont{\u000} + +\n \e{Shift+Right-Click} to raise the Move/Rotate menu. + +\lcont{\u000 + +Any amount of precise transalation may be entered by \e{Left-Click}ing the \f{Enter Move...} menu item then entering a desired amount of translation in X and Y in the dialog window that appears. + +\u000 + +\G{png.d/dmovetranslate.png} + +\u000 + +} + \rule @@ -678,10 +868,15 @@ Click the \f{Move Description} button to activate the \f{Move Description} comma This operation can also be invoked by \e{Ctrl+Left+Drag} when in Select mode (\K{cmdSelect}). -\e{Shift+Right-Click} (\K{cmdAcclKeys}) can be used to toggle display of individual Curved Track, Helix or Turnout Labels. +\e{Shift+Right-Click} (\K{cmdAcclKeys}) can be used to toggle display of individual Curved Track, Bezier Track, Cornu, Helix or Turnout Labels. \rule +\S{cmdPan} Pan/Zoom + +\G{png.d/pan.png} + +This command is used to move or resize the viewport using the mouse or keyboard. \e{Left+Drag} Pans the viewport up and down, left and right keping it within the boundaries of the layout. \e{Right+Drag} selects an area of the screen to zoom into. The \f{"0"}- key resets the display to the origin but leaves the zoom as is. Keys between \f{1} and \f{9} set the zoom to that zoom level. The \f{"e"} - key resets the origin to zero and the zooms to show the whole layout. \S{cmdProfile} Profile @@ -799,7 +994,7 @@ Rotate An Object Using the Mouse \lcont{\u000} -\n Visualize an axis point on the object that's to be rotated then place the mouse pointer over that point. +\n Visualize an axis point on the object that's to be rotated then place the mouse pointer over that point. If the track is a turntable, the point will be snapped to the turntable center if the mouse is within a quarter of the radius length of it. \lcont{\u000} @@ -828,7 +1023,11 @@ Rotation can also be achieved through use of one of these alternate methods; Rotate An Object Using Fixed or Specified Degree's of Rotation -A pop-up menu with additional menu items allows you to \f{Rotate} the selected object(s) through various predefined angles or through any angle you specify. The \f{Rotate} command is executed as follows; +A pop-up menu with additional menu items allows you to \f{Rotate} the selected object(s) through various predefined angles or through any angle you specify. + +\G{png.d/mrotatemove.png} + +The \f{Rotate} command is executed as follows; \n \f{Select} the object(s) to be rotated. @@ -838,24 +1037,34 @@ A pop-up menu with additional menu items allows you to \f{Rotate} the selected o \lcont{\u000} -\n With the mouse pointer hovering over the object to be rotated, \e{Shift+Right-Click} to raise the Rotate menu then select the desired degree and direction of rotation from the list of predefined angles (180\u00B0, 90\u00B0 CW, 45\u00B0 CW, 30\u00B0 CW, 15\u00B0 CW, 15\u00B0 CCW, 30\u00B0 CCW, 45\u00B0 CCW, 90\u00B0 CCW). - -\lcont{ +\n With the mouse pointer hovering over the point about which the object(s) are to be rotated, \e{Shift+Right-Click} to raise the Rotate menu then select the desired degree and direction of rotation from the list of predefined angles (180\u00B0, 90\u00B0 CW, 45\u00B0 CW, 30\u00B0 CW, 15\u00B0 CW, 15\u00B0 CCW, 30\u00B0 CCW, 45\u00B0 CCW, 90\u00B0 CCW). -\u000 +\lcont{\u000} \G{png.d/mrotatefixed.png} -\u000 +\u000 + +\rule + +Alternately, any angle may be entered by \e{Left-Click}ing the \f{Enter Angle...} menu item + +\n \f{Select} the object(s) to be rotated. + +\lcont{\u000} + +\n With the mouse pointer hovering over the point about which the object(s) are to be rotated, \e{Shift+Right-Click} to raise the Rotate menu and then select the \e{Enter Angle...} option. + +\lcont{\u000} + +\G{png.d/mrotatevariable.png} -Alternately, any angle may be entered by \e{Left-Click}ing the \f{Enter Angle...} menu item then entering a desired angle in the Rotate dialog window that appears. +And then entering a desired angle in the Rotate dialog window that appears. \G{png.d/drotateangle.png} \u000 -} - Rotation can also be achieved through use of one of these alternate methods; \u000 @@ -883,7 +1092,7 @@ A pop-up menu with additional menu items allows you to \f{Align} the selected ob \lcont{\u000} -\n With the mouse pointer hovering over the object to be rotated, \e{Shift+Right-Click} to raise the Rotate menu then select \f{Align}. +\n With the mouse pointer hovering over the point about which the object(s) are to be rotated, \e{Shift+Right-Click} to raise the Rotate menu then select \f{Align}. \lcont{ @@ -1039,7 +1248,7 @@ For detail about; \u000 -\dd Dividing a section of track into two connected pieces see \K{splitDivide}. +\dd Dividing a section of flex track into two connected pieces or trimming a turnout see \K{splitDivide}. \u000 @@ -1056,7 +1265,7 @@ Disconnecting a joint between two pieces of connected track; \lcont{\u000} -\n Place the mouse pointer over the joint between the two track endpoints then \e{Left-Click}. +\n Place the mouse pointer right over the joint between the two track endpoints then \e{Left-Click}. \lcont{\u000} @@ -1091,7 +1300,7 @@ For detail about; \S2{splitDivide} Divide Track -Dividing a section of track into two connected pieces; +Dividing a section of flex track into two connected pieces; \n Click the \f{Split} button (\G{png.d/bsplit.png}) to activate the \f{Split} command. @@ -1164,7 +1373,7 @@ The \f{Split} command can be used to add block gaps (\K{generalTerms}) at the po \u000 -After executing the \f{Split} command use the \e{Shift+Right-Click} command to display one of two pop-up menus which can be used to add, change or remove \e{block gaps} for the selected endpoint. +After starting the \f{Split} command use the \e{Shift+Right-Click} over a joint to display one of two pop-up menus which can be used to add, change or remove \e{block gaps} for the selected endpoint. \dd \G{png.d/msplitblock.png} diff --git a/app/doc/doc.vcproj b/app/doc/doc.vcproj deleted file mode 100644 index 095fd28..0000000 --- a/app/doc/doc.vcproj +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/doc/drawm.but b/app/doc/drawm.but index 21785ce..b8469b1 100644 --- a/app/doc/drawm.but +++ b/app/doc/drawm.but @@ -16,15 +16,15 @@ There are 4 command buttons on the tool-bar used to draw Straight Objects, Curve Functions for drawing basic shapes and objects like lines and curves can be accessed from this menu. -\dd \f{Circle Lines} - draw empty or filled circles. +\dd \f{Circle Lines} - draw empty or filled circles. (\K{cmdCircleL}) \u000 -\dd \f{Curved Lines} - are created in the same manner as curved tracks. +\dd \f{Curved Lines} - are created in the same manner as curved tracks. (\K{cmdCurvedL}) \u000 -\dd \f{Note} - attach a note icon to a specific location on the layout. +\dd \f{Note} - attach a note icon to a specific location on the layout. (\K{cmdNote}) \u000 @@ -32,15 +32,15 @@ Functions for drawing basic shapes and objects like lines and curves can be acce \u000 -\dd \f{Shapes} - draw boxes and poly-lines. +\dd \f{Shapes} - draw boxes and poly-lines. (\K{cmdShapes}) \u000 -\dd \f{Straight Objects} - draw straight objects. +\dd \f{Straight Objects} - draw straight objects. (\K{cmdStraightL}) \u000 -\dd \f{Text} - allows entry of text directly onto the layout. +\dd \f{Text} - allows entry of text directly onto the layout. (\K{cmdText}) Some commands display controls on the Status Line (\K{mainW}) to change line width, color or other attributes of the object. @@ -70,20 +70,35 @@ Some commands display controls on the Status Line (\K{mainW}) to change line wid \dd \G{png.d/dcurve1.png} Select the start of the curve and drag in the direction of the curve. +If \e{Shift} is held down as the left mouse button is clicked for the first end point of the curve and the cursor is over a line object the position will snap to the nearest end of that line. +If \e{Shift} is held down when the button is released for the second end, it will snap to the nearest end of a line object if it is over one. + \u000 \dd \G{png.d/dcurve2.png} Select one end of the curve and drag to the center. +To complete the command, drag on the red arrows to adjust the curve. + \u000 \dd \G{png.d/dcurve3.png} Select the center of the curve and drag to one end. +To complete the command, drag on the red arrows to adjust the curve. + \u000 \dd \G{png.d/dcurve4.png} Drag from one end of the curve to the other to form the chord of the curve. To complete the command, drag on the red arrows to adjust the curve. +\u000 + +\dd \G{png.d/dbezier.png} \e{Left-Drag} out control point from one end of the curve and then \e{Left-Drag} out the second control point from the other end. + +If \e{Shift} is held while the end points are selected, the curve will lock to the ends of nearby line objects. + +To adjust the curve, \e{Left-Click} and \e{Left-Drag} an end or a control point. Hit \e{Enter} to accept, \e{Esc} to reject. + \rule @@ -121,7 +136,7 @@ Subsequent clicks on the \f{Ruler} button will hide or display the ruler. Shapes are drawn by: -\dd \G{png.d/dbox.png} \G{png.d/dfilbox.png} \f{Boxes} and \f{Filled Boxes} are created by selecting one corner and dragging the opposite corner. A \f{Box} is composed of four lines which may be individually deleted. +\dd \G{png.d/dbox.png} \G{png.d/dfilbox.png} \f{Boxes} and \f{Filled Boxes} are created by selecting one corner and dragging the opposite corner. \u000 @@ -134,9 +149,12 @@ Shapes are drawn by: \G{png.d/mdrawstraight.png} -Straight Objects are created by a \e{Left+Drag} (\K{windowTerms}) on the layout. If \e{Draw Straight Objects} is Sticky (\K{cmdSticky}), \e{Shift+Left+Drag} will use the endpoint of the previous line as the starting point. +Straight Objects are created by a \e{Left+Drag} (\K{windowTerms}) on the layout. If \e{Draw Straight Objects} is Sticky (\K{cmdSticky}), \e{Cntl+Left+Drag} will use the endpoint of the previous line as the starting point. \dd \G{png.d/dline.png} Creates a \f{Straight Line} of specified color and width. +If \e{Shift} is held down for the first end point and the cursor is over a line object the new line start position will snap to the nearest end of the line. +If \e{Shift} is held down when the button is released at the end of the \e{Left+Drag} the line end position will snap to the nearest end of any line object it is over. + \u000 @@ -169,7 +187,7 @@ Straight Objects are created by a \e{Left+Drag} (\K{windowTerms}) on the layout. \G{png.d/btext.png} -The \f{Text} command lets you enter text on the layout at the selected position. +The \f{Text} command lets you enter text on the layout at the selected position. You can use the Tab key to format the text to fixed tab positions and CTRL+Enter to enter a newLine character. \G{png.d/statustext.png} diff --git a/app/doc/filem.but b/app/doc/filem.but index 8b74434..c1c694e 100644 --- a/app/doc/filem.but +++ b/app/doc/filem.but @@ -35,7 +35,7 @@ The \f{File Menu} shows file oriented commands for loading and saving layout fil \u000 -\dd \G{png.d/bnew.png} \f{New} - Clears the current layout. In case there are any unsaved changes on the current plan, a warning pop-up will be displayed and you'll have the option to cancel the operation. +\dd \G{png.d/bnew.png} \f{New} - Clears the current layout. In case there are any unsaved changes on the current plan, a warning pop-up will be displayed and you'll have the option to cancel the operation. After that the Layout Options (\K{cmdLayout}) dialog will be opened. \u000 @@ -220,6 +220,10 @@ Whether tracks are printed with one or two lines (representing the center line a \u000 +\dd \f{Print centerline below Scale 1:1} - dotted line down the center of the Track/Roadbed. This line will always be printed at Scale 1:1, but selecting this option will print it at smaller scales. This option is disabled if tracks would be drawn with only one line (instead of two). + +\u000 + \dd \f{Print Roadbed Outline} - lines representing the edge of the Roadbed. The Roadbed will be printed if the \e{Width} is greater than the track gauge. Note: this option is most useful at 1:1. This option is disabled if tracks would be drawn with only one line (instead of two). \u000 diff --git a/app/doc/intro.but.in b/app/doc/intro.but.in index cb0d0d2..51203f8 100644 --- a/app/doc/intro.but.in +++ b/app/doc/intro.but.in @@ -780,7 +780,7 @@ This section of the manual describes how and where to report a bug or seek an en \S{bugs} Reporting \i{Bugs} -If you encounter an unreported bug please submit detail regarding such to the \f{Bug Tracker} located at the \W{http://sourceforge.net/tracker/?group_id=151737&atid=781978}{\e{XTrackCAD} Fork Project Site}. +If you encounter an unreported bug please submit detail regarding such to the \f{Bug Tracker} located at the \W{https://sourceforge.net/p/xtrkcad-fork/bugs/}{\e{XTrackCAD} Fork Project Site}. \f{Be sure to provide the three basic elements of a bug report:} What you were doing at the time the bug occurred, what you expected to happen and what actually happened. This detail will help developers replicate the error, find and correct the offending code. @@ -788,7 +788,7 @@ If you encounter an unreported bug please submit detail regarding such to the \f \u000 -\dd After completing installation of \e{XTrackCAD} on a Dell Dimension PC with 128 MB of memory running Windows ME, the following error occurred when attempting to edit a Text Label; +\dd After completing installation of \e{XTrackCAD} on a Dell PC with 1024 MB of memory running Windows 7, the following error occurred when attempting to edit a Text Label; \u000 @@ -808,7 +808,7 @@ If you encounter an unreported bug please submit detail regarding such to the \f \f{Always search the bug database first.} Advice so good, we'll repeat it twice. Always search the bug database first. The odds are good that if you've found a problem, someone else found it too. If you spend a few minutes of your time making sure that you're not filing a duplicate bug, that's a few more minutes someone can spend helping to fix that bug rather than sorting out duplicate bug reports. -\f{If you don't understand an error message, ask for help.} Don't report an error message you don't understand as a bug. There are a lot of places you can ask for help in understanding what is going on before you can claim that an error message you do not understand is a bug. (Once you've understood the error message and have a good suggestion for a way to make the error message clearer, you might consider reporting it as a \W{http://sourceforge.net/tracker/?group_id=151737&atid=781981}{\e{XTrackCAD} Feature Request}). +\f{If you don't understand an error message, ask for help.} Don't report an error message you don't understand as a bug. There are a lot of places you can ask for help in understanding what is going on before you can claim that an error message you do not understand is a bug. (Once you've understood the error message and have a good suggestion for a way to make the error message clearer, you might consider reporting it as a \W{https://sourceforge.net/p/xtrkcad-fork/feature-requests/}{\e{XTrackCAD} Feature Request}). \f{Be brief, but don't leave any important details out.} This is a fine line to walk. But there are some general guidelines: @@ -825,6 +825,6 @@ If you can recreate the problem the \f{Macro>Record} command can be used to reco \S{enhancements} \i{Enhancement Requests} -Suggestions for improvements are encouraged and welcome. Submit your suggestion to the \e{XTrackCAD} \f{Feature Tracker} located at the \W{http://sourceforge.net/tracker/?group_id=151737&.atid=781981}{\e{XTrackCAD} Fork Project Site} or the \e{XTrackCAD} \f{Wikka Wish List} located at the \W{http://www.xtrkcad.org/Wikka/WishList}{\e{XTrackCAD} Wiki: WishList}. +Suggestions for improvements are encouraged and welcome. Submit your suggestion to the \e{XTrackCAD} \f{Feature Tracker} located at the \W{https://sourceforge.net/p/xtrkcad-fork/feature-requests/}{\e{XTrackCAD} Fork Project Site}. \rule diff --git a/app/doc/managem.but b/app/doc/managem.but index 4a769db..9153b52 100644 --- a/app/doc/managem.but +++ b/app/doc/managem.but @@ -67,7 +67,9 @@ Cars are placed on the layout by using the \f{Train Simulation} (\K{cmdTrain}) c The \f{Find} button will center the \f{Main Window} (\K{mainW}) on the selected car. This button is only enabled for cars which are on the Layout (indicated by \f{Layout} in the Location column). If the car on a track that is hidden and \f{Trains on Hidden Track} (\K{cmdDisplay}) is set to \f{Hide}, then the car (and any attached cars) will be made visible. -The \f{Edit} button invokes the \f{Car} dialog (\K{cmdCarpart}) to modify the selected car. This button is disabled if more than one (or no) car is selected or if the selected car is on the Layout. This dialog is also used to \f{Add} a new Car. Refer to \K{faqsPrototype} if an error occurs when attempting to add inventory to this list. +The \f{Edit} button invokes the \f{Car} dialog (\K{cmdCarpart}) to modify the selected car. This button is disabled if more than one (or no) car is selected or if the selected car is on the Layout. + +The \f{Add} button is to add a new Car. Refer to \K{faqsPrototype} if an error occurs when attempting to add inventory to this list. The \f{Delete} button removes the selected cars from your inventory. This button is disabled if any of the selected cars are on the layout. diff --git a/app/doc/navigation.but b/app/doc/navigation.but index 66b0cc9..47051f7 100644 --- a/app/doc/navigation.but +++ b/app/doc/navigation.but @@ -7,7 +7,7 @@ \C{navigation} Navigation -The Main Window includes a title bar along the top that describes the contents of the window, followed by a tool bar that contains user interface buttons. Most of the window's remaining area is used to display the layout. +The Main Window includes a title bar along the top that describes the contents of the window, followed by a tool bar that contains user interface buttons. Most of the window's remaining area is used to display the layout. A footer border contains information including system messages. Most windows can be opened, closed, resized, minimized, and moved around the screen. The close, minimize, and zoom buttons are located on the right side of the title bar. Minimizing a window will close the contents of the window, but store a reference to it in the Task bar. Closing a window will make it disappear completely (so you may be asked to save your changes first). To move a window, click on the title bar and drag the window where you want it. To resize a window, either click the Zoom button @@ -126,6 +126,8 @@ Most windows can be opened, closed, resized, minimized, and moved around the scr \b PAGE UP and PAGE DOWN keys. +\f{Note:} If The scale 1::1 is reached, "Macro Zoom" mode can be entered using CTRL+PageDown - with repeated presses a scale of 10::1 is possible. + } \u000 @@ -134,7 +136,7 @@ Most windows can be opened, closed, resized, minimized, and moved around the scr \u000 -\dd The ARROW keys move the \f{Canvas} left, right, up or down. +\dd The ARROW keys move the \f{Canvas} left, right, up or down by half a screen. If Shift is used together with the arrow keys, the movement will be 1/20th of screen in the selected direction. \u000 diff --git a/app/doc/optionm.but b/app/doc/optionm.but index c7f00d9..0c2adfb 100644 --- a/app/doc/optionm.but +++ b/app/doc/optionm.but @@ -138,6 +138,10 @@ The \f{Display} dialog contains items which control the display of objects on th \u000 +\dd \f{Draw Unconnected EndPts} - how to draw unconnected endpoints; normally, with a thick line or with a thick line in the exception color. + +\u000 + \dd \f{Draw Ties} - how to draw ties under the rails when the drawing Scale is smaller than half of the \f{Two Rail Scale}. \u000 @@ -241,13 +245,25 @@ The \f{Easement} dialog is invoked from the Options (\K{optionM}) menu. \u000 -\dd Radio button group with \f{None}, \f{Sharp}, \f{Normal} and \f{Broad}. Corresponding \f{Value}s for these buttons are 0, 0.5, 1.0 and 2.0. Select \f{None} to turn easements off. +\dd Radio button group with \f{None}, \f{Sharp}, \f{Normal}, \f{Broad} and \f{Cornu}. Corresponding \f{Value}s for these buttons are 0, 0.5, 1.0, 2.0 and -1.0. Select \f{None} to turn easements off. + +For traditional fixed sharpness easements see \k{EasementsTraditional}, for Cornu Easements see \k{EasementsCornu}. + +\S2{EasementsCornu} \i{Cornu Easements} + +The Cornu Easements work in a different way to the other easements. They use all the space available to minimize sharpness, so you can control the sharpness for each curve you draw by the distance apart, radius and angle of the two end points. + +The Cornu is a mathematical curve that has the property that the curvature (inverse of the radius) varies linearly along its length. Using an open-source Cornu library written by Dr Raph Levin, we can calculate an Cornu easment to suit the end conditions of radius, curve center, angle and position. A Cornu easement can be constructed between two tracks by using the values of these parameters. + +To draw an cornu easement see \k{joinCornu}, to Modify it afterwards see \k{chgCornu}. + +\S2{EasementsTraditional} \i{Easements with Fixed Sharpness} -The values \f{R}, \f{X} and \f{L} are read-only. +The values \f{R}, \f{X} and \f{L} are read-only. They are set using the radio buttons or the \f{Value} field which can be set to 0 (No Easment) or between 0.21 (sharpest Easement) 100 (broadest Easment). These values indicate the worst case of joining a straight track with a curve of radius \f{R}. The two tracks are separated by the offset \f{X} while the easement curve extends for \f{L/2} inches or centimeters to each side of the endpoints. -The formula used to draw easements is: +The formula used to draw non-Cornu easements is: \c x = l * l * l / (6 * R * L) \e b b @@ -301,7 +317,7 @@ The font selection dialog allows selection of the font used by the text (\K{cmdT \S{cmdLayout} Layout Dialog -The \f{Layout Options} dialog, displayed by the Options (\K{optionM}) menu, contains items controlling the current layout. +The \f{Layout Options} dialog, displayed by the Options (\K{optionM}) or the File (\K{fileM} menu, contains items controlling the current layout. \dd \G{png.d/layout.png} diff --git a/app/doc/osxconf.but b/app/doc/osxconf.but index 8656f0e..60e6036 100644 --- a/app/doc/osxconf.but +++ b/app/doc/osxconf.but @@ -1,7 +1,7 @@ \cfg{html-version}{xhtml1.0strict} \cfg{html-leaf-level}{infinite} \cfg{html-leaf-contains-contents}{false} -\cfg{html-suppress-navlinks}{true} +\cfg{html-suppress-navlinks}{false} \cfg{html-suppress-address}{true} \cfg{html-contents-filename}{contents.html} @@ -11,6 +11,6 @@ \cfg{html-contents-depth}{0}{2} -\cfg{html-head-end}{} +\cfg{html-head-end}{} \cfg{html-body-start}{
} \cfg{html-body-end}{
} \ No newline at end of file diff --git a/app/doc/png.d/bezier.png b/app/doc/png.d/bezier.png new file mode 100644 index 0000000..e03458e Binary files /dev/null and b/app/doc/png.d/bezier.png differ diff --git a/app/doc/png.d/bmap.png b/app/doc/png.d/bmap.png new file mode 100644 index 0000000..7a99724 Binary files /dev/null and b/app/doc/png.d/bmap.png differ diff --git a/app/doc/png.d/cmdopt.png b/app/doc/png.d/cmdopt.png index 58dfa2b..67503d2 100644 Binary files a/app/doc/png.d/cmdopt.png and b/app/doc/png.d/cmdopt.png differ diff --git a/app/doc/png.d/dbezier.png b/app/doc/png.d/dbezier.png new file mode 100644 index 0000000..0a81063 Binary files /dev/null and b/app/doc/png.d/dbezier.png differ diff --git a/app/doc/png.d/displayopt.png b/app/doc/png.d/displayopt.png index 59cc211..3124e2b 100644 Binary files a/app/doc/png.d/displayopt.png and b/app/doc/png.d/displayopt.png differ diff --git a/app/doc/png.d/dproperties.png b/app/doc/png.d/dproperties.png index e1677cc..0938437 100644 Binary files a/app/doc/png.d/dproperties.png and b/app/doc/png.d/dproperties.png differ diff --git a/app/doc/png.d/easew.png b/app/doc/png.d/easew.png index 3b2b93d..cc71900 100644 Binary files a/app/doc/png.d/easew.png and b/app/doc/png.d/easew.png differ diff --git a/app/doc/png.d/joincornu1.png b/app/doc/png.d/joincornu1.png new file mode 100644 index 0000000..a41a317 Binary files /dev/null and b/app/doc/png.d/joincornu1.png differ diff --git a/app/doc/png.d/joincornu2.png b/app/doc/png.d/joincornu2.png new file mode 100644 index 0000000..8392a1a Binary files /dev/null and b/app/doc/png.d/joincornu2.png differ diff --git a/app/doc/png.d/joincornu3.png b/app/doc/png.d/joincornu3.png new file mode 100644 index 0000000..8cb6c59 Binary files /dev/null and b/app/doc/png.d/joincornu3.png differ diff --git a/app/doc/png.d/joincornu4.png b/app/doc/png.d/joincornu4.png new file mode 100644 index 0000000..d09584c Binary files /dev/null and b/app/doc/png.d/joincornu4.png differ diff --git a/app/doc/png.d/joincornu5.png b/app/doc/png.d/joincornu5.png new file mode 100644 index 0000000..560ce90 Binary files /dev/null and b/app/doc/png.d/joincornu5.png differ diff --git a/app/doc/png.d/layout.png b/app/doc/png.d/layout.png index 25db34f..cbcc42b 100644 Binary files a/app/doc/png.d/layout.png and b/app/doc/png.d/layout.png differ diff --git a/app/doc/png.d/mchange.png b/app/doc/png.d/mchange.png index ef5334e..f891411 100644 Binary files a/app/doc/png.d/mchange.png and b/app/doc/png.d/mchange.png differ diff --git a/app/doc/png.d/mdraw.png b/app/doc/png.d/mdraw.png index a23c208..46b1f69 100644 Binary files a/app/doc/png.d/mdraw.png and b/app/doc/png.d/mdraw.png differ diff --git a/app/doc/png.d/mrotatealign.png b/app/doc/png.d/mrotatealign.png index b62443d..1d1aeb6 100644 Binary files a/app/doc/png.d/mrotatealign.png and b/app/doc/png.d/mrotatealign.png differ diff --git a/app/doc/png.d/mrotatefixed.png b/app/doc/png.d/mrotatefixed.png index 0bc48f7..0aeb1f9 100644 Binary files a/app/doc/png.d/mrotatefixed.png and b/app/doc/png.d/mrotatefixed.png differ diff --git a/app/doc/png.d/mrotatemove.png b/app/doc/png.d/mrotatemove.png index 3977e13..7710a9c 100644 Binary files a/app/doc/png.d/mrotatemove.png and b/app/doc/png.d/mrotatemove.png differ diff --git a/app/doc/png.d/mview.png b/app/doc/png.d/mview.png index 9def0b8..7bf2037 100644 Binary files a/app/doc/png.d/mview.png and b/app/doc/png.d/mview.png differ diff --git a/app/doc/png.d/pan.png b/app/doc/png.d/pan.png new file mode 100644 index 0000000..653ee4d Binary files /dev/null and b/app/doc/png.d/pan.png differ diff --git a/app/doc/png.d/toolbar.png b/app/doc/png.d/toolbar.png index 3d9a8a9..4f87adc 100644 Binary files a/app/doc/png.d/toolbar.png and b/app/doc/png.d/toolbar.png differ diff --git a/app/doc/view_winm.but b/app/doc/view_winm.but index 47ec17b..01f8a8c 100644 --- a/app/doc/view_winm.but +++ b/app/doc/view_winm.but @@ -30,7 +30,7 @@ The \f{View Menu} shows commands affecting the display of the \f{Main Canvas} (\ \u000 -\dd \f{ Show Map} - Toggles display of the \f{Map Window} on and off. +\dd \G{png.d/bmap.png} \f{ Show/Hide Map} - Toggles display of the \f{Map Window} on and off. \u000 diff --git a/app/doxfileversionfilter.sh b/app/doxfileversionfilter.sh deleted file mode 100644 index 5078bd4..0000000 --- a/app/doxfileversionfilter.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# a script to get the cvs version number of a particular file -# used by doxygen to identify the source of the doxygen-produced documentation -# $1 contains the full pathname of the file of interest. cvs expects a pathname -# relative to the directory from which doxygen is invoked. -# Note that the cvs status command must consult the server (sourceforge.net) -# and is therefore quite slow. - -WD=`pwd` -FN=`echo "$1" | sed "s|${WD}/||" ` -cvs status ${FN} | sed -n 's/^[ \]*Working revision:[ \t]*\([0-9][0-9\.]*\).*/\1/p' \ No newline at end of file diff --git a/app/dynstring/dynstring.c b/app/dynstring/dynstring.c index 6f3159c..eb7b2c5 100644 --- a/app/dynstring/dynstring.c +++ b/app/dynstring/dynstring.c @@ -30,7 +30,7 @@ size_t DynStringSize(DynString *s) } /* An initialized empty struct string */ -#define STRINIT() (DynStringMalloc(16)) +#define STRINIT(s) (DynStringMalloc(s, 16)) /** * Allocate memory for a string of the desired length. To optimize memory usage @@ -430,10 +430,10 @@ void DynStringPrintf(DynString *s, const char *fmt, ...) size_t len; DynString nas = NaS; - ///* Are we not a string? */ - //if (isnas(s)) { - // *s = STRINIT(); - //} + /* Are we not a string? */ + if (isnas(s)) { + STRINIT(s); + } /* Nothing to do? */ if (!fmt) { diff --git a/app/dynstring/dynstring.h b/app/dynstring/dynstring.h index d6fac51..2a18409 100644 --- a/app/dynstring/dynstring.h +++ b/app/dynstring/dynstring.h @@ -1,13 +1,37 @@ +/** \file dynstring.h +* Definitions and prototypes for variable length strings +*/ + +/* XTrkCad - Model Railroad CAD +* Copyright (C) 2005 Dave Bullis +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + #ifndef HAVE_DYNSTRING_H #define HAVE_DYNSTRING_H -typedef struct DynString DynString; +#include + struct DynString { char *s; size_t size; // length of the string size_t b_size; // length of the buffer containing the string }; +typedef struct DynString DynString; #define NaS {NULL, 0, 0} #define isnas(S) (!(S)->s) diff --git a/app/help/ChangeLog b/app/help/ChangeLog deleted file mode 100644 index 439dcd7..0000000 --- a/app/help/ChangeLog +++ /dev/null @@ -1,63 +0,0 @@ -Jun 10, 2009 - FIX: Martin Fischer - genmessages.c: fix bug with whitespace-only strings - -Jun 09, 2009 - FIX: Martin Fischer - genmessages.c: add include file for issspace() - -Jun 08, 2009 - FIX: Martin Fischer - genmessages.c: fixed problem with line endings, correct warning - for the but output file - -Aug 29, 2008 - ENH: Martin Fischer - genhelp.in: fixed typo - -Feb 03, 2008 - ENH: Martin Fischer - messages.in: added tooltip for new option 'onstartup' - -Jan 27, 2008 - FIX: Martin Fischer - messages.in: new product name is XTrackCAD - genmessages.c: added warning remark to generated include file - -Jan 21, 2008 - FIX: Mikko Nissinen - messages.in: MSG_2ND_TRK_NOT_SEL_UNSEL -> "...%sselected" changed - to "...%s" for internationalization reasons. - -Jan 03. 2008 - IMPROVEMENT: Martin Fischer - genmessages.c: added warning message - -Dec 09, 2007 - IMPROVEMENT: Martin Fischer - genmessages.c: corrected parsing problems - -Dec 03, 2007 - FIX: Bob Blackwell - genmessages.in: corrected spelling errors - -Dec 02, 2007 - IMPROVEMENT: Martin Fischer - genmessages.c: changed created halibut format - -Nov 23, 2007 - FIX: Martin Fischer - genmessages.c, Fixed handling of \n escape sequence in header file output - -Nov 22, 2007 - IMPROVEMENT: Martin Fischer - genmessages.c, Makefile, messages.in: build messages in Halibut format - -Nov 12, 2007 - FIX: Mikko Nissinen - genhelp.c: Changed internationalization header file name from xtci18n.h to - i18n.h. - -Nov 10, 2007 - IMPROVEMENT: Martin Fischer - genhelp.c: Added option to create gettext enabled C source. diff --git a/app/help/fixbmp.c b/app/help/fixbmp.c deleted file mode 100644 index 44555dc..0000000 --- a/app/help/fixbmp.c +++ /dev/null @@ -1,227 +0,0 @@ - -/* XTrkCad - Model Railroad CAD - * Copyright (C) 2005 Dave Bullis - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include - -#define TRUE (1) -#define FALSE (0) - -struct BITMAPFILEHEADER { - char bfType[2]; - long bfSize; - short bfRsvd1; - short bfRsvd2; - long bfOffBits; - }; - -struct BITMAPINFOHEADER { - long biSize; - long biWidth; - long biHeight; - short biPlanes; - short biBitCount; - long biCompression; - long biSizeImage; - long biXPelsPerMeter; - long biYPelsPerMeter; - long biClrUsed; - long biClrImportant; - }; - -int namenames; -int dumpInfo; -int dumpColorMap; -int dumpBits; -int dumpHisto; -int updateColorCount; -int zeroColorCount; -int setColorCount; -int fixColorMap; - -int fixbmp( char * filename ) -{ - FILE * file; - struct BITMAPFILEHEADER bmfh; - struct BITMAPINFOHEADER bmih; - int rc; - long colors[256]; - int i, j, size; - unsigned char * bmp, bit; - int colorCnt; - long maxcolor; - long histo[256];; - - if ( namenames ) - printf( "%s\n", filename ); - file = fopen( filename, "r+" ); - if ( file == NULL ) { - fprintf( stderr, "%s: Cant open:%s\n", filename, filename ); - return FALSE; - } - rc = fread( &bmfh.bfType, 1, sizeof bmfh.bfType, file ); - rc += fread( &bmfh.bfSize, 1, sizeof bmfh.bfSize, file ); - rc += fread( &bmfh.bfRsvd1, 1, sizeof bmfh.bfRsvd1, file ); - rc += fread( &bmfh.bfRsvd2, 1, sizeof bmfh.bfRsvd2, file ); - rc += fread( &bmfh.bfOffBits, 1, sizeof bmfh.bfOffBits, file ); - if ( rc != 14 ) { - fprintf( stderr, "%s: Bad read of bmfh: %d\n", filename, rc ); - return FALSE; - } - rc = fread( &bmih, 1, sizeof bmih, file ); - if ( rc != sizeof bmih ) { - fprintf( stderr, "%s: Bad read of bmih: %d\n", filename, rc ); - return FALSE; - } - if ( dumpInfo ) { - printf( "fh:sz=%d, off=%ld\n", bmfh.bfSize, bmfh.bfOffBits ); - printf( "ih:sz=%ld, w=%ld, h=%ld, (%ld), pl=%d, bc=%d, co=%ld, si=%ld, cu=%ld, ci=%ld\n", - bmih.biSize, bmih.biWidth, bmih.biHeight, bmih.biWidth*bmih.biHeight, - bmih.biPlanes, bmih.biBitCount, bmih.biCompression, - bmih.biSizeImage, bmih.biClrUsed, bmih.biClrImportant ); - } - if ( bmih.biPlanes != 1 || bmih.biBitCount != 8 ) { - fprintf( stderr, "%s: bad Planes(%d) or BitCount(%d)\n", filename, bmih.biPlanes, bmih.biBitCount ); - return FALSE; - } - if ( bmih.biClrUsed > 256 ) { - fprintf( stderr, "%s: Too many colors (%ld)\n", filename, bmih.biClrUsed ); - return FALSE; - } - colorCnt = bmih.biClrUsed; - if ( colorCnt == 0 ) - colorCnt = 256; - rc = fread( colors, sizeof colors[0], colorCnt, file ); - if ( rc != colorCnt ) { - fprintf( stderr, "%s: Bad read of colors: %d\n", filename, rc ); - return FALSE; - } - if ( dumpColorMap ) { - printf( "colorcnt=%d", rc ); - for ( i=0; i maxcolor ) - maxcolor = bit; - } - if ( dumpBits ) - printf( "\n" ); - } - free( bmp ); - if ( dumpHisto ) { - printf( "maxcolor=%ld\n", maxcolor ); - for ( i=0; i<256; i++ ) - if ( histo[i] ) - printf( "[%2.2x]%8.8x = %ld\n", i, colors[i], histo[i] ); - - } - if ( updateColorCount || zeroColorCount || setColorCount ) { - fseek( file, 14, SEEK_SET ); - if ( updateColorCount ) { - bmih.biClrImportant = maxcolor; - } else if ( zeroColorCount ) { - bmih.biClrImportant = 0; - bmih.biClrUsed = 0; - } else { - bmih.biClrImportant = 256; - bmih.biClrUsed = 256; - } - rc = fwrite( &bmih, 1, sizeof bmih, file ); - if ( rc != sizeof bmih ) { - fprintf( stderr, "%s: Update failed; %d\n", filename, rc ); - } - } - fclose( file ); - return TRUE; -} - - -int main( int argc, char * argv[] ) -{ - while ( argc > 2 && argv[1][0] == '-' ) { - switch ( argv[1][1] ) { - case 'a': dumpInfo++; dumpColorMap++; dumpBits++; dumpHisto++; break; - case 'i': dumpInfo++; break; - case 'c': dumpColorMap++; break; - case 'b': dumpBits++; break; - case 'h': dumpHisto++; break; - case 'u': updateColorCount++; break; - case 'z': zeroColorCount++; break; - case 's': setColorCount++; break; - case 'f': fixColorMap++; break; - default: - fprintf( stderr, "bad option %s\n", argv[1] ); - } - argc--; - argv++; - } - if ( argc > 2 && dumpInfo+dumpColorMap+dumpBits+dumpHisto > 0 ) - namenames++; - while ( argc > 1 ) { - fixbmp( argv[1] ); - argc--; - argv++; - } -} diff --git a/app/help/genhelp.in b/app/help/genhelp.in index d4265b7..3364354 100644 --- a/app/help/genhelp.in +++ b/app/help/genhelp.in @@ -6,7 +6,8 @@ cmdAbout About box dialog cmdAbove Move Selected object to top cmdAddElevations Raise or Lower all Selected tracks cmdBelow Move Selected object to bottom -cmdBlockCreate Create a section of track for automation. +cmdBlockCreate Create a section of track for automation +cmdBlockEdit Edit a Block Definition cmdCarDesc Create a new Car/Loco description cmdCarInventory Manage your Car and Loco Inventory cmdCircleCenter Create track circle from center cmdCircle @@ -19,17 +20,19 @@ cmdCmdopt Command Options dialog cmdColor Controls colors cmdConnect Connect two tracks cmdControl Create a control for layout automation +cmdContmgm Manage control elements cmdCopy Copy selected objects to clipboard cmdCurveCenter Create curved track from center cmdCurve cmdCurveChord Create curved track from chord cmdCurve cmdCurveEndPt Create curved track from end-point cmdCurve +cmdBezier Create Bezier track cmdCurve cmdCurveSetCmd Set Curve Track creation mode cmdCurve cmdCurveTangent Create curved track from tangent cmdCurve cmdCustmgm Manipulate Custom designer entries cmdCut Moves selected objects to clipboard cmdDelete Delete objects cmdDemo Playback demos -cmdDescribe Describe objects +cmdDescribe Change Object Properties cmdDeselectAll Deselect all selected objects cmdSelect cmdDisplay Change Display parameters cmdDrawBench Create benchwork cmdDraw @@ -45,6 +48,7 @@ cmdDrawCurveEndPt Create a curved line from End cmdDraw cmdDrawCurveCenter Create a curved line from center cmdDraw cmdDrawCurveChord Create a curved line from chord cmdDraw cmdDrawCurveTangent Create a curved line from tangent cmdDraw +cmdDrawBezierCurve Create a Bezier line cmdDraw cmdDrawDimLine Create a dimension line cmdDraw cmdDrawFilledBox Create a filled box cmdDraw cmdDrawFilledCurve Create a filled circle cmdDraw @@ -97,12 +101,14 @@ cmdLayerSet Selects the current drawing layer cmdLayer #cmdLayerShow9 Shows or hides layers cmdLayer cmdLayout Layout parameters #cmdLoosen Disconnect tracks at loose joints nohelp +cmdMapShow Show/Hide Map Window cmdModify Modify or extend a track cmdMove Move selected objects cmdMoveLabel Move a label cmdMoveToCurrentLayer Move selected objects to current layer cmdNote Place a note on the layout cmdOutputbitmap Print a BitMap +cmdPan Pan or Zoom the Layout cmdParallel Create a parallel track cmdParameter Register register cmdPaste Copy objects from clipboard @@ -130,6 +136,7 @@ cmdSticky Choose which commands are sticky cmdStraight Create straight track cmdStructure Place a structure on the layout cmdSwitchMotorCreate Create a switchmotor for turnout control +cmdSwitchMotorEdit Edit a switchmotor definition cmdText Enter text on the layout cmdTextSize Controls the size of the entered text cmdText #cmdTighten Remove slack from connected tracks @@ -205,6 +212,10 @@ map-hilight This is the portion of the layout shown in the Main Window canvas # addElev-value Raise or Lower all Selected Track cmdAddElevations # +block-name Name of block cmdBlockCreate +block-script Script that the block will run cmdBlockCreate +block-segments List of tracks in the Block cmdBlockEdit +# carpart-ok Add or Update car object cmdCarInventory carpart-manuf Manufacturer name cmdCarInventory carpart-prototype Car Prototype cmdCarInventory @@ -263,6 +274,10 @@ cmdopt-preselect Default command is Describe or Select cmdCmdopt cmdopt-rightclickmode Action to invoke on Right-Click cmdCmdopt cmdopt-ok cmdCmdopt # +contmgm-inx The list of control elements cmdContmgm +contmgm-edit Edit the element cmdContmgm +contmgm-delete Delete the element cmdContmgm +# contents-label Contents Label for new Parameter file cmdCustmgm # custmgm-inx List of custom designed turnouts and structures cmdCustmgm @@ -278,6 +293,7 @@ demo-quit Stops the demonstration and returns you to XTrackCAD cmdDemo demo-speed Select speed of Playback cmdDemo demo-text This is where comments about the demo are displayed cmdDemo # +#Note all below have tab char after name describe-F1 describe-F2 describe-F3 @@ -306,6 +322,7 @@ describe-I5 describe-S1 describe-S2 describe-S3 +describe-S4 describe-Y1 describe-C1 describe-L1 @@ -332,6 +349,8 @@ display-listlabels Label elements for lists cmdDisplay display-carhotbarlabels How to group cars on the Train Hot Bar cmdDisplay display-trainpause Delay (in mS) between updating train movements cmdDisplay display-hideTrainsInTunnels Don't show trains in tunnels when tunnels are hidden cmdDisplay +display-unconnected-endpt Display unconnected endpoints of track with special marks cmdDisplay +display-zoom-corner Whether zoom is locked to the bottom left corner or the center point cmdDisplay #display-ok Update the display cmdDisplay display-ok cmdDisplay # @@ -426,7 +445,7 @@ parameter-name Enter your name as specified in the XTrackCAD Registration Notice parameter-key Enter the key value as specified in the XTrackCAD Registration Notice register parameter-ok Validates the name and key. Terminates the registration command register # -pref-anglesystem 0° is up or to the right cmdPref +pref-anglesystem 0� is up or to the right cmdPref pref-units Choose english (inches) or metric (centimeters) cmdPref pref-dstfmt How to display length measurements cmdPref pref-minlength Do not create tracks to be shorter than this value cmdPref @@ -450,6 +469,7 @@ pricelist-flexunit Price of specified length of flex-track cmdPricelist pricelist-flexcost Price of specified length of flex-track cmdPricelist pricelist-ok cmdPricelist # +print-centerLine Controls the printing of a centerline of track cmdPrint print-scale Controls the reduction (scale) of the printout cmdPrint print-pagew Scaled page width (Scale times physical page width) cmdPrint print-max Sets page size to the maximum (based on scale and physical page size) cmdPrint @@ -477,6 +497,7 @@ prmfile-mode Show parameter files by names or descriptions cmdPrmfile prmfile-action Toggle the loaded status of the selected parameter file cmdPrmfile prmfile-browse Find a parameter file for loading cmdPrmfile prmfile-ok Update parameter file list cmdPrmfile +prmfile-selectall Select all parameter files shown cmdPrmfile # profile-canvas Profile of specified path cmdProfile profile-clear Clear the profile cmdProfile @@ -532,6 +553,11 @@ structure-ok Complete structure placement cmdStructure # structure-pier-inx Choose a Pier number cmdStructure # +switchmotor-name Name of the Motor cmdSwitchMotorCreate +switchmotor-normal Value when switch is normal cmdSwitchMotorCreate +switchmotor-reverse Value when the switch is reversed cmdSwitchMotorCreate +switchmotor-pointSense Value for a positive comfirmation of switch position cmdSwitchMotorCreate +# text-fontsize Controls the size of the entered text cmdText # tip-text Useful information about the program cmdTip diff --git a/app/help/genmessages.c b/app/help/genmessages.c index 349e81e..6ae121e 100644 --- a/app/help/genmessages.c +++ b/app/help/genmessages.c @@ -22,318 +22,339 @@ #include #include #ifdef WINDOWS - #if _MSC_VER >=1400 - #define strdup _strdup - #endif +#if _MSC_VER >=1400 +#define strdup _strdup +#endif #endif #define I18NHEADERFILE "i18n.h" typedef struct helpMsg_t * helpMsg_p; typedef struct helpMsg_t { - char * key; - char * title; - char * help; - } helpMsg_t; + char * key; + char * title; + char * help; +} helpMsg_t; helpMsg_t helpMsgs[200]; int helpMsgCnt = 0; struct transTbl { - char *inChar; - char *outChar[]; + char *inChar; + char *outChar[]; }; /* ATTENTION: make sure that the characters are in the same order as the equivalent escape sequences below */ /* translation table for unicode sequences understood by Halibut */ struct transTbl toUnicode = { - "\xB0\0", - { "\\u00B0", - "\\0" } + "\xB0\0", + { + "\\u00B0", + "\\0" + } }; /* translation table for escape sequences understood by C compiler */ struct transTbl toC = { - "\n\\\"\0", - { "\\n", - "\\\\", - "\\\"", - "\\0" } + "\n\\\"\0", + { + "\\n", + "\\\\", + "\\\"", + "\\0" + } }; char * -TranslateString( char *srcString, struct transTbl *trTbl ) +TranslateString(char *srcString, struct transTbl *trTbl) { - char *destString; - char *cp; - char *cp2; - size_t bufLen = strlen( srcString ) + 1; - char *idx; - - /* calculate the expected result length */ - for( cp = srcString; *cp; cp++ ) - if( idx = strchr( trTbl->inChar, *cp )) /* does character need translation ? */ - bufLen += strlen( (trTbl->outChar)[idx - trTbl->inChar ] ) - 1; /* yes, extend buffer accordingly */ - - /* allocate memory for result */ - destString = malloc( bufLen ); - - if( destString ) { - /* copy and translate characters as needed */ - cp2 = destString; - for( cp = srcString; *cp; cp++ ) { - if( idx = strchr( trTbl->inChar, *cp )) { /* does character need translation ? */ - strcpy( cp2, (trTbl->outChar)[idx - trTbl->inChar ] ); /* yes, copy the escaped character sequence */ - cp2 += strlen((trTbl->outChar)[idx - trTbl->inChar ] ); - } else { - *cp2++ = *cp; /* no, just copy the character */ - } - } - /* terminate string */ - *cp2 = '\0'; - } else { - /* memory allocation failed */ - exit(1); - } - - return( destString ); + char *destString; + char *cp; + size_t bufLen = strlen(srcString) + 1; + char *idx; + + /* calculate the expected result length */ + for (cp = srcString; *cp; cp++) { + idx = strchr(trTbl->inChar, *cp); + + if (idx) { /* does character need translation ? */ + bufLen += strlen((trTbl->outChar)[idx - trTbl->inChar]) - + 1; /* yes, extend buffer accordingly */ + } + } + + /* allocate memory for result */ + destString = malloc(bufLen); + + if (destString) { + char *cp2; + /* copy and translate characters as needed */ + cp2 = destString; + + for (cp = srcString; *cp; cp++) { + idx = strchr(trTbl->inChar, *cp); + + if (idx != NULL) { /* does character need translation ? */ + strcpy(cp2, (trTbl->outChar)[idx - + trTbl->inChar ]); /* yes, copy the escaped character sequence */ + cp2 += strlen((trTbl->outChar)[idx - trTbl->inChar ]); + } else { + *cp2++ = *cp; /* no, just copy the character */ + } + } + + /* terminate string */ + *cp2 = '\0'; + } else { + /* memory allocation failed */ + exit(1); + } + + return (destString); } -int cmpHelpMsg( const void * a, const void * b ) +int cmpHelpMsg(const void * a, const void * b) { - helpMsg_p aa = (helpMsg_p)a; - helpMsg_p bb = (helpMsg_p)b; - return strcmp( aa->title, bb->title ); + helpMsg_p aa = (helpMsg_p)a; + helpMsg_p bb = (helpMsg_p)b; + return strcmp(aa->title, bb->title); } -void unescapeString( FILE * f, char * str ) +void unescapeString(FILE * f, char * str) { - while (*str) { - if (*str != '\\') - fputc( *str, f ); - str++; - } + while (*str) { + if (*str != '\\') { + fputc(*str, f); + } + + str++; + } } /** * Generate the file in help source format ( ie. the BUT file ) */ -void dumpHelp( FILE *hlpsrcF ) +void dumpHelp(FILE *hlpsrcF) { - int inx; - char *transStr; - - fputs( "\\#\n * DO NOT EDIT! This file has been automatically created by genmessages.\n * Changes to this file will be overwritten.\n", hlpsrcF ); - - fprintf( hlpsrcF, "\n\n\\H{messageList} Message Explanations\n\n" ); - - /* sort in alphabetical order */ - qsort( helpMsgs, helpMsgCnt, sizeof helpMsgs[0], cmpHelpMsg ); - - /* now save all the help messages */ - for ( inx=0; inx 4 ) { - fprintf( stderr, "Usage: %s [-i18n] INFILE OUTFILE\n\n", argv[0] ); - fprintf( stderr, " -i18n is used to generate a include file with gettext support.\n\n" ); - exit(1); - } - - /* check options */ - if( argc == 4 ) { - if( !strcmp(argv[ 1 ], "-i18n")){ - i18n = 1; - inFileIdx = 2; /* second argument is input file */ - } - /* inFileIdx = 2; skip over option argument */ - } else { - inFileIdx = 1; /* first argument is input file */ - } - - /* open the file for reading */ - inF = fopen( argv[ inFileIdx ], "r" ); - if( !inF ) { - fprintf( stderr, "Could not open %s for reading!\n", argv[ inFileIdx ] ); - exit( 1 ); - } - - /* open the include file to generate */ - hdrF = fopen( "messages.h", "w" ); - if( !hdrF ) { - fprintf( stderr, "Could not open messages.h for writing!\n" ); - exit( 1 ); - } - - fputs( "/*\n * DO NOT EDIT! This file has been automatically created by genmessages.\n * Changes to this file will be overwritten.\n */\n", hdrF ); - - /* open the help file to generate */ - outF = fopen( argv[ inFileIdx + 1 ], "w" ); - if( !inF ) { - fprintf( stderr, "Could not open %s for writing!\n", argv[ inFileIdx ] ); - exit( 1 ); - } - - /* Include i18n header, if needed */ - if (i18n) - fprintf( hdrF, "#include \"" I18NHEADERFILE "\"\n\n" ); - - while ( fgets( buff, sizeof buff, inF ) ) { - - /* skip comment lines */ - if ( buff[0] == '#' ) - continue; - - /* remove trailing whitespaces */ - cp = buff+strlen(buff)-1; - while( cp >= buff && isspace(*cp)) { - *cp = '\0'; - cp--; - } - - if ( strncmp( buff, "MESSAGE ", 8 ) == 0 ) { - - /* skip any spaces */ - cp = strchr( buff+8, ' ' ); - if (cp) - while (*cp == ' ') *cp++ = 0; -#ifndef FLAGS - if ( cp && *cp ) { - flags = atoi(cp); - } -#endif - /* save the name of the message */ - strcpy( msgName, buff + 8 ); - msgAlt[0] = 0; - msgTitle[0] = 0; - msgTitle1[0] = 0; - msgHelp[0] = 0; - mode = m_title; - } else if ( strncmp( buff, "ALT", 3 ) == 0 ) { - mode = m_alt; - msgAlt[0] = 0; - } else if ( strncmp( buff, "HELP", 4 ) == 0 ) { - mode = m_help; - } else if ( strncmp( buff, "END", 3 ) == 0 ) { - /* the whole message has been read */ - - /* create escape sequences */ - tName = TranslateString( msgName, &toC ); - tTitle = TranslateString( msgTitle, &toC ); - tAlt = TranslateString( msgAlt, &toC ); - - if (msgHelp[0]==0) { - /* no help text is included */ - if (i18n) - fprintf( hdrF, "#define %s N_(\"%s\")\n", tName, tTitle ); - else - fprintf( hdrF, "#define %s \"%s\"\n", tName, tTitle ); - } else if (msgAlt[0]) { - /* a help text and an alternate description are included */ - if (i18n) - fprintf( hdrF, "#define %s N_(\"%s\\t%s\\t%s\")\n", tName, tName, tAlt, tTitle ); - else - fprintf( hdrF, "#define %s \"%s\\t%s\\t%s\"\n", tName, tName, tAlt, tTitle ); - } else { - /* a help text but no alternate description are included */ - if (i18n) - fprintf( hdrF, "#define %s N_(\"%s\\t%s\")\n", tName, tName, tTitle ); - else - fprintf( hdrF, "#define %s \"%s\\t%s\"\n", tName, tName, tTitle ); - } - - /*free temp stzrings */ - free( tName ); - free( tTitle ); - free( tAlt ); - - /* save the help text for later use */ - if (msgHelp[0]) { - helpMsgs[helpMsgCnt].key = strdup(msgName); - if ( msgAlt[0] ) - helpMsgs[helpMsgCnt].title = strdup(msgAlt); - else - helpMsgs[helpMsgCnt].title = strdup(msgTitle); - helpMsgs[helpMsgCnt].help = strdup(msgHelp); - helpMsgCnt++; - } - mode = 0; - } else { - /* are we currently reading the message text? */ - if (mode == m_title) { - /* yes, is the message text split over two lines ? */ - if (msgTitle[0]) { - /* if yes, keep the first part as the short text */ - if (msgAlt[0] == 0) { - strcpy( msgAlt, msgTitle ); - strcat( msgAlt, "..." ); - } - /* add a newline to the first part */ - strcat( msgTitle, "\n" ); - } - /* now save the buffer into the message title */ - strcat( msgTitle, buff ); - } else if (mode == m_alt) { - /* an alternate text was explicitly specified, save */ - if( msgAlt[ 0 ] ) { - strcat( msgAlt, " " ); - strcat( msgAlt, buff ); - } else { - strcpy( msgAlt, buff ); - } - } else if (mode == m_help) { - /* we are reading the help text, save in buffer */ - strcat( msgHelp, buff ); - strcat( msgHelp, "\n" ); - } - } - } - dumpHelp( outF ); - - fclose( hdrF ); - fclose( inF ); - fclose( outF ); - - printf( "%d messages\n", helpMsgCnt ); - return 0; + FILE * hdrF; + FILE *inF; + FILE *outF; + char buff[ 4096 ]; + char * cp; + int inFileIdx; + enum {m_init, m_title, m_alt, m_help } mode = m_init; + char msgName[256]; + char msgAlt[256]; + char msgTitle[1024]; + char msgHelp[4096]; + char *tName, *tAlt, *tTitle; + + int i18n = 0; + + /* check argument count */ + if (argc < 3 || argc > 4) { + fprintf(stderr, "Usage: %s [-i18n] INFILE OUTFILE\n\n", argv[0]); + fprintf(stderr, + " -i18n is used to generate a include file with gettext support.\n\n"); + exit(1); + } + + /* check options */ + if (argc == 4) { + if (!strcmp(argv[ 1 ], "-i18n")) { + i18n = 1; + inFileIdx = 2; /* second argument is input file */ + } + + /* inFileIdx = 2; skip over option argument */ + } else { + inFileIdx = 1; /* first argument is input file */ + } + + /* open the file for reading */ + inF = fopen(argv[ inFileIdx ], "r"); + + if (!inF) { + fprintf(stderr, "Could not open %s for reading!\n", argv[ inFileIdx ]); + exit(1); + } + + /* open the include file to generate */ + hdrF = fopen("messages.h", "w"); + + if (!hdrF) { + fprintf(stderr, "Could not open messages.h for writing!\n"); + exit(1); + } + + fputs("/*\n * DO NOT EDIT! This file has been automatically created by genmessages.\n * Changes to this file will be overwritten.\n */\n", + hdrF); + fputs("#ifndef HAVE_MESSAGES_H\n#define HAVE_MESSAGES_H\n", hdrF); + /* open the help file to generate */ + outF = fopen(argv[ inFileIdx + 1 ], "w"); + + if (!inF) { + fprintf(stderr, "Could not open %s for writing!\n", argv[ inFileIdx ]); + exit(1); + } + + /* Include i18n header, if needed */ + if (i18n) { + fprintf(hdrF, "#include \"" I18NHEADERFILE "\"\n\n"); + } + + while (fgets(buff, sizeof buff, inF)) { + /* skip comment lines */ + if (buff[0] == '#') { + continue; + } + + /* remove trailing whitespaces */ + cp = buff+strlen(buff)-1; + + while (cp >= buff && isspace(*cp)) { + *cp = '\0'; + cp--; + } + + if (strncmp(buff, "MESSAGE ", 8) == 0) { + /* skip any spaces */ + cp = strchr(buff+8, ' '); + + if (cp) + while (*cp == ' ') { + *cp++ = 0; + } + + /* save the name of the message */ + strcpy(msgName, buff + 8); + msgAlt[0] = 0; + msgTitle[0] = 0; + msgHelp[0] = 0; + mode = m_title; + } else if (strncmp(buff, "ALT", 3) == 0) { + mode = m_alt; + msgAlt[0] = 0; + } else if (strncmp(buff, "HELP", 4) == 0) { + mode = m_help; + } else if (strncmp(buff, "END", 3) == 0) { + /* the whole message has been read */ + /* create escape sequences */ + tName = TranslateString(msgName, &toC); + tTitle = TranslateString(msgTitle, &toC); + tAlt = TranslateString(msgAlt, &toC); + + if (msgHelp[0]==0) { + /* no help text is included */ + if (i18n) { + fprintf(hdrF, "#define %s N_(\"%s\")\n", tName, tTitle); + } else { + fprintf(hdrF, "#define %s \"%s\"\n", tName, tTitle); + } + } else if (msgAlt[0]) { + /* a help text and an alternate description are included */ + if (i18n) { + fprintf(hdrF, "#define %s N_(\"%s\\t%s\\t%s\")\n", tName, tName, tAlt, tTitle); + } else { + fprintf(hdrF, "#define %s \"%s\\t%s\\t%s\"\n", tName, tName, tAlt, tTitle); + } + } else { + /* a help text but no alternate description are included */ + if (i18n) { + fprintf(hdrF, "#define %s N_(\"%s\\t%s\")\n", tName, tName, tTitle); + } else { + fprintf(hdrF, "#define %s \"%s\\t%s\"\n", tName, tName, tTitle); + } + } + + /*free temp stzrings */ + free(tName); + free(tTitle); + free(tAlt); + + /* save the help text for later use */ + if (msgHelp[0]) { + helpMsgs[helpMsgCnt].key = strdup(msgName); + + if (msgAlt[0]) { + helpMsgs[helpMsgCnt].title = strdup(msgAlt); + } else { + helpMsgs[helpMsgCnt].title = strdup(msgTitle); + } + + helpMsgs[helpMsgCnt].help = strdup(msgHelp); + helpMsgCnt++; + } + + mode = 0; + } else { + /* are we currently reading the message text? */ + if (mode == m_title) { + /* yes, is the message text split over two lines ? */ + if (msgTitle[0]) { + /* if yes, keep the first part as the short text */ + if (msgAlt[0] == 0) { + strcpy(msgAlt, msgTitle); + strcat(msgAlt, "..."); + } + + /* add a newline to the first part */ + strcat(msgTitle, "\n"); + } + + /* now save the buffer into the message title */ + strcat(msgTitle, buff); + } else if (mode == m_alt) { + /* an alternate text was explicitly specified, save */ + if (msgAlt[ 0 ]) { + strcat(msgAlt, " "); + strcat(msgAlt, buff); + } else { + strcpy(msgAlt, buff); + } + } else if (mode == m_help) { + /* we are reading the help text, save in buffer */ + strcat(msgHelp, buff); + strcat(msgHelp, "\n"); + } + } + } + + dumpHelp(outF); + fputs("#endif // HAVE_MESSAGES_H\n", hdrF); + fclose(hdrF); + fclose(inF); + fclose(outF); + printf("%d messages\n", helpMsgCnt); + return 0; } diff --git a/app/help/messages.in b/app/help/messages.in index 3fe1b97..519f2f8 100644 --- a/app/help/messages.in +++ b/app/help/messages.in @@ -73,7 +73,7 @@ Refer to \k{cmdTurnoutNew} for detail. END MESSAGE MSG_CURVE_OUT_OF_RANGE -Angle must be between 0° and 360°. +Angle must be between 0\u00B0 and 360\u00B0. HELP The angle specified for a curve must be between 0\u00B0 and 360\u00B0. END @@ -186,6 +186,15 @@ Cannot join from a turntable, try to a turntable HELP You cannot select a \f{Turntable} as the second track in \f{Join} command. If you wish to \f{Join} to a \f{Turntable} then select the \f{Turntable} as the first track in the \f{Join} command. +Refer to \k{cmdJoin} for detail. +END + + ccornu.c +MESSAGE MSG_JOIN_CORNU_SAME +Cannot Join; Selected endpoints are on same track. +HELP +You are trying to \f{Join} a section of track with itself. Different tracks must selected when using the \f{Join} command. + Refer to \k{cmdJoin} for detail. END @@ -272,6 +281,14 @@ The parameters \e{Minimum Track Length}, \e{Connection Angle} and \e{Connection Refer to \k{cmdPref} for detail. END +MESSAGE MSG_CONN_PARAMS_TOO_BIG +Connection parameters reset to maximum values. +HELP +The parameters \e{Minimum Track Length}, \e{Connection Angle} and \e{Connection Distance} have maximum values that cannot be set to bigger values. The maximum values are 1.0"/2.54cm, 10\u00B0 and 1.0"/2.54cm respectively. + +Refer to \k{cmdPref} for detail. +END + # fileio.c MESSAGE MSG_CANT_PASTE Copy/Paste buffer is empty. There is nothing to Paste. @@ -622,8 +639,20 @@ HELP It's not possible to create a Circle or Helix with a radius of 0\u00B0 or less. Specify a positive value in the \f{Radius} field that appears in the Status Bar. END +MESSAGE MSG_RADIUS_GTR_10000 +Radius must be less than 10000. +HELP +It's not possible to create a Circle or Helix with a radius of 10000\u00B0 or more. Specify a smaller value in the \f{Radius} field. +END + +MESSAGE MSG_RADIUS_TOO_BIG +The Circle or Helix will not fit within the layouts room parameters (Height and Width). +HELP +The defined circle can not fit within the defined layout parameters. Either specify a smaller value in the \f{Radius} field, or increase the room parameters in the \f{Layout} dialog. +END + #cselect.c -MESSAGE MSG_RESCALE_TOO_BIG +MESSAGE MSG_RESCALE_TOO_BIG Rescaled tracks do not fit within layouts room parameters (Height and width). The layouts room parameters should be set to at least %s by %s. @@ -940,6 +969,13 @@ A critical file is corrupt. Unfortunately it will be necessary to reinstall the Please report this error to the \e{XTrackCAD} project development team at SourceForge. The process for reporting errors is outlined in \k{bugs}. END +# param.c +MESSAGE MSG_ENTERED_STRING_TRUNCATED +The entered text is too long. Maximum length is %d. +HELP +The text entered into a field is longer than the maximum allowed length and was truncated. Please check the shortened text and edit as necessary. +END + # track.c MESSAGE MSG_PT_IS_NOT_TRK [%s %s] is not a track. diff --git a/app/help/mkpngbutt b/app/help/mkpngbutt deleted file mode 100755 index 0b77831..0000000 --- a/app/help/mkpngbutt +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - - -NAME=$1 -shift -FILES="" -for F in $* ; do - FILES="${FILES} ../bin/$F.xpm" -done -#echo ${NAME} - -(./mkxpmbutt ${NAME} ${FILES} | convert +compress XPM:- PNG:temp.png) 2>&1 -#(./mkxpmbutt ${NAME} ${FILES} | convert +compress -transparency '#111' XPM:- PNG:temp.png) 2>&1 -#(./mkxpmbutt ${NAME} ${FILES} | xpmtoppm | pnmtopng -force > temp.png) 2>&1 -#(mkxpmbutt ${NAME} ${FILES} | convert -transparency '#111' XPM:- PNG:temp.png) 2>&1 -if cmp -s temp.png png.d/${NAME}.png ; then - rm temp.png -else - echo updating ${NAME}.png - mv temp.png png.d/${NAME}.png -fi diff --git a/app/help/mkpngs b/app/help/mkpngs deleted file mode 100755 index a230ea4..0000000 --- a/app/help/mkpngs +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -./mkpngbutt bzoomin zoomin -./mkpngbutt bzoom zoom -./mkpngbutt bzoomout zoomout -./mkpngbutt bgzoom zoomin zoom zoomout - -./mkpngbutt bundo undo -./mkpngbutt bredo redo -./mkpngbutt bgundo undo redo - -./mkpngbutt bease enone -./mkpngbutt bgease enone - -./mkpngbutt bgsnap snapcurs snapvis - -./mkpngbutt bstraigh straight -./mkpngbutt bcurve curve1 openbutt -./mkpngbutt bcircle circle1 openbutt -./mkpngbutt bhelix helix -./mkpngbutt bturnout turnout -./mkpngbutt bhndldto hndldto -./mkpngbutt bturntbl turntbl -./mkpngbutt bparalle parallel -./mkpngbutt bgtrkcrt straight curve1 openbutt circle1 openbutt helix turnout hndldto turntbl parallel - -./mkpngbutt bcurve1 curve1 -./mkpngbutt bcurve2 curve2 -./mkpngbutt bcurve3 curve3 -./mkpngbutt bcurve4 curve4 -./mkpngbutt bcircl1 circle1 -./mkpngbutt bcircl2 circle2 -./mkpngbutt bcircl3 circle3 - -./mkpngbutt bmodify extend -./mkpngbutt bjoin join -./mkpngbutt bconnect pull -./mkpngbutt bsplit splittrk -./mkpngbutt belev elev -./mkpngbutt bprofile profile -./mkpngbutt bmovedes movedesc -./mkpngbutt bgtrkmod extend join pull splittrk elev profile movedesc - -./mkpngbutt bdescrib describe -./mkpngbutt bselect select -./mkpngbutt bgselect describe select - -./mkpngbutt bmove move -./mkpngbutt brotate rotate -./mkpngbutt bflip flip -./mkpngbutt bdelete delete -./mkpngbutt btunnel tunnel -./mkpngbutt babove above -./mkpngbutt bbelow below -./mkpngbutt babvbel above below -./mkpngbutt bgtrkgrp move rotate flip delete tunnel above below - -./mkpngbutt btext text -./mkpngbutt bdraw dline openbutt dcurve1 openbutt dcircle1 openbutt dbox openbutt -./mkpngbutt bnote cnote -./mkpngbutt bstruct struct -./mkpngbutt bgmsccrt text dline dcurve1 openbutt dcircle1 openbutt dbox openbutt cnote struct - -./mkpngbutt dline dline -./mkpngbutt ddimlin ddimlin -./mkpngbutt dbench dbench -./mkpngbutt dtbledge dtbledge -./mkpngbutt dcurve1 dcurve1 -./mkpngbutt dcurve2 dcurve2 -./mkpngbutt dcurve3 dcurve3 -./mkpngbutt dcurve4 dcurve4 -./mkpngbutt dcircle2 dcircle2 -./mkpngbutt dcircle3 dcircle3 -./mkpngbutt dflcrcl2 dflcrcl2 -./mkpngbutt dflcrcl3 dflcrcl3 -./mkpngbutt dbox dbox -./mkpngbutt dfilbox dfilbox -./mkpngbutt dpoly dpoly -./mkpngbutt dfilpoly dfilpoly - - -./mkpngbutt bruler ruler -./mkpngbutt bgruler ruler - -./mkpngbutt btrain train -./mkpngbutt bgtrain train -./mkpngbutt bnewcar newcar - -exit 0 diff --git a/app/help/mkshg.c b/app/help/mkshg.c deleted file mode 100644 index 4c708fa..0000000 --- a/app/help/mkshg.c +++ /dev/null @@ -1,455 +0,0 @@ -#include -#include -#include "readpng.h" - -#define PROGNAME "mkshg" - - -int verbose = 0; -int dmpcolortab = 0; -int dmpimage = 0; - -#define MAXRUNLEN (2) - -typedef struct { - unsigned char id0, id1, id2; - unsigned short x, y, w, h; - long hash; - char * name; - char * context; - } hotspot_t; - -int samecolor( long color1, long color2 ) -{ - long c1, c2; - int i; - for ( i=0; i<3; i++ ) { - c1 = (color1&0xFF); - c2 = (color2&0xFF); - if ( c1 != c2 ) { - if ( c1 == 0xFF || c2 == 0xFF ) return FALSE; - c1 = (c1+1)&0xFE; - c2 = (c2+1)&0xFE; - if ( c1 != c2 ) return FALSE; - } - color1 >>= 8; - color2 >>= 8; - } - return TRUE; -} - -void conv24to8( long * colorTab, char * buff, unsigned long channels, unsigned long width24, unsigned long width8, unsigned long height ) -{ - long * lastColor, *cp; - long color; - char * ip; - char *op; - unsigned long h, w; - memset( colorTab, 0, 1024 ); - lastColor = colorTab; - *lastColor++ = 0xC0C0C0; - *lastColor++ = 0xFFFFFF; - *lastColor++ = 0x808080; - *lastColor++ = 0x000000; - op = buff; - for (h=0; h MAXRUNLEN || runlen == 0 ) { - while ( norunlen > 0 ) { - if ( norunlen > 0x7F ) - chunk = 0x7F; - else - chunk = norunlen; - *op++ = 0x80|chunk; - memcpy( op, ip-norunlen, chunk ); - op += chunk; - norunlen -= chunk; - } - while ( runlen > MAXRUNLEN ) { - if ( runlen > 0x7F ) - chunk = 0x7F; - else - chunk = runlen; - *op++ = chunk; - *op++ = *ip; - ip += chunk; - runlen -= chunk; - } - } else { - norunlen += runlen; - ip += runlen; - } - } - *osize = op-op0; -} - - -void writeculong( FILE * shgF, unsigned long value ) -{ - unsigned short tmp; - if ( value > 0x7FFF ) { - tmp = (unsigned short)((value&0x7FFF)<<1)+1; - fwrite( &tmp, 2, 1, shgF ); - tmp = (unsigned short)(value>>15); - fwrite( &tmp, 2, 1, shgF ); - } else { - tmp = (unsigned short)(value<<1); - fwrite( &tmp, 2, 1, shgF ); - } -} - -void writecushort( FILE * shgF, unsigned short value ) -{ - unsigned char tmp; - if ( value > 0x7F ) { - tmp = (unsigned short)((value&0x7F)<<1)+1; - fwrite( &tmp, 1, 1, shgF ); - tmp = (unsigned short)(value>>7); - fwrite( &tmp, 1, 1, shgF ); - } else { - tmp = (unsigned short)(value<<1); - fwrite( &tmp, 1, 1, shgF ); - } -} - -void writeShgPic( - FILE * shgF, - unsigned long width, - unsigned long width8, - unsigned long height, - long colorTab[256], - unsigned char * data, - unsigned short hotspotcnt, - hotspot_t * hotspots ) -{ - short int pictype, packmethod; - unsigned long xdpi, ydpi, colorsused, colorsimportant, compressedsize, hotspotsize, compressoffset, hotspotoffset; - unsigned short planes, bitcount; - unsigned char * compressed_data; - unsigned int start_off, offset_off, off; - unsigned short inx; - unsigned char one = 1; - unsigned long macrosize = 0; - - pictype = 6; - packmethod = 1; - xdpi = ydpi = 96; - planes = 1; - bitcount = 8; - colorsused = 256; - colorsimportant = 256; - hotspotsize = (hotspotcnt?7:0); - hotspotoffset = 0; - compressed_data = (unsigned char *)malloc( width8*height ); - compress_data( data, width8*height, compressed_data, &compressedsize ); - for ( inx=0; inx0 ) { - hotspotoffset = ftell( shgF ) - start_off; - fwrite( &one, 1, 1, shgF ); - fwrite( &hotspotcnt, 2, 1, shgF ); - fwrite( ¯osize, 4, 1, shgF ); - for ( inx=0; inx 0 ) { - if ( x < 0 ) - x = ((int)hs_p[hs_c-1].x) - x; - if ( y < 0 ) - y = ((int)hs_p[hs_c-1].y) - y; - } - hs.x = (unsigned short)x; - hs.y = (unsigned short)y; - if ( rc != 5 ) - fprintf( stderr, "Invalid hotspot syntax: %s", line ); - if ( strcasecmp( type, "jump" ) == 0 ) { - hs.id0 = 0xe7; - hs.id1 = 0x04; - hs.id2 = 0x00; - } else if ( strcasecmp( type, "popup" ) == 0 ) { - hs.id0 = 0xe6; - hs.id1 = 0x04; - hs.id2 = 0x00; - } else if ( strcasecmp( type, "ignore" ) == 0 ) { - continue; - } else { - fprintf( stderr, "Invalid hotspot type: %s", line ); - continue; - } - sprintf( name, "Hotspot %d", hs_c+1 ); - hs.name = strdup( name ); - context = line+off; - off = strlen( context ); - if ( context[off-1] == '\n' ) context[off-1] = 0; - hs.context = strdup( context ); - for (hs.hash=0; *context; context++ ) - hs.hash = (hs.hash*43)+hashTable[(unsigned char)*context]; - hs_c++; - hs_p = (hotspot_t*)realloc( hs_p, hs_c * sizeof hs ); - hs_p[hs_c-1] = hs; - } - *hotspotcnt = hs_c; - *hotspotptr = hs_p; -} - - -void PngToShg( - char * pngFile, - char * shgFile ) -{ - FILE * pngF, * shgF; - int rc; - unsigned long image_width, image_height, image_rowbytes, width8, h; - int image_channels; - unsigned char * image_data; - double display_exponent = 1.0; - - long size, fileSize, maxRecSize; - long colorTab[256]; - - short int magic; - short int piccnt; - long int picoff[1]; - - unsigned short hotspotcnt; - hotspot_t * hotspotptr; - - pngF = fopen( pngFile, "r" ); - if ( pngF == NULL ) { - perror( pngFile ); - return; - } - shgF = fopen( shgFile, "w" ); - if ( shgF == NULL ) { - perror( shgFile ); - return; - } - if ((rc = readpng_init(pngF, &image_width, &image_height)) != 0) { - switch (rc) { - case 1: - fprintf(stderr, PROGNAME - ": [%s] is not a PNG file: incorrect signature\n", - pngFile); - break; - case 2: - fprintf(stderr, PROGNAME - ": [%s] has bad IHDR (libpng longjmp)\n", - pngFile); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown readpng_init() error\n"); - break; - } - return; - } - - image_data = readpng_get_image(display_exponent, &image_channels, &image_rowbytes); - width8 = ((image_width+3)/4)*4; - size = width8*image_height; - fileSize = (size+1024)/2 + 70; - maxRecSize = (size+1024)/2 + 34; - - conv24to8( colorTab, image_data, image_channels, image_width*image_channels, width8, image_height ); - - magic = 0x706c; - piccnt = 1; - picoff[0] = 8; - fwrite( &magic, 2, 1, shgF ); - fwrite( &piccnt, 2, 1, shgF ); - fwrite( picoff, 4, piccnt, shgF ); - readHotspots( stdin, &hotspotcnt, &hotspotptr ); - writeShgPic( shgF, image_width, width8, image_height, colorTab, image_data, hotspotcnt, hotspotptr ); - if ( hotspotptr ) - free( hotspotptr ); - - readpng_cleanup(FALSE); - fclose( pngF ); - fclose( shgF ); - free( image_data ); - -} - -int main( argc, argv ) -int argc; char * argv[]; -{ - while ( argc > 1 && argv[1][0] == '-' ) { - switch ( argv[1][1] ) { - case 'v': - verbose++; - break; - case 'c': - dmpcolortab++; - break; - case 'i': - dmpimage++; - break; - default: - fprintf( stderr, "Unknown option: %s\n", argv[1] ); - exit(1); - } - argv++; - argc--; - } - if ( argc != 3 ) { - fprintf( stderr, "Usage: mkshg [-v] [-c] infile.png outfile.shg\n" ); - exit(1); - } - - PngToShg( argv[1], argv[2] ); -} diff --git a/app/help/mkshgs b/app/help/mkshgs deleted file mode 100755 index 56dadc3..0000000 --- a/app/help/mkshgs +++ /dev/null @@ -1,348 +0,0 @@ -rm -f xtchelp.d/*.shg - -PNG1DIR=png.d -PNG2DIR=images.orig -SHGDIR=xtchelp.d - -./mkshg ${PNG1DIR}/bgzoom.png ${SHGDIR}/bgzoom.shg << EOF -jump 0 0 26 26 cmdZoomIn -jump 26 0 26 26 cmdZoom -jump 52 0 26 26 cmdZoomOut -EOF -./mkshg ${PNG1DIR}/bgundo.png ${SHGDIR}/bgundo.shg << EOF -jump 0 0 26 26 cmdUndo -jump 26 0 26 26 cmdRedo -EOF -./mkshg ${PNG1DIR}/bgease.png ${SHGDIR}/bgease.shg << EOF -jump 0 0 50 25 cmdEasement -EOF -./mkshg ${PNG1DIR}/bgsnap.png ${SHGDIR}/bgsnap.shg << EOF -jump 0 0 26 26 cmdGridEnable -jump 26 0 26 26 cmdGridShow -EOF -./mkshg ${PNG1DIR}/bgtrkcrt.png ${SHGDIR}/bgtrkcrt.shg << EOF -jump 0 0 26 26 cmdStraight -jump 26 0 40 26 cmdCurve -jump 66 0 40 26 cmdCircle -jump 104 0 26 26 cmdHelix -jump 132 0 26 26 cmdTurnout -jump 158 0 26 26 cmdHandLaidTurnout -jump 184 0 26 26 cmdTurntable -jump 210 0 26 26 cmdParallel -EOF -./mkshg ${PNG1DIR}/bgtrkmod.png ${SHGDIR}/bgtrkmod.shg << EOF -jump 0 0 26 26 cmdModify -jump 26 0 26 26 cmdJoin -jump 52 0 26 26 cmdConnect -jump 78 0 26 26 cmdSplitTrack -jump 104 0 26 26 cmdElevation -jump 130 0 26 26 cmdProfile -jump 156 0 26 26 cmdMoveDesc -EOF -./mkshg ${PNG1DIR}/bgselect.png ${SHGDIR}/bgselect.shg << EOF -jump 0 0 26 26 cmdDescribe -jump 26 0 26 26 cmdSelect -EOF -./mkshg ${PNG1DIR}/bgtrkgrp.png ${SHGDIR}/bgtrkgrp.shg << EOF -jump 0 0 26 26 cmdMove -jump 26 0 26 26 cmdRotate -jump 52 0 26 26 cmdFlip -jump 78 0 26 26 cmdDelete -jump 104 0 26 26 cmdTunnel -jump 130 0 26 26 cmdAbove -jump 156 0 26 26 cmdBelow -EOF -./mkshg ${PNG1DIR}/bgmsccrt.png ${SHGDIR}/bgmsccrt.shg << EOF -jump 0 0 26 26 cmdText -jump 26 0 26 26 cmdDraw -jump 52 0 40 26 cmdDraw -jump 92 0 40 26 cmdDraw -jump 132 0 40 26 cmdDraw -jump 172 0 26 26 cmdNote -jump 198 0 26 26 cmdStructure -EOF -./mkshg ${PNG1DIR}/bgruler.png ${SHGDIR}/bgruler.shg << EOF -jump 0 0 26 26 cmdRuler -EOF -./mkshg ${PNG1DIR}/bgtrain.png ${SHGDIR}/bgtrain.shg << EOF -jump 0 0 26 26 cmdTrain -EOF - -for png in ${PNG1DIR}/*.png ; do - shg=`echo ${png}|sed -e "s/${PNG1DIR}\///" -e 's/\.png//'` - shg=${SHGDIR}\/${shg}.shg - if [ ! -f $shg ] ; then - ./mkshg $png $shg < /dev/null - fi -done - -./mkshg ${PNG2DIR}/bglayer.png ${SHGDIR}/bglayer.shg << EOF -jump 0 0 400 26 cmdLayer -EOF -./mkshg ${PNG2DIR}/bhotbar.png ${SHGDIR}/bhotbar.shg << EOF -popup 1 1 26 26 _hotBarLeft -popup 517 1 26 26 _hotBarRight -EOF -./mkshg ${PNG2DIR}/bitmap.png ${SHGDIR}/bitmap.shg << EOF -popup 2 83 132 28 _outputbitmap_density -popup 2 22 132 60 _outputbitmap_toggles -EOF -./mkshg ${PNG2DIR}/blayer.png ${SHGDIR}/blayer.shg << EOF -jump 0 0 400 26 cmdLayer -EOF -./mkshg ${PNG2DIR}/carinv.png ${SHGDIR}/carinv.shg << EOF -popup 7 24 515 24 _carinv_sort1 -popup 550 28 80 20 _carinv_ok -popup 550 50 80 20 _carinv_edit -popup 550 73 80 20 _carinv_add -popup 550 102 80 20 _carinv_delete -popup 550 132 80 20 _carinv_import -popup 550 156 80 20 _carinv_export -popup 550 179 80 20 _carinv_savetext -EOF -./mkshg ${PNG2DIR}/caritem.png ${SHGDIR}/caritem.shg << EOF -popup 7 28 455 24 _carpart_manuf -popup 7 54 455 24 _carpart_prototype_list -popup 7 81 455 24 _carpart_partno_list -popup 7 143 455 24 _carpart_dispmode -popup 7 176 455 24 _carpart_index -popup 7 211 154 24 _carpart_purchPrice -popup 166 211 145 24 _carpart_currPrice -popup 314 211 162 24 _carpart_condition -popup 7 244 185 24 _carpart_purchDate -popup 197 244 185 24 _carpart_serviceDate -popup 7 278 154 24 _carpart_quantity -popup 163 278 253 24 _carpart_multinum -popup 7 309 442 104 _carpart_notes -popup 491 47 80 20 _carpart_new -EOF -./mkshg ${PNG2DIR}/carpart.png ${SHGDIR}/carpart.shg << EOF -popup 7 28 455 24 _carpart_manuf -popup 7 54 455 24 _carpart_prototype_list -popup 7 81 455 24 _carpart_partno -popup 7 109 455 24 _carpart_desc -popup 7 173 455 24 _carpart_road -popup 7 203 168 24 _carpart_repmark -popup 179 203 140 24 _carpart_number -popup 324 203 61 24 _carpart_bodycolor -popup 7 237 192 24 _carpart_carLength -popup 203 237 265 24 _carpart_carWidth -popup 7 265 192 24 _carpart_trkCenter -popup 203 265 265 24 _carpart_cplrMount -popup 7 291 192 24 _carpart_cpldLen -popup 203 291 265 24 _carpart_cplrLen -popup 491 23 80 20 _carpart_ok -popup 491 47 80 20 _carpart_newproto -EOF -./mkshg ${PNG2DIR}/carproto.png ${SHGDIR}/carproto.shg << EOF -popup 7 28 455 24 _carpart_prototype -popup 7 54 455 24 _carpart_type -popup 7 81 455 24 _carpart_isLoco -popup 115 109 80 24 _carpart_import -popup 198 109 80 24 _carpart_reset -popup 298 109 80 24 _carpart_flip -popup 7 237 192 24 _carpart_carLength -popup 203 237 265 24 _carpart_carWidth -popup 7 265 192 24 _carpart_trkCenter -popup 7 321 457 100 _carpart_canvas -popup 491 23 80 20 _carpart_ok -EOF -./mkshg ${PNG2DIR}/celev.png ${SHGDIR}/celev.shg << EOF -popup 5 22 92 127 _elev_mode -popup 100 46 83 27 _elev_value -popup 100 73 83 17 _elev_computed -popup 100 90 83 17 _elev_grade -popup 100 107 203 27 _elev_station -ignore 192 23 79 19 _elev_ok -EOF -./mkshg ${PNG2DIR}/chelix.png ${SHGDIR}/chelix.shg << EOF -popup 9 25 232 26 _helix_elev -popup 9 53 232 26 _helix_radius -popup 9 80 232 26 _helix_turns -popup 9 106 232 26 _helix_angSep -popup 9 133 232 26 _helix_grade -popup 9 160 232 26 _helix_vertSep -EOF -#./mkshg ${PNG2DIR}/cnote.png ${SHGDIR}/cnote.shg << EOF -#popup 4 22 302 152 _note_text -#ignore 8 22 31 20 _noteMFile -#EOF -./mkshg ${PNG2DIR}/cparalle.png ${SHGDIR}/cparalle.shg << EOF -popup 227 5 245 19 _parallel_separation -EOF -./mkshg ${PNG2DIR}/cprofile.png ${SHGDIR}/cprofile.shg << EOF -ignore 505 24 79 19 _profile_ok -popup 505 48 80 19 _profile_clear -popup 506 71 79 20 _profile_print -popup 5 23 486 221 _profile_canvas -ignore 3 244 434 22 _profile_message -EOF -./mkshg ${PNG2DIR}/custmgm.png ${SHGDIR}/custmgm.shg << EOF -popup 5 25 397 230 _custmgm_inx -popup 415 25 80 20 _custmgm_ok -popup 415 48 80 20 _custmgm_edit -popup 415 73 80 20 _custmgm_delete -popup 415 95 80 20 _custmgm_export -popup 415 126 80 20 _custmgm_new -EOF -./mkshg ${PNG2DIR}/dchgelev.png ${SHGDIR}/dchgelev.shg << EOF -EOF -./mkshg ${PNG2DIR}/demo.png ${SHGDIR}/demo.shg << EOF -popup 7 53 419 229 _demo_text -popup 251 27 138 20 _demo_speed -popup 169 27 81 20 _demo_quit -popup 87 27 80 20 _demo_next -popup 5 27 79 20 _demo_step -EOF -./mkshg ${PNG2DIR}/dlayer.png ${SHGDIR}/dlayer.shg << EOF -popup 9 28 252 26 _layer_layer -popup 9 57 250 24 _layer_name -popup 9 81 79 24 _layer_color -popup 9 107 79 24 _layer_visible -popup 87 107 79 24 _layer_frozen -popup 167 107 79 24 _layer_onmap -popup 9 132 130 24 _layer_object_count -popup 9 167 266 24 _layer_button_count -EOF -./mkshg ${PNG2DIR}/easeex1.png ${SHGDIR}/easeex1.shg << EOF -EOF -./mkshg ${PNG2DIR}/easeex2.png ${SHGDIR}/easeex2.shg << EOF -EOF -./mkshg ${PNG2DIR}/easew.png ${SHGDIR}/easew.shg << EOF -popup 19 69 266 20 _easement_radio -popup 165 43 76 25 _easement_l -popup 83 45 82 22 _easement_x -popup 3 45 78 24 _easement_r -popup 54 21 109 22 _easement_val -EOF -./mkshg ${PNG2DIR}/grid.png ${SHGDIR}/grid.shg << EOF -popup 244 99 77 25 _grid_show -popup 243 24 101 74 _grid_origx -popup 3 96 188 21 _grid_horzenable -popup 2 67 189 26 _grid_horzdivision -popup 2 37 218 29 _grid_horzspacing -EOF -./mkshg ${PNG2DIR}/pricels.png ${SHGDIR}/pricels.shg << EOF -popup 2 49 404 194 _pricelist_inx -popup 2 22 404 24 _pricelist_cost -popup 2 248 404 24 _pricelist_flexcost -EOF -./mkshg ${PNG2DIR}/print.png ${SHGDIR}/print.shg << EOF -popup 5 26 190 25 _print_scale -popup 5 54 190 25 _print_pagew -popup 198 54 80 20 _print_max -popup 5 78 190 25 _print_pageh -popup 198 78 80 20 _print_snapshot -popup 5 101 274 25 _print_format -popup 5 122 274 25 _print_order -popup 5 156 275 25 _print_style -popup 5 180 275 25 _print_physsize -popup 5 205 275 25 _print_registrationMarks -popup 5 227 275 25 _print_grid -popup 5 252 275 25 _print_ruler -popup 5 277 275 25 _print_roadbed -popup 5 301 275 25 _print_roadbedWidth -popup 5 333 165 80 _print_origx -popup 173 362 80 20 _print_reset -popup 291 23 80 20 _print_ok -popup 291 47 80 20 _printSetup -popup 291 68 80 20 _print_clear -EOF -./mkshg ${PNG2DIR}/prmfile.png ${SHGDIR}/prmfile.shg << EOF -popup 392 88 81 20 _prmfile_browse -popup 393 67 81 18 _prmfile_action -popup 76 215 150 23 _prmfile_mode -popup 1 19 371 193 _prmfile_inx -EOF -./mkshg ${PNG2DIR}/regw.png ${SHGDIR}/regw.shg << EOF -popup 1 110 299 26 _parameter_key -popup 1 81 301 27 _parameter_name -EOF -./mkshg ${PNG2DIR}/rescale.png ${SHGDIR}/rescale.shg << EOF -popup 1 21 274 24 _rescale_toggle -popup 1 45 142 24 _rescale_from -popup 143 45 131 24 _rescale_to -popup 1 72 274 24 _rescale_change_gauge -popup 1 99 274 24 _rescale_ratio -popup 283 21 80 24 _rescale_ok -EOF -./mkshg ${PNG2DIR}/strsel.png ${SHGDIR}/strsel.shg << EOF -popup 366 75 87 61 _structure_stats -popup 9 272 440 220 _structure_canvas -popup 9 26 350 241 _structure_list -popup 366 48 80 20 _structure_hide -EOF -./mkshg ${PNG2DIR}/ctext.png ${SHGDIR}/ctext.shg << EOF -popup 223 2 280 24 _text_fontsize -EOF -./mkshg ${PNG2DIR}/ttdiam.png ${SHGDIR}/ttdiam.shg << EOF -popup 224 4 245 19 _turntable_diameter -EOF -./mkshg ${PNG2DIR}/turndes.png ${SHGDIR}/turndes.shg << EOF -popup 494 158 86 42 _turnoutNew_angleMode -popup 494 70 80 20 _printSetup -popup 494 44 80 20 _turnoutNew_print -popup 50 139 135 25 _turnoutNew_len1 -popup 282 87 126 25 _turnoutNew_off1 -popup 357 47 124 25 _turnoutNew_angle1 -popup 126 29 130 25 _turnoutNew_len1 -popup 5 167 478 25 _turnoutNew_manuf -popup 5 196 343 53 _turnoutNew_desc1 -popup 352 196 129 53 _turnoutNew_partno1 -popup 5 250 200 25 _turnoutNew_roadbedWidth -popup 209 250 117 25 _turnoutNew_roadbedLineWidth -popup 328 250 65 25 _turnoutNew_color -EOF -./mkshg ${PNG2DIR}/turnsel.png ${SHGDIR}/turnsel.shg << EOF -popup 10 314 25 25 _turnout_endPoint -popup 10 277 25 25 _turnout_endPoint -popup 379 314 25 25 _turnout_endPoint -popup 379 277 25 25 _turnout_activeEndPoint -popup 330 49 80 20 _turnout_new -popup 330 72 80 20 _turnout_hide -popup 6 269 404 133 _turnout_canvas -popup 6 26 316 243 _turnout_list -EOF -./mkshg ${PNG2DIR}/train.png ${SHGDIR}/train.shg << EOF -popup 4 23 120 24 _train_list -popup 4 93 22 200 _train_speed -popup 27 91 80 24 _train_distance -popup 112 91 14 24 _train_zeroDistance -popup 27 129 80 24 _train_goto -popup 27 160 80 24 _train_follow -popup 27 183 80 24 _train_autoreverse -popup 27 213 80 24 _train_direction -popup 27 244 80 24 _train_stop -EOF -./mkshg ${PNG2DIR}/trainbar.png ${SHGDIR}/trainbar.shg << EOF -EOF -./mkshg ${PNG2DIR}/updttl.png ${SHGDIR}/updttl.shg << EOF -popup 1 150 301 21 _updatetitle_old -popup 4 177 303 196 _updatetitle_sel -popup 310 177 80 20 _updatetitle_ok -popup 310 200 80 19 _updatetitle_ignore -popup 310 223 80 19 _updatetitle_load -EOF -./mkshg ${PNG2DIR}/wenum.png ${SHGDIR}/wenum.shg << EOF -popup 6 26 550 278 _enum_text -popup 565 26 80 20 _enum_save -popup 565 50 80 20 _enum_print -popup 565 74 80 20 _printSetup -popup 565 100 80 20 _enum_list_prices -EOF -./mkshg ${PNG2DIR}/wmain.png ${SHGDIR}/wmain.shg << EOF -popup 3 25 645 18 _main_menubar -popup 3 41 645 59 _main_commandbar -popup 3 102 645 27 _main_layers -popup 3 136 645 34 _main_hotbar -popup 3 2 645 21 _main_titlebar -popup 3 173 645 301 _main_canvas -popup 7 476 50 22 _infoBarScale -popup 63 476 49 22 _infoBarCount -popup 119 476 115 22 _infoBarPosX -popup 238 476 115 22 _infoBarPosY -popup 364 476 283 22 _infoBarStatus -EOF -./mkshg ${PNG2DIR}/wmap.png ${SHGDIR}/wmap.shg << EOF -popup 95 349 112 50 _map_hilight -EOF diff --git a/app/help/mkxpmbutt.c b/app/help/mkxpmbutt.c deleted file mode 100644 index 4b09a80..0000000 --- a/app/help/mkxpmbutt.c +++ /dev/null @@ -1,303 +0,0 @@ - -/* XTrkCad - Model Railroad CAD - * Copyright (C) 2005 Dave Bullis - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include - -typedef struct { - int w; - int h; - char * b; - } bitmap_t; - -#define RGB(R,G,B) (((R)<<16)|((G)<<8)|(B)) - -static struct { - long rgb; - int key; - } mainColorMap[256]; -static int mainColorCnt; -static int fileColorMap[256]; - -static int sizeColorMap( void ) -{ - return mainColorCnt; -} - -static void printColorMap( FILE * fout ) -{ - int inx, r, g, b; - long rgb; - for ( inx=0; inx>16)&0xFF; - g = (rgb>>8)&0xFF; - b = (rgb)&0xFF; - fprintf( fout, "\"%c\tc #%2.2X%s%2.2X%s%2.2X%s\",\n", - mainColorMap[inx].key, - r, ((r&1)?"FF":"00"), - g, ((g&1)?"FF":"00"), - b, ((b&1)?"FF":"00") ); - } -} - -static int allocColor( long color ) -{ - int inx; - for ( inx=0; inx= 256 ) { - fprintf( stderr, "too many colors\n" ); - exit(1); - } - mainColorMap[mainColorCnt].rgb = color; - mainColorMap[mainColorCnt].key = mainColorCnt+'0'; - return mainColorMap[mainColorCnt++].key; -} - -static void resetColor( void ) -{ - int inx; - for ( inx=0; inx<256; inx++ ) - fileColorMap[inx] = -1; -} - -static void mapColor( int inx, long rgb ) -{ - fileColorMap[inx] = allocColor(rgb); -} - -static int remapColor( int oldColor ) -{ - int newColor; - newColor = fileColorMap[oldColor]; - if ( newColor < 0 ) { - fprintf( stderr, "unknown color inx: %d\n", oldColor ); - return ' '; - } - return newColor; -} - -static int read_xpm( - char * filename, - int *rw, - int *rh, - int bx, - int by, - bitmap_t *bm ) -{ - char line[1024], *cp, *cq, *buffer, color[5]; - FILE * f; - int numcol, curcol, depth, linenum; - int col, row, len, r, g, b; - long rgb; - - f = fopen( filename, "r" ); - if ( !f ) { - perror( filename ); - return 0; - } - numcol = -1; - curcol = 0; - linenum = 0; - resetColor(); - row = by; - while (fgets( line, sizeof line, f ) ) { - linenum++; - if ( line[0] != '"' ) - continue; - if ( numcol == -1 ) { - if ( sscanf( line+1, "%d%d%d%d", rw, rh, &numcol, &depth ) != 4 ) { - fprintf( stderr, "bogus XPM header: %s:%d\n", filename, linenum ); - return 0; - } - if (!bm) - return 1; - } else if ( curcol < numcol ) { - if ( strncmp( line+2, "\tc #", 4 ) != 0 ) { - fprintf( stderr, "bogus XPM color line: %s:%d\n", filename, linenum ); - return 0; - } - color[3] = 0; - memcpy( color, line+6, 2 ); - r = strtol( color, &cp, 16 ); - memcpy( color, line+10, 2 ); - g = strtol( color, &cp, 16 ); - memcpy( color, line+14, 2 ); - b = strtol( color, &cp, 16 ); - rgb = RGB(r,g,b); - if ( curcol == 0 ) - fileColorMap[line[1]] = '0'; - else - mapColor( line[1], rgb ); - curcol++; - } else { - if ( row > by+*rh ) { - fprintf( stderr, "too many data lines: %s:%d\n", filename, linenum ); - return 0; - } - if ( row > bm->h ) - return 1; - cp = line+1; - for ( col=0; col<*rw; col++,cp++ ) { - if ( bx+col > bm->w ) - break; - if ( *cp == '"' ) { - fprintf( stderr, "short data line: %s:%d\n", filename, linenum ); - return 0; - } - bm->b[bx+col+bm->w*row] = remapColor( *cp ); - } - row++; - } - } - fclose( f ); - return 1; -} - -static void drawVline( - bitmap_t * bm, - int col, - int x, - int y0, - int y1 ) -{ - int jj; - if ( x > bm->w ) - return; - for ( jj=y0; jj<=y1; jj++ ) { - if ( jj>=bm->h ) - return; - bm->b[jj*bm->w+x] = col; - } -} - - -static void drawHline( - bitmap_t * bm, - int col, - int x0, - int x1, - int y ) -{ - int ii; - if ( y > bm->h ) - return; - for ( ii=x0; ii<=x1; ii++ ) { - if ( ii>=bm->w ) - return; - bm->b[y*bm->w+ii] = col; - } -} - -static void fillBlock( - bitmap_t * bm, - int col, - int x, - int y, - int w, - int h ) -{ - int ii, jj; - for ( jj=y; jjbm->h ) - return; - for ( ii=x; iibm->w ) - return; - bm->b[jj*bm->w+ii] = col; - } - } -} - - -int main ( int argc, char * argv[] ) -{ - char * name; - int colWhite, colMdGray, colDkGray, colBlack; - int bx, w, h; - bitmap_t bm; - char ** filename; - int ii, jj; - char * cp; - int argn; - - if ( argc < 3 ) { - fprintf( stderr, "usage: %s NAME FILE1.XPM...\n", argv[0] ); - exit(1); - } - - colMdGray = allocColor( RGB(0xC0,0xC0,0xC0) ); - colWhite = allocColor( RGB(255,255,255) ); - colDkGray = allocColor( RGB(0x80,0x80,0x80) ); - colBlack = allocColor( RGB(0,0,0) ); - allocColor( RGB(255,0,0) ); - - name = argv[1]; - argc -= 2; - filename = &argv[2]; - - bm.w = 1; - bm.h = 0; - for ( argn=0; argn bm.h ) - bm.h = h+10; - bm.w += w+9; - } - - bm.b = (char*)malloc( bm.w*bm.h ); - memset( bm.b, 0, bm.w*bm.h ); - fillBlock( &bm, colMdGray, 0, 0, bm.w, bm.h ); - bx = 0; - for ( argn=0; argn -#if defined (__sun) && defined (__SVR4) -#include -#endif - -int main ( int argc, char * argv[] ) { - -int pagecnt, start, end, count ; -pagecnt = atoi( argv[1] ); - -if ( (pagecnt+2)%4 != 0 ) { - fprintf( stderr, "pagecnt+2 % 4 != 0\n" ); - exit(1); -} - -printf( "%d-,%d\n", pagecnt, pagecnt-1 ); -start = 1; -end = pagecnt-2; -count=5; -while ( start < end ) { - printf( "%d,%d,%d,%d%s", end,start,start+1,end-1, count>0?",":"\n" ); - start += 2; - end -= 2; - count--; - if ( count < 0 ) - count = 5; -} -return 0; -} diff --git a/app/help/prochelp.c b/app/help/prochelp.c deleted file mode 100644 index d1dd256..0000000 --- a/app/help/prochelp.c +++ /dev/null @@ -1,2178 +0,0 @@ - -/* XTrkCad - Model Railroad CAD - * Copyright (C) 2005 Dave Bullis - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#if defined (__sun) && defined (__SVR4) -#include -#endif -#include "readpng.h" - -#define PROGNAME "prochelp" - -char line[1024]; -int lineNum; -FILE * ifile; -FILE * ofile; -int wordwrap = 1; -int listLevel = -1; -int listType[10]; -int listCount[10]; -int lineWidth = 80; -int listWidth = 80; -int verbose = 0; -int toc = 0; -char * dirs[10] = { "." }; -char ** dirList = &dirs[1]; -int FontSize = 22; -double MarginTop = -1; -double MarginBottom = -1; -double MarginLeft = -1; -double MarginRight = -1; -double MarginGutter = -1; - -#define LISTNONE (0) -#define LISTBULLET (1) -#define LISTDASH (2) -#define LISTNUMBER (3) - -int USE_BMP = 0; - - -typedef struct { - void (*start)( char *, char * ); - void (*finish)( void ); - void (*newParagraph)( void ); - void (*startLine)( int ); - void (*doBold)( char * ); - void (*doItalic)( char * ); - void (*doXref)( char *, char *, char * ); - void (*doPicture)( char *, int ); - void (*endLine)( void ); - void (*putChar)( char ); - void (*doSection)( char, char *, char *, char *, char *, int ); - void (*doHeader)( char * ); - void (*doStartDisplay)( void ); - void (*doEndDisplay)( void ); - void (*doThread)( char * ); - void (*doListStart)( void ); - void (*doListItem)( void ); - void (*doListEnd)( void ); - void (*page)( void ); - - } dispatchTable; -dispatchTable *curMode; - -struct tocList_t; -typedef struct tocList_t * tocList_p; -typedef struct tocList_t { - tocList_p next; - char section; - long num; - char * title; - } tocList_t; -tocList_p tocHead = NULL; -tocList_p tocTail = NULL; -long tocNum = 37061946; - - -void no_op( void ) -{ -} -FILE * openFile( char * filename ) -{ - FILE * f; - char tmp[1024]; - char ** d; - - for ( d=dirs; *d; d++ ) { - sprintf( tmp, "%s/%s", *d, filename ); - f = fopen( tmp, "r" ); - if (f) - return f; - } - fprintf( stderr, "Can't open %s\n", filename ); - exit(1); -} - -void normalStart( char * inName, char * outName ) -{ - ifile = openFile( inName ); - if ( strcmp( outName, "-" ) == 0 ) { - ofile = stdout; - } else { - ofile = fopen( outName, "w" ); - if (ofile == NULL) { - perror( outName ); - exit( 1 ); - } - } -} -void normalFinish( void ) -{ - if (ofile) - fclose( ofile ); -} -void process( FILE * ); - -/****************************************************************************** - * - * COMMON RTF - * - *****************************************************************************/ - -int rtfNeedPar = FALSE; -int rtfNeedGap = FALSE; -int rtfNeedFI0 = FALSE; -int rtfGapHeight = -1; -int rtfBigGap = 60; - -void rtfFlushParagraph( void ) -{ - if ( rtfNeedPar ) { - if ( rtfNeedGap==TRUE && rtfGapHeight!=rtfBigGap ) { - fprintf( ofile, "\\sb%d", rtfBigGap ); - rtfGapHeight = rtfBigGap; - } - if ( rtfNeedGap==FALSE && rtfGapHeight!=0 ) { - fprintf( ofile, "\\sb0" ); - rtfGapHeight = 0; - } - fprintf( ofile, "\\par\n" ); - if ( rtfNeedFI0 ) - fprintf( ofile, "\\fi0\n" ); - rtfNeedPar = FALSE; - rtfNeedGap = FALSE; - rtfNeedFI0 = FALSE; - } -} - - -void rtfPutChar( char ch ) -{ - if ( ((ch) & 0x80) ){ - fprintf( ofile, "\\'%2.2X", (unsigned char)ch ); - } else if ( (ch) == '\\' ){ - fprintf( ofile, "\\\\" ); - } else { - fputc( ch, ofile ); - } - rtfNeedPar = TRUE; -} -void rtfPutString( char * cp ) -{ - while (*cp) { - rtfPutChar( *cp++ ); - } -} -void rtfNewParagraph( void ) -{ - if ( wordwrap ) { - rtfFlushParagraph(); -#ifdef LATER - if ( listLevel < 0 ) { - rtfFlushParagraph(); - rtfNeedGap = 1; - } else { - if ( rtfNeedPar ) { - fprintf( ofile, "\\line\r\n" ); - rtfNeedPar = FALSE; - } - } -#endif - } -} -void rtfStartLine( int lastBlank ) -{ - if ( !wordwrap ) { - fprintf( ofile, "\\tab\r\n" ); - } else if ( lastBlank ) { - rtfFlushParagraph(); - } -} -void rtfBold( char * name ) -{ - fprintf( ofile, "{\\b " ); - rtfPutString( name ); - fprintf( ofile, "}" ); -} -void rtfItalic( char * name ) -{ - fprintf( ofile, "{\\i " ); - rtfPutString( name ); - fprintf( ofile, "}" ); -} -void rtfEndLine( void ) -{ - if ( !wordwrap ) { - rtfNeedPar = TRUE; - rtfFlushParagraph(); - } -} -void rtfStartDisplay( void ) -{ - rtfFlushParagraph(); -} -void rtfListStart( void ) -{ - rtfFlushParagraph(); - if (listLevel>0) { - fprintf( ofile, "\\pard" ); -/* - if ( rtfNeedGap ) { - fprintf( ofile, "\\sb%d", rtfBigGap ); - rtfGapHeight = rtfBigGap; - rtfNeedGap = FALSE; - } -*/ - rtfGapHeight = -1; - } - fprintf( ofile, "\\tx360\\li%d\r\n", 360*(listLevel+1) ); -} -void rtfListItem( void ) -{ - /*if (listLevel == 0 || listCount[listLevel] > 1)*/ - rtfFlushParagraph(); - fprintf( ofile, "\\fi-360 " ); - rtfNeedFI0 = TRUE; - switch (listType[listLevel]) { - case LISTNONE: -#ifdef LATER - if ( listCount[listLevel] > 0 ) - fprintf( ofile, "\\fi-360 " ); - rtfNeedFI0 = TRUE; -#endif - break; - case LISTBULLET: - fprintf( ofile, "{\\f1\\'B7}\\tab" ); - break; - case LISTDASH: - fprintf( ofile, "{\\b -}\\tab" ); - break; - case LISTNUMBER: - fprintf( ofile, "{\\b %d}\\tab", listCount[listLevel] ); - break; - } - fprintf( ofile, "\r\n" ); -} -void rtfListEnd( void ) -{ - if (listLevel == -1) - fprintf( ofile, "\\par\\pard\r\n" ); - else - fprintf( ofile, "\\par\\pard\\tx360\\li%d\\fi-360\r\n", 360*(listLevel+1) ); - rtfNeedPar = FALSE; - rtfGapHeight = -1; - rtfNeedGap = FALSE; -} - -void rtfPage( void ) -{ - rtfFlushParagraph(); - fprintf( ofile, "\\page\r\n" ); -} - -/****************************************************************************** - * - * MSW-HELP - * - *****************************************************************************/ - -int pageCnt = 0; - -struct { - char * name; - int count; - } threads[100]; -int threadCnt = 0; - - -char * remap_minus( char * cp ) -{ - char * cp0 = cp; - for ( ; *cp; cp++ ) - if ( *cp == '-' ) - *cp = '_'; - return cp0; -} - -int lookupThread( char * name ) -{ - int inx; - if (!name) { - fprintf( stderr, "%d: NULL thread string\n", lineNum ); - return 0; - } - for (inx=0;inx= 40) { - fprintf( outF, "\n" ); - off = 0; - } - } - if (off != 1) - fprintf( outF, "\n" ); -} - - -void conv24to8( long * colorTab, unsigned char * buff, int channels, int width24, int width8, int height ) -{ - long * lastColor, *cp; - long color; - unsigned char * ip; - unsigned char *op; - int h, w; - lastColor = colorTab; - memset( colorTab, 0, 1024 ); - op = buff; - for (h=0; h=0; h--) { - for (i=3; i>=0; i--) - buff[h*4+i] = buff[h*3+i]; - buff[h*4+3] = 0; - } - } - dumpBytes( buff, 1024, outF ); - rc = fseek( bmpF, bmfhOff, 0 ); - buff = (char*)realloc( buff, (int)scanWidth ); - for ( h=0; h=0; h--) { - for (i=3; i>=0; i--) - buff[h*4+i] = buff[h*3+i]; - buff[h*4+3] = 0; - } - dumpBytes( buff, 1024, outF ); - rc = fseek( bmpF, bmfhOff, 0 ); - buff = (char*)realloc( buff, (int)scanWidth*2+10 ); - width8 = (bmih.width+3)/4*4; - for ( h=0; h=0; i--) { - buff[i*2+1] = buff[i]&0xF; - buff[i*2] = (buff[i]>>4)&0xF; - } - dumpBytes( buff, width8, outF ); - } - break; - case 1: - buff = (char*)malloc(1024); - fseek( bmpF, colormapOff, 0 ); - memset( buff, 0, 1024 ); - rc = fread( buff, 3*2, 1, bmpF ); - for (h=1; h>=0; h--) { - for (i=3; i>=0; i--) - buff[h*4+i] = buff[h*3+i]; - buff[h*4+3] = 0; - } - dumpBytes( buff, 1024, outF ); - rc = fseek( bmpF, bmfhOff, 0 ); - buff = (char*)realloc( buff, (int)scanWidth*8+10 ); - width8 = (bmih.width+3)/4*4; - for ( h=0; h=0; i--) { - for (j=7; j>=0; j--) { - buff[i*8+j] = (buff[i]&(128>>j))?1:0; - } - } - dumpBytes( buff, width8, outF ); - } - break; - case 24: - buff = (char*)malloc( (int)(fullSize) ); - rc = fread( buff, (int)(fullSize), 1, bmpF ); - colorTab = (long*)malloc( 1024 ); - width8 = ((bmih.width+3)/4)*4; - conv24to8( colorTab, buff, (int)scanWidth, 3, (int)width8, (int)bmih.height ); - dumpBytes( (char*)colorTab, 1024, outF ); - for ( h=0; hsection = section; - tl->title = (char*)malloc( strlen(sectionNumS) + strlen(title) + 1 ); - sprintf( tl->title, "%s%s", sectionNumS, title ); - tl->num = tocNum++; - tl->next = NULL; - if (tocHead == NULL) - tocHead = tl; - else - tocTail->next = tl; - tocTail = tl; - } - rtfNeedPar = FALSE; - rtfNeedGap = TRUE; - rtfGapHeight = -1; -} - -void mswwordStart( char * inName, char * outName ) -{ - normalStart( inName, outName ); - if ( MarginGutter >= 0.0 ) - fprintf( ofile, "\\margmirror\\gutter%d\n", (int)(MarginGutter*1440.0) ); - if (MarginTop >= 0.0) - fprintf( ofile, "\\margt%d\n", (int)(MarginTop*1440.0) ); - if (MarginBottom >= 0.0) - fprintf( ofile, "\\margb%d\n", (int)(MarginBottom*1440.0) ); - if (MarginRight >= 0.0) - fprintf( ofile, "\\margr%d\n", (int)(MarginRight*1440.0) ); - if (MarginLeft >= 0.0) - fprintf( ofile, "\\margl%d\n", (int)(MarginLeft*1440.0) ); -} - -void mswwordFinish( void ) -{ - char lastSection = 'A'; - tocList_p tl; - rtfFlushParagraph(); - if (toc) { - fprintf( ofile, "\ -\\sect \\sectd \\pgnrestart\\pgnlcrm\\linex0\\endnhere\ -\\pard\\plain \\qc\\widctlpar \\f4\\fs22 \ -{\\b\\fs36\\lang1024\\kerning28 Contents \\par \\par }\ -\\pard\\plain \\s17\\widctlpar\\tqr\\tldot\\tx8640 \\f4\\fs%d\n", FontSize ); - for ( tl=tocHead; tl; tl=tl->next ) { - if ( tl->section != lastSection ) { - fprintf( ofile, "\ -\\pard\\plain \\s%d\\li%d\\widctlpar\\tqr\\tldot\\tx8640 \\f4\\fs%d\n", - tl->section-'A'+17, - (tl->section-'A')*200, FontSize ); - lastSection = tl->section; - } - fprintf( ofile, "\ -{\\lang1024\\kerning28 %s}{\\lang1024 \\tab }\ -{\\field{\\*\\fldinst {\\lang1024 GOTOBUTTON _Toc%ld }\n\ -{\\field{\\*\\fldinst {\\lang1024 PAGEREF _Toc%ld }}\ -{\\fldrslt {\\lang1024 3}}}}}{\\lang1024 \\par }\n", - tl->title, tl->num, tl->num); - } - fprintf( ofile, -"\\pard\\plain \\widctlpar \\f4\\fs%d\n}\n}\n" -/*\\pard\\plain \*/ -"\\widctlpar \\f4\\fs%d\n" , FontSize, FontSize); - } - normalFinish(); -} - - -dispatchTable mswwordTable = { - mswwordStart, - mswwordFinish, - rtfNewParagraph, - rtfStartLine, - rtfBold, - rtfItalic, - mswwordXref, - mswwordPicture, - rtfEndLine, - rtfPutChar, - mswwordSection, - (void*)no_op, - rtfStartDisplay, - (void*)no_op, - (void*)no_op, - rtfListStart, - rtfListItem, - rtfListEnd, - rtfPage - }; - -/****************************************************************************** - * - * TEXT - * - *****************************************************************************/ - -char textBuff[1024]; -char *textBuffP = textBuff; -int textNewLine = 1; -int textIndent = 0; -int textAllowLeadingBlanks = 0; -int textNoIndent = 0; -int textLineLength; - -void textPutChar( char ch ) -{ - char *cp, *cq; - int indent; - int width; - - if (textNewLine) { - textLineLength = 0; - if (ch == ' ' && !textAllowLeadingBlanks) { - return; - } - if (!textNoIndent) { - for (indent=0; indent0?listWidth:lineWidth); - if ( wordwrap && width > 0 && textLineLength > width ) { - for (cp = textBuffP-1; *cp != ' ' && cp>textBuff+lineWidth/2; cp-- ); - while ( *cp == ' ' && cp>textBuff+lineWidth/2 ) cp--; - cp++; - fwrite( textBuff, cp-textBuff, 1, ofile ); - fwrite( "\n", 1, 1, ofile ); - textNewLine = 1; - while (*cp == ' ' && cp= sizeof textBuff ) { - fwrite( textBuff, textBuffP-textBuff, 1, ofile ); - textBuffP = textBuff; - textLineLength = 0; - } -} -void textBreakLine( void ) -{ - if ( !textNewLine ) { - fwrite( textBuff, textBuffP-textBuff, 1, ofile ); - fwrite( "\n", 1, 1, ofile ); - textNewLine = 1; - textBuffP = textBuff; - textLineLength = 0; - } -} -void textSaveLine( char * tmp ) -{ - if (!textNewLine) { - int len = textBuffP-textBuff; - memcpy( tmp, textBuff, len ); - tmp[len] = '\0'; - textNewLine = 1; - textBuffP = textBuff; - textLineLength = 0; - } else { - tmp[0] = '\0'; - } -} -void textRestoreLine( char * tmp ) -{ - int len = strlen( tmp ); - if (len > 0) { - memcpy( textBuffP, tmp, len ); - textBuffP += len; - textLineLength += len; - textNewLine = 0; - } -} -void textFinish( void ) -{ - textBreakLine(); - normalFinish(); -} -void textPutString( char * cp ) -{ - while (*cp) - textPutChar( *cp++ ); -} -void textNewParagraph( void ) -{ - textBreakLine(); - if (wordwrap) { - fwrite( "\n", 1, 1, ofile ); - } -} -void textStartLine( int lastlineblank ) -{ -} -void textBold( char * name ) -{ - char * cp; - /*textPutChar( '<' );*/ - for ( cp = name; *cp; cp++ ) { - textPutChar( *cp ); - if (*cp != ' ') { - textPutChar( '\010' ); - textPutChar( *cp ); - } - } - /*textPutString( name );*/ - /*textPutChar( '>' );*/ -} -void textItalic( char * name ) -{ - char * cp; - /*textPutChar( '<' );*/ - for ( cp = name; *cp; cp++ ) { - textPutChar( *cp ); - if (*cp != ' ') { - textPutChar( '\010' ); - textPutChar( *cp ); - } - } - /*textPutString( name );*/ - /*textPutChar( '>' );*/ -} -void textXref( char * name, char * ref1, char * ref2 ) -{ - textBold( name ); - /*textPutChar( '<' ); - textPutString( name ); - textPutChar( '>' );*/ - if (ref2) { - textPutString( " (See " ); - textPutString( ref2 ); - textPutString( " for Details)" ); - } -} -void textPicture( char * picture, int inLine ) -{ - textPutString( "<<" ); - textPutString( picture ); - textPutString( ">>" ); - if (inLine) { - textPutString( " " ); - } else { - textBreakLine(); - fwrite( "\n", 1, 1, ofile ); - } -} -void textEndLine( void ) -{ - if ( !wordwrap ) - textBreakLine(); -} -void textSection( char section, char * title, char * context, char * picture, char * keywords, int newpage ) -{ - int len; - textBreakLine(); - if (pageCnt > 0 && newpage) { - fwrite( "\014\n", 1, 2, ofile ); - } - pageCnt++; - textBold( title ); - /*textPutString( title );*/ - textBreakLine(); - for ( len = strlen(title); len>0; len-- ) { - textBold( "=" ); - /*fwrite( "=", 1, 1, ofile );*/ - } - textBreakLine(); - fwrite( "\n", 1, 1, ofile ); -} -void textHeader( char * line ) -{ -} -void textStartIndent( void ) -{ - textBreakLine(); - textIndent++; -} -void textEndIndent( void ) -{ - textBreakLine(); - if (textIndent < 0) { - fprintf( stderr, "%d: textIndent < 0\n", lineNum ); - textIndent = 0; - } else { - textIndent--; - } -} -void textListItem( void ) -{ - char num[4]; - textBreakLine(); - textIndent--; - textAllowLeadingBlanks = 1; - switch( listType[listLevel] ) { - case LISTNONE: - default: - textPutString( " " ); - break; - case LISTBULLET: - textPutString( " o " ); - break; - case LISTDASH: - textPutString( " - " ); - break; - case LISTNUMBER: - sprintf( num, "%3.3d", listCount[listLevel] ); - textPutString( num ); - textPutChar( ' ' ); - break; - } - textAllowLeadingBlanks = 0; - textIndent++; -} -void textPage( void ) -{ - fwrite( "\014\n", 1, 2, ofile ); -} -dispatchTable textTable = { - normalStart, - textFinish, - textNewParagraph, - textStartLine, - textBold, - textItalic, - textXref, - textPicture, - textEndLine, - textPutChar, - textSection, - textHeader, - textStartIndent, - textEndIndent, - (void*)no_op, - textStartIndent, - textListItem, - textEndIndent, - textPage - }; - -/****************************************************************************** - * - * XVIEW - * - *****************************************************************************/ - - -void xviewStart( char * inName, char * outName ) -{ - normalStart( inName, outName ); - lineWidth = 0; -} - -void xviewBold( char * name ) -{ - char * cp; - textPutChar( '<' ); - textPutString( name ); - textPutChar( '>' ); -} -void xviewItalic( char * name ) -{ - char * cp; - textPutChar( '<' ); - textPutString( name ); - textPutChar( '>' ); -} -void xviewXref( char * name, char * ref1, char * ref2 ) -{ - xviewBold( name ); - if (ref2) { - textPutString( " (See " ); - textPutString( ref2 ); - textPutString( " for Details)" ); - } -} -void xviewSection( char section, char * title, char * context, char * picture, char * keywords, int newpage ) -{ - int indent; - int len; - - static char * stars = "************"; - indent = line[1]-'A'+1; - textBreakLine(); - if (pageCnt > 0 && newpage) { - fwrite( "\n", 1, 1, ofile ); - } - if ( newpage ) { - pageCnt++; - textNoIndent = 1; - textPutChar( ':' ); - textPutString( stars+strlen(stars)-indent ); - textPutChar( '-' ); - textPutString( title ); - textBreakLine(); - if (context) { - textPutChar( ':' ); - textPutString( context ); - textPutChar( ' ' ); - textBreakLine(); - } - } - textNoIndent = 0; - xviewBold( title ); - textBreakLine(); - for ( len = strlen(title); len>0; len-- ) - fwrite( "=", 1, 1, ofile ); - fwrite( "\n\n", 1, 2, ofile ); -} -void xviewHeader( char * line ) -{ - char tmp[1024]; - textSaveLine( tmp ); - textNoIndent = 1; - textPutChar( ':' ); - textPutString( line ); - textPutChar( ' ' ); - textBreakLine(); - textNoIndent = 0; - textRestoreLine( tmp ); -} -dispatchTable xviewTable = { - xviewStart, - normalFinish, - textNewParagraph, - textStartLine, - xviewBold, - xviewItalic, - xviewXref, - (void*)no_op, /* picture */ - textEndLine, - textPutChar, - xviewSection, - xviewHeader, - textStartIndent, /* startDisplay */ - textEndIndent, /* endDisplay */ - (void*)no_op, - textStartIndent, /* listStart */ - textListItem, - textEndIndent, /* listEnd */ - (void*)no_op - }; - -/****************************************************************************** - * - * HTML - * - *****************************************************************************/ - -char * htmlName; -char htmlFileName[1024]; - -struct { - char * name; - int index; - int section; - } links[500]; -int linkCnt = 0; - -void setLink( char * name, int sectionNumber ) -{ - links[linkCnt].name = strdup( name ); - links[linkCnt].section = sectionNumber; - linkCnt++; -} - - -void getLinks( int sectionNumber, int * prev, int * next ) -{ - int cur, inx; - - *prev = -1; - *next = -1; - for ( cur = 0; cur < linkCnt; cur++ ) { - if ( links[cur].section == sectionNumber ) { - for (inx = cur-1; inx >= 0; inx-- ) { - if ( strcmp( links[cur].name, links[inx].name ) == 0 ) { - *prev = links[inx].section; - break; - } - } - for (inx = cur+1; inx < linkCnt; inx++ ) { - if ( strcmp( links[cur].name, links[inx].name ) == 0 ) { - *next = links[inx].section; - break; - } - } - } - } - -} - - -struct { - char * name; - int sectionNumber; - int subSection; - } sections[500]; -int sectionCnt = 0; -int lastSection = 0; -int curSection = 0; -int subSection = 0; - - -void defineSection( char * name, int sectionNumber ) -{ - if (!name) { - fprintf( stderr, "%d: NULL context string\n", lineNum ); - return; - } - sections[sectionCnt].name = strdup( name ); - sections[sectionCnt].sectionNumber = sectionNumber; - if (lastSection != sectionNumber) { - subSection = 0; - } - sections[sectionCnt].subSection = subSection++; - sectionCnt++; -} - - -int lookupSection( char * name, int *subSection ) -{ - int inx; - if (!name) { - return -1; - } - for (inx=0; inx


" ); - fprintf( ofile, "Return to Contents", - htmlName ); - comma = 1; - } - getLinks( sectionNumber, &prev, &next ); - if (prev > 0) { - if (comma) - fprintf( ofile, ", " ); - else - if (!begin) fprintf( ofile, "\n


" ); - fprintf( ofile, "Previous Page", - htmlName, prev ); - comma = 1; - } - if (next > 0) { - if (comma) - fprintf( ofile, ", " ); - else - if (!begin) fprintf( ofile, "\n


" ); - fprintf( ofile, "Next Page", - htmlName, next ); - comma = 1; - } - if (comma) - if (begin) - fprintf( ofile, "


\n" ); - else - fprintf( ofile, "

\n" ); - } -} - -int preHtmlSectionNumber = -1; -void preHtmlSection( char section, char * title, char * context, char * picture, char * keywords, int newpage ) -{ - if ( !newpage ) - return; - preHtmlSectionNumber++; - defineSection( context, preHtmlSectionNumber ); -} -void preHtmlHeader( char * line ) -{ - if ( line[0] == '*' ) - return; - defineSection( line, preHtmlSectionNumber ); -} -void preHtmlThread( char * thread ) -{ - setLink( thread, preHtmlSectionNumber ); -} -dispatchTable preHtmlTable = { - (void*)no_op, - (void*)no_op, - (void*)no_op, - (void*)no_op, - (void*)no_op, - (void*)no_op, - (void*)no_op, - (void*)no_op, - (void*)no_op, - (void*)no_op, - preHtmlSection, - preHtmlHeader, - (void*)no_op, - (void*)no_op, - preHtmlThread, - (void*)no_op, - (void*)no_op, - (void*)no_op, - (void*)no_op - }; - -dispatchTable htmlTable; - -void htmlStart( char * inName, char * outName ) -{ - curMode = &preHtmlTable; - ifile = openFile( inName ); - process( ifile ); - fclose( ifile ); - curMode = &htmlTable; - - ifile = openFile( inName ); - htmlName = outName; - sprintf( htmlFileName, "%s.html", htmlName ); - ofile = fopen( htmlFileName, "w" ); - if (ofile == NULL) { - perror( outName ); - exit( 1 ); - } -} -void htmlFinish( void ) -{ - genHtmlLinks( curSection, 0 ); -} -void htmlNewParagraph( void ) -{ - if (wordwrap) { - if ( listLevel < 0 ) - fprintf( ofile, "

" ); - else - fprintf( ofile, "
" ); - } else { - fprintf( ofile, "\n" ); - } -} -void htmlStartLine( int lastBlank ) -{ - if (wordwrap) - fprintf( ofile, "\n" ); - else - fprintf( ofile, "\t" ); -} -void htmlBold( char * name ) -{ - fprintf( ofile, "%s", name ); -} -void htmlItalic( char * name ) -{ - fprintf( ofile, "%s", name ); -} -void htmlXref( char * name, char * ref1, char * ref2 ) -{ - int sectionNumber, subSection; - sectionNumber = lookupSection( ref1, &subSection ); - if (sectionNumber < 0) - return; - fprintf( ofile, "%s", name ); -} -void htmlPicture( char * name, int inLine ) -{ - fprintf( ofile, "", name ); - if (inLine) - fprintf( ofile, "\t" ); - else - fprintf( ofile, "

\n" ); -} -void htmlEndLine( void ) -{ - if ( !wordwrap ) - fprintf( ofile, "\n" ); -} -void htmlPutChar( char ch ) -{ - if ( ch == '<' ) - fprintf( ofile, "<" ); - else if ( ch == '>' ) - fprintf( ofile, ">" ); - else - fputc( ch, ofile ); -} -void htmlSection( char section, char * title, char * context, char * picture, char * keywords, int newpage ) -{ - int sectionNumber, subSection; - if ( newpage ) { - /*if (line[1] == 'A')*/ - sectionNumber = curSection; - curSection = lookupSection( context, &subSection ); - if (curSection > 0) { - genHtmlLinks( sectionNumber, 0 ); - if (ofile) - fclose( ofile ); - sprintf( htmlFileName, "%s-%d.html", htmlName, curSection ); - ofile = fopen( htmlFileName, "w" ); - if (ofile == NULL) { - perror( htmlFileName ); - exit(1); - } - } - fprintf( ofile, "%s\n", title ); - genHtmlLinks( curSection, 1 ); - } - if (picture && picture[0] != '\0') - fprintf( ofile, " ", picture ); - fprintf( ofile, "%s\n", - line[1]-'A'+1, title, line[1]-'A'+1 ); -} -void htmlHeader( char * line ) -{ - int sectionNumber, subSection; - if ( line[0] == '*' ) - return; - sectionNumber = lookupSection( line, &subSection ); - if (sectionNumber < 0) - return; - fprintf( ofile, "\n", sectionNumber ); -} -void htmlStartDisplay( void ) -{ - fprintf( ofile, "

\n

" );
-}
-void htmlEndDisplay( void )
-{
-	fprintf( ofile, "
\n" ); -} -void htmlListStart( void ) -{ - fprintf( ofile, "
    " ); -} -void htmlListItem( void ) -{ - fprintf( ofile, "
  • " ); -} -void htmlListEnd( void ) -{ - fprintf( ofile, "
\n" ); -} -dispatchTable htmlTable = { - htmlStart, - htmlFinish, - htmlNewParagraph, - htmlStartLine, - htmlBold, - htmlItalic, - htmlXref, - htmlPicture, - htmlEndLine, - htmlPutChar, - htmlSection, - htmlHeader, - htmlStartDisplay, - htmlEndDisplay, - (void*)no_op, - htmlListStart, - htmlListItem, - htmlListEnd, - (void*)no_op - }; - - -/****************************************************************************** - * - * DEFINES - * - *****************************************************************************/ -struct { - char * name; - int refCount; - int lineNum; - } defs[500]; -int defCnt = 0; - -void lookupDef( char * name, int def ) -{ - int inx; - if (!name) { - fprintf( stderr, "%d: NULL context string\n", lineNum ); - return; - } - for (inx=0;inx= 499) { - if (defCnt == 499) { - fprintf( stderr, "%d: too many defines\n", lineNum ); - defCnt++; - } - return; - } else { - defs[defCnt].name = strdup( name ); - defs[defCnt].lineNum = (def?lineNum:-1); - defs[defCnt].refCount = 0; - defCnt++; - } -} - -void defsFinish( void ) -{ - int inx; - for ( inx=0; inx 0 && line[len-1] == '\n') - line[--len] = '\0'; - if (len > 0 && line[len-1] == '\r') - line[--len] = '\0'; - if (len <= 0) { - if (lastlineblank) - return; - curMode->newParagraph(); - lastlineblank = 1; - return; - } else { - curMode->startLine( lastlineblank ); - lastlineblank = 0; - } - -#ifndef LATER - if (wordwrap) { - if (line[len-1] != ' ') { - line[len++] = ' '; - if (line[len-2] == '.') - line[len++] = ' '; - } - line[len] = '\0'; - } -#endif - - for ( cp=line; *cp; cp++ ) { - if (*cp == '$') { - cp++; - switch (*cp) { - case '?': - case '$': - curMode->putChar( *cp ); - break; - case '{': - curMode->putChar( '$' ); - curMode->putChar( '{' ); - break; - case 'B': - name = ++cp; - cp = skipChars( cp ); - if (*cp=='\0') - break; - *cp = '\0'; - curMode->doBold( name ); - break; - case 'I': - name = ++cp; - cp = skipChars( cp ); - if (*cp=='\0') - break; - *cp = '\0'; - curMode->doItalic( name ); - break; - case 'X': - name = ++cp; - while (*cp && *cp != '|') cp++; - if (*cp=='\0') - break; - *cp++ = '\0'; - mswhelpref = cp; - while (*cp && *cp != '|' && *cp != '$') cp++; - if (*cp=='\0') - break; - if (*cp == '|') { - *cp++ = '\0'; - xvref = cp; - while (*cp && *cp != '$') cp++; - if (*cp=='\0') - break; - for (cq=xvref; cqdoXref( name, mswhelpref, xvref ); - break; - case 'G': - name = ++cp; - while (*cp && *cp != '$') cp++; - if (*cp=='\0') - break; - *cp = '\0'; - curMode->doPicture( name, 1 ); - break; - default: - fprintf( stderr, "%d Invalid $ command - %c\n", lineNum, *cp ); - break; - } - } else { - if (*cp != '\014') - curMode->putChar( *cp ); - } - } - curMode->endLine(); -} - - -char * conds[100]; -char **condPtr = conds; - -void addCond( char * name ) -{ - *condPtr++ = name; -} -int lookupCond( char * name ) -{ - char ** p; - int ret = 1; - if (strlen(name) == 0) - return 1; - if (*name == '!') { - ret = 0; - name++; - } - for (p=conds; pdoSection( line[1], title, context, fileName, keywords, sectionNewPage ); - lastlineblank = 0; - break; - case 'H': - curMode->doHeader( line+2 ); - break; - case 'W': - if (line[2] == '+') { - curMode->doEndDisplay(); - wordwrap = 1; - } else if (line[2] == '-') { - curMode->doStartDisplay(); - wordwrap = 0; - } else { - fprintf( stderr, "%d: Bad ?W command\n", lineNum); - exit(1); - } - lastlineblank = 0; - break; - case 'G': - curMode->doPicture( line+2, 0 ); - lastlineblank = 0; - break; - case 'T': - curMode->doThread( line+2 ); - break; - case 'L': - switch (line[2]) { - case 'S': - listLevel++; - listCount[listLevel] = 0; - switch (line[3]) { - case 'o': - listType[listLevel] = LISTBULLET; - break; - case '-': - listType[listLevel] = LISTDASH; - break; - case '1': - listType[listLevel] = LISTNUMBER; - break; - default: - listType[listLevel] = LISTNONE; - } - curMode->doListStart(); - break; - case 'I': - if (listLevel<0) { - fprintf( stderr, "%d: ?LI not in list\n", lineNum ); - break; - } - listCount[listLevel]++; - curMode->doListItem(); - break; - case 'E': - listLevel--; - curMode->doListEnd(); - break; - } - lastlineblank = 0; - break; - case 'P': - curMode->page(); - lastlineblank = 0; - break; - case 'Q': - noSectionNewPage = 1; - break; - default: - fprintf( stderr, "%d: Invalid ? command: %c\n", lineNum, line[1] ); - } - } - lineNum = lineNum0; -} - - -/****************************************************************************** - * - * MAIN - * - *****************************************************************************/ - -int main ( int argc, char * argv[] ) -{ - int inx; - - curMode = NULL; - argv++; argc--; - while ( argc > 1 && argv[0][0] == '-' ) { - if ( strcmp( argv[0], "-xv" ) == 0 ) { - curMode = &xviewTable; - addCond( "xv" ); - } else if ( strcmp( argv[0], "-mswhelp" ) == 0 ) { - curMode = &mswhelpTable; - addCond( "mswhelp" ); - } else if ( strcmp( argv[0], "-mswword" ) == 0 ) { - curMode = &mswwordTable; - addCond( "mswword" ); - } else if ( strcmp( argv[0], "-html" ) == 0 ) { - curMode = &htmlTable; - addCond( "html" ); - } else if ( strcmp( argv[0], "-def" ) == 0 ) { - curMode = &defsTable; - addCond( "def" ); - } else if ( strcmp( argv[0], "-text" ) == 0 ) { - curMode = &textTable; - addCond( "text" ); - } else if ( strncmp( argv[0], "-C", 2 ) == 0 ) { - argv++; argc--; - addCond( argv[0] ); - } else if ( strncmp( argv[0], "-v", 2 ) == 0 ) { - verbose = 1; - } else if ( strncmp( argv[0], "-d", 2 ) == 0 ) { - argv++; argc--; - *dirList++ = argv[0]; - } else if ( strncmp( argv[0], "-width", 2 ) == 0 ) { - argv++; argc--; - listWidth = lineWidth = atoi(argv[0]); - if (lineWidth < 10) { - fprintf( stderr, "Invalid linewidth %s\n", argv[0] ); - exit(1); - } - } else if ( strncmp( argv[0], "-mt", 3 ) == 0 ) { - argv++; argc--; - MarginTop = atof( *argv ); - } else if ( strncmp( argv[0], "-mb", 3 ) == 0 ) { - argv++; argc--; - MarginBottom = atof( *argv ); - } else if ( strncmp( argv[0], "-mr", 3 ) == 0 ) { - argv++; argc--; - MarginRight = atof( *argv ); - } else if ( strncmp( argv[0], "-ml", 3 ) == 0 ) { - argv++; argc--; - MarginLeft = atof( *argv ); - } else if ( strncmp( argv[0], "-mg", 3 ) == 0 ) { - argv++; argc--; - MarginGutter = atof( *argv ); - } else if ( strncmp( argv[0], "-toc", 4 ) == 0 ) { - toc++; - } else { - fprintf( stderr, "unrecognized option: %s\n", argv[0] ); - exit( 1 ); - } - argv++;argc--; - } - - if (curMode == NULL) { - fprintf( stderr, "Must spec either -mswhelp or -xv\n" ); - exit(1); - } - if ( argc != 2 ) { - fprintf( stderr, "Usage: prochelp [-mswhelp|-xv] \n" ); - exit( 1 ); - } - - curMode->start( argv[0], argv[1] ); - process( ifile ); - fclose( ifile ); - curMode->finish(); - - exit(0); -} diff --git a/app/help/readpng.c b/app/help/readpng.c deleted file mode 100644 index 1f1d145..0000000 --- a/app/help/readpng.c +++ /dev/null @@ -1,275 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program readpng.c - - --------------------------------------------------------------------------- - - Copyright (c) 1998-1999 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - -#include -#include - -#include "png.h" /* libpng header; includes zlib.h */ -#include "readpng.h" /* typedefs, common macros, public prototypes */ - - -static png_structp png_ptr = NULL; -static png_infop info_ptr = NULL; - -png_uint_32 width, height; -int bit_depth, color_type; -uch *image_data = NULL; - - -void readpng_version_info() -{ - fprintf(stderr, " Compiled with libpng %s; using libpng %s.\n", - PNG_LIBPNG_VER_STRING, png_libpng_ver); - fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", - ZLIB_VERSION, zlib_version); -} - - -/* return value = 0 for success, 1 for bad sig, 2 for bad IHDR, 4 for no mem */ - -int readpng_init(FILE *infile, long *pWidth, long *pHeight) -{ - uch sig[8]; - - - /* first do a quick check that the file really is a PNG image; could - * have used slightly more general png_sig_cmp() function instead */ - - fread(sig, 1, 8, infile); - if (!png_check_sig(sig, 8)) - return 1; /* bad signature */ - - - /* could pass pointers to user-defined error handlers instead of NULLs: */ - - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - if (!png_ptr) - return 4; /* out of memory */ - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) { - png_destroy_read_struct(&png_ptr, NULL, NULL); - return 4; /* out of memory */ - } - - - /* we could create a second info struct here (end_info), but it's only - * useful if we want to keep pre- and post-IDAT chunk info separated - * (mainly for PNG-aware image editors and converters) */ - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(png_ptr->jmpbuf)) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return 2; - } - - - png_init_io(png_ptr, infile); - png_set_sig_bytes(png_ptr, 8); /* we already read the 8 signature bytes */ - - png_read_info(png_ptr, info_ptr); /* read all PNG info up to image data */ - - - /* alternatively, could make separate calls to png_get_image_width(), - * etc., but want bit_depth and color_type for later [don't care about - * compression_type and filter_type => NULLs] */ - - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - NULL, NULL, NULL); - *pWidth = width; - *pHeight = height; - - - /* OK, that's all we need for now; return happy */ - - return 0; -} - - - - -/* returns 0 if succeeds, 1 if fails due to no bKGD chunk, 2 if libpng error; - * scales values to 8-bit if necessary */ - -int readpng_get_bgcolor(uch *red, uch *green, uch *blue) -{ - png_color_16p pBackground; - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(png_ptr->jmpbuf)) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return 2; - } - - - if (!png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) - return 1; - - /* it is not obvious from the libpng documentation, but this function - * takes a pointer to a pointer, and it always returns valid red, green - * and blue values, regardless of color_type: */ - - png_get_bKGD(png_ptr, info_ptr, &pBackground); - - - /* however, it always returns the raw bKGD data, regardless of any - * bit-depth transformations, so check depth and adjust if necessary */ - - if (bit_depth == 16) { - *red = pBackground->red >> 8; - *green = pBackground->green >> 8; - *blue = pBackground->blue >> 8; - } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { - if (bit_depth == 1) - *red = *green = *blue = pBackground->gray? 255 : 0; - else if (bit_depth == 2) - *red = *green = *blue = (255/3) * pBackground->gray; - else /* bit_depth == 4 */ - *red = *green = *blue = (255/15) * pBackground->gray; - } else { - *red = (uch)pBackground->red; - *green = (uch)pBackground->green; - *blue = (uch)pBackground->blue; - } - - return 0; -} - - - - -/* display_exponent == LUT_exponent * CRT_exponent */ - -uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes) -{ - double gamma; - png_uint_32 i, rowbytes; - png_bytepp row_pointers = NULL; - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(png_ptr->jmpbuf)) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - - - /* expand palette images to RGB, low-bit-depth grayscale images to 8 bits, - * transparency chunks to full alpha channel; strip 16-bit-per-sample - * images to 8 bits per sample; and convert grayscale to RGB[A] */ - - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_expand(png_ptr); - if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_expand(png_ptr); - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) - png_set_expand(png_ptr); - if (bit_depth == 16) - png_set_strip_16(png_ptr); - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - - - /* unlike the example in the libpng documentation, we have *no* idea where - * this file may have come from--so if it doesn't have a file gamma, don't - * do any correction ("do no harm") */ - - if (png_get_gAMA(png_ptr, info_ptr, &gamma)) - png_set_gamma(png_ptr, display_exponent, gamma); - - - /* all transformations have been registered; now update info_ptr data, - * get rowbytes and channels, and allocate image memory */ - - png_read_update_info(png_ptr, info_ptr); - - *pRowbytes = rowbytes = png_get_rowbytes(png_ptr, info_ptr); - *pChannels = (int)png_get_channels(png_ptr, info_ptr); - - if ((image_data = (uch *)malloc(rowbytes*height)) == NULL) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - if ((row_pointers = (png_bytepp)malloc(height*sizeof(png_bytep))) == NULL) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - free(image_data); - image_data = NULL; - return NULL; - } - - Trace((stderr, "readpng_get_image: rowbytes = %ld, height = %ld\n", rowbytes, height)); - - - /* set the individual row_pointers to point at the correct offsets */ - - for (i = 0; i < height; ++i) - row_pointers[height-1-i] = image_data + i*rowbytes; - - - /* now we can go ahead and just read the whole image */ - - png_read_image(png_ptr, row_pointers); - - - /* and we're done! (png_read_end() can be omitted if no processing of - * post-IDAT text/time/etc. is desired) */ - - free(row_pointers); - row_pointers = NULL; - - png_read_end(png_ptr, NULL); - - return image_data; -} - - -void readpng_cleanup(int free_image_data) -{ - if (free_image_data && image_data) { - free(image_data); - image_data = NULL; - } - - if (png_ptr && info_ptr) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - png_ptr = NULL; - info_ptr = NULL; - } -} diff --git a/app/help/readpng.h b/app/help/readpng.h deleted file mode 100644 index 31780c5..0000000 --- a/app/help/readpng.h +++ /dev/null @@ -1,64 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program readpng.h - - --------------------------------------------------------------------------- - - Copyright (c) 1998-1999 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - -#ifndef TRUE -# define TRUE 1 -# define FALSE 0 -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b)? (a) : (b)) -# define MIN(a,b) ((a) < (b)? (a) : (b)) -#endif - -#ifdef DEBUG -# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} -#else -# define Trace(x) ; -#endif - -typedef unsigned char uch; -typedef unsigned short ush; -typedef unsigned long ulg; - - -/* prototypes for public functions in readpng.c */ - -void readpng_version_info(void); - -int readpng_init(FILE *infile, long *pWidth, long *pHeight); - -int readpng_get_bgcolor(uch *bg_red, uch *bg_green, uch *bg_blue); - -uch *readpng_get_image(double display_exponent, int *pChannels, - ulg *pRowbytes); - -void readpng_cleanup(int free_image_data); diff --git a/app/help/xtrkcad.info b/app/help/xtrkcad.info index 955bab7..6350f82 100644 --- a/app/help/xtrkcad.info +++ b/app/help/xtrkcad.info @@ -54,6 +54,8 @@ Set Curve Track creation mode :cmdCurveTangent Create curved track from tangent :cmdCustmgm +Create Bezier Track +:cmdBezCurve Manipulate Custom designer entries :cmdCut Moves selected objects to clipboard @@ -62,7 +64,7 @@ Delete objects :cmdDemo Playback demos :cmdDescribe -Describe objects +Properties :cmdDeselectAll Deselect all selected objects :cmdDisplay @@ -137,6 +139,8 @@ Adjust snap grid Enable snap grid :cmdGridShow Show snap grid +:cmdMapShow +Show/Hide Map Window :cmdGroup Create a structure from a Group of objects :cmdHandLaidTurnout @@ -483,6 +487,8 @@ Label elements on layout Color tracks or other objects by layer :display-tworailscale Drawing scale when to draw tracks with 2 rails +:display-zoom-corner +Zoom to keep lower corner in view or not :display-tiedraw How to draw track ties :display-mingridspacing @@ -648,7 +654,7 @@ Choose english (inches) or metric (centimeters) :pref-dstfmt How to display length measurements :pref-anglesystem -0° is up or to the right +0� is up or to the right :pref-minlength Do not create tracks to be shorter than this value :pref-connectdistance diff --git a/app/help/xtrkcad.tip b/app/help/xtrkcad.tip index 5887dba..8deffc6 100644 --- a/app/help/xtrkcad.tip +++ b/app/help/xtrkcad.tip @@ -31,6 +31,9 @@ Then drag on one of the Red arrows to create the final shape of the curve.\ \ You can click on the small button to the left of the Curve command button to change the method. +When creating a straight or a curved track by dragging from the 1st End Point, you can snap the new track to an existing open end point by holding down Shift while you click.\ +The new track will be joined to the old when you create it. + Track Circles provide a quick way to see what arrangement of tracks will fit in your layout spaces. Create Circles with your typical radius and place them in corners and other locations where your main-line will make changes of direction. This will give you an overall idea of how your layout will look.\ \ You can create Circles by:\ diff --git a/app/help/xvfontsel.hlpsrc b/app/help/xvfontsel.hlpsrc deleted file mode 100644 index 7abab84..0000000 --- a/app/help/xvfontsel.hlpsrc +++ /dev/null @@ -1,25 +0,0 @@ -The 'Font Select' window lets you choose the font used by your application. The window contains: - -?HfontSelList -A list of available fonts. - -?HfontSelWeight -A Radio button to choose 'Medium' or 'Bold' weight. - -?HfontSelSlant -A Radio button to choose 'Regular' or 'Italic' slant. - -?HfontSelOk -Ok button updates the current font and closes the 'Font Select' window. - -?HfontSelCancel -Cancel button closes the window without updating the current font. - -?HfontSelSample -A canvas which show a sample of the font. - -Fonts which do not support the specified weight or slant cannot be selected. - -?HfontSelLoading -Note: loading a font can take a noticeable amount of time, especially if you do not have a FPU. - diff --git a/app/help/xvprintsel.hlpsrc b/app/help/xvprintsel.hlpsrc deleted file mode 100644 index a999c67..0000000 --- a/app/help/xvprintsel.hlpsrc +++ /dev/null @@ -1,73 +0,0 @@ -The $BPrinter Setup$ dialog allows you configure the application's use of the printer. - -The $BPrinter Setup$ window contains: - -?LSo -?HprintSetupPrinter -?LI -$BPrinter$ - a list to select a particular printer. The entries on this list are defined by $Bprinter$ lines in the $B~/.xtrkcad/xtrkcad.rc$ file. -The first entry, 'File', causes printouts to be sent to a file. You will be prompted for a file name when doing a print. - -?HprintSetupPaper -?LI -$BPaper Size$ - a list of various North American and European paper sizes. - -?HprintSetupMargin -?LI -$BMargins$ - non-printable margins for particular printers. -You can adjust these entries or select a printer type from the list. -To add margins for a new printer, enter the printer's name and then enter the margin for each edge. -You can use $BPrint Test Page$ to determine the margins for your printer. -The $BDelete$ button removes a printer from the margin list. - -?HprintSetupFormat -?LI -$BFormat$ - a Radio button to select either Landscape or Portrait format. - -?HFont Alias Map -?LI -$BX Font$ and $BPS Font$ - specifies the mapping between the display's X Font and the corresponding PostScript Font. -You can change the PostScript font for a specifed X Font by typing the new font name in the $BPS Font$ field. -The $Bfont alias$ map will be printed on the $BPrint Test Page$. - -?HprintSetupFontSizeFactor -?LI -$BFactor$ - adjusts the scaling between X Font and PostScript Font sizes. Due to differences between the two font systems, text size may be of slightly different between the display and printer. This option allows you to adjust the font size. Normally only a small adjustment is required, (like 0.950). - -?HprintSetupOk -?LI -$BOk button$ - updates the data and ends the dialog. - -?HprintSetupCancel -?LI -$BCancel button$ - ends the dialog without update. - -?HprintSetupTest -?LI -$BPrint Test Page button$ - prints a test page you can use to determine the printer margins. -?LE - -The formats of the $Bprinter$ entries are: -?W- -$BWPRINTER.$$Iprinter-num$$B: $$Iprinter-name$$B=$$Icommand$ -?W+ -where: -?LS- -?LI -$Iprinter-num$ is the next value in a sequential list (starting at $B1$, $B0$ is reserved for $BFILE$). $Bprinter.1$ is predefined as $Blp=lpr -P%s$. -?LI -$Iprinter-name$ is the name of the printer as it appears in the $BPrinter$ selection list. -?LI -$Icommand$ is the command to invoke where $B%s$ will be replaced by the $Iprinter-name$. -?LE - -To add a new $BPrinter$, select the next value for $Iprinter-num$ and add the $Bprinter$ line with the name and print command. - -?HprintFontAlias -Printing generates PostScript data which is sent to the specified printer (or File). -The names of fonts differs between the X Window System and PostScript and there is no formula to convert them. -The printing system uses a $Bfont alias$ map to convert from X font names to PostScript font names. -Font aliases for the common PostScript fonts are predefined but you must supply an alias for unknown fonts. -The 'Font Alias' window will be shown when ever you are printing an unknown font. -You will be asked to supply a PostScript font name for a X font. -You can change the $Bfont alias$ mapping by using the $BX Font$ and $BPS Font$ entries on the $BPrinter Setup$ dialog. diff --git a/app/i18n/ChangeLog b/app/i18n/ChangeLog deleted file mode 100644 index 8ca1f9a..0000000 --- a/app/i18n/ChangeLog +++ /dev/null @@ -1,22 +0,0 @@ -Oct 14, 2009 - ENH: Daniel Spagnol - pt_BR.po CMakeLists.txt: partially completed Brazilian Portuguese - translation (57%) - CMakeLists.txt: text context support added - FIX: Daniel Spagnol - CMakeLists.txt: macosx ".po" file creation failed - -May 8, 2009 - ENH: Martin Fischer - de_DE.pot CMakeLists.txt: partially completed German translation - -Jan 22, 2008 - ENH: Mikko Nissinen - stripmsg.c: New utility to strip translatable strings from - various XTrkCad file formats into C-style strings for xgettext. - CMakeLists.txt: Added gettext support for demos and tips. - -Jan 21, 2008 - FIX: Mikko Nissinen - CMakeLists.txt: xgettext parameter order fixed. Only 'N_' keyword - was used and '_' was ignored. diff --git a/app/i18n/de_DE.po b/app/i18n/de_DE.po index 7f03e3a..0347f93 100644 --- a/app/i18n/de_DE.po +++ b/app/i18n/de_DE.po @@ -1,12154 +1,13237 @@ -msgid "" -msgstr "" -"Project-Id-Version: xtrkcad 4.1.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-06 12:30+0100\n" -"PO-Revision-Date: 2016-08-25 10:38+0200\n" -"Last-Translator: \n" -"Language-Team: German \n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.4\n" - -#: ../bin/cblock.c:98 ../bin/cblock.c:133 ../bin/compound.c:520 -#: ../bin/cswitchmotor.c:78 ../bin/cswitchmotor.c:138 ../bin/dlayer.c:319 -msgid "Name" -msgstr "Name" - -#: ../bin/cblock.c:99 ../bin/cblock.c:134 -msgid "Script" -msgstr "Befehlsskript" - -#: ../bin/cblock.c:135 ../bin/cdraw.c:194 ../bin/ctodesgn.c:129 -#: ../bin/ctodesgn.c:130 ../bin/ctodesgn.c:131 ../bin/ctodesgn.c:180 -#: ../bin/ctodesgn.c:183 ../bin/ctodesgn.c:203 ../bin/ctodesgn.c:208 -#: ../bin/ctodesgn.c:241 ../bin/ctodesgn.c:246 ../bin/ctodesgn.c:278 -#: ../bin/ctodesgn.c:281 ../bin/ctodesgn.c:284 ../bin/ctodesgn.c:319 -#: ../bin/ctodesgn.c:321 ../bin/ctodesgn.c:339 ../bin/ctodesgn.c:341 -#: ../bin/ctodesgn.c:360 ../bin/ctodesgn.c:362 ../bin/ctodesgn.c:381 -#: ../bin/ctodesgn.c:401 ../bin/ctodesgn.c:421 ../bin/ctodesgn.c:441 -#: ../bin/ctodesgn.c:479 ../bin/ctodesgn.c:498 ../bin/ctodesgn.c:499 -#: ../bin/ctrain.c:171 ../bin/tcurve.c:350 ../bin/tstraigh.c:81 -msgid "Length" -msgstr "Länge" - -#: ../bin/cblock.c:136 ../bin/cdraw.c:190 ../bin/compound.c:512 -#: ../bin/tcurve.c:342 ../bin/tease.c:498 ../bin/tstraigh.c:77 -msgid "End Pt 1: X" -msgstr "Endpunkt 1: X" - -#: ../bin/cblock.c:137 ../bin/cdraw.c:191 ../bin/compound.c:514 -#: ../bin/tcurve.c:344 ../bin/tease.c:500 ../bin/tstraigh.c:79 -msgid "End Pt 2: X" -msgstr "Endpunkt 2: X" - -#: ../bin/cblock.c:162 -msgid "Change Block" -msgstr "Gleisabschnitt ändern" - -#: ../bin/cblock.c:207 ../bin/compound.c:689 ../bin/cswitchmotor.c:220 -#, c-format -msgid "(%d): Layer=%d %s" -msgstr "(%d): Ebene=%d %s" - -#: ../bin/cblock.c:227 ../bin/cblock.c:641 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:20 -msgid "Block" -msgstr "Block" - -#: ../bin/cblock.c:442 ../bin/cblock.c:461 ../bin/cblock.c:469 -#: ../bin/cblock.c:525 ../bin/cdraw.c:78 ../bin/cdraw.c:870 ../bin/cgroup.c:962 -#: ../bin/cgroup.c:1009 ../bin/cgroup.c:1024 ../bin/cgroup.c:1063 -#: ../bin/cgroup.c:1089 ../bin/cgroup.c:1148 ../bin/cgroup.c:1592 -#: ../bin/cnote.c:96 ../bin/cprint.c:520 ../bin/cprint.c:945 ../bin/cpull.c:499 -#: ../bin/cpull.c:514 ../bin/cpull.c:516 ../bin/cpull.c:518 -#: ../bin/cselect.c:670 ../bin/cselect.c:767 ../bin/cselect.c:1243 -#: ../bin/csnap.c:578 ../bin/csnap.c:711 ../bin/cstruct.c:763 -#: ../bin/cstruct.c:772 ../bin/cstruct.c:874 ../bin/cswitchmotor.c:355 -#: ../bin/cswitchmotor.c:381 ../bin/ctext.c:163 ../bin/ctodesgn.c:150 -#: ../bin/ctodesgn.c:1040 ../bin/ctodesgn.c:1090 ../bin/ctodesgn.c:1203 -#: ../bin/ctodesgn.c:1505 ../bin/ctrain.c:2561 ../bin/cturnout.c:2381 -#: ../bin/cturnout.c:2508 ../bin/cundo.c:152 ../bin/cundo.c:156 -#: ../bin/dbitmap.c:65 ../bin/dbitmap.c:122 ../bin/dbitmap.c:200 -#: ../bin/dbitmap.c:235 ../bin/dcar.c:3528 ../bin/dcar.c:3712 -#: ../bin/dcar.c:3716 ../bin/dcar.c:3720 ../bin/dcar.c:3725 ../bin/dcar.c:4039 -#: ../bin/dcar.c:4150 ../bin/dcar.c:4528 ../bin/dcmpnd.c:387 -#: ../bin/dcmpnd.c:398 ../bin/dcmpnd.c:530 ../bin/dcustmgm.c:186 -#: ../bin/dcustmgm.c:192 ../bin/dcustmgm.c:201 ../bin/dcustmgm.c:217 -#: ../bin/dease.c:220 ../bin/dlayer.c:200 ../bin/dlayer.c:217 -#: ../bin/dlayer.c:657 ../bin/dlayer.c:662 ../bin/doption.c:155 -#: ../bin/doption.c:274 ../bin/doption.c:354 ../bin/doption.c:505 -#: ../bin/doption.c:517 ../bin/doption.c:583 ../bin/dprmfile.c:91 -#: ../bin/dprmfile.c:105 ../bin/dprmfile.c:118 ../bin/dprmfile.c:160 -#: ../bin/dprmfile.c:438 ../bin/draw.c:2234 ../bin/fileio.c:609 -#: ../bin/fileio.c:678 ../bin/fileio.c:789 ../bin/fileio.c:791 -#: ../bin/fileio.c:796 ../bin/fileio.c:958 ../bin/macro.c:934 -#: ../bin/macro.c:938 ../bin/macro.c:1015 ../bin/macro.c:1121 -#: ../bin/macro.c:1349 ../bin/macro.c:1365 ../bin/misc2.c:411 -#: ../bin/param.c:1820 ../bin/param.c:1944 ../bin/param.c:1947 -#: ../bin/param.c:2069 ../bin/param.c:2075 ../bin/smalldlg.c:91 -#: ../bin/smalldlg.c:221 ../bin/tease.c:1039 ../bin/track.c:1311 -#: ../bin/misc.c:304 ../bin/misc.c:354 ../bin/misc.c:1712 ../bin/misc.c:1846 -#: ../bin/misc.c:1910 ../bin/misc.c:2476 ../bin/misc.c:2486 ../bin/misc.c:2506 -#: ../bin/misc.c:2509 ../wlib/gtklib/wpref.c:126 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:523 -msgid "Ok" -msgstr "Ok" - -#: ../bin/cblock.c:469 -msgid "Block is discontigious!" -msgstr "Der Block ist nicht zusammenhängend!" - -#: ../bin/cblock.c:474 ../bin/cblock.c:525 ../bin/cblock.c:642 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:17 -msgid "Create Block" -msgstr "Gleisabschnitt erstellen" - -#: ../bin/cblock.c:507 -msgid "Non track object skipped!" -msgstr "Objekt ist kein Gleis, übersprungen!" - -#: ../bin/cblock.c:511 -msgid "Selected Track is already in a block, skipped!" -msgstr "Ãœbersprungen, da das ausgewählte Gleis bereits in einem Block ist. " - -#: ../bin/cblock.c:554 ../bin/cblock.c:586 -msgid "Select a track" -msgstr "Gleis auswählen" - -#: ../bin/cblock.c:563 ../bin/cblock.c:594 -msgid "Not a block!" -msgstr "Kein Block!" - -#: ../bin/cblock.c:599 -#, c-format -msgid "Really delete block %s?" -msgstr "Soll der Block %s wirklich gelöscht werden?" - -#: ../bin/cblock.c:599 ../bin/cdraw.c:82 ../bin/cgroup.c:968 -#: ../bin/cswitchmotor.c:470 ../bin/ctodesgn.c:1513 ../bin/ctodesgn.c:1992 -#: ../bin/ctrain.c:2056 ../bin/dbitmap.c:205 ../bin/dcar.c:3664 -#: ../bin/dcar.c:3742 ../bin/dcar.c:3826 ../bin/dcar.c:3845 ../bin/dcar.c:4175 -#: ../bin/dcar.c:4590 ../bin/dcustmgm.c:136 ../bin/track.c:1313 -#: ../bin/track.c:1410 ../bin/track.c:1424 ../bin/misc.c:1053 -#: ../bin/misc.c:1058 ../bin/misc.c:1123 -msgid "Yes" -msgstr "Ja" - -#: ../bin/cblock.c:599 ../bin/cdraw.c:82 ../bin/cgroup.c:968 -#: ../bin/cswitchmotor.c:470 ../bin/ctodesgn.c:1513 ../bin/ctodesgn.c:1992 -#: ../bin/ctrain.c:2056 ../bin/dcar.c:3664 ../bin/dcar.c:3742 -#: ../bin/dcar.c:3826 ../bin/dcar.c:3845 ../bin/dcar.c:4175 ../bin/dcar.c:4590 -#: ../bin/dcustmgm.c:136 ../bin/track.c:1313 ../bin/track.c:1410 -#: ../bin/track.c:1424 ../bin/misc.c:1053 ../bin/misc.c:1058 ../bin/misc.c:1123 -msgid "No" -msgstr "Nein" - -#: ../bin/cblock.c:600 ../bin/cblock.c:644 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:18 -msgid "Delete Block" -msgstr "Gleisabschnitt löschen" - -#: ../bin/cblock.c:641 -msgid "Blocks" -msgstr "Gleisabschnitte" - -#: ../bin/cblock.c:643 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:19 -msgid "Edit Block" -msgstr "Gleisabschnitt bearbeiten" - -#: ../bin/ccurve.c:102 -msgid "Drag from End-Point in direction of curve" -msgstr "Vom Endpunkt in Richtung der Kurve ziehen" - -#: ../bin/ccurve.c:105 ../bin/ccurve.c:138 -msgid "Drag from End-Point to Center" -msgstr "Vom Endpunkt zum Mittelpunkt ziehen" - -#: ../bin/ccurve.c:108 ../bin/ccurve.c:138 -msgid "Drag from Center to End-Point" -msgstr "Vom Mittelpunkt zum Endpunkt ziehen" - -#: ../bin/ccurve.c:111 ../bin/ccurve.c:144 -msgid "Drag to other end of chord" -msgstr "Zum anderen Ende der Sehne ziehen" - -#: ../bin/ccurve.c:128 ../bin/chndldto.c:91 -msgid "Drag to set angle" -msgstr "Durch Ziehen den Winkel festlegen" - -#: ../bin/ccurve.c:156 -#, c-format -msgid "Angle=%0.3f" -msgstr "Winkel=%0.3f" - -#: ../bin/ccurve.c:160 ../bin/ccurve.c:166 -#, c-format -msgid "Radius=%s Angle=%0.3f" -msgstr "Radius=%s Winkel=%0.3f" - -#: ../bin/ccurve.c:172 -#, c-format -msgid "Length=%s Angle=%0.3f" -msgstr "Länge=%s Winkel=%0.3f" - -#: ../bin/ccurve.c:202 ../bin/ccurve.c:303 ../bin/drawgeom.c:374 -msgid "Drag on Red arrows to adjust curve" -msgstr "An den roten Pfeilen ziehen, um die Kurve anzupassen" - -#: ../bin/ccurve.c:259 ../bin/cjoin.c:208 ../bin/cmodify.c:259 -#: ../bin/cturntbl.c:564 -#, c-format -msgid "Straight Track: Length=%s Angle=%0.3f" -msgstr "Gleisgerade: Länge=%s Winkel=%0.3f" - -#: ../bin/ccurve.c:264 ../bin/cmodify.c:264 ../bin/drawgeom.c:297 -#: ../wlib/gtklib/gtkhelp.c:519 -msgid "Back" -msgstr "Zurück" - -#: ../bin/ccurve.c:282 -#, c-format -msgid "Curved Track: Radius=%s Angle=%0.3f Length=%s" -msgstr "Gleisbogen: Radius=%s Winkel=%0.3f Länge=%s" - -#: ../bin/ccurve.c:314 ../bin/cstraigh.c:83 -msgid "Create Straight Track" -msgstr "Erstelle gerades Gleis" - -#: ../bin/ccurve.c:322 -msgid "Create Curved Track" -msgstr "Erstelle Gleisbogen" - -#: ../bin/ccurve.c:388 -msgid "Elevation Difference" -msgstr "Höhenunterschied" - -#: ../bin/ccurve.c:389 ../bin/cdraw.c:193 ../bin/ctodesgn.c:459 -#: ../bin/tcurve.c:347 -msgid "Radius" -msgstr "Radius" - -#: ../bin/ccurve.c:390 ../bin/tcurve.c:348 -msgid "Turns" -msgstr "Windungen" - -#: ../bin/ccurve.c:391 -msgid "Angular Separation" -msgstr "Winkelabstand" - -#: ../bin/ccurve.c:392 ../bin/celev.c:45 ../bin/compound.c:516 -#: ../bin/tcurve.c:354 ../bin/tease.c:508 ../bin/tstraigh.c:83 -msgid "Grade" -msgstr "Steigung" - -#: ../bin/ccurve.c:393 -msgid "Vertical Separation" -msgstr "Vertikaler Abstand" - -#: ../bin/ccurve.c:395 -msgid "Total Length" -msgstr "Gesamtlänge" - -#: ../bin/ccurve.c:471 -#, c-format -msgid "Total Length %s" -msgstr "Gesamtlänge %s" - -#: ../bin/ccurve.c:510 ../bin/ccurve.c:731 ../bin/tcurve.c:777 -msgid "Helix" -msgstr "Gleiswendel" - -#: ../bin/ccurve.c:524 -msgid "Circle Radius" -msgstr "Kreisradius" - -#: ../bin/ccurve.c:529 -msgid "Click on Circle Edge" -msgstr "Auf den Rand des Kreis klicken" - -#: ../bin/ccurve.c:533 -msgid "Click on Circle Center" -msgstr "Auf den Mittelpunkt des Kreises klicken" - -#: ../bin/ccurve.c:564 -msgid "Drag to Center" -msgstr "Zum Mittelpunkt ziehen" - -#: ../bin/ccurve.c:568 -msgid "Drag to Edge" -msgstr "Zum Rand ziehen" - -#: ../bin/ccurve.c:589 ../bin/ccurve.c:593 -#, c-format -msgid "Radius=%s" -msgstr "Radius=%s" - -#: ../bin/ccurve.c:608 -msgid "Create Helix Track" -msgstr "Erstelle Gleiswendel" - -#: ../bin/ccurve.c:615 -msgid "Create Circle Track" -msgstr "Erstelle Gleiskreis" - -#: ../bin/ccurve.c:671 -msgid "Place circle center" -msgstr "Setze Kreismittelpunkt" - -#: ../bin/ccurve.c:676 ../bin/drawgeom.c:211 -msgid "Drag to set radius" -msgstr "Radius durch Ziehen festlegen" - -#: ../bin/ccurve.c:686 -msgid "Place circle" -msgstr "Platziere Kreis" - -#: ../bin/ccurve.c:711 -msgid "Curve Track" -msgstr "Gleisbogen" - -#: ../bin/ccurve.c:711 -msgid "Curve Tracks" -msgstr "Gleisbögen" - -#: ../bin/ccurve.c:712 -msgid "Curve from End-Pt" -msgstr "Bogen aus Endpunkten" - -#: ../bin/ccurve.c:713 -msgid "Curve from Tangent" -msgstr "Bogen an Tangente" - -#: ../bin/ccurve.c:714 -msgid "Curve from Center" -msgstr "Bogen um Mittelpunkt" - -#: ../bin/ccurve.c:715 -msgid "Curve from Chord" -msgstr "Bogen aus Sehne" - -#: ../bin/ccurve.c:718 ../bin/tcurve.c:617 -msgid "Circle Track" -msgstr "Gleiskreis" - -#: ../bin/ccurve.c:718 -msgid "Circle Tracks" -msgstr "Gleiskreise" - -#: ../bin/ccurve.c:719 -msgid "Fixed Radius Circle" -msgstr "Kreis mit festem Radius" - -#: ../bin/ccurve.c:720 -msgid "Circle from Tangent" -msgstr "Kreis an Tangente" - -#: ../bin/ccurve.c:721 -msgid "Circle from Center" -msgstr "Kreis um Mittelpunkt" - -#: ../bin/cdraw.c:78 -msgid "Font Size must be > 0" -msgstr "Schriftgröße muss größer als 0 sein" - -#: ../bin/cdraw.c:192 ../bin/tcurve.c:346 -msgid "Center: X" -msgstr "Mittelpunkt: X" - -#: ../bin/cdraw.c:195 ../bin/cdraw.c:205 ../bin/compound.c:518 -#: ../bin/cprint.c:134 ../bin/ctodesgn.c:136 ../bin/ctodesgn.c:138 -#: ../bin/ctodesgn.c:181 ../bin/ctodesgn.c:204 ../bin/ctodesgn.c:206 -#: ../bin/ctodesgn.c:242 ../bin/ctodesgn.c:245 ../bin/ctodesgn.c:279 -#: ../bin/ctodesgn.c:283 ../bin/ctodesgn.c:320 ../bin/ctodesgn.c:340 -#: ../bin/ctodesgn.c:361 ../bin/ctodesgn.c:460 ../bin/ctrain.c:170 -#: ../bin/tease.c:503 ../bin/tstraigh.c:82 -msgid "Angle" -msgstr "Winkel" - -#: ../bin/cdraw.c:196 ../bin/tcurve.c:352 -msgid "CCW Angle" -msgstr "Winkel (gegen Uhrzeigersinn)" - -#: ../bin/cdraw.c:197 ../bin/tcurve.c:353 -msgid "CW Angle" -msgstr "Winkel (im Uhrzeigersinn)" - -#: ../bin/cdraw.c:198 -msgid "Point Count" -msgstr "Anzahl der Punkte" - -#: ../bin/cdraw.c:199 ../bin/cdraw.c:811 ../bin/ctodesgn.c:148 -msgid "Line Width" -msgstr "Strichdicke" - -#: ../bin/cdraw.c:200 ../bin/cdraw.c:813 ../bin/cdraw.c:815 ../bin/cdraw.c:890 -#: ../bin/cdraw.c:914 ../bin/cmisc.c:97 ../bin/ctext.c:59 ../bin/ctext.c:130 -#: ../bin/ctodesgn.c:149 ../bin/dcar.c:1968 ../bin/dlayer.c:321 -#: ../bin/doption.c:583 -msgid "Color" -msgstr "Farbe" - -#: ../bin/cdraw.c:201 ../bin/cdraw.c:428 ../bin/cdraw.c:831 -msgid "Lumber" -msgstr "Holzleiste" - -#: ../bin/cdraw.c:202 -msgid "Orientation" -msgstr "Ausrichtung" - -#: ../bin/cdraw.c:203 ../bin/cdraw.c:825 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:525 -msgid "Size" -msgstr "Größe" - -#: ../bin/cdraw.c:204 ../bin/compound.c:517 ../bin/cprint.c:131 -#: ../bin/cturntbl.c:240 ../bin/tease.c:502 -msgid "Origin: X" -msgstr "Ausgangspunkt: X" - -#: ../bin/cdraw.c:206 ../bin/ctext.c:57 ../bin/ctext.c:129 -msgid "Font Size" -msgstr "Schriftgröße" - -#: ../bin/cdraw.c:207 ../bin/cdraw.c:491 ../bin/ctext.c:249 -msgid "Text" -msgstr "Text" - -#: ../bin/cdraw.c:208 ../bin/cmisc.c:114 ../bin/tcurve.c:355 ../bin/tease.c:509 -#: ../bin/tstraigh.c:84 -msgid "Pivot" -msgstr "Drehpunkt" - -#: ../bin/cdraw.c:209 ../bin/cnote.c:149 ../bin/compound.c:524 -#: ../bin/cturntbl.c:243 ../bin/tcurve.c:356 ../bin/tease.c:510 -#: ../bin/tstraigh.c:85 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:603 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:604 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:605 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:606 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:607 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:608 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:609 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:610 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:611 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:612 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:613 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:614 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:615 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:616 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:617 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:618 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:619 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:620 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:621 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:622 -msgid "Layer" -msgstr "Ebene" - -#: ../bin/cdraw.c:418 -msgid "Straight Line" -msgstr "Gerade Linie" - -#: ../bin/cdraw.c:421 ../bin/cdraw.c:1036 -msgid "Dimension Line" -msgstr "Maßlinie" - -#: ../bin/cdraw.c:436 ../bin/cdraw.c:832 ../bin/cdraw.c:1038 -msgid "Table Edge" -msgstr "Tischkante" - -#: ../bin/cdraw.c:448 ../bin/cdraw.c:837 ../bin/cdraw.c:838 ../bin/cdraw.c:839 -msgid "Circle" -msgstr "Kreis" - -#: ../bin/cdraw.c:456 -msgid "Curved Line" -msgstr "Gebogene Linie" - -#: ../bin/cdraw.c:465 ../bin/cdraw.c:842 ../bin/cdraw.c:843 ../bin/cdraw.c:844 -msgid "Filled Circle" -msgstr "Gefüllter Kreis" - -#: ../bin/cdraw.c:470 ../bin/cdraw.c:1054 -msgid "Poly Line" -msgstr "Polylinie" - -#: ../bin/cdraw.c:476 ../bin/cdraw.c:846 ../bin/cdraw.c:1055 -msgid "Polygon" -msgstr "Vieleck" - -#: ../bin/cdraw.c:497 -#, c-format -msgid "%s: Layer=%d" -msgstr "%s: Ebene=%d" - -#: ../bin/cdraw.c:508 ../bin/cdraw.c:934 -msgid "Tiny" -msgstr "Winzig" - -#: ../bin/cdraw.c:509 ../bin/cdraw.c:935 -msgid "Small" -msgstr "Klein" - -#: ../bin/cdraw.c:510 ../bin/cdraw.c:936 -msgid "Medium" -msgstr "Mittel" - -#: ../bin/cdraw.c:511 ../bin/cdraw.c:937 -msgid "Large" -msgstr "Groß" - -#: ../bin/cdraw.c:778 ../bin/drawgeom.c:71 ../bin/drawgeom.c:86 -msgid "Create Lines" -msgstr "Erstelle Linien" - -#: ../bin/cdraw.c:817 ../bin/cdraw.c:912 -msgid "Lumber Type" -msgstr "Leistenart" - -#: ../bin/cdraw.c:829 -msgid "Straight" -msgstr "Gerade" - -#: ../bin/cdraw.c:830 -msgid "Dimension" -msgstr "Abmessung" - -#: ../bin/cdraw.c:833 ../bin/cdraw.c:834 ../bin/cdraw.c:835 ../bin/cdraw.c:836 -msgid "Curved" -msgstr "Gebogen" - -#: ../bin/cdraw.c:840 ../bin/cdraw.c:1052 -msgid "Box" -msgstr "Rechteck" - -#: ../bin/cdraw.c:841 -msgid "Polyline" -msgstr "Polylinie" - -#: ../bin/cdraw.c:845 ../bin/cdraw.c:1053 -msgid "Filled Box" -msgstr "Gefülltes Rechteck" - -#: ../bin/cdraw.c:888 -#, c-format -msgid "%s Line Width" -msgstr "%s Strichdicke" - -#: ../bin/cdraw.c:901 -#, c-format -msgid "%s Color" -msgstr "%s Farbe" - -#: ../bin/cdraw.c:932 -msgid "Dimension Line Size" -msgstr " Maßliniengröße" - -#: ../bin/cdraw.c:945 -msgid "Drag to create Table Edge" -msgstr "Durch Ziehen die Tischkante erstellen" - -#: ../bin/cdraw.c:1035 -msgid "Line" -msgstr "Linie" - -#: ../bin/cdraw.c:1035 -msgid "Draw Line" -msgstr "Zeichne Linie" - -#: ../bin/cdraw.c:1036 -msgid "Draw Dimension Line" -msgstr "Zeichne Maßlinie" - -#: ../bin/cdraw.c:1037 ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:53 -msgid "Benchwork" -msgstr "Unterbau" - -#: ../bin/cdraw.c:1037 -msgid "Draw Benchwork" -msgstr "Zeichne Unterbau" - -#: ../bin/cdraw.c:1038 -msgid "Draw Table Edge" -msgstr "Zeichne Tischkante" - -#: ../bin/cdraw.c:1040 -msgid "Curve End" -msgstr "Kurvenenden " - -#: ../bin/cdraw.c:1040 -msgid "Draw Curve from End" -msgstr "Zeichne Kurve durch Enden" - -#: ../bin/cdraw.c:1041 -msgid "Curve Tangent" -msgstr "Kurve Tangente " - -#: ../bin/cdraw.c:1041 -msgid "Draw Curve from Tangent" -msgstr "Zeichne Kurve an Tangente" - -#: ../bin/cdraw.c:1042 -msgid "Curve Center" -msgstr "Kurve um Mittelpunkt" - -#: ../bin/cdraw.c:1042 -msgid "Draw Curve from Center" -msgstr "Zeichne Kurve um Mittelpunkt" - -#: ../bin/cdraw.c:1043 -msgid "Curve Chord" -msgstr "Kurve durch Sehne " - -#: ../bin/cdraw.c:1043 -msgid "Draw Curve from Chord" -msgstr "Zeichne Kurve durch Sehne" - -#: ../bin/cdraw.c:1046 -msgid "Circle Tangent" -msgstr "Kreis an Tangente" - -#: ../bin/cdraw.c:1046 -msgid "Draw Circle from Tangent" -msgstr "Zeichne Kreis an Tangente" - -#: ../bin/cdraw.c:1047 -msgid "Circle Center" -msgstr "Kreismittelpunkt" - -#: ../bin/cdraw.c:1047 -msgid "Draw Circle from Center" -msgstr "Zeichne Kreis um Mittelpunkt" - -#: ../bin/cdraw.c:1049 -msgid "Circle Filled Tangent" -msgstr "Gefüllter Kreis an Tangente" - -#: ../bin/cdraw.c:1049 -msgid "Draw Filled Circle from Tangent" -msgstr "Gefüllter Kreis an Tangente" - -#: ../bin/cdraw.c:1050 -msgid "Circle Filled Center" -msgstr "Gefüllter Kreis Mittelpunkt" - -#: ../bin/cdraw.c:1050 -msgid "Draw Filled Circle from Center" -msgstr "Gefüllter Kreis von Mittelpunkt" - -#: ../bin/cdraw.c:1052 -msgid "Draw Box" -msgstr "Zeichne Rechteck" - -#: ../bin/cdraw.c:1053 -msgid "Draw Filled Box" -msgstr "Zeichne gefülltes Rechteck" - -#: ../bin/cdraw.c:1054 -msgid "Draw Polyline" -msgstr "Zeichne Polylinie" - -#: ../bin/cdraw.c:1055 -msgid "Draw Polygon" -msgstr "Zeichne Vieleck" - -#: ../bin/cdraw.c:1071 -msgid "Straight Objects" -msgstr "Gerade Objekte" - -#: ../bin/cdraw.c:1071 -msgid "Draw Straight Objects" -msgstr "Zeichne gerade Objekte" - -#: ../bin/cdraw.c:1072 -msgid "Curved Lines" -msgstr "Gebogene Linien" - -#: ../bin/cdraw.c:1072 -msgid "Draw Curved Lines" -msgstr "Zeichne gebogene Linien" - -#: ../bin/cdraw.c:1073 -msgid "Circle Lines" -msgstr "Kreislinien" - -#: ../bin/cdraw.c:1073 -msgid "Draw Circles" -msgstr "Zeichne Kreise" - -#: ../bin/cdraw.c:1074 -msgid "Shapes" -msgstr "Formen" - -#: ../bin/cdraw.c:1074 -msgid "Draw Shapes" -msgstr "Zeichne Formen" - -#: ../bin/cdraw.c:1152 -msgid "Draw" -msgstr "Zeichne" - -#: ../bin/celev.c:44 ../bin/csplit.c:105 ../bin/csplit.c:110 ../bin/dease.c:63 -#: ../bin/doption.c:215 ../bin/doption.c:216 ../bin/cprofile.c:1370 -msgid "None" -msgstr "Kein" - -#: ../bin/celev.c:44 -msgid "Defined" -msgstr "Fest" - -#: ../bin/celev.c:44 -msgid "Hidden" -msgstr "Versteckt" - -#: ../bin/celev.c:45 -msgid "Computed" -msgstr "Berechnet" - -#: ../bin/celev.c:45 -msgid "Station" -msgstr "Bahnhof" - -#: ../bin/celev.c:45 ../bin/dcmpnd.c:68 ../bin/misc.c:2424 -#: ../bin/cprofile.c:1369 -msgid "Ignore" -msgstr "Ignorieren" - -#: ../bin/celev.c:123 ../bin/celev.c:168 -msgid "There are no reachable Defined Elevations" -msgstr "Ziehen um die Höhe zu ändern" - -#: ../bin/celev.c:204 -msgid "Set Elevation" -msgstr "Höhe festlegen" - -#: ../bin/celev.c:309 ../bin/celev.c:326 -#, c-format -msgid "Elev = %s" -msgstr "Höhe = %s" - -#: ../bin/celev.c:311 ../bin/celev.c:328 -#, c-format -msgid "Dist = %s" -msgstr "Entfernung = %s" - -#: ../bin/celev.c:317 ../bin/celev.c:334 ../bin/celev.c:375 ../bin/celev.c:382 -#: ../bin/celev.c:385 -#, c-format -msgid "Undefined" -msgstr "Undefiniert" - -#: ../bin/celev.c:407 ../bin/celev.c:473 -msgid "Elevation" -msgstr "Höhe" - -#: ../bin/celev.c:407 ../bin/cmisc.c:304 ../bin/dcustmgm.c:350 -#: ../bin/dlayer.c:850 ../bin/dpricels.c:155 ../bin/cprofile.c:1270 -msgid "Done" -msgstr "Fertig" - -#: ../bin/celev.c:419 -msgid "Select End-Point" -msgstr "Endpunkt auswählen" - -#: ../bin/celev.c:435 ../bin/csplit.c:90 ../bin/csplit.c:153 -msgid "Split Track" -msgstr "Gleis auftrennen" - -#: ../bin/cgroup.c:576 -msgid "Ungroup Object" -msgstr "Gruppierung aufheben" - -#: ../bin/cgroup.c:588 -#, c-format -msgid "%d objects ungrouped" -msgstr "%d Gruppierungen aufgelöst" - -#: ../bin/cgroup.c:590 -msgid "No objects ungrouped" -msgstr "Keine Gruppierungen aufgelöst" - -#: ../bin/cgroup.c:599 -msgid "Replace with new group?" -msgstr "Durch neue Gruppe ersetzen?" - -#: ../bin/cgroup.c:604 ../bin/compound.c:519 ../bin/cstruct.c:64 -#: ../bin/ctodesgn.c:140 ../bin/ctodesgn.c:1764 ../bin/cturnout.c:69 -#: ../bin/dcar.c:1933 ../bin/dcar.c:4070 ../bin/dcar.c:4075 ../bin/dcmpnd.c:444 -#: ../bin/dcustmgm.c:45 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:333 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:502 -msgid "Manufacturer" -msgstr "Hersteller" - -#: ../bin/cgroup.c:605 ../bin/cmisc.c:304 ../bin/cstruct.c:64 -#: ../bin/ctodesgn.c:1765 ../bin/ctodesgn.c:1766 ../bin/ctrain.c:173 -#: ../bin/cturnout.c:69 ../bin/dcar.c:1949 ../bin/dcar.c:4071 -#: ../bin/dcar.c:4076 ../bin/dcmpnd.c:445 ../bin/dcustmgm.c:46 -#: ../bin/denum.c:177 ../bin/denum.c:178 ../bin/denum.c:181 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:334 -msgid "Description" -msgstr "Beschreibung" - -#: ../bin/cgroup.c:606 ../bin/dcmpnd.c:446 -msgid "#" -msgstr "Nr." - -#: ../bin/cgroup.c:607 ../bin/compound.c:523 -msgid "# Segments" -msgstr "Anzahl Segmente" - -#: ../bin/cgroup.c:1063 -msgid "No endpts" -msgstr "Keine Endpunkte" - -#: ../bin/cgroup.c:1148 -msgid "No paths" -msgstr "Keine Wege" - -#: ../bin/cgroup.c:1482 ../bin/cgroup.c:1536 -msgid "Group Tracks" -msgstr "Gleise gruppieren" - -#: ../bin/cgroup.c:1592 -msgid "Group Objects" -msgstr "Objekte gruppieren" - -#: ../bin/chndldto.c:68 -msgid "Place frog and drag angle" -msgstr "Herzstück festlegen und auf Winkel ziehen" - -#: ../bin/chndldto.c:85 -msgid "frog" -msgstr "Herzstück" - -#: ../bin/chndldto.c:132 -#, c-format -msgid "Angle = %0.2f Frog# = %0.2f" -msgstr "Winkel = %0.2f Steigung = %0.2f" - -#: ../bin/chndldto.c:134 -msgid "Frog angle is too close to 0" -msgstr "Herzstückwinkel ist zu nahe bei 0" - -#: ../bin/chndldto.c:137 -msgid "Select point position" -msgstr "Position des Punktes auswählen" - -#: ../bin/chndldto.c:151 ../bin/chndldto.c:176 -msgid "points" -msgstr "Punkte" - -#: ../bin/chndldto.c:273 -#, c-format -msgid "Length = %0.2f Angle = %0.2f Frog# = %0.2f" -msgstr "Länge = %0.2f Winkel = %0.2f Steigung=%0.2f" - -#: ../bin/chndldto.c:277 -msgid "Create Hand Laid Turnout" -msgstr "Erstelle eine Selbstbauweiche" - -#: ../bin/chndldto.c:368 -msgid "HandLaidTurnout" -msgstr "Selbstbauweiche" - -#: ../bin/cjoin.c:164 -#, c-format -msgid "Curved Track: Radius=%s Length=%s" -msgstr "Gleisbogen: Radius=%s Länge=%s" - -#: ../bin/cjoin.c:250 -#, c-format -msgid "Curved Track: Radius=%s Length=%s Angle=%0.3f" -msgstr "Gleisbogen: Radius=%s Länge=%s Winkel=%0.3f" - -#: ../bin/cjoin.c:346 -#, c-format -msgid "Track (%d) is too short for transition-curve by %0.3f" -msgstr "Gleis (%d) ist für den Ãœbergangsbogen um %0.3f zu kurz" - -#: ../bin/cjoin.c:363 -#, c-format -msgid "Connecting track is too short by %0.3f" -msgstr "Verbindungsgleis ist um %0.3f zu kurz" - -#: ../bin/cjoin.c:407 ../bin/cjoin.c:857 -msgid "Click on an unselected End-Point" -msgstr "Einen nicht ausgewählten Endpunkt anklicken" - -#: ../bin/cjoin.c:408 ../bin/cjoin.c:858 -msgid "Click on a selected End-Point" -msgstr "Einen ausgewählten Endpunkt anclicken" - -#: ../bin/cjoin.c:415 ../bin/cjoin.c:863 -msgid "unselected" -msgstr "nicht ausgewählt" - -#: ../bin/cjoin.c:415 ../bin/cjoin.c:863 ../bin/cprint.c:139 -msgid "selected" -msgstr "ausgewählt" - -#: ../bin/cjoin.c:450 -msgid "Left click - join with track, Shift Left click - move to join" -msgstr "" -"Linke Maustaste - Verbinden mit neuem Gleis, Umschalten + linke Maustaste - " -"Verschieben zum Verbinden" - -#: ../bin/cjoin.c:481 ../bin/cjoin.c:781 ../bin/cjoin.c:790 -msgid "Select 2nd track" -msgstr "Zweites Gleis auswählen" - -#: ../bin/cjoin.c:508 ../bin/cmisc.c:52 ../bin/track.c:1956 -msgid "First" -msgstr "Erste" - -#: ../bin/cjoin.c:513 ../bin/cmisc.c:52 ../bin/track.c:1956 -msgid "Second" -msgstr "Zweite" - -#: ../bin/cjoin.c:604 -msgid "Beyond end of 2nd track" -msgstr "Außerhalb des zweiten Gleises" - -#: ../bin/cjoin.c:639 -msgid "Beyond end of 1st track" -msgstr "Außerhalb des ersten Gleises" - -#: ../bin/cjoin.c:663 -msgid "First " -msgstr "Erste " - -#: ../bin/cjoin.c:690 -msgid "Second " -msgstr "Zweite " - -#: ../bin/cjoin.c:704 ../bin/track.c:1906 -msgid "Connecting " -msgstr "Verbinde " - -#: ../bin/cjoin.c:793 -msgid "Join Tracks" -msgstr "Gleise zusammenfügen" - -#: ../bin/cjoin.c:898 -msgid "Join" -msgstr "Verbinden" - -#: ../bin/cmisc.c:52 -msgid "Middle" -msgstr "Mittel" - -#: ../bin/cmisc.c:153 ../bin/cmodify.c:121 ../bin/cnote.c:168 -#: ../bin/compound.c:592 ../bin/ctrain.c:195 -msgid "Change Track" -msgstr "Gleis ändern" - -#: ../bin/cmisc.c:397 -msgid "Select track to describe" -msgstr "Zu beschreibendes Gleis auswählen" - -#: ../bin/cmisc.c:444 -msgid "Properties" -msgstr "Eigenschaften" - -#: ../bin/cmisc2.c:52 -msgid "Bridge" -msgstr "Brücke" - -#: ../bin/cmodify.c:83 -msgid "Select track to modify" -msgstr "Zu bearbeitendes Gleis auswählen" - -#: ../bin/cmodify.c:169 -msgid "Modify Track" -msgstr "Gleis bearbeiten" - -#: ../bin/cmodify.c:205 -msgid "Drag to create new track segment" -msgstr "Ziehen um einen neuen Gleisabschnitt zu erstellen" - -#: ../bin/cmodify.c:323 -#, c-format -msgid "Curve Track: Radius=%s Length=%s Angle=%0.3f" -msgstr "Gleisbogen: Radius=%s Länge=%s Winkel=%0.3f" - -#: ../bin/cmodify.c:339 -msgid "Extend Track" -msgstr "Gleis verlängern" - -#: ../bin/cmodify.c:405 -msgid "Modify" -msgstr "Verändern" - -#: ../bin/cnote.c:96 ../bin/cnote.c:203 ../bin/cnote.c:402 -msgid "Note" -msgstr "Notiz" - -#: ../bin/cnote.c:99 -msgid "Replace this text with your layout notes" -msgstr "Ersetzen Sie diesen Text durch Ihre Notizen" - -#: ../bin/cnote.c:148 ../bin/ctrain.c:169 -msgid "Position" -msgstr "Position" - -#: ../bin/cnote.c:190 ../bin/cnote.c:191 ../bin/cnote.c:192 -msgid "Note: " -msgstr "Notiz: " - -#: ../bin/cnote.c:359 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:91 -msgid "Place a note on the layout" -msgstr "Eine Notiz auf den Gleisplan setzen" - -#: ../bin/cnote.c:372 -msgid "New Note" -msgstr "Neue Notiz" - -#: ../bin/cnote.c:377 -msgid "Replace this text with your note" -msgstr "Ersetzen Sie diesen Text durch Ihre Notizen" - -#: ../bin/compound.c:513 ../bin/compound.c:515 ../bin/tcurve.c:343 -#: ../bin/tcurve.c:345 ../bin/tease.c:499 ../bin/tease.c:501 -#: ../bin/tstraigh.c:78 ../bin/tstraigh.c:80 -msgid "Z" -msgstr "Z" - -#: ../bin/compound.c:521 ../bin/cstruct.c:64 ../bin/cturnout.c:69 -#: ../bin/dcar.c:4070 ../bin/dcar.c:4075 ../bin/dcustmgm.c:46 -#: ../bin/doption.c:219 ../bin/doption.c:220 -msgid "Part No" -msgstr "Teilenr" - -#: ../bin/compound.c:522 -msgid "# End Pt" -msgstr "Anzahl Endpunkte" - -#: ../bin/compound.c:777 ../bin/cswitchmotor.c:142 ../bin/cturnout.c:885 -#: ../bin/cturnout.c:2372 ../bin/cturnout.c:2542 ../bin/track.c:1720 -msgid "Turnout" -msgstr "Weiche" - -#: ../bin/compound.c:777 -msgid "Sectional Track" -msgstr "Festgleise" - -#: ../bin/compound.c:780 ../bin/cstruct.c:763 ../bin/cstruct.c:908 -msgid "Structure" -msgstr "Gebäude" - -#: ../bin/cparalle.c:41 ../bin/cparalle.c:71 ../bin/cparalle.c:83 -#: ../bin/ctodesgn.c:382 ../bin/ctodesgn.c:402 ../bin/ctodesgn.c:422 -#: ../bin/tcurve.c:349 -msgid "Separation" -msgstr "Zwischenraum" - -#: ../bin/cparalle.c:140 -msgid "Create Parallel Track" -msgstr "Erzeuge paralleles Gleis" - -#: ../bin/cparalle.c:184 ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:44 -msgid "Parallel" -msgstr "Parallel" - -#: ../bin/cprint.c:96 -msgid "Portrait" -msgstr "Hochformat" - -#: ../bin/cprint.c:96 -msgid "Landscape" -msgstr "Querformat" - -#: ../bin/cprint.c:97 ../bin/cselect.c:1866 ../bin/cselect.c:1870 -#: ../bin/cswitchmotor.c:79 ../bin/cswitchmotor.c:139 ../bin/dbench.c:73 -#: ../bin/dease.c:63 ../bin/doption.c:214 ../bin/doption.c:310 -#: ../bin/macro.c:1228 -msgid "Normal" -msgstr "Normal" - -#: ../bin/cprint.c:97 ../bin/cswitchmotor.c:80 ../bin/cswitchmotor.c:140 -#: ../bin/ctrain.c:777 ../bin/ctrain.c:1034 -msgid "Reverse" -msgstr "Umkehren" - -#: ../bin/cprint.c:98 -msgid "Engineering Data" -msgstr "Zeichnungsinformationen" - -#: ../bin/cprint.c:99 -msgid "Print Registration Marks" -msgstr "Drucke Positionierungshilfen" - -#: ../bin/cprint.c:100 -msgid "Ignore Page Margins" -msgstr "Ãœbergehe Seitenränder" - -#: ../bin/cprint.c:101 -msgid "Print Snap Grid" -msgstr "Fangraster drucken" - -#: ../bin/cprint.c:102 -msgid "Print Rulers" -msgstr "Maßlinien drucken" - -#: ../bin/cprint.c:103 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:411 -msgid "Print Roadbed Outline" -msgstr "Gleisbettung drucken" - -#: ../bin/cprint.c:111 -msgid "Print Scale" -msgstr "Druckmaßstab" - -#: ../bin/cprint.c:112 -msgid "Page Width" -msgstr "Seitenbreite" - -#: ../bin/cprint.c:113 -msgid "Max" -msgstr "Max." - -#: ../bin/cprint.c:114 -msgid "Height" -msgstr "Seitenhöhe" - -#: ../bin/cprint.c:115 -msgid "Snap Shot" -msgstr "Schnappschuss" - -#: ../bin/cprint.c:116 -msgid "Page Format" -msgstr "Seitenformat" - -#: ../bin/cprint.c:117 -msgid "Print Order" -msgstr "Druckreihenfolge" - -#: ../bin/cprint.c:130 ../bin/ctrain.c:172 ../bin/dcar.c:1972 -msgid "Width" -msgstr "Breite" - -#: ../bin/cprint.c:132 ../bin/csnap.c:536 -msgid "Y" -msgstr "Y" - -#: ../bin/cprint.c:133 ../bin/dcar.c:1953 -msgid "Reset" -msgstr "Zurücksetzen" - -#: ../bin/cprint.c:135 -msgid "Setup" -msgstr "Einstellungen" - -#: ../bin/cprint.c:136 ../bin/misc.c:587 ../bin/cprofile.c:563 -msgid "Clear" -msgstr "Löschen" - -#: ../bin/cprint.c:138 ../bin/cprint.c:618 -msgid "0 pages" -msgstr "0 Seiten" - -#: ../bin/cprint.c:228 ../bin/cprint.c:277 -#, c-format -msgid "%d pages" -msgstr "%d Seiten" - -#: ../bin/cprint.c:397 -#, c-format -msgid "PrintScale 1:%ld Room %s x %s Model Scale %s File %s" -msgstr "Druckmaßstab 1:%ld Raum %s x %s Modellmaßstab %s Datei %s" - -#: ../bin/cprint.c:699 -msgid "1 page" -msgstr "1 Seite" - -#: ../bin/cprint.c:1068 ../bin/ctodesgn.c:1712 ../bin/denum.c:50 -#: ../bin/cprofile.c:564 -msgid "Print" -msgstr "Drucken" - -#: ../bin/cprint.c:1090 -msgid "Select pages to print, or drag to move print grid" -msgstr "" -"Zu druckende Seiten auswählen oder ziehen um das Druckraster zu verschieben" - -#: ../bin/cprint.c:1189 -msgid "Print..." -msgstr "Drucken..." - -#: ../bin/cpull.c:438 ../bin/cpull.c:583 -#, c-format -msgid "%d tracks moved" -msgstr "%d Gleise verschoben" - -#: ../bin/cpull.c:473 -msgid "Pull Tracks" -msgstr "Gleise ziehen" - -#: ../bin/cpull.c:547 -msgid "Tighten Tracks" -msgstr "Gleise zusammendrücken" - -#: ../bin/cpull.c:600 -msgid "Select first End-Point to connect" -msgstr "Ersten Endpunkt für Verbindung auswählen" - -#: ../bin/cpull.c:611 -msgid "Select second End-Point to connect" -msgstr "Zweiten Endpunkt für Verbindung auswählen" - -#: ../bin/cpull.c:661 -msgid "Connect Sectional Tracks" -msgstr "Gleisstücke verbinden" - -#: ../bin/cruler.c:146 ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:51 -msgid "Ruler" -msgstr "Lineal" - -#: ../bin/cselect.c:306 -msgid "Change Track Width" -msgstr "Gleisbreite ändern" - -#: ../bin/cselect.c:327 -msgid "Delete Tracks" -msgstr "Gleise löschen" - -#: ../bin/cselect.c:379 -msgid "Hide Tracks (Tunnel)" -msgstr "Gleise verbergen (Tunnel)" - -#: ../bin/cselect.c:418 ../bin/misc.c:2140 -msgid "Move To Current Layer" -msgstr "Auf aktuelle Ebene verschieben" - -#: ../bin/cselect.c:457 ../bin/misc.c:2250 -msgid "Clear Elevations" -msgstr "Höhen löschen" - -#: ../bin/cselect.c:501 -msgid "Add Elevations" -msgstr "Höhen hinzufügen" - -#: ../bin/cselect.c:516 -msgid "Refresh Compound" -msgstr "Zusammenstellung aktualisieren" - -#: ../bin/cselect.c:552 ../bin/dcar.c:4070 ../bin/dcar.c:4075 -#: ../bin/dcustmgm.c:46 ../bin/doption.c:103 -msgid "Scale" -msgstr "Maßstab" - -#: ../bin/cselect.c:552 ../bin/cselect.c:577 -msgid "Ratio" -msgstr "Verhältnis" - -#: ../bin/cselect.c:561 -msgid "Do not resize track" -msgstr "Gleismaße nicht ändern" - -#: ../bin/cselect.c:565 -msgid "Rescale by:" -msgstr "Skalieren um:" - -#: ../bin/cselect.c:567 -msgid "From:" -msgstr "Von:" - -#: ../bin/cselect.c:571 -msgid "To: " -msgstr "Nach:" - -#: ../bin/cselect.c:636 -msgid "Rescale Tracks" -msgstr "Gleise skalieren" - -#: ../bin/cselect.c:767 ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:47 -msgid "Rescale" -msgstr "Maßstab ändern" - -#: ../bin/cselect.c:794 -msgid "Draw moving track normally" -msgstr "Bewegte Gleise normal zeichnen" - -#: ../bin/cselect.c:795 -msgid "Draw moving track simply" -msgstr "Bewegte Gleise vereinfacht zeichnen" - -#: ../bin/cselect.c:796 -msgid "Draw moving track as end-points" -msgstr "Bewegte Gleise als Endpunkte zeichnen" - -#: ../bin/cselect.c:1089 -msgid "Move To Join" -msgstr "Verbinde durch Verschieben" - -#: ../bin/cselect.c:1125 -msgid "Drag to move selected tracks" -msgstr "Ausgewählte Gleise durch Ziehen verschieben" - -#: ../bin/cselect.c:1132 -msgid "Move Tracks" -msgstr "Gleise verschieben" - -#: ../bin/cselect.c:1189 -msgid "Click on selected object to align" -msgstr "Ausgewählte Objekte spiegeln" - -#: ../bin/cselect.c:1217 -msgid "Drag to rotate selected tracks" -msgstr "Ziehen um die ausgewählten Gleise zu rotieren" - -#: ../bin/cselect.c:1226 ../bin/cselect.c:1382 -msgid "Rotate Tracks" -msgstr "Gleise drehen" - -#: ../bin/cselect.c:1265 ../bin/cselect.c:1296 -#, c-format -msgid "Angle %0.3f" -msgstr "Winkel %0.3f" - -#: ../bin/cselect.c:1326 -#, c-format -msgid " Angle %0.3f #%ld" -msgstr " Winkel %0.3f #%ld" - -#: ../bin/cselect.c:1328 -#, c-format -msgid " Angle %0.3f" -msgstr " Winkel %0.3f" - -#: ../bin/cselect.c:1339 -msgid "Click on the 2nd Unselected object" -msgstr "Klicken Sie auf das zweite, nicht ausgewählte Objekt." - -#: ../bin/cselect.c:1394 -msgid "Toggle Label" -msgstr "Beschriftung umschalten" - -#: ../bin/cselect.c:1423 -msgid "Select and drag a description" -msgstr "Beschreibung auswählen und verschieben" - -#: ../bin/cselect.c:1465 -msgid "Move Label" -msgstr "Beschreibung verschieben" - -#: ../bin/cselect.c:1490 -msgid "Show Description" -msgstr "Beschreibung anzeigen" - -#: ../bin/cselect.c:1572 -msgid "Drag to mark mirror line" -msgstr "Ziehen um die Spiegelachse zu erstellen" - -#: ../bin/cselect.c:1587 -#, c-format -msgid "Angle %0.2f" -msgstr "Winkel %0.2f" - -#: ../bin/cselect.c:1592 -msgid "Flip Tracks" -msgstr "Gleise spiegeln" - -#: ../bin/cselect.c:1755 -msgid "Select tracks" -msgstr "Gleise auswählen" - -#: ../bin/cselect.c:1853 ../bin/dcar.c:1536 ../bin/doption.c:315 -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:13 -msgid "Select" -msgstr "Auswählen" - -#: ../bin/cselect.c:1867 ../bin/cselect.c:1871 ../bin/doption.c:311 -msgid "Simple" -msgstr "Einfach" - -#: ../bin/cselect.c:1868 ../bin/cselect.c:1872 -msgid "End Points" -msgstr "Endpunkte" - -#: ../bin/cselect.c:1875 -msgid "Align" -msgstr "Ausrichten" - -#: ../bin/cselect.c:1896 ../bin/misc.c:2069 -msgid "Tunnel" -msgstr "Tunnel" - -#: ../bin/cselect.c:1905 -msgid "Move Description" -msgstr "Beschreibungen verschieben" - -#: ../bin/cselect.c:1912 ../bin/misc.c:2067 -msgid "Move" -msgstr "Verschieben" - -#: ../bin/cselect.c:1914 ../bin/misc.c:1846 ../bin/misc.c:2068 -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:58 -msgid "Rotate" -msgstr "Drehen" - -#: ../bin/cselect.c:1916 ../bin/dcar.c:1955 -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:59 -msgid "Flip" -msgstr "Spiegeln" - -#: ../bin/csnap.c:517 -msgid "Horz" -msgstr "Horiz." - -#: ../bin/csnap.c:519 -msgid "Spacing" -msgstr "Abstand" - -#: ../bin/csnap.c:521 -msgid "Divisions" -msgstr "Zwischenmarkierungen" - -#: ../bin/csnap.c:524 -msgid "Enable" -msgstr "Einschalten" - -#: ../bin/csnap.c:525 -msgid "Vert" -msgstr "Vert." - -#: ../bin/csnap.c:534 ../bin/dease.c:72 -msgid "X" -msgstr "X" - -#: ../bin/csnap.c:538 -msgid "A" -msgstr "A" - -#: ../bin/csnap.c:541 -msgid "Show" -msgstr "Zeige" - -#: ../bin/csnap.c:711 ../bin/doption.c:555 -msgid "Snap Grid" -msgstr "Fangraster" - -#: ../bin/csnap.c:796 -msgid "Change Grid..." -msgstr "Raster anpassen..." - -#: ../bin/csplit.c:45 -msgid "Set Block Gaps" -msgstr "Setze Trennstellen" - -#: ../bin/csplit.c:72 -msgid "Select track to split" -msgstr "Zu trennendes Gleis auswählen" - -#: ../bin/csplit.c:106 ../bin/dbench.c:64 ../bin/dbench.c:75 -msgid "Left" -msgstr "Links" - -#: ../bin/csplit.c:107 ../bin/dbench.c:65 ../bin/dbench.c:74 -msgid "Right" -msgstr "Rechts" - -#: ../bin/csplit.c:108 ../bin/csplit.c:113 -msgid "Both" -msgstr "Beides" - -#: ../bin/csplit.c:111 -msgid "Top" -msgstr "Oben" - -#: ../bin/csplit.c:112 -msgid "Bottom" -msgstr "Unten" - -#: ../bin/cstraigh.c:49 -msgid "Place 1st end point of Straight track" -msgstr "Ersten Endpunkt der Gleisgerade setzen" - -#: ../bin/cstraigh.c:55 -msgid "Drag to place 2nd end point" -msgstr "Ziehen um den zweiten Endpunkt zu setzen" - -#: ../bin/cstraigh.c:67 -#, c-format -msgid "Straight Track Length=%s Angle=%0.3f" -msgstr "Gleisgerade: Länge=%s Winkel=%0.3f" - -#: ../bin/cstraigh.c:104 ../bin/tstraigh.c:259 -msgid "Straight Track" -msgstr "Gleisgerade" - -#: ../bin/cstruct.c:66 ../bin/cturnout.c:71 ../bin/doption.c:214 -#: ../bin/doption.c:318 -msgid "Hide" -msgstr "Verstecken" - -#: ../bin/cstruct.c:321 ../bin/cstruct.c:348 -msgid "Pier Number" -msgstr "Bestellnummer" - -#: ../bin/cstruct.c:433 -#, c-format -msgid "Scale %d:1" -msgstr "Maßstab 1:%d" - -#: ../bin/cstruct.c:435 -#, c-format -msgid "Width %s" -msgstr "Breite %s" - -#: ../bin/cstruct.c:437 -#, c-format -msgid "Height %s" -msgstr "Höhe %s" - -#: ../bin/cstruct.c:535 -msgid "Place Structure" -msgstr "Gebäude plazieren" - -#: ../bin/cstruct.c:645 -msgid "Drag to place" -msgstr "Zur Position ziehen " - -#: ../bin/cstruct.c:673 -msgid "Drag to rotate" -msgstr "Ziehen zum rotieren" - -#: ../bin/cstruct.c:694 -#, c-format -msgid "Angle = %0.3f" -msgstr "Winkel = %0.3f" - -#: ../bin/cstruct.c:780 -msgid "Select Structure and then drag to place" -msgstr "Gebäued auswählen und in die Piosition ziehen" - -#: ../bin/cstruct.c:798 ../bin/cstruct.c:885 -msgid "" -"Left drag to move, right drag to rotate, or press Return or click Ok to " -"finalize" -msgstr "" -"Ziehen mit linker Maustaste zum Verschieben, mit rechter zum Drehen, oder " -"Eingabetaste oder OK zum Abschliessen" - -#: ../bin/cstruct.c:878 ../bin/cturnout.c:2512 -#, c-format -msgid "Place %s and draw into position" -msgstr "%s setzen und in Position ziehen" - -#: ../bin/cswitchmotor.c:81 ../bin/cswitchmotor.c:141 -msgid "Point Sense" -msgstr "Richtung der Weichenzungen" - -#: ../bin/cswitchmotor.c:177 -msgid "Change Switch Motor" -msgstr "Weichenantrieb ändern" - -#: ../bin/cswitchmotor.c:236 -msgid "Switch motor" -msgstr "Weichenantrieb" - -#: ../bin/cswitchmotor.c:359 ../bin/cswitchmotor.c:518 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:117 -msgid "Create Switch Motor" -msgstr "Weichenantrieb erstellen" - -#: ../bin/cswitchmotor.c:381 -msgid "Create switch motor" -msgstr "Weichenantrieb erstellen" - -#: ../bin/cswitchmotor.c:395 ../bin/cswitchmotor.c:425 -#: ../bin/cswitchmotor.c:457 -msgid "Select a turnout" -msgstr "Wählen Sie eine Weiche aus" - -#: ../bin/cswitchmotor.c:402 -msgid "Not a turnout!" -msgstr "Keine Weiche!" - -#: ../bin/cswitchmotor.c:434 ../bin/cswitchmotor.c:465 -msgid "Not a switch motor!" -msgstr "Kein Weichenantrieb!" - -#: ../bin/cswitchmotor.c:470 -#, c-format -msgid "Really delete switch motor %s?" -msgstr "Soll der Weichenantrieb %s wirklich gelöscht werden?" - -#: ../bin/cswitchmotor.c:471 ../bin/cswitchmotor.c:520 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:118 -msgid "Delete Switch Motor" -msgstr "Weichenantrieb löschen" - -#: ../bin/cswitchmotor.c:517 -msgid "SwitchMotor" -msgstr "Weichenantrieb" - -#: ../bin/cswitchmotor.c:517 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:120 -msgid "Switch Motors" -msgstr "Weichenatriebe" - -#: ../bin/cswitchmotor.c:519 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:119 -msgid "Edit Switch Motor" -msgstr "Weichenantrieb bearbeiten" - -#: ../bin/ctext.c:181 ../bin/ctext.c:220 -msgid "Create Text" -msgstr "Erstelle Text" - -#: ../bin/ctext.c:251 -msgid "Fonts..." -msgstr "Schriftarten..." - -#: ../bin/ctodesgn.c:106 -msgid "Frog #" -msgstr "Herzstück Steigung" - -#: ../bin/ctodesgn.c:106 -msgid "Degrees" -msgstr "Grad" - -#: ../bin/ctodesgn.c:133 ../bin/ctodesgn.c:134 ../bin/ctodesgn.c:182 -#: ../bin/ctodesgn.c:205 ../bin/ctodesgn.c:207 ../bin/ctodesgn.c:243 -#: ../bin/ctodesgn.c:244 ../bin/ctodesgn.c:280 ../bin/ctodesgn.c:282 -#: ../bin/ctodesgn.c:497 -msgid "Offset" -msgstr "Abstand" - -#: ../bin/ctodesgn.c:142 ../bin/ctodesgn.c:1759 ../bin/ctodesgn.c:1760 -msgid "Left Description" -msgstr "Beschreibung links" - -#: ../bin/ctodesgn.c:143 ../bin/ctodesgn.c:146 -msgid " #" -msgstr " Nr." - -#: ../bin/ctodesgn.c:145 ../bin/ctodesgn.c:1758 -msgid "Right Description" -msgstr "Beschreibung rechts" - -#: ../bin/ctodesgn.c:147 -msgid "Roadbed Width" -msgstr "Breite des Gleisbett" - -#: ../bin/ctodesgn.c:151 ../bin/denum.c:51 -msgid "Print Setup" -msgstr "Druckeinstellungen" - -#: ../bin/ctodesgn.c:180 -msgid "Diverging Length" -msgstr "Länge des Abzweig" - -#: ../bin/ctodesgn.c:181 -msgid "Diverging Angle" -msgstr "Winkel des Abzweig" - -#: ../bin/ctodesgn.c:182 -msgid "Diverging Offset" -msgstr "Abstand des Abzweig" - -#: ../bin/ctodesgn.c:183 -msgid "Overall Length" -msgstr "Gesamtlänge" - -#: ../bin/ctodesgn.c:193 -msgid "Regular Turnout" -msgstr "Normale Weiche" - -#: ../bin/ctodesgn.c:203 -msgid "Inner Length" -msgstr "Innenlänge" - -#: ../bin/ctodesgn.c:204 -msgid "Inner Angle" -msgstr "Innenwinkel" - -#: ../bin/ctodesgn.c:205 -msgid "Inner Offset" -msgstr "Innenbbstand" - -#: ../bin/ctodesgn.c:206 -msgid "Outer Angle" -msgstr "Außenwinkell" - -#: ../bin/ctodesgn.c:207 -msgid "Outer Offset" -msgstr "Außenabstand" - -#: ../bin/ctodesgn.c:208 -msgid "Outer Length" -msgstr "Außenlänge" - -#: ../bin/ctodesgn.c:230 -msgid "Curved Turnout" -msgstr "Bogenweiche" - -#: ../bin/ctodesgn.c:241 ../bin/ctodesgn.c:278 -msgid "Left Length" -msgstr "Linke Länge" - -#: ../bin/ctodesgn.c:242 ../bin/ctodesgn.c:279 -msgid "Left Angle" -msgstr "Linker Winkel" - -#: ../bin/ctodesgn.c:243 ../bin/ctodesgn.c:280 -msgid "Left Offset" -msgstr "Linker Abstand" - -#: ../bin/ctodesgn.c:244 ../bin/ctodesgn.c:282 -msgid "Right Offset" -msgstr "Rechter Abstand" - -#: ../bin/ctodesgn.c:245 ../bin/ctodesgn.c:283 -msgid "Right Angle" -msgstr "Rechter Winkel" - -#: ../bin/ctodesgn.c:246 ../bin/ctodesgn.c:284 -msgid "Right Length" -msgstr "Rechte Länge" - -#: ../bin/ctodesgn.c:268 -msgid "Wye Turnout" -msgstr "Außenbogenweiche" - -#: ../bin/ctodesgn.c:309 -msgid "3-way Turnout" -msgstr "Dreiwegweiche" - -#: ../bin/ctodesgn.c:329 -msgid "Crossing" -msgstr "Kreuzung" - -#: ../bin/ctodesgn.c:350 -msgid "Single Slipswitch" -msgstr "Einfache Kreuzungsweiche" - -#: ../bin/ctodesgn.c:371 -msgid "Double Slipswitch" -msgstr "Doppelte Kreuzungsweiche" - -#: ../bin/ctodesgn.c:391 -msgid "Right Crossover" -msgstr "Rechter Gleiswechsel" - -#: ../bin/ctodesgn.c:411 -msgid "Left Crossover" -msgstr "Linker Gleiswechsel" - -#: ../bin/ctodesgn.c:431 -msgid "Double Crossover" -msgstr "Doppelter Gleiswechsel" - -#: ../bin/ctodesgn.c:449 -msgid "Straight Section" -msgstr "Gerader Abschnitt" - -#: ../bin/ctodesgn.c:460 -msgid "Angle (Degrees)" -msgstr "Winkel (Grad)" - -#: ../bin/ctodesgn.c:468 -msgid "Curved Section" -msgstr "Gebogener Abschnitt" - -#: ../bin/ctodesgn.c:487 -msgid "Bumper Section" -msgstr "Prellbock" - -#: ../bin/ctodesgn.c:497 ../bin/denum.c:118 ../bin/denum.c:181 -#: ../bin/denum.c:213 ../bin/denum.c:214 ../bin/dlayer.c:329 -msgid "Count" -msgstr "Anzahl" - -#: ../bin/ctodesgn.c:498 -msgid "Radius1" -msgstr "Radius 1" - -#: ../bin/ctodesgn.c:499 -msgid "Radius2" -msgstr "Radius 2" - -#: ../bin/ctodesgn.c:579 -msgid "Turntable Section" -msgstr "Drehscheibenabscnitt" - -#: ../bin/ctodesgn.c:1413 -#, c-format -msgid "%s Designer" -msgstr "%s Designer" - -#: ../bin/ctodesgn.c:1417 -msgid "Page" -msgstr "Seite" - -#: ../bin/ctodesgn.c:1425 -msgid "Frog Number" -msgstr "Herzstücksteigung" - -#: ../bin/ctodesgn.c:1712 -msgid "Turnout Designer" -msgstr "Weichendesigner" - -#: ../bin/ctodesgn.c:1722 -#, c-format -msgid "%s %s Designer" -msgstr "%s %s Designer" - -#: ../bin/ctrain.c:168 ../bin/dcar.c:1986 ../bin/dcar.c:4070 ../bin/dcar.c:4075 -msgid "Index" -msgstr "Verzeichnis" - -#: ../bin/ctrain.c:174 ../bin/dcar.c:4071 -msgid "Rep Marks" -msgstr "Wagennummer" - -#: ../bin/ctrain.c:238 -msgid "Car" -msgstr "Wagen" - -#: ../bin/ctrain.c:542 -msgid "Follow" -msgstr "Folgen" - -#: ../bin/ctrain.c:543 -msgid "Auto Reverse" -msgstr "Automat. Wenden" - -#: ../bin/ctrain.c:562 ../bin/dcar.c:4955 -msgid "Find" -msgstr "Finden" - -#: ../bin/ctrain.c:568 ../bin/ctrain.c:777 ../bin/ctrain.c:1034 -#: ../wlib/gtklib/gtkhelp.c:522 -msgid "Forward" -msgstr "Vorwärts" - -#: ../bin/ctrain.c:570 ../bin/ctrain.c:2571 ../bin/dcar.c:4409 -#: ../bin/dcar.c:4419 ../bin/dcar.c:4538 ../bin/fileio.c:242 ../bin/macro.c:80 -msgid "Stop" -msgstr "Anhalten" - -#: ../bin/ctrain.c:730 ../bin/ctrain.c:753 -msgid "Crashed" -msgstr "Entgleist" - -#: ../bin/ctrain.c:732 -msgid "Not on Track" -msgstr "Nicht auf einem Gleis" - -#: ../bin/ctrain.c:735 -msgid "Trains Paused" -msgstr "Züge angehalten" - -#: ../bin/ctrain.c:737 -msgid "Running" -msgstr "Fährt" - -#: ../bin/ctrain.c:741 -msgid "End of Track" -msgstr "Ende des Gleis" - -#: ../bin/ctrain.c:744 -msgid "Open Turnout" -msgstr "Weiche öffnen" - -#: ../bin/ctrain.c:747 -msgid "Manual Stop" -msgstr "Von Hand angehalten" - -#: ../bin/ctrain.c:750 -msgid "No Room" -msgstr "Kein Platz" - -#: ../bin/ctrain.c:756 -msgid "Unknown Status" -msgstr "Unbekannter Zustand" - -#: ../bin/ctrain.c:765 -msgid "No trains" -msgstr "Keine Züge" - -#: ../bin/ctrain.c:1083 -msgid "Train Control XXX" -msgstr "Zugsteuerung XXX" - -#: ../bin/ctrain.c:1084 -#, c-format -msgid "Train Control %d" -msgstr "Zugsteuerung %d" - -#: ../bin/ctrain.c:1086 -msgid "Train Control" -msgstr "Zugsteuerung" - -#: ../bin/ctrain.c:2030 ../bin/dcar.c:1962 -msgid "Road" -msgstr "Gesellschaft" - -#: ../bin/ctrain.c:2030 ../bin/dcar.c:1966 -msgid "Number" -msgstr "Nummer" - -#: ../bin/ctrain.c:2067 ../bin/ctrain.c:2551 -msgid "Train" -msgstr "Zug" - -#: ../bin/ctrain.c:2566 -msgid "Uncouple" -msgstr "Entkuppeln" - -#: ../bin/ctrain.c:2567 -msgid "Flip Car" -msgstr "Wagen umdrehen" - -#: ../bin/ctrain.c:2568 -msgid "Flip Train" -msgstr "Zug umdrehen" - -#: ../bin/ctrain.c:2569 -msgid "MU Master" -msgstr "Mehrtraktionssteuerung" - -#: ../bin/ctrain.c:2570 -msgid "Change Direction" -msgstr "Richtung ändern" - -#: ../bin/ctrain.c:2573 -msgid "Remove Car" -msgstr "Wagen entfernen" - -#: ../bin/ctrain.c:2574 -msgid "Remove Train" -msgstr "Zug entfernen" - -#: ../bin/cturnout.c:82 ../bin/dcar.c:2008 ../bin/dcar.c:2012 -#: ../bin/dcustmgm.c:59 -msgid "New" -msgstr "Neu" - -#: ../bin/cturnout.c:192 -#, c-format -msgid "Turnout path[%d:%d] out of bounds: %d" -msgstr "Weg durch Weiche[%d:%d] ausserhalb der Grenzen: %d" - -#: ../bin/cturnout.c:204 ../bin/cturnout.c:209 -#, c-format -msgid "Turnout path[%d] %d is not a track segment" -msgstr "Weg durch Weiche[%d] % ist kein Gleisabschnitt" - -#: ../bin/cturnout.c:217 -#, c-format -msgid "Turnout path[%d] %d-%d not connected: %0.3f" -msgstr "Weg durch Weiche[%d] %d-%d ist nicht verbunden: %0.3f" - -#: ../bin/cturnout.c:253 -msgid "Unknown special case" -msgstr "Unbekannter Sonderfall" - -#: ../bin/cturnout.c:359 -msgid "Connect Adjustable Tracks" -msgstr "Veränderbare Gleise verbinden" - -#: ../bin/cturnout.c:918 -msgid "splitTurnout: can't find segment" -msgstr "Weiche auftrennen: Gleissegment nicht gefunden" - -#: ../bin/cturnout.c:1328 ../bin/track.c:1899 ../bin/tstraigh.c:534 -msgid "Drag to change track length" -msgstr "Ziehen um die Gleislänge zu ändern" - -#: ../bin/cturnout.c:1339 -#, c-format -msgid "Length=%s" -msgstr "Länge=%s" - -#: ../bin/cturnout.c:1583 ../bin/cturnout.c:2556 -msgid "TURNOUT " -msgstr "WEICHE " - -#: ../bin/cturnout.c:1931 -#, c-format -msgid "%d connections, max distance %0.3f (%s)" -msgstr "%d Verbindungen, max. Abstand %0.3f (%s)" - -#: ../bin/cturnout.c:1936 -#, c-format -msgid "0 connections (%s)" -msgstr "Keine Verbindungen (%s)" - -#: ../bin/cturnout.c:1976 -msgid "Place New Turnout" -msgstr "Neue Weiche setzen" - -#: ../bin/cturnout.c:2235 ../bin/cturnout.c:2291 ../bin/cturnout.c:2407 -#: ../bin/cturnout.c:2519 -msgid "" -"Left drag to move, right drag to rotate, press Space or Return to fix track " -"in place or Esc to cancel" -msgstr "" -"Ziehen mit linker Maustaste zum Verschieben, mit rechter zum Drehen, oder " -"Leerzeichen oder Eingabetaste zum Festlegen oder ESC zum Abbrechen" - -#: ../bin/cturnout.c:2282 -#, c-format -msgid "Angle = %0.3f (%s)" -msgstr "Winkel = %0.3f (%s)" - -#: ../bin/cturnout.c:2372 ../bin/param.c:2584 -msgid "Close" -msgstr "Schliessen" - -#: ../bin/cturnout.c:2389 -msgid "Pick turnout and active End Point, then place on the layout" -msgstr "" -"Weiche und aktiven Endpunkt auswählen und dann auf den Gleisplan setzen" - -#: ../bin/cturntbl.c:47 ../bin/cturntbl.c:241 ../bin/cturntbl.c:771 -#: ../bin/cturntbl.c:784 -msgid "Diameter" -msgstr "Durchmesser" - -#: ../bin/cturntbl.c:242 -msgid "# EndPt" -msgstr "Anzahl Endpunkte" - -#: ../bin/cturntbl.c:276 -#, c-format -msgid "Turntable(%d): Layer=%d Center=[%s %s] Diameter=%s #EP=%d" -msgstr "" -"Drehscheibe(%d): Ebene=%d Mittelpunkt=[%s %s] Durchmesser=%s Anzahl " -"Endpunkte=%d" - -#: ../bin/cturntbl.c:291 ../bin/cturntbl.c:829 -msgid "Turntable" -msgstr "Drehscheibe" - -#: ../bin/cturntbl.c:549 -msgid "Drag to create stall track" -msgstr "Ziehen um Schuppengleis zu erstellen" - -#: ../bin/cturntbl.c:801 -msgid "Create Turntable" -msgstr "Drehscheibe setzen" - -#: ../bin/cundo.c:156 -msgid "Undo Trace" -msgstr "Undo Trace" - -#: ../bin/cundo.c:490 -#, c-format -msgid "Undo: %s" -msgstr "Rückgängig: %s" - -#: ../bin/cundo.c:493 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:133 -msgid "Undo last command" -msgstr "Letzten Befehl rückgängig machen" - -#: ../bin/cundo.c:498 -#, c-format -msgid "Redo: %s" -msgstr "Wiederholen: %s" - -#: ../bin/cundo.c:501 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:103 -msgid "Redo last undo" -msgstr "Rückgängig gemachten Befehl wiederholen" - -#: ../bin/custom.c:160 -#, c-format -msgid "%s Turnout Designer" -msgstr "%s Weichendesigner" - -#: ../bin/custom.c:165 -#, c-format -msgid "%s Version %s" -msgstr "%s Version %s" - -#: ../bin/custom.c:170 -#, c-format -msgid "%s Files|*.xtc" -msgstr "%s-Gleispläne|*.xtc" - -#: ../bin/custom.c:175 -#, c-format -msgid "%s Import Files|*.%sti" -msgstr "%s-Importdateien|*.%sti" - -#: ../bin/custom.c:180 -msgid "Data Exchange Format Files|*.dxf" -msgstr "Data Exchange Format Dateien|*.dxf" - -#: ../bin/custom.c:184 -#, c-format -msgid "%s Record Files|*.%str" -msgstr "%s-Aufzeichnungsdateien|*.%str" - -#: ../bin/custom.c:189 -#, c-format -msgid "%s Note Files|*.not" -msgstr "%s-Notizen|*.not" - -#: ../bin/custom.c:194 -#, c-format -msgid "%s Log Files|*.log" -msgstr "%s-Protokolldateien|*.log" - -#: ../bin/custom.c:199 -#, c-format -msgid "%s PartsList Files|*.txt" -msgstr "%s-Stücklisten|*.txt" - -#: ../bin/dbench.c:38 -msgid " L-Girder" -msgstr "L-Träger" - -#: ../bin/dbench.c:38 -msgid " T-Girder" -msgstr "T-Träger" - -#: ../bin/dbench.c:61 -msgid "On Edge" -msgstr "Hochkant" - -#: ../bin/dbench.c:62 -msgid "Flat" -msgstr "Flach" - -#: ../bin/dbench.c:66 -msgid "Left-Down" -msgstr "Links unten" - -#: ../bin/dbench.c:67 -msgid "Right-Down" -msgstr "Rechts unten" - -#: ../bin/dbench.c:68 -msgid "Left-Up" -msgstr "Links oben" - -#: ../bin/dbench.c:69 -msgid "Right-Up" -msgstr "Rechts oben" - -#: ../bin/dbench.c:70 -msgid "Left-Inverted" -msgstr "Links umgekehrt" - -#: ../bin/dbench.c:71 -msgid "Right-Inverted" -msgstr "Rechts umgekehrt" - -#: ../bin/dbench.c:76 -msgid "Inverted" -msgstr "Umgekehrt" - -#: ../bin/dbench.c:142 -#, c-format -msgid "" -"Bad BenchType for %s:\n" -"%s" -msgstr "" -"Falscher Trägertyp %s:\n" -"%s" - -#: ../bin/dbench.c:142 ../bin/dcar.c:4225 ../bin/dcar.c:4409 ../bin/dcar.c:4419 -#: ../bin/dcar.c:4466 ../bin/dcar.c:4473 ../bin/dcar.c:4491 ../bin/dcar.c:4504 -#: ../bin/dcar.c:4509 ../bin/dcar.c:4538 ../bin/dcar.c:4699 ../bin/fileio.c:242 -#: ../bin/fileio.c:538 ../bin/fileio.c:656 ../bin/fileio.c:749 -#: ../bin/fileio.c:938 ../bin/fileio.c:1231 ../bin/fileio.c:1375 -#: ../bin/fileio.c:1461 ../bin/fileio.c:1507 ../bin/macro.c:165 -#: ../bin/macro.c:833 ../bin/macro.c:849 ../bin/macro.c:1152 -#: ../bin/param.c:2062 ../bin/track.c:931 ../bin/track.c:1297 -#: ../bin/track.c:1588 ../bin/track.c:1592 ../bin/track.c:1612 -#: ../bin/track.c:1674 ../wlib/gtklib/wpref.c:246 ../wlib/gtklib/wpref.c:253 -msgid "Continue" -msgstr "Weiter" - -#: ../bin/dbitmap.c:99 ../bin/dbitmap.c:103 -msgid "Drawn with " -msgstr "Gezeichnet mit " - -#: ../bin/dbitmap.c:113 -msgid "Drawing tracks to BitMap" -msgstr "Gleisplan als Grafik ausgeben" - -#: ../bin/dbitmap.c:120 -msgid "Writing BitMap to file" -msgstr "Grafik in Datei speichern" - -#: ../bin/dbitmap.c:141 -msgid "Print Titles" -msgstr "Ãœberschriften ausgeben" - -#: ../bin/dbitmap.c:141 -msgid "Print Borders" -msgstr "Rahmen ausgeben" - -#: ../bin/dbitmap.c:142 -msgid "Print Centerline" -msgstr "Mittellinie ausgeben" - -#: ../bin/dbitmap.c:149 -msgid " dpi" -msgstr " dpi" - -#: ../bin/dbitmap.c:151 -msgid "Bitmap : 99999 by 99999 pixels" -msgstr "Grafik : 99999 auf 99999 Bildpunkte" - -#: ../bin/dbitmap.c:153 -msgid "Approximate file size: 999.9Mb" -msgstr "Ungefähre Dateigrösse : 999.9Mb" - -#: ../bin/dbitmap.c:183 -#, c-format -msgid "Bitmap : %ld by %ld pixels" -msgstr "Grafik : %ld auf %ld Bildpunkte" - -#: ../bin/dbitmap.c:187 -#, c-format -msgid "Approximate file size : %0.0f" -msgstr "Ungefähre Dateigrösse : %0.0f" - -#: ../bin/dbitmap.c:189 -#, c-format -msgid "Approximate file size : %0.1fKb" -msgstr "Ungefähre Dateigrösse : %0.1fKb" - -#: ../bin/dbitmap.c:191 -#, c-format -msgid "Approximate file size : %0.1fMb" -msgstr "Ungefähre Dateigrösse : %0.1fMb" - -#: ../bin/dbitmap.c:205 ../bin/param.c:2584 ../bin/misc.c:1053 -#: ../bin/misc.c:1123 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:521 -msgid "Cancel" -msgstr "Abbruch" - -#: ../bin/dbitmap.c:210 -msgid "Save Bitmap" -msgstr "Grafik speichern" - -#: ../bin/dbitmap.c:212 -msgid "Bitmap files|*.bmp" -msgstr "Grafikdateien|*.bmp" - -#: ../bin/dbitmap.c:214 -msgid "Bitmap files|*.xpm" -msgstr "Grafikdateien|*.xpm" - -#: ../bin/dbitmap.c:235 -msgid "BitMap" -msgstr "Grafik" - -#: ../bin/dcar.c:45 -msgid "Truck" -msgstr "Drehgestell" - -#: ../bin/dcar.c:45 -msgid "Body" -msgstr "Aufbau" - -#: ../bin/dcar.c:146 ../bin/dcar.c:2437 ../bin/dcar.c:2441 -msgid "Unknown" -msgstr "Unbekannt" - -#: ../bin/dcar.c:479 -msgid "Diesel Loco" -msgstr "Diesellok" - -#: ../bin/dcar.c:480 -msgid "Steam Loco" -msgstr "Dampflok" - -#: ../bin/dcar.c:481 -msgid "Elect Loco" -msgstr "Elektrolok" - -#: ../bin/dcar.c:482 -msgid "Freight Car" -msgstr "Güterwagen" - -#: ../bin/dcar.c:483 -msgid "Psngr Car" -msgstr "Personenwagen" - -#: ../bin/dcar.c:484 -msgid "M-O-W" -msgstr "Arbeitswagen" - -#: ../bin/dcar.c:485 ../bin/doption.c:221 -msgid "Other" -msgstr "Sonstige" - -#: ../bin/dcar.c:1084 ../bin/dcar.c:4776 -msgid "N/A" -msgstr "Keine Angabe" - -#: ../bin/dcar.c:1085 ../bin/dcar.c:4781 -msgid "Mint" -msgstr "Neuwertig" - -#: ../bin/dcar.c:1086 ../bin/dcar.c:4780 -msgid "Excellent" -msgstr "Exzellent" - -#: ../bin/dcar.c:1087 ../bin/dcar.c:4779 -msgid "Good" -msgstr "Gut" - -#: ../bin/dcar.c:1088 ../bin/dcar.c:4778 -msgid "Fair" -msgstr "In Ordnung" - -#: ../bin/dcar.c:1089 ../bin/dcar.c:4777 -msgid "Poor" -msgstr "Schlecht" - -#: ../bin/dcar.c:1365 ../bin/dpricels.c:46 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:392 -msgid "Item" -msgstr "Gegenstand" - -#: ../bin/dcar.c:1912 ../wlib/gtklib/gtkmisc.c:398 -#: ../wlib/mswlib/mswmisc.c:1707 -msgid "Information" -msgstr "Information" - -#: ../bin/dcar.c:1912 -msgid "Customize" -msgstr "Anpassen" - -#: ../bin/dcar.c:1924 -msgid "Sequential" -msgstr "Aufsteigend" - -#: ../bin/dcar.c:1924 -msgid "Repeated" -msgstr "Wiederholend" - -#: ../bin/dcar.c:1935 ../bin/dcar.c:1937 ../bin/dcar.c:5106 -msgid "Prototype" -msgstr "Vorbild" - -#: ../bin/dcar.c:1941 ../bin/dcar.c:4070 ../bin/dcar.c:4075 -msgid "Type" -msgstr "Typ" - -#: ../bin/dcar.c:1943 -msgid "Part" -msgstr "Teil" - -#: ../bin/dcar.c:1945 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:335 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:505 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:506 -msgid "Part Number" -msgstr "Bestellnummer" - -#: ../bin/dcar.c:1947 -msgid "Loco?" -msgstr "Lok?" - -#: ../bin/dcar.c:1951 ../bin/dcar.c:4108 -msgid "Import" -msgstr "Import" - -#: ../bin/dcar.c:1958 -msgid "Mode" -msgstr "Modus" - -#: ../bin/dcar.c:1964 -msgid "Reporting Mark" -msgstr "Wagennummer" - -#: ../bin/dcar.c:1970 -msgid "Car Length" -msgstr "Wagenlänge" - -#: ../bin/dcar.c:1974 -msgid "Truck Centers" -msgstr "Drehgestellabstand" - -#: ../bin/dcar.c:1976 -msgid "Coupler Mount" -msgstr "Kupplungsbefestigung" - -#: ../bin/dcar.c:1978 -msgid "Coupled Length" -msgstr "Gekuppelte Länge" - -#: ../bin/dcar.c:1980 ../bin/dcar.c:3946 -msgid "Coupler Length" -msgstr "Kupplungslänge" - -#: ../bin/dcar.c:1988 -msgid "Purchase Price" -msgstr "Kaufpreis" - -#: ../bin/dcar.c:1990 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:207 -msgid "Current Price" -msgstr "Aktueller Preis" - -#: ../bin/dcar.c:1992 ../bin/dcar.c:4072 ../bin/dcar.c:4077 -msgid "Condition" -msgstr "Zustand" - -#: ../bin/dcar.c:1994 -msgid "Purchase Date" -msgstr "Kaufdatum" - -#: ../bin/dcar.c:1996 ../bin/dcar.c:4077 -msgid "Service Date" -msgstr "Servicedatum" - -#: ../bin/dcar.c:1998 -msgid "Quantity" -msgstr "Anzahl" - -#: ../bin/dcar.c:2000 -msgid "Numbers" -msgstr "Nummern" - -#: ../bin/dcar.c:2002 ../bin/dcar.c:4073 -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:61 -msgid "Notes" -msgstr "Notizen" - -#: ../bin/dcar.c:2009 ../bin/dcustmgm.c:60 -msgid "Car Part" -msgstr "Wagenvorlage" - -#: ../bin/dcar.c:2010 ../bin/dcustmgm.c:61 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:182 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:183 -msgid "Car Prototype" -msgstr "Wagenvorbild" - -#: ../bin/dcar.c:2371 ../bin/dcar.c:2688 -msgid "Undecorated" -msgstr "Unbeschriftet" - -#: ../bin/dcar.c:2429 ../bin/dcar.c:2433 ../bin/fileio.c:656 -msgid "Custom" -msgstr "Individual" - -#: ../bin/dcar.c:2598 -msgid "Undecorated " -msgstr "Unbeschriftet " - -#: ../bin/dcar.c:2818 -#, c-format -msgid "New %s Scale Car" -msgstr "Neuer Wagen in %s" - -#: ../bin/dcar.c:2819 ../bin/dcar.c:2828 ../bin/dcar.c:2837 ../bin/dcar.c:3976 -#: ../bin/dcar.c:4104 -msgid "Add" -msgstr "Hinzufügen" - -#: ../bin/dcar.c:2821 -#, c-format -msgid "Update %s Scale Car" -msgstr "Aktualisiere Wagen in Maßstab %s" - -#: ../bin/dcar.c:2822 ../bin/dcar.c:2831 ../bin/dcar.c:2840 ../bin/dcmpnd.c:166 -msgid "Update" -msgstr "Aktualisieren" - -#: ../bin/dcar.c:2827 -#, c-format -msgid "New %s Scale Car Part" -msgstr "Neue Wagenvorlage in %s" - -#: ../bin/dcar.c:2830 -#, c-format -msgid "Update %s Scale Car Part" -msgstr "Wagenvorlage in %s aktualisieren" - -#: ../bin/dcar.c:2836 -msgid "New Prototype" -msgstr "Neues Vorbild" - -#: ../bin/dcar.c:2839 -msgid "Update Prototype" -msgstr "Aktualisiere Vorbild" - -#: ../bin/dcar.c:3482 -msgid "Enter a 8 digit numeric date" -msgstr "Geben Sie ein 8-stelliges numerisches Datum ein" - -#: ../bin/dcar.c:3485 -msgid "Enter a 8 digit date" -msgstr "Geben Sie ein 8-stelliges Datum ein" - -#: ../bin/dcar.c:3487 -msgid "Enter a date between 19000101 and 21991231" -msgstr "Geben Sie ein Datum zwischen 19000101 und 21991231 ein" - -#: ../bin/dcar.c:3492 -msgid "Invalid month" -msgstr "Ungültiger Monat" - -#: ../bin/dcar.c:3494 -msgid "Invalid day" -msgstr "Ungültiger Kalendertag" - -#: ../bin/dcar.c:3580 -msgid "Enter a Prototype name" -msgstr "Geben Sie den Namen des Vorbild ein" - -#: ../bin/dcar.c:3582 -msgid "Select or Enter a Manufacturer" -msgstr "Hersteller auswählen oder eingeben" - -#: ../bin/dcar.c:3584 -msgid "Enter a Part Number" -msgstr "Bestellnummer eingeben" - -#: ../bin/dcar.c:3586 -msgid "Enter the Car Length" -msgstr "Länge des Wagen eingeben" - -#: ../bin/dcar.c:3588 -msgid "Enter the Car Width" -msgstr "Breite des Wagen eingeben" - -#: ../bin/dcar.c:3590 -msgid "Enter the Truck Centers" -msgstr "Drehgestellabstand eingeben" - -#: ../bin/dcar.c:3592 -msgid "Truck Centers must be less than Car Length" -msgstr "Abstand der Drehgestelle muss kleiner als die Wagenlänge sein" - -#: ../bin/dcar.c:3594 -msgid "Enter the Coupled Length or Coupler Length" -msgstr "Geben Sie die gekuppelte Länge oder die Kupplungslänge ein" - -#: ../bin/dcar.c:3596 -msgid "Enter the Coupled Length" -msgstr "Geben Sie die gekuppelte Länge ein" - -#: ../bin/dcar.c:3598 -msgid "Enter a item Index" -msgstr "Geben Sie eine Kennnummer ein" - -#: ../bin/dcar.c:3600 -msgid "Purchase Price is not valid" -msgstr "Kaufpreis ist nicht gültig" - -#: ../bin/dcar.c:3602 -msgid "Current Price is not valid" -msgstr "Aktueller Preis ist nicht gültig" - -#: ../bin/dcar.c:3604 -msgid "Purchase Date is not valid" -msgstr "Kaufdatum ist nicht gültig" - -#: ../bin/dcar.c:3606 -msgid "Service Date is not valid" -msgstr "Servicedatum ist nicht gültig" - -#: ../bin/dcar.c:3609 -#, c-format -msgid "Item Index %ld duplicated an existing item: updated to new value" -msgstr "Kennnummer %ld existiert bereits: mit neuem Wert aktualisiert" - -#: ../bin/dcar.c:3804 -#, c-format -msgid "Added %ld new Cars" -msgstr "%ld neue Wagen hinzugefügt" - -#: ../bin/dcar.c:3806 -msgid "Added new Car" -msgstr "Neuen Wagen hinzugefügt" - -#: ../bin/dcar.c:3809 -msgid "Updated Car" -msgstr "Wagen aktualisiert" - -#: ../bin/dcar.c:3812 -msgid " and Part" -msgstr " und Teil" - -#: ../bin/dcar.c:3839 -#, c-format -msgid "%s Part: %s %s %s %s %s %s" -msgstr "%s Teil: %s %s %s %s %s %s" - -#: ../bin/dcar.c:3839 ../bin/dcar.c:3856 -msgid "Added new" -msgstr "Neu hinzugefügt" - -#: ../bin/dcar.c:3839 ../bin/dcar.c:3856 -msgid "Updated" -msgstr "Aktualisiert" - -#: ../bin/dcar.c:3855 -#, c-format -msgid "%s Prototype: %s%s." -msgstr "%s Vorbild: %s%s." - -#: ../bin/dcar.c:3857 -msgid ". Enter new values or press Close" -msgstr ". Neue Werte eingeben oder Abbruch drücken" - -#: ../bin/dcar.c:3976 -msgid "New Car Part" -msgstr "Neues Wagenmuster" - -#: ../bin/dcar.c:4071 ../bin/dcar.c:4076 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:365 -msgid "Roadname" -msgstr "Gesellschaft" - -#: ../bin/dcar.c:4071 -msgid "Purc Price" -msgstr "Kaufpreis" - -#: ../bin/dcar.c:4072 ../bin/dcar.c:4077 -msgid "Curr Price" -msgstr "Akt. Preis" - -#: ../bin/dcar.c:4072 -msgid "Purc Date" -msgstr "Kaufdaum" - -#: ../bin/dcar.c:4072 -msgid "Srvc Date" -msgstr "Servicedatum" - -#: ../bin/dcar.c:4073 -msgid "Locat'n" -msgstr "Ort" - -#: ../bin/dcar.c:4076 -msgid "RepMarks" -msgstr "Wagennummer" - -#: ../bin/dcar.c:4076 -msgid "Purch Price" -msgstr "Kaufpreis" - -#: ../bin/dcar.c:4077 -msgid "Purch Date" -msgstr "Kaufdatum" - -#: ../bin/dcar.c:4094 -msgid "Sort By" -msgstr "Sortierung" - -#: ../bin/dcar.c:4102 ../bin/dcustmgm.c:53 ../bin/dcustmgm.c:90 -msgid "Edit" -msgstr "Bearbeiten" - -#: ../bin/dcar.c:4106 ../bin/dcustmgm.c:55 ../bin/misc.c:2072 -msgid "Delete" -msgstr "Löschen" - -#: ../bin/dcar.c:4110 ../bin/fileio.c:1231 -msgid "Export" -msgstr "Export" - -#: ../bin/dcar.c:4112 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:522 -msgid "List" -msgstr "Auflisten" - -#: ../bin/dcar.c:4225 ../bin/dcar.c:4955 ../bin/misc.c:2336 -msgid "Car Inventory" -msgstr "Wagenverzeichnis" - -#: ../bin/dcar.c:4345 -msgid "List Cars" -msgstr "Wagen auflisten" - -#: ../bin/dcar.c:4466 ../bin/dcar.c:4629 -msgid "Import Cars" -msgstr "Wagen importieren" - -#: ../bin/dcar.c:4630 ../bin/dcar.c:4751 -msgid "Comma-Separated-Values|*.csv" -msgstr "durch-Kommata getrente Werte|*.csv" - -#: ../bin/dcar.c:4699 ../bin/dcar.c:4750 -msgid "Export Cars" -msgstr "Wagen exportieren" - -#: ../bin/dcar.c:4784 -msgid "Layout" -msgstr "Anlage" - -#: ../bin/dcar.c:4786 -msgid "Shelf" -msgstr "Regal" - -#: ../bin/dcmpnd.c:70 ../bin/dlayer.c:331 ../bin/misc.c:472 ../bin/misc.c:500 -msgid "Load" -msgstr "Laden" - -#: ../bin/dcmpnd.c:103 -msgid "Updating definitions, please wait" -msgstr "Bitte warten, Definitionen werden aktualisiert" - -#: ../bin/dcmpnd.c:166 -msgid "Update Title" -msgstr "Ãœberschrift aktualisieren" - -#: ../bin/dcmpnd.c:226 -#, c-format -msgid "End-Point #%d of the selected and actual turnouts are not close" -msgstr "" -"Endpunkte #%d der ausgewählten und der aktuellen Weiche sind nicht " -"beieinander" - -#: ../bin/dcmpnd.c:235 -#, c-format -msgid "End-Point #%d of the selected and actual turnouts are not aligned" -msgstr "" -"Endpunkte #%d der ausgewählten und der aktuellen Weiche sind nicht " -"ausgerichtet" - -#: ../bin/dcmpnd.c:254 -msgid "The selected Turnout had a differing number of End-Points" -msgstr "Die ausgewählte Weiche hatte eine andere Anzahl von Endpunkten" - -#: ../bin/dcmpnd.c:315 -msgid "Skip" -msgstr "Ãœberspringen" - -#: ../bin/dcmpnd.c:347 -#, c-format -msgid "%d Track(s) refreshed" -msgstr "%d Gleise bearbeitet" - -#: ../bin/dcmpnd.c:387 -msgid "Refresh Turnout/Structure" -msgstr "Weichen/Gebäude neu laden" - -#: ../bin/dcmpnd.c:389 -msgid "Choose a Turnout/Structure to replace:" -msgstr "Zu ersetzende Weiche / Gebäude auswählen" - -#: ../bin/dcmpnd.c:399 ../bin/doption.c:215 -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:31 -msgid "Turnouts" -msgstr "Weichen" - -#: ../bin/dcmpnd.c:399 -msgid "Structures" -msgstr "Gebäude" - -#: ../bin/dcmpnd.c:428 -msgid "Choose another Turnout/Structure to replace:" -msgstr "Ein anderes zu ersetzende Weiche / Gebäude auswählen" - -#: ../bin/dcmpnd.c:530 -msgid "Rename Object" -msgstr "Objekt umbenennen" - -#: ../bin/dcustmgm.c:57 -msgid "Move To" -msgstr "Verschieben nach" - -#: ../bin/dcustmgm.c:90 -msgid "Rename" -msgstr "Umbenennen" - -#: ../bin/dcustmgm.c:157 -msgid "Label" -msgstr "Beschriftung" - -#: ../bin/dcustmgm.c:192 -msgid "Contents Label" -msgstr "Inhaltsbeschriftung" - -#: ../bin/dcustmgm.c:239 -msgid "Move To XTP" -msgstr "\"In Paramterdatei verschieben" - -#: ../bin/dcustmgm.c:240 -msgid "Parameter File|*.xtp" -msgstr "Parameterdateien|*.xtp" - -#: ../bin/dcustmgm.c:350 -msgid "Manage custom designed parts" -msgstr "Eigene Teile verwalten" - -#: ../bin/dease.c:63 -msgid "Sharp" -msgstr "Eng" - -#: ../bin/dease.c:63 -msgid "Broad" -msgstr "Weit" - -#: ../bin/dease.c:70 -msgid "Value" -msgstr "Wert" - -#: ../bin/dease.c:71 ../bin/tease.c:504 -msgid "R" -msgstr "R" - -#: ../bin/dease.c:73 ../bin/tease.c:505 -msgid "L" -msgstr "L" - -#: ../bin/dease.c:220 -msgid "Easement" -msgstr "Ãœbergangsbogen" - -#: ../bin/denum.c:44 -msgid "Prices" -msgstr "Preise" - -#: ../bin/denum.c:49 -msgid "Save As ..." -msgstr "Speichern unter..." - -#: ../bin/denum.c:129 ../bin/denum.c:184 ../bin/denum.c:219 -msgid "Each" -msgstr "Je" - -#: ../bin/denum.c:143 ../bin/denum.c:144 -msgid "Parts List" -msgstr "Teileliste" - -#: ../bin/denum.c:149 -#, c-format -msgid "" -"%s Parts List\n" -"\n" -msgstr "" -"%s Teileliste\n" -"\n" - -#: ../bin/denum.c:184 ../bin/denum.c:221 ../bin/denum.c:230 -msgid "Extended" -msgstr "Erweitert" - -#: ../bin/denum.c:230 ../bin/denum.c:233 -msgid "Total" -msgstr "Summe" - -#: ../bin/dlayer.c:323 -msgid "Visible" -msgstr "Sichtbar" - -#: ../bin/dlayer.c:325 -msgid "Frozen" -msgstr "Fixiert" - -#: ../bin/dlayer.c:327 -msgid "On Map" -msgstr "Auf der Karte" - -#: ../bin/dlayer.c:330 -msgid "Personal Preferences" -msgstr "Persönliche Einstellungen" - -#: ../bin/dlayer.c:332 ../bin/draw.c:1308 ../bin/macro.c:1241 -msgid "Save" -msgstr "Speichern" - -#: ../bin/dlayer.c:333 -msgid "Defaults" -msgstr "Standardwerte" - -#: ../bin/dlayer.c:334 -msgid "Number of Layer Buttons" -msgstr "Anzahl der Ebenenknöpfe" - -#: ../bin/dlayer.c:351 ../bin/dlayer.c:734 ../bin/dlayer.c:744 -#: ../bin/dlayer.c:788 ../bin/dlayer.c:967 -msgid "Main" -msgstr "Haupt" - -#: ../bin/dlayer.c:456 ../bin/dlayer.c:689 ../bin/dlayer.c:746 -#: ../bin/dlayer.c:790 ../bin/dlayer.c:959 -msgid "Show/Hide Layer" -msgstr "Ebene anzeigen/verbergen" - -#: ../bin/dlayer.c:850 -msgid "Layers" -msgstr "Ebenen" - -#: ../bin/doption.c:99 -msgid "Room Width" -msgstr "Zimmerbreite" - -#: ../bin/doption.c:100 -msgid " Height" -msgstr " -länge" - -#: ../bin/doption.c:101 -msgid "Layout Title" -msgstr "Gleisplantitel" - -#: ../bin/doption.c:102 -msgid "Subtitle" -msgstr "Untertitel" - -#: ../bin/doption.c:104 -msgid " Gauge" -msgstr "Spurweite" - -#: ../bin/doption.c:105 -msgid "Min Track Radius" -msgstr "Mindestgleisradius" - -#: ../bin/doption.c:106 -msgid " Max Track Grade" -msgstr "Maximale Gleissteigung" - -#: ../bin/doption.c:155 -msgid "Layout Options" -msgstr "Gleisplanoptionen" - -#: ../bin/doption.c:213 -msgid "Auto Pan" -msgstr "Automatischer Ausschnitt" - -#: ../bin/doption.c:214 -msgid "Dash" -msgstr "Gestrichelt" - -#: ../bin/doption.c:215 -msgid "All" -msgstr "Alle" - -#: ../bin/doption.c:216 -msgid "Outline" -msgstr "Umriss" - -#: ../bin/doption.c:216 -msgid "Solid" -msgstr "Gefüllt" - -#: ../bin/doption.c:217 -msgid "Off" -msgstr "Aus" - -#: ../bin/doption.c:217 -msgid "On" -msgstr "An" - -#: ../bin/doption.c:218 -msgid "Track Descriptions" -msgstr "Gleisbeschreibungen" - -#: ../bin/doption.c:218 -msgid "Lengths" -msgstr "Längen" - -#: ../bin/doption.c:218 -msgid "EndPt Elevations" -msgstr "Endpunkthöhen" - -#: ../bin/doption.c:218 -msgid "Track Elevations" -msgstr "Gleishöhen" - -#: ../bin/doption.c:218 -msgid "Cars" -msgstr "Wagen" - -#: ../bin/doption.c:219 ../bin/doption.c:220 -msgid "Descr" -msgstr "Beschreibung" - -#: ../bin/doption.c:220 -msgid "Manuf" -msgstr "Hersteller" - -#: ../bin/doption.c:221 -msgid "Tracks" -msgstr "Gleise" - -#: ../bin/doption.c:222 -msgid "Live Map" -msgstr "Dynamische Karte" - -#: ../bin/doption.c:223 -msgid "Hide Trains On Hidden Track" -msgstr "Verberge Züge auf verborgenem Gleis" - -#: ../bin/doption.c:228 -msgid "Color Layers" -msgstr "Ebenenfarben" - -#: ../bin/doption.c:229 -msgid "Draw Tunnel" -msgstr "Zeichne Tunnel" - -#: ../bin/doption.c:230 -msgid "Draw EndPts" -msgstr "Zeichne Endpunkte" - -#: ../bin/doption.c:231 -msgid "Draw Ties" -msgstr "Schwellen zeichnen" - -#: ../bin/doption.c:232 -msgid "Draw Centers" -msgstr "Mittelpunkt zeichnen" - -#: ../bin/doption.c:233 -msgid "Two Rail Scale" -msgstr "Maßstab für Gleis" - -#: ../bin/doption.c:234 -msgid "Map Scale" -msgstr "Kartenmaßstab" - -#: ../bin/doption.c:237 -msgid "Label Enable" -msgstr "Beschriftungen zeigen" - -#: ../bin/doption.c:238 -msgid "Label Scale" -msgstr "Maßstab der Beschriftungen" - -#: ../bin/doption.c:239 -msgid "Label Font Size" -msgstr "Grösse für Beschriftungen" - -#: ../bin/doption.c:240 -msgid "Hot Bar Labels" -msgstr "Teilekatalog Beschriftungen" - -#: ../bin/doption.c:241 -msgid "Layout Labels" -msgstr "Anlagenbeschriftungen" - -#: ../bin/doption.c:242 -msgid "List Labels" -msgstr "Listenüberschriften" - -#: ../bin/doption.c:245 -msgid "Car Labels" -msgstr "Wagenbeschriftungen" - -#: ../bin/doption.c:246 -msgid "Train Update Delay" -msgstr "Aktualisierungsintervalle" - -#: ../bin/doption.c:274 -msgid "Display Options" -msgstr "Anzeigeoptionen" - -#: ../bin/doption.c:275 -msgid "Proto" -msgstr "Vorbild" - -#: ../bin/doption.c:276 -msgid "Proto/Manuf" -msgstr "Vorbild/Hersteller" - -#: ../bin/doption.c:277 -msgid "Proto/Manuf/Part Number" -msgstr "Vorbild/Hersteller/Bestellnr. " - -#: ../bin/doption.c:278 -msgid "Proto/Manuf/Partno/Item" -msgstr "Vorbild/Hersteller/Bestellnr. /lfd. Nr." - -#: ../bin/doption.c:279 -msgid "Manuf/Proto" -msgstr "Hersteller/Vorbild" - -#: ../bin/doption.c:280 -msgid "Manuf/Proto/Part Number" -msgstr "Hersteller/Vorbild/Bestellnr." - -#: ../bin/doption.c:281 -msgid "Manuf/Proto/Partno/Item" -msgstr "Hersteller/Vorbild/Bestellnr./lfd. Nr." - -#: ../bin/doption.c:312 -msgid "End-Points" -msgstr "Endpunkte" - -#: ../bin/doption.c:315 ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:12 -msgid "Describe" -msgstr "Eigenschaften" - -#: ../bin/doption.c:320 -msgid "Normal: Command List, Shift: Command Options" -msgstr "Normal: Befehlsliste, Umschalt: Befehlsoptionen" - -#: ../bin/doption.c:320 -msgid "Normal: Command Options, Shift: Command List" -msgstr "Normal: Befehlsoptionen, Umschalt: Befehlsliste" - -#: ../bin/doption.c:323 -msgid "Draw Moving Tracks" -msgstr "Zeichne bewegte Gleise" - -#: ../bin/doption.c:324 -msgid "Default Command" -msgstr "Standardbefehl" - -#: ../bin/doption.c:326 -msgid "Hide Selection Window" -msgstr "Verberge Auswahlfenster" - -#: ../bin/doption.c:328 -msgid "Right Click" -msgstr "Rechte Mausetaste" - -#: ../bin/doption.c:354 -msgid "Command Options" -msgstr "Befehlsoptionen" - -#: ../bin/doption.c:378 -msgid "English" -msgstr "Englisch" - -#: ../bin/doption.c:378 -msgid "Metric" -msgstr "Metrisch" - -#: ../bin/doption.c:379 -msgid "Polar" -msgstr "Polar" - -#: ../bin/doption.c:379 -msgid "Cartesian" -msgstr "Kartesisch" - -#: ../bin/doption.c:380 -msgid "Balloon Help" -msgstr "Sprechblasen" - -#: ../bin/doption.c:381 -msgid "Load Last Layout" -msgstr "Letzten Gleisplan laden" - -#: ../bin/doption.c:381 -msgid "Start New Layout" -msgstr "Neuen Gleisplan beginnen" - -#: ../bin/doption.c:384 -msgid "Angles" -msgstr "Winkel" - -#: ../bin/doption.c:385 -msgid "Units" -msgstr "Einheiten" - -#: ../bin/doption.c:387 -msgid "Length Format" -msgstr "Längenformat" - -#: ../bin/doption.c:388 -msgid "Min Track Length" -msgstr "Mindestgleislänge" - -#: ../bin/doption.c:389 -msgid "Connection Distance" -msgstr "Verbindungs Abstand" - -#: ../bin/doption.c:390 -msgid "Connection Angle" -msgstr "Verbindungs Winkel" - -#: ../bin/doption.c:391 -msgid "Turntable Angle" -msgstr "Drehscheibenwinkel" - -#: ../bin/doption.c:392 -msgid "Max Coupling Speed" -msgstr "Max. Ankuppelgeschwindigkeit" - -#: ../bin/doption.c:394 -msgid "Drag Distance" -msgstr "Zeichne Entfernung" - -#: ../bin/doption.c:395 -msgid "Drag Timeout" -msgstr "Abriss Zeitverzögerung" - -#: ../bin/doption.c:396 -msgid "Min Grid Spacing" -msgstr "Mindestrasterabstand" - -#: ../bin/doption.c:397 -msgid "Check Point" -msgstr "Sicherungskopie" - -#: ../bin/doption.c:398 -msgid "On Program Startup" -msgstr "Beim Programmstart" - -#: ../bin/doption.c:408 ../bin/doption.c:426 -msgid "999.999" -msgstr "999.999" - -#: ../bin/doption.c:409 ../bin/doption.c:427 -msgid "999.99" -msgstr "999.99" - -#: ../bin/doption.c:410 ../bin/doption.c:428 -msgid "999.9" -msgstr "999.9" - -#: ../bin/doption.c:411 -msgid "999 7/8" -msgstr "999 7/8" - -#: ../bin/doption.c:412 -msgid "999 63/64" -msgstr "999 63/64" - -#: ../bin/doption.c:413 -msgid "999' 11.999\"" -msgstr "999' 11.999\"" - -#: ../bin/doption.c:414 -msgid "999' 11.99\"" -msgstr "999' 11.99\"" - -#: ../bin/doption.c:415 -msgid "999' 11.9\"" -msgstr "999' 11.9\"" - -#: ../bin/doption.c:416 -msgid "999' 11 7/8\"" -msgstr "999' 11 7/8\"" - -#: ../bin/doption.c:417 -msgid "999' 11 63/64\"" -msgstr "999' 11 63/64\"" - -#: ../bin/doption.c:418 -msgid "999ft 11.999in" -msgstr "999ft 11.999in" - -#: ../bin/doption.c:419 -msgid "999ft 11.99in" -msgstr "999ft 11.99in" - -#: ../bin/doption.c:420 -msgid "999ft 11.9in" -msgstr "999ft 11.9in" - -#: ../bin/doption.c:421 -msgid "999ft 11 7/8in" -msgstr "999ft 11 7/8in" - -#: ../bin/doption.c:422 -msgid "999ft 11 63/64in" -msgstr "999ft 11 63/64in" - -#: ../bin/doption.c:423 -msgid "999.999999" -msgstr "999.999999" - -#: ../bin/doption.c:429 -msgid "999.999mm" -msgstr "999.999mm" - -#: ../bin/doption.c:430 -msgid "999.99mm" -msgstr "999.99mm" - -#: ../bin/doption.c:431 -msgid "999.9mm" -msgstr "999.9mm" - -#: ../bin/doption.c:432 -msgid "999.999cm" -msgstr "999.999cm" - -#: ../bin/doption.c:433 -msgid "999.99cm" -msgstr "999.99cm" - -#: ../bin/doption.c:434 -msgid "999.9cm" -msgstr "999.9cm" - -#: ../bin/doption.c:435 -msgid "999.999m" -msgstr "999.999m" - -#: ../bin/doption.c:436 -msgid "999.99m" -msgstr "999.99m" - -#: ../bin/doption.c:437 -msgid "999.9m" -msgstr "999.9m" - -#: ../bin/doption.c:517 -msgid "Preferences" -msgstr "Einstellungen" - -#: ../bin/doption.c:556 -msgid "Marker" -msgstr "Markierung" - -#: ../bin/doption.c:557 -msgid "Border" -msgstr "Rahmen" - -#: ../bin/doption.c:558 -msgid "Primary Axis" -msgstr "Hauptachse" - -#: ../bin/doption.c:559 -msgid "Secondary Axis" -msgstr "Nebenachse " - -#: ../bin/doption.c:560 -msgid "Normal Track" -msgstr "Normales Gleis" - -#: ../bin/doption.c:561 -msgid "Selected Track" -msgstr "Ausgewähltes Gleis" - -#: ../bin/doption.c:562 -msgid "Profile Path" -msgstr "Höhenlinie" - -#: ../bin/doption.c:563 -msgid "Exception Track" -msgstr "Ausnahmegleis" - -#: ../bin/doption.c:564 -msgid "Track Ties" -msgstr "Gleisschwellen" - -#: ../bin/dpricels.c:46 -msgid "Price" -msgstr "Preis" - -#: ../bin/dpricels.c:60 -msgid "Flex Track" -msgstr "Flexgleis" - -#: ../bin/dpricels.c:61 -msgid "costs" -msgstr "kostet" - -#: ../bin/dpricels.c:155 -msgid "Price List" -msgstr "Preisliste" - -#: ../bin/dprmfile.c:102 -#, c-format -msgid "Updating %s" -msgstr "Aktualisiere %s" - -#: ../bin/dprmfile.c:221 -msgid "Show File Names" -msgstr "Dateinamen anzeigen" - -#: ../bin/dprmfile.c:230 ../bin/dprmfile.c:334 -msgid "Unload" -msgstr "Entladen" - -#: ../bin/dprmfile.c:231 -msgid "Browse ..." -msgstr "Durchsuchen..." - -#: ../bin/dprmfile.c:334 -msgid "Reload" -msgstr "Neu laden" - -#: ../bin/dprmfile.c:438 -msgid "Parameter Files" -msgstr "Parameterdateien" - -#: ../bin/dprmfile.c:439 -msgid "Load Parameters" -msgstr "Lade Parameter" - -#: ../bin/dprmfile.c:439 -msgid "Parameter files|*.xtp" -msgstr "Parameterdateien|*.xtp" - -#: ../bin/draw.c:1308 ../bin/macro.c:600 ../bin/misc.c:559 -msgid "Quit" -msgstr "Verlassen" - -#: ../bin/draw.c:1790 -#, c-format -msgid "Zoom In Program Value %ld:1" -msgstr "Programmierter Zoom Größer Wert %ld:1" - -#: ../bin/draw.c:1816 -#, c-format -msgid "Zoom Out Program Value %ld:1" -msgstr "Programmierter Zoom Kleiner Wert %ld:1" - -#: ../bin/draw.c:2426 -msgid "Map" -msgstr "Karte" - -#: ../bin/drawgeom.c:166 ../bin/drawgeom.c:179 -msgid "Drag to place next end point" -msgstr "Ziehen um den nächsten Endpunkt zu setzen" - -#: ../bin/drawgeom.c:224 -msgid "Drag set box size" -msgstr "Ziehen um die Größe des Rechteck zu setzen" - -#: ../bin/drawgeom.c:266 ../bin/drawgeom.c:275 -#, c-format -msgid "Length = %s, Angle = %0.2f" -msgstr "Länge = %s, Winkel = %0.2f" - -#: ../bin/drawgeom.c:292 -#, c-format -msgid "Straight Line: Length=%s Angle=%0.3f" -msgstr "Gerade Linie: Länge=%s Winkel=%0.3f" - -#: ../bin/drawgeom.c:315 -#, c-format -msgid "Curved Line: Radius=%s Angle=%0.3f Length=%s" -msgstr "Gebogene Linie: Radius=%s Winkel=%0.3f Länge=%s" - -#: ../bin/drawgeom.c:330 -#, c-format -msgid "Radius = %s" -msgstr "Radius = %s" - -#: ../bin/drawgeom.c:340 -#, c-format -msgid "Width = %s, Height = %s" -msgstr "Breite = %s, Höhe = %s" - -#: ../bin/drawgeom.c:618 -#, c-format -msgid "Length = %0.3f Angle = %0.3f" -msgstr "Länge = %0.3f Winkel = %0.3f" - -#: ../bin/fileio.c:241 -msgid "" -"\n" -"Do you want to continue?" -msgstr "" -"\n" -"Wollen Sie fortsetzen?" - -#: ../bin/fileio.c:538 -msgid "Parameter" -msgstr "Parameter" - -#: ../bin/fileio.c:678 -#, c-format -msgid "putTitle: title too long: %s" -msgstr "putTitle: Titel ist zu lang: %s" - -#: ../bin/fileio.c:694 -msgid "Unnamed Trackplan" -msgstr "Unbenannter Gleisplan" - -#: ../bin/fileio.c:710 ../bin/fileio.c:1030 -msgid "Check Pointing" -msgstr "Schreibe Sicherungskopie" - -#: ../bin/fileio.c:938 -msgid "Track" -msgstr "Gleis" - -#: ../bin/fileio.c:997 ../bin/fileio.c:1010 -msgid "Save Tracks" -msgstr "Gleise speichern" - -#: ../bin/fileio.c:1018 -msgid "Open Tracks" -msgstr "Gleise einlesen" - -#: ../bin/fileio.c:1183 ../bin/fileio.c:1201 -msgid "Import Tracks" -msgstr "Gleise importieren" - -#: ../bin/fileio.c:1261 -msgid "Export Tracks" -msgstr "Gleise exportieren" - -#: ../bin/fileio.c:1443 -msgid "Export to DXF" -msgstr "Export nach DXF" - -#: ../bin/fileio.c:1461 -msgid "Clipboard" -msgstr "Zwischenablage" - -#: ../bin/fileio.c:1504 ../bin/misc.c:2065 -msgid "Paste" -msgstr "Einfügen" - -#: ../bin/i18n.c:45 -#, c-format -msgid "Gettext initialized (PACKAGE=%s, LOCALEDIR=%s, LC_ALL=%s).\n" -msgstr "Gettext initialisiert (PACKAGE=%s, LOCALEDIR=%s, LC_ALL=%s).\n" - -#: ../bin/macro.c:83 -msgid "Message" -msgstr "Mitteilung" - -#: ../bin/macro.c:86 -msgid "End" -msgstr "Ende" - -#: ../bin/macro.c:165 -msgid "Recording" -msgstr "Aufzeichnen" - -#: ../bin/macro.c:200 -msgid "End of Playback. Hit Step to exit\n" -msgstr "Ende der Aufzeichnung. Schritt zum Beenden drücken\n" - -#: ../bin/macro.c:264 -msgid "Record" -msgstr "Aufzeichnen" - -#: ../bin/macro.c:594 -msgid "Step" -msgstr "Schritt" - -#: ../bin/macro.c:597 ../bin/macro.c:1362 -msgid "Next" -msgstr "Nächster" - -#: ../bin/macro.c:603 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:477 -msgid "Speed" -msgstr "Geschwindigkeit" - -#: ../bin/macro.c:833 ../bin/macro.c:1223 -msgid "Demo" -msgstr "Demo" - -#: ../bin/macro.c:1018 -#, c-format -msgid "Elapsed time %lu\n" -msgstr "Abgelaufene Zeit %lu\n" - -#: ../bin/macro.c:1152 -msgid "Playback" -msgstr "Wiedergabe" - -#: ../bin/macro.c:1226 -msgid "Slowest" -msgstr "Langsamste" - -#: ../bin/macro.c:1227 -msgid "Slow" -msgstr "Langsame" - -#: ../bin/macro.c:1229 -msgid "Fast" -msgstr "Schnelle" - -#: ../bin/macro.c:1230 -msgid "Faster" -msgstr "Schnellere" - -#: ../bin/macro.c:1231 -msgid "Fastest" -msgstr "Schnellste" - -#: ../bin/macro.c:1349 -msgid "Can not find PARAMETER playback proc" -msgstr "Kann die PARAMETER Wiedergabeprozedur nicht finden" - -#: ../bin/param.c:89 -msgid "Black" -msgstr "Schwarz" - -#: ../bin/param.c:91 -msgid "Dark Blue" -msgstr "Dunkelblau" - -#: ../bin/param.c:92 -msgid "Steel Blue" -msgstr "Stahlblau" - -#: ../bin/param.c:93 -msgid "Royal Blue" -msgstr "Königsblau" - -#: ../bin/param.c:94 -msgid "Blue" -msgstr "Blau" - -#: ../bin/param.c:95 -msgid "Deep Sky Blue" -msgstr "Dunkles Himmelblau" - -#: ../bin/param.c:96 -msgid "Light Sky Blue" -msgstr "Helles Himmelblau" - -#: ../bin/param.c:97 -msgid "Powder Blue" -msgstr "Hellblau" - -#: ../bin/param.c:99 -msgid "Dark Aqua" -msgstr "Dunkelaquamarin" - -#: ../bin/param.c:100 -msgid "Aquamarine" -msgstr "Aquamarin" - -#: ../bin/param.c:101 -msgid "Aqua" -msgstr "Wasserblau" - -#: ../bin/param.c:103 -msgid "Dark Green" -msgstr "Dunkelgrün" - -#: ../bin/param.c:104 -msgid "Forest Green" -msgstr "Waldgrün" - -#: ../bin/param.c:105 -msgid "Lime Green" -msgstr "Limonengrün" - -#: ../bin/param.c:106 -msgid "Green" -msgstr "Grün" - -#: ../bin/param.c:107 -msgid "Lawn Green" -msgstr "Rasengrün" - -#: ../bin/param.c:108 -msgid "Pale Green" -msgstr "Blassgrün" - -#: ../bin/param.c:110 -msgid "Dark Yellow" -msgstr "Dunkelgelb" - -#: ../bin/param.c:111 -msgid "Coral" -msgstr "Koralle" - -#: ../bin/param.c:112 -msgid "Orange" -msgstr "Orange" - -#: ../bin/param.c:113 -msgid "Gold" -msgstr "Gold" - -#: ../bin/param.c:114 -msgid "Yellow" -msgstr "Gelb" - -#: ../bin/param.c:116 -msgid "Saddle Brown" -msgstr "Lederbraun" - -#: ../bin/param.c:117 -msgid "Brown" -msgstr "Braun" - -#: ../bin/param.c:118 -msgid "Chocolate" -msgstr "Schokolade" - -#: ../bin/param.c:119 -msgid "Rosy Brown" -msgstr "Braun Rosa" - -#: ../bin/param.c:120 -msgid "Tan" -msgstr "Loh" - -#: ../bin/param.c:121 -msgid "Beige" -msgstr "Beige" - -#: ../bin/param.c:124 -msgid "Dark Red" -msgstr "Dunkelrot" - -#: ../bin/param.c:125 -msgid "Tomato" -msgstr "Tomatenrot" - -#: ../bin/param.c:126 -msgid "Red" -msgstr "Rot" - -#: ../bin/param.c:127 -msgid "Hot Pink" -msgstr "Knallrosa" - -#: ../bin/param.c:128 -msgid "Pink" -msgstr "Rosa" - -#: ../bin/param.c:130 -msgid "Dark Purple" -msgstr "Dunkelpurpur" - -#: ../bin/param.c:131 -msgid "Maroon" -msgstr "Kastanie" - -#: ../bin/param.c:132 -msgid "Purple2" -msgstr "Purpur 2" - -#: ../bin/param.c:133 -msgid "Purple" -msgstr "Purpur" - -#: ../bin/param.c:134 -msgid "Violet" -msgstr "Violett" - -#: ../bin/param.c:136 -msgid "Dark Gray" -msgstr "Dunkelgrau" - -#: ../bin/param.c:137 -msgid "Gray" -msgstr "Grau" - -#: ../bin/param.c:138 -msgid "Light Gray" -msgstr "Hellgrau" - -#: ../bin/param.c:180 -msgid "Unexpected End Of String" -msgstr "Unerwartetes Zeichenkettenende" - -#: ../bin/param.c:187 -msgid "Expected digit" -msgstr "Erwartete Ziffer" - -#: ../bin/param.c:194 -msgid "Overflow" -msgstr "Ãœberlau" - -#: ../bin/param.c:242 -msgid "Divide by 0" -msgstr "Division durch 0" - -#: ../bin/param.c:250 -msgid "Expected /" -msgstr "Erwartet /" - -#: ../bin/param.c:322 -msgid "Invalid Units Indicator" -msgstr "Ungültige Masseinheit" - -#: ../bin/param.c:336 -msgid "Expected End Of String" -msgstr "Erwartet Zeichenkettenende" - -#: ../bin/param.c:359 ../bin/param.c:1385 -#, c-format -msgid "Invalid Number" -msgstr "Ungültige Zahl" - -#: ../bin/param.c:407 -msgid "End Of String" -msgstr "Ende der Zeichenkette" - -#: ../bin/param.c:1392 -#, c-format -msgid "Enter a value > %ld" -msgstr "Einen Wert größer als %ld eingeben" - -#: ../bin/param.c:1394 -#, c-format -msgid "Enter a value < %ld" -msgstr "Einen Wert kleiner als %ld eingeben" - -#: ../bin/param.c:1396 -#, c-format -msgid "Enter a value between %ld and %ld" -msgstr "Einen Wert zwischen %ld und %ld eingeben" - -#: ../bin/param.c:1444 -#, c-format -msgid "Enter a value > %s" -msgstr "Einen Wert größer als %s eingeben" - -#: ../bin/param.c:1447 -#, c-format -msgid "Enter a value < %s" -msgstr "Einen Wert kleiner als %s eingeben" - -#: ../bin/param.c:1450 -#, c-format -msgid "Enter a value between %s and %s" -msgstr "Einen Wert zwischen %s und %s eingeben" - -#: ../bin/param.c:2611 -msgid "Help" -msgstr "Hilfe" - -#: ../bin/smalldlg.c:66 -msgid "Show tips at start" -msgstr "Tipps beim Start anzeigen" - -#: ../bin/smalldlg.c:72 -msgid "Did you know..." -msgstr "Wussten Sie schon..." - -#: ../bin/smalldlg.c:74 -msgid "Previous Tip" -msgstr "Vorheriger Tipp" - -#: ../bin/smalldlg.c:75 -msgid "Next Tip" -msgstr "Nächster Tipp" - -#: ../bin/smalldlg.c:91 -msgid "Tip of the Day" -msgstr "Tipp des Tages" - -#: ../bin/smalldlg.c:100 -msgid "No tips are available" -msgstr "Es sind keine Tipps verfügbar" - -#: ../bin/smalldlg.c:198 -msgid "" -"XTrackCAD is a CAD (computer-aided design) program for designing model " -"railroad layouts." -msgstr "" -"XTrackCAD ist ein CAD (Computer-unterstützter Entwurf) Programm\n" -"zum Entwerfen von Modelleisenbahnanlagen." - -#: ../bin/smalldlg.c:221 ../bin/misc.c:2318 -msgid "About" -msgstr "Ãœber" - -#: ../bin/tcurve.c:228 -#, c-format -msgid "Helix: turns=%ld length=%s grade=%0.1f%% sep=%s" -msgstr "Gleiswendel: Windungen=%ld Länge=%s Steigung=%0.1f%% Abstand=%s" - -#: ../bin/tcurve.c:234 -#, c-format -msgid "Helix: turns=%ld length=%s" -msgstr "Gleiswendel: Windungen=%ld Länge=%s" - -#: ../bin/tcurve.c:351 -msgid "Angular Length" -msgstr "Winkellänge" - -#: ../bin/tcurve.c:527 -#, c-format -msgid "" -"Helix Track(%d): Layer=%d Radius=%s Turns=%ld Length=%s Center=[%s,%s] " -"EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]" -msgstr "" -"Gleiswendel(%d): Ebene=%d Radius=%s Windungen=%ld Länge=%s Mitte=[%s,%s] " -"EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]" - -#: ../bin/tcurve.c:537 -#, c-format -msgid "" -"Curved Track(%d): Layer=%d Radius=%s Length=%s Center=[%s,%s] EP=[%0.3f," -"%0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]" -msgstr "" -"Gleisbogenl(%d): Ebene=%d Radius=%s Länge=%s Mitte=[%s,%s] EP=[%0.3f,%0.3f A" -"%0.3f] [%0.3f,%0.3f A%0.3f]" - -#: ../bin/tcurve.c:614 -msgid "Helix Track" -msgstr "Gleiswendel" - -#: ../bin/tcurve.c:620 -msgid "Curved Track" -msgstr "Gleisbogen" - -#: ../bin/tcurve.c:974 -msgid "Merge Curves" -msgstr "Kurven zusammenfassen" - -#: ../bin/tcurve.c:1041 -msgid "Drag to change angle or create tangent" -msgstr "Ziehen um den Winkel zu ändern oder eine Tangente zu erstellen" - -#: ../bin/tcurve.c:1074 ../bin/tcurve.c:1106 -msgid "Curved " -msgstr "Gebogen " - -#: ../bin/tcurve.c:1080 -msgid "Tangent " -msgstr "Tangente " - -#: ../bin/tcurve.c:1089 -#, c-format -msgid "Tangent track: Length %s Angle %0.3f" -msgstr "Gleistangente: Länge=%s Winkel=%0.3f" - -#: ../bin/tcurve.c:1111 -#, c-format -msgid "Curved: Radius=%s Length=%s Angle=%0.3f" -msgstr "Bogen: Radius=%s Länge=%s Winkel=%0.3f" - -#: ../bin/tease.c:506 -msgid "l0" -msgstr "l0" - -#: ../bin/tease.c:507 -msgid "l1" -msgstr "l1" - -#: ../bin/tease.c:549 -#, c-format -msgid "" -"Joint Track(%d): Layer=%d Length=%0.3f EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A" -"%0.3f]" -msgstr "" -"Ãœbergangsbogen(%d): Ebene=%d Länge=%0.3f EP=[%0.3f,%0.3f A%0.3f] [%0.3f," -"%0.3f A%0.3f]" - -#: ../bin/tease.c:594 -msgid "Easement Track" -msgstr "Ãœgangsbogengleis" - -#: ../bin/tease.c:1260 -msgid "Merge Easements" -msgstr "Ãœbergangsbögen zusammenfassen" - -#: ../bin/tease.c:1325 -msgid "Split Easement Curve" -msgstr "Ãœbergangsbogen auftrennen" - -#: ../bin/track.c:1051 -msgid "Move Objects Above" -msgstr "Objekte nach oben" - -#: ../bin/track.c:1071 -msgid "Mode Objects Below" -msgstr "Objekte nach unten" - -#: ../bin/track.c:1297 -msgid "Audit" -msgstr "Protokoll" - -#: ../bin/track.c:1571 -#, c-format -msgid "%d Track(s) loosened" -msgstr "%d Gleis(e) gelockert" - -#: ../bin/track.c:1578 -msgid "No tracks loosened" -msgstr "Keine Gleise gelockert" - -#: ../bin/track.c:1588 ../bin/track.c:1592 -#, c-format -msgid "Connecting a non-track(%d) to (%d)" -msgstr "Verbinde ein sonstiges Objekt (%d) mit einem Gleis (%d)" - -#: ../bin/track.c:1653 -msgid "Join Abutting Tracks" -msgstr "angrenzende Gleise verbinden" - -#: ../bin/track.c:1913 ../bin/tstraigh.c:548 -#, c-format -msgid "Straight: Length=%s Angle=%0.3f" -msgstr "Gerade: Länge=%s Winkel=%0.3f" - -#: ../bin/tstraigh.c:228 -#, c-format -msgid "" -"Straight Track(%d): Layer=%d Length=%s EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A" -"%0.3f]" -msgstr "" -"Gleisgerade(%d): Ebene=%d Länge=%s EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A" -"%0.3f]" - -#: ../bin/tstraigh.c:462 -msgid "Extending Straight Track" -msgstr "Gleisgerade verlängern" - -#: ../bin/tstraigh.c:541 -msgid "Straight " -msgstr "Gerade " - -#: ../bin/misc.c:156 -msgid "No Messages" -msgstr "Keine Nachrichten" - -#: ../bin/misc.c:301 ../bin/misc.c:304 -msgid "ABORT" -msgstr "ABBRUCH" - -#: ../bin/misc.c:303 -msgid "" -"\n" -"Do you want to save your layout?" -msgstr "" -"\n" -"Wollen Sie Ihren Gleisplan speichern?" - -#: ../bin/misc.c:353 -#, c-format -msgid "No help for %s" -msgstr "Hilfe für %s nicht gefunden" - -#: ../bin/misc.c:456 -msgid "" -"Save changes to the layout design before closing?\n" -"\n" -"If you don't save now, your unsaved changes will be discarded." -msgstr "" -"Sollen die Ãnderungen an Ihrem Gleisplan vor dem Verlassen gespeichert " -"werden?\n" -"\n" -"Wenn Sie jetzt nicht speichern, werden Ihre nicht gespeicherten Ãnderungen " -"verworfen." - -#: ../bin/misc.c:458 ../bin/misc.c:2108 -msgid "&Save" -msgstr "&Speichern" - -#: ../bin/misc.c:458 ../bin/misc.c:482 -msgid "&Cancel" -msgstr "&Abbruch" - -#: ../bin/misc.c:458 -msgid "&Don't Save" -msgstr "&Nicht speichern" - -#: ../bin/misc.c:480 -msgid "" -"Do you want to return to the last saved state?\n" -"\n" -"Revert will cause all changes done since last save to be lost." -msgstr "" -"Wollen Sie auf den letzten gespeicherten Stand zurücksetzen?\n" -"Durch das Zurücksetzen werden alle Ãnderungen seit dem letzen Speichern " -"verloren gehen." - -#: ../bin/misc.c:482 -msgid "&Revert" -msgstr "Zurücksetzen" - -#: ../bin/misc.c:707 -msgid "XTrackCAD Font" -msgstr "XTrackCAD Font" - -#: ../bin/misc.c:789 -#, c-format -msgid "No balloon help for %s\n" -msgstr "Kein Tooltip für %s vorhanden\n" - -#: ../bin/misc.c:791 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:540 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:541 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:543 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:544 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:546 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:547 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:548 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:549 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:550 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:551 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:552 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:553 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:554 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:555 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:556 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:557 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:558 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:559 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:560 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:561 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:562 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:563 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:564 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:565 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:566 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:567 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:568 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:569 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:570 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:571 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:572 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:573 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:574 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:575 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:576 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:577 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:578 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:579 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:580 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:581 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:582 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:583 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:584 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:585 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:586 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:587 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:588 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:589 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:590 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:591 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:592 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:593 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:594 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:595 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:596 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:597 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:598 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:599 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:600 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:602 -msgid "No Help" -msgstr "Keine Hilfe vorhanden" - -#: ../bin/misc.c:1051 ../bin/misc.c:1056 ../bin/misc.c:1121 -msgid "" -"Cancelling the current command will undo the changes\n" -"you are currently making. Do you want to update?" -msgstr "" -"Abbruch des aktuelle Befehls wird alle aktuell laufenden\n" -"Änderungen zurücknehmen. Soll aktualisiert werden?" - -#: ../bin/misc.c:1712 -msgid "Sticky Commands" -msgstr "Wiederholte Befehle" - -#: ../bin/misc.c:1725 -msgid "File Buttons" -msgstr "Dateischaltflächen" - -#: ../bin/misc.c:1726 -msgid "Zoom Buttons" -msgstr "Lupenknöpfe" - -#: ../bin/misc.c:1727 -msgid "Undo Buttons" -msgstr "Rückgängig/Wiederholen" - -#: ../bin/misc.c:1728 -msgid "Easement Button" -msgstr "Ãœbergangsbogen" - -#: ../bin/misc.c:1729 -msgid "SnapGrid Buttons" -msgstr "Fangraster" - -#: ../bin/misc.c:1730 -msgid "Create Track Buttons" -msgstr "Erstelle Gleise" - -#: ../bin/misc.c:1732 -msgid "Layout Control Elements" -msgstr "Elemente zur Anlagensteuerung" - -#: ../bin/misc.c:1734 -msgid "Modify Track Buttons" -msgstr "Verändere Gleise" - -#: ../bin/misc.c:1735 -msgid "Describe/Select" -msgstr "Eigenschaften/Auswählen" - -#: ../bin/misc.c:1736 -msgid "Track Group Buttons" -msgstr "Objekt Werkzeuge" - -#: ../bin/misc.c:1737 -msgid "Train Group Buttons" -msgstr "Zugbetrieb" - -#: ../bin/misc.c:1738 -msgid "Create Misc Buttons" -msgstr "Zeichnen/Schrift Werkzeuge" - -#: ../bin/misc.c:1739 -msgid "Ruler Button" -msgstr "Linealschaltfläche" - -#: ../bin/misc.c:1740 -msgid "Layer Buttons" -msgstr "Ebenenknöpfe" - -#: ../bin/misc.c:1741 -msgid "Hot Bar" -msgstr "Teilekatalog" - -#: ../bin/misc.c:1826 ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:70 -msgid "Change Elevations" -msgstr "Höhen ändern" - -#: ../bin/misc.c:1826 -msgid "Change" -msgstr "Ändern" - -#: ../bin/misc.c:1839 -msgid "Angle:" -msgstr "Winkel:" - -#: ../bin/misc.c:1874 -msgid "180 " -msgstr "180 " - -#: ../bin/misc.c:1875 -msgid "90 CW" -msgstr "90 Uhrzeiger" - -#: ../bin/misc.c:1876 -msgid "45 CW" -msgstr "45 Uhrzeiger" - -#: ../bin/misc.c:1877 -msgid "30 CW" -msgstr "30 Uhrzeiger" - -#: ../bin/misc.c:1878 -msgid "15 CW" -msgstr "15 Uhrzeiger" - -#: ../bin/misc.c:1879 -msgid "15 CCW" -msgstr "15 gegen Uhr" - -#: ../bin/misc.c:1880 -msgid "30 CCW" -msgstr "30 gehen Uhr" - -#: ../bin/misc.c:1881 -msgid "45 CCW" -msgstr "45 gegen Uhr" - -#: ../bin/misc.c:1882 -msgid "90 CCW" -msgstr "90 gegen Uhr" - -#: ../bin/misc.c:1883 -msgid "Enter Angle ..." -msgstr "Winkel eingeben..." - -#: ../bin/misc.c:1910 -msgid "Debug" -msgstr "Fehlersuche (Debug)" - -#: ../bin/misc.c:2036 -msgid "&File" -msgstr "&Datei" - -#: ../bin/misc.c:2037 -msgid "&Edit" -msgstr "&Bearbeiten" - -#: ../bin/misc.c:2038 -msgid "&View" -msgstr "&Ansicht" - -#: ../bin/misc.c:2039 -msgid "&Add" -msgstr "&Hinzufügen" - -#: ../bin/misc.c:2040 -msgid "&Change" -msgstr "&Ändern" - -#: ../bin/misc.c:2041 -msgid "&Draw" -msgstr "&Zeichnen" - -#: ../bin/misc.c:2042 -msgid "&Manage" -msgstr "&Verwalten" - -#: ../bin/misc.c:2043 -msgid "&Options" -msgstr "&Optionen" - -#: ../bin/misc.c:2044 -msgid "&Macro" -msgstr "&Makro" - -#: ../bin/misc.c:2045 -msgid "&Window" -msgstr "&Fenster" - -#: ../bin/misc.c:2046 -msgid "&Help" -msgstr "&Hilfe" - -#: ../bin/misc.c:2052 ../bin/misc.c:2053 -msgid "Commands" -msgstr "Befehle" - -#: ../bin/misc.c:2054 -msgid "Undo" -msgstr "Rückgängig" - -#: ../bin/misc.c:2055 -msgid "Redo" -msgstr "Wiederholen" - -#: ../bin/misc.c:2056 ../bin/misc.c:2057 -msgid "Zoom In" -msgstr "Zoom größer" - -#: ../bin/misc.c:2058 ../bin/misc.c:2059 -msgid "Zoom Out" -msgstr "Zoom kleiner" - -#: ../bin/misc.c:2060 -msgid "SnapGrid Enable" -msgstr "Fangraster aktivieren" - -#: ../bin/misc.c:2061 -msgid "SnapGrid Show" -msgstr "Fangraster anzeigen" - -#: ../bin/misc.c:2064 -msgid "Copy" -msgstr "Kopiere" - -#: ../bin/misc.c:2066 -msgid "Deselect All" -msgstr "Alles Abwählen" - -#: ../bin/misc.c:2074 ../bin/misc.c:2075 -msgid "More" -msgstr "Weiter" - -#: ../bin/misc.c:2104 -msgid "&New" -msgstr "&Neu" - -#: ../bin/misc.c:2105 -msgid "&Open ..." -msgstr "&Öffnen..." - -#: ../bin/misc.c:2109 -msgid "Save &As ..." -msgstr "Speichern &unter..." - -#: ../bin/misc.c:2110 -msgid "Revert" -msgstr "Neu laden" - -#: ../bin/misc.c:2112 -msgid "P&rint Setup ..." -msgstr "Druckereinstellungen..." - -#: ../bin/misc.c:2115 -msgid "&Import" -msgstr "Import" - -#: ../bin/misc.c:2116 -msgid "Export to &Bitmap" -msgstr "Export als Bitmap" - -#: ../bin/misc.c:2117 -msgid "E&xport" -msgstr "Export" - -#: ../bin/misc.c:2118 -msgid "Export D&XF" -msgstr "Export als DXF" - -#: ../bin/misc.c:2121 -msgid "Parameter &Files ..." -msgstr "Parameterdateien..." - -#: ../bin/misc.c:2122 -msgid "No&tes ..." -msgstr "Notizen..." - -#: ../bin/misc.c:2127 -msgid "E&xit" -msgstr "Beenden" - -#: ../bin/misc.c:2133 -msgid "&Undo" -msgstr "Rückgängig" - -#: ../bin/misc.c:2134 -msgid "R&edo" -msgstr "Wiederholen" - -#: ../bin/misc.c:2136 -msgid "Cu&t" -msgstr "Ausschneiden" - -#: ../bin/misc.c:2137 -msgid "&Copy" -msgstr "Kopieren" - -#: ../bin/misc.c:2138 -msgid "&Paste" -msgstr "Einfügen" - -#: ../bin/misc.c:2139 -msgid "De&lete" -msgstr "Löschen" - -#: ../bin/misc.c:2145 -msgid "Select &All" -msgstr "Alles auswählen" - -#: ../bin/misc.c:2146 -msgid "Select Current Layer" -msgstr "Aktuelle Ebene auswählen" - -#: ../bin/misc.c:2147 -msgid "&Deselect All" -msgstr "Alles abwählen" - -#: ../bin/misc.c:2148 -msgid "&Invert Selection" -msgstr "Auswahl umkehren" - -#: ../bin/misc.c:2149 -msgid "Select Stranded Track" -msgstr "Vereinzelte Gleise auswählen" - -#: ../bin/misc.c:2151 -msgid "Tu&nnel" -msgstr "Tunnel" - -#: ../bin/misc.c:2152 -msgid "A&bove" -msgstr "Darüber" - -#: ../bin/misc.c:2153 -msgid "Belo&w" -msgstr "Darunter" - -#: ../bin/misc.c:2156 -msgid "Thin Tracks" -msgstr "Dünne Gleise" - -#: ../bin/misc.c:2157 -msgid "Medium Tracks" -msgstr "Mittlere Gleise" - -#: ../bin/misc.c:2158 -msgid "Thick Tracks" -msgstr "Dicke Gleise" - -#: ../bin/misc.c:2163 -msgid "Zoom &In" -msgstr "Zoom größer" - -#: ../bin/misc.c:2164 -msgid "&Zoom" -msgstr "&Zoom" - -#: ../bin/misc.c:2165 -msgid "Zoom &Out" -msgstr "Zoom kleiner" - -#: ../bin/misc.c:2174 -msgid "&Redraw" -msgstr "Neu zeichnen" - -#: ../bin/misc.c:2175 -msgid "Redraw All" -msgstr "Alles neu zeichnen" - -#: ../bin/misc.c:2178 -msgid "Enable SnapGrid" -msgstr "Fangraster aktivieren" - -#: ../bin/misc.c:2180 -msgid "Show SnapGrid" -msgstr "Fangraster zeigen" - -#: ../bin/misc.c:2187 -msgid "Show Map" -msgstr "Karte anzeigen" - -#: ../bin/misc.c:2192 -msgid "&Tool Bar" -msgstr "Werkzeugleiste anpassen" - -#: ../bin/misc.c:2237 -msgid "&Loosen Tracks" -msgstr "Gleise lockern" - -#: ../bin/misc.c:2246 -msgid "Raise/Lower Elevations" -msgstr "Höhen auf/ab" - -#: ../bin/misc.c:2251 -msgid "Recompute Elevations" -msgstr "Höhen neu berechnen" - -#: ../bin/misc.c:2255 -msgid "Change Scale" -msgstr "Maßstab ändern" - -#: ../bin/misc.c:2272 -msgid "L&ayout ..." -msgstr "Gleisplan..." - -#: ../bin/misc.c:2273 -msgid "&Display ..." -msgstr "Anzeige..." - -#: ../bin/misc.c:2274 -msgid "Co&mmand ..." -msgstr "Befehl..." - -#: ../bin/misc.c:2275 -msgid "&Easements ..." -msgstr "Ãœbergangsbögen..." - -#: ../bin/misc.c:2276 -msgid "&Fonts ..." -msgstr "Schri&ftarten..." - -#: ../bin/misc.c:2277 -msgid "Stic&ky ..." -msgstr "Dauerhaft..." - -#: ../bin/misc.c:2280 -msgid "&Debug ..." -msgstr "&Fehlersuche" - -#: ../bin/misc.c:2282 -msgid "&Preferences ..." -msgstr "Einstellungen..." - -#: ../bin/misc.c:2283 -msgid "&Colors ..." -msgstr "Farben..." - -#: ../bin/misc.c:2288 -msgid "&Record ..." -msgstr "Aufzeichnen..." - -#: ../bin/misc.c:2289 -msgid "&Play Back ..." -msgstr "Wiedergeben..." - -#: ../bin/misc.c:2295 -msgid "Main window" -msgstr "Hauptfenster" - -#: ../bin/misc.c:2307 -msgid "Recent Messages" -msgstr "Letzte Mitteilungen" - -#: ../bin/misc.c:2313 -msgid "Tip of the Day..." -msgstr "Tipp des Tages..." - -#: ../bin/misc.c:2314 -msgid "&Demos" -msgstr "&Demos" - -#: ../bin/misc.c:2328 -msgid "Tur&nout Designer..." -msgstr "Weichendesigner..." - -#: ../bin/misc.c:2330 -msgid "&Group" -msgstr "&Gruppierung" - -#: ../bin/misc.c:2331 -msgid "&Ungroup" -msgstr "Gruppierung aufheben" - -#: ../bin/misc.c:2333 -msgid "Custom defined parts..." -msgstr "Eigene Teile..." - -#: ../bin/misc.c:2334 -msgid "Update Turnouts and Structures" -msgstr "Weichen und Gebäude aktualisieren" - -#: ../bin/misc.c:2340 -msgid "Layers ..." -msgstr "Ebenen..." - -#: ../bin/misc.c:2343 -msgid "Parts &List ..." -msgstr "Teile&liste..." - -#: ../bin/misc.c:2344 -msgid "Price List..." -msgstr "Preisliste..." - -#: ../bin/misc.c:2423 -msgid "" -"Program was not terminated properly. Do you want to resume working on the " -"previous trackplan?" -msgstr "" -"Das Programm wurde nicht ordnungsgemäss beendet. Wollen Sie die Bearbeitung " -"des vorherigen Gleisplans fortsetzen?" - -#: ../bin/misc.c:2424 -msgid "Resume" -msgstr "Fortsetzen" - -#: ../bin/misc.c:2533 -#, c-format -msgid "Unnamed Trackplan - %s(%s)" -msgstr "Unbenannter Gleisplan - %s(%s)" - -#: ../bin/misc.c:2599 -msgid "Initializing commands" -msgstr "Initialisiere Befehle" - -#: ../bin/misc.c:2608 -msgid "Initializing menus" -msgstr "Initialisiere Menüs" - -#: ../bin/misc.c:2645 -msgid "Reading parameter files" -msgstr "Einlesen der Parameterdateien" - -#: ../bin/misc.c:2678 -msgid "Initialization complete" -msgstr "Initialisierung beendet" - -#: ../bin/cprofile.c:471 ../bin/cprofile.c:1270 ../bin/cprofile.c:1366 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:101 -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:40 -msgid "Profile" -msgstr "Höhenprofil" - -#: ../bin/cprofile.c:487 -#, c-format -msgid "%s Profile: %s" -msgstr "%s Höhenprofil: %s" - -#: ../bin/cprofile.c:635 ../bin/cprofile.c:645 -#, c-format -msgid "Elev = %0.1f" -msgstr "Höhe = %0.1f" - -#: ../bin/cprofile.c:647 -#, c-format -msgid "Elev=%0.2f %0.1f%%" -msgstr "Höhe=%0.2f %0.1f%%" - -#: ../bin/cprofile.c:651 -#, c-format -msgid "%0.1f%% Elev = %0.2f" -msgstr "%0.1f%% Höhe = %0.2f" - -#: ../bin/cprofile.c:655 -#, c-format -msgid "%0.1f%% Elev = %0.2f %0.1f%%" -msgstr "%0.1f%% Höhe = %0.2f %0.1f%%" - -#: ../bin/cprofile.c:666 ../bin/cprofile.c:1217 -msgid "Profile Command" -msgstr "Höhenprofil bearbeiten" - -#: ../bin/cprofile.c:674 ../bin/cprofile.c:1275 -msgid "Drag to change Elevation" -msgstr "Ziehen um die Höhe zu ändern" - -#: ../bin/cprofile.c:738 -msgid "Select a Defined Elevation to start Profile" -msgstr "Eine festgelegte Höhe auswählen, um das Höhenprofil zu beginnen" - -#: ../bin/cprofile.c:740 -msgid "Select a Defined Elevation to extend Profile" -msgstr "eine festgelegte Höhe auswählen, um das Höhenprofil zu erweitern" - -#: ../bin/cprofile.c:1285 -msgid "Select a Defined Elevation to start profile" -msgstr "Eine festgelegte Höhe auswählen, um das Höhenprofil zu beginnen" - -#: ../bin/cprofile.c:1368 -msgid "Define" -msgstr "Festlegen" - -#: ../wlib/gtklib/filesel.c:103 -msgid "All files" -msgstr "Alle Dateien" - -#: ../wlib/gtklib/gtkhelp.c:525 -msgid "Home" -msgstr "Startseite" - -#: ../wlib/gtklib/gtkhelp.c:528 -msgid "Contents" -msgstr "Inhaltsverzeichnis" - -#: ../wlib/gtklib/gtkhelp.c:732 -msgid "&Contents" -msgstr "Inhalt" - -#: ../wlib/gtklib/gtkmisc.c:402 ../wlib/mswlib/mswmisc.c:1711 -#: ../wlib/mswlib/mswmisc.c:1750 -msgid "Warning" -msgstr "Warnung" - -#: ../wlib/gtklib/gtkmisc.c:406 ../wlib/mswlib/mswmisc.c:1715 -msgid "Error" -msgstr "Fehler" - -#: ../wlib/gtklib/wpref.c:118 -#, c-format -msgid "" -"The required configuration files could not be located in the expected " -"location.\n" -"\n" -"Usually this is an installation problem. Make sure that these files are " -"installed in either \n" -" %s/share/xtrkcad or\n" -" /usr/lib/%s or\n" -" /usr/local/lib/%s\n" -"If this is not possible, the environment variable %s must contain the name " -"of the correct directory." -msgstr "" -"Die notwenidgen Konfigurationsdaten konnten nicht im erwarteten Verzeichnis " -"gefunden werden.\n" -"\n" -"Ãœblicherweise ist dies ein Instalaltionsproblem. Stellen Sie sicher, dass " -"diese Dateien in entweder\n" -" %s/share/xtrkcad oder\n" -" /usr/lib/%s oder\n" -" /usr/local/lib/%s\n" -"gespeichert sind. Sollte das nicht möglich sein, muss die Umgebungsvariable " -"%s den Namen des korrekten Verzeichnis enthalten." - -#: ../wlib/gtklib/wpref.c:152 ../wlib/gtklib/wpref.c:197 -msgid "HOME is not set" -msgstr "HOME ist nicht gesetzt" - -#: ../wlib/gtklib/wpref.c:152 ../wlib/gtklib/wpref.c:161 -#: ../wlib/gtklib/wpref.c:197 -msgid "Exit" -msgstr "Beenden" - -#: ../wlib/gtklib/wpref.c:160 -#, c-format -msgid "Cannot create %s" -msgstr "Kann %s nicht erstellen" - -#: ../wlib/gtklib/gtkfont.c:252 -msgid "Font Select" -msgstr "Auswahl der Schriftart" - -#: ../wlib/gtklib/gtktext.c:368 -#, c-format -msgid "%d of %d" -msgstr "%d von %d" - -#: ../wlib/mswlib/mswmenu.c:882 -msgid "Ctrl+" -msgstr "Strg+" - -#: ../wlib/mswlib/mswmenu.c:887 -msgid "Alt+" -msgstr "Alt+" - -#: ../wlib/mswlib/mswmenu.c:892 -msgid "Shift+" -msgstr "Umsch+" - -#: ../wlib/mswlib/mswmenu.c:898 -msgid "Space" -msgstr "Abstand" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:7 -#, c-format -msgid "" -"MSG_CANT_PLACE_FROGPOINTS\tFrog|Points cannot be placed on a turnout, circle " -"or helix.\tA %s cannot be placed on a turnout, circle or helix." -msgstr "" -"MSG_CANT_PLACE_FROGPOINTS\tHerzstück|Zungen können nicht auf eine Weiche, " -"einen Kreis oder eine Gleiswendel gesetzt werden.\tEin %s kann nicht auf " -"eine Weiche, einen Kreis oder eine Gleiswendel gelegt werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:8 -msgid "" -"MSG_SEL_TRK_FROZEN\tA frozen layer contains selected track. Command cannot " -"be executed." -msgstr "" -"MSG_SEL_TRK_FROZEN\tEine eingefrorene Ebene enthält ausgewählte...\tEine " -"eingefrorene Ebene enthält ausgewählte Gleise.\n" -"Der Befehl kann nicht ausgeführt werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:9 -msgid "MSG_HELIX_TURNS_GTR_0\tA Helix must have one or more loops of track." -msgstr "" -"MSG_HELIX_TURNS_GTR_0\tEine Gleiswendel muss eine oder mehrere Gleiswindung " -"enthalten." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:10 -msgid "" -"MSG_LARGE_FONT\tA large font has been selected....\tA large font has been " -"selected.\n" -"Large fonts may a take a while to load.\n" -"\n" -"Do you wish to continue?" -msgstr "" -"MSG_LARGE_FONT\tEine grosse Schriftart wurde ausgewählt...\tEine grosse " -"Schriftart wurde ausgewählt.\n" -"Das Laden grosser Schriften kann lange dauern.\n" -"\n" -"Wollen Sie den Vorgang fortsetzen?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:11 -msgid "" -"MSG_TODSGN_DESC_NONBLANK\tAll description fields present in the Turnout..." -"\tAll description fields present in the Turnout\n" -"Designer must contain appropriate information.\n" -"Correct inappropriate values and try again." -msgstr "" -"MSG_TODSGN_DESC_NONBLANK\tAlle vorhandenen Beschreibungsfelder des Weichen " -"Editor...\tAlle Beschreibungsfelder des Weicheneditor\n" -"müssen korrekt ausgefüllt sein. Bitte falsche Werte \n" -"korrigieren und nochmals versuchen." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:12 -msgid "" -"MSG_GROUP_NONBLANK\tAll fields listed in the Group dialog must contain " -"data....\tAll fields listed in the Group dialog must contain data.\n" -"Please enter missing values and try again." -msgstr "" -"MSG_GROUP_NONBLANK\tAlle Felder im Gruppieren-Dialog müssen ausgefüllt " -"sein...\tAlle Felder im Gruppieren-Dialog müssen ausgefüllt sein.\n" -"Bitte die fehlenden Werte ergänzen und nochmals versuchen." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:13 -msgid "" -"MSG_TODSGN_VALUES_GTR_0\tAll values specified in the Turnout Designer must " -"be...\tAll values specified in the Turnout Designer must be\n" -"greater than 0. Correct inappropriate values and try again." -msgstr "" -"MSG_TODSGN_VALUES_GTR_0\tAlle eingegebenen Werte im Weicheneditor müssen..." -"\tAlle eingegebenen Werte im Weicheneditor müssen\n" -"größer als 0 sein. Bitte fehlerhafte Werte korrigieren und nochmal versuchen." - -# -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:14 -msgid "MSG_CURVE_OUT_OF_RANGE\tAngle must be between 0° and 360°." -msgstr "MSG_CURVE_OUT_OF_RANGE\tDer Winkel muss zwischen 0° und 360° liegen." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:15 -#, c-format -msgid "" -"MSG_CUSTMGM_DELETE_CONFIRM\tAre you sure you want to delete the NNN " -"definition(s)?\tAre you sure you want to delete the\n" -"%d definition(s)?" -msgstr "" -"MSG_CUSTMGM_DELETE_CONFIRM\tSind Sie sicher, dass Sie NNN Definitionen " -"löschen wollen?\tSind Sie sicher, dass Sie %d Definitionen\n" -"löschen wollen?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:16 -msgid "MSG_WBITMAP_FAILED\tBitmap create or write function failed." -msgstr "" -"MSG_WBITMAP_FAILED\tErzeugen oder Schreiben der Bitmap ist fehlgeschlagen." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:17 -msgid "MSG_BITMAP_TOO_LARGE\tBitmap is too large." -msgstr "MSG_BITMAP_TOO_LARGE\tBitmap ist zu groß." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:18 -msgid "MSG_CHANGE_ELEV_MODE\tCannot change elevation mode." -msgstr "" -"MSG_CHANGE_ELEV_MODE\tArt der Höhenfestlegung kann nicht geändert werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:19 -msgid "" -"MSG_GRID_ENABLE_SPACE_GTR_0\tCannot Enable Grid; spacing must be greater " -"than 0" -msgstr "" -"MSG_GRID_ENABLE_SPACE_GTR_0\tFangraster kann nicht aktiviert werden. Abstand " -"muss größer als 0 sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:20 -msgid "MSG_LAYER_FREEZE\tCannot freeze current layer" -msgstr "MSG_LAYER_FREEZE\tAktuelle Ebene kann nicht eingefroren werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:21 -msgid "" -"MSG_CANT_GROUP_BUMPER1\tCannot Group Bumper Track. The track has been " -"unselected." -msgstr "" -"Prellbock kann nicht in die Gruppe aufgenommen werden. Das Gleis wurde " -"abgewählt." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:22 -msgid "MSG_CANNOT_GROUP_TRACK\tCannot Group selected track." -msgstr "" -"MSG_CANNOT_GROUP_TRACK\tAusgewähltes Gleis kann nicht gruppiert werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:23 -msgid "MSG_LAYER_HIDE\tCannot hide current layer" -msgstr "MSG_LAYER_HIDE\tAktuelle Ebene kann nicht verborgen werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:24 -msgid "MSG_JOIN_EASEMENTS\tCannot Join; Easements do not align or abut." -msgstr "" -"MSG_JOIN_EASEMENTS\tVerbinden nicht möglich. Ãœbergangsbögen sind nicht " -"ausgerichtet." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:25 -#, c-format -msgid "" -"MSG_TRK_ALREADY_CONN\tFirst|Second track is already connected.\tCannot Join; " -"%s track is already connected." -msgstr "" -"MSG_TRK_ALREADY_CONN\tErstes|zweites Gleis ist bereits verbunden.\tVerbinden " -"nicht möglich, das %s Gleis ist bereits verbunden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:26 -msgid "MSG_JOIN_TURNTABLE\tCannot join from a turntable, try to a turntable" -msgstr "" -"MSG_JOIN_TURNTABLE\tVerbinden von einer Drehscheibe ist nicht möglich, bitte " -"zur Drehscheibe verbinden" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:27 -msgid "MSG_JOIN_SAME\tCannot Join; Selected endpoints are on same track." -msgstr "" -"MSG_JOIN_SAME\tVerbinden nicht möglich, da ausgewählte Endpunkte zum selben " -"Gleis gehören." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:28 -msgid "" -"MSG_SELECTED_TRACKS_PARALLEL\tCannot Join; Selected tracks are parallel." -msgstr "" -"MSG_SELECTED_TRACKS_PARALLEL\tVerbinden nicht möglich, da ausgewählte Gleise " -"parallel sind." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:29 -#, c-format -msgid "" -"MSG_PRMFIL_OPEN_NEW\tCannot open New Parameter File: FILENAME\tCannot open " -"New Parameter File: %s" -msgstr "" -"MSG_PRMFIL_OPEN_NEW\tDie neue Parameterdatei DATEINAME kann nicht geöffnet " -"werden.\tDie neue Parameterdatei %s kann nicht geöffnet werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:30 -msgid "MSG_LAYER_SEL_FROZEN\tCannot select a frozen layer" -msgstr "" -"MSG_LAYER_SEL_FROZEN\tEine eingefrorene Ebene kann nicht ausgewählt werden." - -# -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:31 -msgid "" -"MSG_GRID_SHOW_SPACE_GTR_0\tCannot Show Grid; spacing must be greater than 0" -msgstr "" -"MSG_GRID_ENABLE_SPACE_GTR_0\tFangraster kann nicht angezeigt werden. Abstand " -"muss größer als 0 sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:32 -#, c-format -msgid "MSG_CANT_SPLIT_TRK\tCannot split TYPE track\tCannot split %s track" -msgstr "" -"MSG_CANT_SPLIT_TRK\tTYP Gleis kann nicht aufgetrennt werden\tGleis vom Typ " -"%s kann nicht aufgetrennt werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:33 -#, c-format -msgid "" -"MSG_CUSTMGM_CANT_WRITE\tCannot write to parameter file: FILENAME\tCannot " -"write to parameter file: %s" -msgstr "" -"MSG_PRMFIL_OPEN_NEW\tDie neue Parameterdatei DATEINAME kann nicht geöffnet " -"werden.\tDie neue Parameterdatei %s kann nicht geöffnet werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:34 -msgid "MSG_CARIMP_DUP_INDEX\tCar Index number duplicated." -msgstr "MSG_CARIMP_DUP_INDEX\tWagenkennzahl ist doppelt" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:35 -msgid "" -"MSG_CONN_PARAMS_TOO_SMALL\tConnection parameters reset to minimum values." -msgstr "" -"MSG_CONN_PARAMS_TOO_SMALL\tVerbindungseinstellungen auf die Minimalwerte " -"zurückgesetzt" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:36 -msgid "MSG_CANT_PASTE\tCopy/Paste buffer is empty. There is nothing to Paste." -msgstr "" -"MSG_CANT_PASTE\tZwischenablage ist leer. Es kann nichts eingefügt werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:37 -msgid "" -"MSG_TODSGN_CROSSOVER_TOO_SHORT\tCrossover length is too short. Correct..." -"\tCrossover length is too short. Correct\n" -"inappropriate value(s) and try again." -msgstr "" -"MSG_TODSGN_CROSSOVER_TOO_SHORT\tKreuzungslänge ist zu kurz. Unpassende..." -"\tKreuzungslänge ist zu kurz. Unpassende\n" -"Werte verbessern und nochmals versuchen." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:38 -msgid "MSG_CURVE_TOO_LARGE\tCurved track is too large." -msgstr "MSG_CURVE_TOO_LARGE\tBogengleis ist zu groß." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:39 -msgid "" -"MSG_TODSGN_REPLACE\tDefinition name is already in use. Saving this..." -"\tDefinition name is already in use. Saving this\n" -"definition replaces the existing definition.\n" -"\n" -"Do you want to continue?" -msgstr "" -"MSG_TODSGN_REPLACE\tEin Design mit diesem Namen existiert bereits. " -"Speichern...\tEin Design mit diesem Namen existiert bereits. Speichern\n" -"unter diesem Namen ersetzt das vorhandene Design.\n" -"\n" -"Speichern fortsetzen?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:40 -msgid "MSG_SAVE_CHANGES\tDo you want to save the changes made to your Layout?" -msgstr "" -"MSG_SAVE_CHANGES\tWollen Sie die Veränderungen an Ihrem Gleisplan speichern?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:41 -msgid "" -"MSG_CARIMP_DUP_COLUMNS\tDuplicate column headers found in Car Import file." -msgstr "" -"MSG_CARIMP_DUP_COLUMNS\tDoppelte Spaltenüberschrift in der Wagenimportdatei." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:42 -msgid "MSG_EP_ON_PATH\tEndpoint already on Path." -msgstr "MSG_EP_ON_PATH\tDer Endpunkt ist bereits im Pfad enthalten." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:43 -#, c-format -msgid "" -"MSG_UPGRADE_VERSION1\tFile version %ld is greater than supported...\tFile " -"version %ld is greater than supported\n" -"version %d. You need to upgrade %s\n" -"to at least version %s." -msgstr "" -"MSG_UPGRADE_VERSION1\tDateiversion %ld ist größer als unterstützte Version..." -"\tDateiversion %ld ist größer als unterstützte\n" -"Version %d. Sie sollten %s mindestens auf Version %s\n" -"aktualisieren." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:44 -#, c-format -msgid "" -"MSG_UPGRADE_VERSION2\tFile version %ld is greater than supported...\tFile " -"version %ld is greater than supported\n" -"version %d. You need to upgrade your\n" -"version of %s" -msgstr "" -"MSG_UPGRADE_VERSION2\tDateiversion %ld ist größer als unterstützte Version..." -"\tDateiversion %ld ist größer als unterstützte\n" -"Version %d. Sie sollten %s aktualisieren" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:45 -msgid "" -"MSG_MOVE_POINTS_OTHER_SIDE\tFrog angle prevents placement of points. Move " -"points to opposite side of frog." -msgstr "" -"MSG_MOVE_POINTS_OTHER_SIDE\tDer Weichenwinkel verhindert das Setzen....\tDer " -"Weichenwinkel verhindert das Setzen der Weichenzungen.\n" -"Die Weichenzungen auf die andere Seite der Weiche verschieben." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:46 -msgid "MSG_NO_ROOM_BTW_TRKS\tInsufficient space between existing stall tracks." -msgstr "MSG_NO_ROOM_BTW_TRKS\tZu wenig Platz zwischen den Drehscheibengleisen." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:47 -#, c-format -msgid "" -"MSG_JOIN_DIFFER_ELEV\tJoining tracks with differing elevations (N." -"NNN)\tJoining tracks with differing elevations (%0.2f)" -msgstr "" -"MSG_JOIN_DIFFER_ELEV\tZu verbindende Gleise haben unterschiedliche Höhe(N." -"NNN)\tZu verbindende Gleise haben unterschiedliche Höhe(%0.2f)" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:48 -msgid "MSG_DESC_NOT_VISIBLE\tLabel descriptions not visible" -msgstr "MSG_DESC_NOT_VISIBLE\tBeschriftungen sind nicht sichtbar." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:49 -msgid "MSG_OBJECT_TOO_SHORT\tLength of object is too short." -msgstr "MSG_OBJECT_TOO_SHORT\tDie Länge des Objektes ist zu kurz." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:50 -#, c-format -msgid "" -"MSG_PRINT_MAX_SIZE\tMaximum allowed page size is W x H\tMaximum allowed page " -"size is %s x %s" -msgstr "" -"MSG_PRINT_MAX_SIZE\tDie maximal zulässige Seitengröße ist B x H\tDie maximal " -"zulässige Seitengröße ist %s x %s" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:51 -#, c-format -msgid "" -"MSG_PRMFIL_NO_CONTENTS\tNew Parameter File has no CONTENTS line: FILENAME." -"\tNew Parameter File has no CONTENTS line: %s" -msgstr "" -"MSG_PRMFIL_NO_CONTENTS\tDie neue Parameterdatei enthält keine CONTENTS " -"Zeile: DATEINAME.\tDie neue Parameterdatei enthält keine CONTENTS Zeile: %s." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:52 -msgid "" -"MSG_NO_CARS\tNo Cars are defined for the current scale....\tNo Cars are " -"defined for the current scale.\n" -"\n" -"Do you want to use the Car Inventory dialog?" -msgstr "" -"MSG_NO_CARS\tFür den aktuellen Maßstab sind keine Wagen vorhanden...\tFür " -"den aktuellen Maßstab sind keine Wagen vorhanden.\n" -"\n" -"Soll der Wagenbestandsdialog geöffnet werden?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:53 -msgid "" -"MSG_NO_CARPROTO\tNo Car Prototypes are defined....\tNo Car Prototypes are " -"defined.\n" -"Load a Prototype definition file using the\n" -"Parameter Files dialog or create a Prototype\n" -"definition using the Car Prototype dialog." -msgstr "" -"MSG_NO_CARPROTO\tEs sind keine Vorbildwagen definiert...\tEs sind keine " -"Vorbildwagen definiert.\n" -"Ãœber den Parameterdateidialog muß eine\n" -"Parameterdatei mit Vorbildern geladen werden oder\n" -"ein Vorbild muß über den Wagenvorbilddialog erstellt werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:54 -msgid "MSG_CARIMP_NO_DATA\tNo data present in Car Import file." -msgstr "MSG_CARIMP_NO_DATA\tDie Wagenimportdatei enthält keine Daten." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:55 -msgid "MSG_PRINT_NO_PAGES\tNo pages selected for printing." -msgstr "MSG_PRINT_NO_PAGES\tKeine Seiten zum Drucken ausgewählt." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:56 -msgid "MSG_NO_PATH_TO_EP\tNo path between Profile and selected endpoint." -msgstr "" -"MSG_NO_PATH_TO_EP\tEs existiert keine Verbindung zwischen dem Högenprofil " -"und dem ausgählten Endpunkt." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:57 -#, c-format -msgid "" -"MSG_PRMFIL_NO_MAP\tNo Parameter File Map for CONTENTS\tNo Parameter File Map " -"for %s" -msgstr "" -"MSG_PRMFIL_OPEN_NEW\tDie neue Parameterdatei DATEINAME kann nicht geöffnet " -"werden.\tDie neue Parameterdatei %s kann nicht geöffnet werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:58 -msgid "MSG_NO_SELECTED_TRK\tNo track(s) selected!" -msgstr "MSG_NO_SELECTED_TRK\tEs sind keine Gleise ausgewählt!" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:59 -#, c-format -msgid "" -"MSG_NO_TURNOUTS_AVAILABLE\tNo Turnouts|Structures are available.\tNo %s are " -"available." -msgstr "" -"MSG_NO_TURNOUTS_AVAILABLE\tEs sind keine Weichern | Gebäude verfügbar.\tEs " -"sind keine %s verfügbar." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:60 -msgid "" -"MSG_CARDESC_VALUE_ZERO\tNumeric values on the Car Description...\tNumeric " -"values on the Car Description\n" -"dialog must be greater than 0." -msgstr "" -"MSG_CARDESC_VALUE_ZERO\tNumerische Werte im Wagenbeschreibungsdialog..." -"\tNumerische Werte im Wagenbeschreibungsdialog\n" -"müssen größer als 0 sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:61 -msgid "MSG_MOVE_OUT_OF_BOUNDS\tObject has moved beyond room boundaries." -msgstr "" -"MSG_MOVE_OUT_OF_BOUNDS\tObjekt wurde nach außerhalb des Raumes verschoben." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:62 -msgid "MSG_PARALLEL_SEP_GTR_0\tParallel separation must be greater than 0." -msgstr "MSG_PARALLEL_SEP_GTR_0\tParallelabstand muß größer als 0 sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:63 -msgid "" -"MSG_CARPART_DUPNAME\tPart Number for this Manufacturer already exists...." -"\tPart Number for this Manufacturer already exists.\n" -"\n" -"Do you want to update it?" -msgstr "" -"MSG_CARPART_DUPNAME\tTeilnummer für diesen Hersteller existiert bereits..." -"\tTeilnummer für diesen Hersteller existiert bereits.\n" -"\n" -"Wollen Sie den Artikel aktualisieren?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:64 -#, c-format -msgid "" -"MSG_PLAYBACK_LISTENTRY\tPlayback: Cannot find list entry: NAME\tPlayback: " -"Cannot find list entry: %s" -msgstr "" -"MSG_PLAYBACK_LISTENTRY\tWiedergabe: Der Listeneintrag: NAME kann nicht " -"gefunden werden.\tWiedergabe: der Listeneintrag %s kann nicht gefunden " -"werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:65 -#, c-format -msgid "" -"MSG_PLAYBACK_VERSION_UPGRADE\tPlayback file version %ld is...\tPlayback file " -"version %ld is\n" -"greater than supported version %d\n" -"You need to upgrade your version of %s" -msgstr "" -"MSG_PLAYBACK_VERSION_UPGRADE\tVersion %ld der Wiedergabedatei ist..." -"\tVersion %ld der Wiedergabedatei\n" -"ist neuer als due unterstützte Version %d\n" -"Aktualisierung von %s ist notwendig." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:66 -#, c-format -msgid "" -"MSG_DOMOUSE_BAD_OP\tPlayback: unknown action NNN\tPlayback: unknown action %d" -msgstr "" -"MSG_DOMOUSE_BAD_OP\tWiedergabe: unbekannte AktionNNN\tWiedergabe: unbekannte " -"Aktion %d" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:67 -msgid "MSG_MOVE_POINTS_AWAY_CLOSE\tPoints are to close to frog; move away." -msgstr "" -"MSG_MOVE_POINTS_AWAY_CLOSE\tWeichenzungen sind zu kurz. In größere " -"Entfernung vom Herzstück setzen. " - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:68 -msgid "MSG_POLY_SHAPES_3_SIDES\tPoly shapes must have at least 3 sides." -msgstr "" -"MSG_POLY_SHAPES_3_SIDES\tEin Vieleck muss mindestens drei Seiten haben.." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:69 -msgid "" -"MSG_CARPROTO_DUPNAME\tPrototype name already exists....\tPrototype name " -"already exists.\n" -"\n" -"Do you want to update it?" -msgstr "" -"MSG_CARPROTO_DUPNAME\tEin Vorbild mit diesem Namen existiert bereits...." -"\tEin Vorbild mit diesem Namen existiert bereits.\n" -"\n" -"Wollen Sie dieses Vorbild überschreiben?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:70 -msgid "MSG_RADIUS_GTR_0\tRadius must be greater than 0." -msgstr "MSG_RADIUS_GTR_0\tRadius muss größer als 0 sein.." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:71 -#, c-format -msgid "" -"MSG_RESCALE_TOO_BIG\tRescaled tracks do not fit within layouts room " -"parameters...\tRescaled tracks do not fit within layouts room parameters\n" -"(Height and width). The layouts room parameters should be\n" -"set to at least %s by %s." -msgstr "" -"MSG_RESCALE_TOO_BIG\tNeu skalierte Gleise passen nicht in den Raum...\tNeu " -"skalierte Gleise passen nicht in den Raum\n" -"(Länge und Breite). Die benötigte Größe ist\n" -"mindestens %s auf %s." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:72 -msgid "" -"MSG_CARIMP_MISSING_COLUMNS\tRequired column headers missing from Car Import " -"file." -msgstr "" -"MSG_CARIMP_MISSING_COLUMNS\tDie benötigten Spaltenüberschriften fehlen in " -"der Wagen-ImportDatei." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:73 -#, c-format -msgid "" -"MSG_2ND_TRK_NOT_SEL_UNSEL\tSecond track must be selected|unselected\tSecond " -"track must be %s." -msgstr "" -"MSG_2ND_TRK_NOT_SEL_UNSEL\tDas zweite Gleis darf (nicht) ausgewählt sein." -"\tDas zweite Gleis muss %s sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:74 -msgid "MSG_OUT_OF_BOUNDS\tSelected page is out of bounds." -msgstr "" -"MSG_OUT_OF_BOUNDS\tAusgewählte Dateien sind außerhalb des zulässigen " -"Bereichs." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:75 -msgid "MSG_SEL_POS_FIRST\tSelect position prior to entering Text." -msgstr "" -"MSG_SEL_POS_FIRST\tDie Position muß vor der Texteingabe festgelegt werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:76 -msgid "" -"MSG_CARPROTO_BADSEGS\tSelected shapes must define a rectangular area ..." -"\tSelected shapes must define a rectangular\n" -"area with length greater than height." -msgstr "" -"MSG_CARPROTO_BADSEGS\tDie ausgewählten Formen müssen einen rechtwinkligen..." -"\tDie ausgewählten Formen müssen einen rechtwinkligen\n" -"Bereich bilden, wobei die Länge größer als die Breite sein muss." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:77 -msgid "" -"MSG_TOO_FAR_APART_DIVERGE\tSelected tracks deviate too much or are too far " -"apart from each other." -msgstr "" -"MSG_TOO_FAR_APART_DIVERGE\tDie ausgewählten Gleise weichen zu stark ab..." -"\tDie ausgewählten Gleise weichen zu stark ab oder\n" -"sind zu weit voneinander entfernt." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:78 -msgid "MSG_COMMAND_DISABLED\tSpecified command disabled." -msgstr "MSG_COMMAND_DISABLED\tDieser Befehl ist deaktiviert." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:79 -msgid "MSG_SPLIT_POS_BTW_MERGEPTS\tSplit position between Turnout Points" -msgstr "" -"MSG_SPLIT_POS_BTW_MERGEPTS\tDie Trennstelle befindet sich iin den " -"Weichenzungen." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:80 -msgid "MSG_SPLIT_PATH_NOT_UNIQUE\tSplit position not on unique path" -msgstr "" -"MSG_SPLIT_PATH_NOT_UNIQUE\tTrennstelle ist nicht auf einem eindeutigen " -"Verlauf." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:81 -#, c-format -msgid "" -"MSG_CARIMP_MISSING_DIMS\tThe following car has no dimensions and a...\tThe " -"following car has no dimensions and a\n" -"Car Part description can not be found.\n" -"\n" -"%s\n" -"\n" -"Do you wish to continue importing other Cars?" -msgstr "" -"MSG_CARIMP_MISSING_DIMS\tFür den folgenden Wagen gibt es keine Abmessungen " -"und....\tFür den folgenden Wagen gibt es keine Abmessungen und\n" -"eine Wagenbeschreibung ist nicht vorhanden.\n" -"\n" -"%s\n" -"\n" -"Soll das Einlesen der Wagen fortgesetzt werden?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:82 -#, c-format -msgid "" -"MSG_CARIMP_MISSING_PARTNO\tThe following car has no Part Number...\tThe " -"following car has no Part Number\n" -"\n" -"%s\n" -"\n" -"Do you wish to continue importing other Cars?" -msgstr "" -"MSG_CARIMP_MISSING_PARTNO\tDer folgende Wagen hat keine Teilenummer...\tDer " -"folgende Wagen hat keine Teilenummer.\n" -"\n" -"%s\n" -"\n" -"Soll das Einlesen der Wagen fortgesetzt werden?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:83 -#, c-format -msgid "" -"MSG_CARIMP_IGNORED_COLUMN\tThe following column in the Car Import file will " -"be ignored:...\tThe following column in the Car Import file will be " -"ignored:\n" -"\n" -"%s" -msgstr "" -"MSG_CARIMP_IGNORED_COLUMN\tDiese Spalte in der Wagen-Importdatei wird " -"ignoriert:...\tDiese Spalte in der Wagen-Importdatei wird ignoriert:\n" -"\n" -"%s" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:84 -msgid "" -"MSG_CANT_MOVE_UNDER_TRAIN\tThe position of a turnout or turntable cannot be " -"changed while occupied by a train." -msgstr "" -"MSG_CANT_MOVE_UNDER_TRAIN\tDie Position einer Weiche oder einer " -"Drehscheibe...\tDie Position einer Weiche oder einer Drehscheibe\n" -"kann nicht verändert werden, wenn sich ein Zug darauf befindet." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:85 -msgid "" -"MSG_STRUCT_NO_STRUCTS\tThere are no structures to choose from in the " -"structure...\tThere are no structures to choose from in the structure\n" -"selection list. Please check your SCALE, select the\n" -" menu to load a Parameter File or\n" -"create a new Structure with the Group command." -msgstr "" -"MSG_STRUCT_NO_STRUCTS\tIn der Liste der Gebäude gibt es keine...\tIn der " -"Liste der Gebäude gibt es keine Gebäude,\n" -"die ausgewählt werden können. Bitte Maßstab prüfen, im Menupunkt eine Parameter-Datei wählen\n" -"oder ein neues Gebäude mit dem Gruppieren-Befehl erstellen." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:86 -msgid "" -"MSG_TURNOUT_NO_TURNOUT\tThere are no turnouts to choose from in the " -"turnout...\tThere are no turnouts to choose from in the turnout\n" -"selection list. Please check your SCALE, select the\n" -" menu to enter a new turnout\n" -"or select the menu to load a\n" -"Parameter File" -msgstr "" -"MSG_TURNOUT_NO_TURNOUT\tIn der Weichenauswahl gibt es keine Weichen, die " -"ausgewählt werden können...\tIn der Weichenauswahl gibt es keine Weichen, " -"die ausgewählt werden können.\n" -"Bitte den Maßstab prüfen, über den Menupunkt " -"eine Weiche anlegen oder\n" -"eine Parameter-Datei unter laden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:87 -msgid "MSG_NO_UNCONN_EP\tThere are no unconnected end points for this track" -msgstr "MSG_NO_UNCONN_EP\tDieses Gleis hat keine freien Endpunkte." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:88 -msgid "MSG_PULL_FEW_SECTIONS\tThere are too few sections in this loop." -msgstr "" -"MSG_PULL_FEW_SECTIONS\tIn dieser Schleife gibt es zu wenige Teilstücke." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:89 -msgid "MSG_NO_REDO\tThere is nothing to redo!" -msgstr "MSG_NO_REDO\tEs gibt nichts wiederherzustellen!" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:90 -msgid "MSG_NO_UNDO\tThere is nothing to undo!" -msgstr "MSG_NO_UNDO\tEs gibt nicht rückgängig zu machen!" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:91 -msgid "MSG_TOOMANYSEGSINGROUP\tToo many segments in Group." -msgstr "MSG_TOOMANYSEGSINGROUP\tIn der Gruppe sind zu viele Teile." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:92 -msgid "MSG_CANNOT_CHANGE\tTrack cannot be changed." -msgstr "MSG_CANNOT_CHANGE\tGleis kann nicht verändert werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:93 -msgid "MSG_POINT_INSIDE_TURNTABLE\tTrack endpoint is within turntable radius." -msgstr "" -"MSG_POINT_INSIDE_TURNTABLE\tGleisende befindet sich innerhalb der " -"Drehscheibe." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:94 -msgid "" -"MSG_MOVE_POINTS_AWAY_NO_INTERSECTION\tTrack intersection not possible; move " -"points away from frog." -msgstr "" -"MSG_MOVE_POINTS_AWAY_NO_INTERSECTION\tGleiskreuzung ist nicht möglich, " -"Weichenzungen müssen länger sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:95 -#, c-format -msgid "" -"MSG_TRK_TOO_SHORT\tTrack is too short by N.NNN\t%strack is too short by %0.3f" -msgstr "" -"MSG_TRK_TOO_SHORT\tGleis ist um N.NNN zu kurz.\t%sgleis ist um %0.3f zu kurz." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:96 -#, c-format -msgid "" -"MSG_RADIUS_LSS_EASE_MIN\tTrack radius (N.NNN) is smaller than easement " -"minimum (N.NNN).\tTrack radius (%s) is smaller than easement minimum (%s)." -msgstr "" -"MSG_RADIUS_LSS_EASE_MIN\tGleisradius (N.NNN) ist kleiner als der minimale " -"Ãœbergangsbogen (N.NNN).\tGleisradius (%s) ist kleiner als\n" -"der Mindest-Ãœbergangsbogen (%s)." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:97 -msgid "" -"MSG_CANT_MODIFY_FROZEN_TRK\tTracks in a frozen layer cannot be modified." -msgstr "" -"MSG_CANT_MODIFY_FROZEN_TRK\tGleise in einer gesperrten Ebene können nicht " -"verändert werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:98 -msgid "" -"MSG_SEGMENTS_DIFFER\tTurnout definition contains non-track segments...." -"\tTurnout definition contains non-track segments.\n" -"\n" -"Do you want to include them in this update?" -msgstr "" -"MSG_SEGMENTS_DIFFER\tDie Weichendefinition enthält nicht nur Gleise....\tDie " -"Weichendefinition enthält nicht nur Gleise.\n" -"\n" -"Sollen diese in der Aktrualisierung aufgenommen werden?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:99 -msgid "MSG_TURNTABLE_DIAM_GTR_0\tTurntable diameter must greater than 0." -msgstr "" -"MSG_TURNTABLE_DIAM_GTR_0\tDer Durchmesser der Drehscheibe muß größer als 0 " -"sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:100 -#, c-format -msgid "" -"MSG_UNDO_ASSERT\tUndo assertion failure %s:%d...\tUndo assertion failure %s:" -"%d\n" -"Val = %ld(%lx)\n" -"%s\n" -"Please report this error to the XTrackCAD project development team at " -"SourceForge." -msgstr "" -"MSG_UNDO_ASSERT\tUndo assertion failure %s:%d...\tUndo assertion failure %s:" -"%d\n" -"Val = %ld(%lx)\n" -"%s\n" -"Bitte diesen Fehler an das XTrackCAD Entwicklungsteam in Sourceforge " -"berichten." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:101 -#, c-format -msgid "" -"MSG_PROG_CORRUPTED\tCritical file damaged!...\tCritical file damaged!\n" -"\n" -"%s is corrupt.\n" -"\n" -"Please reinstall software." -msgstr "" -"MSG_PROG_CORRUPTED\tEine kritische Datei ist beschädigt...\tEine kritische " -"Datei ist beschädigt!\n" -"\n" -"%s ist beschädigt.\n" -"\n" -"Bitte XTrackCAD neu installieren." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:102 -#, c-format -msgid "MSG_PT_IS_NOT_TRK\t[X Y] is not a track\t[%s %s] is not a track." -msgstr "" -"MSG_PT_IS_NOT_TRK\tAn [X Y]befindet sich kein Gleis\tAn [%s %s] befindet " -"sich kein Gleis." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:103 -msgid "" -"MSG_BITMAP_SIZE_WARNING\tYou have specified a large Bitmap....\tYou have " -"specified a large Bitmap.\n" -"\n" -"Are you sure you want to continue?" -msgstr "" -"MSG_BITMAP_SIZE_WARNING\tDie Bilddatei wird sehr groß.\tDie Bilddatei wird " -"sehr groß.\n" -"\n" -"Wollen Sie den Vorgang fortsetzen?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:104 -#, c-format -msgid "Are you sure you want to delete these %d car(s)?" -msgstr "Sind Sie sicher, dass Sie diese %d Wagen löschen wollen?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:105 -#, c-format -msgid "" -"Cannot open %s file:\n" -"%s:%s" -msgstr "" -"%sdatei kann nicht geöffnet werden:\n" -"%s:%s" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:106 -#, c-format -msgid "Unrecognized Option: %s" -msgstr "Unbekannte Option: %s" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:107 -#, c-format -msgid "" -"End-Of-Line is unexpected in a quoted field.\n" -"%s\n" -"\n" -"Do you want to continue reading the file?" -msgstr "" -"Unerwartetes Zeilenende in innerhalb von Anführungszeichen.\n" -"%s\n" -"\n" -"Soll das Lesen der Datei fortgesetzt werden?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:108 -#, c-format -msgid "" -"A comma was expected after this quoted field.\n" -"%s\n" -"\n" -"Do you want to continue reading the file?" -msgstr "" -"Erwartetes Komma nach Anführungszeichen fehlt.\n" -"%s\n" -"\n" -"Soll das Laden der Datei fortgesetzt werden?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:109 -#, c-format -msgid "" -"Error \\\\\"%s\\\\\" occurred while writing %s.\n" -"Please check disk space and system status." -msgstr "" -"Fehler \\\\\"%s\\\\\" aufgetreten beim Speichern von %s.\n" -"Bitte Plattenplatz und System prüfen." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:110 -#, c-format -msgid "" -"At least one path for the Turnout T%d does not\n" -"terminate on an endpoint. Such a track cannot be grouped.\n" -"The track has been unselected." -msgstr "" -"Mindestens ein Pfad durch die Weiche T%d endet nicht\n" -"an einem Endpunkt. Solche Gleise können nicht gruppiert werden.\n" -"Das Gleis wurde aus der Auswahl entfernt." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:111 -msgid "inv-pathEndTrk on Path." -msgstr "inv-pathEndTrk auf Pfad." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:112 -msgid "inv-pathStartTrk on Path" -msgstr "inv-pathStartTrk auf Pfad." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:113 -#, c-format -msgid "%s:%d- %s" -msgstr "%s:%d- %s" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:114 -msgid "pathEndTrk not on Path." -msgstr "pathEndTrk nicht auf einem Pfad." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:115 -msgid "pathStartTrk not on Path." -msgstr "pathStartTrk nicht auf einem Pfad." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:116 -msgid "" -"The tracks cannot be connected together.\n" -"\n" -"Try changing some tracks for a closer fit\n" -"or increase the Connection Angle value on\n" -"the Preferences dialog." -msgstr "" -"Die Gleise können nicht verbunden werden.\n" -"\n" -"Versuchen Sie einige Gleise enger zusammenzuführen\n" -"oder ändern Sie den Verbindungswinkel im\n" -"Einstellungsdialog." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:117 -msgid "" -"The tracks cannot be connected together.\n" -"\n" -"Try changing some tracks for a closer fit\n" -"or increase the Connection Distance and\n" -"Angle values on the Preferences dialog" -msgstr "" -"Die Gleise können nicht verbunden werden.\n" -"\n" -"Versuchen Sie einige Gleise enger zusammenzuführen\n" -"oder ändern Sie den Verbindungsabstand und -winkel im\n" -"Einstellungsdialog" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:118 -msgid "" -"The tracks cannot be connected together.\n" -"\n" -"Try changing some tracks for a closer fit\n" -"or increase the Connection Distance" -msgstr "" -"Die Gleise können nicht verbunden werden.\n" -"\n" -"Versuchen Sie einige Gleise enger zusammenzuführen\n" -"oder ändern Sie den Verbindungsabstand im Einstellungsdialog" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:119 -msgid "" -"The first track for the Align\n" -"Rotate command must be Selected." -msgstr "" -"Das erste Gleis für den \"Ausrichten\n" -"Drehen\" Befehl muss ausgewählt sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:120 -msgid "" -"The second track for the Align\n" -"Rotate command must be Unselected." -msgstr "" -"Das zweite Gleis für den \"Ausrichten\n" -"Drehen\" Befehl darf nicht ausgewählt sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:121 -msgid "Too many selected tracks, drawing tracks as End Point." -msgstr "Zu viele ausgewählte Gleise, nur die Endpunkte werden angezeigt" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:122 -msgid "Select an endpoint between two tracks." -msgstr "Einen Endpunkt zwischen zwei Gleisen auswählen." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:123 -msgid "" -"According to values that have been entered the diverging\n" -"track does not connect with the tangent track. Please\n" -"check the values entered and try again. Check the angle\n" -"is entered as a frog number or in degrees as specified\n" -"by Angle Mode radio buttons." -msgstr "" -"Mit den eingegebenen Werten kann das abzweigende\n" -"Gleis nicht mit dem Stammgleis verbunden werden. Bitte\n" -"prüfen Sie die eingegebenen Werte und versuchen es nochmals.\n" -"Prüfen Sie ob der Abzweigwinkel gemäß der der Auswahl richtig als\n" -"Steigung oder als Winkel eingegeben wurde. " - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:124 -msgid "Moved before the end of the turnout" -msgstr "Vor das Ende des Tunnels verschoben" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:125 -msgid "" -"The Coupled Length must be greater than the Car Length,\n" -"and the Coupler Length must be greater than 0." -msgstr "" -"Die gekuppelte Länge muss größer als die Wagenlänge\n" -"und die Kupplerlänge muss größer als 0 sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:126 -msgid "" -"The Car Length value must be greater\n" -"than the Car Width value." -msgstr "" -"Die Wagenlänge muss größer als\n" -"die Wagenbreite sein." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:127 -msgid "" -"The specified Index is already in use.\n" -"The Index will be updated to the next available value." -msgstr "" -"Dier angegebene Indexnummer ist bereits vergeben.\n" -"Die Indexnummer wird auf den nächsten freien Wert aktualisiert." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:128 -msgid "" -"You have changed values for this object.\n" -"\n" -"Are you sure you want to Close?" -msgstr "" -"Sie haben Änderungen an diesem Objekt vorgenommen\n" -"\n" -"Wollen Sie diesen Dialog wirklich beenden?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:129 -#, c-format -msgid "" -"File version %ld is lower than the minimum\n" -"supported version %d. You need to update your\n" -"layout file using an older version of %s" -msgstr "" -"Dateiversion %ld ist älter als die älteste\n" -"unterstütze Version %d. Konvertieren Sie\n" -"die Gleisplandatei mit einer älteren Version von %s\"" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:130 -#, c-format -msgid "" -"%s cannot read the demo file:\n" -"%s" -msgstr "" -"%s kann die Demodatei \":\n" -"%s nicht laden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:131 -#, c-format -msgid "doDemo: bad number (%d)" -msgstr "doDemo: ungültige Zahl (%d)" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:132 -msgid "Playback TIMEEND without TIMESTART" -msgstr "TIMEEND in Wiedergabe ohne TIMESTART" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:133 -#, c-format -msgid "" -"Unknown playback command (%d)\n" -"%s" -msgstr "" -"Unbekannter Wiedergabebefehl (%d)\n" -"%s" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:134 -#, c-format -msgid "" -"Playback file version %ld is lower than the\n" -"minimum supported version %d.\n" -"You need to update your layout file using an\n" -"older version of %s" -msgstr "" -"Wiedergabedatei version %ld ist niedriger als\n" -"die kleinste unterstützte Version %d.\n" -"Sie müssen Ihr Layoutdesign mit einer älteren\n" -"Version von %s aktualisieren." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:135 -#, c-format -msgid "Scale index (%d) is not valid" -msgstr "Maßstab (%d) ist nicht gültig" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:136 -#, c-format -msgid "" -"Scale %s is not valid\n" -"Please check your %s.xtq file" -msgstr "" -"Maßstab %s ist ungültig.\n" -"Bitte prüfen Sie die Datei %s.xtq " - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:137 -msgid "Cannot extend a helix" -msgstr "Eine Gleiswendel kann nicht erweitert werden." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:138 -msgid "Cannot trim a helix" -msgstr "Eine Gleiswendel kann n icht gekürzt werden" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:139 -msgid "Ignore further audit notices?" -msgstr "Weitere Protokollhinweise ignorieren?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:140 -#, c-format -msgid "%s" -msgstr "%s" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:141 -msgid "Audit Abort?" -msgstr "Protokolierung abbrechen?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:142 -msgid "Write Audit File?" -msgstr "Protokolldatei schreiben?" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:143 -#, c-format -msgid "checkTrackLength: Short track length = %0.3f" -msgstr "checkTrackLength: Kurze Gleislänge = %0.3f" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:144 -#, c-format -msgid "checkTrackLength: unknown type: %d" -msgstr "checkTrackLength: Unbekannter Typ: %d" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:145 -#, c-format -msgid "connectTracks: T%d[%d] T%d[%d] d=%0.3f a=%0.3f" -msgstr "connectTracks: T%d[%d] T%d[%d] d=%0.3f a=%0.3f" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:146 -#, c-format -msgid "GetAngleAtPoint: bad type(%d) for T(%d)" -msgstr "GetAngleAtPoint: Falscher Typ (%d) für T(%d)" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:147 -#, c-format -msgid "joinTracks: invalid track type=%d" -msgstr "joinTracks: Ungültiger Gleistyp=%d" - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:148 -#, c-format -msgid "resolveIndex: T%d[%d]: T%d doesn\\\\'t exist" -msgstr "resolveIndex: T%d[%d]: T%d existiert nicht." - -#: ../../../build/xtc_4-2-3dev/app/help/messages.h:149 -msgid "Moved beyond the end of the track" -msgstr "Hinter das Ende des Gleises verschoben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:10 -msgid "Invokes on-line help for this dialog" -msgstr "Aufruf der Kontexthilfe für diesen Dialog" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:11 -msgid "Cancels this command" -msgstr "Befehl abbrechen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:12 -msgid "Closes the dialog" -msgstr "Dialogfenster schliessen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:13 -msgid "About box dialog" -msgstr "Informationen über dieses Programm" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:14 -msgid "Move Selected object to top" -msgstr "Ausgewählte Objekte ganz nach oben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:15 -msgid "Raise or Lower all Selected tracks" -msgstr "Alle ausgewählten Gleise anheben oder absenken" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:16 -msgid "Move Selected object to bottom" -msgstr "Ausgewählte Objekte ganz nach unten" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:21 -msgid "Create a new Car/Loco description" -msgstr "Erstelle eine neue Wegan/Lok-Beschreibung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:22 -msgid "Manage your Car and Loco Inventory" -msgstr "Wagen- und Lokbestand verwalten" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:23 -msgid "Create track circle from center" -msgstr "Erstelle Gleiskreis um Mittelpunkt" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:24 -msgid "Create fixed radius track circle" -msgstr "Erstelle Gleiskreis mit festgelegtem Radius" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:25 -msgid "Set Circle Track creation mode" -msgstr "Wähle Befehl um Gleisbögen zu erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:26 -msgid "Create track circle from tangent" -msgstr "Erstelle Gleiskreis von Tangente" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:27 -msgid "Removes elevation from Selected tracks" -msgstr "Entfernt die Höhenangaben von den ausgewählten Gleisen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:28 -msgid "Command Options dialog" -msgstr "Dialog für die Befehlsoptionen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:29 -msgid "Controls colors" -msgstr "Steuert die Farben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:30 -msgid "Connect two tracks" -msgstr "Gleise zusammenfügen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:31 -msgid "Copy selected objects to clipboard" -msgstr "Ausgewählte Objekte in die Zwischenablage kopieren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:32 -msgid "Create curved track from center" -msgstr "Erstelle Gleisbogen vom Mittelpunkt" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:33 -msgid "Create curved track from chord" -msgstr "Erstelle Gleisbogen von einer Sehne" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:34 -msgid "Create curved track from end-point" -msgstr "Erstelle Gleisbogen von Endpunkt" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:35 -msgid "Set Curve Track creation mode" -msgstr "Wähle Befehl um Gleiskreis zu erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:36 -msgid "Create curved track from tangent" -msgstr "Erstelle Gleisbogen von einer Tangente" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:37 -msgid "Manipulate Custom designer entries" -msgstr "Bearbeite die eigenen Designs" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:38 -msgid "Moves selected objects to clipboard" -msgstr "Ausgewählte Objekte in die Zwischenablage verschieben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:39 -msgid "Delete objects" -msgstr "Objekte löschen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:40 -msgid "Playback demos" -msgstr "Demos abspielen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:41 -msgid "Describe objects" -msgstr "Objekte beschreiben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:42 -msgid "Deselect all selected objects" -msgstr "Ausgewählte Objekte abwählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:43 -msgid "Change Display parameters" -msgstr "Anzeigeeigenschaften ändern" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:44 -msgid "Create benchwork" -msgstr "Erstelle Unterbau" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:45 -msgid "Create a box" -msgstr "Ein Viereck erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:46 -msgid "Set Circle drawing command" -msgstr "Wähle Befehl um Kreise zu zeichnen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:47 -msgid "Create a circle" -msgstr "Einen Kreis erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:48 -msgid "Draw a circle line from center" -msgstr "Zeichne Kreislinie um Mittelpunkt" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:49 -msgid "Draw a fixed radius circle line" -msgstr "Zeichne einen Kreisbogen mit festen Radius" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:50 -msgid "Draw a circle line from tangent" -msgstr "Zeichne Kreis von Tangente" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:51 -msgid "Set Curve drawing command" -msgstr "Wähle Befehl um gebogene Linien zu zeichnen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:52 -msgid "Create a curved line" -msgstr "Eine gebogene Linie erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:53 -msgid "Create a curved line from End" -msgstr "gebogene Linie von einem Endpunkt erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:54 -msgid "Create a curved line from center" -msgstr "gebogene Linie vom Mittelpunkt aus erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:55 -msgid "Create a curved line from chord" -msgstr "gebogene Linie von einer Sehne erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:56 -msgid "Create a curved line from tangent" -msgstr "gebogene Linie von einer Tangente erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:57 -msgid "Create a dimension line" -msgstr "Zeichne Maßlinie" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:58 -msgid "Create a filled box" -msgstr "Ein gefülltes Viereck erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:59 -msgid "Create a filled circle" -msgstr "Einen gefüllten Kreis erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:60 -msgid "Draw a filled circle from center" -msgstr "Zeichne gefüllten Kreis um Mittelpunkt" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:61 -msgid "Draw a fixed radius filled circle" -msgstr "Zeichne einen gefüllten Kreis mit festem Radius" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:62 -msgid "Draw a filled circle from tangent" -msgstr "Zeichne gefüllten Kreis von Tangente" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:63 -msgid "Create a filled polygon" -msgstr "Ein gefültes Polygon erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:64 -msgid "Create a polyline" -msgstr "Eine Polylinie erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:65 -msgid "Create a straight line" -msgstr "Eine gerade Linie erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:66 -msgid "Set Line drawing command" -msgstr "Wähle Befehl um Linien zu zeichnen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:67 -msgid "Set Shape drawing command" -msgstr "Wähle Befehl um Formen zu zeichnen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:68 -msgid "Draw table edge" -msgstr "Tischkante zeichnen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:69 -msgid "Easement menu" -msgstr "Einstellungen für Ãœbergangsbögen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:71 -msgid "Generate a Parts List of selected objects" -msgstr "Teileliste aus den ausgewählten Objekten erzeugen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:72 -msgid "Export a .xti file" -msgstr "Export in XTI Datei" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:73 -msgid "Export a DXF file" -msgstr "Export nach DXF" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:74 -msgid "General note about the layout" -msgstr "Allgemeine Notiz zur Anlage" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:75 -msgid "Flip selected objects" -msgstr "Ausgewählte Objekte spiegeln" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:76 -msgid "Adjust snap grid" -msgstr "Fangraster anpassen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:77 -msgid "Enable snap grid" -msgstr "Fangraster aktivieren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:78 -msgid "Show snap grid" -msgstr "Fangraster anzeigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:79 -msgid "Create a structure from a Group of objects" -msgstr "Objekte zu einer Gruppierung zusammen fassen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:80 -msgid "Create a hand-laid turnout" -msgstr "Handgemachte Weiche erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:81 -msgid "Create a track helix" -msgstr "Eine Gleiswendel erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:82 -msgid "Import a .xti file" -msgstr "Importieren einer .xti-Datei" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:83 -msgid "Join two tracks" -msgstr "Zwei Gleise zusammenfügen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:84 -msgid "Change Layers" -msgstr "Ebenen ändern" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:85 -msgid "Selects the current drawing layer" -msgstr "Auswahl der aktuellen Zeichenebene" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:86 -msgid "Layout parameters" -msgstr "Gleisplaneinstellungen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:87 -msgid "Modify or extend a track" -msgstr "Ändern oder erweitern eines Gleises" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:88 -msgid "Move selected objects" -msgstr "Ausgewählte Objekte verschieben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:89 -msgid "Move a label" -msgstr "Beschreibung verschieben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:90 -msgid "Move selected objects to current layer" -msgstr "Ausgewählte Objekte auf die aktuelle Ebene verschieben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:92 -msgid "Print a BitMap" -msgstr "Drucke in eine Grafikdatei" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:93 -msgid "Create a parallel track" -msgstr "Ein Parallelgleis erzeugen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:94 -msgid "Register" -msgstr "Registrierem" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:95 -msgid "Copy objects from clipboard" -msgstr "Objekte von der Zwischenablage kopieren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:96 -msgid "Perferences dialog" -msgstr "Einstellungen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:97 -msgid "Display prices of turnouts, sectional tracks and structures" -msgstr "Die Preise von Weichen, Gleisen und Gebäuden anzeigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:98 -msgid "Print the layout" -msgstr "Gleisplan ausdrucken" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:99 -msgid "Loads and unloads parameter files" -msgstr "Parameterdateien laden und entladen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:100 -msgid "Elevation Profile Command" -msgstr "Höhenprofil bearbeiten" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:102 -msgid "Command recorder" -msgstr "Befehlsaufzeichnung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:104 -msgid "Update selected Turnout and Structure definitions" -msgstr "Die ausgewählten Gebäude und Weichen aktualisieren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:105 -msgid "Rescale selected objects" -msgstr "Ausgewählte Objekte skalieren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:106 -msgid "Rotate selected object(s)" -msgstr "Ausgewählte Objekte drehen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:107 -msgid "Show a ruler" -msgstr "Lineal anzeigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:108 -msgid "Select objects" -msgstr "Objekte auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:109 -msgid "Selects all objects on the layout" -msgstr "Alle Objekte des Gleisplan auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:110 -msgid "Selects all objects in the current Layer" -msgstr "Alle Objekte der aktuellen Ebene auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:111 -msgid "Invert current selection" -msgstr "Auswahl umkehren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:112 -msgid "Split a track" -msgstr "Gleis trennen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:113 -msgid "Select stranded (unconnected) track pieces" -msgstr "Vereinzelte (nicht verbundene) Gleisstücke auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:114 -msgid "Choose which commands are sticky" -msgstr "Auswahl dauerhafter Befehle" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:115 -msgid "Create straight track" -msgstr "Gerades Gleis erzeugen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:116 -msgid "Place a structure on the layout" -msgstr "Ein Gebäude auf den Gleisplan setzen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:121 -msgid "Enter text on the layout" -msgstr "Text auf den Gleisplan" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:122 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:468 -msgid "Controls the size of the entered text" -msgstr "Auswahl der Schriftgröße für einzugebenden Text" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:123 -msgid "Tip of the Day window" -msgstr "Tipp des Tages" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:124 -msgid "Run Trains" -msgstr "Zugbetrieb" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:125 -msgid "Pause/Resume Trains" -msgstr "Zugbetrieb pausieren/fortsetzen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:126 -msgid "Place a car on the layout" -msgstr "Einen Wagen auf den Gleisplan setzen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:127 -msgid "Exit Trains" -msgstr "Zugbetrieb beenden" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:128 -msgid "Hide/Unhide a track" -msgstr "Verbergen/Zeigen eines Gleises" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:129 -msgid "Place a turnout or sectional track" -msgstr "Weiche oder Gleis platzieren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:130 -msgid "Create a new turnout definition" -msgstr "Erstelle eine neue Weichendefinition" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:131 -msgid "Place a turntable" -msgstr "Eine Drehscheibe setzen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:132 -msgid "Updates old source files with 3 part titles" -msgstr "Aktualisiere alte Dateien mit dreiteiligen Titeln" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:134 -msgid "Ungroup objects" -msgstr "Gruppierung aufheben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:135 -msgid "Draw tracks with thin lines" -msgstr "Gleise mit dünnen Linien zeichnen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:136 -msgid "Draw tracks with medium lines" -msgstr "Gleise mit mittleren Linien zeichnen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:137 -msgid "Draw tracks with thick lines" -msgstr "Gleise mit dicken Linien zeichnen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:138 -msgid "Change drawing scale" -msgstr "Zeichenmaßstab auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:139 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:151 -msgid "Zoom in" -msgstr "Zoom größer" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:140 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:152 -msgid "Zoom out" -msgstr "Zoom kleiner" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:141 -msgid "File Menu" -msgstr "Dateimenue" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:142 -msgid "Save layout" -msgstr "Gleisplan speichern" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:143 -msgid "Save layout under a new name " -msgstr "Gleisplan mit neuem Namen speichern" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:144 -msgid "New layout" -msgstr "Neuer Gleisplan" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:145 -msgid "Generate parts list" -msgstr "Teileliste erzeugen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:146 -msgid "Load a layout" -msgstr "Gleisplan laden" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:147 -msgid "Exit the program" -msgstr "Programm beenden" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:148 -msgid "Revert to last saved state of layout plan" -msgstr "Zum letzten gespeicherten Stand zurücksetzen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:149 -msgid "Edit menu" -msgstr "Menü für Bearbeitungsfunktionen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:150 -msgid "Redraw layout" -msgstr "Gleisplan neu zeichnen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:153 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:156 -msgid "Tools menu" -msgstr "Werkzeug Menu" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:154 -msgid "View menu" -msgstr "Menü für Anzeigefuinktionen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:155 -msgid "Toolbar configuration" -msgstr "Konfiguration der Werkzeugleiste" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:157 -msgid "Options menu" -msgstr "Optionen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:158 -msgid "Playback/Record commands" -msgstr "Aufzeichnungs- und Wiedergabebefehle" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:159 -msgid "Window menu" -msgstr "Fenstermenu" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:160 -msgid "Help menu" -msgstr "Menu für Hilfe" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:161 -msgid "Recent error messages and explanations" -msgstr "Aktuellste Fehlermeldungen und Erläuterungen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:162 -msgid "Move Hot Bar left" -msgstr "Schnellauswahl nach links bewegen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:163 -msgid "Move Hot Bar right" -msgstr "Schnellauswahl nach rechts bewegen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:164 -msgid "Total track count" -msgstr "Gesamtzahl der Gleise" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:165 -msgid "X Position of cursor" -msgstr "X Position des Zeiger" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:166 -msgid "Y Position of cursor" -msgstr "Y Position des Zeiger" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:167 -msgid "Drawing scale" -msgstr "Zeichnungsmaßstab" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:168 -msgid "Message and status line" -msgstr "Nachrichten- und Statuszeile" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:169 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:170 -msgid "Main layout canvas" -msgstr "Hauptzeichenbereich" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:171 -msgid "Main drawing canvas" -msgstr "Hauptzeichenbereich" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:172 -msgid "Command buttons" -msgstr "Befehle" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:173 -msgid "Menus" -msgstr "Menues" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:174 -msgid "Tile, Filename and Window Manager buttons" -msgstr "Tile, Filename and Window Manager buttons" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:175 -msgid "Turnout and Structure Hot Bar" -msgstr "Weichen und Gebäude Auswahlleiste" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:176 -msgid "Active layer list and layer buttons" -msgstr "Liste der aktiven Ebene und Ebenen-Knöpfe" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:177 -msgid "Map window" -msgstr "Kartenfenster" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:178 -msgid "This is the portion of the layout shown in the Main Window canvas" -msgstr "Dieser Teil der Gleisplans wird auf der Hauptzeichenfläche angezeigt" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:179 -msgid "Raise or Lower all Selected Track" -msgstr "Anheben oder Absenken der ausgewählten Gleise" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:180 -msgid "Add or Update car object" -msgstr "Einen Wagen zufügen oder aktualisieren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:181 -msgid "Manufacturer name" -msgstr "Name des Herstellers" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:184 -msgid "Is the Car a Locomotive?" -msgstr "Ist der Wagen eine Lokomotive?" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:185 -msgid "Part Number and Description" -msgstr "Bestellnr. und Beschreibung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:186 -msgid "Manufacturer Part Number" -msgstr "Bestellnummer des Herstellers" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:187 -msgid "Use the Selected figure as the car image" -msgstr "Benutze die ausgewählte Zeichnung als Wagenabbild" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:188 -msgid "Use the default figure as the car image" -msgstr "Benutze die Standardzeichnung als Wagenabbild" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:189 -msgid "Optional description of the Car Part" -msgstr "Optionale Beschreibung des Wagenmuster" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:190 -msgid "Flip car image" -msgstr "Wagenabbild spiegeln" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:191 -msgid "Display Car Item information or reporting marks and dimensions" -msgstr "Informationen über den Wagen oder Kennzeichen und Abmessungen anzeigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:192 -msgid "Full Roadname" -msgstr "Bahngesellschaft" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:193 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:194 -msgid "Car Type" -msgstr "Wagenart" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:195 -msgid "Reporting Marks (Roadname abbreviation)" -msgstr "Wagenkennzeichen " - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:196 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:366 -msgid "Car Number" -msgstr "Wagennummer" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:197 -msgid "Car body Color" -msgstr "Wagenfarbe" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:198 -msgid "Length of car body" -msgstr "Länge des Aufbau" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:199 -msgid "Width of car body" -msgstr "Breite des Aufbau" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:200 -msgid "Distance between Trucks " -msgstr "Abstand zwischen den Drehgestellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:201 -msgid "Coupler are mounted on body or truck" -msgstr "Kupplungen sind am Wagenaufbau oder an den Drehgestellen befestigt" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:202 -msgid "Overall Coupled Length" -msgstr "Gekuppelte Gesamtlänge" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:203 -msgid "Coupler Length from end of car" -msgstr "Kupplungslänge vom Ende des Wagen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:204 -msgid "Diagram of Car" -msgstr "Diagram der Lokomotive oder Wagens" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:205 -msgid "Item Index Number" -msgstr "Laufende Nummer" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:206 -msgid "Original Purchase Price" -msgstr "Ursprünglicher Kaufpreis" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:208 -msgid "Condition of car" -msgstr "Zusatnd des Wagen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:209 -msgid "Original Purchase Date" -msgstr "Ursprüngliches Kaufdatum" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:210 -msgid "Last Service Date" -msgstr "Letztes Servicedatum" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:211 -msgid "Number of identical cars to be entered" -msgstr "Anzahl der zusätzlichen, gleichartigen Wagen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:212 -msgid "Do all the cars have the same Number?" -msgstr "Haben alle Wagen dieselbe Nummer" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:213 -msgid "Notes about the car" -msgstr "Anmerkungen zu dem Wagen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:214 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:215 -msgid "Create a new car Part or Prototype definitions" -msgstr "Einen neuen Lokomotiven oder Wagen Prototyp erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:216 -msgid "Finds the selected Car Item on the layout" -msgstr "Suche den ausgewählten Wagen auf der Anlage" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:217 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:218 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:219 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:220 -msgid "Sort the Item list" -msgstr "Sortierung auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:222 -msgid "Edit the selected Car Item" -msgstr "markierte Lokomotive oder Wagen bearbeiten" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:223 -msgid "Add a new Car Item" -msgstr "Neuen Wagen hinzufügen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:224 -msgid "Delete the selected Car Items" -msgstr "Markierte Lokomotiven oder Wagen löschen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:225 -msgid "Import a Car Item .csv file" -msgstr "Lokomotiven oder Wagen aus einer .csv Datei importieren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:226 -msgid "Export a Car Item .csv file" -msgstr "Exportieren der markierten Lokomotiven oder Wagen in eine .csv Datei" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:227 -msgid "Create a text list of the Car Items" -msgstr "Textdatei der Lokomotiven oder Wagen erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:228 -msgid "Specifies the radius of the circle track" -msgstr "gibt den Radius des Gleiskreises an" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:229 -msgid "How to draw track being moved/rotated" -msgstr "" -"Festlegen wie Gleise gezeichnet werden, sobald sie bewegt/rotiert werden" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:230 -msgid "Default command is Describe or Select" -msgstr "Standardbefehl ist Eigenschaften oder Auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:231 -msgid "Action to invoke on Right-Click" -msgstr "Festlegen welche Aktion beim Rechtsklick erfolgen soll" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:233 -msgid "Contents Label for new Parameter file" -msgstr "Inhaltsbeschreibung für neue Parameterdatei" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:234 -msgid "List of custom designed turnouts and structures" -msgstr "Liste der individual entwickelten Weichen und Strukturen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:235 -msgid "Invoke designer editor" -msgstr "Vorbild bearbeiten" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:236 -msgid "Remove selected entries" -msgstr "Ausgewählte Einträge löschen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:237 -msgid "Copy selected entries to Parameter File" -msgstr "Ausgewählte Einträge in eine Parameterdatei verschieben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:238 -msgid "Create a New part or prototype" -msgstr "Neues Teil oder Prototype erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:239 -msgid "Update custom file and close" -msgstr "Anpassungs Verwaltung speichern und schliessen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:240 -msgid "Executes the next step of the demo" -msgstr "Nächsten Schritt der momentanen Demo anzeigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:241 -msgid "Skip to next demo" -msgstr "zum nächstes Demo Kapitel springen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:242 -msgid "Stops the demonstration and returns you to XTrackCAD" -msgstr "Demonstrations Modus verlassen und zu XTrackCAD zurückkehren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:243 -msgid "Select speed of Playback" -msgstr "Wiedergabegeschwindigkeit auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:244 -msgid "This is where comments about the demo are displayed" -msgstr "Kommentar zu Demos anzeigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:280 -msgid "Move the Main canvas if you drag near the edge" -msgstr "" -"Bewegen den Hauptzeichenbereich wenn in der nähe der Ecken gezogen wird." - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:281 -msgid "Color tracks or other objects by layer" -msgstr "Gleise / Objekte in Ebenen einfärben " - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:282 -msgid "Controls the drawing of hidden tracks" -msgstr "Steuert das Zeichnen von versteckten Gleisen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:283 -msgid "Controls the drawing of End-Points" -msgstr "Steuert das Zeichnen von Endpunkten" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:284 -msgid "How to draw track ties" -msgstr "Steuert das Zeichnen der Schwellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:285 -msgid "Show crosshair at center of curves" -msgstr "Mittelpunkt als Fadenkreuz anzeigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:286 -msgid "Drawing scale when to draw tracks with 2 rails" -msgstr "Mindestmaßstab für die Anzeige von Gleisen mit zwei Schienen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:287 -msgid "Drawing scale of the map window" -msgstr "Zeichenmaßstab des Kartenfenster" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:288 -msgid "Whether the main layout is updated while dragging on the Map" -msgstr "Aktualisierung des Gleisplans wenn in der Karte gezogen wird." - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:289 -msgid "Enable labels for Turnouts, Flextrack Lengths and Elevations" -msgstr "Zeige Beschriftungen für Weichen, Flexgleise und Steigungen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:290 -msgid "When to label Turnout, Flextrack Lengths and Elevations" -msgstr "Wann sollen Weichen, Gleislängen oder Höhenmaß beschriftet werden" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:291 -msgid "Font size for labels on layout" -msgstr "Zeichengrösse für Beschriftungen im Gleisplan" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:292 -msgid "Label elements on the Hot Bar" -msgstr "Beschriftungselemente des Teilekatalogs" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:293 -msgid "Label elements on layout" -msgstr "Beschriftungselemente im Gleisplan" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:294 -msgid "Label elements for lists" -msgstr "Beschriftungselemente in den Listen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:295 -msgid "How to group cars on the Train Hot Bar" -msgstr "Gruppierung der Waggen im Teilekatalog" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:296 -msgid "Delay (in mS) between updating train movements" -msgstr "Aktualisierungsintervall (in ms) der Zugbewegungen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:297 -msgid "Don't show trains in tunnels when tunnels are hidden" -msgstr "Zeige keine Züge in Tunnels wenn Tunnel verborgen sind" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:299 -msgid "Width of the lines" -msgstr "Breite der Linien" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:300 -msgid "Color of the lines" -msgstr "Farbe der Linien" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:301 -msgid "List of types of Lumber" -msgstr "Liste der Leistenmaße" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:302 -msgid "Color of Benchwork" -msgstr "Farbe des Unterbau" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:303 -msgid "Orientation of Benchwork" -msgstr "Ausrichtung des Unterbau" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:304 -msgid "Size of Dimension Arrows" -msgstr "Breite der Größenpfeile" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:305 -msgid "This controls the sharpness of the easement curve" -msgstr "Steuert die Größe des Ãœbergangsradius" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:306 -msgid "Minimum radius" -msgstr "Mindestgleisradius" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:307 -msgid "Maximum offset" -msgstr "Maximaler Abstand" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:308 -msgid "Easement length" -msgstr "Länge des Ãœbergangsbogen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:309 -msgid "" -"These radio buttons are a short-cut for Values of 0.0, 0.5, 1.0 and 2.0. " -"None turns Easements off" -msgstr "" -"Standardwerte 0,0, 0,5, 1,0 und 2,0 können schnell gesetzt werden. " -"Ãœbergangsbögen können hier nicht ausgeschaltet werden. " - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:310 -msgid "Complete easement selection" -msgstr "Auswahl der Ãœbergangsbögen vervollständigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:311 -msgid "Type of elevation" -msgstr "Typ des Höhendpunktes" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:312 -msgid "Height of End Point" -msgstr "Höhe des Endpunkt" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:313 -msgid "Compute elevation based on neighbors" -msgstr "Berechne das Höhenmaß gemäß der benachbarten Gleise" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:314 -msgid "Compute grade based on neighbors" -msgstr "Berechne Steigung gemäß der benachbarten Gleise" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:315 -msgid "Specify a name for an End-Point" -msgstr "Einen Namen für einen Endpunkt vergeben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:317 -msgid "Print parts list" -msgstr "Stückliste drucken" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:318 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:417 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:512 -msgid "Invoke the Print Setup dialog" -msgstr "Starte den Druckerkonfigursationsdialog" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:319 -msgid "Save parts list to file" -msgstr "Stückliste in Datei speichern" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:320 -msgid "This is the list of parts for the layout" -msgstr "Dies ist die Teileliste für diesen Gleisplan" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:321 -msgid "Enable prices on the Parts List" -msgstr "Preise in der Teileliste anzeigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:322 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:325 -msgid "Spacing between major grid lines" -msgstr "Abstand der Haupt Raster Linien einstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:323 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:326 -msgid "Allows the spacing to be subdivided" -msgstr "stellt die Unterteilung von Zwischenmarkierungen ein" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:324 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:327 -msgid "Specifies if positions are snaped in this direction" -msgstr "Einschalten des Fangrasters für diese Ausrichtung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:328 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:329 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:330 -msgid "Shows the origin and angle of the grid" -msgstr "gibt den Ausgangspunkt und Winkel des Rasters an" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:331 -msgid "Specifies if the grid is shown" -msgstr "Anzeige des Rasters an oder aus" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:332 -msgid "Completes the grid specification" -msgstr "Raster Anpassung speichern und beenden" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:336 -msgid "Number of segments in Group" -msgstr "Anzahl der Segmente in der Gruppe" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:337 -msgid "Replace the Selected object with the new definition?" -msgstr "Soll das ausgewählte Objekt durch die neue Definition ersetzt werden?" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:338 -msgid "Creates a new Structure (or Turnout)" -msgstr "Ein neues Gebäude (oder eine Weiche) erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:339 -msgid "Elevation difference of Helix End-Points" -msgstr "Höhenunterschied zwischen den Endpunkten der Gleiswendel" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:340 -msgid "Helix Radius" -msgstr "Radius der Gleiswendel" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:341 -msgid "Number of turns in the helix" -msgstr "Anzahl der Umdrehungen in der Wendel" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:342 -msgid "Angle betweek helix entrance and exit" -msgstr "Winkel zwischen Zu- und Ausgang der Wendel" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:343 -msgid "Grade in helix" -msgstr "Steigung in der Wendel" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:344 -msgid "Separation between helix layers" -msgstr "Abstand zwischen den Ebenen der Wendel" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:345 -msgid "Layer list" -msgstr "Liste der Ebenen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:346 -msgid "Layer Name" -msgstr "Name der Ebene" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:347 -msgid "Color of layer" -msgstr "Farbe der Ebene" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:348 -msgid "Layer is drawn on Main window" -msgstr "Ebene im Hauptfenster darstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:349 -msgid "Layer cannot be changed" -msgstr "Ebene schützen - kann nicht mehr geändert werden" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:350 -msgid "Layer is drawn on Map window" -msgstr "Ebene im Kartenfenster anzeigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:351 -msgid "Number of layer buttons to show" -msgstr "Anzahl der Ebenenknöpfe" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:352 -msgid "Number of objects in this layer" -msgstr "Anzahl von Objekten in dieser Ebene" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:354 -msgid "Load layer configuration from default" -msgstr "Persönliche Einstellungen für Ebenen laden" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:355 -msgid "Save current layer configuration as default" -msgstr "momentane Einstellung für Ebenen speichern" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:356 -msgid "Overwrite layer configuration with system default values" -msgstr "Einstellung für Ebenen auf Systemvorgabe zurück setzen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:357 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:358 -msgid "Specifies the size of the room (in inches or centimeters)" -msgstr "Größenangabe des Raums (in Zentimeter oder Inch)" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:359 -msgid "Specifies the layout Title that will appear on printouts" -msgstr "Angabe eines Layout Titels welcher auf Ausdrücken erscheint" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:360 -msgid "Specifies the layout Subtitle that will appear on printouts" -msgstr "Angabe eines Layout Untertitels welcher auf Ausdrücken erscheint" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:361 -msgid "Specifies the Modelling Scale" -msgstr "Angabe des Modellbahnmaßstabs" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:362 -msgid "Specifies the rail gauge, ie. the distance between the rails" -msgstr "Angabe der Spurweite, d.h. der Abstand zwischen den Schienen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:363 -msgid "" -"Specifies minimum track radius (in inches or centimeters). Tracks with a " -"smaller radius are considered exceptional." -msgstr "" -"Angabe des minimalen Gleisradius (in Zentimeter oder Inch). Gleise mit " -"geringerem Radius werden als Ausnahme angesehen." - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:364 -msgid "" -"Specifies maximum track elevation expressed as a percent (%). Tracks with a " -"larger elevation are considered exceptional." -msgstr "" -"Angabe der maximalen Gleissteigung in %. Gleise mit größerer Steigung werden " -"als Ausnahme angesehen." - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:367 -msgid "" -"This is the body of the Note. To change this select Modify from the File " -"Menu" -msgstr "" -"Dies ist der Notiztext. Um diesen zu ändern, wählen Sie bitte 'Ändern' aus " -"dem 'Datei'-Menu" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:369 -msgid "Specifies number of pixels per inch (or centimeter)" -msgstr "Gibt die Anzahl der Bildpunkte pro Inch (oder Zentimeter) an" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:371 -msgid "" -"Specifies whether Layout Titles, Borders or Track Centerlines are printed on " -"the BitMap" -msgstr "" -"Gibt an, ob Anlagentitel, Begrenzungen und Gleismitten in der Bilddatei " -"ausgegeben werden sollen. " - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:372 -msgid "Specifies the separation between parallel tracks" -msgstr "Gibt den Abstand zwischen parallelen Gleisen an" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:373 -msgid "Enter your name as specified in the XTrackCAD Registration Notice" -msgstr "Enter your name as specified in the XTrackCAD Registration Notice" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:374 -msgid "Enter the key value as specified in the XTrackCAD Registration Notice" -msgstr "Enter the key value as specified in the XTrackCAD Registration Notice" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:375 -msgid "Validates the name and key. Terminates the registration command" -msgstr "Validates the name and key. Terminates the registration command" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:376 -msgid "0° is up or to the right" -msgstr "0° ist nach oben oder nach rechts" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:377 -msgid "Choose english (inches) or metric (centimeters)" -msgstr "Einheiten auswählen: Englisch für Inches oder Metrisch für Zentimeter" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:378 -msgid "How to display length measurements" -msgstr "Längenformat auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:379 -msgid "Do not create tracks to be shorter than this value" -msgstr "Keine Gleise kürzer als diese Mindestlänge erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:380 -msgid "Maximum distance between connected end points" -msgstr "Maximale Distanz zwischen verbundenen Endpunkten" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:381 -msgid "Minimum angle between connected End-Points" -msgstr "kleinster Winkel zwischen verbundenen Endpunkten" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:382 -msgid "Specifies the minimum angle between tracks connected to a turntable" -msgstr "kleinster Winkel beim Anschluss von Gleisen an eine Drehscheibe" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:383 -msgid "Trains will crash above this speed" -msgstr "Züge entgleisen oberhalb dieser Geschwindigkeit" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:384 -msgid "Enable/Disable balloon popup help windows" -msgstr "Ein-/Ausschalten von Erklärungshilfen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:385 -msgid "How far you can move the mouse before its considered a drag" -msgstr "Wie weit kann die Maus bewegt werden, bevor abreißen angenommen wird" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:386 -msgid "How long you can hold a mouse button down before its considered a drag" -msgstr "" -"Wie lange kann ein Mausknopf gedrückt bleiben, bevor abreißen angenommen wird" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:387 -msgid "Minimum distance (in pixels) between grid lines/ticks" -msgstr "Mindestabstand (in Pixeln) zwischen Raster und Linien" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:388 -msgid "" -"Specifies the Check Point frequency; number of modifications made since the " -"last save." -msgstr "" -"Anzahl von Änderungen bevor eine neue automatische Sicherung statt findet" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:389 -msgid "Resume work on last layout or start with new layout" -msgstr "Letzten Gleisplan bearbeiten, oder einen neuen Gleisplan erstellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:391 -msgid "Updated cost of current selected item" -msgstr "Aktualisierte Kosten für den ausgewählten Gegenstand" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:393 -msgid "Selection list for prices" -msgstr "Auswahlliste für Preise" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:394 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:395 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:396 -msgid "Price of specified length of flex-track" -msgstr "Preis für die angegebene Länge des Flex-Gleises" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:398 -msgid "Controls the reduction (scale) of the printout" -msgstr "Einstellung des Reduktions Maßstabs für den Ausdruck." - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:399 -msgid "Scaled page width (Scale times physical page width)" -msgstr "Seitenbreite angeben (Maßstab mal physikalischer Papierbreite)" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:400 -msgid "Sets page size to the maximum (based on scale and physical page size)" -msgstr "" -"Setzt die Papiergröße auf das Maximum (basierend auf Maßstab und " -"physikalischer Papiergröße)" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:401 -msgid "Scaled page height (Scale times physical page height)" -msgstr "Seitenhöhe angeben (Maßstab mal physikalischer Papierhöhe)" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:402 -msgid "Sets scale, origin and angle for a one page printout of the layout" -msgstr "" -"Stellt Maßstab, Ausrichtung und Winkel für den momentan angezeigten " -"Gleisplan ein" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:403 -msgid "Print page in Portrait or Landscape format" -msgstr "Drucke im Hochformat oder Querformat" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:404 -msgid "Order of printing pages" -msgstr "Druckreihenfolge" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:405 -msgid "Print Title, Date, Author and other information at bottom of page?" -msgstr "Drucke Titel, Datum Autor und andere Informationen am Ende der Seite?" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:406 -msgid "Ignore unprintable page margins?" -msgstr "nicht druckbare Seitenränder ignorieren?" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:407 -msgid "Print Registration Marks at 1:1?" -msgstr "Drucke Positionierungshilfen im 1:1 Maßstab?" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:408 -msgid "Print Snap Grid?" -msgstr "Fangraster drucken?" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:409 -msgid "Print Rulers on all page edges?" -msgstr "Lineale an allen Seitenecken drucken?" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:410 -msgid "Print Roadbed Outline?" -msgstr "Gleisbettung drucken?" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:412 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:413 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:415 -msgid "" -"Origin of the print grid. This is useful if you want to reprint a set of " -"pages" -msgstr "" -"Ursprung des Druckraster. Hilfreich, wenn einige Seiten erneut gedruckt " -"werden." - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:414 -msgid "Resets the origin and angle to 0" -msgstr "Ausrichtung und Winkel auf 0 zurücksetzen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:416 -msgid "Deselects all pages" -msgstr "Alle Seiten abwählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:418 -msgid "Print selected pages and terminates the print command" -msgstr "Ausdrucken der ausgewählten Seiten und den Dialog Drucken schließen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:419 -msgid "List of loaded and unloaded parameter files" -msgstr "Liste aller Parameterdateien" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:420 -msgid "Show parameter files by names or descriptions" -msgstr "Zeige Namen oder Beschreibung der Parameter-Dateien an" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:421 -msgid "Toggle the loaded status of the selected parameter file" -msgstr "Ändert den Status für ausgewählte Parameter-Dateien" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:422 -msgid "Find a parameter file for loading" -msgstr "Sucher eine Parameterdatei zum Einlesen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:423 -msgid "Update parameter file list" -msgstr "Aktualisiere die Liste der Parameterdateien" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:424 -msgid "Profile of specified path" -msgstr "Höhenprofil der ausgewählten Verbindung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:425 -msgid "Clear the profile" -msgstr "Lösche das Höhenprofil" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:426 -msgid "Print the profile" -msgstr "Höhenprofil drucken..." - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:428 -msgid "Stop recording" -msgstr "Aufzeichnung beenden" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:429 -msgid "Insert a message" -msgstr "Eine Nachricht einfügen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:430 -msgid "End a message" -msgstr "Ende einer Mitteilung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:431 -msgid "Message body" -msgstr "Mitteilung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:432 -msgid "Possible turnouts" -msgstr "Mögliche Weichen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:433 -msgid "Skip this turnout" -msgstr "Diese Weiche überspringen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:435 -msgid "Manufacturer of Object" -msgstr "Hersteller des Objektes" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:436 -msgid "Description of Object" -msgstr "Beschreibung des Objekte" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:437 -msgid "Part Nuber of Object" -msgstr "Bestellnummer des Objektes" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:439 -msgid "Rescale by Scale Conversion or by Ratio" -msgstr "Durch Auswahl eines Maßstab oder eines Multiplikators skalieren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:440 -msgid "Original Scale of the selected objects" -msgstr "Ursprünglicher Maßstab der ausgewählten Objekte" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:441 -msgid "Original Gauge of the selected objects" -msgstr "Ursprüngliche Spurweite der ausgewählten Objekte" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:442 -msgid "New Scale of the selected objects" -msgstr "Neuer Maßstab der ausgewählten Objekte" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:443 -msgid "New Gauge of the selected objects" -msgstr "Neu Spurweite der ausgewählten Objekte" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:444 -msgid "Change track dimensions to new scale" -msgstr "Abmessungen des Gleises auf den neuen Maßstab umrechnen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:445 -msgid "Change size by this amount" -msgstr "Größe um einen Faktor verändern" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:447 -msgid "Snap Grid Line and Division" -msgstr "Fangraster Linien und Unterteilungen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:448 -msgid "X and Y position markers" -msgstr "X und Y Positionsmarkierungen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:449 -msgid "Border rulers, room boundaries and table edges" -msgstr "Begrenzungslinien, Raumumriß und Anlagenkanten" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:450 -msgid "Primary Axis of grid rotation" -msgstr "Erste Achse für Rasterdrehung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:451 -msgid "Secondary Axis of grid rotation" -msgstr "Zweite Achse für Rasterdrehung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:452 -msgid "Unselected tracks" -msgstr "Nicht ausgewählte Gleise" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:453 -msgid "Selected tracks" -msgstr "Ausgewählte Gleise" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:454 -msgid "Color of tracks on the Profile path" -msgstr "Farbe für Gleise auf Höhenverlauf" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:455 -msgid "Color of Exceptional tracks" -msgstr "Farbe für Gleise außerhalb der Grenzwerte" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:456 -msgid "Color of track ties" -msgstr "Farbe der Schwellen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:457 -msgid "Updates the colors" -msgstr "Farben aktualisieren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:458 -msgid "Angle in degrees" -msgstr "Winkel in Grad" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:459 -msgid "Rotate object(s) by specified amount" -msgstr "Objekte um einen bestimmten Winkel drehen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:460 -msgid "Choose commands to be sticky" -msgstr "Wiederholte Befehle auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:461 -msgid "Make the commands sticky" -msgstr "Mache die Befehle wiederholbar" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:462 -msgid "List of available structure" -msgstr "Liste der verfügbaren Gebäude" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:463 -msgid "Diagram of the selected structure" -msgstr "Zeichnung des ausgewählten Gebäudes" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:464 -msgid "Hide Selection window when placing Structure" -msgstr "Verberge Auswahlfenster bis das Gebäude plaziert ist" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:465 -msgid "Drawing scale and size" -msgstr "Zeichnungsmaßstab und Größe" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:466 -msgid "Complete structure placement" -msgstr "Anordnung des Gebäude abschliessen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:467 -msgid "Choose a Pier number" -msgstr "Bestellnummer eingeben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:469 -msgid "Useful information about the program" -msgstr "Nützliche Informationen über das Programm" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:470 -msgid "Show Tip of the Day every time the program starts" -msgstr "Bei jedem Start den Tipp des Tages anzeigen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:471 -msgid "Show the next Tip of the Day" -msgstr "Gehe zum nächsten Tipp des Tages" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:472 -msgid "Show the previous Tip of the Day" -msgstr "Gehe zum vorherigen Tipp des Tages" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:474 -msgid "Controls which Command Buttons are displayed" -msgstr "ein oder ausblenden von Kommando Knöpfen in der Werkzeugleiste" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:475 -msgid "List of Cars" -msgstr "Liste der Wagen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:476 -msgid "List of active trains" -msgstr "Liste der aktiven Züge" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:478 -msgid "Train odometer" -msgstr "Entfernungsmesser" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:479 -msgid "Reset odometer to 0" -msgstr "Kilometerzähler auf 0 zurücksetzen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:480 -msgid "Find train on layout" -msgstr "Finde einen Zug auf der Anlage" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:481 -msgid "Follow train around layout" -msgstr "Zum Zug über die Anlage folgen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:482 -msgid "Flip direction at End Of Track" -msgstr "Am Ende des Gleis die Fahrtrichtung umkehren" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:483 -msgid "Change direction of train" -msgstr "Richtung des Zuges ändern" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:484 -msgid "Stop the train" -msgstr "Anhalten des Zuges" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:485 -msgid "List of available turnouts for the current scale" -msgstr "Liste der im aktuellen Maßstab verfügbaren Weichen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:486 -msgid "" -"Diagram of the currently selected turnout. Click on a End-Point to select " -"the Active End-Point" -msgstr "" -"Zeichnung der ausgewählten Weiche. Der aktive Endpunkt kann durch Klicken " -"auf einen Endpunkt gesetzt werden." - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:487 -msgid "" -"A menu list of various type of turnouts and sectional tracks you can define" -msgstr "" -"Eine Aiuswahlliste verschiedener Arten von Weichen und Festgleisen, die Sie " -"definieren können" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:488 -msgid "Hide Selection window when placing Turnout" -msgstr "Auswahlfenster während des Verlegen verbergen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:489 -msgid "The selected Active End-Point" -msgstr "Der ausgewählte, aktive Endpunkt" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:490 -msgid "Current selected turnout, (displayed in the diagram window)" -msgstr "Momentan ausgewählte Weiche, (sichtbar im Diagram-Fenster)" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:491 -msgid "One the End-Points that can be selected" -msgstr "Einer der Endpunkte, der ausgewählt werden kann" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:493 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:494 -msgid "Angle of the specified track to the center line of the turnout" -msgstr "Winkel zwischen dem ausgwählten Gleise und der Mittellinie der Weiche" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:495 -msgid "Specifies if angles are entered as Frog Numbers or in degrees" -msgstr "" -"auswählen ob Winkel als Herzstück Nummern oder in Grad angegeben werden" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:496 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:497 -msgid "Desciption" -msgstr "Beschreibung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:498 -msgid "Turnout description (Manuf., Size, Part Number, etc)" -msgstr "Beschrebung der Weiche (Hersteller, Winkel, Teilenummer, etc.)" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:499 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:500 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:501 -msgid "Length from the base to the end of the specified track" -msgstr "Länge von der Grundlinie zum Ende des ausgewählten Gleis" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:503 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:504 -msgid "Offset of the track End-Point from the center line of the turnout" -msgstr "Abstand des Endpunktes von der Mittellinie der Weiche" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:507 -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:508 -msgid "Prints a full size diagram of the turnout for checking" -msgstr "Erstellt einen Probeausdruck der Weiche" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:509 -msgid "Color of Roadbed lines" -msgstr "Farbe der Gleisbettlinien" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:510 -msgid "Width of Roadbed lines" -msgstr "Abstand des Gleisbettmarkierungen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:511 -msgid "Width of Roadbed" -msgstr "Breite des Gleisbett" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:513 -msgid "Closes the window and returns to the Turnout Selection window" -msgstr "Schliesst das Fenster und kehrt zur Weichenauswahl zurück" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:514 -msgid "Specifies the diameter of the turntable" -msgstr "Legt den Durchmesser der Drehscheibe fest" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:515 -msgid "Old Turnout title" -msgstr "Alter Bezeichnung der Drehscheibe" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:516 -msgid "List of available titles" -msgstr "Liste der verfügbaren Titel" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:517 -msgid "Leave the Turnouts' title unchanged" -msgstr "Tiitel der Weiche unverändert lassen." - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:518 -msgid "Invoke the Parameter Files dialog" -msgstr "Auswahl der Parameterdateien" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:519 -msgid "List of available turnouts" -msgstr "Liste der verfügbaren Weichen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:520 -msgid "Update the Turnouts' title" -msgstr "Aktualisiere den Titel des Gleis" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:524 -msgid "Sample" -msgstr "Beispiel" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:526 -msgid "Slant" -msgstr "Neigung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:527 -msgid "Font selection dialog" -msgstr "Dialog zur Auswahl der Schriftart" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:528 -msgid "Weight" -msgstr "Gewicht" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:529 -msgid "Printer Abort Window" -msgstr "Druck abbrechen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:530 -msgid "Print to filename" -msgstr "Name der Druckdatei" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:531 -msgid "Specify Postscript font alias mapping" -msgstr "Zuordnung der Postscript-Schriftarten angeben" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:532 -msgid "" -"Displays the Print Setup window to change printers, orientation, paper size, " -"etc." -msgstr "" -"Ruft das Drucker Dialog Fenster auf, um Drucker und oder Papier " -"Einstellungen vornehmen zu können." - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:533 -msgid "Closes this dialog" -msgstr "Dialogfenster schliessen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:534 -msgid "Page orientation" -msgstr "Seitenausrichtung" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:535 -msgid "Unprintable margins" -msgstr "Nicht druckbare Ränder" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:536 -msgid "Updates and closes this dialog" -msgstr "Dialogfenster aktualisieren und schliessen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:537 -msgid "Choose paper size" -msgstr "Papierformat auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:538 -msgid "Choose printer" -msgstr "Drucker auswählen" - -#: ../../../build/xtc_4-2-3dev/app/bin/bllnhlp.c:539 -msgid "Print test page" -msgstr "Drucke Testseite" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:7 -msgid "Introduction" -msgstr "Einführung" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:8 -msgid "Mouse Actions" -msgstr "Mausaktionen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:9 -msgid "Dialogs" -msgstr "Dialoge" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:10 -msgid "Moving about" -msgstr "Zoom & Pan" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:11 -msgid "Describe and Select" -msgstr "Eigenschaften und Auswählen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:14 -msgid "Simple tracks" -msgstr "Einfache Gleise" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:15 -msgid "Straight tracks" -msgstr "Gleisgeraden" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:16 -msgid "Curved tracks" -msgstr "Gleisbögen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:17 -msgid "Circles" -msgstr "Kreise" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:18 -msgid "Turntables" -msgstr "Drehscheiben" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:19 -msgid "Modifying tracks" -msgstr "Gleise bearbeiten" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:20 -msgid "Modifying end points " -msgstr "Endpunkte ändern" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:21 -msgid "Extending" -msgstr "Erweitern" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:22 -msgid "Medium and Thick Tracks" -msgstr "Mittlere und dicke Gleise" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:23 -msgid "Joining Tracks" -msgstr "Gleise verbinden" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:24 -msgid "Straight to straight" -msgstr "Gerade zu Gerade" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:25 -msgid "Curve to straight" -msgstr "Bogen zu Gerade" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:26 -msgid "Circle to circle" -msgstr "Kreis zu Kreis" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:27 -msgid "Joining to turntables" -msgstr "Drehscheiben verbinden" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:28 -msgid "Easements" -msgstr "Ãœbergangsbögen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:29 -msgid "Abutting tracks" -msgstr "angrenzende Gleise" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:30 -msgid "Move to Join" -msgstr "Verbinden durch verschieben" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:32 -msgid "Select and Placement" -msgstr "Auswählen und Positionieren" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:33 -msgid "Building a yard throat." -msgstr "Einen Bahnhof einrichten" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:34 -msgid "Designing turnouts" -msgstr "Weichen konstruieren" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:35 -msgid "Group and Ungroup" -msgstr "Zusammenfassen und Zerlegen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:36 -msgid "Triming Turnout Ends" -msgstr "Weichenenden verändern" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:37 -msgid "Handlaid Turnouts" -msgstr "Selbstbauweichen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:38 -msgid "Elevations and Profile" -msgstr "Höhen und Profil" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:39 -msgid "Elevations" -msgstr "Höhen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:41 -msgid "Misc track commands" -msgstr "Verschiedene Gleismodifikationen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:42 -msgid "Delete and Undo" -msgstr "Löschen und Rückgängig machen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:43 -msgid "Splitting and Tunnels" -msgstr "Auftrennen und Tunnels" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:45 -msgid "Helix tracks" -msgstr "Gleiswendel" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:46 -msgid "Exception Tracks" -msgstr "Fehlerhafte Gleise" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:48 -msgid "Connect and Tighten - a siding" -msgstr "Abstellgleis verbinden" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:49 -msgid "Connect and Tighten - figure-8" -msgstr "Verbinden und Zusammenfügen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:50 -msgid "Other commands" -msgstr "Sonstige Befehle" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:52 -msgid "Table Edges" -msgstr "Tischkanten" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:54 -msgid "Dimension Lines" -msgstr "Maßlinien" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:55 -msgid "Lines" -msgstr "Linien" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:56 -msgid "Poly-Shapes" -msgstr "Vielecke" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:57 -msgid "Modifying Poly-Shapes" -msgstr "Polygone modifizieren" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:60 -msgid "Control Panels (New)" -msgstr "Stellpulte einzeichnen" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:62 -msgid "" -"The unconnected End-Points of a straight or curved track can be changed with " -"the 'Modify Track' command.\n" -msgstr "" -"Die nicht verbundenen Endpunkte eines geraden oder eines gebogenen Gleise " -"können mit 'Ändern Gleis' verändert werden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:63 -msgid "" -"The End-Point of a straight track is selected and then Left-Dragged to " -"change its length.\n" -msgstr "" -"Der Endpunkt eines geraden Gleises wird ausgewählt und die Länge wird durch " -"Ziehen mit linken Maus-Knopf geändert.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:64 -msgid "" -"Watch what happens if you try to drag the selected End-Point beyond the far " -"End-Point.\n" -msgstr "" -"Beachten Sie was passiert, wenn der ausgwählte Endpunkt für den entfernten " -"Endpunkt hinaus gezogen wird.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:65 -msgid "" -"The length of the straight track is determined by the distance from the far " -"End-Point and the cursor.\n" -msgstr "" -"Die Länge des geraden Gleises wird durch den Abstand zwischen dem entfernten " -"Endpunkt und dem Mauszeiger festgelegt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:66 -msgid "" -"A curved track is selected and it's new End-Point is determined by the angle " -"to the cursor.\n" -msgstr "" -"Ein gebogenes Gleis wird ausgewählt und der neue Endpunkt durch den Winkel " -"des Mauszeiger festgelegt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:67 -msgid "It's possible to almost create a complete circle.\n" -msgstr "Es ist beinahe möglich, einen vollständigen Kreis zu erstellen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:68 -msgid "" -"If you drag the mouse beyond the start of the curve the track becomes very " -"short.\n" -msgstr "" -"Wenn Sie die Maus über den Startpunkt des Bogen hinaus ziehen, wird das " -"Gleis sehr kurz.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:69 -msgid "Here you are warned that the track will be too short.\n" -msgstr "Jetzt werden Sie gewarnt, dass das Gleis zu kurz wird.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:70 -msgid "" -"If you move the cursor away from the curve, you will create a straight track " -"tangent to the curve.\n" -msgstr "" -"Wenn Sie den Mauszeiger vom Bogen weg bewegen, erstellen Sie ein gerades " -"Gleis als Tangente an dem Bogen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:71 -msgid "" -"If you adjust the End-Point of a turnout or sectional track the track is " -"extended by a straight track segment.\n" -msgstr "" -"Wenn Sie den Endpunkt einer Weiche oder eines Festgleises anpassen, wird das " -"Gleis durch ein gerades Segment verlängert.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:72 -msgid "" -"You can change the radius of a Straight or Curved track that is connected at " -"one End-Point by holding down the Shift key while dragging on it.\n" -msgstr "" -"Sie können den Radius eines Bogen ändern oder ein gerades Gleis biegen, " -"indem Sie bei gedrückter Umschalttaste und gedrücktem Mausknopf ziehen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:73 -msgid "" -"This lets you change a Straight track into a Curved track (and vice versa) " -"as well as changing the radius of a Curved track.\n" -msgstr "" -"Dadurch können Sie ein gerades Gleis in ein gebogenes (und umgekehrt) " -"umwandeln und den Radius eines Bogengleises ändern.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:74 -msgid "You can draw a variety of different types of benchwork:\n" -msgstr "Sie können verschiedene Formend es Unterbau zeichnen:\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:75 -msgid "- rectangular (1x2, 2x4 etc)\n" -msgstr "- rechteckig (1x2, 2x4 Inch usw.)\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:76 -msgid "- L girders\n" -msgstr "- Winkelträger\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:77 -msgid "- T girders\n" -msgstr "- T- Träger\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:78 -msgid "You can also draw them in different orientations.\n" -msgstr "Sie können diese auch in verschiedenen Ausrichtungen zeichnen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:79 -msgid "We will draw two 3x6 inch L-girders.\n" -msgstr "Wir zeichnen zwei 3x6 Inch Winkelträger.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:80 -msgid "" -"The flange of the top L-Girders is on the outside edge of the girders. We " -"want to change the girder so both flanges are on the inside.\n" -msgstr "" -"Die Schmalseite des oberen Winkelträger ist auf der Außenseite. Wir wollen " -"die Träger so anpassen, dass beide Schmalseiten innen liegen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:81 -msgid "We will use the command for this.\n" -msgstr "Wir werden den Befehl dafür benutzen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:82 -msgid "Change the Orientation to Right.\n" -msgstr "Ändere die Ausrichtung auf rechts.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:83 -msgid "Now both flanges are on the inside of the two girders.\n" -msgstr "Jetzt sind beide Schmalseiten auf der Innenseite der beiden Träger.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:84 -msgid "" -"Pushing the button will cancel any other command in progress.\n" -msgstr "" -"Durch Drücken des Knopfes wird jeder begonnene Befehl " -"abgebrochen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:85 -msgid "" -"Here we will begin to create a Curved track which is a two step process.\n" -msgstr "" -"In einem zweistufigen Ablauf werden wir mit dem Erstellen eines gebogenen " -"Gleises beginnen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:86 -msgid "" -"When we clicked on the button, the current command was " -"cancelled.\n" -msgstr "" -"Durch Drücken auf den Knopf wurde der begonnene Befehl " -"abgebrochen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:87 -msgid "" -"When in mode, selecting any object will print a description in " -"the Status Bar and display a Dialog showing properties of the clicked-on " -"object.\n" -msgstr "" -"Im Modus wird durch Auswahl eines Objektes eine Beschreibung " -"in der Statuszeile angezeigt und die Eigenschaften des Objektes werden in " -"einem Dialogfenster angezeigt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:88 -msgid "" -"Certain parameters of the object can be changed. In this case we'll change " -"the Length\n" -msgstr "" -"Einige der Eigenschaften des Objektes können geändert werden. In diesem Fall " -"ändern wir die Länges\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:89 -msgid "Let's look at the Turnout...\n" -msgstr "Jetzt wollen wir uns die Weiche anschauen...\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:90 -msgid "and change the turnout Title.\n" -msgstr "und den Titel der Weiche ändern.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:91 -msgid "You can change the contents of Text...\n" -msgstr "Sie können den Text ändern...\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:92 -msgid "and its size.\n" -msgstr "und seine Größe.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:93 -msgid "" -"If you select a Note, the Description dialog appears which displays the " -"contents of the note.\n" -msgstr "" -"Wenn Sie eine Notiz auswählen, erscheint ein Dialogfenster in dem der Inhalt " -"der Notiz angezeigt wird.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:94 -msgid "" -"Like the track command, there are several ways to create a Circle " -"track.\n" -msgstr "" -"Wie beim Befehl gibt es mehrere Möglichkeiten, einen Gleiskreis zu " -"erstellen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:95 -msgid "" -"The first is to specify a fixed radius and simply drag the Circle into " -"position.\n" -msgstr "" -"Die Erste ist die Vorgabe eines festen Radius und das Ziehen an die " -"gewünschte Position.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:96 -msgid "We will change the Radius before proceeding.\n" -msgstr "Bevor wir weitermachen, ändern wir den Radius.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:97 -msgid "The next method is to drag from the edge of the Circle to the center.\n" -msgstr "" -"Die nächste Methode ist das Ziehen von der Kreislinie zum Mittelpunkt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:98 -msgid "" -"The last is similar, but you drag from the center of the Circle to the " -"edge.\n" -msgstr "" -"Die letzte, aber vergleichbare, Methode ist das Ziehen vom Mittelpunkt zur " -"Kreislinie.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:99 -msgid "" -"We have built a siding using Sectional track and have 2 End-Points that " -"don't line up and are not connected automatically when placing the sectional " -"track.\n" -msgstr "" -"Wir haben ein Ausweichgleis erstellt und haben zwei Endpunkte erhaltem, die " -"beim Setzen von Festgleisen nicht automatisch verbunden wurden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:100 -msgid "" -"We use the command to adjust neighboring tracks so the gap is " -"closed.\n" -msgstr "" -"Wir benutzen den Befehl, um die benachbarten Gleise so " -"auszurichten, dass die Lücke geschlossen ist.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:101 -msgid "" -"Note: the adjustments are only done on tracks which have only 1 or 2 " -"connections. In this example the Turnouts would not be affected.\n" -msgstr "" -"Achtung: die Anpassungen wurden nur an Gleisen mit einer oder zwei " -"Verbindungsn gemacht. In diesem Besipiel wurden die Weichen nicht " -"verändert.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:102 -msgid "And now the gap is closed.\n" -msgstr "Und jetzt ist die Lücke geschlossen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:103 -msgid "Other tracks have been shifted slightly to close the gap.\n" -msgstr "Andere Gleise wurden leicht verschoben, um die Lücke zu schliessen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:104 -msgid "You can see these slight mis-alignments.\n" -msgstr "Sie können die kleinen Versätze sehen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:105 -msgid "But they will have no effect when the layout is actually built.\n" -msgstr "" -"Aber diese werden keinen Einfluss haben, wenn die Anlage später gebaut " -"wird.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:106 -msgid "" -"After working with Sectional track you might get to point where these mis-" -"alignments have accumulated and you wish to remove them.\n" -msgstr "" -"Nachdem Sie mit Festgleisen gearbeitet haben, haben sich diese Versätze " -"aufgebaut und Sie wollen diese entfernen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:107 -msgid "" -"You can remove these slight mis-alignments by tightening the tracks starting " -"from a unconnected End-Point. Use Shift-Left-Click with the " -"command.\n" -msgstr "" -"Sie können diese kleinen Versätze durch Zusammenziehen der Gleise entfernen. " -"Beginnen Sie an einem nicht verbundenen Endpunkt durch Drücken der Umschalte-" -"Taste beim Deücken des Knopfes.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:108 -msgid "First use the command to disconnect the tracks.\n" -msgstr "" -"Zuerst benutzen Sie den Befehl um die Verbindung der Gleise zu " -"lösen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:109 -msgid "" -"Then with the command, Shift-Left-Click on the 2 End-Points.\n" -msgstr "" -"Dank ativieren Sie den Befehl und Klicken bei gedrückter " -"Umschaltetaste auf die beiden Endpunkte.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:110 -msgid "In example shows a simple figure-8 layout using Sectional track.\n" -msgstr "In diesem Besipiel wird aus Festgleisen eine \"8\" gelegt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:111 -msgid "" -"You will notice that the tracks do not line up exactly in one location.\n" -msgstr "" -"Wie Sie sehen, sind die Gleise an einer Stelle nicht exakt ausgerichtet.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:112 -msgid "" -"We can use the command to move the connecting tracks slightly and " -"connect the 2 End-Points.\n" -msgstr "" -"Mit dem Befehl können wir die zu verbindenden Gleise leicht " -"verschiebenund die beiden Endpunkte verbinden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:113 -msgid "The two End-Points are now aligned and connected.\n" -msgstr "Die beiden Endpunkte sind jetzt ausgerichtet und verbunden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:114 -msgid "The connection was made by adding small gaps in other tracks.\n" -msgstr "" -"Die Verbindung wurde hergestellt, in dem kleine Lücken zwischen andere " -"Gleise eingefügt wurden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:115 -msgid "There are several ways to create a Curved track.\n" -msgstr "Es gibt mehrere Möglichkeiten, ein gebogenes Gleis zu erstellen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:116 -msgid "" -"You can choose which to use by clicking on the small button to the left of " -" command button if the current Curve command is not the one you " -"want.\n" -msgstr "" -"Sie können zwischen diesen wählen, in dem Sie auf den kleinen Knopf neben " -"dem Knopf drücken.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:117 -msgid "" -"The first is by clicking on the first End-Point and dragging in the " -"direction of the Curve.\n" -msgstr "" -"In der ersten Möglichkeit wird dieser durch Auswahl des ersten Endpunktes " -"und Ziehen in die Richtung des Bogen erstellt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:118 -msgid "" -"You will see a straight track with a double ended Red arrow at the end.\n" -msgstr "" -"Sie sehen ein gerades Gleis mit einem roten Pfeil mit zwei Spitzen am Ende.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:119 -msgid "Click and drag on one of the Red arrows to complete the Curve.\n" -msgstr "" -"Klicken und ziehen Sie eine der roten Spitzem um den Bogen zu " -"vervollständigen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:120 -msgid "" -"The next method is to click at one End-Point and drag to the center of the " -"Curve.\n" -msgstr "" -"Die nächste Methode ist das Klicken auf einen Endpunkt und das Ziehen zum " -"Mittelpunkt der Kurzve.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:121 -msgid "" -"Now you will see the double ended Red arrow connected to the center of the " -"Curve marked by a small circle.\n" -msgstr "" -"Wie vorher sehen Sie den roten Pfeil mit zwei Spitzen, der mit dem " -"Mittelpunkt des Bogen verbunden ist. Dieser ist mit einem kleinen Kreis " -"markiert.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:122 -msgid "As before, drag on one of the Red arrows to complete the Curve.\n" -msgstr "" -"Wie schon vorher beenden Sie den Bogen, indem Sie an einer der Pfeilspitzemn " -"ziehen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:123 -msgid "" -"The next method is similar to the last except that you drag first from the " -"center of the Curve to one End-Point.\n" -msgstr "" -"Die nächste Methode ist vergleichbar zur vorherigen, allerdings Ziehen Sie " -"zuerst vom Mittelpunkt zu einem Endpunkt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:124 -msgid "Once again, drag on a Red arrow to complete the Curve.\n" -msgstr "" -"Auch diesmal ziehen Sie an der roten Pfeilspitze um den Bogen zu vollenden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:125 -msgid "" -"The last method begins by drawing a line between the two End-Points of the " -"Curve. This forms the Chord of the Curve.\n" -msgstr "" -"Bei der letzten Methode beginnen Sie, indem Sie eine Linie zwischen den " -"beiden Endpunkten ziehen. Diese bildet die Sehne des Bogen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:126 -msgid "Now drag on a Red arrow to complete the Curve.\n" -msgstr "Jetzt ziehen Sie an der roten Pfeilspitze um den Bogen zu erstellen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:127 -msgid "This demo will construct a control panel for part of a bigger layout.\n" -msgstr "" -"In dieser Demo wird ein Steuerpult für einen Teil einer größeren Anlage " -"erstellt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:128 -msgid "For our control panel we will use Å’\" lines. \n" -msgstr "Für unser Pult werden wir 1/2\" breite Linien benutzen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:129 -msgid "Also, we will use a 1/8\" grid to lay out our controls.\n" -msgstr "" -"Außerdem werden wir ein 1/8\" Raster für die Ausrichtung der " -"Steuerungselemente benutzen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:130 -msgid "" -"First, we will set up the Snap Grid for 1\" grid lines and 8 divisions.\n" -msgstr "" -"Als erstes stellen wir das Fangraster auf 1\" Rasterlinien und 8 " -"Unterteilungen ein.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:131 -msgid "Now, clear the layout and turn on the Snap Grid.\n" -msgstr "Jetzt löschen wir den Entwurf und schalten das Fangraster ein.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:132 -msgid "First step: draw the lines representing the tracks.\n" -msgstr "Erster Schritte: zeichnen Sie die Linien, die die Gleise darstellen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:133 -msgid "We specify the line width in pixels.\n" -msgstr "Wir geben die Linienbreite in Bildpunkten an.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:134 -msgid "" -"To create a Å’\" line, divide the dots-per-inch (DPI) of your display by 4 " -"and then by the drawing scale (which is 2 right now).\n" -msgstr "" -"Um eine 1/2 Inch breite Linie zu erzeugen, wird die Auflösung des " -"Bildschirms (DPI) durch 4 und dann durch den Zeichenmaßstab (im Moment 2) " -"geteilt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:135 -msgid "" -"For MS-Windows the DPI is usually 98, so choose: 98/4/2 = 12 " -"(approximately).\n" -msgstr "" -"Unter Windows ist die Auflösung normalerweise 98, also wählen wir 98 / 4 / 2 " -"= ca. 12.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:136 -msgid "For Linux, the DPI is usually 72, so choose: 72/4/2 = 9.\n" -msgstr "" -"Unter Linux ist die Auflösung normalerweise 72, also wählen wir 72 / 4 / 2 = " -"9.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:137 -msgid "" -"Notice how the Snap Grid keeps the main line and siding track parallel and " -"the connecting tracks and spur at a 45° angle.\n" -msgstr "" -"Beachten Sie, wie das Fangraster die Haupt- und die Nebenstrecke parallel " -"führt und die Verbindungen und das Abstellgleis auf einem 45° Winkel hält.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:138 -msgid "Second step: add LEDs for the turnout position indicators.\n" -msgstr "ZweiterSchritt: hinzufügen der LEDs für die Weichenanzeige.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:139 -msgid "We will use T1 red and green LEDs.\n" -msgstr "Wir werden T1 rote und grüne LEDs benutzen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:140 -msgid "We will zoom in to show positioning.\n" -msgstr "Wir zoomen rein, um die Positionierung zu zeigen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:141 -msgid "" -"Notice that when we are in the correct position (on the 1/8\" grid), the " -"Marker lines on the bottom and left rulers will high-light the tick marks. " -"When both ticks are high-lighted, press the space bar to finalize the LED.\n" -msgstr "" -"Beachten Sie, dass die Markierungslinien unten und links die " -"Fangmarkierungen hervorheben, wenn wird in der richtigen Position sind. " -"Sobald beide Markierungen hervorgehoben sind, die LED durch Drücken der " -"Leertaste fixieren.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:142 -msgid "Now we'll add push buttons to control the turnouts.\n" -msgstr "Jetzt fügen wir Drucktaster für die Steuerung der Weichen dazu.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:143 -msgid "Let's add signals to our siding.\n" -msgstr "Lassen Sie uns noch Signale an unserem Ausweichgleich aufstellen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:144 -msgid "" -"The entrance to the siding will be protected by double headed signals.\n" -msgstr "" -"Die Einfahrt in das Ausweichgleich wird durch ein doppeltes Signal " -"geschützt\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:145 -msgid "First turn off the Snap Grid.\n" -msgstr "Zuerst schalten Sie bitte das Fangraster aus.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:146 -msgid "Rotate the signals and move them to the proper locations.\n" -msgstr "" -"Rotieren Sie die Signale und setzen diese dann an die richtige Stelle.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:147 -msgid "" -"We rotate the signals by Shift-Right-Click and select 90° CW on the popup " -"menu. We can not show the popup menu in demo mode, but will simulate the " -"effect.\n" -msgstr "" -"Wir rotieren die Signale durch Drücken und Festhalten der Umschalttaste bei " -"gleichzeitigem Mausklick.Aus dem Menu wählen wir 90° gegen UZS aus. Im Demo-" -"Mode kann das Menu nicht angezeigt werden, aber wir simulieren den Effekt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:148 -msgid "The exits from the siding will be protected by single headed signals.\n" -msgstr "" -"Die Ausfahrt aus dem Ausweichgleich wird durch ein einfaches Signal " -"gesichert.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:149 -msgid "Now for some touch-ups.\n" -msgstr "Nun noch ein paar kleinere Nachbesserungen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:150 -msgid "Notice when the line meet at an angle there is a gap.\n" -msgstr "" -"Beachten Sie, dass am Berührungspunkt zwischen zwei Linien ein Spalt " -"existiert.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:151 -msgid "We will fill this gap with the Å’\" dot.\n" -msgstr "Wir füllen diesen Spalt mit einem 1/2 Inch großen Punkt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:152 -msgid "" -"Note: Win95/Win98/WinME does not support drawing lines with flat end-caps, " -"but only with round end-caps.\n" -msgstr "" -"Note: Win95/Win98/WinME does not support drawing lines with flat end-caps, " -"but only with round end-caps.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:153 -msgid "Users on those platforms will not see the gap.\n" -msgstr "Users on those platforms will not see the gap.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:154 -msgid "" -"Add an arrow head to indicate the tracks that connect to the rest of the " -"layout.\n" -msgstr "" -"Mit einer Pfeilspitze werden die Gleise markiert, die mit dem Rest der " -"Anlage verbunden sind.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:155 -msgid "Rotate the arrow head by 180° and move into position.\n" -msgstr "" -"Rotieren Sie die Pfeilspitze um 180° und bringen Sie diese in die richtige " -"Position.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:156 -msgid "And add some labels.\n" -msgstr "Und fügen einige Beschriftungen hinzu.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:157 -msgid "" -"We want to print our control panel onto a 8Å“x11 page, but the control panel " -"is a bit too wide.\n" -msgstr "" -"Wir würden das Steuerpult gerne auf Paiper mit der Größe 8\"x11\" drucken, " -"aber es ist zu breit.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:158 -msgid "Lets tighten it up a bit.\n" -msgstr "Lassen Sie uns das ein bisschen enger zusammen packen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:159 -msgid "" -"First turn the Snap Grid on again so any moves we make will keep objects on " -"the grid.\n" -msgstr "" -"Zuerst schalten Sie bitte das Fangraster wieder ein, damit die Objekte beim " -"Verschieben ausgerichtet bleiben.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:160 -msgid "Lets move the spur track the left 3/4\"\n" -msgstr "Lassen Sie uns das Abstellgleis um ein 3/4 Inch nach links schieben.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:161 -msgid "Now move the right side of the siding over.\n" -msgstr "Jetzt verschieben Sie die rechte Seite des Ausweichgleises.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:162 -msgid "Now, adjust the ends of the mainline and siding tracks.\n" -msgstr "" -"Und passen nun die Enden des Hauptgleises und des Ausweichgleises an.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:163 -msgid "And move the title over as well.\n" -msgstr "Anschliessend noch den Titel verschieben.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:164 -msgid "Now you can print it.\n" -msgstr "Jetzt können Sie das Ergebnis drucken.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:165 -msgid "The cross-hairs on the LEDs and switch show the centers for drilling.\n" -msgstr "" -"Fadenkreuze markieren die Mittelpunkte der LEDs und Schalter und ermöglichen " -"so ein einfaches Bohren.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:166 -msgid "" -"Pressing the button lets you delete selected tracks from the " -"layout.\n" -msgstr "" -"Durch Drücken der -Taste können Sie die ausgewählten Gleise vom Plan " -"löschen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:167 -msgid "" -"First you select the tracks you want to delete, and then press the " -"button.\n" -msgstr "" -"Zuerst wählen Sie die Gleise, die Sie löschen wollen und drücken dann " -".\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:168 -msgid "" -"If you delete a track connected to an easement curve, then the easement " -"curve is deleted as well.\n" -msgstr "" -"Wenn Sie ein Gleis löschen, das einen Ãœbergangsbogen besitzt, so wird dieser " -"Ãœbergangsbogen ebenfalls gelöscht.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:169 -msgid "You can use the command to undelete tracks.\n" -msgstr "" -"Sie können den -Befehl nutzen, um ein versehentliches Löschen " -"rückgängig zu machen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:170 -msgid "" -"If you Left-Drag on the layout you can select all tracks within an area.\n" -msgstr "" -"Durch Ziehen mit der Maus bei gedrückter linker Taste können Sie alle Gleise " -"in einem Bereich markieren.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:171 -msgid "" -"Note, only tracks within the selected area are deleted. Since the easement " -"curve is connected to a deleted track, it is deleted as well.\n" -msgstr "" -"Beachten Sie, dass nur Gleise innerhalb des markierten Bereichs gelöscht " -"werden. Da der Ãœbergangsbogen mit einem gelöschten Gleis verbunden ist, wird " -"dieser ebenfalls gelöscht.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:172 -msgid "" -"The demo also simulates entering values and selecting options on various " -"dialogs.\n" -msgstr "" -"Die Demo simuliert die Eingabe von Werten und Auswahl von Optionen in " -"verschiedenen Dialogfenstern.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:173 -msgid "" -"This is simulated by drawing a rectangle around the control when values are " -"entered or changed.\n" -msgstr "" -"Dies wird simuliert, in dem ein Rechteck um das Eingabefeld gezeichnet wird, " -"wenn Werte eingegeben oder geändert werden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:174 -msgid "" -"Here we are going to make some changes to the Display dialog. Notice how " -"this is simulated.\n" -msgstr "" -"Hier machen wir Änderungen im Anzeige-Dialog. Beachten Sie, wie das " -"simuliert wird.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:175 -msgid "" -"This effect is only used in demonstration mode. During normal operation you " -"will not see this.\n" -msgstr "" -"Dieser Effekt wird nur im Demonstrations-Modus benutzt. Während der normalen " -"Benutzung werden Sie das nicht sehen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:176 -msgid "Dimension Lines are used to mark the distances between two points.\n" -msgstr "" -"Maßlinien werden benutzt, um den Abstand zwischen zwei Punkten zu zeigen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:177 -msgid "" -"Here we will create a Dimension Line to show the separation between two " -"tracks.\n" -msgstr "" -"Hier erstellen wir eine Maßlinie, um den Abstand zwischen zwei parallelen " -"Gleisen zu zeigen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:178 -msgid "" -"We might also want to measure the distance between two structures. In this " -"case we will use a larger dimension line.\n" -msgstr "" -"Möglicherweise wollen wir auch den Abstand zwischen zwei Gebäuden bestimmen." -"In diesem Fall nutzen wir eine größere Maßlinie.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:179 -msgid "" -"We can use the command to change the position of the Dimension " -"Line and the size of the numbers.\n" -msgstr "" -"Der Befehl kann genutzt werden, um die Position der Maßlinie " -"und die Größe der Zahlen zu ändern.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:180 -msgid "" -"This example will show the effect of using easements while joining tracks.\n" -msgstr "" -"In diesem Beispiel wird die Wirkung der Ãœbergangsbögen während des Verbinden " -"von Gleisen gezeigt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:181 -msgid "First, we'll enable easements.\n" -msgstr "Zuerst schalten wir Ãœbergangsbögen an.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:182 -msgid "" -"We've selected sharp easements. The minimum radius curve we can use will be " -"9.75\"\n" -msgstr "" -"Wir haben enge Ãœbergangsbögen ausgewählt. Der Mindestradius, den wir " -"benutzen können, beträt 9,75\".\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:183 -msgid "Notice the label on the Easement button has changed to 'Sharp'.\n" -msgstr "" -"Beachten Sie, dass die Beschriftung des Knopfes <Ãœbergangsbogen> auf 'Sharp' " -"geändert wurde.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:184 -msgid "" -"Note the connecting curve does not quite meet the straight tracks. This the " -"'Offset'.\n" -msgstr "" -"Beachten Sie. dass das Verbindungsgleis das gerade Gleis nicht genau trifft. " -"Das ist der 'Absatz'.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:185 -msgid "Here the connecting curve is too small.\n" -msgstr "Jetzt ist der Verbindungsradius zu klein.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:186 -msgid "" -"The connecting curve is made of three tracks, the curve and two easement " -"segments on each end.\n" -msgstr "" -"Die verbindende Kurve besteht aus drei Gleisen, der Kurve und den " -"Ãœbergangsbögen an jedem Ende.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:187 -msgid "" -"We have designed part of the layout with a siding, 2 branches and a spiral " -"loop. We want to set Elevations.\n" -msgstr "" -"Wir haben einen Teil eines Gleisplan mit Nebengleis, 2 Abzweigen und einer " -"Gleiswendel entworfen. Jetzt wollen wir die Höhen festlegen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:188 -msgid "First we will set elevations at the end of the branches.\n" -msgstr "Zuerst legen wir die Höhen am Ende der Abzweige fest.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:189 -msgid "We'll select the end of the top branch and set the Elevation to 4\"\n" -msgstr "" -"Wir wählen das Ende des oberen Abzweigs und legen die Höhe auf 4\" fest.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:190 -msgid "First, click on the End-Point.\n" -msgstr "Zuerst klicken Sie auf den Endpunkt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:191 -msgid "Next, pick Defined on the Elevation dialog Radio box.\n" -msgstr "Als nächstes wählen Sie 'Fest' im Dialogfenster für das Höhenmaß.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:192 -msgid "And set the Elevation to 4.\n" -msgstr "Und setzen die Höhe auf 4.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:193 -msgid "Now, select the other branch and set it's elevation to 2\"\n" -msgstr "" -"Jetzt wählen Sie den anderen Abzweig und legen seine Höhe auf 2\" fest.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:194 -msgid "We can move the Elevations by using Right-Drag\n" -msgstr "" -"Wir können die Höhenmaß durch Ziehen mit der Maus bei gedrückter rechter " -"Taste verschieben.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:195 -msgid "Now, we set the Elevation at one end of the Siding.\n" -msgstr "Jetzt legen wir die Höhe an einem Ende des Nebengleises fest.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:196 -msgid "We want to find the elevations where the 2 tracks cross.\n" -msgstr "" -"Wir wollen die Höhen der Gleise ermitteln, an denen diese sich kreuzen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:197 -msgid "We picked an End-Point on the upper track.\n" -msgstr "Wir haben einen Endpunkt am oberen Gleis ausgewählt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:198 -msgid "" -"XTrackCAD has computed the Elevation (2.34\") at this point based on the " -"Elevation at the siding and a combination of the of the first Elevations.\n" -msgstr "" -"XTrackCAD hat die Höhe (2,34\") an dieser Stellle auf Grundlage der Höhe des " -"Nebengleises in Verbindung mit den ersten Höhenangaben ermittelt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:199 -msgid "" -"We create a Computed Elevation here that will be automatically adjusted " -"whenever the other Elevations are changed.\n" -msgstr "" -"Hier erstellen wir eine 'Berechnete' Höhe, die automatisch angepasst wird, " -"wenn sich andere Höhenangaben ändern.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:200 -msgid "" -"The Compute Elevation is based on Elevations at end of both of the " -"branches. We may want to base the Elevation on only one branch. For " -"example if one branch was the mainline we don't want the other branch " -"affecting this Computed Elevation.\n" -msgstr "" -"Die berechnete Höhe basiert auf den Höhen an den Endpunkten der beiden " -"Abzweige. Wir wollen aber möglicherweise nur die Höhe eines Abzweigs " -"benutzen. Das kann sinnvoll sein, wenn der Abzweig das Hauptgleis bildet und " -"wir nicht wollen dass das andere Gleis die Höhenberechnung beeinflusst.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:201 -msgid "We do this by Ignoring the branch we don't want.\n" -msgstr "Wir erreichen das, indem wir einen Abzweig ignorieren.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:202 -msgid "We'll ignore the lower branch.\n" -msgstr "Wir werden den unteren Abzweig ignorieren.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:203 -msgid "" -"Notice at the End-Point where the tracks cross, we see the Elevation has " -"changed from 2.34 to 2.64.\n" -msgstr "" -"Beachten Sie, dass sich die Höhe an der Kreuzug von 2,34 auf 2,64 geändert " -"hat.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:204 -msgid "Now we want to know the elevation of the lower track.\n" -msgstr "Jetzt wollen wir die Höhe des unteren Gleises ermitteln.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:205 -msgid "There is no End-Point on the lower track here.\n" -msgstr "Es gibt hier keinen Endpunkt des unteren Gleises.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:206 -msgid "" -"Use Shift-Left-Click to Split the track and create an End-Point we can use " -"for an Elevation,\n" -msgstr "" -"Durch Klicken mit der Maus bei gedrückter Umschalttaste wird das Gleis " -"getrennt und ein Endpunkt, den wir für die Festlegung der Höhe nutzen " -"können, eingefügt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:207 -msgid "and create another Computed Elevation point.\n" -msgstr "Wir erstellen einen neuen berechneten Höhenpunkt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:208 -msgid "Now we want to label the Grade on this section of track.\n" -msgstr "Jetzt benennen wir die Steigung auf diesem Gleisabschnitt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:209 -msgid "" -"Again, since there is no End-Point nearby, we split the track to create an " -"End-Point we can use,\n" -msgstr "" -"Auch hier ist wieder kein Endpunkt in der Nähe, daher trennen wir das Gleis " -"um einen nutzbaren Endpunkt zu erhalten.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:210 -msgid "and create a Grade marker.\n" -msgstr "Dort erstellen wir eine Steigungsmarkierung.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:211 -msgid "Note the marker has an arrow pointing in the upwards direction.\n" -msgstr "" -"Beachten Sie, dass die Markierung einen Pfeil besitzt, der in Richtung des " -"Anstiegs zeigt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:212 -msgid "" -"The last thing we want to do is to create a Station label that we'll use in " -"the command.\n" -msgstr "" -"Als letzten Schritt erstellen wir noch eine Beschriftung für einen Bahnhof, " -"den wir im Befehl benutzen werden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:213 -msgid "Now, set the Elevation to Station and enter the its name.\n" -msgstr "" -"Jetzt setzen Sie die Höhenmarkierung auf 'Bahnhof' und geben den Namen " -"ein.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:214 -msgid "" -"XTrackCAD can help find tracks that are curved too sharply or are too " -"steep. These tracks are Exception tracks and are drawn in the Exception " -"track color.\n" -msgstr "" -"XTrackCAD kann Ihnen helfen, Gleise zu finden, die einen zu engn Radius " -"bilden oder die zu steil ansteigen. Diese Gleise sind Ausnahmegleise und " -"werden in der Ausnahmegleisfarbe dargestellt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:215 -msgid "" -"In this example we have a curved track with radius of 9\" and a straight " -"track with a grade of 3.8%.\n" -msgstr "" -"In diesem Besipiel haben wir eine Kurve mit einem Radius von 9,5\" und ein " -"gerades Gleis auf einer 3.8% Steigung.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:216 -msgid " \n" -msgstr " \n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:217 -msgid "" -"The Layout dialog shows the Minimum Track Radius is 9\" and the Maximum " -"Track Grade is 5%.\n" -msgstr "" -"Im den Optionen für den Gleisplan sehen wir, dass der Mindestradius mit 9\" " -"und die maximale Steigung mit 5% festgelegt sind.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:218 -msgid "" -"If we make the curved track sharper it will be drawn in the Exception " -"color.\n" -msgstr "" -"Verringern wir den Radius der Kurve, so wird das Gleis mit der Ausnahmefarbe " -"dargestellt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:219 -msgid "" -"If we make the straight track steeper it will also be drawn in the Exception " -"color.\n" -msgstr "" -"Vergrößern wir die Steigung des geraden Gleises, so wird das Gleis ebenfalls " -"in der Ausnahmefarbe dargestellt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:220 -msgid "" -"You can change the Exception color on the Colors dialog from the Options " -"menu.\n" -msgstr "" -"Die Ausnahmefarbe kann im Farbdialogfenster des Optionen-Menus geändert " -"werden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:221 -msgid "" -"The unconnected End-Point of any track can be extended with the " -"command using Right-Drag.\n" -msgstr "" -"Gleise mit mindestens einem freien Endpunkt Gleise können mit dem <Ändern>-" -"Befehl oder durch Ziehen mit gedrücktem rechtem Mausknopf geändert werden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:222 -msgid "Select the End-Point and Right-Drag.\n" -msgstr "Endpunkt auswählen und mit rechter Maustaste ziehen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:223 -msgid "The extending track can be straight...\n" -msgstr "Die Erweiterung kann gerade sein...\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:224 -msgid "... or curved.\n" -msgstr "...oder gebogen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:225 -msgid "" -"If you extend a Straight or Curved flex track and enable Easements then an " -"Easement curve will be automatically generated when you extend the track.\n" -msgstr "" -"Wenn die Funktion Ãœbergangsbogen aktiv ist, während Sie ein gerades oder " -"gebogenes Flexgleis verändern, so wird ein Ãœbergangsbogen erstellt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:226 -msgid "" -"The command will create a mirror image of the selected objects.\n" -msgstr "" -"Der Befehl erzeugt ein Spiegelbild der ausgewählten Objekte.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:227 -msgid "After selecting the object, drag a line which will form the mirror.\n" -msgstr "" -"Nach der Auswahl der Objekte, wird eine Linie gezogen die die Spiegelachse " -"bildet.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:228 -msgid "The mirror line does not have to be vertical or horizontal.\n" -msgstr "Diese Spiegellinie muss nicht horizontal oder vertikal sein.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:229 -msgid "You can also flip any number of objects.\n" -msgstr "Sie können jede beliebige Anzahl von Objekten spiegelen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:230 -msgid "Watch what happens to the structure and turnout titles.\n" -msgstr "" -"Achten Sie darauf, was mit den Beschriftungen an Gebäuden und Weichen " -"geschieht.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:231 -msgid "" -"Note that the turnout title has been changed from the Medium Right to Medium " -"Left. When turnouts are flipped, XTrackCAD will try to find a matching " -"turnout and if found will change the name.\n" -msgstr "" -"Beachten Sie auch, dass aus der mittleren Rechtsweiche eine mittlere " -"Linksweiche wurde. Werden Weichen gespiegelt, versucht XTrackCAD eine " -"passende Weiche zu finden und ersetzt den Namen, wenn dies gelingt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:232 -msgid "" -"Structures do not have Right and Left hand versions. Their title is changed " -"to indicate that they were flipped.\n" -msgstr "" -"Gebäude haben keine rechte oder linke Version. Der veränderte Titel zeigt, " -"dass diese gespiegelt wurden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:233 -msgid "You can use the command to change their title.\n" -msgstr "Mit dem Befehl kann der Tietel wieder geändert werden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:234 -msgid "" -"The and commands (on the Tools menu) are a powerful way to " -"manipulate Turnout and Structure definitions.\n" -msgstr "" -"Die und Befehle bilden einen leistungsfähigen " -"Weg, Weichen- oder Gebäude-Definition zu verändern.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:235 -msgid "We'll start with a simple turnout and add a switch machine.\n" -msgstr "" -"Wir beginnen mit einer einfachen Weiche zu der wir einen Weichenantrieb " -"zufügen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:236 -msgid "" -"Now that we have drawn a rough outline of a switch machine we will group it " -"with the turnout definition.\n" -msgstr "" -"Nachdem wir jetzt den groben Umriß des Antriebs gezeichnet haben, gruppieren " -"wir diesen mit der Weichen-Definition.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:237 -msgid "First we Select the objects in the new definition.\n" -msgstr "Zuerst wählen wir die Objekte in der neuen Definition aus.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:238 -msgid "Now do the command.\n" -msgstr "Und wenden jetzt den Befehl an.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:239 -msgid "" -"The command dialog shows the Title (Manufacturer, Description and " -"Part Number) of the new definition. This information is taken from the " -"Selected objects you are grouping.\n" -msgstr "" -"Das Dialogfenster für den Befehl zeigt den Titel (Hersteller, " -"Beschreibung und Teilenummer) für die neue Definition an. Diese Information " -"kommt aus den ausgewählten Teilen der Gruppe.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:240 -msgid "" -"The 'Replace with new group?' toggle will replace the Selected objects with " -"the new definition.\n" -msgstr "" -"Der 'Ersetzen durch neue Definition' Schalter ermöglicht es, die " -"ausgewählten Objekte durch die neuen Definition zu ersetzen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:241 -msgid "" -"If we don't change the Title then the new definition will replace the " -"existing definition.\n" -msgstr "" -"Wenn wir den Titel nicht verändern, so ersetzt die neue Definition die " -"bereits vorhandene.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:242 -msgid "We'll give this definition a new Description.\n" -msgstr "Wir geben der Gruppe eine neue Beschreibung.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:243 -msgid "We're done with this definition. Press Ok.\n" -msgstr "Diese Definition ist fertig. Drücken Sie OK.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:244 -msgid "You will see the updated image on the HotBar.\n" -msgstr "Sie sehen das aktualisierte Bild in der Auswahlleiste.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:245 -msgid "" -"The command replaces any Selected turnouts or structures with " -"their parts.\n" -msgstr "" -"Der Befehl zum Auflösen der Gruppe ersetzt gewählte Weichen oder Gebäude " -"durch ihre Teile.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:246 -msgid "" -"Structures and non-track segements of turnouts are composed of Lines, " -"Circles and other shapes. In this turnout these are the two lines and the " -"two squares.\n" -msgstr "" -"Gebäude und Weichen sind aus Linien, Kreisen und anderen Formen " -"zusammengesetzt. Zu dieser Weiche gehören zwei Linien und zwei Quadrate.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:247 -msgid "" -"We will Ungroup this turnout and see how the individual parts can be " -"changed.\n" -msgstr "" -"Wir werden diese Weiche in ihre Teile zerlegen und sehen, wie die einzelnen " -"Teile verändert werden können.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:248 -msgid "First Select the turnout and then Ungroup it.\n" -msgstr "" -"Zuerste wählen Sie die Weiche aus und lösen dann die Gruppierung auf.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:249 -msgid "Notice that the Title now indicates the turnout is Ungrouped.\n" -msgstr "" -"Beachten Sie, dass der Titel jetzt darauf hinweis, dass die Weiche aufgelöst " -"ist.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:250 -msgid "Hit Escape to deselect everything.\n" -msgstr "Durch Drücken von Escape wird die Auswhl aufgehoben.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:251 -msgid "Now Select the lines and squares.\n" -msgstr "Jetzt wählen Sie die Linien und Quadrate aus.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:252 -msgid "" -"We could modify these object or add new ones. For now we'll just delete " -"them.\n" -msgstr "" -"Wir können diese Objekt ändern oder neue hinzufügen.Diesmal werden wir sie " -"einfach löschen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:253 -msgid "And move the Label out of the way.\n" -msgstr "Und die Beschriftung auf die Seite schieben.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:254 -msgid "Notice that the turnout has been broken into three parts.\n" -msgstr "Beachten Sie, dass die Weiche in drei Teile zerfallen ist.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:255 -msgid "" -"Two ends of the turnout, from the frog to the end of the diverging leg and " -"from the points to the left, are now straight track sections.\n" -msgstr "" -"Zwei Endpunkte der Weiche, vom Herzstück zum Ende des abzweigenden Gleis und " -"von den Weichenzungen nach links, sind jetzt gerade Abschnitte.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:256 -msgid "" -"The a turnout is made of a number of individual straight and curved track " -"segements. This turnout had four segments:\n" -msgstr "" -"Eine Weiche besteht aus einer Anzahl von geraden und gebogenen Gleisstücken. " -"Diese Weiche hat vier Stücke:\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:257 -msgid " 1 a short straight segment to the left of the points\n" -msgstr "1. ein kurzes gerades Stück, links von den Weichenzungen,\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:258 -msgid " 2 a long straight segment to the right of the points\n" -msgstr "2. ein langes gerades Stück, rechts von den Weichenzungen,\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:259 -msgid " 3 a curved segment from the points to the frog\n" -msgstr "3. ein gebogenes Stück von den Weichenzungen bis zum Herzstück, und\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:260 -msgid "" -" 4 a straight segment from the frog to the end of the diverging leg.\n" -msgstr "" -"4. ein gerades Stückvom Herzstück bis zum Ende des abzweigenden Gleis.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:261 -msgid "The first and last segments have be converted to straight tracks.\n" -msgstr "" -"Der erste und der letzte Gleisabschnitt wurden in gerade Gleise " -"umgewandelt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:262 -msgid "" -"The second and third segments form the the body of the turnout and can not " -"be ungrouped further.\n" -msgstr "" -"Der zweite und der dritte Gleiusabschnitt bilden den Kern der Weiche und " -"können nicht weiter zerlegt werden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:263 -msgid "" -"You can later Group this turnout with the straight segments to recreate the " -"turnout definition. You can also add other track segments to turnout " -"definitions.\n" -msgstr "" -"Sie können die Weiche mit den geraden Abschnitten später gruppieren um die " -"Definition wiederherzustellen. Sie können auch andere Gleisabschnitte zur " -"Weichendefinition zufügen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:264 -msgid "Now, create a track and place the new turnout on it.\n" -msgstr "Jetzt erstellen Sie bitte ein Gleis und setzen die Weiche darauf.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:265 -msgid "Now suppose we want to replace the black squares with green circles.\n" -msgstr "" -"Nehmen wir mal an, wir wollen die schwarzen Quadrate durch grüne Kreise " -"ersetzen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:266 -msgid "First we Select the turnout.\n" -msgstr "Zuerst wählen wir die Weiche aus.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:267 -msgid "And now Ungroup it (from the Tools Menu)\n" -msgstr "" -"Der ersten und der letzte Abschnitt wurden in gerade Gleise umgewandelt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:268 -msgid "" -"Notice that the name has changed to indicate the turnout was Ungrouped.\n" -msgstr "" -"Beachten Sie, dass der Name geändert wurde, um anzuzeigen, dass die " -"Gruppierung der Weiche aufgelöst wurde.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:269 -msgid "" -"Now, hit escape to deselect everything and then Select the 2 squares and " -"delete them.\n" -msgstr "" -"Jetzt drücken Sie Escape umd die Auswahl zurückzusetzen. Dann wählen Sie die " -"zwei Quadrate und löschen diese.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:270 -msgid "Now draw the green circles...\n" -msgstr "Jetzt zeichnen Sie die grünen Kreise...\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:271 -msgid "and Group the new definition.\n" -msgstr "und gruppieren die neue Definition.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:272 -msgid "" -"Notice that the turnout in the HotBar is angled the same as the turnout on " -"the layout. Make sure your new definition is rotated the way you want it.\n" -msgstr "" -"Beachten Sie, dass die Weiche in der Auswahlleiste so schräg wie die Weiche " -"auf der Anlage ist. Stellen Sie sicher, das die neuen Definitionen so " -"ausgerichtet sind, wie Sie es bevorzugen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:273 -msgid "We can also create turnouts from simple straight and curved tracks.\n" -msgstr "" -"Wir können auch aus einfachen geraden und gebogenen Gleisen Weichen " -"erstellen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:274 -msgid "We'll create two tracks that have a common End-Point.\n" -msgstr "Wir erzeugen zwei Gleise mit einem gemeinsamen Endpunkt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:275 -msgid "At this point we can modify the tracks if necessary.\n" -msgstr "" -"Zu diesem Zeitpunkt können die Gleise verändern, sofern das notwendig ist.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:276 -msgid "We will use the command to change the tracks.\n" -msgstr "" -"Wir benutzen den Befehl um die Eigenschaften der Gleise zu " -"verändern.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:277 -msgid "We'll make the Length 7.5\".\n" -msgstr "Wir setzen die Länge auf 7,5\".\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:278 -msgid "" -"If we change the Length, each End-Point will be moved to shorten the track. " -"We want to just move the Right End-Point. To control this, change the Pivot " -"to First which means the Left End-Point will be unchanged when we change the " -"length (or angle) of the track.\n" -msgstr "" -"Wenn wir die Länge verändern, wird jeder Endpunkt erschoben um das Gleis zu " -"verkürzen.Wir wollen, dass nur der rechte Endpunkt bewegt wird. Um das zu " -"steuern, stellen Sie den Fixpinkt auf den Ersten. Das bedeutet, dass der " -"linke Endpunkt unverändert bleibt wenn wir die Länge (oder den Winkel) des " -"Gleises ändern.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:279 -msgid "Now when change the Length only the Right End-Point will move.\n" -msgstr "Jetzt wird beim Ändern der Länge nur der rechte Endpunkt verschoben.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:280 -msgid "Now let's look at the curved track.\n" -msgstr "Jetzt schauen wir uns das gebogene Gleis an.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:281 -msgid "" -"Here the Left End-Point (which we don't want to move) is the Second End-" -"Point, so we'll make that the Pivot.\n" -msgstr "" -"Hier ist der linke Endpunkt, den wir nicht verschieben wollen, der zweite " -"Endpunkt. Also legen wir diesen als Fixpunkt fest.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:282 -msgid "We want the curve to have a radius of 20\" and an angle of 17.5°.\n" -msgstr "" -"Wir wollen, dass der Bogen einen Radius von 20\" und einen Winkel von 17,5° " -"hat.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:283 -msgid "First change the Radius...\n" -msgstr "Zuerst ändern Sie den Radius...\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:284 -msgid "and the the Angular Length.\n" -msgstr "und den Winkelabstand.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:285 -msgid "Now Select both tracks...\n" -msgstr "Jetzt bitte beide Gleise auswählen...\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:286 -msgid "and Group them.\n" -msgstr "und gruppieren sie.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:287 -msgid "" -"If the two tracks have a common End-Point then they will form a Turnout and " -"can be switched with the command. Otherwise they will just be two " -"track segments grouped together.\n" -msgstr "" -"Wenn die beiden Gleise einen gemeinsamen Endpunkt haben, werden Sie eine " -"Weiche bilden, dieim Betriebsmodus gesteuert werden kann. Andernfalls werden " -"es einfach zwei gruppierte Gleise sein.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:288 -msgid "" -"We have created a left hand turnout and we also want a right hand version.\n" -msgstr "" -"Wir haben eine links abzweigende Weiche erstellt und wollen auch die rechts " -"abzweigende Form.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:289 -msgid "We'll use the command.\n" -msgstr "Wir verwenden den Befehl \n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:290 -msgid "" -"Drag a horizontal line that will be the mirror for the command.\n" -msgstr "" -"Ziehen Sie als Spiegelstrich für den Spiegeln Befehl eine horizontale " -"Linie.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:291 -msgid "Notice the title has changed to Flipped Left.\n" -msgstr "Beachten Sie, dass der Titel auf Gespiegelt Links geändert wurde.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:292 -msgid "Now Group the turnout.\n" -msgstr "Jetzt gruppieren Sie die Weiche\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:293 -msgid "We'll change the Title and Part No for the new defintion.\n" -msgstr "" -"Wir werden den Titel und die Teilnummer für die neue Definition ändern.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:294 -msgid "" -"To Remove the definitions, use the Custom Management dialog on the Tools " -"menu.\n" -msgstr "" -"Um Definitionen zu löschen benutzen Sie die \"Anpassungs Verwaltung\" im " -"\"Verwalten\" Menü.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:295 -msgid "Select the definitions you added and Delete them.\n" -msgstr "Wählen Sie die zugefügten Definitionen aus udn löschen diese.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:296 -msgid "" -"Now we will create a helix in the corner of the layout connected to 2 " -"tracks.\n" -msgstr "" -"Jetzt erstellen wir in der Ecke der Anlage eine Gleiswendel, die zwei Gleise " -"verbindet.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:297 -#, c-format -msgid "" -"We will be creating a helix with a Elevation Difference of 12\", Grade of " -"1.5% and limit the Vertical Separation to at least 2\".\n" -msgstr "" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:298 -msgid "First set the Elevation Difference to 12\"\n" -msgstr "Als erstes den Höhenunterschied auf 12\" setzen\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:299 -msgid "Next set the Vertical Separation to 2\"\n" -msgstr "Als nächstes wird der vertikale Abstand auf 2\" gesetzt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:300 -msgid "Notice how this causes the number of Turns to be set to 6\n" -msgstr "Beachten Sie, dass hierfür 6 Windungen benötigt werden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:301 -msgid "Next set the Grade to 1.5%\n" -msgstr "Jetzt setzen die die Steigung auf 1,5%\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:302 -msgid "Notice how this causes the Radius to change.\n" -msgstr "Beachten Sie wie dadruch der Radius verändert wurde.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:303 -msgid "" -"Setting these values changes the Radius to 21.2\" and the number of Turns to " -"6.\n" -msgstr "" -"Durch Setzen dieser Werte wird der Radius auf 21,2\" und die Anzahl der " -"Windungen auf 6 geändert.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:304 -msgid "" -"Now we specify the Angular Separation between the enterance and exit to the " -"helix.\n" -msgstr "" -"Jetzt ändern wir den Winkel zwischen eingehendem und abgehendem Gleis der " -"Wendel.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:305 -msgid "Note: this will decrease the Radius slightly.\n" -msgstr "Beachten Sie, dass dadurch der Radius geringfügig kleiner wurde.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:306 -msgid "Next we can fine tune the helix by decreasing the Radius to 15\".\n" -msgstr "" -"Als nächstes können wir die Wendel durch Ändern des Radius auf 15\" " -"optimieren.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:307 -msgid "Note the change to the Grade.\n" -msgstr "Beachten Sie die Änderung der Steigung.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:308 -msgid "" -"Lastly change the Vertical Separation to 2.5\". The number of Turns will " -"change to 4 and the grade increase to almost 3%.\n" -msgstr "" -"Zum Schluss ändern die Differenz zwischen den Windungen auf 2,5\". Die " -"Anzahl der Windungen wird auf 4 geändert und die Steigung vergrößert sich " -"auf beinahe 3%.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:309 -msgid "" -"Note: the Vertical Separation will be increased. This value is the " -"Elevation Difference (12.0) divided by the total number of turns. The total " -"number of turns is 4.25: 4 whole Turns plus a quarter turn for the Angular " -"Separation.\n" -msgstr "" -"Beachten Sie dass die Windungsdifferenz sich vergrößert. Dies ist der " -"Höhenunterschied, geteilt durch die Anzahl der Windungen. Insgesamt sind es " -"4,25 Windungen: 4 ganze Windungen und eine viertel Umdrehung für den Winkel " -"zwischen den Zugängen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:310 -msgid "" -"Now that the helix parameters are set we can place the helix on the layout.\n" -msgstr "" -"Nachdem die Eigenschaften für die Gleiswendel bestimmt sind, setzen wir " -"diese auf die Anlage.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:311 -msgid "" -"Next, join the 2 straight tracks to the helix in the same way we join to a " -"circle.\n" -msgstr "" -"Als nächstes verbinden Sie die zwei geraden Gleise mit der Wendel genauso " -"wir Sie Gleise mit einem Kreis verbinden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:312 -msgid "" -"Notice that the length has increased because we have more than 4 turns in " -"the helix. It is closer to 4.25 turns.\n" -msgstr "" -"Beachten Sie, dass sich die Länge vergrößert hat, da wir mehr als vier " -"Windungen in der Wendel haben. Es sind nahe an 4,25 Umdrehungen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:313 -msgid "" -"Next, we assign elevations to the 2 End-Points of the helix. This will " -"determine the grade and separation between the helix coils.\n" -msgstr "" -"Als nächstes legen wir die Höhen der beiden Endpunkt der Wendel fest. " -"Dadurch werden die Steigung und derAbstand zwischen den Windungen " -"festgelegt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:314 -msgid "" -"Note: we could set the elevations anywhere along the connecting tracks " -"instead. XTrackCAD treats a helix as a single length of track for " -"elevations.\n" -msgstr "" -"Beachten Sie, dass wir die Höhen auch irgendwo an den verbindenden Gleisen " -"festlegen können. XTrackCAD behandelt bei den Höhen eine Wendel als ein " -"durchgängiges Stück Gleis.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:315 -msgid "" -"We have set the elevations to 1\" and 13\" to produce a grade of 3.0% with " -"2.8\" between coils.\n" -msgstr "" -"Wir haben die Höhen auf 1\" und 13\" gesetzt um eine Steigung von 3% mit " -"2,8\" zwischen den Windungen zu erzeugen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:316 -msgid "" -"You can use the command to change the number of Turns or the " -"Elevations at either end of the Helix. This will affect the Grade and " -"Vertical Separation.\n" -msgstr "" -"Sie können den Eigenschaften Befehl benutzen, um die Anzah der Windungen " -"oder die Höhe an den Enden der Wendel zu ändern. Dadurch ändern sich die " -"Steigung und der Abstand.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:317 -msgid "The helix description can be moved by the command.\n" -msgstr "" -"Mit dem Befehl kann die Beschriftung der Wendel " -"verschoben werden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:318 -msgid "" -"In addition to using the turnout definitions you can create 'Hand Laid " -"Turnout'.\n" -msgstr "" -"Zusätzlich zu den Weichendefinitionen können Sie auch Selbstbauweichen " -"erstellen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:319 -msgid "This is two step process:\n" -msgstr "Das ist ein zweistufiger Prozess.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:320 -msgid "1 - click on the frog and drag away to set the frog angle\n" -msgstr "" -"1. klicken Sie auf das Herzstück und setzen Sie durch ziehen mit gedrücktem " -"Mausknopf den richtigen Winkel.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:321 -msgid "" -" Hint: the further you drag from the frog, the more accurate the angle.\n" -msgstr "" -"Hinweis: Je weiter weg vom Herzstück Sie ziehen, um so genauer lässt sich " -"der Winkel einstellen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:322 -msgid "2 - click and drag to set the position of the points\n" -msgstr "2. Klicken und ziehen Sie um die Position der Zungen festzulegen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:323 -msgid "We can create Hand Laid Turnouts on curved tracks.\n" -msgstr "Wir können Selbstbauweichen auch auf gebogenen Gleisen erstellen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:324 -msgid "A Hand Laid Turnout is composed of several parts.\n" -msgstr "Eine Selbstbauweiche besteht aus mehreren Teilen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:325 -msgid "The actual Turnout is a short portion at the points.\n" -msgstr "Die eigentliche Weiche ist ein kleines Stück an den Weichenzungen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:326 -msgid "The other parts are various straight and curved segments.\n" -msgstr "Die anderen Teile sind verschiedene gerade und gebogene Teilstücke.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:327 -msgid "The new curved turnout is also composed of several segments.\n" -msgstr "Die neue Bogenweiche besteht ebenfalls aus mehreren Abschnitten.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:328 -msgid "Welcome to the XTrackCAD demonstration.\n" -msgstr "Willkommen bei der XTrackCAD Demonstration.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:329 -msgid "" -"This will show some the features of XTrackCAD in an automated presentation. " -"This window contains a number of controls and a message area (which I hope " -"you are reading now). \n" -msgstr "" -"Diese wird Ihnen einige Funktionen von XTrackCAD in einer automatischen " -"Präsentation zeigen. Dieses Fenster enthält einige Steuerungselements und " -"einen Nachrichtenbereich, den Sie gerade lesen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:330 -msgid "The controls are:\n" -msgstr "Die Steuerungselemente sind:\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:331 -msgid "Step - advances to the next step of the demo.\n" -msgstr "Einzelschritt - weiter zum nächsten Schritt in der Demo.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:332 -msgid "Next - skips ahead to the next demo.\n" -msgstr "Nächster - springt zur nächsten Demo.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:333 -msgid "Quit - exits the demo and returns to XTrackCAD.\n" -msgstr "Beenden - verlässt die Demo und kehrt zu XTrackCAD zurück.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:334 -msgid "Speed - controls the speed of the demo.\n" -msgstr "Geschwindigkeit - steuert die Geschwindigkeit der Demo.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:335 -msgid "Click Step now for the next message.\n" -msgstr "" -"Klicken Sie jetzt auf Einzelschritt um zur nächsten Nachricht zu gelangen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:336 -msgid "" -"If this is the first time you have used the demo you may want to rearrange " -"the windows so the demo window does not obscure the main window.\n" -msgstr "" -"Wenn dies das erste Mal ist, dass Sie die Demo benutzen, sollten Sie die " -"Fensterpositionen festlegen. Achten Sie dabei darauf, dass das Hauptfenster " -"nicht durch das Demofenster verdeckt wird.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:337 -msgid "" -"You can move the demo window now by dragging on the title bar at the top of " -"the window. I suggest you move it to the top of your screen.\n" -msgstr "" -"Sie können das Demofenster jetzt durch Ziehen an der Titelleiste des " -"Fensters verschieben. Am besten verschieben Sie es an den oberen Rand des " -"Bildschirms.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:338 -msgid "" -"The various controls are disabled when it would be inappropiate to click on " -"them. When the demo is running the Step button is disabled. When the demo " -"is paused the Step button is enabled and you can click it when you are ready " -"to view the next part of the demo.\n" -msgstr "" -"Die verschiedenen Steuerelement sind deaktiviert, während diese nicht " -"nutzbar sind. Während die Demo läuft, ist der Einzelschritt-Knopf " -"deaktiviert. Wenn die Demo angehalten ist, wird der Einzelschritt-Knopf " -"aktiviert. Sie können darauf klicken, wenn Sie für den nächsten Schritt der " -"Demo bereit sind.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:339 -msgid "You can click on Quit to return to XTrackCAD at any time.\n" -msgstr "" -"Durch Klicken auf Verlassen können Sie jederzeit zu XTrackCAD zurückkehren.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:340 -msgid "You can adjust the speed of the demonstration with the Speed control.\n" -msgstr "" -"Die Geschwindigkeit der Demo können Sie mit dem Geschwindigkeitsknopf " -"anpassen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:341 -msgid "The demos are designed to fit within a certain sized window.\n" -msgstr "Die Demos sind für eine bestimmte Fenstergröße entworfen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:342 -msgid "" -"For best results, change the size of the main XTrackCAD window so the box " -"shape is completely visible.\n" -msgstr "" -"Um beste Ergebniss zu erreichen, ändern Sie die Größe des XTrackCAD " -"Hauptfensters so, dass die das Rechteck vollständig sicht bar ist.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:343 -msgid "You can do this by clicking and dragging on a corner of the window.\n" -msgstr "" -"Dies können Sie erreichen, in dem Sie an der rechten unteren Ecke des " -"Fensters ziehen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:344 -msgid "This is the end of the introductory demo.\n" -msgstr "Dies ist das Ende der Einführungsdemo.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:345 -msgid "" -"Please click Step for the next demo or click Quit to return to XTrackCAD.\n" -msgstr "" -"Bitte klicken Sie Einzelschritt für die nächste Demo oder Verlassen, um zu " -"XTrackCAD zurück zu kehren.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:346 -msgid "" -"You can also join to and from circles. This will change the circles to " -"curves.\n" -msgstr "" -"Sie können auch Gleise mit Gleiskreisen verbinden. Dadurch werden aus " -"Kreisen Bögen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:347 -msgid "In this example we will join two circles.\n" -msgstr "In diesem Beispiel werden wir zwei Kreise verbinden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:348 -msgid "" -"Here we've selected points on the two circles. The direction of the " -"connections (whether clockwise or counter clockwise) is controlled by where " -"on the circle you select the connection points.\n" -msgstr "" -"Hier haben wir Punkte auf zwei Kreisen ausgewählt. Die Richtung der " -"Verbindungen, entweder im Uhrzeigersinn oder dagegen, wird aufgrund der " -"Stellen auf den Kreisen, die Sie angewählt haben, ermittelt.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:349 -msgid "Now let's try a cross connection.\n" -msgstr "Jetzt versuchen wir eine kreuzweise Verbindung.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:350 -msgid "" -"Note that the connection is from different 'ends' of the circle than in the " -"last example.\n" -msgstr "" -"Beachten Sie, dass die Verbindung an anderen Punkten der Kreise ansetzt als " -"bem letzten Beispiel.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:351 -msgid "This examples shows joining tracks whose End-Points are aligned.\n" -msgstr "" -"Dieses Beispiel zeigt wir Gleise verbunden werden, die zueinander parallel " -"sind.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:352 -msgid "" -"Note the 2 pairs of tracks have End-Points that are close and aligned but " -"not connected.\n" -msgstr "" -"Beachten Sie dass die Endpunkte der beiden Gleise nahe beieinander und " -"parallel, aber nicht verbunden, sind.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:353 -msgid "The first case joins the curve and straight track.\n" -msgstr "" -"Im ersten Fall werden eine gebogenes und ein gerades Gleis verbunden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:354 -msgid "The second case will join the two straight tracks.\n" -msgstr "Im zweiten Fall werden zwei gerade Gleise verbunden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:355 -msgid "Note that the two straight tracks were combined to form one track.\n" -msgstr "" -"Beachten Sie, dass die beiden geraden Gleise zu einem Gleis zusammengefasst " -"wurden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:356 -msgid "" -"The command can join straight and curved tracks (in either order).\n" -msgstr "" -"Mit dem Befehl können gerade und gebogene Gleise (in jeder " -"Reihenfolge) verbunden werden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:357 -msgid "A connecting track is drawn between the two tracks.\n" -msgstr "Ein Verbindungsgleis wird zwischen den beiden Gleisen gezeichnet.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:358 -msgid "" -"Notice that the curved track is extended as the connection point moves past " -"the End-Point.\n" -msgstr "" -"Beachten Sie, dass das gebogene Gleis verlängert wird, wenn der " -"Verbindungspunkt über den Endpunkt hinaus verschoben wird.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:359 -msgid "Here the connection makes the curved track wrap around.\n" -msgstr "Hier bildet das Verbindungsgleis eine Spirale.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:360 -msgid "" -"Now the cursor is about to be moved past the other (far) End-Point of the " -"straight track. You will receive a warning and the connecting track turns " -"Red.\n" -msgstr "" -"Jetzt wird der Mauszeiger über den anderen, entfernten, Endpunkt des geraden " -"Gleises verschoben. Sie erhalten einen Hinweis und das Verbindungsgleis wird " -"rot.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:361 -msgid "The command can move one group of tracks to join with another.\n" -msgstr "" -"Mit dem Befehl können Gruppen von Gleisen verschoben werden, um " -"diese mit anderen zu verbinden.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:362 -msgid "First command is used to select tracks.\n" -msgstr "Der Befehl wird benutzt, um Objekte auszuwählen.\n" - -#: ../../../build/xtc_4-2-3dev/app/i18n/custmsg.h:485 -msgid "Selected tracks can be moved or rotated during the the tracks you want to move.\n" +msgstr "Zuerst wählen Sie die Gleise aus, die verschoben werden sollen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:363 +msgid "Click and Shift-Left-Click on the two End-Points.\n" +msgstr "" +"Klicken Sie auf und klicken dann bei gedrückter Umschalttaste " +"auf die beiden Endpunkte.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:364 +msgid "The selected tracks are moved into position.\n" +msgstr "Die ausgewählten Gleise werden an die Position verschoben.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:365 +msgid "" +"Two straight tracks are joined by selecting the two End-Points. The " +"selected End-Points will be those closest to the cursor when the track is " +"selected.\n" +msgstr "" +"Zwei gerae Gleise werden verbunden, indem die Endpunkte ausgewählt werden. " +"Die beim Auswählen der Gleise nahegelegensten Endpunkte werden ausgewählt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:366 +msgid "" +"A connecting track is drawn between the two tracks. Notice how it moves as " +"the cursor is dragged along the second track.\n" +msgstr "" +"Ein Verbindungsgleis wird zwischen den beiden Gleisen gezeichnet. Beachten " +"Sie wie dieses neu geformt wird, wenn der Mauszeiger entlang des zweiten " +"Gleises bewegt wird.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:367 +msgid "" +"Note that two tracks are extended if you move past the end of the track.\n" +msgstr "" +"Beachten Sie, dass die beiden Gleise verlängrt werden, wenn Sie denn " +"Mauszeiger über das Ende des Gleises hinaus bewegen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:368 +msgid "" +"Notice what happens if you drag past the intersection points of the two " +"tracks.\n" +msgstr "" +"Beachten Sie was passiert, wenn Sie über den Schnittpunkt der beiden Gleise " +"hinaus ziehen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:369 +msgid "This is probably not a very useful thing to do.\n" +msgstr "Das ist wahrscheinlich keine sinnvolle Lösung.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:370 +msgid "You can connect from any track to a turntable\n" +msgstr "Sie können jedes Gleis mit einer Drehscheibe verbinden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:371 +msgid "Note: you cannot have a turntable as your first connection point.\n" +msgstr "" +"Beachten Sie, dass die Drehscheibe nicht der erste Verbindungspunkt sein " +"darf.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:372 +msgid "" +"You cannot place the connecting track too close to an existing stall track. " +"How close you can get is controlled by the Turntable Angle on the Setup " +"dialog.\n" +msgstr "" +"Ein Verbindungsgleis kann nicht zu dicht an einem existieren " +"Drehscheibenabgang erstellt werden. Wie klein der Abstand sein darf, wird " +"über den Drehscheibenwinkel in den Einstellungen festgelegt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:373 +msgid "In this example it is set to 7.5 degrees.\n" +msgstr "In diesem Beispiel ist dieser auf 7,5\" gestellt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:374 +msgid "You can drag the connecting point all round the turntable.\n" +msgstr "Sie können den Verbindungspunkt irgendwo an die Drehscheibe ziehen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:375 +msgid "" +"As you drag away from the turntable a straight track will be drawn to the " +"cursor postion and a curve will be drawn from the cursor to the connecting " +"track.\n" +msgstr "" +"Während Sie von der Drehscheibe weg ziehen, wird ein gerades Gleis zur " +"Position des Mauszeiger gezeichnet. Ein Gleisbogen wird vom Mauszeiger zum " +"Verbindungsgleis gezeichnet.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:376 +msgid "" +"Now the cursor will be moved within the turntable. Notice the error " +"message.\n" +msgstr "" +"Jetzt wird der Mauszeiger zu einer Position innerhalb der Drehscheibe " +"bewegt. Beachten Sie die Fehlermeldung.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:377 +msgid "All done.\n" +msgstr "Fertig.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:378 +msgid "" +"The Draw Commands are used to draw straight and curved lines on the layout.\n" +msgstr "" +"Die Zeichenbefehle werden genutzt, um gerade oder gebogene Gleise auf dem " +"Gleisplan zu erstellen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:379 +msgid "" +"Lines are drawn by clicking at the starting postion and dragging to the " +"final position.\n" +msgstr "" +"Linien werden gezeichnet, indem der Startpunkt durch Klicken festgelegt wird " +"und dann durch Ziehen der zusätzliche Endpunkt erstellt wird.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:380 +msgid "" +"Drawing lines with the Shift key held down will use the previous line End-" +"Point as the starting position. This makes it easy to draw connected " +"lines.\n" +msgstr "" +"Wird beim Zeichnen die Umschalttaste festgehalten wird der letzte Endpunkt " +"als Startpunkt für das neue Gleis benutzt. Dadurch wird das Zeichnen " +"verbundener Linien vereinfacht.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:381 +msgid "You also draw in various colors and line widths.\n" +msgstr "" +"Sie können auch mit unterschiedlichen Farben und Liniendicken zeichnen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:382 +msgid "" +"Like Curved Tracks, Curved Lines can be drawn by a variety of methods.\n" +msgstr "" +"Wie Gleisbögen können auch gebogene Linien mit unterschiedlichen Methoden " +"gezeichnet werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:383 +msgid "" +"Here we will draw a Curve by dragging from one End-Point to the other to " +"define the chord of the Curve. Then we will drag from the center to shape " +"the curve.\n" +msgstr "" +"Hier zeichnen wir eine Kurve, indem wir zuerst von Endpunkt zu Endpunkt " +"ziehen um die Sehne der Kurve festzulegen. Dann Ziehen wir vom Mittelpunkt " +"aus, um die Form der Kurve festzulegen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:384 +msgid "Boxes are useful for drawing rectangular shapes.\n" +msgstr "" +"Gefüllte Rechtecke können für das Erstellen rechteckiger Formen benutzt " +"werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:385 +msgid "" +"Circles can be drawn by clicking on the center or edge and dragging to set " +"the radius.\n" +msgstr "" +"Kreise werden gezeichnet, indem auf den Rand oder den Mittelpunkt geklickt " +"wird. Danach wird durch Ziehen der Radius festgelegt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:386 +msgid "Here we will drag from the Center.\n" +msgstr "Hier beginnen wir vom Mittelpunkt aus.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:387 +msgid "Lines and Shapes can be deleted by Selecting and Deleting.\n" +msgstr "" +"Linien und Formen können durch Auswählen und Löschen entfernt werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:388 +msgid "We also draw Polylines and filled shapes.\n" +msgstr "Wir können auch Vielfachlinien und gefüllte Formen erstellen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:389 +msgid "" +"A Polyline is drawn by dragging to place each of the point in the Polyline.\n" +msgstr "" +"Eine Vielfachlinie wird gezeichnet, indem jeder Eckpunkt durch Ziehen " +"gesetzt wird.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:390 +msgid "" +"To finish off the Polyline press the key or choose another drawing " +"type.\n" +msgstr "" +"Um die Vielfachlinie zu beenden, drücken Sie die Leertaste oder wählen eine " +"andere Zeichenoperation.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:391 +msgid "A Polygon is drawn in the same way\n" +msgstr "Ein Vieleck wird genauso gezeichnet.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:392 +msgid "" +"You can use the Above and Below Commands to move lines and shapes to the " +"front or back of the drawing.\n" +msgstr "" +"Sie können die Befehle Ãœber und Unter benutzen, um Linien und Formen in den " +"Vorder- oder Hintergrund zu verschieben.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:393 +msgid "Filled Boxes and Circles work the same as line Boxes and Circles.\n" +msgstr "Gefüllte Rechtecke und Kreis werden genauso erstellt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:394 +msgid "" +"In the drawing area of the main window you can see an hollow arrow which " +"represents the mouse cursor. In this demo the mouse will move about to show " +"you the actions of different commands.\n" +msgstr "" +"Auf der Zeichenfläche des Hauptfenster sehen Sie einen leeren Pfeil anstelle " +"des Mauszeigers. In dieser Demo wird dieser bewegt, um Ihnen die " +"Arbeitsweise verschiedener Befehle zu zeigen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:395 +msgid "" +"The hollow arrow represents the mouse cursor without a mouse button being " +"pressed.\n" +msgstr "Der leere Pfeil entspricht dem Mauszeiger ohne gedrückte Maustaste.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:396 +msgid "" +"When the left mouse button would be pressed, the mouse cursor appears to " +"flash and the hollow arrow is replaced by a solid red arrow. While the left " +"button is pressed the mouse cursor will be a solid arrow.\n" +msgstr "" +"Würde die Maustaste gedrückt, blinkt der Mauszeiger und wird durch einen " +"gefüllten roten Pfeil ersetzt. Solange der linke Mausknopf gedrückt bleibt, " +"ist der Mauszeiger ein gefüllter Pfeil.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:397 +msgid "" +"Note: these color changes occur only during the demo to simulate mouse " +"button presses.\n" +msgstr "" +"Beachten Sie, dass diese Farbänderungen nur in einer Demo auftritt um " +"Tastendrücke anzuzeigen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:398 +msgid "" +"Moving the mouse while a mouse button is pressed is called 'dragging'.\n" +msgstr "" +"Das Bewegen der Maus während der Mausknopf gedrückt bleibt wird als 'Ziehen' " +"bezeichnet.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:399 +msgid "" +"When the left mouse button is released, the mouse cursor flashes and the " +"hollow arrow is restored.\n" +msgstr "" +"Wird der linke Mausknopf wieder losgelassen, blinkt der Mauszeiger und der " +"leere Pfeil wird wieder hergestellt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:400 +msgid "Dragging with the right button is simulated by a blue solid cursor.\n" +msgstr "" +"Das Ziehen mit dem gedrückten rechten Mausknopf wird durch einen gefüllten " +"blauen Mauszeiger dargestellt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:401 +msgid "" +"Sometimes the Shift key is held down while using the mouse for a Shift-Click " +"or a Shift-Drag. \n" +msgstr "" +"Manchmal wird während des Bewegen der Maus auch die Umschalttaste gedrückt " +"gehalten. Dies wird mit Umschalt-Klick und Umschalt-Ziehen bezeichnet.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:402 +msgid "This is indicated by an outline drawn around the solid arrow.\n" +msgstr "Dies wird durch eine Umlineum den gefüllten Pfeil dargestellt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:403 +msgid "" +"The main drawing area shows a portion of total layout. You can zoom in or " +"zoom out by choosing 'Zoom In' or 'Zoom Out' in the 'Edit' menu, by using " +"the Zoom buttons on the toolbar or by using the 'Page Down' and 'Page Up' " +"keys.\n" +msgstr "" +"Der Hauptzeichenbereich zeigt einen Teil des gesamten Gleisplanes. Sie " +"können diesen auf verschiedenen Wegen vergrössern oder verkleinern. Diese " +"Möglichkeiten sind die Zoom-Auswahlen im Menupunkt Bearbeiten, die Zoom-" +"Knöpfe in der Werkzeugleiste, die Bild hoch und runter Tasten und das " +"Mausrad.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:404 +msgid "You can see the entire layout in the Map window.\n" +msgstr "Den gesamten Gleisplan können Sie im Kartenfenster sehen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:405 +msgid "As you Zoom Out tracks are drawn with one line instead of two.\n" +msgstr "" +"Wenn Sie die Ansicht verkleinern, werden Gleise durch eine anstelle von zwei " +"Linien dargestellt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:406 +msgid "" +"You can change what portion of the layout is shown by using the 'Map' window " +"which shows a compressed version of the entire layout. A hilighted area of " +"the 'Map' (in reverse video) shows what portion of the layout is displayed " +"in the main drawing area.\n" +msgstr "" +"Sie können den im Hauptzeichenfenster gezeigten Bereich des Gleisplans mit " +"dem Karten-Fenster, das den gesamten Plan verkleinert darstellt, ändern. Ein " +"hervorgehobener Bereich der Karte (weiß auf schwarzem Grund) zeigt, welcher " +"Teil des Gleisplans im Moment dort gezeigt wird.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:407 +msgid "" +"You can Left-Drag the hilighted area in the Map window to change the " +"displayed portion of the layout.\n" +msgstr "" +"Durch Ziehen des hervorgehobenen Bereichs im Karten-Fenster können Sie den " +"angezeigten Bereich des Gleisplans verändern.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:408 +msgid "" +"You can also Right-Drag on the Map window to set the scale and position of " +"the Main window.\n" +msgstr "" +"Sie können auch Rechts-Ziehen um den Maßstab und die Position des Gleisplans " +"im Hauptfenster zu bestimmen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:409 +msgid "" +"The command lets you attach notes to various spots on the layout.\n" +msgstr "" +"Der Befehl ermöglicht es, an unterschiedlichen Stellen des " +"Gleisplans Notien anzubringen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:410 +msgid "" +"When you place a note, the Note editor window is displayed which lets you " +"enter the note.\n" +msgstr "" +"Wenn Sie eine Notiz anlegen, wird der Notizeditor geöffnet, der die Eingabe " +"eines Textes ermöglicht.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:411 +msgid "" +"If you click on a note in mode the Note editor displays the " +"note.\n" +msgstr "" +"Wenn Sie im Modus auf eine Notiz klicken, wird der Editor " +"angezeigt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:412 +msgid "This is the end of the XTrackCAD Demos.\n" +msgstr "Dies ist das Ende der XTrackCAD Demos.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:413 +msgid "Click Step to return to XTrackCAD.\n" +msgstr "Klicken Sie auf Einzelschritt um zu XTrackCAD zurück zu kehren.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:414 +msgid "Thanks for watching.\n" +msgstr "Danke für das Interesse.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:415 +msgid "This example shows how to create parallel tracks.\n" +msgstr "Dieses Besipiel zeigt wie paralle Gleise erstellt werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:416 +msgid "" +"The separation is set in the window. You should set " +"this value before you begin to select tracks.\n" +msgstr "" +"Der Abstand wird im Fenster eingestellt. Dies muss " +"geschehen, bevor das Glaus ausgewählt wird.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:417 +msgid "" +"You control which side the parallel track will be on by moving the cursor " +"from one side of the track centerline to the other.\n" +msgstr "" +"Sie können steuern, auf welcher Seite das Parallalgleis erstellt wird, indem " +"Sie den Mauszeiger von einer Seite derr Gleismitte auf die andere bewegen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:418 +msgid "When you release the mouse button the new parallel track is created.\n" +msgstr "" +"Sobald Sie den Mausknop loslassen, wird das parallele Gleis erstellt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:419 +msgid "" +"Note that the command remains active after you created the " +"track. This is controlled by the Sticky dialog in the Options menu.\n" +msgstr "" +"Beachten Sie, dass der Befehl aktiv bleibt nachdem Sie das " +"Gleis erstellt haben. Dies wird durch die Einstellungen in Wiederholte " +"Befehle festgelegt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:420 +msgid "You cannot create a track parallel to a turnout.\n" +msgstr "Zu einer Weiche können keine Parallelen erstellt werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:421 +msgid "" +"Note that the new curved track is automatically connected to the short " +"parallel track.\n" +msgstr "" +"Beachten Sie, dass das neue gebogene Gleis automatisch mit dem kurzen " +"parallelen Gleis verbunden wird.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:422 +msgid "" +"Polylines and Polygons (created with the command) can be modified by " +"dragging on their Corners or Edges.\n" +msgstr "" +"Vielfachlinen und Vielecke, erstellt mit dem Befehl können durch " +"Ziehen an den Ecken und Kanten verändert werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:423 +msgid "If you select the middle of an Edge a new Corner is created.\n" +msgstr "" +"Wenn Sie die Mitte einer Kante auswählen, wird eine neue Ecke erzeugt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:424 +msgid "" +"If you drag a Corner to another Corner the two are merged and the Edge " +"between them is removed.\n" +msgstr "" +"Wenn Sie eine Ecke auf eine andere Ecke ziehen, werden diese zusammengefasst " +"und die Kante dazwischen wird entfernt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:425 +msgid "But you cannot have a Poly-shape with less than 3 sides.\n" +msgstr "" +"Aber ein Vieleck oder eine Vielfachllinie mit weniger als drei Seiten ist " +"nicht möglich.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:426 +msgid "" +"To use the command you first need to define Elevations on your " +"layout.\n" +msgstr "" +"Um den Befehl nutzen zu können, müssen Sie zuerst Höhen auf " +"Ihrem Gleisplan festlegen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:427 +msgid "In this example we'll use the Elevations defined in the last example.\n" +msgstr "In dieser Demo werden wird die Höhen aus der letzten Demo benutzen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:428 +msgid "You can move or resize the Profile dialog now if you want.\n" +msgstr "Das Höhenprofil Fenster kann nun vergrößert werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:429 +msgid "" +"To show the Profile you need to select a Path on the tracks of your layout.\n" +msgstr "" +"Um das Höhenprofil anzeigen zu können muss eine Strecke in Ihrem Plan " +"ausgewählt werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:430 +msgid "Select a Defined Elevation point (marked by Gold dots).\n" +msgstr "Eine beliebigen Punkt festgelegen, um das Höhenprofil zu beginnen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:431 +msgid "We will start with the right end of the siding.\n" +msgstr "Wir starten am rechten Ende des Abstellgleises.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:432 +msgid "" +"The second Point is at the left end of the siding. The Path will be drawn " +"in Purple on the layout.\n" +msgstr "" +"Der zweite Punkt ist das linke Ende ds Nebengleises. Der Pfad wird in Purpur " +"auf dem Gleisplan dargestellt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:433 +msgid "Now select the end of one of the Branches\n" +msgstr "Jetzt wählen Sie das Ende eines der Abzweige aus.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:434 +msgid "" +"The Profile line is drawn in Red. This indicates that there some turnouts " +"on that section of the Path which have more than 2 connections.\n" +msgstr "" +"Das Höhenprofil wird in rot gezeichnet. Das bedeutet, dass es einige Weichen " +"auf diesem Abschnitt des Pfads gibt, die nmehr als zwei Verbindungen haben.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:435 +msgid "" +"The grade on this part of the Path is the average and may be affected by " +"other Elevations, such the end of the lower branch.\n" +msgstr "" +"Die Steigung auf diesem Teil des Pfads ist ein Durchschnittswert und knn " +"durch andere Höhen wie dem Ende des unteren Abzweigs beeinflusst werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:436 +msgid "Now try to select the End-Point of the other branch.\n" +msgstr "Versuchen Sie jetzt, den Endpunkt des anderen Abzweiges auszuwählen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:437 +msgid "" +"You will get an error message because there is no route to one of the ends " +"of the existing Path.\n" +msgstr "" +"Sie erhalten eine Fehlermeldung, da es keine Route zu einem der Endpunkte " +"des existieren Pfades gibt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:438 +msgid "" +"In this case remove the last part of the Path by clicking on current end of " +"the Path and reselect the End-Point.\n" +msgstr "" +"In diesem Fall entfernen Sie den letzten Teil des Pfads indem Sie auf das " +"das gegenwärtige Ende des Pfades klicken und den Endpunkt erneut festlegen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:439 +msgid "Notice that the Grade has changed on the Profile.\n" +msgstr "Beachten Sie, dass sich die Steigung im Höhenprofil geändert hat.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:440 +msgid "" +"You can Ignore End-Points on the Path by using Shift-Right-Click to display " +"the Profile Options popup menu and chosing Ignore.\n" +msgstr "" +"Sie können Endpunkte auf dem Pfad ignorieren. Dazu halten Sie die " +"Umschalttaste während Sie mit dem rechten Mausknopf klicjken. In den " +"Höhenprofil-Optionen wählen Sie ignorieren.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:441 +msgid "" +"Note: We can't show the menu in demo mode but we will show the effect of a " +"Shift Right Click and selecting ignore. We will be Ignoring the End-Point " +"of the Turnout that is not on the Path.\n" +msgstr "" +"Achtung: wir können das Menu im Demo-Modus nicht zeigen, zeigen aber den " +"Effekt daraus. Wir werden den Endpunkt der Weiche, der nicht auf dem Pfad " +"liegt, ignorieren.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:442 +msgid "Notice that part of the Profile line is redrawn in Blue.\n" +msgstr "" +"Beachten Sie, dass ein Teil des Höhenprofils in blauer Farbe neu gezeichnet " +"wurde.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:443 +msgid "" +"Also, the Computed Elevations and Grade marker on the right side of the " +"layout have been updated.\n" +msgstr "" +"Außerdem wurden die berechneten Höhen und die Steigungsmarkierung auf der " +"rechten Seite des Gleisplans aktualisiert.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:444 +msgid "" +"You can set additional Defined Elevation points using the Profile Options " +"popup menu. These points are added to the Profile if they are on the Path.\n" +msgstr "" +"Sie können weitere Punkte mit festgelegter Höhe zufügen, indem Sie das " +"Optionsmenu für Höhenprofile benutzen. Diese Punkte werden zu dem " +"Höhenprofil zugefügt, wenn Sie auf dem Pfad liegen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:445 +msgid "" +"We do this by Shift Right Click to display the Profile Options popup menu " +"and selecting Define.\n" +msgstr "" +"Dies geschieht durch durch Umschalt-Rechtsklick um das Optionsmenu für " +"Höhenprofile zu erhalten uns auswählen von Festlegen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:446 +msgid "" +"We've just added a Defined Elevation point to the middle of the lower " +"branch. Notice the addition on the Profile dialog.\n" +msgstr "" +"Wir haben gerade eine festgelegte Höhe in der Mitte des unteren Abzweigs " +"erstellt. Beachten Sie die Ergänzung im Höhenprofil.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:447 +msgid "" +"For the siding we defined a Station name but it's not on the Path, since the " +"Path takes the shortest distance between points.\n" +msgstr "" +"Für das Ausweichgleis haben einen einen Bahnhofsnamen vergeben. Dieser ist " +"nicht auf dem Pfad, da ein Pfad immer den kürzesten Weg zwischen Punkten " +"nutzt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:448 +msgid "" +"We can Ignore one of the End-Points on a Turnout to force the Path to take " +"the other route.\n" +msgstr "" +"Wir können durch Ignorieren eines des der Endpunkte an einer Weiche " +"erzwingen, dass der Pfad die andere Route nimmt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:449 +msgid "" +"Again we use Shift-Right-Click to display the Profile Options menu and " +"select ignore.\n" +msgstr "" +"Wieder benutzen wir Umschalt-Rechtsklick um das Optionsmenu für das " +"Höhenprofil anzuzeigen und wählen ignorieren.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:450 +msgid "Now remove the First section of the Path,\n" +msgstr "Jetzt entfernen Sie den ersten Teil des Pfads\n" + +#: ../../../../build/work/app/i18n/custmsg.h:451 +msgid "and reselect it.\n" +msgstr "und wählen ihn wieder.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:452 +msgid "" +"Now the Path goes through the Station End-Point and the name appears on the " +"Profile dialog.\n" +msgstr "" +"Jetzt führt der Pfad durch den Endpunkt am Bahnhof und der Name erscheint im " +"Höhenprofil.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:453 +msgid "Now we need to increase the separation where the tracks cross.\n" +msgstr "" +"Jetzt müssen wir den Höhenunterschied an der Stelle vergrössern, an der die " +"Gleise sich kreuzen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:454 +msgid "" +"The two Elevations you see here are Computed Elevations which means " +"XTrackCAD dynamically computes the Elevation based on the Elevations of " +"connecting tracks.\n" +msgstr "" +"Die beiden Höhen die Sie hier sehen, sind berechnete Werte. Das bedeutet, " +"dass XTrackCAD die Höhe auf Grundlage verbundener Gleise berechnet.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:455 +msgid "" +"First make the lower End-Point a Defined Elevation point using Shift-Right-" +"Click and the Profile Options menu. You will see the End-Point marked by a " +"Gold dot and a new line is added to the Profile dialog.\n" +msgstr "" +"Markieren Sie zuerst den unteren Endpunkt als festgelegt. Dies geschieht " +"durch Umschalt-Rechtsklick und das Optionsmenu für das Höhenprofil. Sie " +"werden sehen, dass der Endpunkt jetzt mit einem goldenen Punkt markiert ist. " +"Dem Höhenprofil wurde eine neue Linie zugefügt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:456 +msgid "Now, drag the point on the Profile Dialog to change the Elevation.\n" +msgstr "Jetzt ziehen Sie den Punkt im Höhenprofil um die Höhe zu ändern.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:457 +msgid "" +"Note the grade on each side of the point will be displayed at the bottom of " +"the Profile dialog.\n" +msgstr "" +"Beachten Sie, dass die Steigung auf beiden Seiten des Punktes im " +"Dialogfenster unten angezeigt wird.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:458 +msgid "" +"After we release the Profile is updated to show the new Elevation and " +"Grade.\n" +msgstr "" +"Nach dem Loslassen des Mausknopfes wird das Höhenprofil aktualisiert um die " +"neue Höhe und Steigung anzuzeigen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:459 +msgid "The command will change the size of the selected objects.\n" +msgstr "Der Befehl verändert die Größe der ausgwählten Objekte.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:460 +msgid "First we will try rescaling by ratio.\n" +msgstr "Zuerst skalieren wir über das Verhältnis.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:461 +msgid "We are going to make everything 150% bigger.\n" +msgstr "Wir vergrößern alles auf 150 Prozent.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:462 +msgid "Note the track gauge did not change.\n" +msgstr "Beachten Sie, dass die Spurweite nicht geändert wurde.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:463 +msgid "Let's try that again.\n" +msgstr "Lassen Sie uns das nochmals versuchen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:464 +msgid "Now we are going to convert from one scale to another.\n" +msgstr "Jetzt ändern wir von einem Maßstab zu einem anderen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:465 +msgid "We will convert everything from N scale to HO scale...\n" +msgstr "Wir werden alles von Spur N nach Spur H0 umwandeln...\n" + +#: ../../../../build/work/app/i18n/custmsg.h:466 +msgid "and change the track gauge as well.\n" +msgstr "und die Spurweite gleichzeitig ändern.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:467 +msgid "Note that the Title of the turnout did not change.\n" +msgstr "Beachten Sie, dass der Titel der Weiche nicht geändert wurde.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:468 +msgid "" +"The command will pivot the Selected objects. First Click on the " +"pivot point and then drag to Rotate the objects.\n" +msgstr "" +"Der Befehl ermöglicht das Rotieren von ausgewählten Objekten. " +"Klicken Sie zuerst auf das Zentrum der Drehbewegung und ziehen dann, um die " +"Objekte zu drehen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:469 +msgid "" +"In this example we will rotate the selected structure about it's center.\n" +msgstr "" +"In diesem Beispiel werden wir das Gebäude um seinen Mittelpunkt drehen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:470 +msgid "" +"The command will restrict the rotation to increments of 15° if you " +"hold down the Control key.\n" +msgstr "" +"Der Drehwinkel wird auf Vielfache von 15° begrenzt, wenn Sie die Steuerungs-" +"Taste gedrückt halten.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:471 +msgid "" +"Shift-Right-Click will display a popup-menu that you can use to rotate by " +"fixed amount (15°, 30°, 45°, 90° or 180°). The demonstration cannot show " +"the popup-menu but it can show the effects.\n" +msgstr "" +"Umschalten-Rechts-Klick öffnet ein Auswahlmenu, das Sie nutzen können um " +"vorgegebene Werte für die Drehung (15°, 30°, 45°, 90° or 180°) auszuwählen. " +"Diese Demonstration kann das Auswahlmenu nicht darstellen, aber sie zeigt " +"den Effekt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:472 +msgid "Here we will rotate by 90° clockwise (CW).\n" +msgstr "Jetzt drehen wir um 90° im Uhrzeigersinn.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:473 +msgid "" +"Another option of the command popup-menu is to Align the Selected " +"object with some other object.\n" +msgstr "" +"Der Befehl bietet auch die Möglichkeit, die ausgewählten Objekt an " +"anderen Objekten auszurichten.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:474 +msgid "" +"First we will click on one line of the Selected object. The angle of this " +"part of the object will be Aligned.\n" +msgstr "" +"Zuerst klicken wir auf eine Linie des asgewählten Objektes. Diese Linie wird " +"als Grundllinie für die Ausrichtung benutzt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:475 +msgid "" +"Next, we click on an Unselected object. The Selected structure will be " +"rotated so that the line we clicked on will be parallel to the straight " +"track.\n" +msgstr "" +"Dann klicken wir auf ein Objekt, das nicht ausgewählt ist. Das ausgewählte " +"Gebäude wird so gedreht, dass die gewählte Linie parallel zu dem geraden " +"Gleis ist.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:476 +msgid "" +"If we drag the mouse across the track, we can flip the structure by 180°. " +"This is similar to how we place turnouts.\n" +msgstr "" +"Wenn wir die Maus auf die andere Seite des Gleises ziehen, wird das Gebäude " +"um 180° gedreht. Dies ist vergleichbar zu dem Setzen von Weichen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:477 +msgid "" +"We can also align to curved shapes. The Selected object will be rotated to " +"be parallel to the curve under the cursor.\n" +msgstr "" +"Wir können auch an gebogenen Elementen ausrichten. Das ausgewählte Objekt " +"wird so gedreht, dass es parallel dem Punkt der Kurve ist, der sich unter " +"dem Mauszeiger befindet.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:478 +msgid "" +"As we drag along the curved track the Selected object rotates to follow the " +"curve.\n" +msgstr "" +"Während wir entlang des gebogenen Gleises ziehen, dreht sich das ausgewählte " +"Objekt um der Kurve zu folgen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:479 +msgid "Again, if we drag across the track we can flip the stucture.\n" +msgstr "" +"Auch hier können wir das Gebäude spiegeln, indem wir auf die andere Seite " +"ziehen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:480 +msgid "We can also Align to another Structure or any object.\n" +msgstr "" +"Wir können auch an anderen Gebäuden oder jedem anderen Objekt ausrichten.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:481 +msgid "" +"The command draws a Ruler on the layout you can use to measure " +"distances.\n" +msgstr "" +"Mit dem Befehl wird ein Lineal auf den Gleisplan gezeichnet. Dieses " +"kann genutzt werden, um Abstände zu messen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:482 +msgid "If you press the command again the Ruler is removed.\n" +msgstr "" +"Wenn Sie den Befehl nochmals Anklicken, wird das Lineal wieder " +"entfernt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:483 +msgid "But you can place it somewhere else.\n" +msgstr "Aber Sie können dieses auch an eine andere Stelle versetzen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:484 +msgid "The command.\n" +msgstr "Ausgewählte Gleise können verschoben und gedreht werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:486 +msgid "Selected tracks can also be deleted, hidden, listed and exported.\n" +msgstr "" +"Ausgewählte Gleise können auch gelöscht, verborgen, aufgelistet und " +"exportiert werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:487 +msgid "A single Left-Click selects tracks.\n" +msgstr "Ein einfacher Klick mit der linken Maustaste wählt ein Gleis aus.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:488 +msgid "Selecting a selected track de-selects it.\n" +msgstr "" +"Durch wiederholtes Klicken wird die Auswahl des Gleises wieder aufgehoben.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:489 +msgid "" +"Shift-Left-Click on a track will select all unselected tracks connected to " +"the track. Selection stops at a previously selected track.\n" +msgstr "" +"Umschalt-Links-Klick auf ein Gleis wählt alle Gleise aus, die mit diesem " +"verbunden sind. Der Vorgang bricht ab, sobald ein Gleis bereits ausgewählt " +"ist.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:490 +msgid "Be careful with this because its easy to select all tracks this way.\n" +msgstr "" +"Seien Sie vorsichtig, denn es ist sehr einfach unbeabsichtigt alle Gleise " +"auszuwählen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:491 +msgid "The key will deselect all objects.\n" +msgstr "Mit der Taste werden alle Objekte abgewählt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:492 +msgid "Left-Drag is used to select all objects within an area.\n" +msgstr "" +"Ziehen mit gedrückter linker Maustaste wählt alle Objekt in einem Bereich " +"aus.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:493 +msgid "And Right-Drag de-selects all tracks within an area.\n" +msgstr "" +"Und Ziehen mit rechter gedrückter Maustaste entfernt alle Objekte in einem " +"Bereich aus der Auswahl.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:494 +msgid "Shift-Left-Drag is used to move selected tracks.\n" +msgstr "" +"Links-Ziehen bei gedrückter Umschalt-Taste wird benutzt um die ausgewählten " +"Gleise zu verschieben.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:495 +msgid "" +"When you move selected tracks that are connected to unselected tracks, the " +"tracks will be disconnected. These points are marked by a Red cross on the " +"layout.\n" +msgstr "" +"Wenn Sie Gleise verschieben, die mit Gleisen verbunden sind, die nicht " +"ausgewählt sind, wird die Verbindung gelöst. Diese Punkte werden durch ein " +"rotes Kreuz auf dem Gleisplan markiert.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:496 +msgid "" +"Drawing the tracks while moving can be very time-consuming. We had just " +"used the \"Normal\" method of drawing tracks.\n" +msgstr "" +"Das Zeichnen der Gleise während des Verschieben kann die Bewegung sehr " +"verzögern. Gerade haben wir die \"normale\" Methode des Zeichnen benutzt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:497 +msgid "" +"The Command Options dialog (from the Options menu) contains a Radio button " +"group which you can use to pick the drawing method.\n" +msgstr "" +"Im Dialogfenster Befehlsoptionen (aus dem Einstellungen Menu) können Sie die " +"Zeichenmethode ändern.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:498 +msgid "" +"You can also popup the Command Options Menu by pressing Shift-Right-Click " +"which includes options for setting the drawing method. These options are " +"also available for the Move and Rotate Command Options Menu.\n" +msgstr "" +"Sie können das Befehlsoptionen Menu auch aufrufen, indem sie Umschalt-Rechts-" +"Klick betätigen. Diese Optionen sind auch für die Befehle Verschieben und " +"Drehen vorhnden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:499 +msgid "" +"The next method is \"Simple\" draws. Here tracks are drawn using one line, " +"no End-Points are drawn, lines are not drawn and structures are drawn using " +"a box outline.\n" +msgstr "" +"Die nächste Methode ist \"einfaches\" Zeichnen. Hier werden Gleise durch " +"eine Linie dargestellt, Endpunkte und Linien werden nicht gezeichnet. " +"Gebäude werden während der Operation durch ein Rechteck ersetzt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:500 +msgid "" +"Note: you can move the Command Options dialog if it obscures the main " +"window.\n" +msgstr "" +"Beachten Sie, dass Sie die das Dialogfenster Befehlsoptionen verschieben " +"können, wenn es das Hauptfenster verdeckt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:501 +msgid "" +"The next method is to just draw the End-Points of the selected tracks.\n" +msgstr "" +"Die nächste Methode ist das einfache Zeichnen der Endpunkte der ausgewählten " +"Gleise.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:502 +msgid "" +"Unconnected End-Points are indicated by Red crosses, and connected End-" +"Points are indicated by Red lines.\n" +msgstr "" +"Nicht verbundene Endpunkte werden durch ein rotes Kreuz markiert, verbundene " +"Endpunkte durch eine rote Linie.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:503 +msgid "Now we will go back to using the Normal method again.\n" +msgstr "Jetzt gehen wir zu der normalen Methode zurück.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:504 +msgid "" +"Shift-Right-Drag rotates the selected tracks about the pivot point (which is " +"where you started the drag)\n" +msgstr "" +"Umschalt-Rechts-Ziehen dreht die ausgewählten Gleise um das Zentrum, der " +"Punkt an dem Sie das Ziehen begonnen haben.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:505 +msgid "" +"Next we select the command. You can use Shift-Left-Click to " +"move an End-Point of a selected track to join with an unselected track.\n" +msgstr "" +"Jetzt wählen wir den Befehl . Mit Umschalt-Links-Klick " +"können Sie einen Endpunkt von ausgewählten Gleisen mit einem nicht " +"ausgewählten Gleis verbinden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:506 +msgid "" +"Note: because of differing display resolutions the next mouse click may not " +"be positioned correctly in this demo and the Move-To-Join operation may not " +"be demonstrated.\n" +msgstr "" +"Beachten Sie dass der Befehl \"Verbinden durch Bewegen\" in der Demo nicht " +"gezeigt werden kann.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:507 +msgid "The command is used to split and disconnect tracks.\n" +msgstr "" +"Der Befehl wird benutzt, um Gleise zu zerteilen und voneinander zu " +"trennen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:508 +msgid "Simply select the spot on the track you want to split.\n" +msgstr "" +"Wählen Sie einfach die Stelle des Gleises aus, an der dieses getrennt werden " +"soll.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:509 +msgid "You cannot split turnouts (unless you hold down the Shift key).\n" +msgstr "" +"Weichen können nur getrennt werden, wenn Sie die Umschalttaste drücken.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:510 +msgid "" +"If you split at spot that is already an End-Point between two tracks, or " +"split twice at the same spot, the track is disconnected.\n" +msgstr "" +"Wenn Sie an einem vorhandenen Endpunkt zerteilen oder wenn die an einer " +"Stelle doppelt zerteilen werden die Gleise getrennt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:511 +msgid "The command marks selected tracks as hidden.\n" +msgstr "Mit dem Befehl verbergen Sie die ausgewählten Gleise.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:512 +msgid "" +"A tunnel portal is drawn at the boundary between hidden and normal track.\n" +msgstr "" +"Ein Tunnelportal wird am Ãœbergang zwischen sichtbarem und verborgenem Gleis " +"gezeichnet.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:513 +msgid "" +"How the hidden tracks are drawn (solid, dashed or invisible) is controlled " +"by the Draw EndPts radio button group on the Setup dialog.\n" +msgstr "" +"Die Darstellung des verborgenen Gleises (durchgezogen, gestrichelt oder " +"unsichtbar) kann in den Einstellungen festgelegt werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:514 +msgid "" +"To 'un-hide' a track just Select it again and click the Tunnel button.\n" +msgstr "" +"Um die Gleise wieder sichtbar zu machen, wählen Sie diese aus und " +"wiederholen den Befehl .\n" + +#: ../../../../build/work/app/i18n/custmsg.h:515 +msgid "" +"Straight tracks are created by selecting the first End-Point of the track.\n" +msgstr "" +"Gerade Gleise werden erstellt indem der erste Endpunkt des Gleises gewählt " +"wird.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:516 +msgid "Then the other End-Point is dragged to its final postion.\n" +msgstr "" +"Dann wird der zweite Endpunkkt durch Ziehen an die richtige Position " +"gebracht.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:517 +msgid "The left mouse button is released at the final end postion.\n" +msgstr "An diesem Punkt wird der linke Mausknopf los gelassen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:518 +msgid "" +"Table Edges are used to mark the edges of the layout, either for aisles or " +"room walls.\n" +msgstr "" +"Tischkanten werden benutzt um die Ränder des Gleisplans, entweder für " +"Zugänge oder Wände benutzt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:519 +msgid "A Table Edge is attracted to the ends of other Table Edges.\n" +msgstr "" +"Eine Tischlante wird von den Enden anderer Tischkantenlinien angezogen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:520 +msgid "Table Edges can be modified by dragging on their ends.\n" +msgstr "Tischkanten können durch Ziehen an den Enden geändert werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:521 +msgid "" +"If you hold down the Control key while dragging then the Table Edge will be " +"attracted to other objects.\n" +msgstr "" +"Wenn Sie die Strg-Taste während des Ziehens gedrückt halten, wird die " +"Tischkante von anderen Objekten angezogen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:522 +msgid "" +"These examples shows some of the various Turnout Designer windows. Each " +"window defines a different type of turnout.\n" +msgstr "" +"Diese Beispiele zeigen einige der Dialogfenster des Weichendesigner. Jeder " +"Dialog wird für einen anderen Typ von Weichen benutzt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:523 +msgid "" +"In each window there are a number of parameters to fill in and one or two " +"description lines.\n" +msgstr "" +"In jedem Dialog müssen einige Parameter und eine oder zwei Zeilen " +"Beschreibungen eingetragen werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:524 +msgid "You can print the design to check the dimensions before saving them.\n" +msgstr "" +"Sie können den Entwurf vor dem Speichen ausdrucken. Damit können Sie zur " +"Kontrolle die Abmessungen prüfen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:525 +msgid "This is the regular turnout.\n" +msgstr "Dies ist eine normale Weiche.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:526 +msgid "" +"In addition to the dimensions, you also enter the Title (Manufacturer, " +"Description and Part Number). For Turnouts with Left and Right hand " +"versions there are separate Descriptions and Part Numbers.\n" +msgstr "" +"Neben den Abmessungen müssen auch die Beschreibung der Weiche, d.h. " +"Hersteller, Beschreibung und Teilenummer, eingegeben werden. Für Weichen mit " +"rechten und linken Abzweigen werden die Beschreibung und die Teilenummern " +"getrennt erfasst.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:527 +msgid "" +"Some Turnouts and Sectional track are pre-mounted on roadbed. For these " +"parts you can specify the width of the roadbed, the thickness of the lines " +"drawn for the edge of the roadbed and the color.\n" +msgstr "" +"Einige Weichen und Festgleise besitzen ein festes Gleisbett. Für diese Teile " +"können Sie die Breite des Gleisbetts und Dicke und Farbe der " +"Begrenzungslinien festlegen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:528 +msgid "The double slip switch is described by only a few parameters.\n" +msgstr "" +"Für eine doppelte Kreuzungsweiche wird durch wenige Daten festgelegt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:529 +msgid "The double crossover only needs length and track separation.\n" +msgstr "" +"Eine doppelter Gleiswechsel erfordert nur die Gleislänge und den " +"Gleisabstand.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:530 +msgid "" +"Pressing the turnout button displays the Turnout Selection window to let you " +"choose a turnout to place.\n" +msgstr "" +"Durch Drücken des Knopfes wird das Weichenauswahl-Fenster geöffnet. " +"Hier können Sie eine Weiche auswählen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:531 +msgid "" +"Note that once you start to place the turnout on the Main window the Turnout " +"Selection window disappears. This feature is enabled by the Hide toggle " +"button on the dialog.\n" +msgstr "" +"Beachten Sie, dass das Weichenauswahl-Fenster verschwindet sobald Sie mit " +"dem Legen der Weiche beginnen. Diese Eigenschaft wird durch den 'Verbergen' " +"Schalter des Dialogs eingeschaltet.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:532 +msgid "" +"You can place the turnout on a arbitrary position on the layout. Left-drag " +"the turnout into place...\n" +msgstr "" +"Sie können die Weiche an eine beliebigen Position auf dem Gleisplan legen. " +"Ziehen Sie die Weiche an den richtigen Platz...\n" + +#: ../../../../build/work/app/i18n/custmsg.h:533 +msgid "Then you can rotate the turnout by Right dragging.\n" +msgstr "" +"Dann können Sie die Weiche durch Ziehen mit der rechten Maustaste drehen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:534 +msgid "" +"You can also use Shift-Right-Click to display a popup menu that lets you " +"rotate the Turnout by specific angles.\n" +msgstr "" +"Sie können mit Umschalten-Rechts-Klick ein Fenster öffnen, das das Drehen um " +"feste Winkel ermöglicht.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:535 +msgid "" +"When you are satisfied with the position and orientation of the turnout " +"press Space bar or the Return key on the keyboard to finish placing the " +"turnout.\n" +msgstr "" +"Wenn Sie mit der Position und der Ausrichtung der Weiche zufrieden sind, " +"drücken Sie Leertaste oder die Eingabetaste der Tastatur um den Befehl " +"abzuschliessen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:536 +msgid "" +"Pressing the Ok button on the Turnout dialog will end the command " +"as well as placing the turnout.\n" +msgstr "" +"Auch durch Drücken der OK-Taste im Dialogfenster können Sie den Befehl " +"beenden und die Weiche festlegen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:537 +msgid "" +"If you drag along an existing track the new turnout will be attached to the " +"track.\n" +msgstr "" +"Wenn Sie die Weiche auf existierendes Gleis ziehen, so wird sie mit dem " +"Gleis verbunden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:538 +msgid "" +"Note that the status line tells you the number of End-Points that would be " +"connected and, the maximum displacement of the End-Points. This will be " +"useful when building complex track, as we will see later.\n" +msgstr "" +"Beachten Sie, dass in der Statuszeile angezeigt wird. wieviele Endpunkte der " +"Weiche verbunden würden und wie groß der maximale Abstand zu den Endpunkten " +"ist. Wie wir später sehen werden ist diese Information hilfreich, um " +"komplexe Gleiskonfigurationen zu erstellen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:539 +msgid "" +"By moving the cursor from one side to the other of the track centerline you " +"can flip the turnout 180°.\n" +msgstr "" +"Durch Bewegen des Mauszeiger von einer Seite des Gleises auf die andere wird " +"die Weiche um 180° gedreht.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:540 +msgid "" +"If you try to drag across another turnout the new turnout will placed at the " +"nearest End-Point of the existing turnout.\n" +msgstr "" +"Wenn Sie die neue Weiche über eine existierende Weiche ziehen, wird die neue " +"Weiche mit dem nächstgelegenen Endpunkt der vorhandenen Weiche verbunden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:541 +msgid "" +"When you press Space or Return while the turnout is on a track, the track " +"will be split and the new turnout attached automatically.\n" +msgstr "" +"Wenn Sie die Leer- oder die Eingabetaste drücken während die Weiche auf " +"einem Gleis ist, wird dieses Gleis getrennt und die Weiche wird automatisch " +"verbunden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:542 +msgid "Pressing Close ends the command.\n" +msgstr "Durch Drücken von wird der Befehl beendet.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:543 +msgid "Sometimes it's useful to modify turnouts triming one of the ends.\n" +msgstr "" +"Manchmal ist es sinnvoll, eine Weich durch Kürzen der Enden anzupassen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:544 +msgid "We use the command for this.\n" +msgstr "Dafür benutzen wir den Befehl .\n" + +#: ../../../../build/work/app/i18n/custmsg.h:545 +msgid "Normally, if we try to Split a turnout we get an error message.\n" +msgstr "" +"Normalerweise bekommen wir eine Fehlermeldung, wenn wir versuchen eine " +"Weiche zu trennen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:546 +msgid "Hold down the Shift key and try again.\n" +msgstr "" +"Drücken und halten Sie die Umschalten-Taste und versuchen es nochmals.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:547 +msgid "" +"The end of the turnout has been replaced by a piece of straight flex track " +"which we can modify.\n" +msgstr "" +"Das Ende der Weiche wurde durch ein Stück gereden Gleises ersetzt. Dieses " +"können wir verändern.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:548 +msgid "We can try splitting the diverging leg.\n" +msgstr "Wir können versuchen, das abzweigende Gleis zu trennen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:549 +msgid "" +"Notice that the tail of the diverging leg has been changed to a curved " +"track...\n" +msgstr "" +"Beachten Sie, dass das abzweigende Gleis in ein gebogenes Gleis umgewandelt " +"wurde...\n" + +#: ../../../../build/work/app/i18n/custmsg.h:550 +msgid "and a straight track.\n" +msgstr "und ein gerades Gleis.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:551 +msgid "" +"This example show how to layout a yard using the and " +"commands.\n" +msgstr "" +"Dieses Beispiel zeigt wie mit den Befehlen und " +"eine Gleisharfe erstellt werden kann.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:552 +msgid "" +"You can resize and move the Turnout Selection dialog if it obscures the " +"other windows.\n" +msgstr "" +"Sie können den Weichenauswahl-Dialog verkleinern und verschieben, wenn er " +"andere Fensterbereiche verdeckt.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:553 +msgid "First we place a turnout on the main line.\n" +msgstr "Zuerst legen wir eine Weiche auf das Hauptgleis.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:554 +msgid "Next extend the turnout with the command.\n" +msgstr "Dann erweitern wir die Weiche mit dem Befehl .\n" + +#: ../../../../build/work/app/i18n/custmsg.h:555 +msgid "" +"Now create a track parallel to the main line. Make sure the separation is " +"reasonable for your scale.\n" +msgstr "" +"Jetzt erstellen Sie ein Gleis, das parallel zum Hauptgleis liegt. Stellen " +"Sie sicher, dass der Gleisabstand für Ihren Maßstab geeignet ist.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:556 +msgid "And place a turnout to connect the new track.\n" +msgstr "Und legen eine Weiche, um das neue Gleis anzuschliessen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:557 +msgid "We'll zoom in here to see what's going on.\n" +msgstr "Durch Vergrößern können wir sehen, was passiert.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:558 +msgid "" +"Notice how we control which way the turnout is facing by moving the mouse " +"across the center line of the track.\n" +msgstr "" +"Beachten Sie wie wir die Ausrichtung der Weiche beeinflussen indem wir die " +"Maus über die Mittellinie des Gleise bewegen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:559 +msgid "" +"The Status bar displays the number of auto-connections that will be made and " +"the maximum offset.\n" +msgstr "" +"In der Statuszeile wird angezeigt, wieviele Endpunkte verbunden werden und " +"wie große der maximale Abstand ist.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:560 +msgid "" +"XTrackCAD adjusts the turnout position for the best fit to minimize any " +"connection offset\n" +msgstr "" +"XTrackCAD verändert die Weichenposition um die beste Einpassung zu " +"erreichen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:561 +msgid "Note that placing the turnout splits the parallel track.\n" +msgstr "" +"Beachten Sie, dass durch die Weiche das parallele Gleis getrennt wurde.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:562 +msgid "We have to delete the leftover piece by Selecting and Deleting it.\n" +msgstr "Dieses Reststück müssen wir auswählen und löschen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:563 +msgid "Repeat the process for the other tracks in the yard.\n" +msgstr "Wiederholen Sie diesen Ablauf für die anderen Gleise der Gleisharfe.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:564 +msgid "For the last track we will join with a curve instead of a turnout.\n" +msgstr "" +"Beim letzten Gleis benutzen wir einen Gleisbogen anstelle einer Weiche.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:565 +msgid "We can indicate the mainline by making the rails wider.\n" +msgstr "" +"WIr können die Hauptstrecke hervorheben, in dem wir die Gleise dicker " +"zeichnen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:566 +msgid "First we select the mainline tracks...\n" +msgstr "Zuerst wählen wir die Gleise der Hauptstrecke aus...\n" + +#: ../../../../build/work/app/i18n/custmsg.h:567 +msgid "And then select Medium Tracks from the Edit menu.\n" +msgstr "und wählen dann Mittlere Stärke aus dem Bearbeiten Menu aus.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:568 +msgid "We can make the rail thicker by selecting Thick Tracks.\n" +msgstr "" +"Wir können das Gleis durch die Auswahl Breite Linie dicker darstellen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:569 +msgid "" +"Turntables are created by specifying the radius in a dialog box on the " +"Status Bar. The radius in the dialog can be changed before proceeding.\n" +msgstr "" +"Beim Erstellen von Drehscheiben muss der Radius in einem Dialog in der " +"Statuszeile eingegeben werden. Der Radius muss vor den nächsten Schritten " +"geändert werden.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:570 +msgid "Then the turntable is dragged to its final location.\n" +msgstr "Dann wird die Drehscheibe an die endgültige Position geschoben.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:571 +msgid "" +"XTrackCAD provides demonstrations on most of the program's features. The " +"demos can be run by clicking on the Help menu on the Main window and then " +"selecting Demos." +msgstr "" +"XTrackCAD verfügt über Demos der meisten Funktionen. Diese Demos können " +"abgespielt werden indem im Hilfe Menü des Hauptfensters der Punkt \"Demos\" " +"ausgewählt wird." + +#: ../../../../build/work/app/i18n/custmsg.h:572 +msgid "" +"The notation \"Menu|Item\" is used in the documentation (and the on-line " +"demos and tips) to indicate the selection of a menu item.\n" +"For example File|Open means to open the menu by clicking on File on the menu " +"bar of the Main window and then selecting the Open item from that menu." +msgstr "" +"Die Darstellunsgart \"Menü|Unterpunkt\" wird in der Dokumentation den Online " +"Demos und im Tipp des Tages verwendet, sie dient dazu die Selektion eines " +"Unterpunktes zu beschreiben.\n" +"\"Datei|Öffnen\" bedeutet zum Beispiel in der Menüleiste des Hauptfensters " +"auf Datei zu klicken und dann im aufgehenden Untermenü auf die Auswahl Punkt " +"Öffnen." + +#: ../../../../build/work/app/i18n/custmsg.h:573 +msgid "" +"A number of example layouts are provided. These files are located in the " +"'examples' directory where you installed XTrackCAD. The \"File|Open\" " +"command will open that directory when first used." +msgstr "" +"Einige Beispiel Gleisplänen stehen zu Ihrer Verfügung, diese wurden im " +"Unterverzeichnis 'examples' im Haupverzeichnis von XTrackCAD installiert. " +"Ãœber den Dialog \"Datei|Öffnen\" können diese geladen werden." + +#: ../../../../build/work/app/i18n/custmsg.h:574 +msgid "" +"When installed, the program measures all units in inches. You can change " +"this on the \"Options|Preferences\" dialog by changing the Units item to " +"Metric instead of English." +msgstr "" +"Nach Installation werden sämtliche Einheiten in Inches dargestellt. Diese " +"Einstellung können Sie über den Dialog \"Optionen|Einstellungen\" ändern, " +"indem Sie von Englisch auf Metrisch wechseln." + +#: ../../../../build/work/app/i18n/custmsg.h:575 +msgid "" +"You can change the overall size of your layout on the \"Options|Layout\" " +"dialog." +msgstr "" +"Die Gesamtgröße Ihres Gleisplans kann über den Dialog \"Optionen|Gleisplan\" " +"eingestellt werden." + +#: ../../../../build/work/app/i18n/custmsg.h:576 +msgid "" +"When installed, the default command is the Describe command. More " +"experienced users will probably want to change this to the Select command. " +"You can do this on the \"Options|Command Options\" dialog." +msgstr "" +"Nach Installation ist der Standardbefehl das \"Eigenschaften\" Kommando. " +"Erfahrene Benutzer möchten dies vielleicht in das \"Auswählen\" Kommando " +"ändern. Dies kann über den Dialog \"Optionen|Befehl\" unter Standardbefehl " +"erfolgen." + +#: ../../../../build/work/app/i18n/custmsg.h:577 +msgid "" +"Set your modeling scale on the \"Options|Layout\" dialog. This controls the " +"Turnouts and Structures that are available, Easement values and track gauge." +msgstr "" +"Stellen Sie im \"Optionen|Gleisplan\" Dialog Maßstab und Spurweite für Ihren " +"Gleisplan ein. Diese Grundeinstellung sollte unbedingt als erstes " +"vorgenommen werden, damit der neu eingestellte Maßstab mit dem Maßstab der " +"geladenen Parameterdatei übereinstimmt." + +#: ../../../../build/work/app/i18n/custmsg.h:578 +msgid "" +"When Selecting tracks, the connection between Selected and Unselected tracks " +"is marked by a Red X. This indicates points where the connection between " +"tracks will be broken if you Move or Rotate the Selected tracks." +msgstr "" +"Bei ausgewählten Gleisen wird die Verbindung des Gleises durch ein rotes X " +"markiert, genau an dieser Stelle wird das Gleis getrennt wenn es verschoben " +"oder gedreht wird." + +#: ../../../../build/work/app/i18n/custmsg.h:579 +msgid "" +"You can change orientation of the pages on the Print command by moving or " +"rotating the Print Grid.\n" +"Shift-Left-Drag moves the grid and Shift-Right-Drag rotates the grid." +msgstr "" +"Die Ausrichtung von auszudruckenden Seiten kann geändert werden indem das " +"Druckraster bewegt oder rotiert wird.\n" +"Shift Taste nach links ziehen bewegt das Raster, Shift Taste nach rechts " +"ziehen rotiert das Raster." + +#: ../../../../build/work/app/i18n/custmsg.h:580 +msgid "" +"You can add track to any unconnected End-Point with the Modify command.\n" +"Hold down the Shift key and click on the End-Point and drag away to create a " +"new track segment attached to the End-Point.\n" +"Repeat with the new End-Point to create flowing tracks." +msgstr "" +"Gleise können zu jedem unverbundenen Endpunkt mit \"Verändern\" hinzugefügt " +"werden.\n" +"Um einen neuen Gleisabschnitt zu erstellen, markieren Sie einen Endpunkt, " +"halten Sie dann die Shift-Taste gedrückt während Sie den Gleisabschnitt " +"verschieben.\n" +"Wiederhohlen Sie diese Aktion mit diesem neuen Endpunkt um Gleisabschnitte " +"weiter zu zerlegen." + +#: ../../../../build/work/app/i18n/custmsg.h:581 +msgid "" +"You can create Curved tracks in four ways by dragging from:\n" +" the 1st End-Point in the direction of the curve\n" +" Center of the Curve to the 1st End-Point\n" +" End-Point to the Center\n" +" the 1st to 2nd End-Point\n" +"Then drag on one of the Red arrows to create the final shape of the curve.\n" +"\n" +"You can click on the small button to the left of the Curve command button to " +"change the method." +msgstr "" +"Gebogene Gleise können auf vier verschiedene Weisen erstellt werden:\n" +" vom ersten Endpunkt in Richtung der Kurve\n" +" vom Mittelpunkt des Gleisbogens zum ersten Endpunkt\n" +" vom Endpunkt zum Mittelpunkt hin\n" +" vom ersten zum zweiten Endpunkt\n" +"Ziehen Sie dann an einem der beiden roten Pfeile, um die endgültige Kurve " +"festzulegen.\n" +"Die verschiedenen Methoden zur Gleisbogenerstellung können durch Anklicken " +"des Knopfes rechts neben dem Kurvenknopf in der Werkzeugleiste ausgewählt " +"werden ." + +#: ../../../../build/work/app/i18n/custmsg.h:582 +msgid "" +"When creating a straight or a curved track by dragging from the 1st End " +"Point, you can snap the new track to an existing open end point by holding " +"down Shift while you click.\n" +"The new track will be joined to the old when you create it." +msgstr "" +"Beim Erstellen eines geraden oder eines gebogenen Gleise durch Ziehen vom " +"ersten Endpunkt kann das neue Gleis an dem existierenden Endpunkt " +"ausgerichtet werden, in dem die Umschalt-Taste beim Klicken gedrückt wird.\n" +"Das neue Gleis wird beim Erstellen mit dem vorhandenen Gleis verbunden." + +#: ../../../../build/work/app/i18n/custmsg.h:583 +msgid "" +"Track Circles provide a quick way to see what arrangement of tracks will fit " +"in your layout spaces. Create Circles with your typical radius and place " +"them in corners and other locations where your main-line will make changes " +"of direction. This will give you an overall idea of how your layout will " +"look.\n" +"\n" +"You can create Circles by:\n" +" using a fixed radius\n" +" dragging from the Center to edge\n" +" dragging from an edge to the Center\n" +"You can click on the small button to the left of the Circle command button " +"to change the method." +msgstr "" +"Gleiskreise ermöglichen einen schnellen Weg die Aufteilung Ihres Gleisplans " +"in den vorhanden Platz einzuteilen. Erstellen Sie Gleiskreise mit üblichen " +"Radien und platzieren Sie diese in Ecken oder an beliebigen Stellen Ihres " +"Hauptgleises an denen ein Richtungswechsel statt finden soll. Dies wird " +"Ihnen helfen einen ersten Ãœberblick von Ihrem gesamten Gleisplan zu " +"erhalten.\n" +"\n" +"Gleiskreise können wie folgt erzeugt werden:\n" +" mit einem festgelegten Radius\n" +" durch ziehen aus der Mitte zur Kante\n" +" durch ziehen von der Kante zur Mitte\n" +"Die verschiedenen Methoden zur Gleiskreiserstellung können ausgewählt werden " +"durch anklicken des Knopfes rechts neben dem Greisknopf in der " +"Werkzeugleiste." + +#: ../../../../build/work/app/i18n/custmsg.h:584 +msgid "" +"Easements (spiral transition curves) are used when track changes from " +"straight to curved by gradually changing the radius. This improves " +"operation and appearance.\n" +"Easements are created with Joining or Extending Tracks.\n" +"The Easement dialog is used to control easements." +msgstr "" +"Ãœbergangsbögen werden benutzt wenn gerades Gleis stufenweise bei sich " +"änderndem Radius in kurviges Gleis ändert, Dies verbessert die Benutzbarkeit " +"und verschönert das Erscheinungsbild.\n" +"Ãœbergangsbögen werden erstellt indem sie an vorhandene Gleise angeängt " +"werden.\n" +"Die Schaltfläche \"Easement None\" wird verwendet um die Einstellungen für " +"Ãœbergangsbögen vornehmen zu können." + +#: ../../../../build/work/app/i18n/custmsg.h:585 +msgid "" +"\"Help|Recent Messages\" shows the last error and warning messages that were " +"generated by the program. Also an explanation of each message is displayed." +msgstr "" +"\"Hilfe|Letzte Mitteilungen\" zeigt die letzen Fehler/Warnungen an die vom " +"Programm veruhrsacht wurden. Weiterhin wird eine Erklärung zu jeder Meldung " +"angezeigt." + +#: ../../../../build/work/app/i18n/custmsg.h:586 +msgid "" +"When creating stall tracks for a turntable, you usually want the the stall " +"tracks to be spaced evenly.\n" +"The \"Turntable Angle\" item on \"Options|Command Options\" dialog can be " +"used specify the minimum angle between stall tracks." +msgstr "" +"Beim Anschluss von Endgleisen an eine Drehscheibe, möchte man diese " +"üblicherweise gleichmäßig anschließen.\n" +"Der Punkt \"Drehscheibenwinkel\" im Dialog \"Optionen|Einstellungen\" kann " +"dazu benutzt werden den kleinst möglichen Winkel, beim Anschluss solcher " +"Gleise einzustellen." + +#: ../../../../build/work/app/i18n/custmsg.h:587 +msgid "" +"XTrackCAD periodically saves the current layout in a check point file. The " +"'Check Point' item on the 'Options|Preferences' dialog controls how often " +"the file is saved.\n" +"You can recover your working file after a system crash by copying the " +"checkpoint file (xtrkcad.ckp in the XTrackCAD Working directory) to file.xtc" +msgstr "" +"XTrackCAD sichert ständig ihre aktuelle Arbeit in eine temporäre Datei. Im " +"Feld 'Sicherungskopie' unter dem Menüpunkt 'Optonen|Einstellungen' können " +"Sie die Häufigkeit dieser automatischen Sicherung festlegen.\n" +"Nach einem System/Programm Absturz kopieren Sie einfach die Datei xtrkcad." +"ckp (im Arbeitsverzeichnis von XTrackCAD) nach .xtc" + +#: ../../../../build/work/app/i18n/custmsg.h:588 +msgid "" +"The Parallel command is helpful to layout yards and sidings. If the " +"Parallel track abuts with an existing track, it is automatically connected." +msgstr "" +"Das Parallel Kommando ist nützlich um Bahnhöfe und Abstellgeise zu " +"erstellen. Falls sich ein parallel Gleis mit einem existierenden Gleis fast " +"berührt wird dieses automatisch verbunden." + +#: ../../../../build/work/app/i18n/custmsg.h:589 +msgid "" +"You can use Shift-Drag in Select command to move and rotate selected " +"tracks.\n" +"Shift-Left-Drag moves tracks and Shift-Right-Drag rotates them.\n" +"Control-Left-Drag can move labels." +msgstr "" +"Gleise können verschoben oder rotiert werden indem sie mit Hilfe des " +"\"Ändern|Auswählen\" Kommandos ausgewählt werden und dann druch " +"gleichzeitiges festhalten der Shift-Taste und einer Maustaste bewegt " +"werden.\n" +"Shift und linke Maustaste verschiebt ein Gleis.\n" +"Shift und rechte Maustaste rotiert ein Gleis.\n" +"Steuerung und linke Maustaste verschiebt Beschreibungen." + +#: ../../../../build/work/app/i18n/custmsg.h:590 +msgid "" +"You can move and rotate the Snap Grid to align with existing track or " +"benchwork." +msgstr "" +"Das Fangraster kann bewegt oder gedreht werden um es an Gleisen oder " +"Aufbauten ausrichten zu können." + +#: ../../../../build/work/app/i18n/custmsg.h:591 +msgid "" +"Use the Parts List command to measure track length.\n" +"Select the tracks you want to measure and then click on the Parts List " +"button. The report will list the total of length of the selected flex-" +"track. You will have to add in the length of any Turnouts." +msgstr "" +"Der Dialog \"Verwalten|Teileliste\" kann dazu benutzt werden Gleislängen zu " +"messen.\n" +"Markieren Sie die zu messenden Gleise und wählen Sie den Teileliste Punkt. " +"Die auftauchende Liste zeigt die Länge der ausgewählten Gleise an. Die Länge " +"der Weichen muss hinzugezählt werden.\n" +"Hinweis: Dies funktioniert nur für Flex-Gleise!" + +#: ../../../../build/work/app/i18n/custmsg.h:592 +msgid "" +"The length of flex-track attached to each Turnout is displayed on layout " +"near the end-points of the Turnouts.\n" +"Make sure 'Lengths' option of the 'Label Enable' toggle button on the " +"Display dialog is selected." +msgstr "" +"Die Länge von Flex-Gleis welches mit Weichen verbunden ist wird in der Nähe " +"des Endpunktes der Weiche angezeigt.\n" +"Stellen Sie sicher das der Auswahlpunkt \"Längen\" im Dialog \"Optionen|" +"Anzeige\" ausgewählt ist." + +#: ../../../../build/work/app/i18n/custmsg.h:593 +msgid "" +"The Profile command can be used to find the length of a continous section of " +"track.\n" +"Select the track at the beginning and end of the section. The total length " +"of track will be displayed on the Profile window in the lower right corner.\n" +"Note: the Profile selects the shortest path between the two selected tracks, " +"which might not be the path you are interested in. In this case, select the " +"first track and then select other tracks along the path." +msgstr "" +"Das Kommando \"Höhenprofil\" im Menü \"Ändern\" kann dazu benutzt werden um " +"die Länge einer zusammenhängenden Gleissektion heraus zu finden.\n" +"Markieren Sie den Anfang und das Ende dieser Sektion. Die totale Länge " +"dieser Gleissektion wird in der unteren rechten Ecke des Höhenprofil " +"Fensters angezeigt.\n" +"Hinweis: Das Höhenprofil wählt immer den kürzesten Weg zwischen beiden " +"markierten Gleisen, möglicherweise ist dies aber nicht die Länge an der Sie " +"interresiert sind. In diesem Fall wählen Sie einfach den gleichen Startpunkt " +"und den nächst frührer möglichen Endpunkt aus." + +#: ../../../../build/work/app/i18n/custmsg.h:594 +msgid "" +"Layers can be used to contain different groups of tracks or other features. " +"You might use one layer for the main-line, another of staging tracks and " +"another of benchwork.\n" +"You can give each layer a name (by using the Layer dialog). This name will " +"be displayed as the Balloon Help for the corresponding Layer button, if you " +"have Balloon Help enabled on the Display dialog." +msgstr "" +"Ebenen können dazu benutzt werden um verschiedene Stockwerke oder Funktionen " +"darstellen zu können. Eine Ebene kann z.B. für das Hauptgleis verwendet " +"werden, eine weitere für Schattenbahnhöfe und eine weitere für Aufbauten und " +"oder Tunnnel.\n" +"Jeder Ebene kann ein Name über den \"Verwalten|Ebenen\" Dialog zugewiesen " +"werden. Falls die Auswahl \"Sprechblasen\" im Menü \"Optionen|Einstellungen" +"\" aktiviert wurde, wird dieser vergebene Name in der Werkzeugleiste für " +"diese Ebene angezeigt." + +#: ../../../../build/work/app/i18n/custmsg.h:595 +msgid "" +"You can remove groups of buttons or the Hot Bar from the Main window to give " +"you more room if you are not using some features. Also, the number of Layer " +"buttons displayed is controlled by the Layers dialog." +msgstr "" +"Die Werkzeugleiste kann über den Dialog \"Anzeige|Werkzeugleiste anpassen\" " +"verändert werden um mehr Platz im Hauptfenster zur Verfügung zu stellen. Die " +"Anzahl der Ebenenknöpfe wird über den Dialog \"Verwalten|Ebenen\" " +"eingestellt." + +#: ../../../../build/work/app/i18n/custmsg.h:596 +msgid "" +"The size of the Map window is controlled by the overall size of the room " +"(specified on the Layout dialog) and the Map Scale (on the Display dialog). " +"You can make the Map window larger (or smaller) by decreasing (or " +"increasing) the Map Scale.\n" +"XTrackCAD will prevent you from making the Map window too small or too large." +msgstr "" +"Die Größe des Kartenfensters wird in Abhängigkeit zur eingestellten " +"Gesamtgröße des Raums kontrolliert. Die Gesamtgröße des Raums wird über den " +"Dialog \"Optionen|Gleisplan\", der Maßstab des Kartenfensters über die " +"Auswahl \"Kartenmaßstab\" im Dialog \"Optionen|Anzeige\" eingestellt. Die " +"Größe des Kartenfensters kann verändert werden, indem der Wert für " +"Kartenmaßstab entweder erhöht oder verkleinert wird.\n" +"XTrackCAD lässt keine zu kleinen/großen Werte für das Kartenfenster zu." + +#: ../../../../build/work/app/i18n/custmsg.h:597 +msgid "" +"You can unload parameter files you are not using by the Parameter Files " +"dialog. This removes unused Turnout and Structure definitions from the Hot " +"Bar and makes the program start faster." +msgstr "" +"Damit Gleise in der Schnellauswahl auftauchen ist es nötig eine Gleis " +"Parameterdatei für Ihren Gleisplan zu laden, im Dialog \"Datei|" +"Parameterdateien\" können Sie die für Ihr Gleis nötige Parameterdatei laden. " +"Nicht mehr benötigte Parameterdateien können über den gleichen Dialog " +"entladen werden. Hierdurch werden nicht mehr benötigte Weichen/Gleise von " +"der Schnellauswahl gelöscht was das Programm schneller starten läßt." + +#: ../../../../build/work/app/i18n/custmsg.h:598 +msgid "" +"Right-Click on the Main window displays a menu list of commands as an " +"alternative to pressing the buttons on the tool bar or using the menu " +"accelerator keys." +msgstr "" +"alternativ zur Werkzeugleiste oder den Menütasten kann durch rechts Klick im " +"Hauptfenster ein weiteres Kommando Menü benutzt werden." + +#: ../../../../build/work/app/i18n/custmsg.h:599 +msgid "" +"Holding down the Shift key while you Right-Click will display options for " +"the current command (if any)." +msgstr "" +"Bleibt die Shift Taste gedrückt während Sie ein Kommando ausgewählt haben " +"werden (wenn vorhanden) Optionen für dieses Kommando angezeigt." + +#: ../../../../build/work/app/i18n/custmsg.h:600 +msgid "" +"Right-Click on the Hot Bar displays a menu of the different groups of " +"objects which you can use to jump to the group you are interested in.\n" +"Pressing a numeric key (1-9 and 0) moves the Hot Bar to corresponding " +"position (1 is the start, 5 is half way, 0 is the end)." +msgstr "" +"Rechts Klick in der Schnellauswahl öffnet ein Menü mit verschiedenen " +"Objektgruppen, diese können benutzt werden um schnell zu dieser Art von " +"Gleisen zu springen.\n" +"Durch drücken von Zahlen in der Schnellauswahl (1-9 und 0) kann auch die " +"entsprechende Position der Gleisauswahl geändert werden, hierbei " +"kennzeichnet 1 die erste Gleisauswahl, 5 gibt die Mitte der Auswahl an und 0 " +"das Ende." + +#: ../../../../build/work/app/i18n/custmsg.h:601 +msgid "" +"Right-Drag on the Map window sets the origin and scale of the Main window.\n" +"The Main window will be centered on the spot where you started the Draw and " +"how far you Drag will control how large an area you can see on the Main " +"window." +msgstr "" +"Durch ziehen mit der rechten Maustaste im Kartenfenster wird der Focus und " +"Maßstab im Hauptfenster eingestellt.\n" +"Das Hauptfenster wird hierbei aufgrund der markierten Auswahl im " +"Kartenfenster zentriert dargestellt." + +#: ../../../../build/work/app/i18n/custmsg.h:602 +msgid "" +"To refresh the Main window, press Control-L (hold down the 'Ctrl' key and " +"then press the 'l' key)." +msgstr "" +"Um die Darstellung im Hauptfenster zu erneuern, benutzen Sie Strg+L (halten " +"Die die Steuernung Taste gedrückt und tippen Sie den Buchstaben 'l')." + +#: ../../../../build/work/app/i18n/custmsg.h:603 +msgid "" +"The File menu contains a list of the last 5 layouts you were working on." +msgstr "" +"Der Dialog \"Datei\" enthält eine Liste der letzten 5 Gleispläne die Sie " +"geöffnet hatten." + +#: ../../../../build/work/app/i18n/custmsg.h:604 +msgid "" +"The Print command can optionally print lines representing the roadbed for " +"all tracks. This is useful when printing full size (1:1) for cutting " +"roadbed." +msgstr "" +"Im \"Drucken\" Dialog kann, die Auswahl \"Gleisbettung drucken\" ausgewählt " +"werden, um im (1:1) Maßstab Gleisbettvorlagen ausdrucken zu können." + +#: ../../../../build/work/app/i18n/custmsg.h:605 +msgid "" +"Pressing the 'Esc' key cancels the current command and invokes the default " +"command, (which is either Describe or Select)." +msgstr "" +"Durch drücken der 'ESC' Taste wird der momentane Befehl abgebrochen und " +"automatisch der Standardbefehl aktiviert, (was entweder Eigenschaften oder " +"Auswählen ist)." + +#: ../../../../build/work/app/i18n/custmsg.h:606 +msgid "" +"When moving or rotating tracks on slow machines or with a large number of " +"tracks, you can improve performance by changing the way tracks are drawn " +"while being moved.\n" +"Shift-Right click will display a menu containing options to draw tracks " +"normally, as simple lines or just draw end-points." +msgstr "" +"Auf langsamen Computern oder bei hoher Anzahl von Gleisen, kann die Art und " +"Weise wie Gleise neu gezeichnet werden verändert werden.\n" +"Nachdem Gleise markiert wurden, kann durch festhalten der Shift-Taste und " +"einem rechts Klick mit der Maus in einem Options Menü ausgewählt werden wie " +"die Gleise dargestellt werden sollen: Normal, Einfach oder nur als Endpunkte." + +#: ../../../../build/work/app/i18n/custmsg.h:607 +msgid "" +"The colors of different parts of the Main window can be changed with the " +"Colors dialog. In particular, the Snap Grid color can be changed to make it " +"more visible when printed." +msgstr "" +"Farben der verschiedenen Baugruppen im Hauptfenster können über den Dialog " +"\"Optionen|Farben\" verändert werden. Im Besonderen kann die Farbe des " +"Fangrasters geändert werden um es beim ausdrucken besser sichtbar machen zu " +"können." + +#: ../../../../build/work/app/i18n/custmsg.h:608 +msgid "" +"By default objects are drawn in their normal colors. Tracks will be drawn " +"in Black. Objects can also be drawn in the color according to their Layer. " +"The color of a Layer is displayed on the corresponding Layer button.\n" +"The Display dialog 'Color Layers' item has separate toggles for Tracks and " +"non-Tracks." +msgstr "" +"Ãœblicherweise werden Objekte in Ihren voreingestellten Farben gezeichnet. " +"Gleise werden in schwarz dargestellt. Objekte können in den Farben ihrer " +"jeweiligen Ebenen dargestellt werden. Die Farbe einer Ebene wird auf ihrem " +"zugehörigen Ebenenknopf angezeigt.\n" +"Die Auswahl \"Ebenenfarben\" im Dialog \"Optionen|Anzeige\" besitzt jeweils " +"für Gleise und Sonstige eine getrente Möglichkeit zur Aktivierung von Farben." + +#: ../../../../build/work/app/i18n/custmsg.h:609 +msgid "" +"Each Layer can be drawn or hidden by the 'Visible' toggle on the Layers " +"dialog. " +msgstr "" +"Jede Ebene kann im Dialog \"Verwalten|Ebenen\" verborgen oder angezeigt " +"werden." + +#: ../../../../build/work/app/i18n/custmsg.h:610 +msgid "" +"Short cut Layer buttons can also be displayed on the tool bar for up to the " +"first 20 layers.\n" +"This buttons allow to Show or Hide the layers." +msgstr "" +"Ebenenknöpfe können für die ersten 20 Ebenen in der Werkzeugleiste " +"dargestellt werden, diese Nummernknöpfe können dazu benutzt werden um Ebenen " +"zu verbergen oder anzuzeigen." + +#: ../../../../build/work/app/i18n/custmsg.h:611 +msgid "The name of the Layer is the Balloon Help for the Layer button." +msgstr "" +"Der Name einer Ebene wird in der Sprechblase der jeweiligen Ebene angezeigt." + +#: ../../../../build/work/app/i18n/custmsg.h:612 +msgid "" +"The playback speed of the Demos can be changed by using Speed drop down list " +"on the Demo window." +msgstr "" +"Die Wiedergabegeschwindigkeit von Demos kann durch den Auswahlreiter rechts " +"oben im Demo Fenster eingestellt werden." + +#: ../../../../build/work/app/i18n/custmsg.h:613 +msgid "" +"Many of the commands and dialogs can be invoked by special key combinations " +"called Menu-Accelerators. These are listed on the Menus next to the command " +"name. For example, Control-P will invoke the Print command." +msgstr "" +"Viele Kommandos oder Menü Dialoge können über Tastaturkürzel aufgerufen " +"werden. Diese Kürzel werden rechts (wenn verfügbar) neben jedem Kommando " +"angezeigt. Zum Beispiel: Strg+P im Menü \"Datei|Drucke\" ruft den Drucken " +"Dialog auf." + +#: ../../../../build/work/app/i18n/custmsg.h:614 +msgid "" +"The Connect command is used to join Sectional track pieces that don't quite " +"fit together.\n" +"This command works by adding small gaps between other tracks to move the " +"selected End-Points closer together." +msgstr "" +"Das \"Gleisstücke verbinden\" Kommando im Dialog \"Ändern\" wird verwendet " +"um Gleisstücke die nicht verbunden sind miteinander zu verbinden. Dies wird " +"erreicht indem kleine Lücken bei andern Gleisen eingefügt werden damit die " +"beiden Endpunkte miteinander verbunden werden können." + +#: ../../../../build/work/app/i18n/custmsg.h:615 +msgid "" +"To copy a group of objects: Select the objects, press Control-C (or select " +"Copy from the Edit menu), press Control-V (or select Paste from the Edit " +"menu).\n" +"The selected tracks will be copied to the layout and you can Move or Rotate " +"them into position." +msgstr "" +"Um eine Gruppe von Objekten zu kopieren: Selektieren Sie diese, drücken Sie " +"Strg+C (oder wählen Sie \"Kopieren\" im Menü \"Bearbeiten\" aus), drücken " +"Sie Strg+V (oder wählen Sie \"Einfügen\" im Menü \"Bearbeiten\" aus).\n" +"Die kopierten Objekte werden in den Gleisplan eingefügt und können dann " +"verschoben oder rotiert werden und somit in Position gebracht werden." + +#: ../../../../build/work/app/i18n/custmsg.h:616 +msgid "" +"In the Rotate (or Select) commands you can press Shift-Right-Click to " +"display the Rotate menu which allows you to rotate the selected objects by a " +"specific angle." +msgstr "" +"Bei Benutzung der Kommandos \"Rotieren\" oder \"Auswählen\" kann durch " +"gedrückt halten der Shift-Taste und rechts Klick mit der Maustaste in einem " +"auftauchenden Optionsmenü der Winkel zum rotieren eines Objekts ausgewählt " +"werden." + +#: ../../../../build/work/app/i18n/custmsg.h:617 +msgid "" +"You can use the Move-To-Join option of the Join command (hold down the Shift " +"key) to move a group of Selected tracks to attach with some unselected End-" +"Point." +msgstr "" +"Das \"Verbinden\" Kommando im Menü \"Ändern\" besitzt eine Option um eine " +"Gruppe von ausgewählten Gleisen mit einem nicht vorher spezifizierten " +"Endpunkt verbinden zu können. Markieren Sie zunächst die zu verbindenen " +"Gleise, wählen Sie als nächstes den Dialog \"Ändern|Verbinden\", halten Sie " +"nun die Shift-Taste gedrückt während Sie bei gedrückter linker Maustaste die " +"markierte Gruppe von Gleisen zum Zielpunkt führen, durch nochmaliges drücken " +"der linken Maustaste werden die selektierten Gleise dem Endpunkt hinzugefügt." + +#: ../../../../build/work/app/i18n/custmsg.h:618 +msgid "" +"The Price List dialog (on the File Menu) is used to specify the prices of " +"each type of Turnout, Sectional Track and Structure. Also, the length and " +"price of flex-track pieces can be specified for each scale.\n" +"This values will be used on the Parts List report to generate total cost of " +"the selected objects." +msgstr "" +"Der Dialog \"Verwalten|Preisliste\" kann verwendet werden, um Preise für " +"jedes Gleis, Weiche oder andere Gegenstände einzugeben. Weiterhin können " +"auch Länge und Preis für Flex-Gleise für jeden beliebigen Maßstab eingegeben " +"werden.\n" +"Die angegebenen Preise werden verwendet um die Gesamtkosten im Dialog " +"\"Verwalten|Teileliste\" auflisten zu können." + +#: ../../../../build/work/app/i18n/custmsg.h:619 +msgid "" +"Areas of water can represented by a Polygon (use the Draw command) of the " +"appropiate color.\n" +"By using the Modify command, you can move, add or remove corners of the " +"Polygon to fit the shape of the water.\n" +"You use the Below command to place the Polygon below (or behind) other " +"objects.\n" +"\n" +"You can also use a Polygon to represent aisles. " +msgstr "" +"Wasserbereiche können durch Polygone mit Hilfe des \"Zeichnen|Formen|Zeichne " +"Polyline\" in der entspechenden Farbe erstellt werden.\n" +"Das \"Verändern\" Kommando kann benutzt werden um Ecken an diesen Polygonen " +"hinzu zu fügen oder zu löschen um diese besser der Form des Wassers anpassen " +"zu können.\n" +"\n" +"Polylinien können auch dazu verwendet werden um Flussläufe darzustellen." + +#: ../../../../build/work/app/i18n/custmsg.h:620 +msgid "" +"When you create Benchwork you can move it below other objects by Selecting " +"the Benchwork and use the Below command.\n" +"Also, put Benchwork in a separate Layer so you can hide it if desired." +msgstr "" +"erstellte Aufbauten können unter andere Objekte verschoben werden, indem man " +"das \"Darunter\" Kommando aus dem Menü \"Bearbeiten\" verwendet.\n" +"Weiterhin sollten Sie Aufbauten auf speraten Ebenen darstellen, sie können " +"somit sehr leicht im Bedarfsfall versteckt werden, indem man die zugehöhrige " +"Ebene einfach ein oder ausblendet." + +#: ../../../../build/work/app/i18n/custmsg.h:621 +msgid "" +"You can enter Distances and Lengths using any format regardless of the " +"Length Format on the Preferences dialog." +msgstr "" +"Längen können unabhänig der voreingestellten Werte im \"Optionen|" +"Einstellungen\" Dialog eingegeben werden." + +#: ../../../../build/work/app/i18n/custmsg.h:622 +msgid "" +"You can enter Metric values when English is the default Units and vice versa." +msgstr "" +"Metrische Werte können eingegeben werden auch wenn die Einstellung für " +"Einheiten Englisch gewählt ist." + +#: ../../../../build/work/app/i18n/custmsg.h:623 +msgid "" +"When entering Distances and Lengths you can press the '=' key to redisplay " +"the value in the default format." +msgstr "" +"Bei Eingabe von Entfernungen und Längen können Sie '=' Zeichen verwenden um " +"den Wert im voreingestellten Format anzuzeigen." + +#: ../../../../build/work/app/i18n/custmsg.h:624 +msgid "" +"You can also press the 's' key to convert a Prototype measurement to a Scale " +"measurement y dividing by the ratio for the current scale." +msgstr "" +"Sie können die Taste 's' benutzen um eine Muster Messung in eine Maßstab " +"Messung zu verwandeln, die Taste 'y' gibt hierbei den Teiler Faktor des " +"momentanen Maßstabs an." + +#: ../../../../build/work/app/i18n/custmsg.h:625 +msgid "" +"The 'p' key will convert a Scale measurement to a Prototype measurement." +msgstr "Die Taste 'p' konvertiert eine Maßstab Messung in eine Muster Messung." + +#: ../../../../build/work/app/i18n/custmsg.h:626 +msgid "" +"You can place cars on the layout using the Train Simulation command to check " +"clearance points, track to track separation and coupling." +msgstr "" +"Lokomotiven können im Gleisplan über den Zugbetrieb Knopf plaziert werden um " +"Weichenübergänge, Gleis zu Gleis Verbindungen oder ankuppeln simulieren zu " +"können." + +#: ../../../../build/work/app/i18n/custmsg.h:627 +msgid "" +"Use the MoveTo button on the Custom Management dialog to move your custom " +"Turnout, Structure and Car definitions to a .XTP parameter file." +msgstr "" +"Benutzen Sie den \"Verschieben nach\" Knopf im \"Verwalten|Anpassungs " +"Verwaltung\" Menü um selbst erstellte Weichen, Strukturen oder Wagen " +"Definitionen in eine .XTP Parameter Datei zu verschieben." + +#: ../../../../build/work/app/i18n/custmsg.h:628 +msgid "" +"If you are printing multiple pages on a continuous feed printer (such a Dot " +"Matrix) you can change the Page Order if necessary to print pages out in " +"proper order." +msgstr "" +"Falls Sie einen Drucker mit endlos Papier verwenden, können Sie die " +"Reihenfolge der Seiten ändern um diese in der richtigen Reihenfolge " +"auszudrucken." + +#: ../../../../build/work/app/i18n/custmsg.h:629 +msgid "" +"On the Car Item and Car Part dialogs, you can enter custom values for " +"Manufacturer, Part and Road by typing the new value directly into the Drop " +"Down List." +msgstr "" +"Im Dialog \"Verwalten|Wagenverzeichnis\" können eigene Werte für Hersteller, " +"Artikelnummer und Straße direkt in der angezeigten Liste eingegeben werden." + +#: ../../../../build/work/app/i18n/custmsg.h:630 +msgid "" +"On the Car Item dialog, you can change the Road, Number, Color and other " +"values for a Car. This is useful if you repaint or renumber a car. \n" +"You can also change the Coupler Mounting and Coupler Length if you change " +"the couplers." +msgstr "" +"Im Dialog \"Verwalten|Wagenverzeichnis\" können eigene Werte für Zugnummern, " +"Farbe und andere Werte vergeben werden. Dies is nützlich wenn Sie " +"beispielsweise einen Wagen umlackiert oder eine neue Rollnummer vergeben " +"haben. \n" +"Weiterhin kann die Kupplungsaufhängung und auch deren Länge verändert werden." + +#: ../../../../build/work/app/i18n/custmsg.h:631 +msgid "" +"You can Export your Car Inventory to a file in Comma-Separated-Value format " +"which can be read by most spread-sheet programs." +msgstr "" +"Ihr Wagen/Lokbestand kann in eine, druch Kommata getrennte, Textdatei " +"exportiert werden, welche von allen gänigen Tabellenkalkulations Programmen " +"eingelesen werden kann." + +#: ../../../../build/work/app/i18n/custmsg.h:632 +msgid "Use the Train Odometer to measure distances along the track." +msgstr "" +"Benutzen Sie den Zugsteckenzähler um Entfernungen auf dem Gleis messen zu " +"können." + +#: ../../../../build/work/app/i18n/custmsg.h:633 +msgid "" +"Holding down the Shift key when clicking the Zoom In or Zoom Out button will " +"zoom to a programmed Drawing Scale. \n" +"Holding down the Shift and Control keys when clicking a Zoom button will set " +"it's program Zoom to the current Drawing Scale." +msgstr "" +"klicken Sie die Lupenknöpfe an während die Shift Taste gedrückt ist " +"focusiert das Programm auf einen vorher festgelegten Maßstab. \n" +"durch gleichzeitiges Festhalten der Strg + Shift Tasten kann durch anklicken " +"der jeweiligen Lupenknöpfe wird die Einstellung der Vergrößer/kleinerung " +"festgelegt." + +#: ../../../../build/work/app/i18n/custmsg.h:634 +msgid "" +"You can trim the ends of turnouts by holding down the Shift key when using " +"the Split command." +msgstr "" +"bei Benutzung des \"Gleis auftrennen\" Kommandos, kann man durch festhalten " +"der Shift Taste das Ende einer Weiche anpassen." + +#: ../../../../build/work/app/i18n/custmsg.h:635 +msgid "" +"The Split command can be used to create Block Gaps at end points between two " +"tracks. \n" +"Either rail or both rails can be gapped, which are drawn as thick lines." +msgstr "" +"Der Dialog \"Ändern|Gleis auftrennen\" kann benutzt werden um Blockabstände " +"an Endpunkten von zwei Gleisen einzufügen. \n" +"Abstände können entweder an einem oder beiden Enden eingefügt werden, diese " +"werden durch dicke Linien gekennzeichnet." + +#: ../../../../build/work/app/i18n/custmsg.h:636 +msgid "" +"Trains will 'crash' if they hit another car when travelling faster than the " +"'Max Coupling Speed' (on the Command Options dialog). \n" +"They will also 'crash' if they hit the end of the track or an open " +"turnout. \n" +"Crashed trains must be manually moved back onto the track." +msgstr "" +"Züge 'entgleisen' wenn sie auf ein anderes Fahrzeug treffen oder sie beim " +"Ankuppeln schneller unterwegs sind wie die maximal eingestellte " +"Kuppelgeschwindigkeit (einstellbar über \"Optionen|Einstellungen\"). \n" +"Außerdem werden sie 'entgleisen' sobald sie auf ein totes Gleisende oder " +"eine offene Weiche treffen. \n" +"Entgleiste Züge müssen von Hand wieder auf das Gleis zurück gestellt werden." + +#: ../../../../build/work/app/i18n/custmsg.h:637 +msgid "" +"You can add new track segments to a turnout definition or create a " +"definition from individual tracks using the Group command." +msgstr "" +"das Auswählen Kommando kann verwendet werden um Teilabschnitte an " +"vorhandenes Gleis anzuhängen oder einen neuen Teilabschnitt zu erstellen " +"indem einzelne Gleise zusammengeführt werden." + +#: ../../../../build/work/app/i18n/custmsg.h:638 +msgid "" +"The center point and radius of Curved and Circle tracks can optionally be " +"drawn. \n" +"This feature is toggled by using the Move Label command and doing a Shift-" +"Left-Click on the track." +msgstr "" +"Der Mittelpunkt von Kurven oder Kreisen kann auch angezeigt werden. \n" +"Diese Option kann ein/ausgeschaltet werden durch festhalten der Shift Taste " +"bei gleichzeitigem links Klick der Maus." + +#: ../../../../build/work/app/i18n/custmsg.h:639 +msgid "" +"Turnout, Curved and Helix track labels can be individually turned on and off " +"by doing a Shift-Right-Click on the track when using the Move Label command." +msgstr "" +"Weichen, Kurven und Gleiswendel Beschreibungen können einzeln an und aus " +"geschaltet werden. Halten Sie hierzu die Shift Taste gedrückt während Sie " +"das Kommando \"Ändern|Beschreibungen verschieben\" verwenden und klicken Sie " +"mit der rechten Maustaste auf die jeweilige Beschreibung." + +#: ../../../../build/work/app/i18n/custmsg.h:640 +msgid "" +"You can use the Describe command to change the font size of Text objects." +msgstr "" +"Das Kommando \"Ändern|Eigenschaften\" wird verwendet um die Schriftgröße von " +"Textobjekten zu ändern." + +#: ../../../../build/work/app/i18n/custmsg.h:641 +msgid "" +"You can use the Describe command to change the size of Dimension Line labels." +msgstr "" +"Das Kommando \"Ändern|Eigenschaften\" wird verwendet um die Größe von " +"Dimensions Linien Beschreibungen zu ändern." + +#: ../../../../build/work/app/i18n/custmsg.h:642 +msgid "" +"Normally Right-Click displays a popup menu of commands and Shift-Right-Click " +"displays options for the current command. \n" +"This can reversed by using the Right Click toggle button on the Command " +"Options dialog." +msgstr "" +"normalerweise wird durch einen rechts Klick im Gleisplan ein Kommando Menü " +"angezeigt, bei festhalten der Shift-Taste und einem vorher ausgewählten " +"Kommando wird ein optionales Menü für das jeweilige Kommando angezeigt. \n" +"Dieses Verhalten kann vertauscht werden indem der rechts Umschalter aus dem " +"Kommando Dialog verwendet wird." + +#: ../../../../build/work/app/i18n/custmsg.h:643 +msgid "" +"The Align item on the Rotate command options menu will let you Align " +"selected objects with any unselected object. \n" +"The selected objects are rotated so the first point is parallel to the " +"second point you selected." +msgstr "" +"Die Auswahl \"Ausrichten\" im Optionsmenü des \"Drehen\" Kommandos kann " +"ausgewählte Objekte an nicht ausgewählten Objekten ausrichten. \n" +"Die ausgewählten Objekte werden so rotiert dass der erste Auswahlpunkt " +"parallel zum zweiten Auswahlpunkt erscheint." + +#: ../../../../build/work/app/i18n/custmsg.h:644 +msgid "" +"Print To Bitmap allows you to print the track center line. \n" +"This is useful if you later print the bitmap full size as a template when " +"laying track." +msgstr "" +"Speichern als Bitmap ermöglicht das mitspeichern der Gleismitte. \n" +"Dies ist nützlich falls Sie später diese Bitmap in voller Größe ausdrucken " +"wollen um sie als Gleisvorlage verwenden zu können." + +#: ../../../../build/work/app/i18n/custmsg.h:645 +msgid "" +"You can export the selected tracks to a DXF file which can be read by most " +"CAD programs." +msgstr "" +"Sie können markierte Gleise in eine DXF Datei exportieren, welche von den " +"meisten CAD Programmen lesbar ist." + +#: ../../../../build/work/app/i18n/custmsg.h:646 +msgid "" +"Lengths and distances can be displayed in a variety of units and formats " +"such as 1' 10 3/4\", 1ft 10.75in or 22.750. In Metric mode, distances can " +"be displayed as millimeters, centimeters or meters. See the Length Format " +"item on the Preferences dialog." +msgstr "" +"Längen und Entfernungen können in einer Vielzahl von Einheiten und Formaten " +"dargestellt werden dies sind z.B 1' 10 3/4\" 10.75in oder 22.750. Bei der " +"Auswahl von metrischen Einheiten werden Entfernungen und Längen in " +"Millimetern, Zentimetern oder Metern dargestellt. Diese Einstellung kann in " +"der Auswahl \"Einheiten\" im Dialog \"Optionen|Einstellungen\" vorgenommen " +"werden." + +#: ../../../../build/work/app/i18n/custmsg.h:647 +msgid "" +"Tracks that are too steep or curve too tightly are drawn in the Expection " +"color (Purple by default). \n" +"This helps to identify potential problem areas. \n" +"The maximum grade and minimum radius are set on the Preferences dialog." +msgstr "" +"Gleise die zu abschüssig sind oder zu enge Radien haben werden in einer " +"Ausnahme Farbe dargestellt (üblicherweise Lila). \n" +"Dies hilft um Problembereiche aufzufinden. \n" +"Die maximale Steigung und der minimale Radius werden im Eingenschaften " +"Dialog eingestellt." + +#: ../../../../build/work/app/i18n/custmsg.h:648 +msgid "" +"The Flip command produces a mirror-image of the selected tracks. \n" +"If possible, right-hand turnouts are relabeled as left-hand turnouts (and " +"vice versa)." +msgstr "" +"Das \"Spiegeln\" Kommando im Menü \"Ändern\" spiegelt ausgewählte " +"Gleise. \n" +"Falls möglich werden rechte Weichen in linke Weichen umbenannt oder linke in " +"rechte." + +#: ../../../../build/work/app/i18n/custmsg.h:649 +msgid "" +"Then Ungroup command will break turnouts and structures into individual " +"track, line and shape segments. \n" +"You can modify each segment and add new ones. \n" +"Then use the Group command to update the definition." +msgstr "" +"Das Kommando \"Verwalten|Gruppierung aufheben\" trennt Weichen und oder " +"Strukturen in einzelne Gleise, Linien oder Segmente auf. \n" +"Sie können nun jedes einzelne Segment modifizieren neue hinzufügen usw. \n" +"Danach benutzen Sie das Kommando \"Verwalten|Gruppieren\" um Ihre neue " +"Definition wieder als Gruppierung zusammen zu fügen." + +#: ../../../../build/work/app/i18n/custmsg.h:650 +msgid "Dimension lines show the distance between two points." +msgstr "Maßlinien zeigen die Entfernung zwischen zwei Punkten an." + +#: ../../../../build/work/app/i18n/custmsg.h:651 +msgid "" +"A variety of Benchwork (rectangular, L-girder and T-girder) can be drawn. \n" +"Use the Below command to move the Benchwork below the track for proper " +"display." +msgstr "" +"Eine Vielzahl Unterbauten kann dargestellt werden (Rechteckformen, L-Träger " +"und T-Träger). \n" +"Das Kommando \"Darunter\" im Menü \"Bearbeiten\" wird benutzt um Unterbauten " +"korrekt unter den Gleise darstellen zu können." + +#: ../../../../build/work/app/i18n/custmsg.h:652 +msgid "" +"The Turnout Designer dialogs allow you to specify the width of any attached " +"roadbed. \n" +"As well, the color and thickness of the lines used to represent the roadbed " +"can be specified." +msgstr "" +"Der Weichendesigner ermöglicht die Angabe der Spurbreite von jedem " +"beliebigen Gleisbett. \n" +"Desweitern können Farbe und Stärke der Linien angegeben in denen das " +"Gleisbett dargestellt wird." + +#: ../../../../build/work/app/i18n/custmsg.h:653 +msgid "" +"The Color dialog (on the Options menu) is used to change the color of " +"different objects on the display. \n" +"You can change the color of the Snap Grid and Borders, as well as Normal, " +"Selected and Exception tracks." +msgstr "" +"Der Dialog \"Optionen|Farben\" wird benutzt um die Farben für verschiedene " +"Objekte einzustellen. \n" +"Die Farbe des Fangrasters, Ränder sowohl als auch für normale selektierte " +"und Ausnahme Gleise können angegeben werden." + +#: ../../../../build/work/app/i18n/custmsg.h:654 +msgid "" +"You can draw tracks with wider lines for rails. \n" +"Select the tracks and use Medium or Thick Tracks on the Edit menu." +msgstr "" +"Schienen können mit breiteren Linien für Gleise gezeichnet werden. \n" +"Wählen Sie hierzu Mittlere Gleise oder Dicke Gleise im Bearbeiten Menü aus." + +#: ../../../../build/work/app/i18n/custmsg.h:655 +msgid "" +"Many objects on the layout have labels: Turnouts/Helix/Curved Titles, Track " +"Lenghts, End-Point Elevations, Track Elevations and Cars. \n" +"You can turn these labels on or off with the Label Enable toggle buttons on " +"the Display options dialog." +msgstr "" +"Viele Objekte im Gleisplan besitzen Beschreibungen: Weichen/Gleiswendel/" +"Kurven Gleislängen Endpunkte Höhenangaben usw. \n" +"Sie können diese Beschreibungen über den Dialog \"Optionen|Anzeige\" ein " +"oder ausschalten." + +#: ../../../../build/work/app/i18n/custmsg.h:656 +msgid "" +"If you hold down the Control key when using the Rotate command, the rotation " +"will be down in increments of 15°." +msgstr "" +"Durch festhalten der Strg Taste wird beim Drehen Kommando, die Rotation um " +"jeweils 15° verringert." + +#: ../../../../build/work/app/i18n/custmsg.h:657 +msgid "" +"When using the Rotate command, Shift-Right-Click displays a menu allowing " +"you to rotate by specific amounts or to align the selected objects with " +"another object." +msgstr "" +"Beim Benutzen des Befehls kann durch Halten der Umschalt-Taste aus " +"einem Menü der Drehwinkel des Objektes ausgewählt werden oder das Objekt " +"kann anhand eines anderen Objektes ausgerichtet werden." + +#~ msgid "Select other end of Bezier, +Shift -> snaps to %s end" +#~ msgstr "" +#~ "Das andere Ender der Bezier wählen, mit Umschalt-Taste an %s Endpunkt " +#~ "verbinden" + +#~ msgid "OK" +#~ msgstr "Ok" + +#~ msgid "" +#~ "No Unconnected end-point on track - Try again or release shift and click" +#~ msgstr "" +#~ "Dieses Gleis hat keinen offenen Endpunkt, nochmal versuchen oder " +#~ "Umschalttaste lösen und dann klicken" + +#~ msgid "Not on a Track - Try again or release shift and click" +#~ msgstr "Nicht auf einem Gleis, nochmal versuchen or " + +#, fuzzy +#~ msgid "" +#~ "Place 1st end point of Cornu track on track with an unconnected end-point" +#~ msgstr "Ersten Endpunkt der Gleisgerade setzen" + +#~ msgid "Connect Sectional Tracks" +#~ msgstr "Gleisstücke verbinden" + +#~ msgid "Drag to move selected tracks" +#~ msgstr "Ausgewählte Gleise durch Ziehen verschieben" + +#, fuzzy +#~ msgid "End Angle 2" +#~ msgstr "Winkel eingeben..." + +#, fuzzy +#~ msgid "Elev 1" +#~ msgstr "Höhe = %s" + +#, fuzzy +#~ msgid "End Radius Center 1: X" +#~ msgstr "Endpunkt 1: X" + +#, fuzzy +#~ msgid "Elev 2" +#~ msgstr "Höhe = %s" + +#, fuzzy +#~ msgid "Radius 2" +#~ msgstr "Radius 2" + +#, fuzzy +#~ msgid "End Radius Center 2: X" +#~ msgstr "Endpunkt 2: X" + +#~ msgid "Angle=%0.3f" +#~ msgstr "Winkel=%0.3f" + +#~ msgid "Place circle center" +#~ msgstr "Setze Kreismittelpunkt" + +#~ msgid "Place circle" +#~ msgstr "Platziere Kreis" + +#~ msgid "Draw" +#~ msgstr "Zeichne" + +#~ msgid "Show Map" +#~ msgstr "Karte anzeigen" + +#~ msgid "Blocks" +#~ msgstr "Gleisabschnitte" + +#~ msgid "SwitchMotor" +#~ msgstr "Weichenantrieb" + +#~ msgid "Switch Motors" +#~ msgstr "Weichenatriebe" + +#~ msgid "Black" +#~ msgstr "Schwarz" + +#~ msgid "Dark Blue" +#~ msgstr "Dunkelblau" + +#~ msgid "Steel Blue" +#~ msgstr "Stahlblau" + +#~ msgid "Royal Blue" +#~ msgstr "Königsblau" + +#~ msgid "Blue" +#~ msgstr "Blau" + +#~ msgid "Deep Sky Blue" +#~ msgstr "Dunkles Himmelblau" + +#~ msgid "Light Sky Blue" +#~ msgstr "Helles Himmelblau" + +#~ msgid "Powder Blue" +#~ msgstr "Hellblau" + +#~ msgid "Dark Aqua" +#~ msgstr "Dunkelaquamarin" + +#~ msgid "Aquamarine" +#~ msgstr "Aquamarin" + +#~ msgid "Aqua" +#~ msgstr "Wasserblau" + +#~ msgid "Dark Green" +#~ msgstr "Dunkelgrün" + +#~ msgid "Forest Green" +#~ msgstr "Waldgrün" + +#~ msgid "Lime Green" +#~ msgstr "Limonengrün" + +#~ msgid "Green" +#~ msgstr "Grün" + +#~ msgid "Lawn Green" +#~ msgstr "Rasengrün" + +#~ msgid "Pale Green" +#~ msgstr "Blassgrün" + +#~ msgid "Dark Yellow" +#~ msgstr "Dunkelgelb" + +#~ msgid "Coral" +#~ msgstr "Koralle" + +#~ msgid "Orange" +#~ msgstr "Orange" + +#~ msgid "Gold" +#~ msgstr "Gold" + +#~ msgid "Yellow" +#~ msgstr "Gelb" + +#~ msgid "Saddle Brown" +#~ msgstr "Lederbraun" + +#~ msgid "Brown" +#~ msgstr "Braun" + +#~ msgid "Chocolate" +#~ msgstr "Schokolade" + +#~ msgid "Rosy Brown" +#~ msgstr "Braun Rosa" + +#~ msgid "Tan" +#~ msgstr "Loh" + +#~ msgid "Beige" +#~ msgstr "Beige" + +#~ msgid "Dark Red" +#~ msgstr "Dunkelrot" + +#~ msgid "Tomato" +#~ msgstr "Tomatenrot" + +#~ msgid "Red" +#~ msgstr "Rot" + +#~ msgid "Hot Pink" +#~ msgstr "Knallrosa" + +#~ msgid "Pink" +#~ msgstr "Rosa" + +#~ msgid "Dark Purple" +#~ msgstr "Dunkelpurpur" + +#~ msgid "Maroon" +#~ msgstr "Kastanie" + +#~ msgid "Purple2" +#~ msgstr "Purpur 2" + +#~ msgid "Purple" +#~ msgstr "Purpur" + +#~ msgid "Violet" +#~ msgstr "Violett" + +#~ msgid "Dark Gray" +#~ msgstr "Dunkelgrau" + +#~ msgid "Gray" +#~ msgstr "Grau" + +#~ msgid "Light Gray" +#~ msgstr "Hellgrau" + +#~ msgid "Describe objects" +#~ msgstr "Objekte beschreiben" + +#~ msgid "Page %d" +#~ msgstr "Seite %d" + +#~ msgid "Print to file ..." +#~ msgstr "In Datei drucken..." + +#~ msgid "No file name specified" +#~ msgstr "Kein Dateiname angegeben" + +#~ msgid "%s exists" +#~ msgstr "%s existiert bereits" + +#~ msgid "Overwrite" +#~ msgstr "Ãœberschreiben" + +#~ msgid ": cannot open" +#~ msgstr ": kann nicht geöffnet werden" + +#~ msgid "Page 1" +#~ msgstr "Seite 1" + +#~ msgid "Printer Margin Test Page" +#~ msgstr "Testseite für Druckränder" + +#~ msgid "Enter both printer name and command" +#~ msgstr "Druckername und Befehl eingeben" + +#~ msgid "Can not save New Printer definition" +#~ msgstr "Neue Druckerdefinition kann nicht gespeichert werden" + +#~ msgid "Enter printer name" +#~ msgstr "Druckername eingeben" + +#~ msgid "Can not save New Margin definition" +#~ msgstr "Seitendefinition kann nicht gespeichert werden" + +#~ msgid "Paper Size" +#~ msgstr "Papiergrösse" + +#~ msgid "Printer" +#~ msgstr "Drucker" + +#~ msgid "Format" +#~ msgstr "Format" + +#~ msgid "X Font" +#~ msgstr "X Schriftart" + +#~ msgid "PS Font" +#~ msgstr "PS Schriftart" + +#~ msgid "Factor" +#~ msgstr "Faktor" + +#~ msgid "Print Test Page" +#~ msgstr "Drucke Testseite" + +#~ msgid "Add Printer" +#~ msgstr "Drucker hinzufügen" + +#~ msgid "Name: " +#~ msgstr "Name: " + +#~ msgid "Command: " +#~ msgstr "Befehl: " + +#~ msgid "Add Margin" +#~ msgstr "Rand hinzufügen" + +#~ msgid "Print To File" +#~ msgstr "In Datei drucken" + +#~ msgid "File Name? " +#~ msgstr "Dateiname? " + +#~ msgid "Font Alias" +#~ msgstr "Alias für Schriftart" + +#~ msgid "Enter a post-script font name for:" +#~ msgstr "Eingabe der Postscript Schriftart für:" + +#~ msgid "Printing" +#~ msgstr "Drucke" + +#~ msgid "Now printing" +#~ msgstr "Druck läuft" + +#~ msgid "Abort Print" +#~ msgstr "Druck abbrechen" + +#~ msgid "" +#~ " exists\n" +#~ "Do you want to overwrite it?" +#~ msgstr "" +#~ "existiert.\n" +#~ "Wollen Sie diese überschreiben?" + +#, fuzzy +#~ msgid "Delete Switch motor" +#~ msgstr "Weichenantrieb löschen" + +#~ msgid "Not a SwitchMotor!" +#~ msgstr "Kein Weichenantrieb!" + +#~ msgid "Custom Update" +#~ msgstr "Anpassungen hinzufügen" + +#~ msgid "No font selected" +#~ msgstr "Keine Schriftart ausgewählt" + +#~ msgid "No fonts" +#~ msgstr "Keine Schriftarten" + +#~ msgid "" +#~ "Can't find standard Serif font.\n" +#~ "Please choose a font" +#~ msgstr "" +#~ "Die Standardschriftart für Serif kann nicht gefunden werden.\n" +#~ "Bitte wählen Sie eine Schriftart aus" + +#~ msgid "" +#~ "Can't find standard San-Serif font.\n" +#~ "Please choose a font" +#~ msgstr "" +#~ "Die Standardschriftart für Sans-Serif kann nicht gefunden werden.\n" +#~ "Bitte wählen Sie eine Schriftart aus" + +#~ msgid "XTrackCAD Help" +#~ msgstr "XTrackCAD Hilfe" + +#~ msgid "Now printing %s" +#~ msgstr "Drucke %s" + +#~ msgid "Creating %s" +#~ msgstr "Erzeuge %s" + +#~ msgid "Scale / Gauge" +#~ msgstr "Maßstab / Spurweite" + +#~ msgid "load last layout" +#~ msgstr "Letzten Plan laden" + +#~ msgid "start with blank layout" +#~ msgstr "Mit leerem Plan beginnen" diff --git a/app/i18n/fi.po b/app/i18n/fi.po index be9826e..d43e427 100644 --- a/app/i18n/fi.po +++ b/app/i18n/fi.po @@ -2,13 +2,13 @@ # Copyright (C) 2007 Mikko Nissinen # This file is distributed under the same license as the xtrkcad package. # Mikko Nissinen , 2007. -# -# +# +# msgid "" msgstr "" "Project-Id-Version: xtrkcad 4.1.0b1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-02-05 11:20+0200\n" +"POT-Creation-Date: 2017-11-05 13:39+0100\n" "PO-Revision-Date: 2008-02-05 11:21+0200\n" "Last-Translator: Mikko Nissinen \n" "Language-Team: Finnish \n" @@ -16,4971 +16,5840 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../bin/fileio.c:239 -msgid "" -"\n" -"Do you want to continue?" +#: ../bin/cbezier.c:586 +#, fuzzy +msgid "Select End-Point - Ctrl unlocks end-point" +msgstr "Valitse ensimmäinen yhdistettävä päätepiste" + +#: ../bin/cbezier.c:588 ../bin/ccornu.c:462 ../bin/celev.c:418 +msgid "Select End-Point" +msgstr "Valitse päätepiste" + +#: ../bin/cbezier.c:609 +msgid "Not close enough to any valid, selectable point, reselect" msgstr "" -"\n" -"Haluatko jatkaa?" -#: ../bin/misc.c:299 -msgid "" -"\n" -"Do you want to save your layout?" +#: ../bin/cbezier.c:615 ../bin/ccornu.c:485 +#, c-format +msgid "Drag point %d to new location and release it" msgstr "" -"\n" -"Haluatko tallentaa ratasuunnitelman?" -#: ../bin/misc.c:1827 -msgid "" -"\n" -"XTrackCAD is a CAD (computer-aided design) program\n" -"for designing model railroad layouts." +#: ../bin/cbezier.c:625 ../bin/cbezier.c:716 ../bin/cbezier.c:718 +msgid "Pick any circle to adjust it - Enter to confirm, ESC to abort" msgstr "" -"\n" -"XTrackCAD on CAD ohjelma pienoisrautateiden\n" -"raidekaavioiden suunniteluun." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:465 -msgid " \n" -msgstr " \n" +#: ../bin/cbezier.c:648 ../bin/cbezier.c:706 +msgid "Bezier Curve Invalid has identical end points Change End Point" +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:317 -msgid "" -" Hint: the further you drag from the frog, the more accurate the angle.\n" +#: ../bin/cbezier.c:651 ../bin/cbezier.c:709 +#, c-format +msgid "Bezier Curve Invalid has %s Change End Point" msgstr "" -" Vinkki: Mitä kauemmas raahaat, sitä tarkemmin saat kulman asetelluksi.\n" -#: ../bin/dbitmap.c:149 -msgid " dpi" -msgstr " dpi" +#: ../bin/cbezier.c:654 ../bin/cbezier.c:712 +msgid "Bezier Curve Invalid has three co-incident points" +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:85 -msgid " 1 a short straight segment to the left of the points\n" -msgstr " 1 Lyhyestä suorasta etujatkoksesta.\n" +#: ../bin/cbezier.c:656 +#, fuzzy +msgid "Bezier is Straight Line" +msgstr "Suora viiva" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:86 -msgid " 2 a long straight segment to the right of the points\n" -msgstr " 2 Pitkästä suorasta raiteesta.\n" +#: ../bin/cbezier.c:658 +#, c-format +msgid "Bezier %s : Min Radius=%s Length=%s fx=%0.3f fy=%0.3f cusp=%0.3f" +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:87 -msgid " 3 a curved segment from the points to the frog\n" -msgstr " 3 Kaarteesta kielten päistä risteyskappaleeseen.\n" +#: ../bin/cbezier.c:662 +#, fuzzy, c-format +msgid "Bezier %s : Min Radius=%s Length=%s" +msgstr "Kaareva raideosa: Säde=%s Pituus=%s" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:88 -msgid "" -" 4 a straight segment from the frog to the end of the diverging leg.\n" -msgstr " 4 Haarautuvan raiteen suorasta takajatkoksesta.\n" +#: ../bin/cbezier.c:688 +#, fuzzy +msgid "No unconnected End Point to lock to" +msgstr "Valitse toinen yhdistettävä päätepiste" -#: ../bin/cselect.c:1317 -#, c-format -msgid " Angle %0.3f" -msgstr " Kulma %0.3f" +#: ../bin/cbezier.c:714 +#, fuzzy +msgid "Bezier Curve is Straight Line" +msgstr "Luo suora viiva" -#: ../bin/cselect.c:1315 -#, c-format -msgid " Angle %0.3f #%ld" -msgstr " Kulma %0.3f #%ld" +#: ../bin/cbezier.c:729 ../bin/cbezier.c:743 +msgid "Invalid Bezier Track - end points are identical" +msgstr "" -#: ../bin/ctodesgn.c:143 ../bin/ctodesgn.c:146 -msgid " #" -msgstr " #" +#: ../bin/cbezier.c:736 +#, c-format +msgid "Invalid Bezier Curve has a %s - Adjust" +msgstr "" -#: ../bin/dbench.c:38 -msgid " L-Girder" -msgstr "L-palkki" +#: ../bin/cbezier.c:740 +msgid "Invalid Bezier Curve has three coincident points - Adjust" +msgstr "" -#: ../bin/dbench.c:38 -msgid " T-Girder" -msgstr "T-palkki" +#: ../bin/cbezier.c:749 +#, fuzzy +msgid "Create Bezier" +msgstr "Luo viivoja" -#: ../bin/dcar.c:3812 -msgid " and Part" -msgstr " ja malli" +#: ../bin/cbezier.c:826 +#, fuzzy, c-format +msgid "%s picked - now select a Point" +msgstr "Valitsemattoman raideosan päätepiste" -#: ../wlib/gtklib/gtkfilsel.c:129 -msgid "" -" exists\n" -"Do you want to overwrite it?" +#: ../bin/cbezier.c:852 ../bin/ccornu.c:802 +msgid "No changes made" msgstr "" -" on olemassa.\n" -"Haluatko korvata olemassa olevan tiedoston?" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:584 -msgid "" -"\"Help|Recent Messages\" shows the last error and warning messages that were " -"generated by the program. Also an explanation of each message is displayed." +#: ../bin/cbezier.c:856 +#, fuzzy +msgid "Modify Bezier" +msgstr "Muokkaa raidetta" + +#: ../bin/cbezier.c:870 +msgid "Modify Bezier Complete - select another" msgstr "" -"\"Ohje|Viimeisimmät viestit\" näyttää tapahtuneet virheet ja varoitukset. " -"Valitsemalla jonkin viesteistä saat tarkennetun kuvauksen viestistä." -#: ../bin/cgroup.c:606 ../bin/dcmpnd.c:451 -msgid "#" -msgstr "#" +#: ../bin/cbezier.c:875 +msgid "Modify Bezier Cancelled" +msgstr "" -#: ../bin/compound.c:522 -msgid "# End Pt" -msgstr "Päätepisteitä" +#: ../bin/cbezier.c:964 ../bin/cbezier.c:1034 +#, fuzzy, c-format +msgid "Place 1st end point of Bezier + Shift -> snap to %s end" +msgstr "Aseta suoran raiteen 1. päätepiste" -#: ../bin/cturntbl.c:241 -msgid "# EndPt" -msgstr "Päätepisteitä" +#: ../bin/cbezier.c:987 +msgid "Shift used, but no Unconnected Track End there" +msgstr "" -#: ../bin/cgroup.c:607 ../bin/compound.c:523 -msgid "# Segments" -msgstr "Lohkoja" +#: ../bin/cbezier.c:1000 +msgid "Shift used, but no Line End there" +msgstr "" -#: ../bin/cprofile.c:636 -#, c-format -msgid "%0.1f%% Elev = %0.2f" -msgstr "%0.1f%% Korkeus = %0.2f" +#: ../bin/cbezier.c:1011 +msgid "Drag end of first Control Arm" +msgstr "" -#: ../bin/cprofile.c:640 -#, c-format -msgid "%0.1f%% Elev = %0.2f %0.1f%%" -msgstr "%0.1f%% Korkeus = %0.2f %0.1f%%" +#: ../bin/cbezier.c:1019 +msgid "Drag end of second Control Arm" +msgstr "" -#: ../bin/track.c:1532 +#: ../bin/cbezier.c:1038 #, c-format -msgid "%d Track(s) loosened" -msgstr "%d raidetta irroitettu" +msgid "Select other end of Bezier, +Shift -> snap to %s end" +msgstr "" -#: ../bin/dcmpnd.c:350 -#, c-format -msgid "%d Track(s) refreshed" -msgstr "%d raideosa(a) päivitetty" +#: ../bin/cbezier.c:1073 +msgid "Control Arm 1 is too short, try again" +msgstr "" -#: ../bin/cturnout.c:1831 +#: ../bin/cbezier.c:1078 #, c-format -msgid "%d connections, max distance %0.3f (%s)" -msgstr "%d liitosta, suurin etäisyys %0.3f (%s)" +msgid "Select other end of Bezier, +Shift -> snaps to %s end" +msgstr "" -#: ../bin/cgroup.c:588 -#, c-format -msgid "%d objects ungrouped" -msgstr "%d objetia purettu ryhmästä" +#: ../bin/cblock.c:105 ../bin/cblock.c:117 ../bin/cblock.c:160 +#: ../bin/ccontrol.c:167 ../bin/ccontrol.c:384 ../bin/compound.c:525 +#: ../bin/csensor.c:159 ../bin/csensor.c:356 ../bin/csignal.c:234 +#: ../bin/csignal.c:473 ../bin/csignal.c:484 ../bin/csignal.c:510 +#: ../bin/cswitchmotor.c:86 ../bin/cswitchmotor.c:105 +#: ../bin/cswitchmotor.c:216 ../bin/dcontmgm.c:91 ../bin/dlayer.c:445 +msgid "Name" +msgstr "Nimi" -#: ../bin/cprint.c:229 ../bin/cprint.c:278 -#, c-format -msgid "%d pages" -msgstr "%d sivua" +#: ../bin/cblock.c:106 ../bin/cblock.c:118 ../bin/cblock.c:161 +#: ../bin/csensor.c:161 ../bin/csensor.c:362 ../bin/csignal.c:473 +#: ../bin/csignal.c:512 +msgid "Script" +msgstr "" -#: ../bin/cpull.c:438 ../bin/cpull.c:583 -#, c-format -msgid "%d tracks moved" -msgstr "%d raideosaa siirretty" +#: ../bin/cblock.c:119 +#, fuzzy +msgid "Segments" +msgstr "Lohkoja" -#: ../../../../build/xtrkcad/app/help/messages.h:140 -#, c-format -msgid "%s" -msgstr "%s" +#: ../bin/cblock.c:162 ../bin/cdraw.c:219 ../bin/ctodesgn.c:137 +#: ../bin/ctodesgn.c:138 ../bin/ctodesgn.c:139 ../bin/ctodesgn.c:188 +#: ../bin/ctodesgn.c:191 ../bin/ctodesgn.c:211 ../bin/ctodesgn.c:216 +#: ../bin/ctodesgn.c:249 ../bin/ctodesgn.c:254 ../bin/ctodesgn.c:286 +#: ../bin/ctodesgn.c:289 ../bin/ctodesgn.c:292 ../bin/ctodesgn.c:327 +#: ../bin/ctodesgn.c:329 ../bin/ctodesgn.c:347 ../bin/ctodesgn.c:349 +#: ../bin/ctodesgn.c:368 ../bin/ctodesgn.c:370 ../bin/ctodesgn.c:389 +#: ../bin/ctodesgn.c:409 ../bin/ctodesgn.c:429 ../bin/ctodesgn.c:449 +#: ../bin/ctodesgn.c:487 ../bin/ctodesgn.c:506 ../bin/ctodesgn.c:507 +#: ../bin/ctrain.c:184 ../bin/tbezier.c:240 ../bin/tcornu.c:290 +#: ../bin/tcurve.c:356 ../bin/tstraigh.c:89 +msgid "Length" +msgstr "Pituus" -#: ../bin/ctodesgn.c:1718 -#, c-format -msgid "%s %s Designer" -msgstr "%s %s - suunnittelu" +#: ../bin/cblock.c:163 ../bin/cdraw.c:215 ../bin/compound.c:517 +#: ../bin/tbezier.c:231 ../bin/tcornu.c:277 ../bin/tcurve.c:348 +#: ../bin/tease.c:503 ../bin/tstraigh.c:85 +msgid "End Pt 1: X" +msgstr "Päätepiste 1: X" -#: ../bin/cdraw.c:893 -#, c-format -msgid "%s Color" -msgstr "%s väri" +#: ../bin/cblock.c:164 ../bin/cdraw.c:216 ../bin/compound.c:519 +#: ../bin/tbezier.c:236 ../bin/tcornu.c:282 ../bin/tcurve.c:350 +#: ../bin/tease.c:505 ../bin/tstraigh.c:87 +msgid "End Pt 2: X" +msgstr "Päätepiste 2: X" -#: ../bin/ctodesgn.c:1411 -#, c-format -msgid "%s Designer" -msgstr "%s - suunnittelu" +#: ../bin/cblock.c:189 +#, fuzzy +msgid "Change block" +msgstr "Muuta raiteita" -#: ../bin/custom.c:216 +#: ../bin/cblock.c:240 ../bin/compound.c:694 ../bin/cswitchmotor.c:299 #, c-format -msgid "%s Files|*.xtc" -msgstr "%s tiedostot|*.xtc" +msgid "(%d): Layer=%d %s" +msgstr "(%d): Taso=%d %s" -#: ../bin/custom.c:221 ../bin/custom.c:226 -#, c-format -msgid "%s Import Files|*.%sti" -msgstr "%s Tuotavat tiedostot|*.%sti" +#: ../bin/cblock.c:261 ../bin/cblock.c:910 +msgid "Block" +msgstr "" -#: ../bin/cdraw.c:880 +#: ../bin/cblock.c:425 #, c-format -msgid "%s Line Width" -msgstr "%s viivan paksuus" +msgid "resolveBlockTrack: T%d[%d]: T%d doesn't exist" +msgstr "" -#: ../bin/custom.c:241 -#, c-format -msgid "%s Log Files|*.log" -msgstr "%s Lokitiedostot|*.log" +#: ../bin/cblock.c:425 ../bin/cswitchmotor.c:395 ../bin/dbench.c:147 +#: ../bin/dcar.c:4234 ../bin/dcar.c:4418 ../bin/dcar.c:4428 ../bin/dcar.c:4476 +#: ../bin/dcar.c:4483 ../bin/dcar.c:4501 ../bin/dcar.c:4514 ../bin/dcar.c:4519 +#: ../bin/dcar.c:4548 ../bin/dcar.c:4710 ../bin/dxfoutput.c:189 +#: ../bin/fileio.c:236 ../bin/fileio.c:541 ../bin/fileio.c:656 +#: ../bin/fileio.c:753 ../bin/fileio.c:944 ../bin/fileio.c:1212 +#: ../bin/fileio.c:1262 ../bin/fileio.c:1308 ../bin/macro.c:174 +#: ../bin/macro.c:838 ../bin/macro.c:854 ../bin/macro.c:1157 +#: ../bin/param.c:1947 ../bin/track.c:986 ../bin/track.c:1360 +#: ../bin/track.c:1651 ../bin/track.c:1655 ../bin/track.c:1675 +#: ../bin/track.c:1737 ../wlib/gtklib/wpref.c:248 ../wlib/gtklib/wpref.c:255 +msgid "Continue" +msgstr "Jatka" -#: ../bin/custom.c:236 -#, c-format -msgid "%s Note Files|*.not" -msgstr "%s Muistiinpanot|*.not" +#: ../bin/cblock.c:502 ../bin/cblock.c:718 +msgid "Block must have a name!" +msgstr "" + +#: ../bin/cblock.c:502 ../bin/cblock.c:522 ../bin/cblock.c:530 +#: ../bin/cblock.c:589 ../bin/cblock.c:706 ../bin/cblock.c:718 +#: ../bin/cblock.c:755 ../bin/ccontrol.c:445 ../bin/cdraw.c:103 +#: ../bin/cdraw.c:909 ../bin/cgroup.c:982 ../bin/cgroup.c:1035 +#: ../bin/cgroup.c:1050 ../bin/cgroup.c:1089 ../bin/cgroup.c:1115 +#: ../bin/cgroup.c:1174 ../bin/cgroup.c:1618 ../bin/cnote.c:100 +#: ../bin/cprint.c:490 ../bin/cprint.c:916 ../bin/cpull.c:497 +#: ../bin/cpull.c:512 ../bin/cpull.c:514 ../bin/cpull.c:516 +#: ../bin/cselect.c:677 ../bin/cselect.c:774 ../bin/cselect.c:1299 +#: ../bin/csensor.c:411 ../bin/csignal.c:641 ../bin/csignal.c:709 +#: ../bin/csnap.c:584 ../bin/csnap.c:717 ../bin/cstruct.c:769 +#: ../bin/cstruct.c:778 ../bin/cstruct.c:880 ../bin/cswitchmotor.c:462 +#: ../bin/cswitchmotor.c:491 ../bin/cswitchmotor.c:625 +#: ../bin/cswitchmotor.c:656 ../bin/ctext.c:179 ../bin/ctodesgn.c:158 +#: ../bin/ctodesgn.c:1048 ../bin/ctodesgn.c:1098 ../bin/ctodesgn.c:1211 +#: ../bin/ctodesgn.c:1513 ../bin/cturnout.c:2410 ../bin/cturnout.c:2537 +#: ../bin/cundo.c:161 ../bin/cundo.c:166 ../bin/dbitmap.c:68 +#: ../bin/dbitmap.c:125 ../bin/dbitmap.c:203 ../bin/dbitmap.c:238 +#: ../bin/dcar.c:3536 ../bin/dcar.c:3720 ../bin/dcar.c:3724 ../bin/dcar.c:3728 +#: ../bin/dcar.c:3733 ../bin/dcar.c:4047 ../bin/dcar.c:4158 ../bin/dcar.c:4538 +#: ../bin/dcmpnd.c:393 ../bin/dcmpnd.c:404 ../bin/dcmpnd.c:536 +#: ../bin/dcustmgm.c:194 ../bin/dcustmgm.c:200 ../bin/dcustmgm.c:209 +#: ../bin/dcustmgm.c:225 ../bin/dease.c:230 ../bin/dlayer.c:206 +#: ../bin/dlayer.c:228 ../bin/dlayer.c:798 ../bin/dlayer.c:804 +#: ../bin/doption.c:164 ../bin/doption.c:244 ../bin/doption.c:398 +#: ../bin/doption.c:410 ../bin/doption.c:476 ../bin/dprmfile.c:91 +#: ../bin/dprmfile.c:105 ../bin/dprmfile.c:119 ../bin/dprmfile.c:165 +#: ../bin/dprmfile.c:533 ../bin/draw.c:2278 ../bin/fileio.c:610 +#: ../bin/fileio.c:678 ../bin/fileio.c:793 ../bin/fileio.c:795 +#: ../bin/fileio.c:800 ../bin/fileio.c:964 ../bin/layout.c:312 +#: ../bin/macro.c:939 ../bin/macro.c:943 ../bin/macro.c:1020 +#: ../bin/macro.c:1126 ../bin/macro.c:1354 ../bin/macro.c:1370 +#: ../bin/misc.c:312 ../bin/misc.c:362 ../bin/misc.c:1634 ../bin/misc.c:1764 +#: ../bin/misc.c:1828 ../bin/misc.c:2404 ../bin/misc.c:2414 ../bin/misc.c:2434 +#: ../bin/misc.c:2437 ../bin/misc2.c:457 ../bin/param.c:1710 +#: ../bin/param.c:1828 ../bin/param.c:1831 ../bin/param.c:1954 +#: ../bin/param.c:1960 ../bin/smalldlg.c:89 ../bin/smalldlg.c:220 +#: ../bin/tease.c:1044 ../bin/track.c:1374 ../wlib/gtklib/wpref.c:122 +#: ../../../../build/work/app/bin/bllnhlp.c:541 +msgid "Ok" +msgstr "Ok" -#: ../bin/dcar.c:3839 -#, c-format -msgid "%s Part: %s %s %s %s %s %s" -msgstr "%s malli: %s %s %s %s %s %s" +#: ../bin/cblock.c:530 +msgid "Block is discontigious!" +msgstr "" -#: ../bin/custom.c:246 -#, c-format -msgid "%s PartsList Files|*.log" -msgstr "%s Osaluetelotiedostot|*.log" +#: ../bin/cblock.c:535 +#, fuzzy +msgid "Create block" +msgstr "Luo nelikulmio" -#: ../bin/cprofile.c:472 -#, c-format -msgid "%s Profile: %s" -msgstr "%s Profiili: %s" +#: ../bin/cblock.c:571 +#, fuzzy +msgid "Non track object skipped!" +msgstr "Yhtään raidetta ei irroitettu" -#: ../bin/dcar.c:3855 -#, c-format -msgid "%s Prototype: %s%s." -msgstr "%s esikuva: %s%s." +#: ../bin/cblock.c:575 +msgid "Selected track is already in a block, skipped!" +msgstr "" -#: ../bin/custom.c:231 -#, c-format -msgid "%s Record Files|*.%str" -msgstr "%s Nauhoitustiedostot|*.%str" +#: ../bin/cblock.c:589 +#, fuzzy +msgid "Create Block" +msgstr "Luo helix raide" -#: ../bin/custom.c:206 -#, c-format -msgid "%s Turnout Designer" -msgstr "%s Vaihteiden suunnittelu" +#: ../bin/cblock.c:619 ../bin/cblock.c:651 +#, fuzzy +msgid "Select a track" +msgstr "Valitse raideosat" -#: ../bin/custom.c:211 -#, c-format -msgid "%s Version %s" -msgstr "%s versio %s" +#: ../bin/cblock.c:628 ../bin/cblock.c:659 +msgid "Not a block!" +msgstr "" -#: ../../../../build/xtrkcad/app/help/messages.h:130 +#: ../bin/cblock.c:664 #, c-format -msgid "" -"%s cannot read the demo file:\n" -"%s" +msgid "Really delete block %s?" msgstr "" -"%s ei voi lukea demotiedostoa:\n" -"%s" -#: ../wlib/gtklib/psprint.c:833 -#, c-format -msgid "%s exists" -msgstr "%s on olemassa" +#: ../bin/cblock.c:664 ../bin/cdraw.c:107 ../bin/cgroup.c:988 +#: ../bin/csignal.c:687 ../bin/cswitchmotor.c:581 ../bin/ctodesgn.c:1521 +#: ../bin/ctodesgn.c:2000 ../bin/ctrain.c:2425 ../bin/dbitmap.c:208 +#: ../bin/dcar.c:3672 ../bin/dcar.c:3750 ../bin/dcar.c:3834 ../bin/dcar.c:3853 +#: ../bin/dcar.c:4183 ../bin/dcar.c:4600 ../bin/dcontmgm.c:173 +#: ../bin/dcustmgm.c:141 ../bin/misc.c:1043 ../bin/misc.c:1048 +#: ../bin/misc.c:1113 ../bin/track.c:1376 ../bin/track.c:1473 +#: ../bin/track.c:1487 +msgid "Yes" +msgstr "Kyllä" -#: ../bin/cdraw.c:489 -#, c-format -msgid "%s: Layer=%d" -msgstr "%s: Taso=%d" +#: ../bin/cblock.c:664 ../bin/cdraw.c:107 ../bin/cgroup.c:988 +#: ../bin/csignal.c:687 ../bin/cswitchmotor.c:581 ../bin/ctodesgn.c:1521 +#: ../bin/ctodesgn.c:2000 ../bin/ctrain.c:2425 ../bin/dcar.c:3672 +#: ../bin/dcar.c:3750 ../bin/dcar.c:3834 ../bin/dcar.c:3853 ../bin/dcar.c:4183 +#: ../bin/dcar.c:4600 ../bin/dcontmgm.c:173 ../bin/dcustmgm.c:141 +#: ../bin/misc.c:1043 ../bin/misc.c:1048 ../bin/misc.c:1113 +#: ../bin/track.c:1376 ../bin/track.c:1473 ../bin/track.c:1487 +msgid "No" +msgstr "Ei" -#: ../../../../build/xtrkcad/app/help/messages.h:113 -#, c-format -msgid "%s:%d- %s" -msgstr "%s:%d- %s" +#: ../bin/cblock.c:665 +#, fuzzy +msgid "Delete Block" +msgstr "Poista raiteita" -#: ../bin/misc.c:2066 -msgid "&Add" -msgstr "&Lisää" +#: ../bin/cblock.c:706 +#, fuzzy, c-format +msgid "Deleting block %s" +msgstr "Poista raiteita" -#: ../bin/misc.c:454 ../bin/misc.c:478 -msgid "&Cancel" -msgstr "&Peruuta" +#: ../bin/cblock.c:722 +#, fuzzy +msgid "Modify Block" +msgstr "Muokkaa raidetta" -#: ../bin/misc.c:2067 -msgid "&Change" -msgstr "Muuta" +#: ../bin/cblock.c:754 +msgid "Edit block" +msgstr "" -#: ../bin/misc.c:2295 -msgid "&Colors ..." -msgstr "Värit ..." +#: ../bin/cblock.c:760 +#, c-format +msgid "Edit block %d" +msgstr "" -#: ../wlib/gtklib/gtkhelp.c:1035 -msgid "&Contents" -msgstr "Sisältö" +#: ../bin/ccontrol.c:168 ../bin/cnote.c:162 ../bin/csensor.c:160 +#: ../bin/csignal.c:235 ../bin/ctrain.c:182 +msgid "Position" +msgstr "Sijainti" -#: ../bin/misc.c:2160 -msgid "&Copy" -msgstr "&Kopioi" +#: ../bin/ccontrol.c:169 ../bin/ccontrol.c:390 +msgid "On Script" +msgstr "" -#: ../bin/misc.c:2292 -msgid "&Debug ..." -msgstr "Virheiden poisto (debug) ..." +#: ../bin/ccontrol.c:170 ../bin/ccontrol.c:392 +msgid "Off Script" +msgstr "" -#: ../bin/misc.c:2326 -msgid "&Demos" -msgstr "Demot" +#: ../bin/ccontrol.c:213 +#, fuzzy +msgid "Change Control" +msgstr "Junien hallinta" -#: ../bin/misc.c:2170 -msgid "&Deselect All" -msgstr "Poista valinnat" +#: ../bin/ccontrol.c:255 ../bin/csensor.c:233 +#, fuzzy, c-format +msgid "(%d [%s]): Layer=%d, at %0.3f,%0.3f" +msgstr "(%d): Taso=%d %s" -#: ../bin/misc.c:2284 -msgid "&Display ..." -msgstr "Näyttö ..." +#: ../bin/ccontrol.c:268 ../bin/ccontrol.c:594 +#, fuzzy +msgid "Control" +msgstr "Junien hallinta" -#: ../bin/misc.c:454 -msgid "&Don't Save" -msgstr "Älä tallenna" +#: ../bin/ccontrol.c:386 ../bin/csensor.c:358 ../bin/csignal.c:486 +#, fuzzy +msgid "Orgin X" +msgstr "Marginaali" -#: ../bin/misc.c:2068 -msgid "&Draw" -msgstr "Piirto" +#: ../bin/ccontrol.c:388 ../bin/csensor.c:360 ../bin/csignal.c:488 +#, fuzzy +msgid "Origin Y" +msgstr "Origo: X" -#: ../bin/misc.c:2287 -msgid "&Easements ..." -msgstr "Kaarreloivennus ..." +#: ../bin/ccontrol.c:404 +#, fuzzy +msgid "Create Control" +msgstr "Junien hallinta" -#: ../bin/misc.c:2064 -msgid "&Edit" -msgstr "&Muokkaa" +#: ../bin/ccontrol.c:407 +#, fuzzy +msgid "Modify Control" +msgstr "Junien hallinta" -#: ../bin/misc.c:2063 -msgid "&File" -msgstr "&Tiedosto" +#: ../bin/ccontrol.c:444 +#, fuzzy +msgid "Edit control" +msgstr "Junien hallinta" -#: ../bin/misc.c:2288 -msgid "&Fonts ..." -msgstr "&Kirjasimet ..." +#: ../bin/ccontrol.c:484 +#, fuzzy +msgid "Place control" +msgstr "Aseta ympyrä" -#: ../bin/misc.c:2342 -msgid "&Group" -msgstr "Ryhmittele" +#: ../bin/ccornu.c:480 +msgid "Not close enough to end point, reselect" +msgstr "" -#: ../bin/misc.c:2073 -msgid "&Help" -msgstr "&Ohje" +#: ../bin/ccornu.c:498 +msgid "" +"Pick any circle to adjust it by dragging - Enter to accept, Esc to cancel" +msgstr "" -#: ../bin/misc.c:2138 -msgid "&Import" -msgstr "Tuo tiedostosta" +#: ../bin/ccornu.c:509 +msgid "Track can't be split" +msgstr "" -#: ../bin/misc.c:2171 -msgid "&Invert Selection" -msgstr "Käänteinen valinta" +#: ../bin/ccornu.c:522 +#, fuzzy +msgid "Too close to other end of selected Track" +msgstr "Nosta tai laske kaikkia valittuja raiteita" -#: ../bin/misc.c:2248 -msgid "&Loosen Tracks" -msgstr "Irroita raiteet" +#: ../bin/ccornu.c:629 +#, c-format +msgid "Must be on the %s Track" +msgstr "" -#: ../bin/misc.c:2071 -msgid "&Macro" -msgstr "Makro" +#: ../bin/ccornu.c:643 +#, c-format +msgid "" +"Cornu : Min Radius=%s Max Rate of Radius Change=%s Length=%s Winding Arc=%s" +msgstr "" -#: ../bin/misc.c:2069 -msgid "&Manage" -msgstr "Hallinta" +#: ../bin/ccornu.c:661 +msgid "Pick on point to adjust it along track - Enter to confirm, ESC to abort" +msgstr "" -#: ../bin/misc.c:2127 -msgid "&New" -msgstr "&Uusi" +#: ../bin/ccornu.c:671 +msgid "Cornu has too complex shape - adjust end pts" +msgstr "" -#: ../bin/misc.c:2128 -msgid "&Open ..." -msgstr "&Avaa ..." +#: ../bin/ccornu.c:675 +#, fuzzy +msgid "Create Cornu" +msgstr "Luo viivoja" -#: ../bin/misc.c:2070 -msgid "&Options" -msgstr "Asetukset" +#: ../bin/ccornu.c:679 ../bin/ccornu.c:831 ../bin/tcornu.c:722 +#: ../bin/tcornu.c:919 ../bin/tcornu.c:1174 +#, c-format +msgid "" +"Cornu Create Failed for p1[%0.3f,%0.3f] p2[%0.3f,%0.3f], c1[%0.3f,%0.3f] c2" +"[%0.3f,%0.3f], a1=%0.3f a2=%0.3f, r1=%s r2=%s" +msgstr "" -#: ../bin/misc.c:2161 -msgid "&Paste" -msgstr "L&iitä" +#: ../bin/ccornu.c:776 +msgid "Track picked - now select a Point" +msgstr "" -#: ../bin/misc.c:2301 -msgid "&Play Back ..." -msgstr "&Toisto ..." +#: ../bin/ccornu.c:806 +#, fuzzy +msgid "Modify Cornu" +msgstr "Muokkaa raidetta" -#: ../bin/misc.c:2294 -msgid "&Preferences ..." -msgstr "&Ominaisuudet ..." +#: ../bin/ccornu.c:822 +#, c-format +msgid "Cornu Extension Create Failed for end %d" +msgstr "" -#: ../bin/misc.c:2300 -msgid "&Record ..." -msgstr "&Nauhoita ..." +#: ../bin/ccornu.c:866 +msgid "Modify Cornu Cancelled" +msgstr "" -#: ../bin/misc.c:2197 -msgid "&Redraw" -msgstr "Uudelleenpiirto" +#: ../bin/ccornu.c:984 +#, fuzzy +msgid "Place 1st end point of Cornu track on unconnected end-point" +msgstr "Aseta suoran raiteen 1. päätepiste" -#: ../bin/misc.c:478 -msgid "&Revert" -msgstr "Palauta" +#: ../bin/ccornu.c:997 +msgid "No Unconnected end point there" +msgstr "" -#: ../bin/misc.c:454 ../bin/misc.c:2131 -msgid "&Save" -msgstr "&Tallenna" +#: ../bin/ccornu.c:1005 +msgid "Place 2nd end point of Cornu track on unconnected end-point" +msgstr "" -#: ../bin/misc.c:2208 -msgid "&Tool Bar" -msgstr "Työkalurivin painikkeet" +#: ../bin/ccornu.c:1008 +msgid "No Unconnected Track End there" +msgstr "" -#: ../bin/misc.c:2156 -msgid "&Undo" -msgstr "&Kumoa" +#: ../bin/ccornu.c:1020 +#, fuzzy +msgid "Move 1st end point of Cornu track along track 1" +msgstr "Aseta suoran raiteen 1. päätepiste" -#: ../bin/misc.c:2343 -msgid "&Ungroup" -msgstr "Pura ryhmittely" +#: ../bin/ccornu.c:1038 +#, fuzzy +msgid "Move 2nd end point of Cornu track along track 2" +msgstr "Aseta suoran raiteen 1. päätepiste" -#: ../bin/misc.c:2065 -msgid "&View" -msgstr "&Näytä" +#: ../bin/ccornu.c:1056 +msgid "Can't Split - Locked to End Point" +msgstr "" -#: ../bin/misc.c:2072 -msgid "&Window" -msgstr "&Ikkuna" +#: ../bin/ccornu.c:1061 +#, fuzzy +msgid "Point not on track 1" +msgstr "Yhdistä kaksi raidetta" -#: ../bin/misc.c:2187 -msgid "&Zoom" -msgstr "&Zoom" +#: ../bin/ccornu.c:1085 +msgid "Put other end of Cornu on an unconnected end point" +msgstr "" -#: ../bin/compound.c:686 -#, c-format -msgid "(%d): Layer=%d %s" -msgstr "(%d): Taso=%d %s" +#: ../bin/ccurve.c:118 +#, fuzzy +msgid "" +"Drag from End-Point in direction of curve - Shift locks to track open end-" +"point" +msgstr "Vedä päätepisteestä kaarteen suuntaan" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:304 -msgid "- L girders\n" -msgstr "- L-palkki\n" +#: ../bin/ccurve.c:120 +msgid "Drag from End-Point in direction of curve" +msgstr "Vedä päätepisteestä kaarteen suuntaan" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:305 -msgid "- T girders\n" -msgstr "- T-palkki\n" +#: ../bin/ccurve.c:124 +#, fuzzy +msgid "Drag from End-Point to Center - Shift locks to track open end-point" +msgstr "Vedä päätepisteestä keskipisteeseen" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:303 -msgid "- rectangular (1x2, 2x4 etc)\n" -msgstr "- suora (25 x 50 mm, 50 x 100 mm jne)\n" +#: ../bin/ccurve.c:126 ../bin/ccurve.c:187 +msgid "Drag from End-Point to Center" +msgstr "Vedä päätepisteestä keskipisteeseen" -#: ../bin/dcar.c:3857 -msgid ". Enter new values or press Close" -msgstr ". Syötä uudet arvot tai paina Sulje" +#: ../bin/ccurve.c:129 ../bin/ccurve.c:187 +msgid "Drag from Center to End-Point" +msgstr "Vedä keskipisteestä päätepisteeseen" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:432 -msgid "... or curved.\n" -msgstr "...tai kaareva.\n" +#: ../bin/ccurve.c:132 +#, fuzzy +msgid "Drag from one to other end of chord" +msgstr "Vedä jänne päätepisteiden välille" -#: ../bin/cturnout.c:1836 -#, c-format -msgid "0 connections (%s)" -msgstr "0 liitosta (%s)" +#: ../bin/ccurve.c:155 +msgid "" +"No unconnected end-point on Track - Try again or release Shift and click" +msgstr "" -#: ../bin/cprint.c:139 ../bin/cprint.c:615 -msgid "0 pages" -msgstr "0 sivua" +#: ../bin/ccurve.c:160 +msgid "Not on a Track - Try again or release Shift and click" +msgstr "" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:369 -msgid "0° is up or to the right" -msgstr "Onko 0° ylhäällä vai oikealla" +#: ../bin/ccurve.c:174 +msgid "End Locked: Drag out curve start" +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:316 -msgid "1 - click on the frog and drag away to set the frog angle\n" -msgstr "1 - klikkaa risteyskappaleen kohdalle ja raahaa asettaaksesi kulman.\n" +#: ../bin/ccurve.c:175 +#, fuzzy +msgid "Drag along curve start" +msgstr "Vedä luodaksesi lähtevän raiteen" -#: ../bin/cprint.c:696 -msgid "1 page" -msgstr "1 sivu" +#: ../bin/ccurve.c:185 +msgid "End Locked: Drag out to center" +msgstr "" -#: ../bin/misc.c:1910 -msgid "15 CCW" -msgstr "15 VP" +#: ../bin/ccurve.c:193 +msgid "Drag to other end of chord" +msgstr "Vedä jänne päätepisteiden välille" -#: ../bin/misc.c:1909 -msgid "15 CW" -msgstr "15 MP" +#: ../bin/ccurve.c:221 +#, c-format +msgid "Start Locked: Drag out curve start - Angle=%0.3f" +msgstr "" -#: ../bin/misc.c:1905 -msgid "180 " -msgstr "180 " +#: ../bin/ccurve.c:222 +#, c-format +msgid "Drag out curve start - Angle=%0.3f" +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:318 -msgid "2 - click and drag to set the position of the points\n" -msgstr "2 - Klikkaa ja raahaa asetellaksesi kielten päät.\n" +#: ../bin/ccurve.c:226 +#, fuzzy, c-format +msgid "Tangent Locked: Drag out center - Radius=%s Angle=%0.3f" +msgstr "Tangentti raide: Pituus %s Kulma %0.3f" -#: ../bin/ctodesgn.c:309 -msgid "3-way Turnout" -msgstr "3-tie vaihde" +#: ../bin/ccurve.c:227 +#, fuzzy, c-format +msgid "Drag out center - Radius=%s Angle=%0.3f" +msgstr "Säde=%s Kulma=%0.3f" -#: ../bin/misc.c:1911 -msgid "30 CCW" -msgstr "30 VP" +#: ../bin/ccurve.c:233 +#, c-format +msgid "Radius=%s Angle=%0.3f" +msgstr "Säde=%s Kulma=%0.3f" -#: ../bin/misc.c:1908 -msgid "30 CW" -msgstr "30 MP" +#: ../bin/ccurve.c:239 +#, c-format +msgid "Length=%s Angle=%0.3f" +msgstr "Pituus=%s Kulma=%0.3f" -#: ../bin/misc.c:1912 -msgid "45 CCW" -msgstr "45 VP" +#: ../bin/ccurve.c:289 ../bin/ccurve.c:397 ../bin/drawgeom.c:440 +msgid "Drag on Red arrows to adjust curve" +msgstr "Asettele kaari vetämällä punaisista nuolista" -#: ../bin/misc.c:1907 -msgid "45 CW" -msgstr "45 MP" +#: ../bin/ccurve.c:352 ../bin/cjoin.c:216 ../bin/cmodify.c:365 +#: ../bin/cturntbl.c:569 +#, c-format +msgid "Straight Track: Length=%s Angle=%0.3f" +msgstr "Suora raideosa: Pituus=%s Kulma=%0.3f" -#: ../bin/misc.c:1913 -msgid "90 CCW" -msgstr "90 VP" +#: ../bin/ccurve.c:357 ../bin/cmodify.c:370 ../bin/drawgeom.c:324 +#: ../wlib/gtklib/ixhelp.c:235 +msgid "Back" +msgstr "Takaisin" -#: ../bin/misc.c:1906 -msgid "90 CW" -msgstr "90 MP" +#: ../bin/ccurve.c:375 +#, c-format +msgid "Curved Track: Radius=%s Angle=%0.3f Length=%s" +msgstr "Kaareva raideosa: Säde=%s Kulma=%0.3f Pituus=%s" -#: ../bin/doption.c:389 -msgid "999 63/64" -msgstr "999 63/64" +#: ../bin/ccurve.c:408 ../bin/cstraigh.c:133 +msgid "Create Straight Track" +msgstr "Luo suora raideosa" -#: ../bin/doption.c:388 -msgid "999 7/8" -msgstr "999 7/8" +#: ../bin/ccurve.c:420 +msgid "Create Curved Track" +msgstr "Luo kaareva raideosa" -#: ../bin/doption.c:394 -msgid "999' 11 63/64\"" -msgstr "999' 11 63/64\"" +#: ../bin/ccurve.c:491 +msgid "Elevation Difference" +msgstr "Korkeusero" -#: ../bin/doption.c:393 -msgid "999' 11 7/8\"" -msgstr "999' 11 7/8\"" +#: ../bin/ccurve.c:492 ../bin/cdraw.c:218 ../bin/ctodesgn.c:467 +#: ../bin/tcurve.c:353 +msgid "Radius" +msgstr "Säde" -#: ../bin/doption.c:392 -msgid "999' 11.9\"" -msgstr "999' 11.9\"" +#: ../bin/ccurve.c:493 ../bin/tcurve.c:354 +msgid "Turns" +msgstr "Kierroksia" -#: ../bin/doption.c:391 -msgid "999' 11.99\"" -msgstr "999' 11.99\"" +#: ../bin/ccurve.c:494 +msgid "Angular Separation" +msgstr "Sisäänkäyntien välinen kulma" -#: ../bin/doption.c:390 -msgid "999' 11.999\"" -msgstr "999' 11.999\"" +#: ../bin/ccurve.c:495 ../bin/celev.c:45 ../bin/compound.c:521 +#: ../bin/tbezier.c:241 ../bin/tcornu.c:291 ../bin/tcurve.c:360 +#: ../bin/tease.c:513 ../bin/tstraigh.c:91 +msgid "Grade" +msgstr "Nousukulma" -#: ../bin/doption.c:387 ../bin/doption.c:404 -msgid "999.9" -msgstr "999,9" +#: ../bin/ccurve.c:496 +msgid "Vertical Separation" +msgstr "Kerrosten välinen etäisyys" -#: ../bin/doption.c:386 ../bin/doption.c:403 -msgid "999.99" -msgstr "999,99" +#: ../bin/ccurve.c:498 +msgid "Total Length" +msgstr "Kokonaispituus" -#: ../bin/doption.c:385 ../bin/doption.c:402 -msgid "999.999" -msgstr "999,999" +#: ../bin/ccurve.c:574 +#, c-format +msgid "Total Length %s" +msgstr "Kokonaispituus %s" -#: ../bin/doption.c:408 -msgid "999.999cm" -msgstr "999,999 cm" +#: ../bin/ccurve.c:613 ../bin/ccurve.c:802 ../bin/tcurve.c:783 +msgid "Helix" +msgstr "Helix" -#: ../bin/doption.c:411 -msgid "999.999m" -msgstr "999,999 m" +#: ../bin/ccurve.c:627 +msgid "Circle Radius" +msgstr "Ympyrän säde" -#: ../bin/doption.c:405 -msgid "999.999mm" -msgstr "999,999 mm" +#: ../bin/ccurve.c:632 +msgid "Click on Circle Edge" +msgstr "Aseta ympyrän kehän piste" -#: ../bin/doption.c:409 -msgid "999.99cm" -msgstr "999,99 cm" +#: ../bin/ccurve.c:636 +msgid "Click on Circle Center" +msgstr "Aseta ympyrän keskipiste" -#: ../bin/doption.c:412 -msgid "999.99m" -msgstr "999,99 m" +#: ../bin/ccurve.c:667 +msgid "Drag to Center" +msgstr "Raahaa keskustaan" -#: ../bin/doption.c:406 -msgid "999.99mm" -msgstr "999,99 mm" +#: ../bin/ccurve.c:671 +msgid "Drag to Edge" +msgstr "Raahaa kehälle" -#: ../bin/doption.c:410 -msgid "999.9cm" -msgstr "999,9 cm" +#: ../bin/ccurve.c:692 ../bin/ccurve.c:696 +#, c-format +msgid "Radius=%s" +msgstr "Säde=%s" -#: ../bin/doption.c:413 -msgid "999.9m" -msgstr "999,9 m" +#: ../bin/ccurve.c:711 +msgid "Create Helix Track" +msgstr "Luo helix raide" -#: ../bin/doption.c:407 -msgid "999.9mm" -msgstr "999,9 mm" +#: ../bin/ccurve.c:718 +msgid "Create Circle Track" +msgstr "Luo ympyrärata" -#: ../bin/doption.c:399 -msgid "999ft 11 63/64in" -msgstr "999ft 11 63/64in" +#: ../bin/ccurve.c:773 +msgid "Curve Track" +msgstr "Kaareva raide" -#: ../bin/doption.c:398 -msgid "999ft 11 7/8in" -msgstr "999ft 11 7/8in" +#: ../bin/ccurve.c:773 +msgid "Curve Tracks" +msgstr "Kaarevat raideosat" -#: ../bin/doption.c:395 -msgid "999ft 11.999in" -msgstr "999ft 11.999in" +#: ../bin/ccurve.c:774 +msgid "Curve from End-Pt" +msgstr "Kaari päätepisteestä" -#: ../bin/doption.c:396 -msgid "999ft 11.99in" -msgstr "999ft 11.99in" +#: ../bin/ccurve.c:775 +msgid "Curve from Tangent" +msgstr "Kaari kehältä" -#: ../bin/doption.c:397 -msgid "999ft 11.9in" -msgstr "999ft 11.9in" +#: ../bin/ccurve.c:776 +msgid "Curve from Center" +msgstr "Kaari keskipisteestä" -#: ../wlib/gtklib/psprint.c:839 ../wlib/gtklib/psprint.c:852 -msgid ": cannot open" -msgstr ": ei voida avata" +#: ../bin/ccurve.c:777 +msgid "Curve from Chord" +msgstr "Kaari päätepisteiden välille" -#: ../bin/csnap.c:534 -msgid "A" -msgstr "K" +#: ../bin/ccurve.c:778 ../bin/cdraw.c:1091 +#, fuzzy +msgid "Bezier Curve" +msgstr "Yhdistä kaarteet" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:320 -msgid "A Hand Laid Turnout is composed of several parts.\n" -msgstr "Käsin asetellut vaihteet koostuvat useasta osasta.\n" +#: ../bin/ccurve.c:781 ../bin/tcurve.c:623 +msgid "Circle Track" +msgstr "Ympyrärata" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:156 -msgid "A Polygon is drawn in the same way\n" -msgstr "Täytetty monikulmio piirretään samalla tavalla.\n" +#: ../bin/ccurve.c:781 +msgid "Circle Tracks" +msgstr "Ympyräradat" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:154 -msgid "" -"A Polyline is drawn by dragging to place each of the point in the Polyline.\n" -msgstr "Monikulmio piirretään raahaamalla kukin kulma paikoilleen.\n" +#: ../bin/ccurve.c:782 +msgid "Fixed Radius Circle" +msgstr "Määriteltysäteinen ympyrä" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:426 -msgid "A Table Edge is attracted to the ends of other Table Edges.\n" -msgstr "Pyödän reunojen päät vetävät toisiaan puoleensa.\n" +#: ../bin/ccurve.c:783 +msgid "Circle from Tangent" +msgstr "Ympyrä kehältä" -#: ../../../../build/xtrkcad/app/help/messages.h:108 -#, c-format -msgid "" -"A comma was expected after this quoted field.\n" -"%s\n" -"\n" -"Do you want to continue reading the file?" -msgstr "" -"Odotettiin pilkkua tämän kentän jälkeen.\n" -"%s\n" -"\n" -"Haluatko jatkaa tiedoston lukemista?" +#: ../bin/ccurve.c:784 +msgid "Circle from Center" +msgstr "Ympyrä keskustasta" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:256 -msgid "A connecting track is drawn between the two tracks.\n" -msgstr "Yhdistävä raide piirretään yhdistettävien raiteiden väliin.\n" +#: ../bin/cdraw.c:103 +msgid "Font Size must be > 0" +msgstr "Kirjasinkoon on oltava > 0" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:286 -msgid "" -"A connecting track is drawn between the two tracks. Notice how it moves as " -"the cursor is dragged along the second track.\n" -msgstr "" -"Yhdistävä raide piirretään yhdistettävien raiteiden väliin. Huomaa kuinka se " -"siirtyy raahattaessa osoitinta toista raidetta pitkin.\n" +#: ../bin/cdraw.c:217 ../bin/tcurve.c:352 +msgid "Center: X" +msgstr "Keskipiste: X" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:200 -msgid "" -"A curved track is selected and it's new End-Point is determined by the angle " -"to the cursor.\n" -msgstr "Kaarteen päätepistettä voidaan siirtää kehää pitkin.\n" +#: ../bin/cdraw.c:220 ../bin/cdraw.c:230 ../bin/compound.c:523 +#: ../bin/cprint.c:143 ../bin/csignal.c:236 ../bin/csignal.c:490 +#: ../bin/ctodesgn.c:144 ../bin/ctodesgn.c:146 ../bin/ctodesgn.c:189 +#: ../bin/ctodesgn.c:212 ../bin/ctodesgn.c:214 ../bin/ctodesgn.c:250 +#: ../bin/ctodesgn.c:253 ../bin/ctodesgn.c:287 ../bin/ctodesgn.c:291 +#: ../bin/ctodesgn.c:328 ../bin/ctodesgn.c:348 ../bin/ctodesgn.c:369 +#: ../bin/ctodesgn.c:468 ../bin/ctrain.c:183 ../bin/tease.c:508 +#: ../bin/tstraigh.c:90 +msgid "Angle" +msgstr "Kulma" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:478 -msgid "" -"A menu list of various type of turnouts and sectional tracks you can define" -msgstr "" -"Valikko eri tyyppisistä vaihteista ja palaraiteista joita voit määritellä" +#: ../bin/cdraw.c:221 ../bin/tcurve.c:358 +msgid "CCW Angle" +msgstr "Vasemman pään kulma" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:573 -msgid "" -"A number of example layouts are provided. These files are located in the " -"'examples' directory where you installed XTrackCAD. The \"File|Open\" " -"command will open that directory when first used." -msgstr "" -"Tarjolla on useita esimerkkejä ratasuunnitelmista. Nämä tiedostot " -"sijaitsevat 'examples' hakemistossa sen hakemiston alla, johon XTrackCAD on " -"asennettu. \"Tiedosto|Avaa\" näyttää tämän hakemiston ensimmäisellä " -"käyttökerralla." +#: ../bin/cdraw.c:222 ../bin/tcurve.c:359 +msgid "CW Angle" +msgstr "Oikean pään kulma" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:396 -msgid "A single Left-Click selects tracks.\n" -msgstr "Yksi klikkaus hiiren vasemmalla painikkeella valitsee raiteen.\n" +#: ../bin/cdraw.c:223 +msgid "Point Count" +msgstr "Pisteitä" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:530 -msgid "" -"A tunnel portal is drawn at the boundary between hidden and normal track.\n" -msgstr "" -"Tunnelin suuaukko piirretään piilotetun ja normaalin raideosan " -"liitoskohtaan.\n" +#: ../bin/cdraw.c:224 ../bin/cdraw.c:847 ../bin/ctodesgn.c:156 +#: ../bin/tbezier.c:243 +msgid "Line Width" +msgstr "Viivan paksuus" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:650 -msgid "" -"A variety of Benchwork (rectangular, L-girder and T-girder) can be drawn. \n" -"Use the Below command to move the Benchwork below the track for proper " -"display." -msgstr "" -"Erilaisia runkorakenteita voidaan piirtää (suora, L-palkki ja T-palkki).\n" -"Käytä \"alimmaiseksi\" komentoa siirtääksesi runkorakenteen radan ja " -"maisemoinnin alapuolelle." +#: ../bin/cdraw.c:225 ../bin/cdraw.c:849 ../bin/cdraw.c:851 ../bin/cdraw.c:930 +#: ../bin/cdraw.c:955 ../bin/cmisc.c:97 ../bin/ctext.c:62 ../bin/ctext.c:146 +#: ../bin/ctodesgn.c:157 ../bin/dcar.c:1976 ../bin/dlayer.c:447 +#: ../bin/doption.c:476 +msgid "Color" +msgstr "Väri" -#: ../bin/misc.c:2175 -msgid "A&bove" -msgstr "Päällimmäiseksi" +#: ../bin/cdraw.c:226 ../bin/cdraw.c:456 ../bin/cdraw.c:867 +msgid "Lumber" +msgstr "Puutavara" -#: ../bin/misc.c:297 ../bin/misc.c:300 -msgid "ABORT" -msgstr "KESKEYTÄ" +#: ../bin/cdraw.c:227 +msgid "Orientation" +msgstr "Suunta" -#: ../wlib/gtklib/psprint.c:1324 -msgid "Abort Print" -msgstr "Keskeytä tulostus" +#: ../bin/cdraw.c:228 ../bin/cdraw.c:861 +#: ../../../../build/work/app/bin/bllnhlp.c:543 +msgid "Size" +msgstr "Koko" -#: ../bin/misc.c:1853 ../bin/misc.c:2330 -msgid "About" -msgstr "Tietoja" +#: ../bin/cdraw.c:229 ../bin/compound.c:522 ../bin/cprint.c:140 +#: ../bin/cturntbl.c:245 ../bin/tease.c:507 +msgid "Origin: X" +msgstr "Origo: X" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:13 -msgid "About box dialog" -msgstr "Tietoja -ikkuna" +#: ../bin/cdraw.c:231 ../bin/ctext.c:60 ../bin/ctext.c:145 +msgid "Font Size" +msgstr "Kirjasinkoko" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:29 -msgid "Abutting tracks" -msgstr "Vastakkaiset raideosat" +#: ../bin/cdraw.c:232 ../bin/cdraw.c:519 ../bin/ctext.c:264 +msgid "Text" +msgstr "Teksti" -#: ../../../../build/xtrkcad/app/help/messages.h:123 -msgid "" -"According to values that have been entered the diverging\n" -"track does not connect with the tangent track. Please\n" -"check the values entered and try again. Check the angle\n" -"is entered as a frog number or in degrees as specified\n" -"by Angle Mode radio buttons." -msgstr "" -"Antamiesi arvojen perusteella, poikkeava ja suora\n" -"raide eivät kohtaa.\n" -"Tarkasta arvot ja kokeile uudelleen.\n" -"Tarkasta myös onko kulma annettu risteysnumerona vai asteina." +#: ../bin/cdraw.c:233 ../bin/cmisc.c:114 ../bin/tcurve.c:361 +#: ../bin/tease.c:514 ../bin/tstraigh.c:92 +msgid "Pivot" +msgstr "Kiertopiste" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:225 -msgid "Action to invoke on Right-Click" -msgstr "Hiiren 2-painikkeen toiminto" +#: ../bin/cdraw.c:234 ../bin/cnote.c:163 ../bin/compound.c:529 +#: ../bin/cturntbl.c:248 ../bin/tbezier.c:242 ../bin/tcornu.c:292 +#: ../bin/tcurve.c:362 ../bin/tease.c:515 ../bin/tstraigh.c:93 +#: ../../../../build/work/app/bin/bllnhlp.c:621 +#: ../../../../build/work/app/bin/bllnhlp.c:622 +#: ../../../../build/work/app/bin/bllnhlp.c:623 +#: ../../../../build/work/app/bin/bllnhlp.c:624 +#: ../../../../build/work/app/bin/bllnhlp.c:625 +#: ../../../../build/work/app/bin/bllnhlp.c:626 +#: ../../../../build/work/app/bin/bllnhlp.c:627 +#: ../../../../build/work/app/bin/bllnhlp.c:628 +#: ../../../../build/work/app/bin/bllnhlp.c:629 +#: ../../../../build/work/app/bin/bllnhlp.c:630 +#: ../../../../build/work/app/bin/bllnhlp.c:631 +#: ../../../../build/work/app/bin/bllnhlp.c:632 +#: ../../../../build/work/app/bin/bllnhlp.c:633 +#: ../../../../build/work/app/bin/bllnhlp.c:634 +#: ../../../../build/work/app/bin/bllnhlp.c:635 +#: ../../../../build/work/app/bin/bllnhlp.c:636 +#: ../../../../build/work/app/bin/bllnhlp.c:637 +#: ../../../../build/work/app/bin/bllnhlp.c:638 +#: ../../../../build/work/app/bin/bllnhlp.c:639 +#: ../../../../build/work/app/bin/bllnhlp.c:640 +msgid "Layer" +msgstr "Taso" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:168 -msgid "Active layer list and layer buttons" -msgstr "Tasoluettelo ja tasopainikkeet" +#: ../bin/cdraw.c:446 +msgid "Straight Line" +msgstr "Suora viiva" -#: ../bin/dcar.c:2819 ../bin/dcar.c:2828 ../bin/dcar.c:2837 ../bin/dcar.c:3976 -#: ../bin/dcar.c:4104 -msgid "Add" -msgstr "Lisää" +#: ../bin/cdraw.c:449 ../bin/cdraw.c:1083 +msgid "Dimension Line" +msgstr "Mittajana" -#: ../bin/cselect.c:500 -msgid "Add Elevations" -msgstr "Päätepisteiden korkeudet" +#: ../bin/cdraw.c:464 ../bin/cdraw.c:868 ../bin/cdraw.c:1085 +msgid "Table Edge" +msgstr "Pöydän reuna" -#: ../wlib/gtklib/psprint.c:1296 -msgid "Add Margin" -msgstr "Lisää marginaali" +#: ../bin/cdraw.c:476 ../bin/cdraw.c:873 ../bin/cdraw.c:874 ../bin/cdraw.c:875 +msgid "Circle" +msgstr "Ympyrä" -#: ../wlib/gtklib/psprint.c:1288 -msgid "Add Printer" -msgstr "Lisää tulostin" +#: ../bin/cdraw.c:484 +msgid "Curved Line" +msgstr "Kaari" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:215 -msgid "Add a new Car Item" -msgstr "Lisää uusi vaunu tai veturi" +#: ../bin/cdraw.c:493 ../bin/cdraw.c:878 ../bin/cdraw.c:879 ../bin/cdraw.c:880 +msgid "Filled Circle" +msgstr "Täytetty ympyrä" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:377 -msgid "" -"Add an arrow head to indicate the tracks that connect to the rest of the " -"layout.\n" -msgstr "" -"Lisää nuolenkärjet kuvaamaan raiteiden jatkumista muihin radan osiin.\n" +#: ../bin/cdraw.c:498 ../bin/cdraw.c:1102 +msgid "Poly Line" +msgstr "Monikulmio" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:172 -msgid "Add or Update car object" -msgstr "Lisää/päivitä tämä vaunu tai veturi" +#: ../bin/cdraw.c:504 ../bin/cdraw.c:882 ../bin/cdraw.c:1103 +msgid "Polygon" +msgstr "Monikulmio" -#: ../bin/dcar.c:3804 +#: ../bin/cdraw.c:525 #, c-format -msgid "Added %ld new Cars" -msgstr "Lisätty %ld uutta vaunua/veturia" +msgid "%s: Layer=%d" +msgstr "%s: Taso=%d" -#: ../bin/dcar.c:3839 ../bin/dcar.c:3856 -msgid "Added new" -msgstr "Lisätty uusi" +#: ../bin/cdraw.c:536 ../bin/cdraw.c:972 +msgid "Tiny" +msgstr "Pikkuruinen" -#: ../bin/dcar.c:3806 -msgid "Added new Car" -msgstr "Lisätty uusi vaunu/veturi" +#: ../bin/cdraw.c:537 ../bin/cdraw.c:973 +msgid "Small" +msgstr "Pieni" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:72 -msgid "Adjust snap grid" -msgstr "Muuta kohdistusruudukon asetuksia" +#: ../bin/cdraw.c:538 ../bin/cdraw.c:974 +msgid "Medium" +msgstr "Keskikokoinen" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:212 -msgid "After selecting the object, drag a line which will form the mirror.\n" -msgstr "Valittuasi objektin, raahaa hiirellä peilauslinja.\n" +#: ../bin/cdraw.c:539 ../bin/cdraw.c:975 +msgid "Large" +msgstr "Suuri" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:191 -msgid "" -"After we release the Profile is updated to show the new Elevation and " -"Grade.\n" -msgstr "" -"Kun vapautamme hiiren painikkeen, profiili on päivitetty uuden korkeustason " -"mukaisesti.\n" +#: ../bin/cdraw.c:853 ../bin/cdraw.c:953 +msgid "Lumber Type" +msgstr "Puutavaran tyyppi" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:449 -msgid "" -"After working with Sectional track you might get to point where these mis-" -"alignments have accumulated and you wish to remove them.\n" -msgstr "" -"Työskenneltyäsi palaraiteiden kanssa voit päätyä tilanteeseen, jossa nämä " -"kohdistusten heitot ovat kertautuneet ja haluat korjata ne.\n" +#: ../bin/cdraw.c:865 +msgid "Straight" +msgstr "Suora" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:182 -msgid "" -"Again we use Shift-Right-Click to display the Profile Options menu and " -"select ignore.\n" -msgstr "Käytämme jälleen ponnahdusvalikkoa ja valitsemme \"Hylkää\".\n" +#: ../bin/cdraw.c:866 +msgid "Dimension" +msgstr "Etäisyys" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:235 -msgid "Again, if we drag across the track we can flip the stucture.\n" -msgstr "" -"Rakennus voidaan jälleen peilata raahaamalla raiteen puolelta toiselle.\n" +#: ../bin/cdraw.c:869 ../bin/cdraw.c:870 ../bin/cdraw.c:871 ../bin/cdraw.c:872 +msgid "Curved" +msgstr "Kaareva" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:511 -msgid "" -"Again, since there is no End-Point nearby, we split the track to create an " -"End-Point we can use,\n" -msgstr "" -"Taaskaan ei ole sopivaa raideliitosta lähistöllä, joten pilkomme raiteen\n" +#: ../bin/cdraw.c:876 ../bin/cdraw.c:1100 +msgid "Box" +msgstr "Nelikulmio" -#: ../bin/cselect.c:1858 -msgid "Align" -msgstr "Kohdista" +#: ../bin/cdraw.c:877 +msgid "Polyline" +msgstr "Monikulmio" -#: ../bin/doption.c:188 -msgid "All" -msgstr "Kaikki" +#: ../bin/cdraw.c:881 ../bin/cdraw.c:1101 +msgid "Filled Box" +msgstr "Täytetty nelikulmio" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:566 -msgid "All done.\n" -msgstr "Valmis.\n" +#: ../bin/cdraw.c:883 ../bin/tbezier.c:401 +#, fuzzy +msgid "Bezier Line" +msgstr "Ympyrät" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:315 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:318 -msgid "Allows the spacing to be subdivided" -msgstr "Aliviivojen jako" +#: ../bin/cdraw.c:928 +#, c-format +msgid "%s Line Width" +msgstr "%s viivan paksuus" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:176 -msgid "" -"Also, the Computed Elevations and Grade marker on the right side of the " -"layout have been updated.\n" -msgstr "Myös lasketut korkeustasot sekä nousukulman merkintä on päivitetty.\n" +#: ../bin/cdraw.c:942 +#, c-format +msgid "%s Color" +msgstr "%s väri" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:352 -msgid "Also, we will use a 1/8\" grid to lay out our controls.\n" -msgstr "Käytämme myös 1/8 tuuman kohdistusruudukkoa.\n" +#: ../bin/cdraw.c:970 +msgid "Dimension Line Size" +msgstr "Mittajanan koko" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:402 -msgid "And Right-Drag de-selects all tracks within an area.\n" -msgstr "" -"Raahaaminen hiiren oikealla painikkeella puolestaan poistaa alueella olevien " -"kohteiden valinnat.\n" +#: ../bin/cdraw.c:983 +msgid "Drag to create Table Edge" +msgstr "Piirrä pöydän reuna" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:379 -msgid "And add some labels.\n" -msgstr "Lisää joitakin merkintöjä.\n" +#: ../bin/cdraw.c:1082 +msgid "Line" +msgstr "Viiva" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:81 -msgid "And move the Label out of the way.\n" -msgstr "Ja siirrämme otsikon pois tieltä.\n" +#: ../bin/cdraw.c:1082 +msgid "Draw Line" +msgstr "Piirrä viiva" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:386 -msgid "And move the title over as well.\n" -msgstr "Siirrä myös otsikkoa.\n" +#: ../bin/cdraw.c:1083 +msgid "Draw Dimension Line" +msgstr "Piirrä mittajana" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:95 -msgid "And now Ungroup it (from the Tools Menu)\n" -msgstr "Ja sitten puramme ryhmittelyn.\n" +#: ../bin/cdraw.c:1084 ../../../../build/work/app/i18n/custmsg.h:53 +msgid "Benchwork" +msgstr "Runkorakenne" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:445 -msgid "And now the gap is closed.\n" -msgstr "Nyt rako on suljettu.\n" +#: ../bin/cdraw.c:1084 +msgid "Draw Benchwork" +msgstr "Piirrä runkorakenne" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:144 -msgid "And place a turnout to connect the new track.\n" -msgstr "Ja aseta vaihde liittääksesi uuden raiteen.\n" +#: ../bin/cdraw.c:1085 +msgid "Draw Table Edge" +msgstr "Piirrä pöydän reuna" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:494 -msgid "And set the Elevation to 4.\n" -msgstr "Ja aseta haluttu korkeustaso.\n" +#: ../bin/cdraw.c:1087 +msgid "Curve End" +msgstr "Kaari päätepisteestä" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:569 -msgid "And then select Medium Tracks from the Edit menu.\n" -msgstr "Valitse sitten keskikokoiset raiteet Muokkaa-valikosta.\n" +#: ../bin/cdraw.c:1087 +msgid "Draw Curve from End" +msgstr "Piirrä kaari päätepisteestä" -#: ../bin/ctodesgn.c:136 ../bin/ctodesgn.c:138 ../bin/ctodesgn.c:181 -#: ../bin/ctodesgn.c:204 ../bin/ctodesgn.c:206 ../bin/ctodesgn.c:242 -#: ../bin/ctodesgn.c:245 ../bin/ctodesgn.c:279 ../bin/ctodesgn.c:283 -#: ../bin/ctodesgn.c:320 ../bin/ctodesgn.c:340 ../bin/ctodesgn.c:361 -#: ../bin/ctodesgn.c:460 ../bin/cprint.c:135 ../bin/tease.c:502 -#: ../bin/ctrain.c:172 ../bin/compound.c:518 ../bin/tstraigh.c:81 -#: ../bin/cdraw.c:189 ../bin/cdraw.c:199 -msgid "Angle" -msgstr "Kulma" +#: ../bin/cdraw.c:1088 +msgid "Curve Tangent" +msgstr "Kaari kehältä" -#: ../bin/cselect.c:1572 -#, c-format -msgid "Angle %0.2f" -msgstr "Kulma %0.2f" +#: ../bin/cdraw.c:1088 +msgid "Draw Curve from Tangent" +msgstr "Piirrä kaari kehältä" -#: ../bin/cselect.c:1256 ../bin/cselect.c:1286 -#, c-format -msgid "Angle %0.3f" -msgstr "Kulma %0.3f" +#: ../bin/cdraw.c:1089 +msgid "Curve Center" +msgstr "Kaari keskipisteestä" -#: ../bin/ctodesgn.c:460 -msgid "Angle (Degrees)" -msgstr "Kulma (asteina)" +#: ../bin/cdraw.c:1089 +msgid "Draw Curve from Center" +msgstr "Piirrä kaari keskipisteestä" -#: ../bin/chndldto.c:132 -#, c-format -msgid "Angle = %0.2f Frog# = %0.2f" -msgstr "Kulma = %0.2f Risteysnumero = %0.2f" +#: ../bin/cdraw.c:1090 +msgid "Curve Chord" +msgstr "Kaari jänteestä" -#: ../bin/cstruct.c:691 -#, c-format -msgid "Angle = %0.3f" -msgstr "Kulma = %0.3f" +#: ../bin/cdraw.c:1090 +msgid "Draw Curve from Chord" +msgstr "Piirrä kaari·päätepisteiden·välille" -#: ../bin/cturnout.c:2182 -#, c-format -msgid "Angle = %0.3f (%s)" -msgstr "Kulma = %0.3f (%s)" +#: ../bin/cdraw.c:1091 +#, fuzzy +msgid "Draw Bezier" +msgstr "Piirrä viiva" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:334 -msgid "Angle betweek helix entrance and exit" -msgstr "Sisäänmenon ja ulostulon välinen kulma" +#: ../bin/cdraw.c:1094 +msgid "Circle Tangent" +msgstr "Ympyrä kehältä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:449 -msgid "Angle in degrees" -msgstr "Kulma (asteina)" +#: ../bin/cdraw.c:1094 +msgid "Draw Circle from Tangent" +msgstr "Piirrä ympyrä kehältä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:484 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:485 -msgid "Angle of the specified track to the center line of the turnout" -msgstr "Raiteen ja vaihteen keskilinjan välinen kulma" +#: ../bin/cdraw.c:1095 +msgid "Circle Center" +msgstr "Ympyrä keskustasta" -#: ../bin/misc.c:1870 -msgid "Angle:" -msgstr "Kulma:" +#: ../bin/cdraw.c:1095 +msgid "Draw Circle from Center" +msgstr "Piirrä ympyrä keskipisteestä" -#: ../bin/ccurve.c:156 -#, c-format -msgid "Angle=%0.3f" -msgstr "Kulma=%0.3f" +#: ../bin/cdraw.c:1097 +msgid "Circle Filled Tangent" +msgstr "Täytetty ympyrä kehältä" -#: ../bin/doption.c:362 -msgid "Angles" -msgstr "Kulmat" +#: ../bin/cdraw.c:1097 +msgid "Draw Filled Circle from Tangent" +msgstr "Piirrä täytetty ympyrä kehältä" -#: ../bin/tcurve.c:347 -msgid "Angular Length" -msgstr "Kulma" +#: ../bin/cdraw.c:1098 +msgid "Circle Filled Center" +msgstr "Täytetty ympyrä keskustasta" -#: ../bin/ccurve.c:391 -msgid "Angular Separation" -msgstr "Sisäänkäyntien välinen kulma" +#: ../bin/cdraw.c:1098 +msgid "Draw Filled Circle from Center" +msgstr "Piirrä täytetty ympyrä keskipisteestä" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:229 -msgid "" -"Another option of the command popup-menu is to Align the Selected " -"object with some other object.\n" -msgstr "" -"Toinen vaihtoehto ponnahdusvalikossa on suunnata valittu objekti jonkin " -"toisen objektin mukaisesti.\n" +#: ../bin/cdraw.c:1100 +msgid "Draw Box" +msgstr "Piirrä nelikulmio" -#: ../bin/dbitmap.c:187 -#, c-format -msgid "Approximate file size : %0.0f" -msgstr "Arvioitu tiedostokoko: %0.0f" +#: ../bin/cdraw.c:1101 +msgid "Draw Filled Box" +msgstr "Piirrä täytetty nelikulmio" -#: ../bin/dbitmap.c:189 -#, c-format -msgid "Approximate file size : %0.1fKb" -msgstr "Arvioitu tiedostokoko: %0.1fKt" +#: ../bin/cdraw.c:1102 +msgid "Draw Polyline" +msgstr "Piirrä monikulmio" -#: ../bin/dbitmap.c:191 -#, c-format -msgid "Approximate file size : %0.1fMb" -msgstr "Arvioitu tiedostokoko: %0.1fMt" +#: ../bin/cdraw.c:1103 +msgid "Draw Polygon" +msgstr "Piirrä täytetty monikulmio" -#: ../bin/dbitmap.c:153 -msgid "Approximate file size: 999.9Mb" -msgstr "Arvioitu tiedostokoko: 999.9Mt" +#: ../bin/cdraw.c:1119 +msgid "Straight Objects" +msgstr "Suorat objektit" -#: ../bin/param.c:103 -msgid "Aqua" -msgstr "" +#: ../bin/cdraw.c:1119 +msgid "Draw Straight Objects" +msgstr "Suorien objektien piirto" -#: ../bin/param.c:102 -msgid "Aquamarine" -msgstr "" +#: ../bin/cdraw.c:1120 +msgid "Curved Lines" +msgstr "Kaaret" -#: ../../../../build/xtrkcad/app/help/messages.h:104 -#, c-format -msgid "Are you sure you want to delete these %d car(s)?" -msgstr "Haluatko varmasti poistaa nämä %d vaunua/veturia?" +#: ../bin/cdraw.c:1120 +msgid "Draw Curved Lines" +msgstr "Kaarien piirto" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:618 -msgid "" -"Areas of water can represented by a Polygon (use the Draw command) of the " -"appropiate color.\n" -"By using the Modify command, you can move, add or remove corners of the " -"Polygon to fit the shape of the water.\n" -"You use the Below command to place the Polygon below (or behind) other " -"objects.\n" -"\n" -"You can also use a Polygon to represent aisles. " -msgstr "" +#: ../bin/cdraw.c:1121 +msgid "Circle Lines" +msgstr "Ympyrät" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:297 -msgid "As before, drag on one of the Red arrows to complete the Curve.\n" -msgstr "Kuten aikaisemminkin, raahaa nuolesta viimeistelläksesi kaarteen.\n" +#: ../bin/cdraw.c:1121 +msgid "Draw Circles" +msgstr "Ympyröiden piirto" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:234 -msgid "" -"As we drag along the curved track the Selected object rotates to follow the " -"curve.\n" -msgstr "" -"Raahaamalla kaarretta pitkin, valittua objektia pyöritetään vastaavalla " -"tavalla.\n" +#: ../bin/cdraw.c:1122 +msgid "Shapes" +msgstr "Muodot" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:333 -msgid "As you Zoom Out tracks are drawn with one line instead of two.\n" -msgstr "" -"Loitonnettaessa riittävästi, raiteet piirretään ainoastaan yhdellä viivalla " -"normaalin kahden sijaan.\n" +#: ../bin/cdraw.c:1122 +msgid "Draw Shapes" +msgstr "Muotojen piirto" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:564 -msgid "" -"As you drag away from the turntable a straight track will be drawn to the " -"cursor postion and a curve will be drawn from the cursor to the connecting " -"track.\n" -msgstr "" -"Raahatessasi kääntöpöydästä pois päin, suora raide piirretään osoittimeen " -"asti ja siitä jatketaan kaarteella liitettävään raiteeseen.\n" +#: ../bin/celev.c:44 ../bin/cprofile.c:1383 ../bin/csplit.c:107 +#: ../bin/csplit.c:112 ../bin/dease.c:64 ../bin/doption.c:101 +#: ../bin/doption.c:103 +msgid "None" +msgstr "Ei mitään" -#: ../../../../build/xtrkcad/app/help/messages.h:110 -#, c-format -msgid "" -"At least one path for the Turnout T%d does not\n" -"terminate on an endpoint. Such a track cannot be grouped. \n" -"The track has been unselected." -msgstr "" -"Ainakin yksi raideosan T%d reiteistä loppuu muuhun kuin\n" -"päätepisteeseen. Tällaista raideosaa ei voi ryhmitellä.\n" -"Raideosan valinta on poistettu." +#: ../bin/celev.c:44 +msgid "Defined" +msgstr "Määritelty" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:103 -msgid "At this point we can modify the tracks if necessary.\n" -msgstr "Tässä vaiheessa voimme muokata raiteita, jos se on tarpeen.\n" +#: ../bin/celev.c:44 +msgid "Hidden" +msgstr "Piilossa" -#: ../bin/track.c:1259 -msgid "Audit" -msgstr "Tarkasta" +#: ../bin/celev.c:45 +msgid "Computed" +msgstr "Laskettu" -#: ../../../../build/xtrkcad/app/help/messages.h:141 -msgid "Audit Abort?" -msgstr "Keskeytä tarkastus?" +#: ../bin/celev.c:45 +msgid "Station" +msgstr "Asema" -#: ../bin/doption.c:368 -msgid "Auto Pan" -msgstr "Automaattinen panorointi" +#: ../bin/celev.c:45 ../bin/cprofile.c:1382 ../bin/dcmpnd.c:74 +#: ../bin/misc.c:2352 +msgid "Ignore" +msgstr "Hylkää" -#: ../bin/ctrain.c:545 -msgid "Auto Reverse" -msgstr "Automaattinen peruutus" +#: ../bin/celev.c:123 ../bin/celev.c:168 +msgid "There are no reachable Defined Elevations" +msgstr "Ei määriteltyjä korkeustasoja saatavilla" -#: ../bin/ccurve.c:264 ../bin/cmodify.c:256 ../bin/drawgeom.c:288 -msgid "Back" -msgstr "Takaisin" +#: ../bin/celev.c:204 +msgid "Set Elevation" +msgstr "Aseta korkeus" -#: ../bin/dbench.c:142 +#: ../bin/celev.c:308 ../bin/celev.c:325 #, c-format -msgid "" -"Bad BenchType for %s:\n" -"%s" -msgstr "" -"Väärä runkotyyppi %s:lle:\n" -"%s" - -#: ../bin/doption.c:211 -msgid "Balloon Help" -msgstr "Pikaopaste" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:399 -msgid "Be careful with this because its easy to select all tracks this way.\n" -msgstr "" -"Ole kuitenkin varovainen, sillä näin voit helposti tulla valinneeksi kaikki " -"raiteet.\n" +msgid "Elev = %s" +msgstr "Korkeus = %s" -#: ../bin/param.c:123 -msgid "Beige" -msgstr "Beige" +#: ../bin/celev.c:310 ../bin/celev.c:327 +#, c-format +msgid "Dist = %s" +msgstr "Etäisyys = %s" -#: ../bin/misc.c:2176 -msgid "Belo&w" -msgstr "Alimmaiseksi" +#: ../bin/celev.c:316 ../bin/celev.c:333 ../bin/celev.c:374 ../bin/celev.c:381 +#: ../bin/celev.c:384 +#, c-format +msgid "Undefined" +msgstr "Määrittelemätön" -#: ../bin/cdraw.c:1029 ../../../../build/xtrkcad/app/i18n/custmsg.h:53 -msgid "Benchwork" -msgstr "Runkorakenne" +#: ../bin/celev.c:406 ../bin/celev.c:472 +msgid "Elevation" +msgstr "Korkeustaso" -#: ../bin/cjoin.c:639 -msgid "Beyond end of 1st track" -msgstr "1. raideosan päätepisteen takana" +#: ../bin/celev.c:406 ../bin/cmisc.c:401 ../bin/cprofile.c:1279 +#: ../bin/dcontmgm.c:300 ../bin/dcustmgm.c:358 ../bin/dlayer.c:1023 +#: ../bin/dpricels.c:154 +msgid "Done" +msgstr "Valmis" -#: ../bin/cjoin.c:604 -msgid "Beyond end of 2nd track" -msgstr "2. raideosan päätepisteen takana" +#: ../bin/celev.c:434 ../bin/csplit.c:92 ../bin/csplit.c:155 +msgid "Split Track" +msgstr "Pilko raide" -#: ../bin/dbitmap.c:235 -msgid "BitMap" -msgstr "BitMap" +#: ../bin/cgroup.c:591 +msgid "Ungroup Object" +msgstr "Pura ryhmittely" -#: ../bin/dbitmap.c:183 +#: ../bin/cgroup.c:603 #, c-format -msgid "Bitmap : %ld by %ld pixels" -msgstr "Bitmap : %ld x %ld pikseliä" - -#: ../bin/dbitmap.c:151 -msgid "Bitmap : 99999 by 99999 pixels" -msgstr "Bitmap : 99999 x 99999 pikseliä" +msgid "%d objects ungrouped" +msgstr "%d objetia purettu ryhmästä" -#: ../bin/dbitmap.c:212 -msgid "Bitmap files|*.bmp" -msgstr "Bitmap kuvatiedostot|*.bmp" +#: ../bin/cgroup.c:605 +msgid "No objects ungrouped" +msgstr "Yhtään objektia ei purettu ryhmästä" -#: ../bin/dbitmap.c:214 -msgid "Bitmap files|*.xpm" -msgstr "Bitmap kuvatiedostot|*.xpm" +#: ../bin/cgroup.c:614 +msgid "Replace with new group?" +msgstr "Korvaa uudella ryhmällä?" -#: ../bin/param.c:91 -msgid "Black" -msgstr "Musta" +#: ../bin/cgroup.c:619 ../bin/compound.c:524 ../bin/cstruct.c:70 +#: ../bin/ctodesgn.c:148 ../bin/ctodesgn.c:1772 ../bin/cturnout.c:76 +#: ../bin/dcar.c:1941 ../bin/dcar.c:4078 ../bin/dcar.c:4083 +#: ../bin/dcmpnd.c:450 ../bin/dcustmgm.c:50 +#: ../../../../build/work/app/bin/bllnhlp.c:345 +#: ../../../../build/work/app/bin/bllnhlp.c:520 +msgid "Manufacturer" +msgstr "Valmistaja" -#: ../bin/param.c:96 -msgid "Blue" -msgstr "Sininen" +#: ../bin/cgroup.c:620 ../bin/cmisc.c:401 ../bin/cstruct.c:70 +#: ../bin/ctodesgn.c:1773 ../bin/ctodesgn.c:1774 ../bin/ctrain.c:186 +#: ../bin/cturnout.c:76 ../bin/dcar.c:1957 ../bin/dcar.c:4079 +#: ../bin/dcar.c:4084 ../bin/dcmpnd.c:451 ../bin/dcustmgm.c:51 +#: ../bin/denum.c:182 ../bin/denum.c:183 ../bin/denum.c:186 +#: ../../../../build/work/app/bin/bllnhlp.c:346 +msgid "Description" +msgstr "Kuvaus" -#: ../bin/dcar.c:45 -msgid "Body" -msgstr "Runko" +#: ../bin/cgroup.c:621 ../bin/dcmpnd.c:452 +msgid "#" +msgstr "#" -#: ../bin/doption.c:531 -msgid "Border" -msgstr "Reunus" +#: ../bin/cgroup.c:622 ../bin/compound.c:528 +msgid "# Segments" +msgstr "Lohkoja" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:440 -msgid "Border rulers, room boundaries and table edges" -msgstr "Reunaviivaimet, huoneen rajat sekä pöydän reunat" +#: ../bin/cgroup.c:1089 +msgid "No endpts" +msgstr "Ei päätepisteitä" -#: ../bin/csplit.c:108 ../bin/csplit.c:113 -msgid "Both" -msgstr "Molemmat" +#: ../bin/cgroup.c:1174 +msgid "No paths" +msgstr "Ei reittejä" -#: ../bin/csplit.c:112 -msgid "Bottom" -msgstr "Alimmaiseksi" +#: ../bin/cgroup.c:1508 ../bin/cgroup.c:1562 +msgid "Group Tracks" +msgstr "Ryhmittele raideosia" -#: ../bin/cdraw.c:832 ../bin/cdraw.c:1044 -msgid "Box" -msgstr "Nelikulmio" +#: ../bin/cgroup.c:1618 +msgid "Group Objects" +msgstr "Ryhmittele" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:251 -msgid "Boxes are useful for drawing rectangular shapes.\n" -msgstr "" -"Nelikulmio koostuu neljästä yksittäisestä viivasta, mutta sen voi piirtää " -"yhdellä komennolla.\n" +#: ../bin/chndldto.c:70 +msgid "Place frog and drag angle" +msgstr "Aseta risteyskappale ja raahaa asettaaksesi kulma" -#: ../bin/cmisc2.c:52 -msgid "Bridge" -msgstr "Silta" +#: ../bin/chndldto.c:87 +msgid "frog" +msgstr "Risteyskappale" -#: ../bin/dease.c:63 -msgid "Broad" -msgstr "Laaja" +#: ../bin/chndldto.c:93 +msgid "Drag to set angle" +msgstr "Aseta kulma raahaamalla" -#: ../bin/param.c:119 -msgid "Brown" -msgstr "Ruskea" +#: ../bin/chndldto.c:134 +#, c-format +msgid "Angle = %0.2f Frog# = %0.2f" +msgstr "Kulma = %0.2f Risteysnumero = %0.2f" -#: ../bin/dprmfile.c:227 -msgid "Browse ..." -msgstr "Selaa ..." +#: ../bin/chndldto.c:136 +msgid "Frog angle is too close to 0" +msgstr "Risteyskulma on liian lähellä nollaa" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:33 -msgid "Building a yard throat." -msgstr "Vaihdekujan luominen" +#: ../bin/chndldto.c:139 +msgid "Select point position" +msgstr "Aseta kielten kärjet" -#: ../bin/ctodesgn.c:487 -msgid "Bumper Section" -msgstr "Puskuri raideosa" +#: ../bin/chndldto.c:153 ../bin/chndldto.c:178 +msgid "points" +msgstr "Kielien päät" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:448 -msgid "But they will have no effect when the layout is actually built.\n" -msgstr "Mutta sillä ei ole merkitystä kun rata todellisuudessa rakennetaan.\n" +#: ../bin/chndldto.c:275 +#, c-format +msgid "Length = %0.2f Angle = %0.2f Frog# = %0.2f" +msgstr "Pituus = %0.2f Kulma = %0.2f Risteysnumero = %0.2f" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:210 -msgid "But you can place it somewhere else.\n" -msgstr "Mutta voit sijoittaa sen johonkin toiseen paikkaan.\n" +#: ../bin/chndldto.c:279 +msgid "Create Hand Laid Turnout" +msgstr "Luo käsin aseteltu vaihde" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:392 -msgid "But you cannot have a Poly-shape with less than 3 sides.\n" -msgstr "Monikulmiossa on kuitenkin aina oltava vähintään kolme kulmaa/sivua.\n" +#: ../bin/chndldto.c:370 +msgid "HandLaidTurnout" +msgstr "Käsin aseteltu vaihde" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:607 -msgid "" -"By default objects are drawn in their normal colors. Tracks will be drawn " -"in Black. Objects can also be drawn in the color according to their Layer. " -"The color of a Layer is displayed on the corresponding Layer button.\n" -"The Display dialog 'Color Layers' item has separate toggles for Tracks and " -"non-Tracks." -msgstr "" +#: ../bin/cjoin.c:172 +#, c-format +msgid "Curved Track: Radius=%s Length=%s" +msgstr "Kaareva raideosa: Säde=%s Pituus=%s" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:346 -msgid "" -"By moving the cursor from one side to the other of the track centerline you " -"can flip the turnout 180°.\n" -msgstr "" -"Siirtämällä hiiren osoitinta radan keskilinjan puolelta toiselle, voit " -"kääntää vaihdetta 180°.\n" +#: ../bin/cjoin.c:258 +#, c-format +msgid "Curved Track: Radius=%s Length=%s Angle=%0.3f" +msgstr "Kaareva raideosa: Säde=%s Pituus=%s Kulma=%0.3f" -#: ../bin/tcurve.c:348 ../bin/cdraw.c:190 -msgid "CCW Angle" -msgstr "Vasemman pään kulma" +#: ../bin/cjoin.c:354 +#, c-format +msgid "Track (%d) is too short for transition-curve by %0.3f" +msgstr "Raide (%d) on %0.3f liian lyhyt kaarreloivennusta varten" -#: ../bin/tcurve.c:349 ../bin/cdraw.c:191 -msgid "CW Angle" -msgstr "Oikean pään kulma" +#: ../bin/cjoin.c:371 +#, c-format +msgid "Connecting track is too short by %0.3f" +msgstr "Yhdysraide on %0.3f liian lyhyt" -#: ../bin/macro.c:1347 -msgid "Can not find PARAMETER playback proc" -msgstr "PARAMETER toistoproseduuria ei löydy" +#: ../bin/cjoin.c:415 +msgid "Click on an unselected End-Point" +msgstr "Valitsemattoman raideosan päätepiste" -#: ../wlib/gtklib/psprint.c:1122 -msgid "Can not save New Margin definition" -msgstr "Uuden marginaalin määrittelyjen tallennus ei onnistu" +#: ../bin/cjoin.c:416 +msgid "Click on a selected End-Point" +msgstr "Valitun raideosan päätepiste" -#: ../wlib/gtklib/psprint.c:1094 -msgid "Can not save New Printer definition" -msgstr "Uuden tulostimen määrittelyjen tallennus ei onnistu" +#: ../bin/cjoin.c:423 +msgid "unselected" +msgstr "valitsematon" -#: ../wlib/gtklib/gtkfont.c:337 -msgid "" -"Can't find standard San-Serif font.\n" -"Please choose a font" -msgstr "" -"San-Serif kirjasinta ei löydy.\n" -"Ole hyvä ja valitse kirjasin" +#: ../bin/cjoin.c:423 ../bin/cprint.c:148 +msgid "selected" +msgstr "valittu" -#: ../wlib/gtklib/gtkfont.c:333 -msgid "" -"Can't find standard Serif font.\n" -"Please choose a font" +#: ../bin/cjoin.c:458 +msgid "Left click - join with track, Shift Left click - move to join" msgstr "" -"Serif kirjasinta ei löydy.\n" -"Ole hyvä ja valitse kirjasin" +"Hiiren vasen: yhdistä raiteet, Vaihto + hiiren vasen: siirrä yhdistääksesi" -#: ../wlib/gtklib/gtkfont.c:418 ../wlib/gtklib/psprint.c:834 -#: ../wlib/gtklib/psprint.c:1284 ../bin/misc.c:1023 ../bin/misc.c:1093 -#: ../bin/dbitmap.c:205 ../bin/param.c:2555 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:512 -msgid "Cancel" -msgstr "Peruuta" +#: ../bin/cjoin.c:493 ../bin/cjoin.c:802 ../bin/cjoin.c:811 +msgid "Select 2nd track" +msgstr "Valitse 2. raideosa" -#: ../bin/misc.c:1021 ../bin/misc.c:1026 ../bin/misc.c:1091 -msgid "" -"Cancelling the current command will undo the changes\n" -"you are currently making. Do you want to update?" -msgstr "" -"Komennon peruuttaminen kumoaa muutokset,\n" -"joita olet tekemässä. Haluatko jatkaa?" +#: ../bin/cjoin.c:520 ../bin/cmisc.c:52 +msgid "First" +msgstr "Ensimmäinen" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:11 -msgid "Cancels this command" -msgstr "Kumoaa edellisen komennon" +#: ../bin/cjoin.c:525 ../bin/cmisc.c:52 +msgid "Second" +msgstr "Toinen" -#: ../wlib/gtklib/wpref.c:151 -#, c-format -msgid "Cannot create %s" -msgstr "%s luonti ei onnistu." +#: ../bin/cjoin.c:620 +msgid "Beyond end of 2nd track" +msgstr "2. raideosan päätepisteen takana" -#: ../../../../build/xtrkcad/app/help/messages.h:137 -msgid "Cannot extend a helix" -msgstr "Helixiä ei voida jatkaa" +#: ../bin/cjoin.c:655 +msgid "Beyond end of 1st track" +msgstr "1. raideosan päätepisteen takana" -#: ../../../../build/xtrkcad/app/help/messages.h:105 -#, c-format -msgid "" -"Cannot open %s file:\n" -"%s:%s" -msgstr "" -"Tiedostoa %s ei voida avata:\n" -"%s: %s" +#: ../bin/cjoin.c:679 +msgid "First " +msgstr "Ensimmäinen " -#: ../../../../build/xtrkcad/app/help/messages.h:138 -msgid "Cannot trim a helix" -msgstr "Helixiä ei voida lyhentää" +#: ../bin/cjoin.c:706 +msgid "Second " +msgstr "Toinen " -#: ../bin/ctrain.c:240 -msgid "Car" -msgstr "Vaunu" +#: ../bin/cjoin.c:720 ../bin/track.c:1959 +msgid "Connecting " +msgstr "Yhdistetään " -#: ../bin/misc.c:2348 ../bin/dcar.c:4225 ../bin/dcar.c:4955 -msgid "Car Inventory" -msgstr "Kalustoluettelo" +#: ../bin/cjoin.c:814 +msgid "Join Tracks" +msgstr "Yhdistä raiteet" -#: ../bin/doption.c:216 -msgid "Car Labels" -msgstr "Vaunujen merkinnät" +#: ../bin/cjoin.c:882 +msgid "Join" +msgstr "Yhdistä" -#: ../bin/dcar.c:1970 -msgid "Car Length" -msgstr "Pituus" +#: ../bin/cmisc.c:52 +msgid "Middle" +msgstr "Keskimmäinen" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:188 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:356 -msgid "Car Number" -msgstr "Vaunun tai veturin numero" +#: ../bin/cmisc.c:209 ../bin/cmodify.c:203 ../bin/cnote.c:190 +#: ../bin/compound.c:597 ../bin/ctrain.c:213 +msgid "Change Track" +msgstr "Muuta raiteita" -#: ../bin/dcustmgm.c:60 ../bin/dcar.c:2009 -msgid "Car Part" -msgstr "Malli" +#: ../bin/cmisc.c:513 +msgid "Select track to describe" +msgstr "Valitse määriteltävä raideosa" -#: ../bin/dcustmgm.c:61 ../bin/dcar.c:2010 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:174 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:175 -msgid "Car Prototype" -msgstr "Esikuva" +#: ../bin/cmisc.c:570 ../bin/doption.c:205 +msgid "Properties" +msgstr "Asetukset" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:185 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:186 -msgid "Car Type" -msgstr "Vaunun tai veturin tyyppi" +#: ../bin/cmisc2.c:52 +msgid "Bridge" +msgstr "Silta" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:189 -msgid "Car body Color" -msgstr "Vaunun tai veturin rungon väri" +#: ../bin/cmodify.c:144 +msgid "Select track to modify" +msgstr "Valitse muokattava raide" -#: ../bin/doption.c:190 -msgid "Cars" -msgstr "Vaunut" +#: ../bin/cmodify.c:261 +msgid "Modify Track" +msgstr "Muokkaa raidetta" -#: ../bin/doption.c:353 -msgid "Cartesian" -msgstr "Karteesinen" +#: ../bin/cmodify.c:299 +msgid "Drag to create new track segment" +msgstr "Raahaa luodaksesi uuden raiteen" -#: ../bin/tcurve.c:342 ../bin/cdraw.c:186 -msgid "Center: X" -msgstr "Keskipiste: X" +#: ../bin/cmodify.c:429 +#, c-format +msgid "Curve Track: Radius=%s Length=%s Angle=%0.3f" +msgstr "Kaareva raideosa: Säde=%s Pituus=%s Kulma=%0.3f" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:483 -msgid "" -"Certain parameters of the object can be changed. In this case we'll change " -"the Length\n" -msgstr "" -"Tiettyjä parametreja voi muuttaa. Tässä tapauksesa muutamme pituutta.\n" +#: ../bin/cmodify.c:446 +msgid "Extend Track" +msgstr "Jatka raidetta" -#: ../bin/misc.c:1811 -msgid "Change" -msgstr "Muuta" +#: ../bin/cmodify.c:522 +msgid "Modify" +msgstr "Muokkaa" -#: ../bin/ctrain.c:2539 -msgid "Change Direction" -msgstr "Muuta suuntaa" +#: ../bin/cnote.c:100 ../bin/cnote.c:233 ../bin/cnote.c:462 +msgid "Note" +msgstr "Muistiinpano" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:39 -msgid "Change Display parameters" -msgstr "Muuta näyttöasetuksia" +#: ../bin/cnote.c:106 +msgid "Replace this text with your layout notes" +msgstr "Korvaa tämä teksti muistiinpanollasi" -#: ../bin/misc.c:1811 ../../../../build/xtrkcad/app/bin/bllnhlp.c:66 -msgid "Change Elevations" -msgstr "Muuta korkeustasoja" +#: ../bin/cnote.c:217 ../bin/cnote.c:218 ../bin/cnote.c:219 +msgid "Note: " +msgstr "Muistiinpano: " -#: ../bin/csnap.c:785 -msgid "Change Grid..." -msgstr "Kohdistusruudukko..." +#: ../bin/cnote.c:415 ../../../../build/work/app/bin/bllnhlp.c:94 +msgid "Place a note on the layout" +msgstr "Lisää muistiinpano ratasuunnitelmaan" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:80 -msgid "Change Layers" -msgstr "Muuta tasojen asetuksia" +#: ../bin/cnote.c:431 +msgid "New Note" +msgstr "Uusi muistiinpano" -#: ../bin/misc.c:2266 -msgid "Change Scale" -msgstr "Muuta mittakaavaa" +#: ../bin/cnote.c:435 +msgid "Replace this text with your note" +msgstr "Korvaa tämä teksti muistiinpanollasi" -#: ../bin/cmodify.c:121 ../bin/cnote.c:168 ../bin/ctrain.c:197 -#: ../bin/compound.c:592 ../bin/cmisc.c:153 -msgid "Change Track" -msgstr "Muuta raiteita" +#: ../bin/compound.c:518 ../bin/compound.c:520 ../bin/tcurve.c:349 +#: ../bin/tcurve.c:351 ../bin/tease.c:504 ../bin/tease.c:506 +#: ../bin/tstraigh.c:86 ../bin/tstraigh.c:88 +msgid "Z" +msgstr "Z" -#: ../bin/cselect.c:305 -msgid "Change Track Width" -msgstr "Muuta raiteen pituutta" +#: ../bin/compound.c:526 ../bin/cstruct.c:70 ../bin/cturnout.c:76 +#: ../bin/dcar.c:4078 ../bin/dcar.c:4083 ../bin/dcustmgm.c:51 +#: ../bin/doption.c:106 ../bin/doption.c:107 +msgid "Part No" +msgstr "Tuotekoodi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:474 -msgid "Change direction of train" -msgstr "Muuta junan kulkusuunta" +#: ../bin/compound.c:527 +msgid "# End Pt" +msgstr "Päätepisteitä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:130 -msgid "Change drawing scale" -msgstr "Muuta piirron mittakaavaa" +#: ../bin/compound.c:782 ../bin/cswitchmotor.c:220 ../bin/cturnout.c:894 +#: ../bin/cturnout.c:2401 ../bin/cturnout.c:2571 +msgid "Turnout" +msgstr "Palaraide" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:436 -msgid "Change size by this amount" -msgstr "Muuta kokoa tämän suhdeluvun verran" +#: ../bin/compound.c:782 +msgid "Sectional Track" +msgstr "Palaraide" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:310 -msgid "Change the Orientation to Right.\n" -msgstr "Muuta \"suunta\" \"oikeaksi\".\n" +#: ../bin/compound.c:785 ../bin/cstruct.c:769 ../bin/cstruct.c:914 +msgid "Structure" +msgstr "Rakennus" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:435 -msgid "Change track dimensions to new scale" -msgstr "Muuta raiteiden mitat uuteen mittakaavaan" +#: ../bin/cparalle.c:44 ../bin/cparalle.c:74 ../bin/cparalle.c:86 +#: ../bin/ctodesgn.c:390 ../bin/ctodesgn.c:410 ../bin/ctodesgn.c:430 +#: ../bin/tcurve.c:355 +msgid "Separation" +msgstr "Väli" -#: ../bin/doption.c:358 -msgid "Check Point" -msgstr "Automaattinen varmennus" +#: ../bin/cparalle.c:96 +msgid " Track doesn't support parallel" +msgstr "" -#: ../bin/fileio.c:700 ../bin/fileio.c:1017 -msgid "Check Pointing" -msgstr "Automaattinen varmennus" +#: ../bin/cparalle.c:145 +msgid "Create Parallel Track" +msgstr "Luo rinnakkainen raide" -#: ../bin/param.c:120 -msgid "Chocolate" -msgstr "Suklaa" +#: ../bin/cparalle.c:189 ../../../../build/work/app/i18n/custmsg.h:44 +msgid "Parallel" +msgstr "Rinnakkainen" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:458 -msgid "Choose a Pier number" -msgstr "Valitse pilarin numero" +#: ../bin/cprint.c:102 +msgid "Portrait" +msgstr "Pysty" -#: ../bin/dcmpnd.c:392 -msgid "Choose a Turnout/Structure to replace:" -msgstr "Valitse vaihde/rakennus korvataksesi:" +#: ../bin/cprint.c:102 +msgid "Landscape" +msgstr "Vaaka" -#: ../bin/dcmpnd.c:431 -msgid "Choose another Turnout/Structure to replace:" -msgstr "Valitse toinen vaihde/rakennus korvataksesi:" +#: ../bin/cprint.c:103 ../bin/cselect.c:1922 ../bin/cselect.c:1926 +#: ../bin/cswitchmotor.c:87 ../bin/cswitchmotor.c:106 +#: ../bin/cswitchmotor.c:217 ../bin/dbench.c:78 ../bin/dease.c:64 +#: ../bin/doption.c:100 ../bin/doption.c:102 ../bin/doption.c:200 +#: ../bin/macro.c:1233 +msgid "Normal" +msgstr "Normaali" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:451 -msgid "Choose commands to be sticky" -msgstr "Valitse pysyvät komennot" +#: ../bin/cprint.c:103 ../bin/cswitchmotor.c:88 ../bin/cswitchmotor.c:107 +#: ../bin/cswitchmotor.c:218 ../bin/ctrain.c:877 ../bin/ctrain.c:1187 +msgid "Reverse" +msgstr "Taakse" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:367 -msgid "Choose english (inches) or metric (centimeters)" -msgstr "" -"Valitse englantilaiset (tuumat) tai metrijärjestelmän (sentit) mukaiset mitat" +#: ../bin/cprint.c:104 +msgid "Engineering Data" +msgstr "Suunnittelutiedot" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:528 -msgid "Choose paper size" -msgstr "Valitse paperin koko" +#: ../bin/cprint.c:105 +msgid "Print Registration Marks" +msgstr "Tulosta kohdistusmerkinnät" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:529 -msgid "Choose printer" -msgstr "Valitse tulostin" +#: ../bin/cprint.c:106 +msgid "Ignore Page Margins" +msgstr "Ei marginaaleja" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:110 -msgid "Choose which commands are sticky" -msgstr "Valitse mitkä komennot ovat pysyviä" +#: ../bin/cprint.c:107 +msgid "Print Snap Grid" +msgstr "Tulosta kohdistusruudukko" -#: ../bin/cdraw.c:437 ../bin/cdraw.c:829 ../bin/cdraw.c:830 ../bin/cdraw.c:831 -msgid "Circle" -msgstr "Ympyrä" +#: ../bin/cprint.c:108 +msgid "Print Rulers" +msgstr "Tulosta viivaimet" -#: ../bin/cdraw.c:1039 -msgid "Circle Center" -msgstr "Ympyrä keskustasta" +#: ../bin/cprint.c:109 ../../../../build/work/app/bin/bllnhlp.c:424 +msgid "Print Roadbed Outline" +msgstr "Tulosta ratapenkan ulkoreuna" -#: ../bin/cdraw.c:1042 -msgid "Circle Filled Center" -msgstr "Täytetty ympyrä keskustasta" +#: ../bin/cprint.c:110 +#, fuzzy +msgid "Print Centerline below Scale 1:1" +msgstr "Tulosta keskiviiva" -#: ../bin/cdraw.c:1041 -msgid "Circle Filled Tangent" -msgstr "Täytetty ympyrä kehältä" +#: ../bin/cprint.c:118 +msgid "Print Scale" +msgstr "Tulostuksen mittakaava" -#: ../bin/cdraw.c:1065 -msgid "Circle Lines" -msgstr "Ympyrät" +#: ../bin/cprint.c:119 +msgid "Page Width" +msgstr "Sivun leveys" -#: ../bin/ccurve.c:524 -msgid "Circle Radius" -msgstr "Ympyrän säde" +#: ../bin/cprint.c:120 +msgid "Max" +msgstr "Max" -#: ../bin/cdraw.c:1038 -msgid "Circle Tangent" -msgstr "Ympyrä kehältä" +#: ../bin/cprint.c:121 +msgid "Height" +msgstr "Korkeus" -#: ../bin/ccurve.c:718 ../bin/tcurve.c:609 -msgid "Circle Track" -msgstr "Ympyrärata" +#: ../bin/cprint.c:122 +msgid "Snap Shot" +msgstr "Yhdelle sivulle" -#: ../bin/ccurve.c:718 -msgid "Circle Tracks" -msgstr "Ympyräradat" +#: ../bin/cprint.c:123 +msgid "Page Format" +msgstr "Sivun muotoilu" -#: ../bin/ccurve.c:721 -msgid "Circle from Center" -msgstr "Ympyrä keskustasta" +#: ../bin/cprint.c:124 +msgid "Print Order" +msgstr "Tulostusjärjestys" -#: ../bin/ccurve.c:720 -msgid "Circle from Tangent" -msgstr "Ympyrä kehältä" +#: ../bin/cprint.c:139 ../bin/ctrain.c:185 ../bin/dcar.c:1980 +msgid "Width" +msgstr "Leveys" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:26 -msgid "Circle to circle" -msgstr "Ympyrä - ympyrä" +#: ../bin/cprint.c:141 ../bin/csnap.c:542 +msgid "Y" +msgstr "Y" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:17 -msgid "Circles" -msgstr "Ympyrät" +#: ../bin/cprint.c:142 ../bin/dcar.c:1961 +msgid "Reset" +msgstr "Palauta" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:252 -msgid "" -"Circles can be drawn by clicking on the center or edge and dragging to set " -"the radius.\n" -msgstr "" -"Ympyrät voidaan piirtää esimerkiksi klikkaamalla haluttua keskipistettä ja " -"asettamalla ympyrän säde raahaamalla.\n" +#: ../bin/cprint.c:144 +msgid "Setup" +msgstr "Asetukset" -#: ../bin/cprint.c:137 ../bin/misc.c:580 ../bin/cprofile.c:548 +#: ../bin/cprint.c:145 ../bin/cprofile.c:569 ../bin/misc.c:591 msgid "Clear" msgstr "Tyhjennä" -#: ../bin/misc.c:2261 ../bin/cselect.c:456 -msgid "Clear Elevations" -msgstr "Poista korkeusmääritykset" +#: ../bin/cprint.c:147 ../bin/cprint.c:588 +msgid "0 pages" +msgstr "0 sivua" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:416 -msgid "Clear the profile" -msgstr "Tyhjennä profiilikäyrä" +#: ../bin/cprint.c:211 ../bin/cprint.c:260 +#, c-format +msgid "%d pages" +msgstr "%d sivua" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:472 -msgid "Click and Shift-Left-Click on the two End-Points.\n" -msgstr "" -"Klikkaa Yhdistä ja sen jälkeen vaihto-näppäintä painettuna klikkaa hiiren " -"vasemmalla painikkeella yhdistettäviä päätepisteitä.\n" +#: ../bin/cprint.c:380 +#, fuzzy, c-format +msgid "PrintScale 1:%ld Room %s x %s Model Scale %s File %s" +msgstr "Tulostusmittakaava %ld:1 Huone %s x %s Mittakaava %s Tiedosto %s" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:274 -msgid "Click Step now for the next message.\n" -msgstr "" -"Klikkaa nyt Seuraava vaihe -painiketta katsoaksesi seuraavan viestin.\n" +#: ../bin/cprint.c:669 +msgid "1 page" +msgstr "1 sivu" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:128 -msgid "Click Step to return to XTrackCAD.\n" -msgstr "" -"Paina seuraava vaihe, seuraava tai lopeta painiketta palataksesi XTrackCADin " -"normaaliin tilaan.\n" +#: ../bin/cprint.c:1039 ../bin/cprofile.c:570 ../bin/ctodesgn.c:1720 +#: ../bin/denum.c:55 +msgid "Print" +msgstr "Tulosta" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:294 -msgid "Click and drag on one of the Red arrows to complete the Curve.\n" -msgstr "Raahaa nuolesta asetellaksesi kaarre oikean muotoiseksi.\n" +#: ../bin/cprint.c:1061 +msgid "Select pages to print, or drag to move print grid" +msgstr "Valitse tulostettavat sivut tai siirrä tulostusruudukkoa raahaamalla" -#: ../bin/ccurve.c:533 -msgid "Click on Circle Center" -msgstr "Aseta ympyrän keskipiste" +#: ../bin/cprint.c:1160 +msgid "Print..." +msgstr "Tulosta..." -#: ../bin/ccurve.c:529 -msgid "Click on Circle Edge" -msgstr "Aseta ympyrän kehän piste" +#: ../bin/cprofile.c:477 ../bin/cprofile.c:1279 ../bin/cprofile.c:1379 +#: ../../../../build/work/app/bin/bllnhlp.c:104 +#: ../../../../build/work/app/i18n/custmsg.h:40 +msgid "Profile" +msgstr "Profiili" -#: ../bin/cjoin.c:408 ../bin/cjoin.c:858 -msgid "Click on a selected End-Point" -msgstr "Valitun raideosan päätepiste" +#: ../bin/cprofile.c:493 +#, c-format +msgid "%s Profile: %s" +msgstr "%s Profiili: %s" -#: ../bin/cjoin.c:407 ../bin/cjoin.c:857 -msgid "Click on an unselected End-Point" -msgstr "Valitsemattoman raideosan päätepiste" +#: ../bin/cprofile.c:641 ../bin/cprofile.c:651 +#, c-format +msgid "Elev = %0.1f" +msgstr "Korkeus = %0.1f" -#: ../bin/cselect.c:1180 -msgid "Click on selected object to align" -msgstr "Klikkaa valittua objektia kohdistaaksesi" +#: ../bin/cprofile.c:653 +#, c-format +msgid "Elev=%0.2f %0.1f%%" +msgstr "Korkeus=%0.2f %0.1f%%" -#: ../bin/cselect.c:1327 -msgid "Click on the 2nd Unselected object" -msgstr "Klikkaa valitsematonta objektia" +#: ../bin/cprofile.c:657 +#, c-format +msgid "%0.1f%% Elev = %0.2f" +msgstr "%0.1f%% Korkeus = %0.2f" -#: ../bin/fileio.c:1421 -msgid "Clipboard" -msgstr "Leikepöytä" +#: ../bin/cprofile.c:661 +#, c-format +msgid "%0.1f%% Elev = %0.2f %0.1f%%" +msgstr "%0.1f%% Korkeus = %0.2f %0.1f%%" -#: ../bin/param.c:2555 ../bin/cturnout.c:2272 -msgid "Close" -msgstr "Sulje" +#: ../bin/cprofile.c:672 ../bin/cprofile.c:1226 +msgid "Profile Command" +msgstr "Profiili komento" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:12 -msgid "Closes the dialog" -msgstr "Sulkee ikkunan" +#: ../bin/cprofile.c:680 ../bin/cprofile.c:1284 +msgid "Drag to change Elevation" +msgstr "Muuta korkeutta raahaamalla" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:504 -msgid "Closes the window and returns to the Turnout Selection window" -msgstr "Sulkee ikkunan" +#: ../bin/cprofile.c:747 +msgid "Select a Defined Elevation to start Profile" +msgstr "Valitse määritelty korkeus aloittaaksesi profiili" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:524 -msgid "Closes this dialog" -msgstr "Sulkee tämän ikkunan" +#: ../bin/cprofile.c:749 +msgid "Select a Defined Elevation to extend Profile" +msgstr "Valitse määritelty korkeus laajentaaksesi profiilia" -#: ../bin/misc.c:2285 -msgid "Co&mmand ..." -msgstr "Komennot ..." +#: ../bin/cprofile.c:1296 +msgid "Select a Defined Elevation to start profile" +msgstr "Valitse määritelty korkeus aloittaaksesi profiili" -#: ../bin/doption.c:557 ../bin/ctodesgn.c:149 ../bin/dlayer.c:314 -#: ../bin/dcar.c:1968 ../bin/cdraw.c:194 ../bin/cdraw.c:805 ../bin/cdraw.c:807 -#: ../bin/cdraw.c:882 ../bin/cdraw.c:906 -msgid "Color" -msgstr "Väri" +#: ../bin/cprofile.c:1381 +msgid "Define" +msgstr "Määrittele" -#: ../bin/doption.c:207 -msgid "Color Layers" -msgstr "Väritys tason mukaan" +#: ../bin/cpull.c:436 ../bin/cpull.c:581 +#, c-format +msgid "%d tracks moved" +msgstr "%d raideosaa siirretty" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:294 -msgid "Color of Benchwork" -msgstr "Runkorakenteen väri" +#: ../bin/cpull.c:471 +msgid "Pull Tracks" +msgstr "Liitä raiteet" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:446 -msgid "Color of Exceptional tracks" -msgstr "Erityisraiteiden väri" +#: ../bin/cpull.c:545 +msgid "Tighten Tracks" +msgstr "Yhdistä raiteet" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:500 -msgid "Color of Roadbed lines" -msgstr "Ratapenkan viivan väri" +#: ../bin/cpull.c:598 +msgid "Select first End-Point to connect" +msgstr "Valitse ensimmäinen yhdistettävä päätepiste" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:339 -msgid "Color of layer" -msgstr "Tason väri" +#: ../bin/cpull.c:609 +msgid "Select second End-Point to connect" +msgstr "Valitse toinen yhdistettävä päätepiste" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:292 -msgid "Color of the lines" -msgstr "Viivojen väri" +#: ../bin/cpull.c:659 +msgid "Connect Sectional Tracks" +msgstr "Liitä palaraiteet" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:447 -msgid "Color of track ties" -msgstr "Ratapölkkyjen väri" +#: ../bin/cruler.c:151 ../../../../build/work/app/i18n/custmsg.h:51 +msgid "Ruler" +msgstr "Viivain" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:445 -msgid "Color of tracks on the Profile path" -msgstr "Profiilin muokkauksessa olevat raiteet" +#: ../bin/cselect.c:313 +msgid "Change Track Width" +msgstr "Muuta raiteen pituutta" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:280 -msgid "Color tracks or other objects by layer" -msgstr "Väritä raiteet ja muut objektit tasojen mukaan" +#: ../bin/cselect.c:334 +msgid "Delete Tracks" +msgstr "Poista raiteita" -#: ../bin/dcar.c:4630 ../bin/dcar.c:4751 -msgid "Comma-Separated-Values|*.csv" -msgstr "Pilkulla erotetut arvot|*.csv" +#: ../bin/cselect.c:386 +msgid "Hide Tracks (Tunnel)" +msgstr "Piilota raiteet (tunneli)" -#: ../bin/doption.c:327 -msgid "Command Options" -msgstr "Komentojen asetukset" +#: ../bin/cselect.c:425 ../bin/misc.c:2060 +msgid "Move To Current Layer" +msgstr "Siirrä nykyiselle tasolle" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:24 -msgid "Command Options dialog" -msgstr "Komentojen asetukset" +#: ../bin/cselect.c:464 ../bin/misc.c:2175 +msgid "Clear Elevations" +msgstr "Poista korkeusmääritykset" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:164 -msgid "Command buttons" -msgstr "Komentopainikkeet" +#: ../bin/cselect.c:508 +msgid "Add Elevations" +msgstr "Päätepisteiden korkeudet" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:98 -msgid "Command recorder" -msgstr "Komentojen nauhoitus" +#: ../bin/cselect.c:523 +msgid "Refresh Compound" +msgstr "Päivitä vaihteet/rakennukset" + +#: ../bin/cselect.c:559 ../bin/dcar.c:4078 ../bin/dcar.c:4083 +#: ../bin/dcustmgm.c:51 ../bin/layout.c:239 +msgid "Scale" +msgstr "Mittakaava" -#: ../wlib/gtklib/psprint.c:1293 -msgid "Command: " -msgstr "Komento: " +#: ../bin/cselect.c:559 ../bin/cselect.c:584 +msgid "Ratio" +msgstr "Suhde" -#: ../bin/misc.c:2079 ../bin/misc.c:2080 -msgid "Commands" -msgstr "Komennot" +#: ../bin/cselect.c:568 +msgid "Do not resize track" +msgstr "Älä muuta raiteiden kokoa" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:302 -msgid "Complete easement selection" -msgstr "Hyväksy kaarreloivennukse asetukset ja sulje ikkuna" +#: ../bin/cselect.c:572 +msgid "Rescale by:" +msgstr "Muunnos:" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:457 -msgid "Complete structure placement" -msgstr "Lisää rakennus" +#: ../bin/cselect.c:574 +msgid "From:" +msgstr "Alkuperäinen:" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:324 -msgid "Completes the grid specification" -msgstr "Hyväksy ruudukon asetukset" +#: ../bin/cselect.c:578 +msgid "To: " +msgstr "Uusi:" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:305 -msgid "Compute elevation based on neighbors" -msgstr "Laske korkeudet viereisten perusteella" +#: ../bin/cselect.c:643 +msgid "Rescale Tracks" +msgstr "Muuta raiteiden mittakaavaa" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:306 -msgid "Compute grade based on neighbors" -msgstr "Laske nousukulma viereisten perusteella" +#: ../bin/cselect.c:774 ../../../../build/work/app/i18n/custmsg.h:47 +msgid "Rescale" +msgstr "Mittakaavan muutos" -#: ../bin/celev.c:45 -msgid "Computed" -msgstr "Laskettu" +#: ../bin/cselect.c:801 +msgid "Draw moving track normally" +msgstr "Piirrä liikuteltavat raiteet normaalisti" -#: ../bin/dcar.c:1992 ../bin/dcar.c:4072 ../bin/dcar.c:4077 -msgid "Condition" -msgstr "Kunto" +#: ../bin/cselect.c:802 +msgid "Draw moving track simply" +msgstr "Piirrä liikuteltavat raiteet yksinkertaistetuna" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:200 -msgid "Condition of car" -msgstr "Vaunun tai veturin kunto" +#: ../bin/cselect.c:803 +msgid "Draw moving track as end-points" +msgstr "Piirrä liikuteltavat raiteet päätepisteinä" -#: ../bin/cturnout.c:358 -msgid "Connect Adjustable Tracks" -msgstr "Yhdistä säädettävä raide" +#: ../bin/cselect.c:1085 +msgid "Cornu too tight - it was deleted" +msgstr "" -#: ../bin/cpull.c:661 -msgid "Connect Sectional Tracks" -msgstr "Liitä palaraiteet" +#: ../bin/cselect.c:1105 +msgid "Cornu selected too tight after move - it was left alone" +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:48 -msgid "Connect and Tighten - a siding" -msgstr "Liittäminen ja tiukennus - sivuraide" +#: ../bin/cselect.c:1145 +msgid "Move To Join" +msgstr "Siirrä yhdistääksesi" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:49 -msgid "Connect and Tighten - figure-8" -msgstr "Liittäminen ja tiukennus - kahdeksikko" +#: ../bin/cselect.c:1181 +msgid "Drag to move selected tracks" +msgstr "Siirrä valitut raideosat raahaamalla" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:26 -msgid "Connect two tracks" -msgstr "Liitä kaksi raidetta" +#: ../bin/cselect.c:1188 +msgid "Move Tracks" +msgstr "Siirrä raiteita" -#: ../bin/track.c:1867 ../bin/cjoin.c:704 -msgid "Connecting " -msgstr "Yhdistetään " +#: ../bin/cselect.c:1245 +msgid "Click on selected object to align" +msgstr "Klikkaa valittua objektia kohdistaaksesi" + +#: ../bin/cselect.c:1273 +msgid "Drag to rotate selected tracks" +msgstr "Pyöritä valittuja raideosia raahaamalla" + +#: ../bin/cselect.c:1282 ../bin/cselect.c:1438 +msgid "Rotate Tracks" +msgstr "Pyöritä raiteita" -#: ../bin/track.c:1549 ../bin/track.c:1553 +#: ../bin/cselect.c:1321 ../bin/cselect.c:1352 #, c-format -msgid "Connecting a non-track(%d) to (%d)" -msgstr "Muun kuin raideosan (%d) yhdistäminen raiteeseen (%d)" +msgid "Angle %0.3f" +msgstr "Kulma %0.3f" -#: ../bin/cjoin.c:363 +#: ../bin/cselect.c:1382 #, c-format -msgid "Connecting track is too short by %0.3f" -msgstr "Yhdysraide on %0.3f liian lyhyt" +msgid " Angle %0.3f #%ld" +msgstr " Kulma %0.3f #%ld" -#: ../bin/doption.c:365 -msgid "Connection Angle" -msgstr "Liitoskulma" +#: ../bin/cselect.c:1384 +#, c-format +msgid " Angle %0.3f" +msgstr " Kulma %0.3f" -#: ../bin/doption.c:364 -msgid "Connection Distance" -msgstr "Liitosetäisyys" +#: ../bin/cselect.c:1395 +msgid "Click on the 2nd Unselected object" +msgstr "Klikkaa valitsematonta objektia" -#: ../bin/dcustmgm.c:191 -msgid "Contents Label" -msgstr "Sisältömerkintä" +#: ../bin/cselect.c:1450 +msgid "Toggle Label" +msgstr "Näytä/piilota merkintä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:227 -msgid "Contents Label for new Parameter file" -msgstr "Parametritiedoston sisältömerkintä" +#: ../bin/cselect.c:1479 +msgid "Select and drag a description" +msgstr "Valitse ja raahaa merkintöjä" -#: ../wlib/gtklib/gtkfont.c:103 ../wlib/gtklib/gtkfont.c:161 -#: ../wlib/gtklib/gtkfont.c:333 ../wlib/gtklib/gtkfont.c:337 -#: ../wlib/gtklib/gtkfont.c:434 ../wlib/gtklib/wpref.c:223 -#: ../wlib/gtklib/wpref.c:230 ../bin/dbench.c:142 ../bin/track.c:917 -#: ../bin/track.c:1259 ../bin/track.c:1549 ../bin/track.c:1553 -#: ../bin/track.c:1573 ../bin/track.c:1635 ../bin/fileio.c:240 -#: ../bin/fileio.c:528 ../bin/fileio.c:646 ../bin/fileio.c:739 -#: ../bin/fileio.c:926 ../bin/fileio.c:1202 ../bin/fileio.c:1338 -#: ../bin/fileio.c:1421 ../bin/fileio.c:1461 ../bin/dcar.c:4225 -#: ../bin/dcar.c:4409 ../bin/dcar.c:4419 ../bin/dcar.c:4466 ../bin/dcar.c:4473 -#: ../bin/dcar.c:4491 ../bin/dcar.c:4504 ../bin/dcar.c:4509 ../bin/dcar.c:4538 -#: ../bin/dcar.c:4699 ../bin/macro.c:163 ../bin/macro.c:831 ../bin/macro.c:847 -#: ../bin/macro.c:1150 ../bin/param.c:2040 -msgid "Continue" -msgstr "Jatka" +#: ../bin/cselect.c:1521 +msgid "Move Label" +msgstr "Siirrä merkintöjä" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:60 -msgid "Control Panels (New)" -msgstr "Ohjauspaneelit" +#: ../bin/cselect.c:1546 +msgid "Show Description" +msgstr "Näytä kuvaus" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:25 -msgid "Controls colors" -msgstr "Valitse värit" +#: ../bin/cselect.c:1628 +msgid "Drag to mark mirror line" +msgstr "Vedä hiirellä peilauslinja" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:275 -msgid "Controls the drawing of End-Points" -msgstr "" -"Näytetäänkö raiteiden päätepisteet kaikissa raiteissa, vaihteissa vai ei " -"missään" +#: ../bin/cselect.c:1643 +#, c-format +msgid "Angle %0.2f" +msgstr "Kulma %0.2f" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:274 -msgid "Controls the drawing of hidden tracks" -msgstr "Piilossa olevien raiteiden piirtotapa" +#: ../bin/cselect.c:1648 +msgid "Flip Tracks" +msgstr "Peilaa raiteet" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:389 -msgid "Controls the reduction (scale) of the printout" -msgstr "Tulostuksen mittakaava" +#: ../bin/cselect.c:1811 +msgid "Select tracks" +msgstr "Valitse raideosat" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:114 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:459 -msgid "Controls the size of the entered text" -msgstr "Muuttaa syötettävän tekstin kokoa" +#: ../bin/cselect.c:1909 ../bin/dcar.c:1544 ../bin/doption.c:205 +#: ../../../../build/work/app/i18n/custmsg.h:13 +msgid "Select" +msgstr "Valitse" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:465 -msgid "Controls which Command Buttons are displayed" -msgstr "Valitse työkalurivillä näytettävät painikkeet" +#: ../bin/cselect.c:1923 ../bin/cselect.c:1927 ../bin/doption.c:201 +msgid "Simple" +msgstr "Yksinkertainen" -#: ../bin/misc.c:2093 -msgid "Copy" -msgstr "Kopioi" +#: ../bin/cselect.c:1924 ../bin/cselect.c:1928 +msgid "End Points" +msgstr "Päätepisteet" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:91 -msgid "Copy objects from clipboard" -msgstr "Liitä objektit leikepöydältä" +#: ../bin/cselect.c:1931 +msgid "Align" +msgstr "Kohdista" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:231 -msgid "Copy selected entries to Parameter File" -msgstr "Siirrä valitut kohteet parametritiedostoon" +#: ../bin/cselect.c:1952 ../bin/misc.c:1990 +msgid "Tunnel" +msgstr "Tunneli" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:27 -msgid "Copy selected objects to clipboard" -msgstr "Kopioi valitut objektit leikepöydälle" +#: ../bin/cselect.c:1961 +msgid "Move Description" +msgstr "Siirrä merkintöjä" -#: ../bin/param.c:113 -msgid "Coral" -msgstr "" +#: ../bin/cselect.c:1968 ../bin/misc.c:1988 +msgid "Move" +msgstr "Siirrä" -#: ../bin/ctodesgn.c:497 ../bin/dlayer.c:322 -msgid "Count" -msgstr "Lukumäärä" +#: ../bin/cselect.c:1970 ../bin/misc.c:1764 ../bin/misc.c:1989 +#: ../../../../build/work/app/i18n/custmsg.h:58 +msgid "Rotate" +msgstr "Pyöritä" -#: ../bin/dcar.c:1978 -msgid "Coupled Length" -msgstr "Pituus kytkimineen" +#: ../bin/cselect.c:1972 ../bin/dcar.c:1963 +#: ../../../../build/work/app/i18n/custmsg.h:59 +msgid "Flip" +msgstr "Peilikuva" -#: ../bin/dcar.c:1980 ../bin/dcar.c:3946 -msgid "Coupler Length" -msgstr "Kytkinten ulkonema" +#: ../bin/csensor.c:197 +#, fuzzy +msgid "Change Sensor" +msgstr "Muuta mittakaavaa" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:195 -msgid "Coupler Length from end of car" -msgstr "Kytkinten ulkonema vaunun tai veturin päästä" +#: ../bin/csensor.c:243 ../bin/csensor.c:556 +msgid "Sensor" +msgstr "" -#: ../bin/dcar.c:1976 -msgid "Coupler Mount" -msgstr "Kytkimien sijoitus" +#: ../bin/csensor.c:374 +#, fuzzy +msgid "Create Sensor" +msgstr "Luo runkorakenne" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:193 -msgid "Coupler are mounted on body or truck" -msgstr "Onko kytkimet kiinnitetty runkoon vai teleihin" +#: ../bin/csensor.c:377 +#, fuzzy +msgid "Modify Sensor" +msgstr "Muokkaa raidetta" -#: ../bin/ctrain.c:707 ../bin/ctrain.c:730 -msgid "Crashed" -msgstr "Törmännyt" +#: ../bin/csensor.c:410 +#, fuzzy +msgid "Edit sensor" +msgstr "Muokkaa -valikko" -#: ../bin/ccurve.c:615 -msgid "Create Circle Track" -msgstr "Luo ympyrärata" +#: ../bin/csensor.c:446 +#, fuzzy +msgid "Place sensor" +msgstr "Aseta uusi vaihde" -#: ../bin/ccurve.c:322 -msgid "Create Curved Track" -msgstr "Luo kaareva raideosa" +#: ../bin/csignal.c:237 +#, fuzzy +msgid "Number Of Heads" +msgstr "Numerot" -#: ../bin/chndldto.c:277 -msgid "Create Hand Laid Turnout" -msgstr "Luo käsin aseteltu vaihde" +#: ../bin/csignal.c:269 +#, fuzzy +msgid "Change Signal" +msgstr "Muuta mittakaavaa" -#: ../bin/ccurve.c:608 -msgid "Create Helix Track" -msgstr "Luo helix raide" +#: ../bin/csignal.c:303 +#, c-format +msgid "(%d [%s]): Layer=%d, %d heads at %0.3f,%0.3f A%0.3f" +msgstr "" -#: ../bin/drawgeom.c:71 ../bin/drawgeom.c:86 ../bin/cdraw.c:770 -msgid "Create Lines" -msgstr "Luo viivoja" +#: ../bin/csignal.c:314 ../bin/csignal.c:885 +msgid "Signal" +msgstr "" -#: ../bin/misc.c:1698 ../bin/misc.c:1727 -msgid "Create Misc Buttons" -msgstr "Piirto" +#: ../bin/csignal.c:492 +#, fuzzy +msgid "Number of Heads" +msgstr "Numerot" -#: ../bin/cparalle.c:136 -msgid "Create Parallel Track" -msgstr "Luo rinnakkainen raide" +#: ../bin/csignal.c:497 +#, fuzzy +msgid "Edit Aspect" +msgstr "Muokkaa -valikko" -#: ../bin/ccurve.c:314 ../bin/cstraigh.c:83 -msgid "Create Straight Track" -msgstr "Luo suora raideosa" +#: ../bin/csignal.c:499 +msgid "Add Aspect" +msgstr "" -#: ../bin/ctext.c:170 ../bin/ctext.c:208 -msgid "Create Text" -msgstr "Luo teksti" +#: ../bin/csignal.c:501 +#, fuzzy +msgid "Delete Aspect" +msgstr "Poista valitut objektit" -#: ../bin/misc.c:1693 -msgid "Create Track Buttons" -msgstr "Luo raiteet" +#: ../bin/csignal.c:514 +msgid "Aspect Index" +msgstr "" -#: ../bin/cturntbl.c:796 -msgid "Create Turntable" -msgstr "Luo kääntöpöytä" +#: ../bin/csignal.c:529 +#, fuzzy +msgid "Create Signal" +msgstr "Luo viivoja" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:232 -msgid "Create a New part or prototype" -msgstr "Luo uusi malli tai esikuva" +#: ../bin/csignal.c:533 +#, fuzzy +msgid "Modify Signal" +msgstr "Muokkaa raidetta" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:41 -msgid "Create a box" -msgstr "Luo nelikulmio" +#: ../bin/csignal.c:640 +#, fuzzy +msgid "Edit aspect" +msgstr "Muokkaa -valikko" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:43 -msgid "Create a circle" -msgstr "Luo ympyrä" +#: ../bin/csignal.c:687 +#, fuzzy, c-format +msgid "Are you sure you want to delete the %d aspect(s)" +msgstr "Haluatko varmasti poistaa nämä %d vaunua/veturia?" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:48 -msgid "Create a curved line" -msgstr "Luo kaari" +#: ../bin/csignal.c:708 +#, fuzzy +msgid "Edit signal" +msgstr "Muokkaa -valikko" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:49 -msgid "Create a curved line from End" -msgstr "Piirrä kaari päätepisteestä" +#: ../bin/csignal.c:770 +msgid "Place base of signal" +msgstr "" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:50 -msgid "Create a curved line from center" -msgstr "Piirrä kaari keskipisteestä" +#: ../bin/csignal.c:775 +#, fuzzy +msgid "Drag to orient signal" +msgstr "Aseta kulma raahaamalla" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:51 -msgid "Create a curved line from chord" -msgstr "Piirrä kaari·päätepisteiden·välille" +#: ../bin/csnap.c:523 +msgid "Horz" +msgstr "Vaaka" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:52 -msgid "Create a curved line from tangent" -msgstr "Piirrä kaari kehältä" +#: ../bin/csnap.c:525 +msgid "Spacing" +msgstr "Väli" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:53 -msgid "Create a dimension line" -msgstr "Luo mittajana" +#: ../bin/csnap.c:527 +msgid "Divisions" +msgstr "Jako" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:54 -msgid "Create a filled box" -msgstr "Piirrä täytetty nelikulmio" +#: ../bin/csnap.c:530 +msgid "Enable" +msgstr "Salli" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:55 -msgid "Create a filled circle" -msgstr "Luo täytetty ympyrä" +#: ../bin/csnap.c:531 +msgid "Vert" +msgstr "Pysty" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:59 -msgid "Create a filled polygon" -msgstr "Luo täytetty monikulmio" +#: ../bin/csnap.c:540 ../bin/dease.c:73 +msgid "X" +msgstr "X" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:76 -msgid "Create a hand-laid turnout" -msgstr "Luo käsin aseteltu vaihde" +#: ../bin/csnap.c:544 +msgid "A" +msgstr "K" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:17 -msgid "Create a new Car/Loco description" -msgstr "Luo uusi veturin tai vaunun määrittely" +#: ../bin/csnap.c:547 +msgid "Show" +msgstr "Näytä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:206 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:207 -msgid "Create a new car Part or Prototype definitions" -msgstr "Luo uusi malli tai esikuva" +#: ../bin/csnap.c:717 ../bin/doption.c:448 +msgid "Snap Grid" +msgstr "Kohdistusruudukko" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:122 -msgid "Create a new turnout definition" -msgstr "Luo uusi raideosan määrittely" +#: ../bin/csnap.c:802 +msgid "Change Grid..." +msgstr "Kohdistusruudukko..." -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:89 -msgid "Create a parallel track" -msgstr "Luo rinnakkainen raide" +#: ../bin/csplit.c:41 +msgid "Set Block Gaps" +msgstr "Aseta lohkojen välit" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:60 -msgid "Create a polyline" -msgstr "Luo monikulmio" +#: ../bin/csplit.c:68 +msgid "Select track to split" +msgstr "Valitse pilkottava raide" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:61 -msgid "Create a straight line" -msgstr "Luo suora viiva" +#: ../bin/csplit.c:84 +#, fuzzy +msgid "Can't Split that Track" +msgstr "Pilko raide" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:75 -msgid "Create a structure from a Group of objects" -msgstr "Luo rakennus valituista objekteista" +#: ../bin/csplit.c:108 ../bin/dbench.c:69 ../bin/dbench.c:80 +msgid "Left" +msgstr "Vasen" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:219 -msgid "Create a text list of the Car Items" -msgstr "Tallenna tekstitiedostoon" +#: ../bin/csplit.c:109 ../bin/dbench.c:70 ../bin/dbench.c:79 +msgid "Right" +msgstr "Oikea" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:77 -msgid "Create a track helix" -msgstr "Luo helix raide (kierrenousu)" +#: ../bin/csplit.c:110 ../bin/csplit.c:115 +msgid "Both" +msgstr "Molemmat" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:40 -msgid "Create benchwork" -msgstr "Luo runkorakenne" +#: ../bin/csplit.c:113 +msgid "Top" +msgstr "Päällimmäiseksi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:28 -msgid "Create curved track from center" -msgstr "Luo kaareva raideosa alkaen keskipisteestä" +#: ../bin/csplit.c:114 +msgid "Bottom" +msgstr "Alimmaiseksi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:29 -msgid "Create curved track from chord" -msgstr "Luo kaareva raideosa päätepisteiden välille" +#: ../bin/cstraigh.c:58 +#, fuzzy +msgid "" +"Place 1st end point of Straight track + Shift -> snap to unconnected endpoint" +msgstr "Aseta suoran raiteen 1. päätepiste" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:30 -msgid "Create curved track from end-point" -msgstr "Luo kaareva raideosa alkaen päätepisteestä" +#: ../bin/cstraigh.c:74 +msgid "" +"No Unconnected end-point on track - Try again or release shift and click" +msgstr "" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:32 -msgid "Create curved track from tangent" -msgstr "Luo kaareva raideosa alkaen kehältä" +#: ../bin/cstraigh.c:80 +msgid "Not on a Track - Try again or release shift and click" +msgstr "" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:20 -msgid "Create fixed radius track circle" -msgstr "Määriteltysäteinen ympyrärata" +#: ../bin/cstraigh.c:89 +msgid "Drag to place 2nd end point" +msgstr "Raahaa asettaaksesi 2. päätepiste" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:111 -msgid "Create straight track" -msgstr "Luo suora raideosa" +#: ../bin/cstraigh.c:110 +#, c-format +msgid "Straight Track Length=%s Angle=%0.3f" +msgstr "Suora raideosa Pituus=%s Kulma=%0.3f" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:19 -msgid "Create track circle from center" -msgstr "Piirrä ympyrärata keskipisteestä" +#: ../bin/cstraigh.c:158 ../bin/tstraigh.c:267 +msgid "Straight Track" +msgstr "Suora raide" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:22 -msgid "Create track circle from tangent" -msgstr "Piirrä ympyrärata kehältä" +#: ../bin/cstruct.c:72 ../bin/cturnout.c:78 ../bin/doption.c:100 +#: ../bin/doption.c:208 +msgid "Hide" +msgstr "Piilota" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:330 -msgid "Creates a new Structure (or Turnout)" -msgstr "Luo uuden rakennuksen (tai raideosan)" +#: ../bin/cstruct.c:327 ../bin/cstruct.c:354 +msgid "Pier Number" +msgstr "Pilarin numero" -#: ../wlib/gtklib/wpref.c:146 +#: ../bin/cstruct.c:439 #, c-format -msgid "Creating %s" -msgstr "Luodaan %s" +msgid "Scale %d:1" +msgstr "Mittakaava %d:1" -#: ../bin/ctodesgn.c:329 -msgid "Crossing" -msgstr "Risteys" +#: ../bin/cstruct.c:441 +#, c-format +msgid "Width %s" +msgstr "Leveys %s" -#: ../bin/misc.c:2159 -msgid "Cu&t" -msgstr "&Leikkaa" +#: ../bin/cstruct.c:443 +#, c-format +msgid "Height %s" +msgstr "Korkeus %s" -#: ../bin/dcar.c:4072 ../bin/dcar.c:4077 -msgid "Curr Price" -msgstr "Nykyinen hinta" +#: ../bin/cstruct.c:541 +msgid "Place Structure" +msgstr "Aseta rakennus" -#: ../bin/dcar.c:1990 ../../../../build/xtrkcad/app/bin/bllnhlp.c:199 -msgid "Current Price" -msgstr "Nykyinen hinta" +#: ../bin/cstruct.c:651 +msgid "Drag to place" +msgstr "Raahaa paikoilleen" -#: ../bin/dcar.c:3602 -msgid "Current Price is not valid" -msgstr "Nykyinen hinta ei ole kelvollinen" +#: ../bin/cstruct.c:679 +msgid "Drag to rotate" +msgstr "Raahaa pyörittääksesi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:481 -msgid "Current selected turnout, (displayed in the diagram window)" -msgstr "Valittu raideosa (kaaviokuva ikkunassa)" +#: ../bin/cstruct.c:700 +#, c-format +msgid "Angle = %0.3f" +msgstr "Kulma = %0.3f" -#: ../bin/cdraw.c:1034 -msgid "Curve Center" -msgstr "Kaari keskipisteestä" +#: ../bin/cstruct.c:786 +msgid "Select Structure and then drag to place" +msgstr "Valitse rakennus ja raahaa paikoilleen" -#: ../bin/cdraw.c:1035 -msgid "Curve Chord" -msgstr "Kaari jänteestä" +#: ../bin/cstruct.c:804 ../bin/cstruct.c:891 +msgid "" +"Left drag to move, right drag to rotate, or press Return or click Ok to " +"finalize" +msgstr "" +"Siirrä raahaamalla hiiren vasemmalla, pyöritä rahaamalla hiiren oikealla, " +"tai paina return tai klikkaa Ok kun valmis" -#: ../bin/cdraw.c:1032 -msgid "Curve End" -msgstr "Kaari päätepisteestä" +#: ../bin/cstruct.c:884 ../bin/cturnout.c:2541 +#, c-format +msgid "Place %s and draw into position" +msgstr "Aseta %s ja raahaa paikoilleen" -#: ../bin/cdraw.c:1033 -msgid "Curve Tangent" -msgstr "Kaari kehältä" +#: ../bin/cswitchmotor.c:89 ../bin/cswitchmotor.c:108 +#: ../bin/cswitchmotor.c:219 +#, fuzzy +msgid "Point Sense" +msgstr "Pisteitä" -#: ../bin/ccurve.c:711 -msgid "Curve Track" -msgstr "Kaareva raide" +#: ../bin/cswitchmotor.c:109 +#, fuzzy +msgid "Turnout Number" +msgstr "Tuotekoodi" -#: ../bin/cmodify.c:315 +#: ../bin/cswitchmotor.c:255 +#, fuzzy +msgid "Change Switch Motor" +msgstr "Muuta suuntaa" + +#: ../bin/cswitchmotor.c:316 +msgid "Switch motor" +msgstr "" + +#: ../bin/cswitchmotor.c:395 #, c-format -msgid "Curve Track: Radius=%s Length=%s Angle=%0.3f" -msgstr "Kaareva raideosa: Säde=%s Pituus=%s Kulma=%0.3f" +msgid "ResolveSwitchmotor: Turnout T%d: T%d doesn't exist" +msgstr "" -#: ../bin/ccurve.c:711 -msgid "Curve Tracks" -msgstr "Kaarevat raideosat" +#: ../bin/cswitchmotor.c:462 ../bin/cswitchmotor.c:625 +msgid "Switch motor must have a name!" +msgstr "" -#: ../bin/ccurve.c:714 -msgid "Curve from Center" -msgstr "Kaari keskipisteestä" +#: ../bin/cswitchmotor.c:466 +#, fuzzy +msgid "Create Switch Motor" +msgstr "Piirto" -#: ../bin/ccurve.c:715 -msgid "Curve from Chord" -msgstr "Kaari päätepisteiden välille" +#: ../bin/cswitchmotor.c:491 +#, fuzzy +msgid "Create switch motor" +msgstr "Luo suora raideosa" -#: ../bin/ccurve.c:712 -msgid "Curve from End-Pt" -msgstr "Kaari päätepisteestä" +#: ../bin/cswitchmotor.c:505 ../bin/cswitchmotor.c:536 +#: ../bin/cswitchmotor.c:568 +#, fuzzy +msgid "Select a turnout" +msgstr "Ensin valitsemme vaihteen.\n" -#: ../bin/ccurve.c:713 -msgid "Curve from Tangent" -msgstr "Kaari kehältä" +#: ../bin/cswitchmotor.c:512 +msgid "Not a turnout!" +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:25 -msgid "Curve to straight" -msgstr "Kaareva - suora" +#: ../bin/cswitchmotor.c:545 ../bin/cswitchmotor.c:576 +msgid "Not a switch motor!" +msgstr "" -#: ../bin/cdraw.c:825 ../bin/cdraw.c:826 ../bin/cdraw.c:827 ../bin/cdraw.c:828 -msgid "Curved" -msgstr "Kaareva" +#: ../bin/cswitchmotor.c:581 +#, c-format +msgid "Really delete switch motor %s?" +msgstr "" -#: ../bin/tcurve.c:1066 ../bin/tcurve.c:1098 -msgid "Curved " -msgstr "Kaareva " +#: ../bin/cswitchmotor.c:582 +msgid "Delete Switch Motor" +msgstr "" -#: ../bin/cdraw.c:445 -msgid "Curved Line" -msgstr "Kaari" +#: ../bin/cswitchmotor.c:629 +msgid "Modify Switch Motor" +msgstr "" -#: ../bin/drawgeom.c:306 +#: ../bin/cswitchmotor.c:655 +msgid "Edit switch motor" +msgstr "" + +#: ../bin/cswitchmotor.c:661 #, c-format -msgid "Curved Line: Radius=%s Angle=%0.3f Length=%s" -msgstr "Kaari: Säde=%s Kulma=%0.3f Pituus=%s" +msgid "Edit switch motor %d" +msgstr "" -#: ../bin/cdraw.c:1064 -msgid "Curved Lines" -msgstr "Kaaret" +#: ../bin/cswitchmotor.c:769 +msgid "Switch Motor" +msgstr "" -#: ../bin/ctodesgn.c:468 -msgid "Curved Section" -msgstr "Kaareva raideosa" - -#: ../bin/tcurve.c:612 -msgid "Curved Track" -msgstr "Kaareva raideosa" - -#: ../bin/tcurve.c:530 +#: ../bin/cswitchmotor.c:781 #, c-format -msgid "" -"Curved Track(%d): Layer=%d Radius=%s Length=%s Center=[%s,%s] EP=[%0.3f,%" -"0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]" +msgid "Deleting Switch Motor %s" msgstr "" -"Kaareva raideosa(%d): Taso=%d Säde=%s Pituus=%s Keskipiste=[%s,%s] Päätep.=[%" -"0.3f,%0.3f K%0.3f] [%0.3f,%0.3f K%0.3f]" -#: ../bin/ccurve.c:282 -#, c-format -msgid "Curved Track: Radius=%s Angle=%0.3f Length=%s" -msgstr "Kaareva raideosa: Säde=%s Kulma=%0.3f Pituus=%s" +#: ../bin/ctext.c:196 ../bin/ctext.c:235 +msgid "Create Text" +msgstr "Luo teksti" -#: ../bin/cjoin.c:164 -#, c-format -msgid "Curved Track: Radius=%s Length=%s" -msgstr "Kaareva raideosa: Säde=%s Pituus=%s" +#: ../bin/ctext.c:266 +msgid "Fonts..." +msgstr "Kirjasimet..." -#: ../bin/cjoin.c:250 -#, c-format -msgid "Curved Track: Radius=%s Length=%s Angle=%0.3f" -msgstr "Kaareva raideosa: Säde=%s Pituus=%s Kulma=%0.3f" +#: ../bin/ctodesgn.c:114 +msgid "Frog #" +msgstr "Risteysnumero" -#: ../bin/ctodesgn.c:230 -msgid "Curved Turnout" -msgstr "Kaareva vaihde" +#: ../bin/ctodesgn.c:114 +msgid "Degrees" +msgstr "Astetta" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:16 -msgid "Curved tracks" -msgstr "Kaarevat raiteet" +#: ../bin/ctodesgn.c:141 ../bin/ctodesgn.c:142 ../bin/ctodesgn.c:190 +#: ../bin/ctodesgn.c:213 ../bin/ctodesgn.c:215 ../bin/ctodesgn.c:251 +#: ../bin/ctodesgn.c:252 ../bin/ctodesgn.c:288 ../bin/ctodesgn.c:290 +#: ../bin/ctodesgn.c:505 +msgid "Offset" +msgstr "Siirtymä" -#: ../bin/tcurve.c:1103 -#, c-format -msgid "Curved: Radius=%s Length=%s Angle=%0.3f" -msgstr "Kaari: Säde=%s Pituus=%s Kulma=%0.3f" +#: ../bin/ctodesgn.c:150 ../bin/ctodesgn.c:1767 ../bin/ctodesgn.c:1768 +msgid "Left Description" +msgstr "Vasemman kuvaus" -#: ../bin/fileio.c:646 ../bin/dcar.c:2429 ../bin/dcar.c:2433 -msgid "Custom" -msgstr "Itse rakennettu" +#: ../bin/ctodesgn.c:151 ../bin/ctodesgn.c:154 +msgid " #" +msgstr " #" -#: ../bin/misc.c:2345 -msgid "Custom Management..." -msgstr "Omat raideosat ja kalusto..." +#: ../bin/ctodesgn.c:153 ../bin/ctodesgn.c:1766 +msgid "Right Description" +msgstr "Oikean kuvaus" -#: ../bin/dcustmgm.c:344 -msgid "Custom Update" -msgstr "Omat raideosat ja kalusto" +#: ../bin/ctodesgn.c:155 +msgid "Roadbed Width" +msgstr "Ratapenkan leveys" -#: ../bin/dcar.c:1912 -msgid "Customize" -msgstr "Mukauta" +#: ../bin/ctodesgn.c:159 ../bin/denum.c:56 +msgid "Print Setup" +msgstr "Tulostusasetukset" -#: ../bin/param.c:101 -msgid "Dark Aqua" -msgstr "" +#: ../bin/ctodesgn.c:188 +msgid "Diverging Length" +msgstr "Poikkeavan raiteen pituus" -#: ../bin/param.c:93 -msgid "Dark Blue" -msgstr "Tummansininen" +#: ../bin/ctodesgn.c:189 +msgid "Diverging Angle" +msgstr "Poikkeavan raiteen kulma" -#: ../bin/param.c:138 -msgid "Dark Gray" -msgstr "Tummanharmaa" +#: ../bin/ctodesgn.c:190 +msgid "Diverging Offset" +msgstr "Poikkeavan raiteen siirtymä" -#: ../bin/param.c:105 -msgid "Dark Green" -msgstr "Tummanvihreä" +#: ../bin/ctodesgn.c:191 +msgid "Overall Length" +msgstr "Kokonaispituus" -#: ../bin/param.c:132 -msgid "Dark Purple" -msgstr "" +#: ../bin/ctodesgn.c:201 +msgid "Regular Turnout" +msgstr "Tavallinen vaihde" -#: ../bin/param.c:126 -msgid "Dark Red" -msgstr "Tummanpunainen" +#: ../bin/ctodesgn.c:211 +msgid "Inner Length" +msgstr "Sisemmän raiteen pituus" -#: ../bin/param.c:112 -msgid "Dark Yellow" -msgstr "" +#: ../bin/ctodesgn.c:212 +msgid "Inner Angle" +msgstr "Sisemmän raiteen kulma" -#: ../bin/doption.c:187 -msgid "Dash" -msgstr "Katkoviiva" +#: ../bin/ctodesgn.c:213 +msgid "Inner Offset" +msgstr "Sisemmän raiteen siirtymä" -#: ../bin/misc.c:2162 -msgid "De&lete" -msgstr "Poista" +#: ../bin/ctodesgn.c:214 +msgid "Outer Angle" +msgstr "Ulomman raiteen kulma" -#: ../bin/misc.c:1941 -msgid "Debug" -msgstr "Virheiden poisto (debug)" +#: ../bin/ctodesgn.c:215 +msgid "Outer Offset" +msgstr "Ulomman raiteen siirtymä" -#: ../bin/param.c:97 -msgid "Deep Sky Blue" -msgstr "" +#: ../bin/ctodesgn.c:216 +msgid "Outer Length" +msgstr "Ulomman raiteen pituus" -#: ../bin/doption.c:296 -msgid "Default Command" -msgstr "Oletuskomento" +#: ../bin/ctodesgn.c:238 +msgid "Curved Turnout" +msgstr "Kaareva vaihde" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:223 -msgid "Default command is Describe or Select" -msgstr "Onko oletuskomentona \"määrittele\" vai \"valitse\"" +#: ../bin/ctodesgn.c:249 ../bin/ctodesgn.c:286 +msgid "Left Length" +msgstr "Vasemman raiteen pituus" -#: ../bin/dlayer.c:326 -msgid "Defaults" -msgstr "Oletukset" +#: ../bin/ctodesgn.c:250 ../bin/ctodesgn.c:287 +msgid "Left Angle" +msgstr "Vasemman raiteen kulma" -#: ../bin/cprofile.c:1353 -msgid "Define" -msgstr "Määrittele" +#: ../bin/ctodesgn.c:251 ../bin/ctodesgn.c:288 +msgid "Left Offset" +msgstr "Vasemman raiteen siirtymä" -#: ../bin/celev.c:44 -msgid "Defined" -msgstr "Määritelty" +#: ../bin/ctodesgn.c:252 ../bin/ctodesgn.c:290 +msgid "Right Offset" +msgstr "Oikean raiteen siirtymä" -#: ../bin/ctodesgn.c:106 -msgid "Degrees" -msgstr "Astetta" +#: ../bin/ctodesgn.c:253 ../bin/ctodesgn.c:291 +msgid "Right Angle" +msgstr "Oikean raiteen kulma" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:379 -msgid "Delay (in mS) between updating train movements" -msgstr "Junien piirtoväli ajettaessa (millisekunteina)" +#: ../bin/ctodesgn.c:254 ../bin/ctodesgn.c:292 +msgid "Right Length" +msgstr "Oikean raiteen pituus" -#: ../bin/misc.c:2101 ../bin/dcustmgm.c:55 ../bin/dcar.c:4106 -msgid "Delete" -msgstr "Poista" +#: ../bin/ctodesgn.c:276 +msgid "Wye Turnout" +msgstr "Y-vaihde" -#: ../bin/ctrain.c:2542 -msgid "Delete Car" -msgstr "Poista vaunu" +#: ../bin/ctodesgn.c:317 +msgid "3-way Turnout" +msgstr "3-tie vaihde" -#: ../bin/cselect.c:326 -msgid "Delete Tracks" -msgstr "Poista raiteita" +#: ../bin/ctodesgn.c:337 +msgid "Crossing" +msgstr "Risteys" -#: ../bin/ctrain.c:2543 -msgid "Delete Train" -msgstr "Poista juna" +#: ../bin/ctodesgn.c:358 +msgid "Single Slipswitch" +msgstr "Yksipuolinen risteysvaihde" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:42 -msgid "Delete and Undo" -msgstr "Poista ja kumoa" +#: ../bin/ctodesgn.c:379 +msgid "Double Slipswitch" +msgstr "Kaksipuolinen risteysvaihde" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:35 -msgid "Delete objects" -msgstr "Poista valitut objektit" +#: ../bin/ctodesgn.c:399 +msgid "Right Crossover" +msgstr "Raiteenvaihto oikealle" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:216 -msgid "Delete the selected Car Items" -msgstr "Poista valitut kohteet" +#: ../bin/ctodesgn.c:419 +msgid "Left Crossover" +msgstr "Raiteenvaihto vasemmalle" -#: ../bin/macro.c:831 ../bin/macro.c:1221 -msgid "Demo" -msgstr "Demo" +#: ../bin/ctodesgn.c:439 +msgid "Double Crossover" +msgstr "Sovitettu raideristeys" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:487 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:488 -msgid "Desciption" -msgstr "Kuvaus" +#: ../bin/ctodesgn.c:457 +msgid "Straight Section" +msgstr "Suora raideosa" -#: ../bin/doption.c:196 ../bin/doption.c:197 -msgid "Descr" -msgstr "Kuvaus" +#: ../bin/ctodesgn.c:468 +msgid "Angle (Degrees)" +msgstr "Kulma (asteina)" -#: ../bin/doption.c:195 ../../../../build/xtrkcad/app/i18n/custmsg.h:12 -msgid "Describe" -msgstr "Määrittele" +#: ../bin/ctodesgn.c:476 +msgid "Curved Section" +msgstr "Kaareva raideosa" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:11 -msgid "Describe and Select" -msgstr "Määrittele ja valitse -toiminnot" +#: ../bin/ctodesgn.c:495 +msgid "Bumper Section" +msgstr "Puskuri raideosa" + +#: ../bin/ctodesgn.c:505 ../bin/denum.c:123 ../bin/denum.c:186 +#: ../bin/denum.c:218 ../bin/denum.c:219 ../bin/dlayer.c:455 +msgid "Count" +msgstr "Lukumäärä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:37 -msgid "Describe objects" -msgstr "Määrittele objekteja" +#: ../bin/ctodesgn.c:506 +msgid "Radius1" +msgstr "Säde1" -#: ../bin/misc.c:1695 ../bin/misc.c:1724 -msgid "Describe/Select" -msgstr "Määrittele/valitse" +#: ../bin/ctodesgn.c:507 +msgid "Radius2" +msgstr "Säde2" -#: ../bin/cgroup.c:605 ../bin/ctodesgn.c:1761 ../bin/ctodesgn.c:1762 -#: ../bin/ctrain.c:175 ../bin/dcustmgm.c:46 ../bin/dcar.c:1949 -#: ../bin/dcar.c:4071 ../bin/dcar.c:4076 ../bin/cstruct.c:62 -#: ../bin/cturnout.c:68 ../bin/dcmpnd.c:450 ../bin/cmisc.c:309 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:326 -msgid "Description" -msgstr "Kuvaus" +#: ../bin/ctodesgn.c:587 +msgid "Turntable Section" +msgstr "Kääntöpöytä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:427 -msgid "Description of Object" -msgstr "Objektin kuvaus" +#: ../bin/ctodesgn.c:1421 +#, c-format +msgid "%s Designer" +msgstr "%s - suunnittelu" -#: ../bin/misc.c:2095 -msgid "Deselect All" -msgstr "Poista valinnat" +#: ../bin/ctodesgn.c:1425 +#, c-format +msgid "%s %d x %d (of %d x %d)" +msgstr "" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:38 -msgid "Deselect all selected objects" -msgstr "Poista valinnat kaikista objekteista" +#: ../bin/ctodesgn.c:1425 +msgid "Page" +msgstr "Sivu" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:407 -msgid "Deselects all pages" -msgstr "Poista sivujen valinnat" +#: ../bin/ctodesgn.c:1433 +msgid "Frog Number" +msgstr "Risteysnumero" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:34 -msgid "Designing turnouts" +#: ../bin/ctodesgn.c:1720 +msgid "Turnout Designer" msgstr "Raideosien suunnittelu" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:196 -msgid "Diagram of Car" -msgstr "Vaunun tai veturin kaaviokuva" +#: ../bin/ctodesgn.c:1730 +#, c-format +msgid "%s %s Designer" +msgstr "%s %s - suunnittelu" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:477 -msgid "" -"Diagram of the currently selected turnout. Click on a End-Point to select " -"the Active End-Point" -msgstr "Valitun raideosan kaaviokuva. Valitse aktiivinen päätepiste hiirellä." +#: ../bin/ctrain.c:181 ../bin/dcar.c:1994 ../bin/dcar.c:4078 +#: ../bin/dcar.c:4083 +msgid "Index" +msgstr "Indeksi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:454 -msgid "Diagram of the selected structure" -msgstr "Valitun rakennuksen kuva" +#: ../bin/ctrain.c:187 ../bin/dcar.c:4079 +msgid "Rep Marks" +msgstr "Tunnus" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:9 -msgid "Dialogs" -msgstr "Dialogit (ikkunat)" +#: ../bin/ctrain.c:261 +msgid "Car" +msgstr "Vaunu" -#: ../bin/cturntbl.c:47 ../bin/cturntbl.c:240 ../bin/cturntbl.c:766 -#: ../bin/cturntbl.c:779 -msgid "Diameter" -msgstr "Halkaisija" +#: ../bin/ctrain.c:592 +msgid "Follow" +msgstr "Seuraa" -#: ../bin/smalldlg.c:70 -msgid "Did you know..." -msgstr "Tiesitkö..." +#: ../bin/ctrain.c:593 +msgid "Auto Reverse" +msgstr "Automaattinen peruutus" -#: ../bin/dcar.c:479 -msgid "Diesel Loco" -msgstr "Dieselveturi" +#: ../bin/ctrain.c:612 ../bin/dcar.c:4966 +msgid "Find" +msgstr "Etsi" -#: ../bin/cdraw.c:822 -msgid "Dimension" -msgstr "Etäisyys" +#: ../bin/ctrain.c:618 ../bin/ctrain.c:877 ../bin/ctrain.c:1187 +#: ../wlib/gtklib/ixhelp.c:239 +msgid "Forward" +msgstr "Eteen" -#: ../bin/cdraw.c:410 ../bin/cdraw.c:1028 -msgid "Dimension Line" -msgstr "Mittajana" +#: ../bin/ctrain.c:620 ../bin/ctrain.c:3027 ../bin/dcar.c:4418 +#: ../bin/dcar.c:4428 ../bin/dcar.c:4548 ../bin/fileio.c:236 ../bin/macro.c:87 +msgid "Stop" +msgstr "Pysäytä" -#: ../bin/cdraw.c:924 -msgid "Dimension Line Size" -msgstr "Mittajanan koko" +#: ../bin/ctrain.c:818 ../bin/ctrain.c:847 +msgid "Crashed" +msgstr "Törmännyt" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:54 -msgid "Dimension Lines" -msgstr "Mittajanat" +#: ../bin/ctrain.c:820 +msgid "Not on Track" +msgstr "Ei raiteilla" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:192 -msgid "Dimension Lines are used to mark the distances between two points.\n" -msgstr "" -"Mittajanoja käytetään merkitsemään kahden pisteen välisiä etäisyyksiä.\n" +#: ../bin/ctrain.c:824 +msgid "Trains Paused" +msgstr "Junat pysäytetty" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:649 -msgid "Dimension lines show the distance between two points." -msgstr "" +#: ../bin/ctrain.c:826 +msgid "Running" +msgstr "Liikkeellä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:183 -msgid "Display Car Item information or reporting marks and dimensions" -msgstr "Näytä vaunun tai veturin tiedot, tai yhtiötunnukset ja mitat" +#: ../bin/ctrain.c:831 +msgid "End of Track" +msgstr "Rata loppu" -#: ../bin/doption.c:243 -msgid "Display Options" -msgstr "Näyttöasetukset" +#: ../bin/ctrain.c:835 +msgid "Open Turnout" +msgstr "Avoin vaihde" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:93 -msgid "Display prices of turnouts, sectional tracks and structures" -msgstr "Vaihteiden, palaraiteiden ja rakennusten hinnat" +#: ../bin/ctrain.c:839 +msgid "Manual Stop" +msgstr "Pysäytetty" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:523 -msgid "" -"Displays the Print Setup window to change printers, orientation, paper size, " -"etc." -msgstr "" -"Näyttää tulostusasetusikkunan, josta voi valita tulostimen, muutaa paperin " -"koon, yms." +#: ../bin/ctrain.c:843 +msgid "No Room" +msgstr "Ei tilaa" + +#: ../bin/ctrain.c:851 +msgid "Unknown Status" +msgstr "Tuntematon tila" + +#: ../bin/ctrain.c:861 +msgid "No trains" +msgstr "Ei junia" -#: ../bin/celev.c:311 ../bin/celev.c:328 +#: ../bin/ctrain.c:1238 +msgid "Train Control XXX" +msgstr "Junien hallinta XXX" + +#: ../bin/ctrain.c:1239 #, c-format -msgid "Dist = %s" -msgstr "Etäisyys = %s" +msgid "Train Control %d" +msgstr "Junien hallinta %d" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:192 -msgid "Distance between Trucks " -msgstr "Telien keskikohtien välinen etäisyys" +#: ../bin/ctrain.c:1241 +msgid "Train Control" +msgstr "Junien hallinta" -#: ../bin/ctodesgn.c:181 -msgid "Diverging Angle" -msgstr "Poikkeavan raiteen kulma" +#: ../bin/ctrain.c:3004 +msgid "Train" +msgstr "Aja junilla" -#: ../bin/ctodesgn.c:180 -msgid "Diverging Length" -msgstr "Poikkeavan raiteen pituus" +#: ../bin/ctrain.c:3017 +msgid "Uncouple" +msgstr "Irrota" -#: ../bin/ctodesgn.c:182 -msgid "Diverging Offset" -msgstr "Poikkeavan raiteen siirtymä" +#: ../bin/ctrain.c:3019 +msgid "Flip Car" +msgstr "Käännä vaunu" -#: ../bin/param.c:244 -msgid "Divide by 0" -msgstr "Jako nollalla" +#: ../bin/ctrain.c:3021 +msgid "Flip Train" +msgstr "Käännä juna" -#: ../bin/csnap.c:517 -msgid "Divisions" -msgstr "Jako" +#: ../bin/ctrain.c:3023 +msgid "MU Master" +msgstr "Vetovastuussa" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:204 -msgid "Do all the cars have the same Number?" -msgstr "Onko kaikilla vaunuilla tai vetureilla sama numero?" +#: ../bin/ctrain.c:3026 +msgid "Change Direction" +msgstr "Muuta suuntaa" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:370 -msgid "Do not create tracks to be shorter than this value" -msgstr "Älä luo tätä lyhyempiä raiteita" +#: ../bin/ctrain.c:3030 +#, fuzzy +msgid "Remove Car" +msgstr "Poista vaunu" -#: ../bin/cselect.c:560 -msgid "Do not resize track" -msgstr "Älä muuta raiteiden kokoa" +#: ../bin/ctrain.c:3033 +#, fuzzy +msgid "Remove Train" +msgstr "Poista juna" -#: ../bin/misc.c:476 -msgid "" -"Do you want to return to the last saved state?\n" -"\n" -"Revert will cause all changes done since last save to be lost." +#: ../bin/cturnout.c:89 ../bin/dcar.c:2016 ../bin/dcar.c:2020 +#: ../bin/dcustmgm.c:64 +msgid "New" +msgstr "Uusi" + +#: ../bin/cturnout.c:201 +#, c-format +msgid "Turnout path[%d:%d] out of bounds: %d" msgstr "" -"Haluatko palata edelliseen tallennettuun tilaan?\n" -"\n" -"Palautuksessa menetetään kaikki tallennuksen jälkeiset muutokset." -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:289 -msgid "Don't show trains in tunnels when tunnels are hidden" +#: ../bin/cturnout.c:213 ../bin/cturnout.c:218 +#, c-format +msgid "Turnout path[%d] %d is not a track segment" msgstr "" -"Ei näytetä junia tunneleissa, jos tunnelien piirtotapa on \"piilotettu\"" -#: ../bin/dpricels.c:155 ../bin/dlayer.c:820 ../bin/celev.c:407 -#: ../bin/dcustmgm.c:344 ../bin/cprofile.c:1255 ../bin/cmisc.c:309 -msgid "Done" -msgstr "Valmis" +#: ../bin/cturnout.c:226 +#, c-format +msgid "Turnout path[%d] %d-%d not connected: %0.3f" +msgstr "" -#: ../bin/ctodesgn.c:431 -msgid "Double Crossover" -msgstr "Sovitettu raideristeys" +#: ../bin/cturnout.c:262 +msgid "Unknown special case" +msgstr "Tuntematon erikoistapaus" -#: ../bin/ctodesgn.c:371 -msgid "Double Slipswitch" -msgstr "Kaksipuolinen risteysvaihde" +#: ../bin/cturnout.c:368 +msgid "Connect Adjustable Tracks" +msgstr "Yhdistä säädettävä raide" -#: ../bin/doption.c:366 -msgid "Drag Distance" -msgstr "Raahausetäisyys" +#: ../bin/cturnout.c:927 +msgid "splitTurnout: can't find segment" +msgstr "Pilko: Lohkoja ei löytynyt." -#: ../bin/doption.c:367 -msgid "Drag Timeout" -msgstr "Raahauksen viive" +#: ../bin/cturnout.c:1337 ../bin/track.c:1952 ../bin/tstraigh.c:542 +msgid "Drag to change track length" +msgstr "Vedä muuttaaksesi raideosan pituutta" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:118 -msgid "" -"Drag a horizontal line that will be the mirror for the command.\n" -msgstr "Piirrä peilayslinja vaakatasoon.\n" +#: ../bin/cturnout.c:1348 +#, c-format +msgid "Length=%s" +msgstr "Pituus=%s" -#: ../bin/ccurve.c:108 ../bin/ccurve.c:138 -msgid "Drag from Center to End-Point" -msgstr "Vedä keskipisteestä päätepisteeseen" +#: ../bin/cturnout.c:1609 ../bin/cturnout.c:2585 +msgid "TURNOUT " +msgstr "PALARAIDE " -#: ../bin/ccurve.c:102 -msgid "Drag from End-Point in direction of curve" -msgstr "Vedä päätepisteestä kaarteen suuntaan" +#: ../bin/cturnout.c:1960 +#, c-format +msgid "%d connections, max distance %0.3f (%s)" +msgstr "%d liitosta, suurin etäisyys %0.3f (%s)" -#: ../bin/ccurve.c:105 ../bin/ccurve.c:138 -msgid "Drag from End-Point to Center" -msgstr "Vedä päätepisteestä keskipisteeseen" +#: ../bin/cturnout.c:1965 +#, c-format +msgid "0 connections (%s)" +msgstr "0 liitosta (%s)" -#: ../bin/ccurve.c:202 ../bin/ccurve.c:303 ../bin/drawgeom.c:365 -msgid "Drag on Red arrows to adjust curve" -msgstr "Asettele kaari vetämällä punaisista nuolista" +#: ../bin/cturnout.c:2005 +msgid "Place New Turnout" +msgstr "Aseta uusi vaihde" -#: ../bin/drawgeom.c:215 -msgid "Drag set box size" -msgstr "Aseta nelikulmion koko rahaamalla" +#: ../bin/cturnout.c:2264 ../bin/cturnout.c:2320 ../bin/cturnout.c:2436 +#: ../bin/cturnout.c:2548 +msgid "" +"Left drag to move, right drag to rotate, press Space or Return to fix track " +"in place or Esc to cancel" +msgstr "" +"Siirrä vetämällä hiiren vasemmalla, pyöritä vetämällä hiiren oikealla, paina " +"välilyönti tai return asettaaksesi raideosa paikalleen tai esc peruuttaaksesi" -#: ../bin/ccurve.c:564 -msgid "Drag to Center" -msgstr "Raahaa keskustaan" +#: ../bin/cturnout.c:2311 +#, c-format +msgid "Angle = %0.3f (%s)" +msgstr "Kulma = %0.3f (%s)" -#: ../bin/ccurve.c:568 -msgid "Drag to Edge" -msgstr "Raahaa kehälle" +#: ../bin/cturnout.c:2401 ../bin/param.c:2468 +msgid "Close" +msgstr "Sulje" -#: ../bin/cprofile.c:659 ../bin/cprofile.c:1260 -msgid "Drag to change Elevation" -msgstr "Muuta korkeutta raahaamalla" +#: ../bin/cturnout.c:2418 +msgid "Pick turnout and active End Point, then place on the layout" +msgstr "" +"Valitse ensin vaihde ja aktiivinen päätepiste ja aseta sitten paikoilleen" -#: ../bin/tcurve.c:1033 -msgid "Drag to change angle or create tangent" -msgstr "Raahaa muuttaaksesi kulmaa" +#: ../bin/cturntbl.c:52 ../bin/cturntbl.c:246 ../bin/cturntbl.c:795 +#: ../bin/cturntbl.c:808 +msgid "Diameter" +msgstr "Halkaisija" -#: ../bin/track.c:1860 ../bin/tstraigh.c:529 ../bin/cturnout.c:1327 -msgid "Drag to change track length" -msgstr "Vedä muuttaaksesi raideosan pituutta" +#: ../bin/cturntbl.c:247 +msgid "# EndPt" +msgstr "Päätepisteitä" -#: ../bin/cdraw.c:937 -msgid "Drag to create Table Edge" -msgstr "Piirrä pöydän reuna" +#: ../bin/cturntbl.c:281 +#, c-format +msgid "Turntable(%d): Layer=%d Center=[%s %s] Diameter=%s #EP=%d" +msgstr "" +"Kääntöpöytä(%d): Taso=%d Keskipiste=[%s %s] Halkaisija=%s Päätepisteitä=%d" -#: ../bin/cmodify.c:198 -msgid "Drag to create new track segment" -msgstr "Raahaa luodaksesi uuden raiteen" +#: ../bin/cturntbl.c:296 ../bin/cturntbl.c:853 +msgid "Turntable" +msgstr "Kääntöpöytä" -#: ../bin/cturntbl.c:544 +#: ../bin/cturntbl.c:554 msgid "Drag to create stall track" msgstr "Vedä luodaksesi lähtevän raiteen" -#: ../bin/cselect.c:1558 -msgid "Drag to mark mirror line" -msgstr "Vedä hiirellä peilauslinja" +#: ../bin/cturntbl.c:825 +msgid "Create Turntable" +msgstr "Luo kääntöpöytä" -#: ../bin/cselect.c:1118 -msgid "Drag to move selected tracks" -msgstr "Siirrä valitut raideosat raahaamalla" +#: ../bin/cundo.c:166 +msgid "Undo Trace" +msgstr "Jäljitys" -#: ../bin/ccurve.c:111 ../bin/ccurve.c:144 -msgid "Drag to other end of chord" -msgstr "Vedä jänne päätepisteiden välille" +#: ../bin/cundo.c:501 +#, c-format +msgid "Undo: %s" +msgstr "Kumoa: %s" -#: ../bin/cstruct.c:643 -msgid "Drag to place" -msgstr "Raahaa paikoilleen" +#: ../bin/cundo.c:504 ../../../../build/work/app/bin/bllnhlp.c:136 +msgid "Undo last command" +msgstr "Kumoa edellinen komento" -#: ../bin/cstraigh.c:55 -msgid "Drag to place 2nd end point" -msgstr "Raahaa asettaaksesi 2. päätepiste" +#: ../bin/cundo.c:509 +#, c-format +msgid "Redo: %s" +msgstr "Tee uudelleen: %s" -#: ../bin/drawgeom.c:157 ../bin/drawgeom.c:170 -msgid "Drag to place next end point" -msgstr "Raahaa asettaaksesi seuraava päätepiste" +#: ../bin/cundo.c:512 ../../../../build/work/app/bin/bllnhlp.c:106 +msgid "Redo last undo" +msgstr "Tee uudelleen" -#: ../bin/cstruct.c:670 -msgid "Drag to rotate" -msgstr "Raahaa pyörittääksesi" +#: ../bin/custom.c:164 +#, c-format +msgid "%s Turnout Designer" +msgstr "%s Vaihteiden suunnittelu" -#: ../bin/cselect.c:1208 -msgid "Drag to rotate selected tracks" -msgstr "Pyöritä valittuja raideosia raahaamalla" +#: ../bin/custom.c:169 +#, c-format +msgid "%s Version %s" +msgstr "%s versio %s" -#: ../bin/ccurve.c:128 ../bin/chndldto.c:91 -msgid "Drag to set angle" -msgstr "Aseta kulma raahaamalla" +#: ../bin/custom.c:174 +#, c-format +msgid "%s Files|*.xtc" +msgstr "%s tiedostot|*.xtc" -#: ../bin/ccurve.c:676 ../bin/drawgeom.c:202 -msgid "Drag to set radius" -msgstr "Aseta säde raahaamalla" +#: ../bin/custom.c:179 +#, c-format +msgid "%s Import Files|*.%sti" +msgstr "%s Tuotavat tiedostot|*.%sti" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:422 -msgid "Dragging with the right button is simulated by a blue solid cursor.\n" +#: ../bin/custom.c:184 +msgid "Data Exchange Format Files|*.dxf" msgstr "" -"Hiiren oikealla painikkeella raahaamista kuvataan sinisellä nuolella.\n" -#: ../bin/cdraw.c:1144 -msgid "Draw" -msgstr "Piirto" +#: ../bin/custom.c:188 +#, c-format +msgid "%s Record Files|*.%str" +msgstr "%s Nauhoitustiedostot|*.%str" -#: ../bin/cdraw.c:1029 -msgid "Draw Benchwork" -msgstr "Piirrä runkorakenne" +#: ../bin/custom.c:193 +#, c-format +msgid "%s Note Files|*.not" +msgstr "%s Muistiinpanot|*.not" -#: ../bin/cdraw.c:1044 -msgid "Draw Box" -msgstr "Piirrä nelikulmio" +#: ../bin/custom.c:198 +#, c-format +msgid "%s Log Files|*.log" +msgstr "%s Lokitiedostot|*.log" -#: ../bin/cdraw.c:1039 -msgid "Draw Circle from Center" -msgstr "Piirrä ympyrä keskipisteestä" +#: ../bin/custom.c:203 +#, fuzzy, c-format +msgid "%s PartsList Files|*.txt" +msgstr "%s Osaluetelotiedostot|*.log" -#: ../bin/cdraw.c:1038 -msgid "Draw Circle from Tangent" -msgstr "Piirrä ympyrä kehältä" +#: ../bin/dbench.c:43 +msgid " L-Girder" +msgstr "L-palkki" -#: ../bin/cdraw.c:1065 -msgid "Draw Circles" -msgstr "Ympyröiden piirto" +#: ../bin/dbench.c:43 +msgid " T-Girder" +msgstr "T-palkki" -#: ../bin/cdraw.c:1034 -msgid "Draw Curve from Center" -msgstr "Piirrä kaari keskipisteestä" +#: ../bin/dbench.c:66 +msgid "On Edge" +msgstr "Pysty" -#: ../bin/cdraw.c:1035 -msgid "Draw Curve from Chord" -msgstr "Piirrä kaari·päätepisteiden·välille" +#: ../bin/dbench.c:67 +msgid "Flat" +msgstr "Vaaka" -#: ../bin/cdraw.c:1032 -msgid "Draw Curve from End" -msgstr "Piirrä kaari päätepisteestä" +#: ../bin/dbench.c:71 +msgid "Left-Down" +msgstr "Vasen-Alas" -#: ../bin/cdraw.c:1033 -msgid "Draw Curve from Tangent" -msgstr "Piirrä kaari kehältä" +#: ../bin/dbench.c:72 +msgid "Right-Down" +msgstr "Oikea-Alas" -#: ../bin/cdraw.c:1064 -msgid "Draw Curved Lines" -msgstr "Kaarien piirto" +#: ../bin/dbench.c:73 +msgid "Left-Up" +msgstr "Vasen-Ylös" -#: ../bin/cdraw.c:1028 -msgid "Draw Dimension Line" -msgstr "Piirrä mittajana" - -#: ../bin/doption.c:202 -msgid "Draw EndPts" -msgstr "Piirrä päätepisteet" +#: ../bin/dbench.c:74 +msgid "Right-Up" +msgstr "Oikea-Ylös" -#: ../bin/cdraw.c:1045 -msgid "Draw Filled Box" -msgstr "Piirrä täytetty nelikulmio" +#: ../bin/dbench.c:75 +msgid "Left-Inverted" +msgstr "Vasen-Käännetty" -#: ../bin/cdraw.c:1042 -msgid "Draw Filled Circle from Center" -msgstr "Piirrä täytetty ympyrä keskipisteestä" +#: ../bin/dbench.c:76 +msgid "Right-Inverted" +msgstr "Oikea-Käännetty" -#: ../bin/cdraw.c:1041 -msgid "Draw Filled Circle from Tangent" -msgstr "Piirrä täytetty ympyrä kehältä" +#: ../bin/dbench.c:81 +msgid "Inverted" +msgstr "Käännetty" -#: ../bin/cdraw.c:1027 -msgid "Draw Line" -msgstr "Piirrä viiva" +#: ../bin/dbench.c:147 +#, c-format +msgid "" +"Bad BenchType for %s:\n" +"%s" +msgstr "" +"Väärä runkotyyppi %s:lle:\n" +"%s" -#: ../bin/doption.c:294 -msgid "Draw Moving Tracks" -msgstr "Piirrä liikuteltavat raiteet" +#: ../bin/dbitmap.c:102 ../bin/dbitmap.c:106 +msgid "Drawn with " +msgstr "Suunnitteluohjelma: " -#: ../bin/cdraw.c:1047 -msgid "Draw Polygon" -msgstr "Piirrä täytetty monikulmio" +#: ../bin/dbitmap.c:116 +msgid "Drawing tracks to BitMap" +msgstr "Piirretään raiteet bitmap:ksi" -#: ../bin/cdraw.c:1046 -msgid "Draw Polyline" -msgstr "Piirrä monikulmio" +#: ../bin/dbitmap.c:123 +msgid "Writing BitMap to file" +msgstr "Kirjoitetaan bitmap tiedostoon" -#: ../bin/cdraw.c:1066 -msgid "Draw Shapes" -msgstr "Muotojen piirto" +#: ../bin/dbitmap.c:144 +msgid "Print Titles" +msgstr "Tulosta otsikot" -#: ../bin/cdraw.c:1063 -msgid "Draw Straight Objects" -msgstr "Suorien objektien piirto" +#: ../bin/dbitmap.c:144 +msgid "Print Borders" +msgstr "Tulosta kehys" -#: ../bin/cdraw.c:1030 -msgid "Draw Table Edge" -msgstr "Piirrä pöydän reuna" +#: ../bin/dbitmap.c:145 +msgid "Print Centerline" +msgstr "Tulosta keskiviiva" -#: ../bin/doption.c:209 -msgid "Draw Ties" -msgstr "Piirrä ratapölkyt" +#: ../bin/dbitmap.c:152 +msgid " dpi" +msgstr " dpi" -#: ../bin/doption.c:201 -msgid "Draw Tunnel" -msgstr "Piirrä tunneli" +#: ../bin/dbitmap.c:154 +msgid "Bitmap : 99999 by 99999 pixels" +msgstr "Bitmap : 99999 x 99999 pikseliä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:44 -msgid "Draw a circle line from center" -msgstr "Piirrä ympyrä keskipisteestä" +#: ../bin/dbitmap.c:156 +msgid "Approximate file size: 999.9Mb" +msgstr "Arvioitu tiedostokoko: 999.9Mt" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:46 -msgid "Draw a circle line from tangent" -msgstr "Piirrä ympyrä kehältä" +#: ../bin/dbitmap.c:186 +#, c-format +msgid "Bitmap : %ld by %ld pixels" +msgstr "Bitmap : %ld x %ld pikseliä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:56 -msgid "Draw a filled circle from center" -msgstr "Piirrä täytetty ympyrä keskipisteestä" +#: ../bin/dbitmap.c:190 +#, c-format +msgid "Approximate file size : %0.0f" +msgstr "Arvioitu tiedostokoko: %0.0f" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:58 -msgid "Draw a filled circle from tangent" -msgstr "Piirrä täytetty ympyrä kehältä" +#: ../bin/dbitmap.c:192 +#, c-format +msgid "Approximate file size : %0.1fKb" +msgstr "Arvioitu tiedostokoko: %0.1fKt" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:45 -msgid "Draw a fixed radius circle line" -msgstr "Piirrä määriteltysäteinen ympyrä" +#: ../bin/dbitmap.c:194 +#, c-format +msgid "Approximate file size : %0.1fMb" +msgstr "Arvioitu tiedostokoko: %0.1fMt" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:57 -msgid "Draw a fixed radius filled circle" -msgstr "Piirrä täytetty määriteltysäteinen ympyrä" +#: ../bin/dbitmap.c:208 ../bin/misc.c:1043 ../bin/misc.c:1113 +#: ../bin/param.c:2468 ../wlib/gtklib/browserhelp.c:127 +#: ../../../../build/work/app/bin/bllnhlp.c:539 +msgid "Cancel" +msgstr "Peruuta" -#: ../bin/cselect.c:789 -msgid "Draw moving track as end-points" -msgstr "Piirrä liikuteltavat raiteet päätepisteinä" +#: ../bin/dbitmap.c:213 +msgid "Save Bitmap" +msgstr "Tallenna bitmap" -#: ../bin/cselect.c:787 -msgid "Draw moving track normally" -msgstr "Piirrä liikuteltavat raiteet normaalisti" +#: ../bin/dbitmap.c:215 +msgid "Bitmap files|*.bmp" +msgstr "Bitmap kuvatiedostot|*.bmp" -#: ../bin/cselect.c:788 -msgid "Draw moving track simply" -msgstr "Piirrä liikuteltavat raiteet yksinkertaistetuna" +#: ../bin/dbitmap.c:217 +msgid "Bitmap files|*.xpm" +msgstr "Bitmap kuvatiedostot|*.xpm" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:64 -msgid "Draw table edge" -msgstr "Piirrä pöydän reuna" +#: ../bin/dbitmap.c:238 +msgid "BitMap" +msgstr "BitMap" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:128 -msgid "Draw tracks with medium lines" -msgstr "Piirrä raiteet keskipaksuilla viivoilla" +#: ../bin/dcar.c:53 +msgid "Truck" +msgstr "Teli" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:129 -msgid "Draw tracks with thick lines" -msgstr "Piirrä raiteet paksuilla viivoilla" +#: ../bin/dcar.c:53 +msgid "Body" +msgstr "Runko" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:127 -msgid "Draw tracks with thin lines" -msgstr "Piirrä raiteet ohuilla viivoilla" +#: ../bin/dcar.c:154 ../bin/dcar.c:2445 ../bin/dcar.c:2449 +msgid "Unknown" +msgstr "Tuntematon" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:247 -msgid "" -"Drawing lines with the Shift key held down will use the previous line End-" -"Point as the starting position. This makes it easy to draw connected " -"lines.\n" -msgstr "" -"Jos vaihto-näppäin pidetään painettuna, seuraavan viivan piirto aloitetaan " -"edellisen viivan loppupäästä. Näin voidaan helposti piirtää yhdistettyjä " -"viivoja.\n" +#: ../bin/dcar.c:487 +msgid "Diesel Loco" +msgstr "Dieselveturi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:159 -msgid "Drawing scale" -msgstr "Piirron mittakaava" +#: ../bin/dcar.c:488 +msgid "Steam Loco" +msgstr "Höyryveturi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:456 -msgid "Drawing scale and size" -msgstr "Mittakaava ja koko" +#: ../bin/dcar.c:489 +msgid "Elect Loco" +msgstr "Sähköveturi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:286 -msgid "Drawing scale of the map window" -msgstr "Karttaikkunan piirtomittakaava" +#: ../bin/dcar.c:490 +msgid "Freight Car" +msgstr "Tavaravaunu" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:281 -msgid "Drawing scale when to draw tracks with 2 rails" -msgstr "" -"Näytön mittakaavan raja-arvo, jolloin raiteet piirretään yhtenä tai kahtena " -"kiskona." +#: ../bin/dcar.c:491 +msgid "Psngr Car" +msgstr "Matkustajavaunu" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:405 -msgid "" -"Drawing the tracks while moving can be very time-consuming. We had just " -"used the \"Normal\" method of drawing tracks.\n" -msgstr "" -"Raiteita siirrettäessä niiden piirto voi olla hyvinkin aikaa vievää. Tässä " -"on käytetty reiteiden piirron asetusta \"normaali\".\n" +#: ../bin/dcar.c:492 +msgid "M-O-W" +msgstr "Työkone" -#: ../bin/dbitmap.c:113 -msgid "Drawing tracks to BitMap" -msgstr "Piirretään raiteet bitmap:ksi" +#: ../bin/dcar.c:493 ../bin/doption.c:108 +msgid "Other" +msgstr "Muut" -#: ../bin/dbitmap.c:99 ../bin/dbitmap.c:103 -msgid "Drawn with " -msgstr "Suunnitteluohjelma: " +#: ../bin/dcar.c:1092 ../bin/dcar.c:4787 +msgid "N/A" +msgstr "Ei tiedossa" -#: ../bin/misc.c:2150 -msgid "E&xit" -msgstr "Poistu" +#: ../bin/dcar.c:1093 ../bin/dcar.c:4792 +msgid "Mint" +msgstr "Loistava" -#: ../bin/misc.c:2140 -msgid "E&xport" -msgstr "Vie tiedostoon" +#: ../bin/dcar.c:1094 ../bin/dcar.c:4791 +msgid "Excellent" +msgstr "Erinomainen" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:608 -msgid "" -"Each Layer can be drawn or hidden by the 'Visible' toggle on the Layers " -"dialog. " -msgstr "" +#: ../bin/dcar.c:1095 ../bin/dcar.c:4790 +msgid "Good" +msgstr "Hyvä" -#: ../bin/dease.c:220 -msgid "Easement" -msgstr "Kaarreloivennus" +#: ../bin/dcar.c:1096 ../bin/dcar.c:4789 +msgid "Fair" +msgstr "Tyydyttävä" -#: ../bin/misc.c:1691 -msgid "Easement Button" -msgstr "Kaarreloivennus" +#: ../bin/dcar.c:1097 ../bin/dcar.c:4788 +msgid "Poor" +msgstr "Huono" -#: ../bin/tease.c:589 -msgid "Easement Track" -msgstr "Kaarreloivennus" +#: ../bin/dcar.c:1373 ../bin/dpricels.c:45 +#: ../../../../build/work/app/bin/bllnhlp.c:404 +msgid "Item" +msgstr "Tuote" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:300 -msgid "Easement length" -msgstr "Kaarreloivennuksen pituus" +#: ../bin/dcar.c:1920 ../wlib/gtklib/notice.c:91 ../wlib/mswlib/mswmisc.c:1967 +msgid "Information" +msgstr "Tiedot" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:65 -msgid "Easement menu" -msgstr "Kaarreloivennuksen asetukset" +#: ../bin/dcar.c:1920 +msgid "Customize" +msgstr "Mukauta" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:28 -msgid "Easements" -msgstr "Kaarreloivennukset" +#: ../bin/dcar.c:1932 +msgid "Sequential" +msgstr "Peräkkäinen" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:583 -msgid "" -"Easements (spiral transition curves) are used when track changes from " -"straight to curved by gradually changing the radius. This improves " -"operation and appearance.\n" -"Easements are created with Joining or Extending Tracks.\n" -"The Easement dialog is used to control easements." -msgstr "" -"Kaarreloivennuksia käytetään radan muuttuessa suorasta kaarteeksi " -"muuttamalla vaihdoskohdassa kaarresädettä asteittain. Tämä parantaa radan " -"ajettavuutta ja ulkonäköä.\n" -"Kaarreloivennukset luodaan yhdistämällä tai jatkamalla raiteita.\n" -"Kaarreloivennus-ikkunasta asetellaan tarvittavat parametrit." +#: ../bin/dcar.c:1932 +msgid "Repeated" +msgstr "Sama" -#: ../bin/dcustmgm.c:53 ../bin/dcustmgm.c:90 ../bin/dcar.c:4102 -msgid "Edit" -msgstr "Muokkaa" +#: ../bin/dcar.c:1943 ../bin/dcar.c:1945 ../bin/dcar.c:5117 +msgid "Prototype" +msgstr "Esikuva" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:141 -msgid "Edit menu" -msgstr "Muokkaa -valikko" +#: ../bin/dcar.c:1949 ../bin/dcar.c:4078 ../bin/dcar.c:4083 +msgid "Type" +msgstr "Tyyppi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:214 -msgid "Edit the selected Car Item" -msgstr "Muokkaa valittua kohdetta" +#: ../bin/dcar.c:1951 +msgid "Part" +msgstr "Tuote" -#: ../bin/macro.c:1016 -#, c-format -msgid "Elapsed time %lu\n" -msgstr "Kulunut aika %lu\n" +#: ../bin/dcar.c:1953 ../../../../build/work/app/bin/bllnhlp.c:347 +#: ../../../../build/work/app/bin/bllnhlp.c:523 +#: ../../../../build/work/app/bin/bllnhlp.c:524 +msgid "Part Number" +msgstr "Tuotekoodi" -#: ../bin/dcar.c:481 -msgid "Elect Loco" -msgstr "Sähköveturi" +#: ../bin/dcar.c:1955 +msgid "Loco?" +msgstr "Veturi?" -#: ../bin/cprofile.c:620 ../bin/cprofile.c:630 -#, c-format -msgid "Elev = %0.1f" -msgstr "Korkeus = %0.1f" +#: ../bin/dcar.c:1959 ../bin/dcar.c:4116 +msgid "Import" +msgstr "Tuo tiedostosta" -#: ../bin/celev.c:309 ../bin/celev.c:326 -#, c-format -msgid "Elev = %s" -msgstr "Korkeus = %s" +#: ../bin/dcar.c:1966 +msgid "Mode" +msgstr "Tila" -#: ../bin/cprofile.c:632 -#, c-format -msgid "Elev=%0.2f %0.1f%%" -msgstr "Korkeus=%0.2f %0.1f%%" +#: ../bin/dcar.c:1970 +msgid "Road" +msgstr "Yhtiö" -#: ../bin/celev.c:407 ../bin/celev.c:473 -msgid "Elevation" -msgstr "Korkeustaso" +#: ../bin/dcar.c:1972 +msgid "Reporting Mark" +msgstr "Yhtiön tunnus" -#: ../bin/ccurve.c:388 -msgid "Elevation Difference" -msgstr "Korkeusero" +#: ../bin/dcar.c:1974 +msgid "Number" +msgstr "Numero" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:96 -msgid "Elevation Profile Command" -msgstr "Muokkaa korkeusprofiilia" +#: ../bin/dcar.c:1978 +msgid "Car Length" +msgstr "Pituus" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:331 -msgid "Elevation difference of Helix End-Points" -msgstr "Päätepisteiden välinen korkeusero" +#: ../bin/dcar.c:1982 +msgid "Truck Centers" +msgstr "Telien keskikohdat" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:39 -msgid "Elevations" -msgstr "Korkeustasot" +#: ../bin/dcar.c:1984 +msgid "Coupler Mount" +msgstr "Kytkimien sijoitus" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:38 -msgid "Elevations and Profile" -msgstr "Korkeustasot ja profiili" +#: ../bin/dcar.c:1986 +msgid "Coupled Length" +msgstr "Pituus kytkimineen" -#: ../bin/doption.c:193 ../bin/csnap.c:520 -msgid "Enable" -msgstr "Salli" +#: ../bin/dcar.c:1988 ../bin/dcar.c:3954 +msgid "Coupler Length" +msgstr "Kytkinten ulkonema" -#: ../bin/misc.c:2201 -msgid "Enable SnapGrid" -msgstr "Käytä kohdistusruudukkoa" +#: ../bin/dcar.c:1996 +msgid "Purchase Price" +msgstr "Ostohinta" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:276 -msgid "Enable labels for Turnouts, Flextrack Lengths and Elevations" -msgstr "Määrittelee missä kohteissa näytetään merkintöjä" +#: ../bin/dcar.c:1998 ../../../../build/work/app/bin/bllnhlp.c:213 +msgid "Current Price" +msgstr "Nykyinen hinta" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:313 -msgid "Enable prices on the Parts List" -msgstr "Näytä hinnat osaluettelossa" +#: ../bin/dcar.c:2000 ../bin/dcar.c:4080 ../bin/dcar.c:4085 +msgid "Condition" +msgstr "Kunto" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:73 -msgid "Enable snap grid" -msgstr "Käytä kohdistusruudukkoa" +#: ../bin/dcar.c:2002 +msgid "Purchase Date" +msgstr "Ostopäivä" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:284 -msgid "Enable/Disable balloon popup help windows" -msgstr "Käytetäänkö pikaopasteita (tooltip)" +#: ../bin/dcar.c:2004 ../bin/dcar.c:4085 +msgid "Service Date" +msgstr "Huollettu" -#: ../bin/macro.c:84 -msgid "End" -msgstr "Lopeta" +#: ../bin/dcar.c:2006 +msgid "Quantity" +msgstr "Määrä" -#: ../bin/param.c:395 -msgid "End Of String" -msgstr "Merkkijonon loppu" +#: ../bin/dcar.c:2008 +msgid "Numbers" +msgstr "Numerot" -#: ../bin/cselect.c:1851 ../bin/cselect.c:1855 -msgid "End Points" -msgstr "Päätepisteet" +#: ../bin/dcar.c:2010 ../bin/dcar.c:4081 +#: ../../../../build/work/app/i18n/custmsg.h:61 +msgid "Notes" +msgstr "Muistiinpanot" -#: ../bin/tcurve.c:338 ../bin/tease.c:497 ../bin/compound.c:512 -#: ../bin/tstraigh.c:76 ../bin/cdraw.c:184 -msgid "End Pt 1: X" -msgstr "Päätepiste 1: X" +#: ../bin/dcar.c:2017 ../bin/dcustmgm.c:65 +msgid "Car Part" +msgstr "Malli" -#: ../bin/tcurve.c:340 ../bin/tease.c:499 ../bin/compound.c:514 -#: ../bin/tstraigh.c:78 ../bin/cdraw.c:185 -msgid "End Pt 2: X" -msgstr "Päätepiste 2: X" +#: ../bin/dcar.c:2018 ../bin/dcustmgm.c:66 +#: ../../../../build/work/app/bin/bllnhlp.c:188 +#: ../../../../build/work/app/bin/bllnhlp.c:189 +msgid "Car Prototype" +msgstr "Esikuva" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:421 -msgid "End a message" -msgstr "Lopeta viestin kirjoitus" +#: ../bin/dcar.c:2379 ../bin/dcar.c:2696 +msgid "Undecorated" +msgstr "Ei yhtiömerkintöjä" -#: ../bin/macro.c:198 -msgid "End of Playback. Hit Step to exit\n" -msgstr "Toisto on lopussa. Paina Seuraava vaihe -painiketta poistuaksesi.\n" +#: ../bin/dcar.c:2437 ../bin/dcar.c:2441 ../bin/fileio.c:656 +msgid "Custom" +msgstr "Itse rakennettu" -#: ../bin/ctrain.c:718 -msgid "End of Track" -msgstr "Rata loppu" +#: ../bin/dcar.c:2606 +msgid "Undecorated " +msgstr "Ei yhtiömerkintöjä " -#: ../../../../build/xtrkcad/app/help/messages.h:107 +#: ../bin/dcar.c:2826 #, c-format -msgid "" -"End-Of-Line is unexpected in a quoted field.\n" -"%s\n" -"\n" -"Do you want to continue reading the file?" -msgstr "" -"Odottamaton rivin loppu lainausmerkkien sisällä.\n" -"%s\n" -"\n" -"Haluatko jatkaa tiedoston lukemista?" +msgid "New %s Scale Car" +msgstr "Uusi %s mittakaavan vaunu/veturi" -#: ../bin/dcmpnd.c:238 -#, c-format -msgid "End-Point #%d of the selected and actual turnouts are not aligned" -msgstr "Valitun ja todellisen vaihteen %d. päätepisteet eivät ole linjassa" +#: ../bin/dcar.c:2827 ../bin/dcar.c:2836 ../bin/dcar.c:2845 ../bin/dcar.c:3984 +#: ../bin/dcar.c:4112 +msgid "Add" +msgstr "Lisää" -#: ../bin/dcmpnd.c:229 +#: ../bin/dcar.c:2829 #, c-format -msgid "End-Point #%d of the selected and actual turnouts are not close" -msgstr "Valitun ja todellisen vaihteen %d. päätepisteet eivät ole lähekkäin" - -#: ../bin/doption.c:283 -msgid "End-Points" -msgstr "Päätepisteet" +msgid "Update %s Scale Car" +msgstr "Päivitä %s mittakaavan vaunu" -#: ../bin/doption.c:190 -msgid "EndPt Elevations" -msgstr "Päätepisteiden korkeudet" +#: ../bin/dcar.c:2830 ../bin/dcar.c:2839 ../bin/dcar.c:2848 +#: ../bin/dcmpnd.c:172 +msgid "Update" +msgstr "Päivitä" -#: ../bin/cprint.c:99 -msgid "Engineering Data" -msgstr "Suunnittelutiedot" +#: ../bin/dcar.c:2835 +#, c-format +msgid "New %s Scale Car Part" +msgstr "Uusi %s mittakaavan vaunu/veturi" -#: ../bin/doption.c:352 -msgid "English" -msgstr "Englantilaiset" +#: ../bin/dcar.c:2838 +#, c-format +msgid "Update %s Scale Car Part" +msgstr "Päivitä %s mittakaavan vaunu" -#: ../bin/misc.c:1914 -msgid "Enter Angle ..." -msgstr "Syötä kulma ..." +#: ../bin/dcar.c:2844 +msgid "New Prototype" +msgstr "Uusi esikuva" -#: ../bin/dcar.c:3485 -msgid "Enter a 8 digit date" -msgstr "Syötä 8 numeroinen päiväys" +#: ../bin/dcar.c:2847 +msgid "Update Prototype" +msgstr "Päivitä esikuva" -#: ../bin/dcar.c:3482 +#: ../bin/dcar.c:3490 msgid "Enter a 8 digit numeric date" msgstr "Syötä 8 numeroinen päiväys" -#: ../bin/dcar.c:3584 -msgid "Enter a Part Number" -msgstr "Syötä tuotekoodi" - -#: ../bin/dcar.c:3580 -msgid "Enter a Prototype name" -msgstr "Syötä esikuvan nimi" +#: ../bin/dcar.c:3493 +msgid "Enter a 8 digit date" +msgstr "Syötä 8 numeroinen päiväys" -#: ../bin/dcar.c:3487 +#: ../bin/dcar.c:3495 msgid "Enter a date between 19000101 and 21991231" msgstr "Syötä päivämärä %s ja %s väliltä" -#: ../bin/dcar.c:3598 -msgid "Enter a item Index" -msgstr "Syötä indeksi" - -#: ../wlib/gtklib/psprint.c:1309 -msgid "Enter a post-script font name for:" -msgstr "Syötä post-script kirjasimen nimi:" - -#: ../bin/param.c:1380 -#, c-format -msgid "Enter a value < %ld" -msgstr "Syötä arvo, joka on < %ld" - -#: ../bin/param.c:1425 -#, c-format -msgid "Enter a value < %s" -msgstr "Syötä arvo, joka on < %s" - -#: ../bin/param.c:1378 -#, c-format -msgid "Enter a value > %ld" -msgstr "Syötä arvo, joka on > %ld" - -#: ../bin/param.c:1422 -#, c-format -msgid "Enter a value > %s" -msgstr "Syätä arvo, joka on > %s" - -#: ../bin/param.c:1382 -#, c-format -msgid "Enter a value between %ld and %ld" -msgstr "Syötä arvo %ld ja %ld väliltä" +#: ../bin/dcar.c:3500 +msgid "Invalid month" +msgstr "Epäkelpo kuukausi" -#: ../bin/param.c:1428 -#, c-format -msgid "Enter a value between %s and %s" -msgstr "Syötä arvo %s ja %s väliltä" +#: ../bin/dcar.c:3502 +msgid "Invalid day" +msgstr "Epäkelpo päivä" -#: ../wlib/gtklib/psprint.c:1088 -msgid "Enter both printer name and command" -msgstr "Syötä tulostimen nimi ja komento" +#: ../bin/dcar.c:3588 +msgid "Enter a Prototype name" +msgstr "Syötä esikuvan nimi" -#: ../wlib/gtklib/psprint.c:1116 -msgid "Enter printer name" -msgstr "Syötä tulostimen nimi" +#: ../bin/dcar.c:3590 +msgid "Select or Enter a Manufacturer" +msgstr "Valitse tai syötä valmistaja" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:113 -msgid "Enter text on the layout" -msgstr "Lisää tekstiä ratasuunnitelmaan" +#: ../bin/dcar.c:3592 +msgid "Enter a Part Number" +msgstr "Syötä tuotekoodi" -#: ../bin/dcar.c:3586 +#: ../bin/dcar.c:3594 msgid "Enter the Car Length" msgstr "Syötä vaunun pituus" -#: ../bin/dcar.c:3588 +#: ../bin/dcar.c:3596 msgid "Enter the Car Width" msgstr "Syötä vaunun leveys" -#: ../bin/dcar.c:3596 -msgid "Enter the Coupled Length" -msgstr "Syötä pituus kytkimineen" - -#: ../bin/dcar.c:3594 -msgid "Enter the Coupled Length or Coupler Length" -msgstr "Syötä pituus kytkimineen tai kytkimen pituus" - -#: ../bin/dcar.c:3590 +#: ../bin/dcar.c:3598 msgid "Enter the Truck Centers" msgstr "Syötä telien keskipisteiden etäisyys" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:364 -msgid "Enter the key value as specified in the XTrackCAD Registration Notice" -msgstr "Syötä avain kuten XTrackCAD rekisteröintitiedotteessa on määritelty" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:363 -msgid "Enter your name as specified in the XTrackCAD Registration Notice" -msgstr "Syötä nimesi kuten XTrackCAD rekisteröintitiedotteessa on määritelty" - -#: ../../../../build/xtrkcad/app/help/messages.h:109 -#, c-format -msgid "" -"Error \\\\\"%s\\\\\" occurred while writing %s.\n" -"Please check disk space and system status." +#: ../bin/dcar.c:3600 +msgid "Truck Centers must be less than Car Length" msgstr "" -"Virhe \\\\\"%s\\\\\" tapahtui kirjoitettaessa %s.\n" -"Tarkasta levytila ja järjestelmän tila." +"Telien keskikohtien välisen etäisyyden on oltava vaunun pituutta pienempi" -#: ../bin/dcar.c:1086 ../bin/dcar.c:4780 -msgid "Excellent" -msgstr "Erinomainen" +#: ../bin/dcar.c:3602 +msgid "Enter the Coupled Length or Coupler Length" +msgstr "Syötä pituus kytkimineen tai kytkimen pituus" -#: ../bin/doption.c:537 -msgid "Exception Track" -msgstr "Erityisraiteet" +#: ../bin/dcar.c:3604 +msgid "Enter the Coupled Length" +msgstr "Syötä pituus kytkimineen" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:46 -msgid "Exception Tracks" -msgstr "Erityisraiteet" +#: ../bin/dcar.c:3606 +msgid "Enter a item Index" +msgstr "Syötä indeksi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:234 -msgid "Executes the next step of the demo" -msgstr "Suorittaa seuraavan vaiheen demossa" +#: ../bin/dcar.c:3608 +msgid "Purchase Price is not valid" +msgstr "Ostohinta ei ole kelvollinen" -#: ../wlib/gtklib/wpref.c:139 ../wlib/gtklib/wpref.c:147 -#: ../wlib/gtklib/wpref.c:152 ../wlib/gtklib/wpref.c:174 -msgid "Exit" -msgstr "Poistu" +#: ../bin/dcar.c:3610 +msgid "Current Price is not valid" +msgstr "Nykyinen hinta ei ole kelvollinen" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:119 -msgid "Exit Trains" -msgstr "Poistu junien ajosta" +#: ../bin/dcar.c:3612 +msgid "Purchase Date is not valid" +msgstr "Ostopäivä ei ole kelvollinen" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:139 -msgid "Exit the program" -msgstr "Poistu ohjelmasta" +#: ../bin/dcar.c:3614 +msgid "Service Date is not valid" +msgstr "Huollon päiväys ei ole kelvollinen" -#: ../bin/param.c:252 -msgid "Expected /" -msgstr "Odotettiin /" +#: ../bin/dcar.c:3617 +#, c-format +msgid "Item Index %ld duplicated an existing item: updated to new value" +msgstr "Indeksi %ld oli jo käytössä. Annettiin indeksille uusi arvo." -#: ../bin/param.c:324 -msgid "Expected End Of String" -msgstr "Odotettiin merkkijonon loppua" +#: ../bin/dcar.c:3812 +#, c-format +msgid "Added %ld new Cars" +msgstr "Lisätty %ld uutta vaunua/veturia" -#: ../bin/param.c:189 -msgid "Expected digit" -msgstr "Odotettiin numeroa" +#: ../bin/dcar.c:3814 +msgid "Added new Car" +msgstr "Lisätty uusi vaunu/veturi" -#: ../bin/fileio.c:1202 ../bin/dcar.c:4110 -msgid "Export" -msgstr "Vie tiedostoon" +#: ../bin/dcar.c:3817 +msgid "Updated Car" +msgstr "Päivitä vaunu/veturi" -#: ../bin/dcar.c:4699 ../bin/dcar.c:4750 -msgid "Export Cars" -msgstr "Vie vaunut tiedostoon" +#: ../bin/dcar.c:3820 +msgid " and Part" +msgstr " ja malli" -#: ../bin/misc.c:2141 -msgid "Export D&XF" -msgstr "Vie DXF tiedostoon" - -#: ../bin/fileio.c:1226 -msgid "Export Tracks" -msgstr "Vie raiteet tiedostoon" +#: ../bin/dcar.c:3847 +#, c-format +msgid "%s Part: %s %s %s %s %s %s" +msgstr "%s malli: %s %s %s %s %s %s" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:68 -msgid "Export a .xti file" -msgstr "Vie .xti tiedostoon" +#: ../bin/dcar.c:3847 ../bin/dcar.c:3864 +msgid "Added new" +msgstr "Lisätty uusi" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:218 -msgid "Export a Car Item .csv file" -msgstr "Vie .cvs tiedostoon" +#: ../bin/dcar.c:3847 ../bin/dcar.c:3864 +msgid "Updated" +msgstr "Päivitetty" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:69 -msgid "Export a DXF file" -msgstr "Vie DXF tiedostoon" +#: ../bin/dcar.c:3863 +#, c-format +msgid "%s Prototype: %s%s." +msgstr "%s esikuva: %s%s." -#: ../bin/misc.c:2139 -msgid "Export to &Bitmap" -msgstr "Vie bitmap tiedostoon" +#: ../bin/dcar.c:3865 +msgid ". Enter new values or press Close" +msgstr ". Syötä uudet arvot tai paina Sulje" -#: ../bin/fileio.c:1403 -msgid "Export to DXF" -msgstr "Vie DXF tiedostoon" +#: ../bin/dcar.c:3984 +msgid "New Car Part" +msgstr "Uusi malli" -#: ../bin/cmodify.c:330 -msgid "Extend Track" -msgstr "Jatka raidetta" +#: ../bin/dcar.c:4079 ../bin/dcar.c:4084 +#: ../../../../build/work/app/bin/bllnhlp.c:377 +msgid "Roadname" +msgstr "Rautatieyhtiö" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:21 -msgid "Extending" -msgstr "Pidentäminen" +#: ../bin/dcar.c:4079 +msgid "Purc Price" +msgstr "Ostohinta" -#: ../bin/tstraigh.c:457 -msgid "Extending Straight Track" -msgstr "Jatketaan suoraa raidetta" +#: ../bin/dcar.c:4080 ../bin/dcar.c:4085 +msgid "Curr Price" +msgstr "Nykyinen hinta" -#: ../wlib/gtklib/psprint.c:1280 -msgid "Factor" -msgstr "Kerroin" +#: ../bin/dcar.c:4080 +msgid "Purc Date" +msgstr "Ostopäivä" -#: ../bin/dcar.c:1088 ../bin/dcar.c:4778 -msgid "Fair" -msgstr "Tyydyttävä" +#: ../bin/dcar.c:4080 +msgid "Srvc Date" +msgstr "Huollettu" -#: ../bin/macro.c:1227 -msgid "Fast" -msgstr "Nopea" +#: ../bin/dcar.c:4081 +msgid "Locat'n" +msgstr "Sijainti" -#: ../bin/macro.c:1228 -msgid "Faster" -msgstr "Nopeampi" +#: ../bin/dcar.c:4084 +msgid "RepMarks" +msgstr "Tunnus" -#: ../bin/macro.c:1229 -msgid "Fastest" -msgstr "Nopein" +#: ../bin/dcar.c:4084 +msgid "Purch Price" +msgstr "Ostohinta" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:133 -msgid "File Menu" -msgstr "Tiedosto valikko" +#: ../bin/dcar.c:4085 +msgid "Purch Date" +msgstr "Ostopäivä" -#: ../wlib/gtklib/psprint.c:1304 -msgid "File Name? " -msgstr "Tiedostonimi?" +#: ../bin/dcar.c:4102 +msgid "Sort By" +msgstr "Lajittelu" -#: ../../../../build/xtrkcad/app/help/messages.h:129 -#, c-format -msgid "" -"File version %ld is lower than the minimum\n" -"supported version %d. You need to update your\n" -"layout file using an older version of %s" -msgstr "" -"Tiedoston versio %ld on pienempi kuin pienin tuettu versio %d\n" -"Ratasuunnitelmasi täytyy päivittää käyttäen vanhempaa versiota %s:sta." +#: ../bin/dcar.c:4110 ../bin/dcontmgm.c:99 ../bin/dcustmgm.c:58 +#: ../bin/dcustmgm.c:95 +msgid "Edit" +msgstr "Muokkaa" -#: ../bin/cdraw.c:837 ../bin/cdraw.c:1045 -msgid "Filled Box" -msgstr "Täytetty nelikulmio" +#: ../bin/dcar.c:4114 ../bin/dcontmgm.c:101 ../bin/dcustmgm.c:60 +#: ../bin/misc.c:1993 +msgid "Delete" +msgstr "Poista" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:158 -msgid "Filled Boxes and Circles work the same as line Boxes and Circles.\n" -msgstr "" -"Täytetyt nelikulmiot ja täytetyt ympyrät toimivat samoin kuin tyhjät " -"nelikulmiot ja ympyrät.\n" +#: ../bin/dcar.c:4118 ../bin/fileio.c:1212 +msgid "Export" +msgstr "Vie tiedostoon" -#: ../bin/cdraw.c:454 ../bin/cdraw.c:834 ../bin/cdraw.c:835 ../bin/cdraw.c:836 -msgid "Filled Circle" -msgstr "Täytetty ympyrä" +#: ../bin/dcar.c:4120 ../../../../build/work/app/bin/bllnhlp.c:540 +msgid "List" +msgstr "Luettelo" -#: ../bin/ctrain.c:564 ../bin/dcar.c:4955 -msgid "Find" -msgstr "Etsi" +#: ../bin/dcar.c:4234 ../bin/dcar.c:4966 ../bin/misc.c:2262 +msgid "Car Inventory" +msgstr "Kalustoluettelo" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:413 -msgid "Find a parameter file for loading" -msgstr "Etsi ladattava parametritiedosto" +#: ../bin/dcar.c:4354 +msgid "List Cars" +msgstr "Luetteloi vaunut" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:471 -msgid "Find train on layout" -msgstr "Etsi juna ratasuunnitelmasta" +#: ../bin/dcar.c:4476 ../bin/dcar.c:4639 +msgid "Import Cars" +msgstr "Tuo vaunut tiedostosta" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:208 -msgid "Finds the selected Car Item on the layout" -msgstr "Etsii valitun junan ratasuunnitelmasta" +#: ../bin/dcar.c:4640 ../bin/dcar.c:4762 +msgid "Comma-Separated-Values|*.csv" +msgstr "Pilkulla erotetut arvot|*.csv" -#: ../bin/track.c:1917 ../bin/cjoin.c:508 ../bin/cmisc.c:53 -msgid "First" -msgstr "Ensimmäinen" +#: ../bin/dcar.c:4710 ../bin/dcar.c:4761 +msgid "Export Cars" +msgstr "Vie vaunut tiedostoon" -#: ../bin/cjoin.c:663 -msgid "First " -msgstr "Ensimmäinen " +#: ../bin/dcar.c:4795 +msgid "Layout" +msgstr "Ratasuunnitelma" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:471 -msgid "First command.\n" +#: ../../../../build/work/app/i18n/custmsg.h:147 +msgid "" +"We rotate the signals by Shift-Right-Click and select 90° CW on the popup " +"menu. We can not show the popup menu in demo mode, but will simulate the " +"effect.\n" msgstr "" -"Valittuja raiteita voidaan siirtää tai pyörittää Valitse -komennon ollessa " -"aktiivisena.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:397 -msgid "Selecting a selected track de-selects it.\n" -msgstr "Klikkaamalla jo valittuna olevaa raidetta, sen valinta poistuu.\n" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:384 -msgid "Selection list for prices" -msgstr "Hintojen valintaluettelo" +"Pyöritämme opastimia pitämällä vaihto-näppäintä painettuna ja klikkaamalla " +"hiiren oikealla painikkeella avataksemme ponnahdusvalikon. Sieltä valitsemme " +"90° MP (myötäpäivään). Demossa ei voida näyttää ponnahdusvalikkoa, mutta " +"näytämme komennon vaikutuksen.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:106 -msgid "Selects all objects in the current Layer" -msgstr "Valitse kaikki nykyisen tason objektit" +#: ../../../../build/work/app/i18n/custmsg.h:148 +msgid "The exits from the siding will be protected by single headed signals.\n" +msgstr "Sivuraiteelta lähdöt suojataan yksiosaisilla opastimilla.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:105 -msgid "Selects all objects on the layout" -msgstr "Valitse kaikki ratasuunnitelman objektit" +#: ../../../../build/work/app/i18n/custmsg.h:149 +msgid "Now for some touch-ups.\n" +msgstr "Nyt kohennetaan hieman kaaviota.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:81 -msgid "Selects the current drawing layer" -msgstr "Valitsee piirtotason" +#: ../../../../build/work/app/i18n/custmsg.h:150 +msgid "Notice when the line meet at an angle there is a gap.\n" +msgstr "Huomaa viivojen liitoskohdissa pienet raot.\n" -#: ../bin/tcurve.c:345 ../bin/ctodesgn.c:382 ../bin/ctodesgn.c:402 -#: ../bin/ctodesgn.c:422 ../bin/cparalle.c:41 ../bin/cparalle.c:71 -#: ../bin/cparalle.c:83 -msgid "Separation" -msgstr "Väli" +#: ../../../../build/work/app/i18n/custmsg.h:151 +msgid "We will fill this gap with the Å’\" dot.\n" +msgstr "Näytämme ne 1/4 tuuman pisteillä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:336 -msgid "Separation between helix layers" -msgstr "Helixin kerrosten välinen etäisyys" +#: ../../../../build/work/app/i18n/custmsg.h:152 +msgid "" +"Note: Win95/Win98/WinME does not support drawing lines with flat end-caps, " +"but only with round end-caps.\n" +msgstr "" +"Huom: Win96/Win98/WinME ei tue tasapäisten viivojen piirtoa, vaan ainoastaan " +"pyöreäpäisiä viivoja.\n" -#: ../bin/dcar.c:1924 -msgid "Sequential" -msgstr "Peräkkäinen" +#: ../../../../build/work/app/i18n/custmsg.h:153 +msgid "Users on those platforms will not see the gap.\n" +msgstr "Mainittujen käyttöjärjestelmien käyttäjät eivät näe näitä rakoja.\n" -#: ../bin/dcar.c:1996 ../bin/dcar.c:4077 -msgid "Service Date" -msgstr "Huollettu" +#: ../../../../build/work/app/i18n/custmsg.h:154 +msgid "" +"Add an arrow head to indicate the tracks that connect to the rest of the " +"layout.\n" +msgstr "" +"Lisää nuolenkärjet kuvaamaan raiteiden jatkumista muihin radan osiin.\n" -#: ../bin/dcar.c:3606 -msgid "Service Date is not valid" -msgstr "Huollon päiväys ei ole kelvollinen" +#: ../../../../build/work/app/i18n/custmsg.h:155 +msgid "Rotate the arrow head by 180° and move into position.\n" +msgstr "Pyöritä nuolenkärkeä 180° ja siirrä se paikoilleen.\n" -#: ../bin/csplit.c:45 -msgid "Set Block Gaps" -msgstr "Aseta lohkojen välit" +#: ../../../../build/work/app/i18n/custmsg.h:156 +msgid "And add some labels.\n" +msgstr "Lisää joitakin merkintöjä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:21 -msgid "Set Circle Track creation mode" -msgstr "Aseta ympyräradan luonti komento" +#: ../../../../build/work/app/i18n/custmsg.h:157 +msgid "" +"We want to print our control panel onto a 8Å“x11 page, but the control panel " +"is a bit too wide.\n" +msgstr "" +"Haluamme tulostaa ohjeuspaneelin 8 1/2 x 11 tuuman kokoiseksi, mutta " +"ohjauspaneeli on hieman liian suuri.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:42 -msgid "Set Circle drawing command" -msgstr "Aseta ympyrän piirto komento" +#: ../../../../build/work/app/i18n/custmsg.h:158 +msgid "Lets tighten it up a bit.\n" +msgstr "Tiivistetään hieman.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:31 -msgid "Set Curve Track creation mode" -msgstr "Aseta kaarevan raiteen luonti komento" +#: ../../../../build/work/app/i18n/custmsg.h:159 +msgid "" +"First turn the Snap Grid on again so any moves we make will keep objects on " +"the grid.\n" +msgstr "" +"Ota taas kohdistusruudukko käyttöön, jotta objektit pysyvät linjassa.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:47 -msgid "Set Curve drawing command" -msgstr "Aseta kaaren piirto komento" +#: ../../../../build/work/app/i18n/custmsg.h:160 +msgid "Lets move the spur track the left 3/4\"\n" +msgstr "Siirrämme pistoraidetta vasemmalle 3/4 tuumaa.\n" -#: ../bin/celev.c:204 -msgid "Set Elevation" -msgstr "Aseta korkeus" +#: ../../../../build/work/app/i18n/custmsg.h:161 +msgid "Now move the right side of the siding over.\n" +msgstr "Siirretään liikennepaikan oikeaa puolta vasemmalle.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:62 -msgid "Set Line drawing command" -msgstr "Aseta suorien objektien piirto komento" +#: ../../../../build/work/app/i18n/custmsg.h:162 +msgid "Now, adjust the ends of the mainline and siding tracks.\n" +msgstr "Lyhennä nyt pääraide ja sivuraide sopivan mittaisiksi.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:63 -msgid "Set Shape drawing command" -msgstr "Aseta muotojen piirto komento" +#: ../../../../build/work/app/i18n/custmsg.h:163 +msgid "And move the title over as well.\n" +msgstr "Siirrä myös otsikkoa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:577 -msgid "" -"Set your modeling scale on the \"Options|Layout\" dialog. This controls the " -"Turnouts and Structures that are available, Easement values and track gauge." -msgstr "" -"Mittakaava asetetaan \"Asetukset|Ratasuunnitelma\" ikkunasta. Tämä asetus " -"määrää mitkä raideosat ja rakennukset ovat käytettävissä sekä " -"kaarreloivennuksen arvot ja raideleveyden." +#: ../../../../build/work/app/i18n/custmsg.h:164 +msgid "Now you can print it.\n" +msgstr "Nyt voit tulostaa sen.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:391 -msgid "Sets page size to the maximum (based on scale and physical page size)" +#: ../../../../build/work/app/i18n/custmsg.h:165 +msgid "The cross-hairs on the LEDs and switch show the centers for drilling.\n" msgstr "" -"Aseta sivun koko suurimmaksi mahdolliseksi mittakaavan ja fyysisen sivukoon " -"mukaan" +"LEDien ja kytkimien ristikkoviiva osoittaa niiden keskipisteet poraamista " +"varten.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:393 -msgid "Sets scale, origin and angle for a one page printout of the layout" +#: ../../../../build/work/app/i18n/custmsg.h:166 +msgid "" +"Pressing the button lets you delete selected tracks from the " +"layout.\n" msgstr "" -"Asettaa tulostusmittakaavan, origon ja kulman siten, että koko " -"ratasuunnitelma mahtuu yhdelle sivulle" +"Poista-painikkeella voidaan poistaa valitut raiteet ratasuunnitelmsta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:540 +#: ../../../../build/work/app/i18n/custmsg.h:167 msgid "" -"Setting these values changes the Radius to 21.2\" and the number of Turns to " -"6.\n" +"First you select the tracks you want to delete, and then press the " +"button.\n" msgstr "" -"Näillä arvoilla säde muuttui 21,2 tuumaksi ja kierrosten lukumäärä 6:ksi.\n" - -#: ../bin/cprint.c:136 -msgid "Setup" -msgstr "Asetukset" - -#: ../bin/cdraw.c:1066 -msgid "Shapes" -msgstr "Muodot" +"Valitse ensin raideosat, jotka haluat poistaa ja paina sitten Poista-" +"nappia.\n" -#: ../bin/dease.c:63 -msgid "Sharp" -msgstr "Jyrkkä" +#: ../../../../build/work/app/i18n/custmsg.h:168 +msgid "" +"If you delete a track connected to an easement curve, then the easement " +"curve is deleted as well.\n" +msgstr "" +"Jos poistat raideosan, joka on liitetty kaarreloivennukseen, poistetaan myös " +"kaarreloivennus.\n" -#: ../bin/dcar.c:4786 -msgid "Shelf" -msgstr "Hyllyssä" +#: ../../../../build/work/app/i18n/custmsg.h:169 +msgid "You can use the command to undelete tracks.\n" +msgstr "Voit käyttää Kumoa-toimintoa palauttaaksesi poistamasi raideosat.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:398 +#: ../../../../build/work/app/i18n/custmsg.h:170 msgid "" -"Shift-Left-Click on a track will select all unselected tracks connected to " -"the track. Selection stops at a previously selected track.\n" +"If you Left-Drag on the layout you can select all tracks within an area.\n" msgstr "" -"Pitämällä vaihto-näppäintä pohjassa ja klikkaamalla raidetta, valitaan " -"kaikki tähän raiteeseen yhtyvät raiteet. Valinta pysähtyy kuitenkin " -"ensimmäiseen jo valittuun raiteeseen.\n" +"Raahaamalla hiiren vasemmalla voit valita kaikki raideosat valitulta " +"alueelta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:403 -msgid "Shift-Left-Drag is used to move selected tracks.\n" +#: ../../../../build/work/app/i18n/custmsg.h:171 +msgid "" +"Note, only tracks within the selected area are deleted. Since the easement " +"curve is connected to a deleted track, it is deleted as well.\n" msgstr "" -"Voit siirtää valittuja objekteja pitämällä vaihto-näppäintä painettuna ja " -"raahaamalla hiiren vasemmalla painikkeella.\n" +"Huom: Vain valitulla alueella olevat raideosat poistetaan. Koska " +"kaarreloivennus liittyy poistettavaan raideosaan, poistetaan se myös.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:227 +#: ../../../../build/work/app/i18n/custmsg.h:172 msgid "" -"Shift-Right-Click will display a popup-menu that you can use to rotate by " -"fixed amount (15°, 30°, 45°, 90° or 180°). The demonstration cannot show " -"the popup-menu but it can show the effects.\n" +"The demo also simulates entering values and selecting options on various " +"dialogs.\n" msgstr "" -"Vaihto + oikea klikkaus avaa ponnahdusvalikon, josta voi pyörittää määrätyn " -"kulman verran (15°, 30°, 45°, 90° or 180°). Demossa ei voida näyttää " -"ponnahdusvalikkoa, mutta näytämme toiminnon vaikutuksen.\n" +"Tässä demossa simuloidaan myös arvojen syöttämistä ja valintojen tekemistä " +"dialogeissa (ikkunoissa).\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:413 +#: ../../../../build/work/app/i18n/custmsg.h:173 msgid "" -"Shift-Right-Drag rotates the selected tracks about the pivot point (which is " -"where you started the drag)\n" +"This is simulated by drawing a rectangle around the control when values are " +"entered or changed.\n" msgstr "" -"Painamalla vaihto-näppäintä ja raahaamalla hiiren oikealla painikkeella voit " -"pyörittää valittuja raiteita. Kiertopiste määräytyy sen mukaan, mistä " -"raahaaminen aloitettiin.\n" +"Tämä esitetään piirtämällä nelikulmio sen kontrollin ympärille, jonka arvoja " +"ollaan syöttämässä tai muuttamassa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:609 +#: ../../../../build/work/app/i18n/custmsg.h:174 msgid "" -"Short cut Layer buttons can also be displayed on the tool bar for up to the " -"first 20 layers.\n" -"This buttons allow to Show or Hide the layers." +"Here we are going to make some changes to the Display dialog. Notice how " +"this is simulated.\n" msgstr "" +"Tässä teemme joitakin muutoksia Näyttö asetuksiin. Huomaa esitystapa.\n" -#: ../bin/csnap.c:537 -msgid "Show" -msgstr "Näytä" - -#: ../bin/cselect.c:1477 -msgid "Show Description" -msgstr "Näytä kuvaus" - -#: ../bin/dprmfile.c:217 -msgid "Show File Names" -msgstr "Näytä tiedostojen nimet" +#: ../../../../build/work/app/i18n/custmsg.h:175 +msgid "" +"This effect is only used in demonstration mode. During normal operation you " +"will not see this.\n" +msgstr "" +"Tämä tehoste on käytössä ainoastaan demo -tilassa. Normaalissa käyttötilassa " +"näin ei ole.\n" -#: ../bin/misc.c:2203 -msgid "Show SnapGrid" -msgstr "Näytä kohdistusruudukko" +#: ../../../../build/work/app/i18n/custmsg.h:176 +msgid "Dimension Lines are used to mark the distances between two points.\n" +msgstr "" +"Mittajanoja käytetään merkitsemään kahden pisteen välisiä etäisyyksiä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:461 -msgid "Show Tip of the Day every time the program starts" -msgstr "Näytä päivän vinkki jokaisen käynnistyksen yhteydessä" +#: ../../../../build/work/app/i18n/custmsg.h:177 +msgid "" +"Here we will create a Dimension Line to show the separation between two " +"tracks.\n" +msgstr "" +"Tässä luodaan mittajana näyttämään kahden raiteen välistä etäisyyttä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:103 -msgid "Show a ruler" -msgstr "Näytä viivain" +#: ../../../../build/work/app/i18n/custmsg.h:178 +msgid "" +"We might also want to measure the distance between two structures. In this " +"case we will use a larger dimension line.\n" +msgstr "" +"Haluamme myös mitata kahden rakennuksen välisen etäisyyden. Tässä " +"tapauksessa käytämme suurempaa mittajanaa.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:411 -msgid "Show parameter files by names or descriptions" -msgstr "Näytä parametritiedostojen nimet tai kuvaukset" +#: ../../../../build/work/app/i18n/custmsg.h:179 +msgid "" +"We can use the command to change the position of the Dimension " +"Line and the size of the numbers.\n" +msgstr "" +"Voimme käyttää määrittele-komentoa muuttaaksemme mittajanan sijaintia ja " +"numeroiden kokoa.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:74 -msgid "Show snap grid" -msgstr "Näytä kohdistusruudukko" +#: ../../../../build/work/app/i18n/custmsg.h:180 +msgid "" +"This example will show the effect of using easements while joining tracks.\n" +msgstr "" +"Tässä esimerkissä näytetään kaarreloivennuksen vaikutus yhdistettäessä " +"raiteita.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:462 -msgid "Show the next Tip of the Day" -msgstr "Näytä seuraava vinkki" +#: ../../../../build/work/app/i18n/custmsg.h:181 +msgid "First, we'll enable easements.\n" +msgstr "Ensiksi otetaan kaarreloivennus käyttöön.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:463 -msgid "Show the previous Tip of the Day" -msgstr "Näytä edellinen vinkki" +#: ../../../../build/work/app/i18n/custmsg.h:182 +msgid "" +"We've selected sharp easements. The minimum radius curve we can use will be " +"9.75\"\n" +msgstr "" +"Olemme valinneet jyrkät kaarreloivennukset. Pienin käytettävissä oleva " +"kaarresäde on 9,75 tuumaa.\n" -#: ../bin/smalldlg.c:64 -msgid "Show tips at start" -msgstr "Vinkki ohjelman alussa" +#: ../../../../build/work/app/i18n/custmsg.h:183 +msgid "Notice the label on the Easement button has changed to 'Sharp'.\n" +msgstr "" +"Huomaa että kaarreloivennus-painikkeen (Easements) tila on muuttunut " +"\"jyrkäksi\" (Sharp).\n" -#: ../bin/dlayer.c:447 ../bin/dlayer.c:663 ../bin/dlayer.c:719 -#: ../bin/dlayer.c:763 ../bin/dlayer.c:928 -msgid "Show/Hide Layer" -msgstr "Näytä/piilota taso" +#: ../../../../build/work/app/i18n/custmsg.h:184 +msgid "" +"Note the connecting curve does not quite meet the straight tracks. This the " +"'Offset'.\n" +msgstr "" +"Huomaa, ettei yhdistävä kaarre kohtaa aivan tarkasti suoria raiteita. Tämä " +"on \"siirtymä\".\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:320 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:321 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:322 -msgid "Shows the origin and angle of the grid" -msgstr "Ruudukon origo ja kulma" +#: ../../../../build/work/app/i18n/custmsg.h:185 +msgid "Here the connecting curve is too small.\n" +msgstr "Tässä yhdistävä kaarre on liian pieni.\n" -#: ../bin/doption.c:282 ../bin/cselect.c:1850 ../bin/cselect.c:1854 -msgid "Simple" -msgstr "Yksinkertainen" +#: ../../../../build/work/app/i18n/custmsg.h:186 +msgid "" +"The connecting curve is made of three tracks, the curve and two easement " +"segments on each end.\n" +msgstr "" +"Yhdistävä kaarre on tehty kolmesta raideosasta: kaarteesta ja molemmissa " +"päissä olevista kaarreloivennuksesta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:14 -msgid "Simple tracks" -msgstr "Yksinkertaiset raideosat" +#: ../../../../build/work/app/i18n/custmsg.h:187 +msgid "" +"We have designed part of the layout with a siding, 2 branches and a spiral " +"loop. We want to set Elevations.\n" +msgstr "" +"Meillä on ratasuunnitelma jossa on sivuraide, kaksi haaraa ja silmukka, joka " +"muodostaa radalle risteyksen.\n" +" Haluamme asetella radan korkeustasot.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:526 -msgid "Simply select the spot on the track you want to split.\n" -msgstr "Valitse radalta kohta, jonka haluat pilkkoa.\n" +#: ../../../../build/work/app/i18n/custmsg.h:188 +msgid "First we will set elevations at the end of the branches.\n" +msgstr "Ensin asetamme korkeustasot haarojen päihin.\n" -#: ../bin/ctodesgn.c:350 -msgid "Single Slipswitch" -msgstr "Yksipuolinen risteysvaihde" +#: ../../../../build/work/app/i18n/custmsg.h:189 +msgid "We'll select the end of the top branch and set the Elevation to 4\"\n" +msgstr "" +"Valitsemme ylemmän haaran pään ja asetamme sille haluamamme korkeustason.\n" -#: ../bin/cdraw.c:197 ../bin/cdraw.c:817 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:516 -msgid "Size" -msgstr "Koko" +#: ../../../../build/work/app/i18n/custmsg.h:190 +msgid "First, click on the End-Point.\n" +msgstr "Klikkaa ensin päätepistettä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:296 -msgid "Size of Dimension Arrows" -msgstr "Mittajanan nuolten koko" +#: ../../../../build/work/app/i18n/custmsg.h:191 +msgid "Next, pick Defined on the Elevation dialog Radio box.\n" +msgstr "" +"Seuraavaksi muuta korkeustasojen määrittely ikkunassa tyypiksi \"Määritelty" +"\".\n" -#: ../bin/dcmpnd.c:318 -msgid "Skip" -msgstr "Sivuuta" +#: ../../../../build/work/app/i18n/custmsg.h:192 +msgid "And set the Elevation to 4.\n" +msgstr "Ja aseta haluttu korkeustaso.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:424 -msgid "Skip this turnout" -msgstr "Hyppää tämän vaihteen yli" +#: ../../../../build/work/app/i18n/custmsg.h:193 +msgid "Now, select the other branch and set it's elevation to 2\"\n" +msgstr "Vlitse nyt toinen haara ja aseta sen korkeustaso.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:235 -msgid "Skip to next demo" -msgstr "Siirry seuraavaan demoon" +#: ../../../../build/work/app/i18n/custmsg.h:194 +msgid "We can move the Elevations by using Right-Drag\n" +msgstr "" +"Voimme siirtää korkeustasojen merkintöjä raahaamalla hiiren oikealla " +"painikkeella.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:517 -msgid "Slant" -msgstr "Kursivoitu" +#: ../../../../build/work/app/i18n/custmsg.h:195 +msgid "Now, we set the Elevation at one end of the Siding.\n" +msgstr "Asetetaan nyt sivuraiteen toisen pään korkeustaso.\n" -#: ../bin/macro.c:1225 -msgid "Slow" -msgstr "Hidas" +#: ../../../../build/work/app/i18n/custmsg.h:196 +msgid "We want to find the elevations where the 2 tracks cross.\n" +msgstr "Voimme selvittää korkeustasot raiteiden risteyskohdassa.\n" -#: ../bin/macro.c:1224 -msgid "Slowest" -msgstr "Hitain" +#: ../../../../build/work/app/i18n/custmsg.h:197 +msgid "We picked an End-Point on the upper track.\n" +msgstr "Valitsimme raiteiden liitoskohdan ylemmältä radalta.\n" -#: ../bin/cdraw.c:501 ../bin/cdraw.c:927 -msgid "Small" -msgstr "Pieni" +#: ../../../../build/work/app/i18n/custmsg.h:198 +msgid "" +"XTrackCAD has computed the Elevation (2.34\") at this point based on the " +"Elevation at the siding and a combination of the of the first Elevations.\n" +msgstr "" +"XTrackCAD on laskenut tälle pisteelle korkeustason aiemmin antamiemme " +"korkeustasojen perusteella.\n" -#: ../bin/doption.c:529 ../bin/csnap.c:707 -msgid "Snap Grid" -msgstr "Kohdistusruudukko" +#: ../../../../build/work/app/i18n/custmsg.h:199 +msgid "" +"We create a Computed Elevation here that will be automatically adjusted " +"whenever the other Elevations are changed.\n" +msgstr "" +"Luomme tähän \"lasketun\" korkeustason, joka päivitetään automaattisesti jos " +"muita korkeustasoja muutetaan.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:438 -msgid "Snap Grid Line and Division" -msgstr "Kohdistusruudukko ja jakomerkinnät" +#: ../../../../build/work/app/i18n/custmsg.h:200 +msgid "" +"The Compute Elevation is based on Elevations at end of both of the " +"branches. We may want to base the Elevation on only one branch. For " +"example if one branch was the mainline we don't want the other branch " +"affecting this Computed Elevation.\n" +msgstr "" +"Laskettu korkeustaso perustuu molempien haarojen korkeustasoihin. Saatamme " +"haluta sitoa lasketun korkeustason vain yhteen haaraan. Jos esimerkiksi yksi " +"haaroista on päärata, emme halua muiden haarojen vaikuttavan tähän " +"laskettuun korkeustasoon.\n" -#: ../bin/cprint.c:116 -msgid "Snap Shot" -msgstr "Yhdelle sivulle" +#: ../../../../build/work/app/i18n/custmsg.h:201 +msgid "We do this by Ignoring the branch we don't want.\n" +msgstr "Teemme tämän hylkäämällä haaran, jota emme halua käyttää.\n" -#: ../bin/misc.c:1692 ../bin/misc.c:1722 -msgid "SnapGrid Buttons" -msgstr "Kohdistusruudukko" +#: ../../../../build/work/app/i18n/custmsg.h:202 +msgid "We'll ignore the lower branch.\n" +msgstr "Hylkäämme alemman haaran.\n" -#: ../bin/misc.c:2089 -msgid "SnapGrid Enable" -msgstr "Käytä kohdistusruudukkoa" +#: ../../../../build/work/app/i18n/custmsg.h:203 +msgid "" +"Notice at the End-Point where the tracks cross, we see the Elevation has " +"changed from 2.34 to 2.64.\n" +msgstr "" +"Huomaa kuinka risteyskohdan laskettu korkeustaso muuttui 2,34 tuumasta 2,64 " +"tuumaan.\n" -#: ../bin/misc.c:2090 -msgid "SnapGrid Show" -msgstr "Näytä kohdistusruudukko" +#: ../../../../build/work/app/i18n/custmsg.h:204 +msgid "Now we want to know the elevation of the lower track.\n" +msgstr "Nyt haluamme tietää alemman radan korkeustason.\n" -#: ../bin/doption.c:192 -msgid "Solid" -msgstr "Yhtenäinen" +#: ../../../../build/work/app/i18n/custmsg.h:205 +msgid "There is no End-Point on the lower track here.\n" +msgstr "Risteyksen kohdalla ei ole raiteiden liitosta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:242 +#: ../../../../build/work/app/i18n/custmsg.h:206 msgid "" -"Some Turnouts and Sectional track are pre-mounted on roadbed. For these " -"parts you can specify the width of the roadbed, the thickness of the lines " -"drawn for the edge of the roadbed and the color.\n" +"Use Shift-Left-Click to Split the track and create an End-Point we can use " +"for an Elevation,\n" msgstr "" -"Joihinkin raideosiin kuuluu kiinteä ratapenkka. Näitä osia varten voit " -"määrittää ratapenkan leveyden, reunaviivan paksuuden sekä reunaviivan " -"värin.\n" +"Paina vaihto-näppäintä ja klikkaa hiiren vasemmalla painikkeella rataa " +"luodaksesi liitoskohdan korkeustasoja varten\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:434 -msgid "Sometimes it's useful to modify turnouts triming one of the ends.\n" -msgstr "" -"Joskus on tarpeen muokata vaihteita säätämällä jonkin raiteen pituutta.\n" +#: ../../../../build/work/app/i18n/custmsg.h:207 +msgid "and create another Computed Elevation point.\n" +msgstr "ja luo sen kohdalle toinen laskettu korkeustaso.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:423 +#: ../../../../build/work/app/i18n/custmsg.h:208 +msgid "Now we want to label the Grade on this section of track.\n" +msgstr "Nyt haluamme merkitä raiteen tämän kohdan nousukulman.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:209 msgid "" -"Sometimes the Shift key is held down while using the mouse for a Shift-Click " -"or a Shift-Drag. \n" +"Again, since there is no End-Point nearby, we split the track to create an " +"End-Point we can use,\n" msgstr "" -"Joskus vaihto -näppäintä (shift) on painettava samalla kun hiirellä " -"klikataan tai raahataan.\n" - -#: ../bin/dcar.c:4094 -msgid "Sort By" -msgstr "Lajittelu" +"Taaskaan ei ole sopivaa raideliitosta lähistöllä, joten pilkomme raiteen\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:209 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:210 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:211 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:212 -msgid "Sort the Item list" -msgstr "Lajittele luettelo" +#: ../../../../build/work/app/i18n/custmsg.h:210 +msgid "and create a Grade marker.\n" +msgstr "ja luomme uuteen liitoskohtaan nousukulman merkinnän.\n" -#: ../bin/csnap.c:515 -msgid "Spacing" -msgstr "Väli" +#: ../../../../build/work/app/i18n/custmsg.h:211 +msgid "Note the marker has an arrow pointing in the upwards direction.\n" +msgstr "Huomaa kuinka nuolella ilmaistaan nousun suunta.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:314 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:317 -msgid "Spacing between major grid lines" -msgstr "Ruudukon pääviivojen väli" +#: ../../../../build/work/app/i18n/custmsg.h:212 +msgid "" +"The last thing we want to do is to create a Station label that we'll use in " +"the command.\n" +msgstr "" +"Lopuksi haluamme vielä luoda aseman merkinnän, jota käytämme myöhemmin " +"rataprofiilissa.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:486 -msgid "Specifies if angles are entered as Frog Numbers or in degrees" -msgstr "Määrittelee annetaanko kulmat asteina vai risteysnumerona" +#: ../../../../build/work/app/i18n/custmsg.h:213 +msgid "Now, set the Elevation to Station and enter the its name.\n" +msgstr "Valitse \"Asema\" ja syötä tekstikenttään aseman nimi.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:316 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:319 -msgid "Specifies if positions are snaped in this direction" -msgstr "Määrittelee kohdistetaanko tässä suunnassa" +#: ../../../../build/work/app/i18n/custmsg.h:214 +msgid "" +"XTrackCAD can help find tracks that are curved too sharply or are too " +"steep. These tracks are Exception tracks and are drawn in the Exception " +"track color.\n" +msgstr "" +"XTrackCAD auttaa löytämään raiteet, jotka ovat kaartuvat liian jyrkästi tai " +"ovat liian jyrkkiä. Näitä kutsutaan erityisraiteiksi ja ne piirretään omalla " +"värillään.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:323 -msgid "Specifies if the grid is shown" -msgstr "Määrittelee näytetäänkö ruudukko" +#: ../../../../build/work/app/i18n/custmsg.h:215 +msgid "" +"In this example we have a curved track with radius of 9\" and a straight " +"track with a grade of 3.8%.\n" +msgstr "" +"Tässä esimerkissä meillä on karre, jonka säde on 9 tuumaa ja suora jonka " +"nousukulma on 3,8%.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:359 -msgid "Specifies number of pixels per inch (or centimeter)" -msgstr "Määrittelee pikseleiden määrän tuumalla (tai sentillä)" +#: ../../../../build/work/app/i18n/custmsg.h:216 +msgid " \n" +msgstr " \n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:353 -msgid "Specifies the Modelling Scale" -msgstr "Määrittelee mittakaavan" +#: ../../../../build/work/app/i18n/custmsg.h:217 +#, fuzzy +msgid "" +"The Layout dialog shows the Minimum Track Radius is 9\" and the Maximum " +"Track Grade is 5%.\n" +msgstr "" +"Ohjelman ominaisuuksissa on määritelty pienimmäksi kaarresäteeksi 9 tuumaa " +"ja suurimmaksi nousukulmaksi 5%.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:351 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:352 -msgid "Specifies the Title of the layout. This appears on Gaudy printouts" -msgstr "Ratasuunnitelman otsikko. Tämä näkyy tulostuksissa." +#: ../../../../build/work/app/i18n/custmsg.h:218 +msgid "" +"If we make the curved track sharper it will be drawn in the Exception " +"color.\n" +msgstr "" +"Jos muutamme kaarretta jyrkemmäksi, se piirretään erityisraiteiden värillä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:366 -msgid "Specifies the check point frequency" -msgstr "Kuinka usein automaattinen varmennus suoritetaan" +#: ../../../../build/work/app/i18n/custmsg.h:219 +msgid "" +"If we make the straight track steeper it will also be drawn in the Exception " +"color.\n" +msgstr "" +"Jos teemme suorasta raiteesta jyrkemmän, myös se piirretään erityisraiteiden " +"värillä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:505 -msgid "Specifies the diameter of the turntable" -msgstr "Määrittelee kääntöpöydän halkaisijan" +#: ../../../../build/work/app/i18n/custmsg.h:220 +msgid "" +"You can change the Exception color on the Colors dialog from the Options " +"menu.\n" +msgstr "Erityisraiteiden väritystä voi muuttaa Asetukset|Värit valikosta.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:222 -msgid "Specifies the minimum angle between tracks connected to a turntable" +#: ../../../../build/work/app/i18n/custmsg.h:221 +msgid "" +"The unconnected End-Point of any track can be extended with the " +"command using Right-Drag.\n" msgstr "" -"Määrittelee pienimmän kääntöpöydästä lähtevien raiteiden välisen kulman" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:220 -msgid "Specifies the radius of the circle track" -msgstr "Määrittelee ympyräradan säteen" +"Minkä tahansa raiteen irrallista päätä voi pidentää Muokkaa-komennolla " +"raahaamalla hiiren oikealla painikkeella.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:354 -msgid "Specifies the rail gauge, ie. the distance between the rails" -msgstr "Määrittelee raideleveyden" +#: ../../../../build/work/app/i18n/custmsg.h:222 +msgid "Select the End-Point and Right-Drag.\n" +msgstr "Valitse päätepiste ja raahaa oikealla painikkeella.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:362 -msgid "Specifies the separation between parallel tracks" -msgstr "Määrittelee rinnakkaisten raiteiden etäisyyden toisistaan" +#: ../../../../build/work/app/i18n/custmsg.h:223 +msgid "The extending track can be straight...\n" +msgstr "Jatke voi olla suora...\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:349 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:350 -msgid "Specifies the size of the room (in inches or centimeters)" -msgstr "Määrittele huoneen koko (senttimetreinä tai tuumina)" +#: ../../../../build/work/app/i18n/custmsg.h:224 +msgid "... or curved.\n" +msgstr "...tai kaareva.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:361 +#: ../../../../build/work/app/i18n/custmsg.h:225 msgid "" -"Specifies whether Layout Titles, Borders or Track Centerlines are printed on " -"the BitMap" +"If you extend a Straight or Curved flex track and enable Easements then an " +"Easement curve will be automatically generated when you extend the track.\n" msgstr "" -"Määritelee tulostetaanko ratasuunnitelman otsikot, reunukset tai ratojen " -"keskiviivat" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:522 -msgid "Specify Postscript font alias mapping" -msgstr "Määrittele Postscript kirjasinalias" +"Jos jatkat suoraa tai kaarevaa fleksiraidetta ja kaarreloivennus on " +"käytössä, luodaan automaattisesti kaarreloivennus pidentämisen yhteydessä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:307 -msgid "Specify a name for an End-Point" -msgstr "Määrittele päätepisteen nimi (aseman nimi)" +#: ../../../../build/work/app/i18n/custmsg.h:226 +msgid "" +"The command will create a mirror image of the selected objects.\n" +msgstr "Peilaus-komento luo peilikuvan valitusta objektista.\n" -#: ../bin/macro.c:601 ../../../../build/xtrkcad/app/bin/bllnhlp.c:468 -msgid "Speed" -msgstr "Nopeus" +#: ../../../../build/work/app/i18n/custmsg.h:227 +msgid "After selecting the object, drag a line which will form the mirror.\n" +msgstr "Valittuasi objektin, raahaa hiirellä peilauslinja.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:273 -msgid "Speed - controls the speed of the demo.\n" -msgstr "Nopeus - Säätelee demojen suoritusnopeutta.\n" +#: ../../../../build/work/app/i18n/custmsg.h:228 +msgid "The mirror line does not have to be vertical or horizontal.\n" +msgstr "Peilauslinjan ei tarvitse olla vaaka- tai pystysuuntainen.\n" -#: ../bin/tease.c:1320 -msgid "Split Easement Curve" -msgstr "Pilko kaarreloivennus" +#: ../../../../build/work/app/i18n/custmsg.h:229 +msgid "You can also flip any number of objects.\n" +msgstr "Voit myös peilata useita objekteja.\n" -#: ../bin/celev.c:435 ../bin/csplit.c:90 ../bin/csplit.c:153 -msgid "Split Track" -msgstr "Pilko raide" +#: ../../../../build/work/app/i18n/custmsg.h:230 +msgid "Watch what happens to the structure and turnout titles.\n" +msgstr "Katso mitä tapahtuu rakennusten ja vaihteen otsikoille.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:108 -msgid "Split a track" -msgstr "Pilko raide" +#: ../../../../build/work/app/i18n/custmsg.h:231 +msgid "" +"Note that the turnout title has been changed from the Medium Right to Medium " +"Left. When turnouts are flipped, XTrackCAD will try to find a matching " +"turnout and if found will change the name.\n" +msgstr "" +"Huomaa, että vaihteen otsikko muutettiin oikeasta (right) vasemmaksi (left). " +"Kun vaihteita peilataan, XTrackCAD yrittää löytää vastaavan toispuoleisen " +"vaihteen ja sellaisen löytäessään vaihtaa nimen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:43 -msgid "Splitting and Tunnels" -msgstr "Pilkkominen ja tunnelit" +#: ../../../../build/work/app/i18n/custmsg.h:232 +msgid "" +"Structures do not have Right and Left hand versions. Their title is changed " +"to indicate that they were flipped.\n" +msgstr "" +"Rakennuksilla ei ole oikeaa ja vasenta versiota. Niiden otsikko muutetaan " +"siten, että se kuvaa objektin olevan peilattu (flipped).\n" -#: ../bin/dcar.c:4072 -msgid "Srvc Date" -msgstr "Huollettu" +#: ../../../../build/work/app/i18n/custmsg.h:233 +msgid "You can use the command to change their title.\n" +msgstr "Voit käyttää määrittele-komentoa muuttaaksesi niiden otsikoita.\n" -#: ../bin/celev.c:45 -msgid "Station" -msgstr "Asema" +#: ../../../../build/work/app/i18n/custmsg.h:234 +msgid "" +"The and commands (on the Tools menu) are a powerful way to " +"manipulate Turnout and Structure definitions.\n" +msgstr "" +"Ryhmittele ja rymittelyn purku komennot (Hallinta-valikossa) ovat tehokas " +"keino käsitellä raideosien ja rakennusten määrittelyjä.\n" -#: ../bin/dcar.c:480 -msgid "Steam Loco" -msgstr "Höyryveturi" +#: ../../../../build/work/app/i18n/custmsg.h:235 +msgid "We'll start with a simple turnout and add a switch machine.\n" +msgstr "Aloitamme yksinkertaisesta vaihteesta ja vaihdekoneistosta.\n" -#: ../bin/param.c:94 -msgid "Steel Blue" +#: ../../../../build/work/app/i18n/custmsg.h:236 +msgid "" +"Now that we have drawn a rough outline of a switch machine we will group it " +"with the turnout definition.\n" msgstr "" +"Nyt kun olemme piirtäneet karkean hahmotelman vaihdekoneistosta, " +"ryhmittelemme sen uudeksi vaihdemäärittelyksi.\n" -#: ../bin/macro.c:592 -msgid "Step" -msgstr "Seuraava vaihe" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:270 -msgid "Step - advances to the next step of the demo.\n" -msgstr "Seuraava vaihe - Siirtyy seuraavaan vaiheeseen demossa.\n" +#: ../../../../build/work/app/i18n/custmsg.h:237 +msgid "First we Select the objects in the new definition.\n" +msgstr "Ensin valitsemme objektit uutta määrittelyä varten.\n" -#: ../bin/misc.c:2289 -msgid "Stic&ky ..." -msgstr "Pysyvät komennot ..." +#: ../../../../build/work/app/i18n/custmsg.h:238 +msgid "Now do the command.\n" +msgstr "Nyt suoritetaan ryhmittely-komento.\n" -#: ../bin/misc.c:1682 -msgid "Sticky Commands" -msgstr "Pysyvät komennot" +#: ../../../../build/work/app/i18n/custmsg.h:239 +msgid "" +"The command dialog shows the Title (Manufacturer, Description and " +"Part Number) of the new definition. This information is taken from the " +"Selected objects you are grouping.\n" +msgstr "" +"Ryhmittely-komennon ikkunassa näytetään valmistaja, kuvaus sekä tuotenumero. " +"Nämä tiedot on saatu ryhmittelyä varten valituista objekteista.\n" -#: ../bin/fileio.c:240 ../bin/ctrain.c:572 ../bin/ctrain.c:2540 -#: ../bin/dcar.c:4409 ../bin/dcar.c:4419 ../bin/dcar.c:4538 ../bin/macro.c:78 -msgid "Stop" -msgstr "Pysäytä" +#: ../../../../build/work/app/i18n/custmsg.h:240 +msgid "" +"The 'Replace with new group?' toggle will replace the Selected objects with " +"the new definition.\n" +msgstr "" +"Jos \"Korvaa uudella ryhmällä?\" on valittuna, ryhmittelyä varten valitut " +"objektit korvataan juuri luodulla uudella ryhmällä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:419 -msgid "Stop recording" -msgstr "Lopeta nauhoitus" +#: ../../../../build/work/app/i18n/custmsg.h:241 +msgid "" +"If we don't change the Title then the new definition will replace the " +"existing definition.\n" +msgstr "" +"Jos otsikkotietoja (valmistaja, kuvaus ja tuotenumero) ei muuteta, korvaa " +"tämä uusi määrittely jo olemassa olevan saman nimisen määrittelyn.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:475 -msgid "Stop the train" -msgstr "Pysäytä juna" +#: ../../../../build/work/app/i18n/custmsg.h:242 +msgid "We'll give this definition a new Description.\n" +msgstr "Annamme tälle määrittelylle uuden kuvauksen.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:236 -msgid "Stops the demonstration and returns you to XTrackCAD" -msgstr "Pysäyttää demon ja palaa XTrackCADin normaaliin tilaan" +#: ../../../../build/work/app/i18n/custmsg.h:243 +msgid "We're done with this definition. Press Ok.\n" +msgstr "Määrittely on valmis ja se hyväksytään painamalla Ok.\n" -#: ../bin/cdraw.c:821 -msgid "Straight" -msgstr "Suora" +#: ../../../../build/work/app/i18n/custmsg.h:244 +msgid "You will see the updated image on the HotBar.\n" +msgstr "Näet päivitetyn kuvan Hot Barissa.\n" -#: ../bin/tstraigh.c:536 -msgid "Straight " -msgstr "Suora " +#: ../../../../build/work/app/i18n/custmsg.h:245 +msgid "" +"The command replaces any Selected turnouts or structures with " +"their parts.\n" +msgstr "" +"Ryhmittelyn purku komento korvaa valittut vaihteet tai rakennukset niiden " +"osilla.\n" -#: ../bin/cdraw.c:407 -msgid "Straight Line" -msgstr "Suora viiva" +#: ../../../../build/work/app/i18n/custmsg.h:246 +msgid "" +"Structures and non-track segements of turnouts are composed of Lines, " +"Circles and other shapes. In this turnout these are the two lines and the " +"two squares.\n" +msgstr "" +"Rakennukset ja muut lohkot, jotka eivät ole raiteita, muodostuvat viivoista " +"ympyröistä ja muista muodoista. Tässä vaihteessa on kaksi viivaa ja kaksi " +"nelikulmiota.\n" -#: ../bin/drawgeom.c:283 -#, c-format -msgid "Straight Line: Length=%s Angle=%0.3f" -msgstr "Suora viiva: Pituus=%s Kulma=%0.3f" +#: ../../../../build/work/app/i18n/custmsg.h:247 +msgid "" +"We will Ungroup this turnout and see how the individual parts can be " +"changed.\n" +msgstr "" +"Puramme tämän vaihteen ryhmittelyn nähdäksemme kuinka yksittäisiä osia " +"voidaan muuttaa.\n" -#: ../bin/cdraw.c:1063 -msgid "Straight Objects" -msgstr "Suorat objektit" +#: ../../../../build/work/app/i18n/custmsg.h:248 +msgid "First Select the turnout and then Ungroup it.\n" +msgstr "Ensin valitsemme vaihteen ja sitten puramme ryhmittelyn.\n" -#: ../bin/ctodesgn.c:449 -msgid "Straight Section" -msgstr "Suora raideosa" +#: ../../../../build/work/app/i18n/custmsg.h:249 +msgid "Notice that the Title now indicates the turnout is Ungrouped.\n" +msgstr "Huomaa että otsikko näyttää vaihteen ryhmittelyn olevan purettu.\n" -#: ../bin/cstraigh.c:104 ../bin/tstraigh.c:254 -msgid "Straight Track" -msgstr "Suora raide" +#: ../../../../build/work/app/i18n/custmsg.h:250 +msgid "Hit Escape to deselect everything.\n" +msgstr "Paina Esc-näppäintä poistaaksesi valinnat objekteista.\n" -#: ../bin/cstraigh.c:67 -#, c-format -msgid "Straight Track Length=%s Angle=%0.3f" -msgstr "Suora raideosa Pituus=%s Kulma=%0.3f" +#: ../../../../build/work/app/i18n/custmsg.h:251 +msgid "Now Select the lines and squares.\n" +msgstr "Valitse nyt viivat ja nelikulmiont.\n" -#: ../bin/tstraigh.c:224 -#, c-format +#: ../../../../build/work/app/i18n/custmsg.h:252 msgid "" -"Straight Track(%d): Layer=%d Length=%s EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A" -"%0.3f]" +"We could modify these object or add new ones. For now we'll just delete " +"them.\n" msgstr "" -"Suora raideosa(%d): Taso=%d Pituus=%s Päätep.=[%0.3f,%0.3f K%0.3f] [%0.3f,%" -"0.3f K%0.3f]" +"Voisimme muokata näitä objekteja tai lisätä uusia. Nyt kuitenkin vain " +"poistamme ne.\n" -#: ../bin/ccurve.c:259 ../bin/cturntbl.c:559 ../bin/cmodify.c:251 -#: ../bin/cjoin.c:208 -#, c-format -msgid "Straight Track: Length=%s Angle=%0.3f" -msgstr "Suora raideosa: Pituus=%s Kulma=%0.3f" +#: ../../../../build/work/app/i18n/custmsg.h:253 +msgid "And move the Label out of the way.\n" +msgstr "Ja siirrämme otsikon pois tieltä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:24 -msgid "Straight to straight" -msgstr "Suora - suora" +#: ../../../../build/work/app/i18n/custmsg.h:254 +msgid "Notice that the turnout has been broken into three parts.\n" +msgstr "Huomaa että vaihde on purettu kolmeen osaan.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:15 -msgid "Straight tracks" -msgstr "Suorat raiteet" +#: ../../../../build/work/app/i18n/custmsg.h:255 +msgid "" +"Two ends of the turnout, from the frog to the end of the diverging leg and " +"from the points to the left, are now straight track sections.\n" +msgstr "" +"Haarautuvan raiteen takajatkos sekä vaihteen etujatkos ovat nyt suoria " +"raideosia.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:522 +#: ../../../../build/work/app/i18n/custmsg.h:256 msgid "" -"Straight tracks are created by selecting the first End-Point of the track.\n" +"The a turnout is made of a number of individual straight and curved track " +"segements. This turnout had four segments:\n" msgstr "" -"Suorat raiteet luodaan valitsemalla hiiren vasemmalla painikkeella raiteen " -"ensimmäinen päätepiste.\n" +"Vaihde on tehty useasta erillisestä suorasta ja kaarevasta raideosasta. Tämä " +"vaihde koostui neljästä osasta:\n" -#: ../bin/track.c:1874 ../bin/tstraigh.c:543 -#, c-format -msgid "Straight: Length=%s Angle=%0.3f" -msgstr "Suora: Pituus=%s Kulma=%0.3f" +#: ../../../../build/work/app/i18n/custmsg.h:257 +msgid " 1 a short straight segment to the left of the points\n" +msgstr " 1 Lyhyestä suorasta etujatkoksesta.\n" -#: ../bin/cstruct.c:759 ../bin/cstruct.c:904 ../bin/compound.c:776 -msgid "Structure" -msgstr "Rakennus" +#: ../../../../build/work/app/i18n/custmsg.h:258 +msgid " 2 a long straight segment to the right of the points\n" +msgstr " 2 Pitkästä suorasta raiteesta.\n" -#: ../bin/dcmpnd.c:402 -msgid "Structures" -msgstr "Rakennukset" +#: ../../../../build/work/app/i18n/custmsg.h:259 +msgid " 3 a curved segment from the points to the frog\n" +msgstr " 3 Kaarteesta kielten päistä risteyskappaleeseen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:74 +#: ../../../../build/work/app/i18n/custmsg.h:260 msgid "" -"Structures and non-track segements of turnouts are composed of Lines, " -"Circles and other shapes. In this turnout these are the two lines and the " -"two squares.\n" +" 4 a straight segment from the frog to the end of the diverging leg.\n" +msgstr " 4 Haarautuvan raiteen suorasta takajatkoksesta.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:261 +msgid "The first and last segments have be converted to straight tracks.\n" +msgstr "Ensimmäinen ja viimeinen osa on muutettu suoriksi raideosiksi.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:262 +msgid "" +"The second and third segments form the the body of the turnout and can not " +"be ungrouped further.\n" msgstr "" -"Rakennukset ja muut lohkot, jotka eivät ole raiteita, muodostuvat viivoista " -"ympyröistä ja muista muodoista. Tässä vaihteessa on kaksi viivaa ja kaksi " -"nelikulmiota.\n" +"Toinen ja kolmas osa muodostavat vaihteen rungon, eikä niiden ryhmittelyä " +"voi purkaa tämän pidemmälle.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:217 +#: ../../../../build/work/app/i18n/custmsg.h:263 msgid "" -"Structures do not have Right and Left hand versions. Their title is changed " -"to indicate that they were flipped.\n" +"You can later Group this turnout with the straight segments to recreate the " +"turnout definition. You can also add other track segments to turnout " +"definitions.\n" msgstr "" -"Rakennuksilla ei ole oikeaa ja vasenta versiota. Niiden otsikko muutetaan " -"siten, että se kuvaa objektin olevan peilattu (flipped).\n" +"Voit myöhemmin ryhmitellä tämän vaihteen suorien raideosien kanssa ja luoda " +"vaihteen määrittelyn uudelleen. Voit myös lisätä muita raideosia vaihteiden " +"määrittelyihin.\n" -#: ../bin/cturnout.c:1484 ../bin/cturnout.c:2456 -msgid "TURNOUT " -msgstr "PALARAIDE " +#: ../../../../build/work/app/i18n/custmsg.h:264 +msgid "Now, create a track and place the new turnout on it.\n" +msgstr "Nyt luodaan raide ja lisätään siihen uusi vaihde.\n" -#: ../bin/cdraw.c:425 ../bin/cdraw.c:824 ../bin/cdraw.c:1030 -msgid "Table Edge" -msgstr "Pöydän reuna" +#: ../../../../build/work/app/i18n/custmsg.h:265 +msgid "Now suppose we want to replace the black squares with green circles.\n" +msgstr "" +"Oletetaan, että haluamme vaihtaa mustien nelikulmioiden paikalle vihreät " +"ympyrät.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:52 -msgid "Table Edges" -msgstr "Pöydän reunat" +#: ../../../../build/work/app/i18n/custmsg.h:266 +msgid "First we Select the turnout.\n" +msgstr "Ensin valitsemme vaihteen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:425 +#: ../../../../build/work/app/i18n/custmsg.h:267 +msgid "And now Ungroup it (from the Tools Menu)\n" +msgstr "Ja sitten puramme ryhmittelyn.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:268 msgid "" -"Table Edges are used to mark the edges of the layout, either for aisles or " -"room walls.\n" +"Notice that the name has changed to indicate the turnout was Ungrouped.\n" +msgstr "Huomaa kuinka nimi on muutettu kuvaamaan vaihteen purkua.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:269 +msgid "" +"Now, hit escape to deselect everything and then Select the 2 squares and " +"delete them.\n" msgstr "" -"Pöydän reunoja käytetään kuvaamaan ratasuunnitelman reunoja, joko " -"kulkuväyliä tai seiniä.\n" +"Paina Esc-näppäintä poistaaksesi valinnat objekteista ja valitse sitten " +"nelikulmiot ja poista ne.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:427 -msgid "Table Edges can be modified by dragging on their ends.\n" -msgstr "Pöydän reunoje voidaan muokara raahaamalla niiden päistä.\n" +#: ../../../../build/work/app/i18n/custmsg.h:270 +msgid "Now draw the green circles...\n" +msgstr "Piirrä nyt vihreät ympyrät...\n" -#: ../bin/param.c:122 -msgid "Tan" -msgstr "Keltaisenruskea" +#: ../../../../build/work/app/i18n/custmsg.h:271 +msgid "and Group the new definition.\n" +msgstr "ja ryhmittele tämä uusi määrittely.\n" -#: ../bin/tcurve.c:1072 -msgid "Tangent " -msgstr "Tangentti " +#: ../../../../build/work/app/i18n/custmsg.h:272 +msgid "" +"Notice that the turnout in the HotBar is angled the same as the turnout on " +"the layout. Make sure your new definition is rotated the way you want it.\n" +msgstr "" +"Huomaa että vaihteen kuva Hot Barissa on nyt samassa kulmassa kuin vaide " +"ratasuunnitelmassa. Ole siis huolellinen tehdessäsi uusia määrittelyitä, " +"jotta ne ovat haluamassasi kulmassa.\n" -#: ../bin/tcurve.c:1081 -#, c-format -msgid "Tangent track: Length %s Angle %0.3f" -msgstr "Tangentti raide: Pituus %s Kulma %0.3f" +#: ../../../../build/work/app/i18n/custmsg.h:273 +msgid "We can also create turnouts from simple straight and curved tracks.\n" +msgstr "" +"Voimme myös luoda vaihteita yksinkertaisista suorista ja kaarevista " +"raideosista.\n" -#: ../bin/ctext.c:236 ../bin/cdraw.c:201 ../bin/cdraw.c:483 -msgid "Text" -msgstr "Teksti" +#: ../../../../build/work/app/i18n/custmsg.h:274 +msgid "We'll create two tracks that have a common End-Point.\n" +msgstr "Luomme kaksi raidetta, joilla on yhteinen päätepiste.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:129 -msgid "Thanks for watching.\n" -msgstr "Kiitos kun katsoit.\n" +#: ../../../../build/work/app/i18n/custmsg.h:275 +msgid "At this point we can modify the tracks if necessary.\n" +msgstr "Tässä vaiheessa voimme muokata raiteita, jos se on tarpeen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:276 +msgid "We will use the command to change the tracks.\n" +msgstr "Käytämme kuvaile-komentoa muuttaaksemme raiteiden ominaisuuksia.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:68 -msgid "" -"The 'Replace with new group?' toggle will replace the Selected objects with " -"the new definition.\n" -msgstr "" -"Jos \"Korvaa uudella ryhmällä?\" on valittuna, ryhmittelyä varten valitut " -"objektit korvataan juuri luodulla uudella ryhmällä.\n" +#: ../../../../build/work/app/i18n/custmsg.h:277 +msgid "We'll make the Length 7.5\".\n" +msgstr "Muutamme pituutta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:624 +#: ../../../../build/work/app/i18n/custmsg.h:278 msgid "" -"The 'p' key will convert a Scale measurement to a Prototype measurement." +"If we change the Length, each End-Point will be moved to shorten the track. " +"We want to just move the Right End-Point. To control this, change the Pivot " +"to First which means the Left End-Point will be unchanged when we change the " +"length (or angle) of the track.\n" msgstr "" +"Jos nyt vain muutamme pituutta, lyhennetään raidetta molemmista päistä. " +"Haluamme muuttaa raiteen pituutta vain oikeasta päästä, vaihdamme ensin " +"kiertopisteeksi ensimmäisen pään, jolloin valittu kiertopiste pysyy " +"paikoillaan muutettaessa raiteen pituutta (tai kulmaa).\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:211 -msgid "" -"The command will create a mirror image of the selected objects.\n" -msgstr "Peilaus-komento luo peilikuvan valitusta objektista.\n" +#: ../../../../build/work/app/i18n/custmsg.h:279 +msgid "Now when change the Length only the Right End-Point will move.\n" +msgstr "Nyt kun muutamme pituutta, vain oikeaa päätä lyhennetään.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:62 -msgid "" -"The and commands (on the Tools menu) are a powerful way to " -"manipulate Turnout and Structure definitions.\n" -msgstr "" -"Ryhmittele ja rymittelyn purku komennot (Hallinta-valikossa) ovat tehokas " -"keino käsitellä raideosien ja rakennusten määrittelyjä.\n" +#: ../../../../build/work/app/i18n/custmsg.h:280 +msgid "Now let's look at the curved track.\n" +msgstr "Katsotaanpa sitten kaarevaa raidetta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:67 +#: ../../../../build/work/app/i18n/custmsg.h:281 msgid "" -"The command dialog shows the Title (Manufacturer, Description and " -"Part Number) of the new definition. This information is taken from the " -"Selected objects you are grouping.\n" +"Here the Left End-Point (which we don't want to move) is the Second End-" +"Point, so we'll make that the Pivot.\n" msgstr "" -"Ryhmittely-komennon ikkunassa näytetään valmistaja, kuvaus sekä tuotenumero. " -"Nämä tiedot on saatu ryhmittelyä varten valituista objekteista.\n" +"Tässä vasen päätepiste (jota emme halua siirtää) on toinen päätepiste, joten " +"valitsemme sen kiertopisteeksi.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:255 -msgid "" -"The command can join straight and curved tracks (in either order).\n" -msgstr "" -"Yhdistä-komennolla voi liittää suoran ja kaarevan raiteen (kummassa tahansa " -"järjestyksessä).\n" +#: ../../../../build/work/app/i18n/custmsg.h:282 +msgid "We want the curve to have a radius of 20\" and an angle of 17.5°.\n" +msgstr "Haluamme kaarteelle tietyn säteen ja kulman.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:470 -msgid "The command can move one group of tracks to join with another.\n" -msgstr "" -"Yhdistä-komento pystyy siirtämään raiteita yhdistääkseen ne toisiin " -"raiteisiin.\n" +#: ../../../../build/work/app/i18n/custmsg.h:283 +msgid "First change the Radius...\n" +msgstr "Ensin muutetaan säde...\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:124 -msgid "" -"The command lets you attach notes to various spots on the layout.\n" -msgstr "Voit liittää ratasuunnitelmaasi muistiinpanoja.\n" +#: ../../../../build/work/app/i18n/custmsg.h:284 +msgid "and the the Angular Length.\n" +msgstr "ja sitten kulma.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:130 -msgid "The command will change the size of the selected objects.\n" -msgstr "Mittakaavan muutos -komennolla muutetaan valittujen objektien kokoa.\n" +#: ../../../../build/work/app/i18n/custmsg.h:285 +msgid "Now Select both tracks...\n" +msgstr "Valitse molemmat raiteet...\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:224 -msgid "" -"The command will pivot the Selected objects. First Click on the " -"pivot point and then drag to Rotate the objects.\n" -msgstr "" -"Voit pyörittää valittuja objekteja. Klikkaa ensin haluttua kiertopistettä ja " -"raahaa sitten pyörittääksesi objekteja.\n" +#: ../../../../build/work/app/i18n/custmsg.h:286 +msgid "and Group them.\n" +msgstr "ja ryhmittele ne.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:226 +#: ../../../../build/work/app/i18n/custmsg.h:287 msgid "" -"The command will restrict the rotation to increments of 15° if you " -"hold down the Control key.\n" +"If the two tracks have a common End-Point then they will form a Turnout and " +"can be switched with the command. Otherwise they will just be two " +"track segments grouped together.\n" msgstr "" -"Jos pidät contol-näppäintä painettuna pyörittäminen tapahtuu 15°:n välein.\n" +"Jos molemmilla raiteilla on yhteinen päätepiste, ne muodostavat vaihteen, " +"jonka asentoa voidaan vaihtaa simuloitaessa junien ajoa. Muussa tapauksessa " +"ne ovat vain kaksi raideosaa, jotka ovat ryhmitelty keskenään.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:208 +#: ../../../../build/work/app/i18n/custmsg.h:288 msgid "" -"The command draws a Ruler on the layout you can use to measure " -"distances.\n" +"We have created a left hand turnout and we also want a right hand version.\n" msgstr "" -"Viivain-komento piirtää viivaimen, jolla voit mitata etäisyyksiä " -"ratasuunnitelmassasi.\n" +"Olemme luoneen vasemman puoleisen vaihteen ja haluamme myös oikean puoleisen " +"version.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:393 -msgid "The the tracks you want to move.\n" +msgstr "Valitse ensin raiteet, jotka haluat siirtää.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:610 -msgid "The name of the Layer is the Balloon Help for the Layer button." +#: ../../../../build/work/app/i18n/custmsg.h:363 +msgid "Click and Shift-Left-Click on the two End-Points.\n" msgstr "" +"Klikkaa Yhdistä ja sen jälkeen vaihto-näppäintä painettuna klikkaa hiiren " +"vasemmalla painikkeella yhdistettäviä päätepisteitä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:323 -msgid "The new curved turnout is also composed of several segments.\n" -msgstr "Myös kaarrevaihde koostuu useasta osasta.\n" +#: ../../../../build/work/app/i18n/custmsg.h:364 +msgid "The selected tracks are moved into position.\n" +msgstr "Valitut raiteet siirrettiin paikoilleen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:408 +#: ../../../../build/work/app/i18n/custmsg.h:365 msgid "" -"The next method is \"Simple\" draws. Here tracks are drawn using one line, " -"no End-Points are drawn, lines are not drawn and structures are drawn using " -"a box outline.\n" +"Two straight tracks are joined by selecting the two End-Points. The " +"selected End-Points will be those closest to the cursor when the track is " +"selected.\n" msgstr "" -"Seuraava piirtotapa on \"Yksinkertainen\", jolloin raiteet piirretään " -"yhdellä viivalla, ilman päätepisteiden merkintää. Viivoja ei piirretä ja " -"rakennukset piirretään yksinkertaisina nelikulmioina.\n" +"Kaksi suoraa raidetta yhdistetään valitsemalla kaksi päätepistettä. Valittu " +"päätepiste on se, joka on lähempänä hiiren osoitinta raidetta valittaessa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:298 +#: ../../../../build/work/app/i18n/custmsg.h:366 msgid "" -"The next method is similar to the last except that you drag first from the " -"center of the Curve to one End-Point.\n" +"A connecting track is drawn between the two tracks. Notice how it moves as " +"the cursor is dragged along the second track.\n" msgstr "" -"Seuraava tapa on saman kaltainen kuin edellinen, paitsi että toiminto " -"aloitetaan raahaamalla kaarteen keskipisteestä kaarteen päätepisteeseen.\n" +"Yhdistävä raide piirretään yhdistettävien raiteiden väliin. Huomaa kuinka se " +"siirtyy raahattaessa osoitinta toista raidetta pitkin.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:295 +#: ../../../../build/work/app/i18n/custmsg.h:367 msgid "" -"The next method is to click at one End-Point and drag to the center of the " -"Curve.\n" +"Note that two tracks are extended if you move past the end of the track.\n" msgstr "" -"Seuraava tapa on klikata kaarteen päätepistettä ja raahata hiirellä kaarteen " -"keskipisteeseen.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:222 -msgid "The next method is to drag from the edge of the Circle to the center.\n" -msgstr "Seuraava tapa on raahata ympyrän kehältä kohti keskipistettä.\n" +"Huomaa, että raiteita pidennetään automaattisesti siirryttäessä raiteen pään " +"ohi.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:410 +#: ../../../../build/work/app/i18n/custmsg.h:368 msgid "" -"The next method is to just draw the End-Points of the selected tracks.\n" +"Notice what happens if you drag past the intersection points of the two " +"tracks.\n" +msgstr "Katso mitä tapahtuu, jos raahaat raiteiden leikkauspisteen ohi.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:369 +msgid "This is probably not a very useful thing to do.\n" +msgstr "Tämä ei luultavasti ole kovin hyödyllistä.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:370 +msgid "You can connect from any track to a turntable\n" +msgstr "Voit yhdistää mistä tahansa raiteesta kääntöpöytään.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:371 +msgid "Note: you cannot have a turntable as your first connection point.\n" msgstr "" -"Seuraava tapa on piirtää ainoastaan valittujen raiteiden päätepisteet.\n" +"Huom: Kääntöpöytä ei voi olla ensimmäinen liitoskohta, eli aina yhdistetään " +"muusta raiteesta kääntöpöytää kohti.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:572 +#: ../../../../build/work/app/i18n/custmsg.h:372 msgid "" -"The notation \"Menu|Item\" is used in the documentation (and the on-line " -"demos and tips) to indicate the selection of a menu item.\n" -"For example File|Open means to open the menu by clicking on File on the menu " -"bar of the Main window and then selecting the Open item from that menu." +"You cannot place the connecting track too close to an existing stall track. " +"How close you can get is controlled by the Turntable Angle on the Setup " +"dialog.\n" msgstr "" -"Merkintätapa \"Valikko|Komennot\" on käytössä dokumentaatiossa, ohjeessa, " -"demoissa ja vinkeissä. Se kuvaa kyseessä olevaa valikon toimintoa.\n" -"Esimerkiksi Tiedosto|Avaa tarkoittaa, että päävalikosta on ensin avattava " -"Tiedosto-valikko ja sieltä valittava Avaa-komento." +"Liitosraidetta ei voi yhdistää liian lähelle kääntöpöytään ennestään " +"liittyvää raidetta. Tämä etäisyys, eli kääntöpöydän kulma, määritellään " +"komentojen asetuksissa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:322 -msgid "The other parts are various straight and curved segments.\n" -msgstr "Muut osat ovat suoria ja kaarevia raideosia.\n" +#: ../../../../build/work/app/i18n/custmsg.h:373 +msgid "In this example it is set to 7.5 degrees.\n" +msgstr "Tässä esimerkissä se on asetettu 7,5 asteeksi.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:611 +#: ../../../../build/work/app/i18n/custmsg.h:374 +msgid "You can drag the connecting point all round the turntable.\n" +msgstr "Voit raahata liitoskohtaa ympäti kääntöpöytää.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:375 msgid "" -"The playback speed of the Demos can be changed by using Speed drop down list " -"on the Demo window." +"As you drag away from the turntable a straight track will be drawn to the " +"cursor postion and a curve will be drawn from the cursor to the connecting " +"track.\n" msgstr "" +"Raahatessasi kääntöpöydästä pois päin, suora raide piirretään osoittimeen " +"asti ja siitä jatketaan kaarteella liitettävään raiteeseen.\n" -#: ../wlib/gtklib/wpref.c:112 -#, c-format +#: ../../../../build/work/app/i18n/custmsg.h:376 msgid "" -"The required configuration files could not be located in the expected " -"location.\n" -"\n" -"Usually this is an installation problem. Make sure that these files are " -"installed in either \n" -" %s/share/xtrkcad or\n" -" /usr/lib/%s or\n" -" /usr/local/lib/%s\n" -"If this is not possible, the environment variable %s must contain the name " -"of the correct directory." +"Now the cursor will be moved within the turntable. Notice the error " +"message.\n" msgstr "" -"Tarvittavia asetustiedostoja ei löydy oletetuista hakemistoista.\n" -"\n" -"Yleensä tämä johtuu virheellisestä asennuksesta. Varmista että nämä " -"tiedostot on asennettu johonkin seuraavista hakemistoista:\n" -" %s/share/xtrkcad\n" -" /usr/lib/%s\n" -" /usr/local/lib/%s\n" -"Jos tämä ei ole mahdollista, täytyy ympäristömuuttujan %s sisältää oikean " -"hakemiston nimi." +"Nyt osoitin viedään kääntöpöydän sisälle. Huomaa virheilmoitus tilarivillä.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:377 +msgid "All done.\n" +msgstr "Valmis.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:165 +#: ../../../../build/work/app/i18n/custmsg.h:378 msgid "" -"The second Point is at the left end of the siding. The Path will be drawn " -"in Purple on the layout.\n" +"The Draw Commands are used to draw straight and curved lines on the layout.\n" msgstr "" -"Toinen piste on aseman vasen pää. Reitti merkitään ratasuunnitelmaan " -"purppuralla.\n" +"Piirtokomennoilla voidaan piirtää suoria ja kaarevia viivoja " +"ratasuunnitelmaan.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:90 +#: ../../../../build/work/app/i18n/custmsg.h:379 msgid "" -"The second and third segments form the the body of the turnout and can not " -"be ungrouped further.\n" +"Lines are drawn by clicking at the starting postion and dragging to the " +"final position.\n" msgstr "" -"Toinen ja kolmas osa muodostavat vaihteen rungon, eikä niiden ryhmittelyä " -"voi purkaa tämän pidemmälle.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:456 -msgid "The second case will join the two straight tracks.\n" -msgstr "Seuraavaksi yhdistetään kaksi suoraa raidetta.\n" +"Viivat piirretään klikkaamalla alkupistettä ja raahaamalla loppupisteeseen.\n" -#: ../../../../build/xtrkcad/app/help/messages.h:120 +#: ../../../../build/work/app/i18n/custmsg.h:380 msgid "" -"The second track for the Align\n" -"Rotate command must be Unselected." +"Drawing lines with the Shift key held down will use the previous line End-" +"Point as the starting position. This makes it easy to draw connected " +"lines.\n" msgstr "" -"Kohdistuskomennon toisen raideosan\n" -"on oltava valitsematon." - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:480 -msgid "The selected Active End-Point" -msgstr "Valittu aktiivinen päätepiste" - -#: ../bin/dcmpnd.c:257 -msgid "The selected Turnout had a differing number of End-Points" -msgstr "Valitussa vaihteessa oli eri määrä päätepisteitä" +"Jos vaihto-näppäin pidetään painettuna, seuraavan viivan piirto aloitetaan " +"edellisen viivan loppupäästä. Näin voidaan helposti piirtää yhdistettyjä " +"viivoja.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:473 -msgid "The selected tracks are moved into position.\n" -msgstr "Valitut raiteet siirrettiin paikoilleen.\n" +#: ../../../../build/work/app/i18n/custmsg.h:381 +msgid "You also draw in various colors and line widths.\n" +msgstr "Voit myös piirtää eri väreillä ja muuttaa viivan paksuutta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:325 +#: ../../../../build/work/app/i18n/custmsg.h:382 msgid "" -"The separation is set in the window. You should set " -"this value before you begin to select tracks.\n" +"Like Curved Tracks, Curved Lines can be drawn by a variety of methods.\n" msgstr "" -"Raiteiden välinen etäisyys asetetaan työkalurivillä olevan tekstikentän " -"avulla. Tämä arvo on asetettava ennen kuin raiteita valitaan.\n" +"Aivan kuten kaarevat raideosat, myös kaarevat viivat voidaan piirtää eri " +"tavoin.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:595 +#: ../../../../build/work/app/i18n/custmsg.h:383 msgid "" -"The size of the Map window is controlled by the overall size of the room " -"(specified on the Layout dialog) and the Map Scale (on the Display dialog). " -"You can make the Map window larger (or smaller) by decreasing (or " -"increasing) the Map Scale.\n" -"XTrackCAD will prevent you from making the Map window too small or too large." +"Here we will draw a Curve by dragging from one End-Point to the other to " +"define the chord of the Curve. Then we will drag from the center to shape " +"the curve.\n" msgstr "" +"Tässä piirrämme kaaren raahaamalla ensin jänteen päätepisteiden välille ja " +"raahaamme sitten jänteen keskeltä muodostaaksemme halutun kaaren.\n" -#: ../../../../build/xtrkcad/app/help/messages.h:127 -msgid "" -"The specified Index is already in use.\n" -"The Index will be updated to the next available value." +#: ../../../../build/work/app/i18n/custmsg.h:384 +msgid "Boxes are useful for drawing rectangular shapes.\n" msgstr "" -"Määritelty indeksi on jo käytössä.\n" -"Indeksi muutetaan seuraavaksi vapaaksi arvoksi." +"Nelikulmio koostuu neljästä yksittäisestä viivasta, mutta sen voi piirtää " +"yhdellä komennolla.\n" -#: ../../../../build/xtrkcad/app/help/messages.h:116 +#: ../../../../build/work/app/i18n/custmsg.h:385 msgid "" -"The tracks cannot be connected together.\n" -"\n" -"Try changing some tracks for a closer fit\n" -"or increase the Connection Angle value on\n" -"the Preferences dialog." +"Circles can be drawn by clicking on the center or edge and dragging to set " +"the radius.\n" msgstr "" -"Raiteita ei voi yhdistää.\n" -"\n" -"Kokeile sovittaa raiteet paremmin keskenään\n" -" tai kasvata liitoskulmaa ohjelman ominaisuuksista." +"Ympyrät voidaan piirtää esimerkiksi klikkaamalla haluttua keskipistettä ja " +"asettamalla ympyrän säde raahaamalla.\n" -#: ../../../../build/xtrkcad/app/help/messages.h:118 -msgid "" -"The tracks cannot be connected together.\n" -"\n" -"Try changing some tracks for a closer fit\n" -"or increase the Connection Distance" +#: ../../../../build/work/app/i18n/custmsg.h:386 +msgid "Here we will drag from the Center.\n" +msgstr "Raahaamme keskipisteestä poispäin.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:387 +msgid "Lines and Shapes can be deleted by Selecting and Deleting.\n" msgstr "" -"Raiteita ei voi yhdistää.\n" -"\n" -"Kokeile sovittaa raiteet paremmin keskenään\n" -" tai kasvata liitosetäisyyttä ohjelman ominaisuuksista." +"Viivat ja muodot poistetaan valitsemalla ne ensin ja sitten poistamalla ne.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:388 +msgid "We also draw Polylines and filled shapes.\n" +msgstr "Voimme myös luoda monikulmioita ja täytettyjä monikulmioita.\n" -#: ../../../../build/xtrkcad/app/help/messages.h:117 +#: ../../../../build/work/app/i18n/custmsg.h:389 msgid "" -"The tracks cannot be connected together.\n" -"\n" -"Try changing some tracks for a closer fit\n" -"or increase the Connection Distance and\n" -"Angle values on the Preferences dialog" -msgstr "" -"Raiteita ei voi yhdistää.\n" -"\n" -"Kokeile sovittaa raiteet paremmin keskenään\n" -" tai kasvata liitoskulmaa ja liitosetäisyyttä ohjelman ominaisuuksista." +"A Polyline is drawn by dragging to place each of the point in the Polyline.\n" +msgstr "Monikulmio piirretään raahaamalla kukin kulma paikoilleen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:187 +#: ../../../../build/work/app/i18n/custmsg.h:390 msgid "" -"The two Elevations you see here are Computed Elevations which means " -"XTrackCAD dynamically computes the Elevation based on the Elevations of " -"connecting tracks.\n" +"To finish off the Polyline press the key or choose another drawing " +"type.\n" msgstr "" -"Tässä näkyvät kaksi korkeustason merkintää ovat laskettuja, mikä tarkoittaa " -"sitä että XTrackCAD laskee tämän pisteen korkeuden automaattisesti muiden " -"tähän liittyvien korkeustasojen mukaan.\n" +"Viimeistelläksesi monikulmion, paina välilyöntiä tai valitse toinen " +"piirtotyyppi.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:461 -msgid "The two End-Points are now aligned and connected.\n" -msgstr "Päätepisteet ovat nyt kohdistettu ja liitetty.\n" +#: ../../../../build/work/app/i18n/custmsg.h:391 +msgid "A Polygon is drawn in the same way\n" +msgstr "Täytetty monikulmio piirretään samalla tavalla.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:429 +#: ../../../../build/work/app/i18n/custmsg.h:392 msgid "" -"The unconnected End-Point of any track can be extended with the " -"command using Right-Drag.\n" +"You can use the Above and Below Commands to move lines and shapes to the " +"front or back of the drawing.\n" msgstr "" -"Minkä tahansa raiteen irrallista päätä voi pidentää Muokkaa-komennolla " -"raahaamalla hiiren oikealla painikkeella.\n" +"Voit vaihtaa viivojen ja muotojen järjestystä viemällä niitä alimmaiseksi " +"tai päällimmäiseksi.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:196 -msgid "" -"The unconnected End-Points of a straight or curved track can be changed with " -"the 'Modify Track' command.\n" +#: ../../../../build/work/app/i18n/custmsg.h:393 +msgid "Filled Boxes and Circles work the same as line Boxes and Circles.\n" msgstr "" -"Suorien ja kaarevien raiteiden irtonaisia päätepisteitä voidaan muuttaa " -"Muokkaa-komennolla.\n" +"Täytetyt nelikulmiot ja täytetyt ympyrät toimivat samoin kuin tyhjät " +"nelikulmiot ja ympyrät.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:277 +#: ../../../../build/work/app/i18n/custmsg.h:394 msgid "" -"The various controls are disabled when it would be inappropiate to click on " -"them. When the demo is running the Step button is disabled. When the demo " -"is paused the Step button is enabled and you can click it when you are ready " -"to view the next part of the demo.\n" +"In the drawing area of the main window you can see an hollow arrow which " +"represents the mouse cursor. In this demo the mouse will move about to show " +"you the actions of different commands.\n" msgstr "" -"Useimmat kontrollit eivät ole käytettävissä oltaessa demo-tilassa, jolloin " -"niitä ei voi painella tarpeettomasti. Demon ollessa käynnissä Seuraava vaihe " -"-painike ei ole käytettävissä. Kun demo on pysähdyksissä Seuraava vaihe -" -"painike on käytettävissä, jolloin voit siirtyä sen avulla demossa seuraavaan " -"vaiheeseen.\n" +"Pääikkunan piirtoalueella näet läpinäkyvän nuolen, joka kuvaa hiiren " +"osoitinta. Tässä demossa esitellään erilaiset hiiren toiminnot.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:648 +#: ../../../../build/work/app/i18n/custmsg.h:395 msgid "" -"Then Ungroup command will break turnouts and structures into individual " -"track, line and shape segments. \n" -"You can modify each segment and add new ones. \n" -"Then use the Group command to update the definition." +"The hollow arrow represents the mouse cursor without a mouse button being " +"pressed.\n" msgstr "" +"Läpinäkyvä nuoli kuvaa hiiren osoitinta silloin kun hiiren painikkeita ei " +"ole painettu.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:523 -msgid "Then the other End-Point is dragged to its final postion.\n" +#: ../../../../build/work/app/i18n/custmsg.h:396 +msgid "" +"When the left mouse button would be pressed, the mouse cursor appears to " +"flash and the hollow arrow is replaced by a solid red arrow. While the left " +"button is pressed the mouse cursor will be a solid arrow.\n" msgstr "" -"Toinen päätepiste valitaan pitämällä hiiren vasen painike alhaalla ja " -"valitsemalla oikea paikka.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:313 -msgid "Then the turntable is dragged to its final location.\n" -msgstr "Sitten kääntöpöytä raahataan paikoilleen.\n" +"Osoittimen välähdys ja sen muuttuminen punaiseksi kuvaa hiiren vasemman " +"painikkeen painamista. Koko sen ajan, kun hiiren painike on painettuna alas, " +"osoitin esitetään punaisella nuolella.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:452 +#: ../../../../build/work/app/i18n/custmsg.h:397 msgid "" -"Then with the command, Shift-Left-Click on the 2 End-Points.\n" +"Note: these color changes occur only during the demo to simulate mouse " +"button presses.\n" msgstr "" -"Sitten liitä-komennolla, vaihto + hiiren vasen klikkaus molempiin " -"päätepisteisiin.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:340 -msgid "Then you can rotate the turnout by Right dragging.\n" -msgstr "Voit myös pyörittää sitä raahaamalla hiiren oikealla painikkeella.\n" - -#: ../bin/celev.c:123 ../bin/celev.c:168 -msgid "There are no reachable Defined Elevations" -msgstr "Ei määriteltyjä korkeustasoja saatavilla" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:290 -msgid "There are several ways to create a Curved track.\n" -msgstr "On useita tapoja luoda kaarevia raiteita.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:507 -msgid "There is no End-Point on the lower track here.\n" -msgstr "Risteyksen kohdalla ei ole raiteiden liitosta.\n" +"Huom: Hiiren osoittimen väri muuttuu vain demo-tilassa kuvaten hiiren " +"painikkeiden käyttöä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:237 +#: ../../../../build/work/app/i18n/custmsg.h:398 msgid "" -"These examples shows some of the various Turnout Designer windows. Each " -"window defines a different type of turnout.\n" +"Moving the mouse while a mouse button is pressed is called 'dragging'.\n" msgstr "" -"Tässä esimerkissä näytetään joitakin monista vaihteiden ja raideosien " -"suunnitteluikkunoista. Kussakin ikkunassa määritellään eri tyyppinen " -"vaihde.\n" +"Hiiren liikuttelua silloin kun hiiren painike on painettuna, kutsutaan " +"\"raahaamiseksi\".\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:301 +#: ../../../../build/work/app/i18n/custmsg.h:399 msgid "" -"These radio buttons are a short-cut for Values of 0.0, 0.5, 1.0 and 2.0. " -"None turns Easements off" +"When the left mouse button is released, the mouse cursor flashes and the " +"hollow arrow is restored.\n" msgstr "" -"Nämä painikkeet ovat pikavalintoja arvoille 0,0, 0,5, 1,0 ja 2,0. Mikään " -"näistä ei poista kaarreloivennusta käytöstä." - -#: ../bin/misc.c:2181 -msgid "Thick Tracks" -msgstr "Paksut raiteet" - -#: ../bin/misc.c:2179 -msgid "Thin Tracks" -msgstr "Ohuet raiteet" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:297 -msgid "This controls the sharpness of the easement curve" -msgstr "Tällä säädellään kaarreloivennuksen jyrkkyyttä" +"Kun hiiren vasen painike vapautetaan, osoitin välähtää ja se palautetaan " +"läpinäkyväksi.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:350 -msgid "This demo will construct a control panel for part of a bigger layout.\n" +#: ../../../../build/work/app/i18n/custmsg.h:400 +msgid "Dragging with the right button is simulated by a blue solid cursor.\n" msgstr "" -"Tässä demossa luodaan ohjauspaneeli osaksi suurempaa ratasuunnitelmaa.\n" +"Hiiren oikealla painikkeella raahaamista kuvataan sinisellä nuolella.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:558 +#: ../../../../build/work/app/i18n/custmsg.h:401 msgid "" -"This effect is only used in demonstration mode. During normal operation you " -"will not see this.\n" +"Sometimes the Shift key is held down while using the mouse for a Shift-Click " +"or a Shift-Drag. \n" msgstr "" -"Tämä tehoste on käytössä ainoastaan demo -tilassa. Normaalissa käyttötilassa " -"näin ei ole.\n" +"Joskus vaihto -näppäintä (shift) on painettava samalla kun hiirellä " +"klikataan tai raahataan.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:402 +msgid "This is indicated by an outline drawn around the solid arrow.\n" +msgstr "Tämä esitetään lisäämällä värilliseen osoittimeen ääriviivat.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:139 +#: ../../../../build/work/app/i18n/custmsg.h:403 msgid "" -"This example show how to layout a yard using the and " -"commands.\n" +"The main drawing area shows a portion of total layout. You can zoom in or " +"zoom out by choosing 'Zoom In' or 'Zoom Out' in the 'Edit' menu, by using " +"the Zoom buttons on the toolbar or by using the 'Page Down' and 'Page Up' " +"keys.\n" msgstr "" -"Tässä esimerkissä näytetään ratapihan luominen käyttäen \"Palaraide\" ja " -"\"Rinnakkainen raide\" komentoja.\n" +"Piirtoalueella näytetään osa ratasuunnitelmasta. Voit lähentää tai loitontaa " +"näkymää valitsemalla Muokkaa -valikosta \"Lähennä\" tai \"Loitonna\", " +"käyttämällä vastaavia painikkeita työkaluriviltä, näppäimistön PgUp ja PgDn -" +"näppäimillä tai rullahiiren rullasta pyörittämällä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:324 -msgid "This example shows how to create parallel tracks.\n" -msgstr "Tämä esimerkki näyttää miten rinnakkaisia raiteita luodaan.\n" +#: ../../../../build/work/app/i18n/custmsg.h:404 +msgid "You can see the entire layout in the Map window.\n" +msgstr "Kartta -ikkunassa esitetään koko ratasuunnitelma.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:405 +msgid "As you Zoom Out tracks are drawn with one line instead of two.\n" +msgstr "" +"Loitonnettaessa riittävästi, raiteet piirretään ainoastaan yhdellä viivalla " +"normaalin kahden sijaan.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:260 +#: ../../../../build/work/app/i18n/custmsg.h:406 msgid "" -"This example will show the effect of using easements while joining tracks.\n" +"You can change what portion of the layout is shown by using the 'Map' window " +"which shows a compressed version of the entire layout. A hilighted area of " +"the 'Map' (in reverse video) shows what portion of the layout is displayed " +"in the main drawing area.\n" msgstr "" -"Tässä esimerkissä näytetään kaarreloivennuksen vaikutus yhdistettäessä " -"raiteita.\n" +"Kartta -ikkunan avulla voit valita mikä osa ratasuunnitelmaa näytetään. " +"Kartta -ikkunassa esitetään piennennetty kuva koko ratasuunnitelmasta. " +"Korostettu alue esittää pääikkunan piirtoalueella näytettävän alueen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:453 -msgid "This examples shows joining tracks whose End-Points are aligned.\n" +#: ../../../../build/work/app/i18n/custmsg.h:407 +msgid "" +"You can Left-Drag the hilighted area in the Map window to change the " +"displayed portion of the layout.\n" msgstr "" -"Tämä esimerkki näyttää kahden kohdakkain olevan päätepisteen yhdistämisen.\n" +"Raahaamalla hiiren vasemmalla painikkeella korostettua aluetta muuttaaksesi " +"ratasuunnitelman näytettävän alueen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:424 -msgid "This is indicated by an outline drawn around the solid arrow.\n" -msgstr "Tämä esitetään lisäämällä värilliseen osoittimeen ääriviivat.\n" +#: ../../../../build/work/app/i18n/custmsg.h:408 +msgid "" +"You can also Right-Drag on the Map window to set the scale and position of " +"the Main window.\n" +msgstr "" +"Hiiren oikealla painikkeella raahaaminen puolestaan muuttaa näytettävän " +"alueen skaalausta (kokoa).\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:289 -msgid "This is probably not a very useful thing to do.\n" -msgstr "Tämä ei luultavasti ole kovin hyödyllistä.\n" +#: ../../../../build/work/app/i18n/custmsg.h:409 +msgid "" +"The command lets you attach notes to various spots on the layout.\n" +msgstr "Voit liittää ratasuunnitelmaasi muistiinpanoja.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:556 +#: ../../../../build/work/app/i18n/custmsg.h:410 msgid "" -"This is simulated by drawing a rectangle around the control when values are " -"entered or changed.\n" +"When you place a note, the Note editor window is displayed which lets you " +"enter the note.\n" msgstr "" -"Tämä esitetään piirtämällä nelikulmio sen kontrollin ympärille, jonka arvoja " -"ollaan syöttämässä tai muuttamassa.\n" +"Kun lisäät ratasuunnitelmaan muistiinpanon, avataan editori jossa voit " +"kirjoittaa muistiinpanon sisällön.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:357 +#: ../../../../build/work/app/i18n/custmsg.h:411 msgid "" -"This is the body of the Note. To change this select Modify from the File " -"Menu" +"If you click on a note in mode the Note editor displays the " +"note.\n" msgstr "" -"Tämä on muistiinpanon runko. Muuttaaksesi tätä, valitse Tiedosto-valikosta " -"Muokkaa" +"Jos määrittele-komento on aktiivinen ja klikkaat muistiinpanoa, sen sisältö " +"näytetään editorissa. Näin voit myös muokata aiemmin kirjoittamaasi " +"muistiinpanoa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:127 +#: ../../../../build/work/app/i18n/custmsg.h:412 msgid "This is the end of the XTrackCAD Demos.\n" msgstr "Tähän päättyivät XTrackCADin demot.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:283 -msgid "This is the end of the introductory demo.\n" -msgstr "Tähän päättyy johdanto.\n" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:312 -msgid "This is the list of parts for the layout" -msgstr "Tämä on ratasuunnitelman osaluettelo" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:170 -msgid "This is the portion of the layout shown in the Main Window canvas" -msgstr "Tämä osa suunnitelmasta näytetään pääikkunan piirtoalueella" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:240 -msgid "This is the regular turnout.\n" -msgstr "Tämä on tavallinen vaihde.\n" +#: ../../../../build/work/app/i18n/custmsg.h:413 +msgid "Click Step to return to XTrackCAD.\n" +msgstr "" +"Paina seuraava vaihe, seuraava tai lopeta painiketta palataksesi XTrackCADin " +"normaaliin tilaan.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:315 -msgid "This is two step process:\n" -msgstr "Tämä on kaksiosainen prosessi:\n" +#: ../../../../build/work/app/i18n/custmsg.h:414 +msgid "Thanks for watching.\n" +msgstr "Kiitos kun katsoit.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:238 -msgid "This is where comments about the demo are displayed" -msgstr "Tässä näytetään demojen kommentit" +#: ../../../../build/work/app/i18n/custmsg.h:415 +msgid "This example shows how to create parallel tracks.\n" +msgstr "Tämä esimerkki näyttää miten rinnakkaisia raiteita luodaan.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:207 +#: ../../../../build/work/app/i18n/custmsg.h:416 msgid "" -"This lets you change a Straight track into a Curved track (and vice versa) " -"as well as changing the radius of a Curved track.\n" +"The separation is set in the window. You should set " +"this value before you begin to select tracks.\n" msgstr "" -"Näin voit muuttaa suoran raiteen kaarteeksi ja päin vastoin, sekä muuttaa " -"kaarteen sädettä.\n" +"Raiteiden välinen etäisyys asetetaan työkalurivillä olevan tekstikentän " +"avulla. Tämä arvo on asetettava ennen kuin raiteita valitaan.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:268 +#: ../../../../build/work/app/i18n/custmsg.h:417 msgid "" -"This will show some the features of XTrackCAD in an automated presentation. " -"This window contains a number of controls and a message area (which I hope " -"you are reading now). \n" +"You control which side the parallel track will be on by moving the cursor " +"from one side of the track centerline to the other.\n" msgstr "" -"Havaintoesitykset näyttävät joitakin XTrackCADin ominaisuuksia " -"automaattisina esityksinä. Tämä ikkuna sisältää joitakin kontrolleja sekä " -"viestialueen, jota juuri nyt luet.\n" - -#: ../bin/cpull.c:547 -msgid "Tighten Tracks" -msgstr "Yhdistä raiteet" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:166 -msgid "Tile, Filename and Window Manager buttons" -msgstr "Otsikko, tiedostonimi ja ikkunanhallintapainikkeet" - -#: ../bin/cdraw.c:500 ../bin/cdraw.c:926 -msgid "Tiny" -msgstr "Pikkuruinen" - -#: ../bin/smalldlg.c:89 -msgid "Tip of the Day" -msgstr "Päivän vinkki" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:115 -msgid "Tip of the Day window" -msgstr "Näytä päivän vinkki" - -#: ../bin/misc.c:2325 -msgid "Tip of the Day..." -msgstr "Päivän vinkki ..." +"Voit kontrolloida kummalle puolelle rinnakkainen raide luodaan siirtämällä " +"hiiren osoitinta alkuperäisen raiteen puolelta toiselle.\n" -#: ../bin/doption.c:104 -msgid "Title" -msgstr "Otsikko" +#: ../../../../build/work/app/i18n/custmsg.h:418 +msgid "When you release the mouse button the new parallel track is created.\n" +msgstr "Uusi rinnakkainen raide luodaan kun vapautat hiiren painikkeen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:532 +#: ../../../../build/work/app/i18n/custmsg.h:419 msgid "" -"To 'un-hide' a track just Select it again and click the Tunnel button.\n" +"Note that the command remains active after you created the " +"track. This is controlled by the Sticky dialog in the Options menu.\n" msgstr "" -"Palauttaaksesi tunneliksi merkityt raideosat normaaleiksi, valitse ne ja " -"paina uudelleen tunneli-napista.\n" +"Huomaa, että rinnakkainen-komento pysyy aktiivisena komentona luotuamme " +"raiteen. Tätä käyttäytymistä voidaan muuttaa valikosta Asetukset|Pysyvät " +"komennot.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:122 -msgid "" -"To Remove the definitions, use the Custom Management dialog on the Tools " -"menu.\n" -msgstr "" -"Poistaaksesi määrittelyt, käytä \"Omat raideosat ja kalusto\" ikkunaa " -"Hallinta valikosta.\n" +#: ../../../../build/work/app/i18n/custmsg.h:420 +msgid "You cannot create a track parallel to a turnout.\n" +msgstr "Vaihteesta ei voi luoda rinnakkaista raidetta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:614 +#: ../../../../build/work/app/i18n/custmsg.h:421 msgid "" -"To copy a group of objects: Select the objects, press Control-C (or select " -"Copy from the Edit menu), press Control-V (or select Paste from the Edit " -"menu).\n" -"The selected tracks will be copied to the layout and you can Move or Rotate " -"them into position." +"Note that the new curved track is automatically connected to the short " +"parallel track.\n" msgstr "" +"Huomaa, että uusi kaarre liitettiin automaattisesti lyhyeen rinnakkaiseen " +"raiteeseen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:357 +#: ../../../../build/work/app/i18n/custmsg.h:422 msgid "" -"To create a Å’\" line, divide the dots-per-inch (DPI) of your display by 4 " -"and then by the drawing scale (which is 2 right now).\n" +"Polylines and Polygons (created with the command) can be modified by " +"dragging on their Corners or Edges.\n" msgstr "" -"Luodaksesi 1/4 tuuman viivan, jaa näyttösi DPI (pisteitä tuumalla, dots per " -"inch) neljällä ja sitten piirron mittakaavalla (joka tässä on 2).\n" +"Monikulmioita voidaan muokata raahaamalla niiden kulmista tai reunoista.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:155 -msgid "" -"To finish off the Polyline press the key or choose another drawing " -"type.\n" +#: ../../../../build/work/app/i18n/custmsg.h:423 +msgid "If you select the middle of an Edge a new Corner is created.\n" msgstr "" -"Viimeistelläksesi monikulmion, paina välilyöntiä tai valitse toinen " -"piirtotyyppi.\n" +"Jos valitset raahauskohdan kulmien väliltä, siihen luodaan uusi kulma.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:601 +#: ../../../../build/work/app/i18n/custmsg.h:424 msgid "" -"To refresh the Main window, press Control-L (hold down the 'Ctrl' key and " -"then press the 'l' key)." +"If you drag a Corner to another Corner the two are merged and the Edge " +"between them is removed.\n" msgstr "" +"Jos raahaat kulman toisen kulman päälle, ne yhdistetään yhdeksi " +"kulmapisteeksi.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:162 -msgid "" -"To show the Profile you need to select a Path on the tracks of your layout.\n" -msgstr "Näyttääksesi rataprofiilin täytyy valita reitti suunnitelmastasi.\n" +#: ../../../../build/work/app/i18n/custmsg.h:425 +msgid "But you cannot have a Poly-shape with less than 3 sides.\n" +msgstr "Monikulmiossa on kuitenkin aina oltava vähintään kolme kulmaa/sivua.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:159 +#: ../../../../build/work/app/i18n/custmsg.h:426 msgid "" "To use the command you first need to define Elevations on your " "layout.\n" @@ -9742,898 +10730,996 @@ msgstr "" "Käyttääksesi profiili-komentoa täytyy ratasuunnitelmassa olla määriteltyjä " "korkeustasoja.\n" -#: ../bin/cselect.c:570 -msgid "To: " -msgstr "Uusi:" - -#: ../bin/cselect.c:1381 -msgid "Toggle Label" -msgstr "Näytä/piilota merkintä" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:412 -msgid "Toggle the loaded status of the selected parameter file" -msgstr "Lataa tai poista valittu parametritiedosto" - -#: ../bin/param.c:127 -msgid "Tomato" -msgstr "Tomaatti" - -#: ../../../../build/xtrkcad/app/help/messages.h:121 -msgid "Too many selected tracks, drawing tracks as End Point." +#: ../../../../build/work/app/i18n/custmsg.h:427 +msgid "In this example we'll use the Elevations defined in the last example.\n" msgstr "" -"Liian monta valittua raidetta. Piirretään raiteet pelkkinä päätepisteinä." - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:147 -msgid "Toolbar configuration" -msgstr "Työkalurivin asetukset" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:145 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:148 -msgid "Tools menu" -msgstr "Työkalut -valikko" - -#: ../bin/csplit.c:111 -msgid "Top" -msgstr "Päällimmäiseksi" - -#: ../bin/ccurve.c:395 -msgid "Total Length" -msgstr "Kokonaispituus" +"Tässä esimerkissä käytämme edellisessä esimerkissä käytettyjä " +"korkeustasoja.\n" -#: ../bin/ccurve.c:471 -#, c-format -msgid "Total Length %s" -msgstr "Kokonaispituus %s" +#: ../../../../build/work/app/i18n/custmsg.h:428 +msgid "You can move or resize the Profile dialog now if you want.\n" +msgstr "Voit siirtää Profiili-ikkunaa tai muuttaa sen kokoa jos haluat.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:156 -msgid "Total track count" -msgstr "Raideosien kokonaismäärä" +#: ../../../../build/work/app/i18n/custmsg.h:429 +msgid "" +"To show the Profile you need to select a Path on the tracks of your layout.\n" +msgstr "Näyttääksesi rataprofiilin täytyy valita reitti suunnitelmastasi.\n" -#: ../bin/fileio.c:926 -msgid "Track" -msgstr "Raide" +#: ../../../../build/work/app/i18n/custmsg.h:430 +msgid "Select a Defined Elevation point (marked by Gold dots).\n" +msgstr "Valitse määriteltyjä korkeustasoja (merkitty keltaisilla täplillä).\n" -#: ../bin/cjoin.c:346 -#, c-format -msgid "Track (%d) is too short for transition-curve by %0.3f" -msgstr "Raide (%d) on %0.3f liian lyhyt kaarreloivennusta varten" +#: ../../../../build/work/app/i18n/custmsg.h:431 +msgid "We will start with the right end of the siding.\n" +msgstr "Aloitamme aseman oikeasta päästä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:582 +#: ../../../../build/work/app/i18n/custmsg.h:432 msgid "" -"Track Circles provide a quick way to see what arrangement of tracks will fit " -"in your layout spaces. Create Circles with your typical radius and place " -"them in corners and other locations where your main-line will make changes " -"of direction. This will give you an overall idea of how your layout will " -"look.\n" -"\n" -"You can create Circles by:\n" -" using a fixed radius\n" -" dragging from the Center to edge\n" -" dragging from an edge to the Center\n" -"You can click on the small button to the left of the Circle command button " -"to change the method." +"The second Point is at the left end of the siding. The Path will be drawn " +"in Purple on the layout.\n" msgstr "" -"Ympyräraiteet tarjoavat nopean tavan hahmottaa millainen raidejärjestely " -"mahtuu suunniteltuun tilaan. Luo ympyräraiteita käyttäen aikomaasi " -"kaarresädettä ja asettele niitä nurkkiin ja muihin paikkoihin, joissa " -"pääraiteesi vaihtaa suuntaa. Tämä antaa yleiskuvan tulevan ratasi muodosta.\n" -"\n" -"Voit luoda ympyräraiteita:\n" -" - Käyttämällä määrättyä sädettä.\n" -" - Raahaamalla keskipisteestä pois päin.\n" -" - Raahaamalla kehältä kohti keskipistettä.\n" -"Voit valita tavan valikosta, joka avautuu Ympyrärata-painikkeen oikealta " -"puolelta." - -#: ../bin/doption.c:190 -msgid "Track Descriptions" -msgstr "Raideosien kuvaukset" - -#: ../bin/doption.c:190 -msgid "Track Elevations" -msgstr "Raideosien korkeudet" - -#: ../bin/misc.c:1696 ../bin/misc.c:1725 -msgid "Track Group Buttons" -msgstr "Raiteiden ryhmittely" - -#: ../bin/doption.c:538 -msgid "Track Ties" -msgstr "Ratapölkyt" +"Toinen piste on aseman vasen pää. Reitti merkitään ratasuunnitelmaan " +"purppuralla.\n" -#: ../bin/doption.c:191 -msgid "Tracks" -msgstr "Raiteet" +#: ../../../../build/work/app/i18n/custmsg.h:433 +msgid "Now select the end of one of the Branches\n" +msgstr "Valitse nyt toisen haaran pää.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:646 +#: ../../../../build/work/app/i18n/custmsg.h:434 msgid "" -"Tracks that are too steep or curve too tightly are drawn in the Expection " -"color (Purple by default). \n" -"This helps to identify potential problem areas. \n" -"The maximum grade and minimum radius are set on the Preferences dialog." +"The Profile line is drawn in Red. This indicates that there some turnouts " +"on that section of the Path which have more than 2 connections.\n" msgstr "" +"Rataprofiili on piirretty punaisella viivalla. Tämä tarkoittaa sitä, että " +"kyseisellä osuudella on vaihteita, jotka ovat yhteydessä useampaan kuin " +"kahteen määriteltyyn korkeustasoon.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:378 -msgid "Tracks with grades steeper than this are exceptional" -msgstr "Raiteet, joissa on jyrkempi nousukulma, käsitetään erityiraiteiksi" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:377 -msgid "Tracks with tighter radius than this are exceptional" -msgstr "Raiteet, joissa on pienempi kaarresäde, käsitetään erityiraiteiksi" - -#: ../bin/ctrain.c:2038 ../bin/ctrain.c:2520 -msgid "Train" -msgstr "Aja junilla" - -#: ../bin/ctrain.c:1063 -msgid "Train Control" -msgstr "Junien hallinta" - -#: ../bin/ctrain.c:1061 -#, c-format -msgid "Train Control %d" -msgstr "Junien hallinta %d" - -#: ../bin/ctrain.c:1060 -msgid "Train Control XXX" -msgstr "Junien hallinta XXX" - -#: ../bin/misc.c:1697 ../bin/misc.c:1726 -msgid "Train Group Buttons" -msgstr "Junat" - -#: ../bin/doption.c:373 -msgid "Train Update Delay" -msgstr "Junien päivitysväli" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:469 -msgid "Train odometer" -msgstr "Junan matkamittari" - -#: ../bin/doption.c:217 -msgid "Trains On Hidden Track" -msgstr "Junat piilossa olevalla radalla" +#: ../../../../build/work/app/i18n/custmsg.h:435 +msgid "" +"The grade on this part of the Path is the average and may be affected by " +"other Elevations, such the end of the lower branch.\n" +msgstr "" +"Osuuden nousukulma on keskiarvo ja siihen voi vaikuttaa muut korkeustasot, " +"kuten alemman haaran pään korkeustaso.\n" -#: ../bin/ctrain.c:712 -msgid "Trains Paused" -msgstr "Junat pysäytetty" +#: ../../../../build/work/app/i18n/custmsg.h:436 +msgid "Now try to select the End-Point of the other branch.\n" +msgstr "Yritä nyt valita toisen haaran pää.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:635 +#: ../../../../build/work/app/i18n/custmsg.h:437 msgid "" -"Trains will 'crash' if they hit another car when travelling faster than the " -"'Max Coupling Speed' (on the Command Options dialog). \n" -"They will also 'crash' if they hit the end of the track or an open " -"turnout. \n" -"Crashed trains must be manually moved back onto the track." +"You will get an error message because there is no route to one of the ends " +"of the existing Path.\n" msgstr "" +"Saat virheilmoituksen, koska valitun reitin päistä ei ole reittiä tähän " +"pisteeseen.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:224 -msgid "Trains will crash above this speed" +#: ../../../../build/work/app/i18n/custmsg.h:438 +msgid "" +"In this case remove the last part of the Path by clicking on current end of " +"the Path and reselect the End-Point.\n" msgstr "" -"Suurin sallittu vaunujen kytkentänopeus. Suuremmalla nopeudella aiheutuu " -"törmäys." - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:36 -msgid "Triming Turnout Ends" -msgstr "Vaihteen päiden säätö" - -#: ../bin/dcar.c:45 -msgid "Truck" -msgstr "Teli" +"Poista tässä tapauksessa viimeinen osuus klikkaamalla valittuna olevan " +"haaran päätä ja valitse sitten toisen haaran pää.\n" -#: ../bin/dcar.c:1974 -msgid "Truck Centers" -msgstr "Telien keskikohdat" +#: ../../../../build/work/app/i18n/custmsg.h:439 +msgid "Notice that the Grade has changed on the Profile.\n" +msgstr "Huomaa että nousukulma on muuttunut profiili-ikkunassa.\n" -#: ../bin/dcar.c:3592 -msgid "Truck Centers must be less than Car Length" +#: ../../../../build/work/app/i18n/custmsg.h:440 +msgid "" +"You can Ignore End-Points on the Path by using Shift-Right-Click to display " +"the Profile Options popup menu and chosing Ignore.\n" msgstr "" -"Telien keskikohtien välisen etäisyyden on oltava vaunun pituutta pienempi" - -#: ../bin/misc.c:2174 -msgid "Tu&nnel" -msgstr "Tunneli" - -#: ../bin/misc.c:2098 ../bin/cselect.c:1879 -msgid "Tunnel" -msgstr "Tunneli" - -#: ../bin/misc.c:2340 -msgid "Tur&nout Designer..." -msgstr "Vaihteiden suunnittelu..." - -#: ../bin/track.c:1681 ../bin/compound.c:773 ../bin/cturnout.c:884 -#: ../bin/cturnout.c:2272 ../bin/cturnout.c:2442 -msgid "Turnout" -msgstr "Palaraide" - -#: ../bin/ctodesgn.c:1708 -msgid "Turnout Designer" -msgstr "Raideosien suunnittelu" +"Voit hylätä reitillä olevia raiteiden liitoskohtia ponnahdusvalikosta, joka " +"aukeaa painamalla vaihto-nnäppäintä ja klikkaamalla hiiren oikealla. Valitse " +"\"Hylkää\".\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:167 -msgid "Turnout and Structure Hot Bar" -msgstr "Raideosien ja rakennusten valikko" +#: ../../../../build/work/app/i18n/custmsg.h:441 +msgid "" +"Note: We can't show the menu in demo mode but we will show the effect of a " +"Shift Right Click and selecting ignore. We will be Ignoring the End-Point " +"of the Turnout that is not on the Path.\n" +msgstr "" +"Huom: Demossa ei voida esittää valikoita, mutta näytämme ponnahdusvalikosta " +"suoritetun hylkää-komennon vaikutuksen. Hylkäämme vaihteesta sen " +"päätepisteen, joka ei ole profiilin reitillä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:489 -msgid "Turnout description (Manuf., Size, Part Number, etc)" -msgstr "Raideosan kuvaus (valmistaja, koko, tuotekoodi, jne.)" +#: ../../../../build/work/app/i18n/custmsg.h:442 +msgid "Notice that part of the Profile line is redrawn in Blue.\n" +msgstr "Huomaa että osa profiilista on piirretty sinisellä viivalla.\n" -#: ../bin/cturnout.c:191 -#, c-format -msgid "Turnout path[%d:%d] out of bounds: %d" -msgstr "" +#: ../../../../build/work/app/i18n/custmsg.h:443 +msgid "" +"Also, the Computed Elevations and Grade marker on the right side of the " +"layout have been updated.\n" +msgstr "Myös lasketut korkeustasot sekä nousukulman merkintä on päivitetty.\n" -#: ../bin/cturnout.c:203 ../bin/cturnout.c:208 -#, c-format -msgid "Turnout path[%d] %d is not a track segment" +#: ../../../../build/work/app/i18n/custmsg.h:444 +msgid "" +"You can set additional Defined Elevation points using the Profile Options " +"popup menu. These points are added to the Profile if they are on the Path.\n" msgstr "" +"Ponnahtusvalikon avulla voit lisätä myös uusia määriteltyjä korkeustasoja. " +"Nämä pisteet lisätään profiiliin, jos ne ovat profiilin reitillä.\n" -#: ../bin/cturnout.c:216 -#, c-format -msgid "Turnout path[%d] %d-%d not connected: %0.3f" +#: ../../../../build/work/app/i18n/custmsg.h:445 +msgid "" +"We do this by Shift Right Click to display the Profile Options popup menu " +"and selecting Define.\n" msgstr "" +"Teemme tämän avaamalla ponnahdusvalikon ja valitsemalla \"Määritelty\".\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:638 +#: ../../../../build/work/app/i18n/custmsg.h:446 msgid "" -"Turnout, Curved and Helix track labels can be individually turned on and off " -"by doing a Shift-Right-Click on the track when using the Move Label command." +"We've just added a Defined Elevation point to the middle of the lower " +"branch. Notice the addition on the Profile dialog.\n" msgstr "" +"Olemme juuri lisänneet määritellyn korkeustason keskelle alempaa haaraa. " +"Huomaa lisäys profiili-ikkunassa.\n" -#: ../bin/doption.c:188 ../bin/dcmpnd.c:402 -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:31 -msgid "Turnouts" -msgstr "Raideosat" - -#: ../bin/ccurve.c:390 ../bin/tcurve.c:344 -msgid "Turns" -msgstr "Kierroksia" - -#: ../bin/cturntbl.c:286 ../bin/cturntbl.c:824 -msgid "Turntable" -msgstr "Kääntöpöytä" +#: ../../../../build/work/app/i18n/custmsg.h:447 +msgid "" +"For the siding we defined a Station name but it's not on the Path, since the " +"Path takes the shortest distance between points.\n" +msgstr "" +"Sivuraiteelle määrittelimme aseman, mutta se ei ole reitillä, koska " +"profiilin reitti valitaan lyhyimmän pisteiden välisen etäisyyden mukaan.\n" -#: ../bin/doption.c:295 -msgid "Turntable Angle" -msgstr "Kääntöpöydän kulma" +#: ../../../../build/work/app/i18n/custmsg.h:448 +msgid "" +"We can Ignore one of the End-Points on a Turnout to force the Path to take " +"the other route.\n" +msgstr "" +"Voimme hylätä yhden vaihteen päätepisteistä pakottaaksemme reitin kulkemaan " +"toista kautta.\n" -#: ../bin/ctodesgn.c:579 -msgid "Turntable Section" -msgstr "Kääntöpöytä" +#: ../../../../build/work/app/i18n/custmsg.h:449 +msgid "" +"Again we use Shift-Right-Click to display the Profile Options menu and " +"select ignore.\n" +msgstr "Käytämme jälleen ponnahdusvalikkoa ja valitsemme \"Hylkää\".\n" -#: ../bin/cturntbl.c:272 -#, c-format -msgid "Turntable(%d): Layer=%d Center=[%s %s] Diameter=%s #EP=%d" -msgstr "" -"Kääntöpöytä(%d): Taso=%d Keskipiste=[%s %s] Halkaisija=%s Päätepisteitä=%d" +#: ../../../../build/work/app/i18n/custmsg.h:450 +msgid "Now remove the First section of the Path,\n" +msgstr "Valitse nyt reitin ensimmäinen osuus,\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:18 -msgid "Turntables" -msgstr "Kääntöpöydät" +#: ../../../../build/work/app/i18n/custmsg.h:451 +msgid "and reselect it.\n" +msgstr "ja valitse se uudelleen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:312 +#: ../../../../build/work/app/i18n/custmsg.h:452 msgid "" -"Turntables are created by specifying the radius in a dialog box on the " -"Status Bar. The radius in the dialog can be changed before proceeding.\n" +"Now the Path goes through the Station End-Point and the name appears on the " +"Profile dialog.\n" msgstr "" -"Kääntöpöydät luodaan määrittelemällä ensiksi kääntöpöydän säde tilarivillä " -"olevaan tekstikenttään.\n" +"Nyt reitti kulkee määrittelemämme aseman kautta ja sen nimi näkyy profiili-" +"ikkunassa.\n" -#: ../bin/doption.c:208 -msgid "Two Rail Scale" -msgstr "Kahden kiskon mittakaava" +#: ../../../../build/work/app/i18n/custmsg.h:453 +msgid "Now we need to increase the separation where the tracks cross.\n" +msgstr "Nyt meidän on kasvatettava risteävien raiteiden välistä etäisyyttä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:83 +#: ../../../../build/work/app/i18n/custmsg.h:454 msgid "" -"Two ends of the turnout, from the frog to the end of the diverging leg and " -"from the points to the left, are now straight track sections.\n" +"The two Elevations you see here are Computed Elevations which means " +"XTrackCAD dynamically computes the Elevation based on the Elevations of " +"connecting tracks.\n" msgstr "" -"Haarautuvan raiteen takajatkos sekä vaihteen etujatkos ovat nyt suoria " -"raideosia.\n" +"Tässä näkyvät kaksi korkeustason merkintää ovat laskettuja, mikä tarkoittaa " +"sitä että XTrackCAD laskee tämän pisteen korkeuden automaattisesti muiden " +"tähän liittyvien korkeustasojen mukaan.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:285 +#: ../../../../build/work/app/i18n/custmsg.h:455 msgid "" -"Two straight tracks are joined by selecting the two End-Points. The " -"selected End-Points will be those closest to the cursor when the track is " -"selected.\n" +"First make the lower End-Point a Defined Elevation point using Shift-Right-" +"Click and the Profile Options menu. You will see the End-Point marked by a " +"Gold dot and a new line is added to the Profile dialog.\n" msgstr "" -"Kaksi suoraa raidetta yhdistetään valitsemalla kaksi päätepistettä. Valittu " -"päätepiste on se, joka on lähempänä hiiren osoitinta raidetta valittaessa.\n" +"Muuta ensin alempi \"laskettu\" korkeustaso \"määritellyksi\" käyttämällä " +"jälleen ponnahdusvalikkoa. Piste merkitään nyt keltaisella täplällä ja uusi " +"viiva lisätään profiili-ikkunaan.\n" -#: ../bin/dcar.c:1941 ../bin/dcar.c:4070 ../bin/dcar.c:4075 -msgid "Type" -msgstr "Tyyppi" +#: ../../../../build/work/app/i18n/custmsg.h:456 +msgid "Now, drag the point on the Profile Dialog to change the Elevation.\n" +msgstr "" +"Raahaa nyt profiili-ikkunassa tätä pistettä muuttaaksesi sen korkeustasoa.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:303 -msgid "Type of elevation" -msgstr "Tyyppi" +#: ../../../../build/work/app/i18n/custmsg.h:457 +msgid "" +"Note the grade on each side of the point will be displayed at the bottom of " +"the Profile dialog.\n" +msgstr "" +"Nousukulmat pisteen molemmin puolin näytetään profiili-ikkunan alaosassa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:411 +#: ../../../../build/work/app/i18n/custmsg.h:458 msgid "" -"Unconnected End-Points are indicated by Red crosses, and connected End-" -"Points are indicated by Red lines.\n" +"After we release the Profile is updated to show the new Elevation and " +"Grade.\n" msgstr "" -"Irralliset päätepisteet merkitään punaisilla risteillä ja liitetyt " -"punaisilla viivoilla.\n" +"Kun vapautamme hiiren painikkeen, profiili on päivitetty uuden korkeustason " +"mukaisesti.\n" -#: ../bin/ctrain.c:2535 -msgid "Uncouple" -msgstr "Irrota" +#: ../../../../build/work/app/i18n/custmsg.h:459 +msgid "The command will change the size of the selected objects.\n" +msgstr "Mittakaavan muutos -komennolla muutetaan valittujen objektien kokoa.\n" -#: ../bin/dcar.c:2371 ../bin/dcar.c:2688 -msgid "Undecorated" -msgstr "Ei yhtiömerkintöjä" +#: ../../../../build/work/app/i18n/custmsg.h:460 +msgid "First we will try rescaling by ratio.\n" +msgstr "Ensin kokeilemme suhteellista muutosta.\n" -#: ../bin/dcar.c:2598 -msgid "Undecorated " -msgstr "Ei yhtiömerkintöjä " +#: ../../../../build/work/app/i18n/custmsg.h:461 +msgid "We are going to make everything 150% bigger.\n" +msgstr "Suurennamme kaiken 150%:ksi entiseen verrattuna.\n" -#: ../bin/celev.c:317 ../bin/celev.c:334 ../bin/celev.c:375 ../bin/celev.c:382 -#: ../bin/celev.c:385 -#, c-format -msgid "Undefined" -msgstr "Määrittelemätön" +#: ../../../../build/work/app/i18n/custmsg.h:462 +msgid "Note the track gauge did not change.\n" +msgstr "Huomaa ettei raideleveys muuttunut.\n" -#: ../bin/misc.c:2083 -msgid "Undo" -msgstr "Kumoa" +#: ../../../../build/work/app/i18n/custmsg.h:463 +msgid "Let's try that again.\n" +msgstr "Kokeillaan uudestaan.\n" -#: ../bin/misc.c:1690 ../bin/misc.c:1721 -msgid "Undo Buttons" -msgstr "Kumoa/Tee uudelleen" +#: ../../../../build/work/app/i18n/custmsg.h:464 +msgid "Now we are going to convert from one scale to another.\n" +msgstr "Nyt muutamme mittakaavasta toiseen.\n" -#: ../bin/cundo.c:154 -msgid "Undo Trace" -msgstr "Jäljitys" +#: ../../../../build/work/app/i18n/custmsg.h:465 +msgid "We will convert everything from N scale to HO scale...\n" +msgstr "Muutamme kaiken N-mittakaavasta H0:ksi...\n" -#: ../bin/cundo.c:491 ../../../../build/xtrkcad/app/bin/bllnhlp.c:125 -msgid "Undo last command" -msgstr "Kumoa edellinen komento" +#: ../../../../build/work/app/i18n/custmsg.h:466 +msgid "and change the track gauge as well.\n" +msgstr "ja muutamme myös raideleveyden.\n" -#: ../bin/cundo.c:488 -#, c-format -msgid "Undo: %s" -msgstr "Kumoa: %s" +#: ../../../../build/work/app/i18n/custmsg.h:467 +msgid "Note that the Title of the turnout did not change.\n" +msgstr "Huomaa ettei vaihteen otsikko muuttunut.\n" -#: ../bin/param.c:182 -msgid "Unexpected End Of String" -msgstr "Odottamaton merkkijonon loppu" +#: ../../../../build/work/app/i18n/custmsg.h:468 +msgid "" +"The command will pivot the Selected objects. First Click on the " +"pivot point and then drag to Rotate the objects.\n" +msgstr "" +"Voit pyörittää valittuja objekteja. Klikkaa ensin haluttua kiertopistettä ja " +"raahaa sitten pyörittääksesi objekteja.\n" -#: ../bin/cgroup.c:576 -msgid "Ungroup Object" -msgstr "Pura ryhmittely" +#: ../../../../build/work/app/i18n/custmsg.h:469 +msgid "" +"In this example we will rotate the selected structure about it's center.\n" +msgstr "" +"Tässä esimerkissä pyöritämme valittua rakennusta keskipisteensä ympäri.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:126 -msgid "Ungroup objects" -msgstr "Pura ryhmittely" +#: ../../../../build/work/app/i18n/custmsg.h:470 +msgid "" +"The command will restrict the rotation to increments of 15° if you " +"hold down the Control key.\n" +msgstr "" +"Jos pidät contol-näppäintä painettuna pyörittäminen tapahtuu 15°:n välein.\n" -#: ../bin/doption.c:359 -msgid "Units" -msgstr "Yksiköt" +#: ../../../../build/work/app/i18n/custmsg.h:471 +msgid "" +"Shift-Right-Click will display a popup-menu that you can use to rotate by " +"fixed amount (15°, 30°, 45°, 90° or 180°). The demonstration cannot show " +"the popup-menu but it can show the effects.\n" +msgstr "" +"Vaihto + oikea klikkaus avaa ponnahdusvalikon, josta voi pyörittää määrätyn " +"kulman verran (15°, 30°, 45°, 90° or 180°). Demossa ei voida näyttää " +"ponnahdusvalikkoa, mutta näytämme toiminnon vaikutuksen.\n" -#: ../bin/dcar.c:146 ../bin/dcar.c:2437 ../bin/dcar.c:2441 -msgid "Unknown" -msgstr "Tuntematon" +#: ../../../../build/work/app/i18n/custmsg.h:472 +msgid "Here we will rotate by 90° clockwise (CW).\n" +msgstr "Pyöritämme 90° myötäpäivään (MP).\n" -#: ../bin/ctrain.c:733 -msgid "Unknown Status" -msgstr "Tuntematon tila" +#: ../../../../build/work/app/i18n/custmsg.h:473 +msgid "" +"Another option of the command popup-menu is to Align the Selected " +"object with some other object.\n" +msgstr "" +"Toinen vaihtoehto ponnahdusvalikossa on suunnata valittu objekti jonkin " +"toisen objektin mukaisesti.\n" -#: ../../../../build/xtrkcad/app/help/messages.h:133 -#, c-format +#: ../../../../build/work/app/i18n/custmsg.h:474 msgid "" -"Unknown playback command (%d)\n" -"%s" +"First we will click on one line of the Selected object. The angle of this " +"part of the object will be Aligned.\n" msgstr "" -"Tuntematon toistokomento (%d)\n" -"%s" +"Ensin klikkaamme valitun objektin jotakin viivaa. Objekti suunnataan tämän " +"viivan avulla.\n" -#: ../bin/cturnout.c:252 -msgid "Unknown special case" -msgstr "Tuntematon erikoistapaus" +#: ../../../../build/work/app/i18n/custmsg.h:475 +msgid "" +"Next, we click on an Unselected object. The Selected structure will be " +"rotated so that the line we clicked on will be parallel to the straight " +"track.\n" +msgstr "" +"Seuraavaksi klikataan valitsematonta objektia. Valittu rakennus käännetään " +"siten, että valittu viiva on saman suuntainen suoran radan kanssa.\n" -#: ../bin/dprmfile.c:226 ../bin/dprmfile.c:330 -msgid "Unload" -msgstr "Poista" +#: ../../../../build/work/app/i18n/custmsg.h:476 +msgid "" +"If we drag the mouse across the track, we can flip the structure by 180°. " +"This is similar to how we place turnouts.\n" +msgstr "" +"Jos raahaamme hiirellä radan puolelta toiselle, rakennus peilataan 180°. " +"Samalla tavalla kuin vaihteiden asettelussa.\n" -#: ../bin/fileio.c:684 -msgid "Unnamed Trackplan" -msgstr "Nimetön ratasuunnitelma" +#: ../../../../build/work/app/i18n/custmsg.h:477 +msgid "" +"We can also align to curved shapes. The Selected object will be rotated to " +"be parallel to the curve under the cursor.\n" +msgstr "" +"Voimme myös suunnata kaarevien muotojen mukaisesti. Valittua objektia " +"pyöritetään siten, että se on yhdensuuntainen hiiren osoittimen alla olevan " +"kaaren mukaisesti.\n" -#: ../bin/misc.c:2542 -#, c-format -msgid "Unnamed Trackplan - %s(%s)" -msgstr "Nimetön ratasuunnitelma - %s(%s)" +#: ../../../../build/work/app/i18n/custmsg.h:478 +msgid "" +"As we drag along the curved track the Selected object rotates to follow the " +"curve.\n" +msgstr "" +"Raahaamalla kaarretta pitkin, valittua objektia pyöritetään vastaavalla " +"tavalla.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:526 -msgid "Unprintable margins" -msgstr "Tulostumattomat marginaalit" +#: ../../../../build/work/app/i18n/custmsg.h:479 +msgid "Again, if we drag across the track we can flip the stucture.\n" +msgstr "" +"Rakennus voidaan jälleen peilata raahaamalla raiteen puolelta toiselle.\n" -#: ../../../../build/xtrkcad/app/help/messages.h:106 -#, c-format -msgid "Unrecognized Option: %s" -msgstr "Tunnistamaton valinta: %s" +#: ../../../../build/work/app/i18n/custmsg.h:480 +msgid "We can also Align to another Structure or any object.\n" +msgstr "" +"Voimme myös suunnata jonkin toisen rakennuksen tai minkä tahansa objektin " +"mukaan.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:443 -msgid "Unselected tracks" -msgstr "Normaalit raideosat, joita ei ole valittu" +#: ../../../../build/work/app/i18n/custmsg.h:481 +msgid "" +"The command draws a Ruler on the layout you can use to measure " +"distances.\n" +msgstr "" +"Viivain-komento piirtää viivaimen, jolla voit mitata etäisyyksiä " +"ratasuunnitelmassasi.\n" -#: ../bin/dcar.c:2822 ../bin/dcar.c:2831 ../bin/dcar.c:2840 -#: ../bin/dcmpnd.c:168 -msgid "Update" -msgstr "Päivitä" +#: ../../../../build/work/app/i18n/custmsg.h:482 +msgid "If you press the command again the Ruler is removed.\n" +msgstr "Jos aktivoit toiminnon uudelleen, viivain poistetaan.\n" -#: ../bin/dcar.c:2821 -#, c-format -msgid "Update %s Scale Car" -msgstr "Päivitä %s mittakaavan vaunu" +#: ../../../../build/work/app/i18n/custmsg.h:483 +msgid "But you can place it somewhere else.\n" +msgstr "Mutta voit sijoittaa sen johonkin toiseen paikkaan.\n" -#: ../bin/dcar.c:2830 -#, c-format -msgid "Update %s Scale Car Part" -msgstr "Päivitä %s mittakaavan vaunu" +#: ../../../../build/work/app/i18n/custmsg.h:484 +msgid "The command.\n" +msgstr "" +"Valittuja raiteita voidaan siirtää tai pyörittää Valitse -komennon ollessa " +"aktiivisena.\n" -#: ../bin/dcmpnd.c:168 -msgid "Update Title" -msgstr "Pävitä otsikko" +#: ../../../../build/work/app/i18n/custmsg.h:486 +msgid "Selected tracks can also be deleted, hidden, listed and exported.\n" +msgstr "" +"Valitut raiteet voidaan myös poistaa, piilottaa (tunneli), luetteloida tai " +"eksportoida (viedä tiedostoon).\n" -#: ../bin/misc.c:2346 -msgid "Update Turnouts and Structures" -msgstr "Päivitä vaihteet ja rakennukset" +#: ../../../../build/work/app/i18n/custmsg.h:487 +msgid "A single Left-Click selects tracks.\n" +msgstr "Yksi klikkaus hiiren vasemmalla painikkeella valitsee raiteen.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:233 -msgid "Update custom file and close" -msgstr "Päivitä tiedosto ja sulje ikkuna" +#: ../../../../build/work/app/i18n/custmsg.h:488 +msgid "Selecting a selected track de-selects it.\n" +msgstr "Klikkaamalla jo valittuna olevaa raidetta, sen valinta poistuu.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:414 -msgid "Update parameter file list" -msgstr "Päivitä parametritiedostojen luettelo" +#: ../../../../build/work/app/i18n/custmsg.h:489 +msgid "" +"Shift-Left-Click on a track will select all unselected tracks connected to " +"the track. Selection stops at a previously selected track.\n" +msgstr "" +"Pitämällä vaihto-näppäintä pohjassa ja klikkaamalla raidetta, valitaan " +"kaikki tähän raiteeseen yhtyvät raiteet. Valinta pysähtyy kuitenkin " +"ensimmäiseen jo valittuun raiteeseen.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:100 -msgid "Update selected Turnout and Structure definitions" -msgstr "Päivitä valittujen vaihteiden ja rakennusten määrittelyt" +#: ../../../../build/work/app/i18n/custmsg.h:490 +msgid "Be careful with this because its easy to select all tracks this way.\n" +msgstr "" +"Ole kuitenkin varovainen, sillä näin voit helposti tulla valinneeksi kaikki " +"raiteet.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:511 -msgid "Update the Turnouts' title" -msgstr "Päivitä raideosan otsikko" +#: ../../../../build/work/app/i18n/custmsg.h:491 +msgid "The key will deselect all objects.\n" +msgstr "Esc -näppäin poistaa valinnat kaikista objekteista.\n" -#: ../bin/dcar.c:3839 ../bin/dcar.c:3856 -msgid "Updated" -msgstr "Päivitetty" +#: ../../../../build/work/app/i18n/custmsg.h:492 +msgid "Left-Drag is used to select all objects within an area.\n" +msgstr "" +"Raahaamalla hiiren vasemmalla painikkeella, voidaan valita kaikki alueella " +"olevat objektit.\n" -#: ../bin/dcar.c:3809 -msgid "Updated Car" -msgstr "Päivitä vaunu/veturi" +#: ../../../../build/work/app/i18n/custmsg.h:493 +msgid "And Right-Drag de-selects all tracks within an area.\n" +msgstr "" +"Raahaaminen hiiren oikealla painikkeella puolestaan poistaa alueella olevien " +"kohteiden valinnat.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:382 -msgid "Updated cost of current selected item" -msgstr "Syötä valitulle tuotteelle uusi hinta" +#: ../../../../build/work/app/i18n/custmsg.h:494 +msgid "Shift-Left-Drag is used to move selected tracks.\n" +msgstr "" +"Voit siirtää valittuja objekteja pitämällä vaihto-näppäintä painettuna ja " +"raahaamalla hiiren vasemmalla painikkeella.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:527 -msgid "Updates and closes this dialog" -msgstr "Hyväksy asetukset ja sulje ikkuna" +#: ../../../../build/work/app/i18n/custmsg.h:495 +msgid "" +"When you move selected tracks that are connected to unselected tracks, the " +"tracks will be disconnected. These points are marked by a Red cross on the " +"layout.\n" +msgstr "" +"Kun siirrät valittuja raiteita, jotka on liitetty valitsemattomiin " +"raiteisiin, raiteet irrotetaan toisistaan. Nämä pisteet merkitään punaisilla " +"risteillä.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:124 -msgid "Updates old source files with 3 part titles" -msgstr "Päivittää vanhat lähdetiedostot kolmiosaisilla otsikoilla" +#: ../../../../build/work/app/i18n/custmsg.h:496 +msgid "" +"Drawing the tracks while moving can be very time-consuming. We had just " +"used the \"Normal\" method of drawing tracks.\n" +msgstr "" +"Raiteita siirrettäessä niiden piirto voi olla hyvinkin aikaa vievää. Tässä " +"on käytetty reiteiden piirron asetusta \"normaali\".\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:448 -msgid "Updates the colors" -msgstr "Pävitä värit ja sulje ikkuna" +#: ../../../../build/work/app/i18n/custmsg.h:497 +msgid "" +"The Command Options dialog (from the Options menu) contains a Radio button " +"group which you can use to pick the drawing method.\n" +msgstr "" +"Komentojen asetuksista (Asetukset|Komennot) voit valita raiteiden " +"piirtotavan.\n" -#: ../bin/dprmfile.c:98 -#, c-format -msgid "Updating %s" -msgstr "Päivitetään %s" +#: ../../../../build/work/app/i18n/custmsg.h:498 +msgid "" +"You can also popup the Command Options Menu by pressing Shift-Right-Click " +"which includes options for setting the drawing method. These options are " +"also available for the Move and Rotate Command Options Menu.\n" +msgstr "" +"Piirtotavan voi valita myös painamalla vaihto-näppäintä ja klikkaamalla " +"hiiren oikealla painikkeella, jolloin avautuu komennon ponnahdusvalikko. " +"Piirtotavan valinta on saatavilla Siirrä ja Pyöritä komentojen " +"ponnahdusvalikoissa.\n" -#: ../bin/dcmpnd.c:105 -msgid "Updating definitions, please wait" -msgstr "Päivitetään määrittelyjä, odota hetki." +#: ../../../../build/work/app/i18n/custmsg.h:499 +msgid "" +"The next method is \"Simple\" draws. Here tracks are drawn using one line, " +"no End-Points are drawn, lines are not drawn and structures are drawn using " +"a box outline.\n" +msgstr "" +"Seuraava piirtotapa on \"Yksinkertainen\", jolloin raiteet piirretään " +"yhdellä viivalla, ilman päätepisteiden merkintää. Viivoja ei piirretä ja " +"rakennukset piirretään yksinkertaisina nelikulmioina.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:508 +#: ../../../../build/work/app/i18n/custmsg.h:500 msgid "" -"Use Shift-Left-Click to Split the track and create an End-Point we can use " -"for an Elevation,\n" +"Note: you can move the Command Options dialog if it obscures the main " +"window.\n" msgstr "" -"Paina vaihto-näppäintä ja klikkaa hiiren vasemmalla painikkeella rataa " -"luodaksesi liitoskohdan korkeustasoja varten\n" +"Huom: Voit siirtää Komentojen asetukset -ikkunaa, jos se peittää pääikkunaa " +"oleellisesti.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:626 +#: ../../../../build/work/app/i18n/custmsg.h:501 msgid "" -"Use the MoveTo button on the Custom Management dialog to move your custom " -"Turnout, Structure and Car definitions to a .XTP parameter file." +"The next method is to just draw the End-Points of the selected tracks.\n" msgstr "" +"Seuraava tapa on piirtää ainoastaan valittujen raiteiden päätepisteet.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:590 +#: ../../../../build/work/app/i18n/custmsg.h:502 msgid "" -"Use the Parts List command to measure track length.\n" -"Select the tracks you want to measure and then click on the Parts List " -"button. The report will list the total of length of the selected flex-" -"track. You will have to add in the length of any Turnouts." +"Unconnected End-Points are indicated by Red crosses, and connected End-" +"Points are indicated by Red lines.\n" msgstr "" -"Käytä osaluetteloa mitataksesi radan pituuksia.\n" -"Valitse mitattava rataosuus ja avaa sitten osaluettelo. Raportissa on " -"laskettuna fleksi raiteen kokonaispituus valitulla rataosuudella. " -"Palaraiteiden pituudet täytyy lisätä erikseen." +"Irralliset päätepisteet merkitään punaisilla risteillä ja liitetyt " +"punaisilla viivoilla.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:179 -msgid "Use the Selected figure as the car image" -msgstr "Käytä valittua kuvaa vaunun tai veturin kuvana" +#: ../../../../build/work/app/i18n/custmsg.h:503 +msgid "Now we will go back to using the Normal method again.\n" +msgstr "Nyt palautetaan normaali piirtotapa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:631 -msgid "Use the Train Odometer to measure distances along the track." +#: ../../../../build/work/app/i18n/custmsg.h:504 +msgid "" +"Shift-Right-Drag rotates the selected tracks about the pivot point (which is " +"where you started the drag)\n" msgstr "" +"Painamalla vaihto-näppäintä ja raahaamalla hiiren oikealla painikkeella voit " +"pyörittää valittuja raiteita. Kiertopiste määräytyy sen mukaan, mistä " +"raahaaminen aloitettiin.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:180 -msgid "Use the default figure as the car image" -msgstr "Käytä oletuskuvaa vaunun tai veturin kuvana" +#: ../../../../build/work/app/i18n/custmsg.h:505 +msgid "" +"Next we select the command. You can use Shift-Left-Click to " +"move an End-Point of a selected track to join with an unselected track.\n" +msgstr "" +"Seuraavaksi käytämme Yhdistä-komentoa. Vaihto + hiiren vasen siirtää valitut " +"raiteet ja liittää ne valitsemattomiin.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:460 -msgid "Useful information about the program" -msgstr "Hyödyllisiä tietoja ohjelmasta" +#: ../../../../build/work/app/i18n/custmsg.h:506 +msgid "" +"Note: because of differing display resolutions the next mouse click may not " +"be positioned correctly in this demo and the Move-To-Join operation may not " +"be demonstrated.\n" +msgstr "" +"Huom: Johtuen erilaisista näytön resoluutioista seuraava hiiren klikkaus voi " +"olla virheellisesti kohdistettu tässä demossa, jolloin \"siirrä yhdistääksesi" +"\" operaation esitys ei toimi oikein.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:376 -msgid "Users on those platforms will not see the gap.\n" -msgstr "Mainittujen käyttöjärjestelmien käyttäjät eivät näe näitä rakoja.\n" +#: ../../../../build/work/app/i18n/custmsg.h:507 +msgid "The command is used to split and disconnect tracks.\n" +msgstr "Pilko-komentoa käytetään raiteiden pilkkomiseen ja irrottamiseen.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:365 -msgid "Validates the name and key. Terminates the registration command" -msgstr "Vahvistaa nimen ja avainen, sekä päättää rekisteröitymisen" +#: ../../../../build/work/app/i18n/custmsg.h:508 +msgid "Simply select the spot on the track you want to split.\n" +msgstr "Valitse radalta kohta, jonka haluat pilkkoa.\n" -#: ../bin/dease.c:70 -msgid "Value" -msgstr "Arvo" +#: ../../../../build/work/app/i18n/custmsg.h:509 +msgid "You cannot split turnouts (unless you hold down the Shift key).\n" +msgstr "" +"Palaraiteita ja vaihteita ei voi pilkkoa, ellei vaihto-näppäintä pidetä " +"samanaikaisesti painettuna.\n" -#: ../bin/csnap.c:521 -msgid "Vert" -msgstr "Pysty" +#: ../../../../build/work/app/i18n/custmsg.h:510 +msgid "" +"If you split at spot that is already an End-Point between two tracks, or " +"split twice at the same spot, the track is disconnected.\n" +msgstr "" +"Jos pilkot kohdasta, joka on raiteiden liitos tai pilkot kaksi kertaa " +"samasta kohdasta, raiteet irrotetaan toisistaan.\n" -#: ../bin/ccurve.c:393 -msgid "Vertical Separation" -msgstr "Kerrosten välinen etäisyys" +#: ../../../../build/work/app/i18n/custmsg.h:511 +msgid "The command marks selected tracks as hidden.\n" +msgstr "Tunneli-komento merkitsee valitut raideosat piilotetuiksi.\n" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:146 -msgid "View menu" -msgstr "Näytä -valikko" +#: ../../../../build/work/app/i18n/custmsg.h:512 +msgid "" +"A tunnel portal is drawn at the boundary between hidden and normal track.\n" +msgstr "" +"Tunnelin suuaukko piirretään piilotetun ja normaalin raideosan " +"liitoskohtaan.\n" -#: ../bin/param.c:136 -msgid "Violet" -msgstr "Violetti" +#: ../../../../build/work/app/i18n/custmsg.h:513 +msgid "" +"How the hidden tracks are drawn (solid, dashed or invisible) is controlled " +"by the Draw EndPts radio button group on the Setup dialog.\n" +msgstr "" +"Piilotettujen raiteiden esitystapa valitaan näyttöasetuksista, kohdasta " +"\"Piirrä tunneli\". Tunneli voidaan piirtää yhtenäisellä viivalla, " +"katkoviivalla tai jättää kokonaan piirtämättä.\n" -#: ../bin/dlayer.c:316 -msgid "Visible" -msgstr "Näkyvä" +#: ../../../../build/work/app/i18n/custmsg.h:514 +msgid "" +"To 'un-hide' a track just Select it again and click the Tunnel button.\n" +msgstr "" +"Palauttaaksesi tunneliksi merkityt raideosat normaaleiksi, valitse ne ja " +"paina uudelleen tunneli-napista.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:198 +#: ../../../../build/work/app/i18n/custmsg.h:515 msgid "" -"Watch what happens if you try to drag the selected End-Point beyond the far " -"End-Point.\n" +"Straight tracks are created by selecting the first End-Point of the track.\n" msgstr "" -"Katso mitä tapahtuu, jos raahaat valitun päätepisteen toisen päätepisteen " -"yli.\n" +"Suorat raiteet luodaan valitsemalla hiiren vasemmalla painikkeella raiteen " +"ensimmäinen päätepiste.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:215 -msgid "Watch what happens to the structure and turnout titles.\n" -msgstr "Katso mitä tapahtuu rakennusten ja vaihteen otsikoille.\n" +#: ../../../../build/work/app/i18n/custmsg.h:516 +msgid "Then the other End-Point is dragged to its final postion.\n" +msgstr "" +"Toinen päätepiste valitaan pitämällä hiiren vasen painike alhaalla ja " +"valitsemalla oikea paikka.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:153 -msgid "We also draw Polylines and filled shapes.\n" -msgstr "Voimme myös luoda monikulmioita ja täytettyjä monikulmioita.\n" +#: ../../../../build/work/app/i18n/custmsg.h:517 +msgid "The left mouse button is released at the final end postion.\n" +msgstr "Hiiren vasen painike vapautetaan loppupisteessä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:132 -msgid "We are going to make everything 150% bigger.\n" -msgstr "Suurennamme kaiken 150%:ksi entiseen verrattuna.\n" +#: ../../../../build/work/app/i18n/custmsg.h:518 +msgid "" +"Table Edges are used to mark the edges of the layout, either for aisles or " +"room walls.\n" +msgstr "" +"Pöydän reunoja käytetään kuvaamaan ratasuunnitelman reunoja, joko " +"kulkuväyliä tai seiniä.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:519 +msgid "A Table Edge is attracted to the ends of other Table Edges.\n" +msgstr "Pyödän reunojen päät vetävät toisiaan puoleensa.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:520 +msgid "Table Edges can be modified by dragging on their ends.\n" +msgstr "Pöydän reunoje voidaan muokara raahaamalla niiden päistä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:181 +#: ../../../../build/work/app/i18n/custmsg.h:521 msgid "" -"We can Ignore one of the End-Points on a Turnout to force the Path to take " -"the other route.\n" +"If you hold down the Control key while dragging then the Table Edge will be " +"attracted to other objects.\n" msgstr "" -"Voimme hylätä yhden vaihteen päätepisteistä pakottaaksemme reitin kulkemaan " -"toista kautta.\n" +"Jos pidät control-näppäintä painettuna raahatessasi, pöydän reuna ja muut " +"objektit vetävät toisiaan puoleensa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:236 -msgid "We can also Align to another Structure or any object.\n" +#: ../../../../build/work/app/i18n/custmsg.h:522 +msgid "" +"These examples shows some of the various Turnout Designer windows. Each " +"window defines a different type of turnout.\n" msgstr "" -"Voimme myös suunnata jonkin toisen rakennuksen tai minkä tahansa objektin " -"mukaan.\n" +"Tässä esimerkissä näytetään joitakin monista vaihteiden ja raideosien " +"suunnitteluikkunoista. Kussakin ikkunassa määritellään eri tyyppinen " +"vaihde.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:233 +#: ../../../../build/work/app/i18n/custmsg.h:523 msgid "" -"We can also align to curved shapes. The Selected object will be rotated to " -"be parallel to the curve under the cursor.\n" +"In each window there are a number of parameters to fill in and one or two " +"description lines.\n" msgstr "" -"Voimme myös suunnata kaarevien muotojen mukaisesti. Valittua objektia " -"pyöritetään siten, että se on yhdensuuntainen hiiren osoittimen alla olevan " -"kaaren mukaisesti.\n" +"Jokaisessa ikkunassa on useita parametrikenttiä sekä yksi tai kaksi riviä " +"kuvausta varten.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:101 -msgid "We can also create turnouts from simple straight and curved tracks.\n" +#: ../../../../build/work/app/i18n/custmsg.h:524 +msgid "You can print the design to check the dimensions before saving them.\n" msgstr "" -"Voimme myös luoda vaihteita yksinkertaisista suorista ja kaarevista " -"raideosista.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:319 -msgid "We can create Hand Laid Turnouts on curved tracks.\n" -msgstr "Voimme luoda käsin asetellun vaihteen myös kaarteeseen.\n" +"Voit tulostaa suunnittelemasi vaihteen tarkastaaksesi sen mitat ennen " +"tallentamista.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:567 -msgid "We can indicate the mainline by making the rails wider.\n" -msgstr "Voimme kuvata päärataa paksummalla raiteella.\n" +#: ../../../../build/work/app/i18n/custmsg.h:525 +msgid "This is the regular turnout.\n" +msgstr "Tämä on tavallinen vaihde.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:570 -msgid "We can make the rail thicker by selecting Thick Tracks.\n" -msgstr "Tai paksut raiteet.\n" +#: ../../../../build/work/app/i18n/custmsg.h:526 +msgid "" +"In addition to the dimensions, you also enter the Title (Manufacturer, " +"Description and Part Number). For Turnouts with Left and Right hand " +"versions there are separate Descriptions and Part Numbers.\n" +msgstr "" +"Mittatietojen lisäksi voit syöttää otsikon (valmistaja, kuvaus ja " +"tuotenumero). Vaihteille, joilla on vasen ja oikea versio, on molempia " +"versioita varten omat kentät kuvausta ja tuotenumeroa varten.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:496 -msgid "We can move the Elevations by using Right-Drag\n" +#: ../../../../build/work/app/i18n/custmsg.h:527 +msgid "" +"Some Turnouts and Sectional track are pre-mounted on roadbed. For these " +"parts you can specify the width of the roadbed, the thickness of the lines " +"drawn for the edge of the roadbed and the color.\n" msgstr "" -"Voimme siirtää korkeustasojen merkintöjä raahaamalla hiiren oikealla " -"painikkeella.\n" +"Joihinkin raideosiin kuuluu kiinteä ratapenkka. Näitä osia varten voit " +"määrittää ratapenkan leveyden, reunaviivan paksuuden sekä reunaviivan " +"värin.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:439 -msgid "We can try splitting the diverging leg.\n" -msgstr "Voimme yrittää pikkoa haarautuvan raiteen.\n" +#: ../../../../build/work/app/i18n/custmsg.h:528 +msgid "The double slip switch is described by only a few parameters.\n" +msgstr "" +"Kaksipuolinen risteysvaihde määritellään vain muutamalla parametrilla.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:460 -msgid "" -"We can use the command to move the connecting tracks slightly and " -"connect the 2 End-Points.\n" +#: ../../../../build/work/app/i18n/custmsg.h:529 +msgid "The double crossover only needs length and track separation.\n" msgstr "" -"Voimme käyttää liitä-komentoa siirtääksemme raideosia hieman, jotta raiteet " -"saadaan liitetyksi.\n" +"Sovitettu raideristeys tarvitsee ainoastaan pituuden ja raiteiden välisen " +"etäisyyden.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:195 +#: ../../../../build/work/app/i18n/custmsg.h:530 msgid "" -"We can use the command to change the position of the Dimension " -"Line and the size of the numbers.\n" +"Pressing the turnout button displays the Turnout Selection window to let you " +"choose a turnout to place.\n" msgstr "" -"Voimme käyttää määrittele-komentoa muuttaaksemme mittajanan sijaintia ja " -"numeroiden kokoa.\n" +"\"Lisää|Palaraide\" valikosta tai vastaava painike työkaluriviltä avaa " +"palaraiteiden valinta ikkunan, josta voit valita valmiita raideosia " +"liitettäväksi ratasuunnitelmaasi.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:80 +#: ../../../../build/work/app/i18n/custmsg.h:531 msgid "" -"We could modify these object or add new ones. For now we'll just delete " -"them.\n" +"Note that once you start to place the turnout on the Main window the Turnout " +"Selection window disappears. This feature is enabled by the Hide toggle " +"button on the dialog.\n" msgstr "" -"Voisimme muokata näitä objekteja tai lisätä uusia. Nyt kuitenkin vain " -"poistamme ne.\n" +"Huomaa, että kun aloitat raideosan paikoilleen asettelun pääikkunassa, " +"valintaikkuna katoaa. Tämä voidaan myös estää poistamalla ruksi valinnasta " +"\"Piilota\".\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:501 +#: ../../../../build/work/app/i18n/custmsg.h:532 msgid "" -"We create a Computed Elevation here that will be automatically adjusted " -"whenever the other Elevations are changed.\n" +"You can place the turnout on a arbitrary position on the layout. Left-drag " +"the turnout into place...\n" msgstr "" -"Luomme tähän \"lasketun\" korkeustason, joka päivitetään automaattisesti jos " -"muita korkeustasoja muutetaan.\n" +"Aseta palaraide ratasuunnitelmaasi klikkaamalla. Raahaa se sitten hiiren " +"vasemmalla painikkeella paikoilleen...\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:503 -msgid "We do this by Ignoring the branch we don't want.\n" -msgstr "Teemme tämän hylkäämällä haaran, jota emme halua käyttää.\n" +#: ../../../../build/work/app/i18n/custmsg.h:533 +msgid "Then you can rotate the turnout by Right dragging.\n" +msgstr "Voit myös pyörittää sitä raahaamalla hiiren oikealla painikkeella.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:178 +#: ../../../../build/work/app/i18n/custmsg.h:534 msgid "" -"We do this by Shift Right Click to display the Profile Options popup menu " -"and selecting Define.\n" +"You can also use Shift-Right-Click to display a popup menu that lets you " +"rotate the Turnout by specific angles.\n" msgstr "" -"Teemme tämän avaamalla ponnahdusvalikon ja valitsemalla \"Määritelty\".\n" +"Vaihto + hiiren oikea avaa ponnahdusvalikon, josta voit pyörittää raideosaa " +"tietyn kulman verran.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:442 +#: ../../../../build/work/app/i18n/custmsg.h:535 msgid "" -"We have built a siding using Sectional track and have 2 End-Points that " -"don't line up and are not connected automatically when placing the sectional " -"track.\n" +"When you are satisfied with the position and orientation of the turnout " +"press Space bar or the Return key on the keyboard to finish placing the " +"turnout.\n" msgstr "" -"Olemme rakentaneet sivuraiteen käyttäen palaraiteita. Kaksi päätepistettä " -"eivät ole riittävän kohdakkain, jotta ne olisi automaattisesti liitetty " -"toisiinsa.\n" +"Kun olet tyytyväinen raideosan asetteluun, paina Välilyönti tai Return " +"viimeistelläksesi raideosan asettelun.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:116 +#: ../../../../build/work/app/i18n/custmsg.h:536 msgid "" -"We have created a left hand turnout and we also want a right hand version.\n" +"Pressing the Ok button on the Turnout dialog will end the command " +"as well as placing the turnout.\n" msgstr "" -"Olemme luoneen vasemman puoleisen vaihteen ja haluamme myös oikean puoleisen " -"version.\n" +"\"Sulje\" painike valintaikkunassa viimeistelee raideosan asettelun ja " +"lopettaa toiminnon.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:489 +#: ../../../../build/work/app/i18n/custmsg.h:537 msgid "" -"We have designed part of the layout with a siding, 2 branches and a spiral " -"loop. We want to set Elevations.\n" +"If you drag along an existing track the new turnout will be attached to the " +"track.\n" msgstr "" -"Meillä on ratasuunnitelma jossa on sivuraide, kaksi haaraa ja silmukka, joka " -"muodostaa radalle risteyksen.\n" -" Haluamme asetella radan korkeustasot.\n" +"Jos raahaat vaihdetta olemassa olevaa raidetta pitkin, uusi vaihde liitetään " +"raiteeseen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:552 +#: ../../../../build/work/app/i18n/custmsg.h:538 msgid "" -"We have set the elevations to 1\" and 13\" to produce a grade of 3.0% with " -"2.8\" between coils.\n" +"Note that the status line tells you the number of End-Points that would be " +"connected and, the maximum displacement of the End-Points. This will be " +"useful when building complex track, as we will see later.\n" msgstr "" -"Asetimme korkeustasot 1 ja 13 tuumaksi luodaksemme 3,0% nousukulman ja 2,8 " -"tuuman kerrosvälin.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:150 -msgid "We have to delete the leftover piece by Selecting and Deleting it.\n" -msgstr "Pilkkomisesta yli jäänyt raideosa täytyy poistaa.\n" +"Huomaa, että tilarivillä kerrotaan kuinka monta päätepistettä ollaan " +"liittämässä, sekä suurin päätepisteiden siirtymä. Tämä auttaa rakentamaan " +"monimutkaisia ratoja, kuten myöhemmin näemme.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:194 +#: ../../../../build/work/app/i18n/custmsg.h:539 msgid "" -"We might also want to measure the distance between two structures. In this " -"case we will use a larger dimension line.\n" +"By moving the cursor from one side to the other of the track centerline you " +"can flip the turnout 180°.\n" msgstr "" -"Haluamme myös mitata kahden rakennuksen välisen etäisyyden. Tässä " -"tapauksessa käytämme suurempaa mittajanaa.\n" +"Siirtämällä hiiren osoitinta radan keskilinjan puolelta toiselle, voit " +"kääntää vaihdetta 180°.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:499 -msgid "We picked an End-Point on the upper track.\n" -msgstr "Valitsimme raiteiden liitoskohdan ylemmältä radalta.\n" +#: ../../../../build/work/app/i18n/custmsg.h:540 +msgid "" +"If you try to drag across another turnout the new turnout will placed at the " +"nearest End-Point of the existing turnout.\n" +msgstr "" +"Jos yrität raahata toisen vaihteen päälle, uusi vaihde asetetaan olemassa " +"olevan vaihteen lähimmän päätepisteen kohdalle.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:370 +#: ../../../../build/work/app/i18n/custmsg.h:541 msgid "" -"We rotate the signals by Shift-Right-Click and select 90° CW on the popup " -"menu. We can not show the popup menu in demo mode, but will simulate the " -"effect.\n" +"When you press Space or Return while the turnout is on a track, the track " +"will be split and the new turnout attached automatically.\n" msgstr "" -"Pyöritämme opastimia pitämällä vaihto-näppäintä painettuna ja klikkaamalla " -"hiiren oikealla painikkeella avataksemme ponnahdusvalikon. Sieltä valitsemme " -"90° MP (myötäpäivään). Demossa ei voida näyttää ponnahdusvalikkoa, mutta " -"näytämme komennon vaikutuksen.\n" +"Vaihteen ollessa olemassa olevan radan päällä, rata pilkotaan ja uusi vaihde " +"liitetään automaattisesti.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:356 -msgid "We specify the line width in pixels.\n" -msgstr "Määrittelemme viivan paksuuden pikseleinä.\n" +#: ../../../../build/work/app/i18n/custmsg.h:542 +msgid "Pressing Close ends the command.\n" +msgstr "Sulje-painike peruuttaa palaraiteiden asettelun.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:443 -msgid "" -"We use the command to adjust neighboring tracks so the gap is " -"closed.\n" +#: ../../../../build/work/app/i18n/custmsg.h:543 +msgid "Sometimes it's useful to modify turnouts triming one of the ends.\n" msgstr "" -"Käytämme liitä-komentoa säätääksemme viereisiä raideosia siten, että rako " -"saadaan suljettua.\n" +"Joskus on tarpeen muokata vaihteita säätämällä jonkin raiteen pituutta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:435 +#: ../../../../build/work/app/i18n/custmsg.h:544 msgid "We use the command for this.\n" msgstr "Käytämme Pilko-komentoa tähän tarkoitukseen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:110 -msgid "We want the curve to have a radius of 20\" and an angle of 17.5°.\n" -msgstr "Haluamme kaarteelle tietyn säteen ja kulman.\n" +#: ../../../../build/work/app/i18n/custmsg.h:545 +msgid "Normally, if we try to Split a turnout we get an error message.\n" +msgstr "" +"Normaalisti, jos vaihdetta tai palaraidetta yritetään pilkkoa, saadaan " +"virheilmoitus.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:498 -msgid "We want to find the elevations where the 2 tracks cross.\n" -msgstr "Voimme selvittää korkeustasot raiteiden risteyskohdassa.\n" +#: ../../../../build/work/app/i18n/custmsg.h:546 +msgid "Hold down the Shift key and try again.\n" +msgstr "Pidä vaihto-näppäi painettuna ja yritä uudelleen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:380 +#: ../../../../build/work/app/i18n/custmsg.h:547 msgid "" -"We want to print our control panel onto a 8Å“x11 page, but the control panel " -"is a bit too wide.\n" +"The end of the turnout has been replaced by a piece of straight flex track " +"which we can modify.\n" msgstr "" -"Haluamme tulostaa ohjeuspaneelin 8 1/2 x 11 tuuman kokoiseksi, mutta " -"ohjauspaneeli on hieman liian suuri.\n" +"Vaihteen pää korvattiin pätkällä suoraa fleksiraidetta, jota voi muokata " +"normaalisti.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:548 +msgid "We can try splitting the diverging leg.\n" +msgstr "Voimme yrittää pikkoa haarautuvan raiteen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:75 +#: ../../../../build/work/app/i18n/custmsg.h:549 msgid "" -"We will Ungroup this turnout and see how the individual parts can be " -"changed.\n" +"Notice that the tail of the diverging leg has been changed to a curved " +"track...\n" +msgstr "Huomaa, että haarautuva raide on muutettu kaarteeksi...\n" + +#: ../../../../build/work/app/i18n/custmsg.h:550 +msgid "and a straight track.\n" +msgstr "ja suoraksi raideosaksi.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:551 +msgid "" +"This example show how to layout a yard using the and " +"commands.\n" msgstr "" -"Puramme tämän vaihteen ryhmittelyn nähdäksemme kuinka yksittäisiä osia " -"voidaan muuttaa.\n" +"Tässä esimerkissä näytetään ratapihan luominen käyttäen \"Palaraide\" ja " +"\"Rinnakkainen raide\" komentoja.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:534 -#, c-format +#: ../../../../build/work/app/i18n/custmsg.h:552 msgid "" -"We will be creating a helix with a Elevation Difference of 12\", Grade of " -"1.5% and limit the Vertical Separation to at least 2\".\n" +"You can resize and move the Turnout Selection dialog if it obscures the " +"other windows.\n" msgstr "" -"Luomme helixin, jonka korkeusero on 12 tuumaa, nousukulma 1,5% ja määräämme " -"kerrosten välisen tilan olevan vähintään 2 tuumaa.\n" +"Voit pienentää tai siirtää raideosien valintaikkunaa, jos se peittää muita " +"ikkunoita.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:221 -msgid "We will change the Radius before proceeding.\n" -msgstr "Muutamme säteen ennen kuin jatkamme.\n" +#: ../../../../build/work/app/i18n/custmsg.h:553 +#, fuzzy +msgid "First we place a turnout on the main line.\n" +msgstr "Asetetaan ensin vaihde pääradalle.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:136 -msgid "We will convert everything from N scale to HO scale...\n" -msgstr "Muutamme kaiken N-mittakaavasta H0:ksi...\n" +#: ../../../../build/work/app/i18n/custmsg.h:554 +msgid "Next extend the turnout with the command.\n" +msgstr "Seuraavaksi jatketaan vaihdetta \"Muokkaa\" komennolla.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:307 -msgid "We will draw two 3x6 inch L-girders.\n" -msgstr "Piirrämme nyt 3x6 tuuman L-palkkeja.\n" +#: ../../../../build/work/app/i18n/custmsg.h:555 +#, fuzzy +msgid "" +"Now create a track parallel to the main line. Make sure the separation is " +"reasonable for your scale.\n" +msgstr "" +"Luo sitten pääradalle rinnakkainen raide. Varmista, että raideväli on " +"mittakaavallesi sopiva.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:374 -msgid "We will fill this gap with the Å’\" dot.\n" -msgstr "Näytämme ne 1/4 tuuman pisteillä.\n" +#: ../../../../build/work/app/i18n/custmsg.h:556 +msgid "And place a turnout to connect the new track.\n" +msgstr "Ja aseta vaihde liittääksesi uuden raiteen.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:557 +msgid "We'll zoom in here to see what's going on.\n" +msgstr "Lähennämme, jotta näet paremmin mitä tapahtuu.\n" + +#: ../../../../build/work/app/i18n/custmsg.h:558 +msgid "" +"Notice how we control which way the turnout is facing by moving the mouse " +"across the center line of the track.\n" +msgstr "" +"Huomaa kuinka kontrolloimme vaihteen suuntaa siirtämällä hiiren osoitinta " +"raiteen keskilinjan yli.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:164 -msgid "We will start with the right end of the siding.\n" -msgstr "Aloitamme aseman oikeasta päästä.\n" +#: ../../../../build/work/app/i18n/custmsg.h:559 +msgid "" +"The Status bar displays the number of auto-connections that will be made and " +"the maximum offset.\n" +msgstr "" +"Tilarivillä näytetään automaattisten liitosten lukumäärä, sekä suurin " +"päätepisteen siirtymä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:362 -msgid "We will use T1 red and green LEDs.\n" -msgstr "Käytämme punaisia ja vihreitä T1 LEDejä.\n" +#: ../../../../build/work/app/i18n/custmsg.h:560 +msgid "" +"XTrackCAD adjusts the turnout position for the best fit to minimize any " +"connection offset\n" +msgstr "" +"XTrackCAD sijoittelee vaihteen siten, että se istuu parhaiten ja siirtymät " +"ovat mahdollisimman pienet.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:309 -msgid "We will use the command for this.\n" -msgstr "Käytämme määrittele-komentoa.\n" +#: ../../../../build/work/app/i18n/custmsg.h:561 +msgid "Note that placing the turnout splits the parallel track.\n" +msgstr "Huomaa, kuinka vaihteen asettaminen pilkkoi rinnakkaisen raiteen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:104 -msgid "We will use the command to change the tracks.\n" -msgstr "Käytämme kuvaile-komentoa muuttaaksemme raiteiden ominaisuuksia.\n" +#: ../../../../build/work/app/i18n/custmsg.h:562 +msgid "We have to delete the leftover piece by Selecting and Deleting it.\n" +msgstr "Pilkkomisesta yli jäänyt raideosa täytyy poistaa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:363 -msgid "We will zoom in to show positioning.\n" -msgstr "Lähennämme näkymää asettelun helpottamiseksi.\n" +#: ../../../../build/work/app/i18n/custmsg.h:563 +msgid "Repeat the process for the other tracks in the yard.\n" +msgstr "Toista prosessi ratapihan muille raiteille.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:121 -msgid "We'll change the Title and Part No for the new defintion.\n" -msgstr "Muutamme kuvausta ja tuotenumeroa uutta määrittelyä varten.\n" +#: ../../../../build/work/app/i18n/custmsg.h:564 +msgid "For the last track we will join with a curve instead of a turnout.\n" +msgstr "Viimeinen raide yhdistetään kaarteella vaihteen sijaan.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:102 -msgid "We'll create two tracks that have a common End-Point.\n" -msgstr "Luomme kaksi raidetta, joilla on yhteinen päätepiste.\n" +#: ../../../../build/work/app/i18n/custmsg.h:565 +msgid "We can indicate the mainline by making the rails wider.\n" +msgstr "Voimme kuvata päärataa paksummalla raiteella.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:70 -msgid "We'll give this definition a new Description.\n" -msgstr "Annamme tälle määrittelylle uuden kuvauksen.\n" +#: ../../../../build/work/app/i18n/custmsg.h:566 +msgid "First we select the mainline tracks...\n" +msgstr "Ensin valitaan pääradan raiteet...\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:504 -msgid "We'll ignore the lower branch.\n" -msgstr "Hylkäämme alemman haaran.\n" +#: ../../../../build/work/app/i18n/custmsg.h:567 +msgid "And then select Medium Tracks from the Edit menu.\n" +msgstr "Valitse sitten keskikokoiset raiteet Muokkaa-valikosta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:105 -msgid "We'll make the Length 7.5\".\n" -msgstr "Muutamme pituutta.\n" +#: ../../../../build/work/app/i18n/custmsg.h:568 +msgid "We can make the rail thicker by selecting Thick Tracks.\n" +msgstr "Tai paksut raiteet.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:491 -msgid "We'll select the end of the top branch and set the Elevation to 4\"\n" +#: ../../../../build/work/app/i18n/custmsg.h:569 +msgid "" +"Turntables are created by specifying the radius in a dialog box on the " +"Status Bar. The radius in the dialog can be changed before proceeding.\n" msgstr "" -"Valitsemme ylemmän haaran pään ja asetamme sille haluamamme korkeustason.\n" +"Kääntöpöydät luodaan määrittelemällä ensiksi kääntöpöydän säde tilarivillä " +"olevaan tekstikenttään.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:63 -msgid "We'll start with a simple turnout and add a switch machine.\n" -msgstr "Aloitamme yksinkertaisesta vaihteesta ja vaihdekoneistosta.\n" +#: ../../../../build/work/app/i18n/custmsg.h:570 +msgid "Then the turntable is dragged to its final location.\n" +msgstr "Sitten kääntöpöytä raahataan paikoilleen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:117 -msgid "We'll use the command.\n" -msgstr "Käytämme peilaustoimintoa.\n" +#: ../../../../build/work/app/i18n/custmsg.h:571 +msgid "" +"XTrackCAD provides demonstrations on most of the program's features. The " +"demos can be run by clicking on the Help menu on the Main window and then " +"selecting Demos." +msgstr "" +"XTrackCAD tarjoaa havaintoesityksiä (demoja) useimmista ohjelman " +"ominaisuuksista. Demoja voidaan suorittaa valitsemalla pääikkunan Ohje-" +"valikosta Demot." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:145 -msgid "We'll zoom in here to see what's going on.\n" -msgstr "Lähennämme, jotta näet paremmin mitä tapahtuu.\n" +#: ../../../../build/work/app/i18n/custmsg.h:572 +msgid "" +"The notation \"Menu|Item\" is used in the documentation (and the on-line " +"demos and tips) to indicate the selection of a menu item.\n" +"For example File|Open means to open the menu by clicking on File on the menu " +"bar of the Main window and then selecting the Open item from that menu." +msgstr "" +"Merkintätapa \"Valikko|Komennot\" on käytössä dokumentaatiossa, ohjeessa, " +"demoissa ja vinkeissä. Se kuvaa kyseessä olevaa valikon toimintoa.\n" +"Esimerkiksi Tiedosto|Avaa tarkoittaa, että päävalikosta on ensin avattava " +"Tiedosto-valikko ja sieltä valittava Avaa-komento." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:71 -msgid "We're done with this definition. Press Ok.\n" -msgstr "Määrittely on valmis ja se hyväksytään painamalla Ok.\n" +#: ../../../../build/work/app/i18n/custmsg.h:573 +msgid "" +"A number of example layouts are provided. These files are located in the " +"'examples' directory where you installed XTrackCAD. The \"File|Open\" " +"command will open that directory when first used." +msgstr "" +"Tarjolla on useita esimerkkejä ratasuunnitelmista. Nämä tiedostot " +"sijaitsevat 'examples' hakemistossa sen hakemiston alla, johon XTrackCAD on " +"asennettu. \"Tiedosto|Avaa\" näyttää tämän hakemiston ensimmäisellä " +"käyttökerralla." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:179 +#: ../../../../build/work/app/i18n/custmsg.h:574 msgid "" -"We've just added a Defined Elevation point to the middle of the lower " -"branch. Notice the addition on the Profile dialog.\n" +"When installed, the program measures all units in inches. You can change " +"this on the \"Options|Preferences\" dialog by changing the Units item to " +"Metric instead of English." msgstr "" -"Olemme juuri lisänneet määritellyn korkeustason keskelle alempaa haaraa. " -"Huomaa lisäys profiili-ikkunassa.\n" +"Asennuksen jälkeen ohjelmassa on tuuma-mitat käytössä. Tämän voi muuttaa " +"\"Asetukset|Ominaisuudet\" ikkunasta muuttamalla yksiköt metrijärjestelmään " +"englantilaisen sijaan." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:262 +#: ../../../../build/work/app/i18n/custmsg.h:575 msgid "" -"We've selected sharp easements. The minimum radius curve we can use will be " -"9.75\"\n" +"You can change the overall size of your layout on the \"Options|Layout\" " +"dialog." msgstr "" -"Olemme valinneet jyrkät kaarreloivennukset. Pienin käytettävissä oleva " -"kaarresäde on 9,75 tuumaa.\n" +"Voit muuttaa ratasuunnitelmasi kokoa \"Asetukset|Ratasuunnitelma\" ikkunasta." -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:519 -msgid "Weight" -msgstr "Lihavoitu" +#: ../../../../build/work/app/i18n/custmsg.h:576 +msgid "" +"When installed, the default command is the Describe command. More " +"experienced users will probably want to change this to the Select command. " +"You can do this on the \"Options|Command Options\" dialog." +msgstr "" +"Asennuksen jälkeen hiiren oletuskomento on Määritä-komento. Kokeneemmat " +"käyttäjät saattavat haluta muuttaa tämän Valitse-komennoksi. Se tapahtuu " +"\"Asetukset|Komennot\" ikkunasta." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:267 -msgid "Welcome to the XTrackCAD demonstration.\n" -msgstr "Tervetuloa XTrackCADin havaintoesitykseen.\n" +#: ../../../../build/work/app/i18n/custmsg.h:577 +msgid "" +"Set your modeling scale on the \"Options|Layout\" dialog. This controls the " +"Turnouts and Structures that are available, Easement values and track gauge." +msgstr "" +"Mittakaava asetetaan \"Asetukset|Ratasuunnitelma\" ikkunasta. Tämä asetus " +"määrää mitkä raideosat ja rakennukset ovat käytettävissä sekä " +"kaarreloivennuksen arvot ja raideleveyden." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:578 +#: ../../../../build/work/app/i18n/custmsg.h:578 msgid "" "When Selecting tracks, the connection between Selected and Unselected tracks " "is marked by a Red X. This indicates points where the connection between " @@ -10643,7 +11729,111 @@ msgstr "" "esitetään punaisella ristillä. Tämä kertoo ne pisteet, joissa raiteiden " "liitos irroitetaan valittuja raiteita siirrettäessä tai pyöritettäessä." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:585 +#: ../../../../build/work/app/i18n/custmsg.h:579 +msgid "" +"You can change orientation of the pages on the Print command by moving or " +"rotating the Print Grid.\n" +"Shift-Left-Drag moves the grid and Shift-Right-Drag rotates the grid." +msgstr "" +"Voit muuttaa tulostettavien sivujen asettelua siirtämällä tai pyörittämällä " +"tulostusruudukkoa.\n" +"Vaihto-näppäin ja hiiren vasen raahaus siirtää ruudukkoa ja vaihto-hiiren " +"oikea pyörittää sitä." + +#: ../../../../build/work/app/i18n/custmsg.h:580 +msgid "" +"You can add track to any unconnected End-Point with the Modify command.\n" +"Hold down the Shift key and click on the End-Point and drag away to create a " +"new track segment attached to the End-Point.\n" +"Repeat with the new End-Point to create flowing tracks." +msgstr "" +"Voit lisätä reiteita mihin tahansa irtonaiseen päätepisteeseen Muokkaa " +"komennolla.\n" +"Pidä vaihto-näppäin painettuna ja raahaa hiiren oikealla päätepisteestä " +"luodaksesi uuden raideosan päätepisteen jatkeeksi.\n" +"Tee sama uudesta päätepisteestä luodaksesi vapaamuotoisia raiteita." + +#: ../../../../build/work/app/i18n/custmsg.h:581 +msgid "" +"You can create Curved tracks in four ways by dragging from:\n" +" the 1st End-Point in the direction of the curve\n" +" Center of the Curve to the 1st End-Point\n" +" End-Point to the Center\n" +" the 1st to 2nd End-Point\n" +"Then drag on one of the Red arrows to create the final shape of the curve.\n" +"\n" +"You can click on the small button to the left of the Curve command button to " +"change the method." +msgstr "" +"Voit luoda kaarevia raiteita neljällä tavalla raahaamalla:\n" +" - 1. päätepisteestä kaarteen suuntaan\n" +" - keskipisteestä kaarteen ensimmäiseen päätepisteeseen\n" +" - päätepisteestä keskipisteeseen\n" +" - ensimmäisestä toiseen päätepisteeseen\n" +"Asettele sitten kaarre lopulliseen muotoonsa raahaamalla punaisista " +"nuolista.\n" +"\n" +"Voit valita tavan Kaarre painikkeen oikealla puolella olevasta pienestä " +"painikkeesta avautuvan valikon kautta." + +#: ../../../../build/work/app/i18n/custmsg.h:582 +msgid "" +"When creating a straight or a curved track by dragging from the 1st End " +"Point, you can snap the new track to an existing open end point by holding " +"down Shift while you click.\n" +"The new track will be joined to the old when you create it." +msgstr "" + +#: ../../../../build/work/app/i18n/custmsg.h:583 +msgid "" +"Track Circles provide a quick way to see what arrangement of tracks will fit " +"in your layout spaces. Create Circles with your typical radius and place " +"them in corners and other locations where your main-line will make changes " +"of direction. This will give you an overall idea of how your layout will " +"look.\n" +"\n" +"You can create Circles by:\n" +" using a fixed radius\n" +" dragging from the Center to edge\n" +" dragging from an edge to the Center\n" +"You can click on the small button to the left of the Circle command button " +"to change the method." +msgstr "" +"Ympyräraiteet tarjoavat nopean tavan hahmottaa millainen raidejärjestely " +"mahtuu suunniteltuun tilaan. Luo ympyräraiteita käyttäen aikomaasi " +"kaarresädettä ja asettele niitä nurkkiin ja muihin paikkoihin, joissa " +"pääraiteesi vaihtaa suuntaa. Tämä antaa yleiskuvan tulevan ratasi muodosta.\n" +"\n" +"Voit luoda ympyräraiteita:\n" +" - Käyttämällä määrättyä sädettä.\n" +" - Raahaamalla keskipisteestä pois päin.\n" +" - Raahaamalla kehältä kohti keskipistettä.\n" +"Voit valita tavan valikosta, joka avautuu Ympyrärata-painikkeen oikealta " +"puolelta." + +#: ../../../../build/work/app/i18n/custmsg.h:584 +msgid "" +"Easements (spiral transition curves) are used when track changes from " +"straight to curved by gradually changing the radius. This improves " +"operation and appearance.\n" +"Easements are created with Joining or Extending Tracks.\n" +"The Easement dialog is used to control easements." +msgstr "" +"Kaarreloivennuksia käytetään radan muuttuessa suorasta kaarteeksi " +"muuttamalla vaihdoskohdassa kaarresädettä asteittain. Tämä parantaa radan " +"ajettavuutta ja ulkonäköä.\n" +"Kaarreloivennukset luodaan yhdistämällä tai jatkamalla raiteita.\n" +"Kaarreloivennus-ikkunasta asetellaan tarvittavat parametrit." + +#: ../../../../build/work/app/i18n/custmsg.h:585 +msgid "" +"\"Help|Recent Messages\" shows the last error and warning messages that were " +"generated by the program. Also an explanation of each message is displayed." +msgstr "" +"\"Ohje|Viimeisimmät viestit\" näyttää tapahtuneet virheet ja varoitukset. " +"Valitsemalla jonkin viesteistä saat tarkennetun kuvauksen viestistä." + +#: ../../../../build/work/app/i18n/custmsg.h:586 msgid "" "When creating stall tracks for a turntable, you usually want the the stall " "tracks to be spaced evenly.\n" @@ -10656,904 +11846,771 @@ msgstr "" "liittyvien raiteiden välinen kulma. Tämä parametri löytyy \"Asetukset|" "Komennot\" valikosta." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:622 -msgid "" -"When entering Distances and Lengths you can press the '=' key to redisplay " -"the value in the default format." -msgstr "" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:482 +#: ../../../../build/work/app/i18n/custmsg.h:587 msgid "" -"When in mode, selecting any object will print a description in " -"the Status Bar and display a Dialog showing properties of the clicked-on " -"object.\n" +"XTrackCAD periodically saves the current layout in a check point file. The " +"'Check Point' item on the 'Options|Preferences' dialog controls how often " +"the file is saved.\n" +"You can recover your working file after a system crash by copying the " +"checkpoint file (xtrkcad.ckp in the XTrackCAD Working directory) to file.xtc" msgstr "" -"Määrittely -tilassa minkä tahansa objektin valinta tulostaa sen kuvauksen " -"tilariville sekä avaa ikkunan, jossa esitetään valitun kohteen " -"ominaisuudet.\n" +"XTrackCAD tallentaa säännöllisesti ratasuunnitelman varmennustiedostoon. " +"\"Automaattinen varmennus\" asetus \"Asetukset|Ominaisuudet\" ikkunassa " +"määrää kuinka usein tiedosto tallennetaan.\n" +"Voit palauttaa työkopiosi järjestelmän kaatumisen jälkeen kopioimalla " +"varmennustiedosto xtrkcad.ckp, joka sijaitsee XTrackCADin työhakemistossa, ." +"xtc tiedostoksi." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:576 +#: ../../../../build/work/app/i18n/custmsg.h:588 msgid "" -"When installed, the default command is the Describe command. More " -"experienced users will probably want to change this to the Select command. " -"You can do this on the \"Options|Command Options\" dialog." +"The Parallel command is helpful to layout yards and sidings. If the " +"Parallel track abuts with an existing track, it is automatically connected." msgstr "" -"Asennuksen jälkeen hiiren oletuskomento on Määritä-komento. Kokeneemmat " -"käyttäjät saattavat haluta muuttaa tämän Valitse-komennoksi. Se tapahtuu " -"\"Asetukset|Komennot\" ikkunasta." +"Luo rinnakkainen raide -komento on avuksi tehtäessä ratapihoja ja " +"sivuraiteita. Jos luotava rinnakkainen raide rajoittuu olemassa olevaan " +"raiteeseen, ne yhdistetään automaattisesti." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:574 +#: ../../../../build/work/app/i18n/custmsg.h:589 msgid "" -"When installed, the program measures all units in inches. You can change " -"this on the \"Options|Preferences\" dialog by changing the Units item to " -"Metric instead of English." +"You can use Shift-Drag in Select command to move and rotate selected " +"tracks.\n" +"Shift-Left-Drag moves tracks and Shift-Right-Drag rotates them.\n" +"Control-Left-Drag can move labels." msgstr "" -"Asennuksen jälkeen ohjelmassa on tuuma-mitat käytössä. Tämän voi muuttaa " -"\"Asetukset|Ominaisuudet\" ikkunasta muuttamalla yksiköt metrijärjestelmään " -"englantilaisen sijaan." +"Valitse-komennon ollessa käytössä voit siirtää ja pyörittää raiteita " +"pitämällä vaihto-näppäin painettuna ja raahaamalla hiirellä. Vaihto + " +"vasemmalla raahaus siirtää ja vaihto + oikealla raahaus pyörittää niitä.\n" +"Control + vasemmalla raahaaminen siirtää merkintöjä." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:605 +#: ../../../../build/work/app/i18n/custmsg.h:590 msgid "" -"When moving or rotating tracks on slow machines or with a large number of " -"tracks, you can improve performance by changing the way tracks are drawn " -"while being moved.\n" -"Shift-Right click will display a menu containing options to draw tracks " -"normally, as simple lines or just draw end-points." +"You can move and rotate the Snap Grid to align with existing track or " +"benchwork." msgstr "" +"Voit siirtää ja pyörittää kohdistusruudukkoa halutessasi kohdistaa jonkin " +"olemassa olevan raiteen, runkorakenteen tai pöydän reunan kanssa." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:421 +#: ../../../../build/work/app/i18n/custmsg.h:591 msgid "" -"When the left mouse button is released, the mouse cursor flashes and the " -"hollow arrow is restored.\n" +"Use the Parts List command to measure track length.\n" +"Select the tracks you want to measure and then click on the Parts List " +"button. The report will list the total of length of the selected flex-" +"track. You will have to add in the length of any Turnouts." msgstr "" -"Kun hiiren vasen painike vapautetaan, osoitin välähtää ja se palautetaan " -"läpinäkyväksi.\n" +"Käytä osaluetteloa mitataksesi radan pituuksia.\n" +"Valitse mitattava rataosuus ja avaa sitten osaluettelo. Raportissa on " +"laskettuna fleksi raiteen kokonaispituus valitulla rataosuudella. " +"Palaraiteiden pituudet täytyy lisätä erikseen." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:418 +#: ../../../../build/work/app/i18n/custmsg.h:592 msgid "" -"When the left mouse button would be pressed, the mouse cursor appears to " -"flash and the hollow arrow is replaced by a solid red arrow. While the left " -"button is pressed the mouse cursor will be a solid arrow.\n" +"The length of flex-track attached to each Turnout is displayed on layout " +"near the end-points of the Turnouts.\n" +"Make sure 'Lengths' option of the 'Label Enable' toggle button on the " +"Display dialog is selected." msgstr "" -"Osoittimen välähdys ja sen muuttuminen punaiseksi kuvaa hiiren vasemman " -"painikkeen painamista. Koko sen ajan, kun hiiren painike on painettuna alas, " -"osoitin esitetään punaisella nuolella.\n" +"Kuhunkin palaraiteeseen liittyvän fleksiraiteen pituus näytetään " +"ratasuunnitelmassa palaraiteiden päiden lähellä.\n" +"Varmista että Asetukset|Näyttöasetukset ikkunassa on ruksittu kohta " +"\"Pituudet\" näytettävien merkintöjen kohdalla." -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:278 -msgid "When to label Turnout, Flextrack Lengths and Elevations" +#: ../../../../build/work/app/i18n/custmsg.h:593 +msgid "" +"The Profile command can be used to find the length of a continous section of " +"track.\n" +"Select the track at the beginning and end of the section. The total length " +"of track will be displayed on the Profile window in the lower right corner.\n" +"Note: the Profile selects the shortest path between the two selected tracks, " +"which might not be the path you are interested in. In this case, select the " +"first track and then select other tracks along the path." msgstr "" -"Milloin näytetään merkinnät. Loitonnettaessa tästä arvosta, merkinnät eivät " -"enää näy." +"Profiili-komentoa voidaan käyttää selvitettäessä jonkin yhtenäisen " +"raideosuuden pituus.\n" +"Valitse halutun raideosuuden alku- ja loppupää, jolloin osuuden " +"kokonaispituus näytetään profiilikäyrän vaaka-akselin oikeassa reunassa.\n" +"Huom: Profiili-komento valitsee aina lyhyimmän reitin annettujen pisteiden " +"välillä. Jos haluat itse valita toisen reitin, valitse ensin alkupiste ja " +"etene sitten haluttua reittiä pitkin loppupisteeseen." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:656 +#: ../../../../build/work/app/i18n/custmsg.h:594 msgid "" -"When using the Rotate command, Shift-Right-Click displays a menu allowing " -"you to rotate by specific amounts or to align the selected objects with " -"another object." +"Layers can be used to contain different groups of tracks or other features. " +"You might use one layer for the main-line, another of staging tracks and " +"another of benchwork.\n" +"You can give each layer a name (by using the Layer dialog). This name will " +"be displayed as the Balloon Help for the corresponding Layer button, if you " +"have Balloon Help enabled on the Display dialog." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:481 +#: ../../../../build/work/app/i18n/custmsg.h:595 msgid "" -"When we clicked on the button, the current command was " -"cancelled.\n" +"You can remove groups of buttons or the Hot Bar from the Main window to give " +"you more room if you are not using some features. Also, the number of Layer " +"buttons displayed is controlled by the Layers dialog." msgstr "" -"Klikkaamalla Määrittele -painiketta, sen hetkinen komento peruutettiin.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:342 +#: ../../../../build/work/app/i18n/custmsg.h:596 msgid "" -"When you are satisfied with the position and orientation of the turnout " -"press Space bar or the Return key on the keyboard to finish placing the " -"turnout.\n" +"The size of the Map window is controlled by the overall size of the room " +"(specified on the Layout dialog) and the Map Scale (on the Display dialog). " +"You can make the Map window larger (or smaller) by decreasing (or " +"increasing) the Map Scale.\n" +"XTrackCAD will prevent you from making the Map window too small or too large." msgstr "" -"Kun olet tyytyväinen raideosan asetteluun, paina Välilyönti tai Return " -"viimeistelläksesi raideosan asettelun.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:619 +#: ../../../../build/work/app/i18n/custmsg.h:597 msgid "" -"When you create Benchwork you can move it below other objects by Selecting " -"the Benchwork and use the Below command.\n" -"Also, put Benchwork in a separate Layer so you can hide it if desired." +"You can unload parameter files you are not using by the Parameter Files " +"dialog. This removes unused Turnout and Structure definitions from the Hot " +"Bar and makes the program start faster." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:404 +#: ../../../../build/work/app/i18n/custmsg.h:598 msgid "" -"When you move selected tracks that are connected to unselected tracks, the " -"tracks will be disconnected. These points are marked by a Red cross on the " -"layout.\n" +"Right-Click on the Main window displays a menu list of commands as an " +"alternative to pressing the buttons on the tool bar or using the menu " +"accelerator keys." msgstr "" -"Kun siirrät valittuja raiteita, jotka on liitetty valitsemattomiin " -"raiteisiin, raiteet irrotetaan toisistaan. Nämä pisteet merkitään punaisilla " -"risteillä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:125 +#: ../../../../build/work/app/i18n/custmsg.h:599 msgid "" -"When you place a note, the Note editor window is displayed which lets you " -"enter the note.\n" +"Holding down the Shift key while you Right-Click will display options for " +"the current command (if any)." msgstr "" -"Kun lisäät ratasuunnitelmaan muistiinpanon, avataan editori jossa voit " -"kirjoittaa muistiinpanon sisällön.\n" +"Jos pidät vaihto-näppäintä painettuna, kun klikkaat hiiren oikealla " +"painilleella, saat aktiiviseen komentoon liittyvän ponnahdusvalikon, mikäli " +"komentoon sellainen liittyy." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:348 +#: ../../../../build/work/app/i18n/custmsg.h:600 msgid "" -"When you press Space or Return while the turnout is on a track, the track " -"will be split and the new turnout attached automatically.\n" +"Right-Click on the Hot Bar displays a menu of the different groups of " +"objects which you can use to jump to the group you are interested in.\n" +"Pressing a numeric key (1-9 and 0) moves the Hot Bar to corresponding " +"position (1 is the start, 5 is half way, 0 is the end)." msgstr "" -"Vaihteen ollessa olemassa olevan radan päällä, rata pilkotaan ja uusi vaihde " -"liitetään automaattisesti.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:327 -msgid "When you release the mouse button the new parallel track is created.\n" -msgstr "Uusi rinnakkainen raide luodaan kun vapautat hiiren painikkeen.\n" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:287 -msgid "Whether the main layout is updated while dragging on the Map" -msgstr "Päivitetäänkö pääikkunan näkymä kartassa valitun alueen mukaan" - -#: ../bin/cprint.c:131 ../bin/ctrain.c:174 ../bin/dcar.c:1972 -msgid "Width" -msgstr "Leveys" - -#: ../bin/cstruct.c:433 -#, c-format -msgid "Width %s" -msgstr "Leveys %s" - -#: ../bin/drawgeom.c:331 -#, c-format -msgid "Width = %s, Height = %s" -msgstr "Leveys = %s, Korkeus = %s" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:502 -msgid "Width of Roadbed" -msgstr "Ratapenkan leveys" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:501 -msgid "Width of Roadbed lines" -msgstr "Ratapenkan viivan paksuus" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:191 -msgid "Width of car body" -msgstr "Rungon leveys" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:291 -msgid "Width of the lines" -msgstr "Viivojen paksuus" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:151 -msgid "Window menu" -msgstr "Ikkunoiden valinta" - -#: ../../../../build/xtrkcad/app/help/messages.h:142 -msgid "Write Audit File?" -msgstr "Kirjoita tarkastustiedosto?" - -#: ../bin/dbitmap.c:120 -msgid "Writing BitMap to file" -msgstr "Kirjoitetaan bitmap tiedostoon" - -#: ../bin/ctodesgn.c:268 -msgid "Wye Turnout" -msgstr "Y-vaihde" - -#: ../bin/dease.c:72 ../bin/csnap.c:530 -msgid "X" -msgstr "X" - -#: ../wlib/gtklib/psprint.c:1278 -msgid "X Font" -msgstr "X kirjasin" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:157 -msgid "X Position of cursor" -msgstr "Kohdistimen X sijainti" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:439 -msgid "X and Y position markers" -msgstr "Kohdistimen X ja Y sijainnin markkerit" - -#: ../bin/misc.c:679 -msgid "XTrackCAD Font" -msgstr "XTrackCAD kirjasin" -#: ../wlib/gtklib/gtkhelp.c:871 -msgid "XTrackCAD Help" -msgstr "XTrackCAD ohje" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:148 +#: ../../../../build/work/app/i18n/custmsg.h:601 msgid "" -"XTrackCAD adjusts the turnout position for the best fit to minimize any " -"connection offset\n" +"Right-Drag on the Map window sets the origin and scale of the Main window.\n" +"The Main window will be centered on the spot where you started the Draw and " +"how far you Drag will control how large an area you can see on the Main " +"window." msgstr "" -"XTrackCAD sijoittelee vaihteen siten, että se istuu parhaiten ja siirtymät " -"ovat mahdollisimman pienet.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:463 +#: ../../../../build/work/app/i18n/custmsg.h:602 msgid "" -"XTrackCAD can help find tracks that are curved too sharply or are too " -"steep. These tracks are Exception tracks and are drawn in the Exception " -"track color.\n" +"To refresh the Main window, press Control-L (hold down the 'Ctrl' key and " +"then press the 'l' key)." msgstr "" -"XTrackCAD auttaa löytämään raiteet, jotka ovat kaartuvat liian jyrkästi tai " -"ovat liian jyrkkiä. Näitä kutsutaan erityisraiteiksi ja ne piirretään omalla " -"värillään.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:500 +#: ../../../../build/work/app/i18n/custmsg.h:603 msgid "" -"XTrackCAD has computed the Elevation (2.34\") at this point based on the " -"Elevation at the siding and a combination of the of the first Elevations.\n" +"The File menu contains a list of the last 5 layouts you were working on." msgstr "" -"XTrackCAD on laskenut tälle pisteelle korkeustason aiemmin antamiemme " -"korkeustasojen perusteella.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:586 +#: ../../../../build/work/app/i18n/custmsg.h:604 msgid "" -"XTrackCAD periodically saves the current layout in a check point file. The " -"'Check Point' item on the 'Options|Preferences' dialog controls how often " -"the file is saved.\n" -"You can recover your working file after a system crash by copying the " -"checkpoint file (xtrkcad.ckp in the XTrackCAD Working directory) to file.xtc" +"The Print command can optionally print lines representing the roadbed for " +"all tracks. This is useful when printing full size (1:1) for cutting " +"roadbed." msgstr "" -"XTrackCAD tallentaa säännöllisesti ratasuunnitelman varmennustiedostoon. " -"\"Automaattinen varmennus\" asetus \"Asetukset|Ominaisuudet\" ikkunassa " -"määrää kuinka usein tiedosto tallennetaan.\n" -"Voit palauttaa työkopiosi järjestelmän kaatumisen jälkeen kopioimalla " -"varmennustiedosto xtrkcad.ckp, joka sijaitsee XTrackCADin työhakemistossa, ." -"xtc tiedostoksi." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:571 +#: ../../../../build/work/app/i18n/custmsg.h:605 msgid "" -"XTrackCAD provides demonstrations on most of the program's features. The " -"demos can be run by clicking on the Help menu on the Main window and then " -"selecting Demos." +"Pressing the 'Esc' key cancels the current command and invokes the default " +"command, (which is either Describe or Select)." msgstr "" -"XTrackCAD tarjoaa havaintoesityksiä (demoja) useimmista ohjelman " -"ominaisuuksista. Demoja voidaan suorittaa valitsemalla pääikkunan Ohje-" -"valikosta Demot." -#: ../bin/cprint.c:133 ../bin/csnap.c:532 -msgid "Y" -msgstr "Y" - -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:158 -msgid "Y Position of cursor" -msgstr "Kohdistimen Y sijainti" - -#: ../bin/param.c:116 -msgid "Yellow" -msgstr "Keltainen" - -#: ../wlib/gtklib/gtkfilsel.c:130 ../bin/cgroup.c:968 ../bin/ctodesgn.c:1509 -#: ../bin/ctodesgn.c:1988 ../bin/misc.c:1023 ../bin/misc.c:1028 -#: ../bin/misc.c:1093 ../bin/track.c:1275 ../bin/track.c:1372 -#: ../bin/track.c:1386 ../bin/ctrain.c:2027 ../bin/dcustmgm.c:136 -#: ../bin/dcar.c:3664 ../bin/dcar.c:3742 ../bin/dcar.c:3826 ../bin/dcar.c:3845 -#: ../bin/dcar.c:4175 ../bin/dcar.c:4590 ../bin/dbitmap.c:205 -#: ../bin/cdraw.c:79 -msgid "Yes" -msgstr "Kyllä" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:248 -msgid "You also draw in various colors and line widths.\n" -msgstr "Voit myös piirtää eri väreillä ja muuttaa viivan paksuutta.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:630 +#: ../../../../build/work/app/i18n/custmsg.h:606 msgid "" -"You can Export your Car Inventory to a file in Comma-Separated-Value format " -"which can be read by most spread-sheet programs." +"When moving or rotating tracks on slow machines or with a large number of " +"tracks, you can improve performance by changing the way tracks are drawn " +"while being moved.\n" +"Shift-Right click will display a menu containing options to draw tracks " +"normally, as simple lines or just draw end-points." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:173 +#: ../../../../build/work/app/i18n/custmsg.h:607 msgid "" -"You can Ignore End-Points on the Path by using Shift-Right-Click to display " -"the Profile Options popup menu and chosing Ignore.\n" +"The colors of different parts of the Main window can be changed with the " +"Colors dialog. In particular, the Snap Grid color can be changed to make it " +"more visible when printed." msgstr "" -"Voit hylätä reitillä olevia raiteiden liitoskohtia ponnahdusvalikosta, joka " -"aukeaa painamalla vaihto-nnäppäintä ja klikkaamalla hiiren oikealla. Valitse " -"\"Hylkää\".\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:335 +#: ../../../../build/work/app/i18n/custmsg.h:608 msgid "" -"You can Left-Drag the hilighted area in the Map window to change the " -"displayed portion of the layout.\n" +"By default objects are drawn in their normal colors. Tracks will be drawn " +"in Black. Objects can also be drawn in the color according to their Layer. " +"The color of a Layer is displayed on the corresponding Layer button.\n" +"The Display dialog 'Color Layers' item has separate toggles for Tracks and " +"non-Tracks." msgstr "" -"Raahaamalla hiiren vasemmalla painikkeella korostettua aluetta muuttaaksesi " -"ratasuunnitelman näytettävän alueen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:636 +#: ../../../../build/work/app/i18n/custmsg.h:609 msgid "" -"You can add new track segments to a turnout definition or create a " -"definition from individual tracks using the Group command." +"Each Layer can be drawn or hidden by the 'Visible' toggle on the Layers " +"dialog. " msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:580 +#: ../../../../build/work/app/i18n/custmsg.h:610 msgid "" -"You can add track to any unconnected End-Point with the Modify command.\n" -"Hold down the Shift key and click on the End-Point and drag away to create a " -"new track segment attached to the End-Point.\n" -"Repeat with the new End-Point to create flowing tracks." +"Short cut Layer buttons can also be displayed on the tool bar for up to the " +"first 20 layers.\n" +"This buttons allow to Show or Hide the layers." msgstr "" -"Voit lisätä reiteita mihin tahansa irtonaiseen päätepisteeseen Muokkaa " -"komennolla.\n" -"Pidä vaihto-näppäin painettuna ja raahaa hiiren oikealla päätepisteestä " -"luodaksesi uuden raideosan päätepisteen jatkeeksi.\n" -"Tee sama uudesta päätepisteestä luodaksesi vapaamuotoisia raiteita." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:279 -msgid "You can adjust the speed of the demonstration with the Speed control.\n" +#: ../../../../build/work/app/i18n/custmsg.h:611 +msgid "The name of the Layer is the Balloon Help for the Layer button." msgstr "" -"Voit säätää demojen suoritusnopeutta Nopeus -valintaluettelon avulla.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:336 +#: ../../../../build/work/app/i18n/custmsg.h:612 msgid "" -"You can also Right-Drag on the Map window to set the scale and position of " -"the Main window.\n" +"The playback speed of the Demos can be changed by using Speed drop down list " +"on the Demo window." msgstr "" -"Hiiren oikealla painikkeella raahaaminen puolestaan muuttaa näytettävän " -"alueen skaalausta (kokoa).\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:306 -msgid "You can also draw them in different orientations.\n" -msgstr "Voit myös piirtää ne eri asentoihin.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:214 -msgid "You can also flip any number of objects.\n" -msgstr "Voit myös peilata useita objekteja.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:474 +#: ../../../../build/work/app/i18n/custmsg.h:613 msgid "" -"You can also join to and from circles. This will change the circles to " -"curves.\n" +"Many of the commands and dialogs can be invoked by special key combinations " +"called Menu-Accelerators. These are listed on the Menus next to the command " +"name. For example, Control-P will invoke the Print command." msgstr "" -"Voit myös yhdistää alkaen ympyrästä ja päättyen ympyrään. Tämä muuttaa " -"ympyrät kaarteiksi.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:407 +#: ../../../../build/work/app/i18n/custmsg.h:614 msgid "" -"You can also popup the Command Options Menu by pressing Shift-Right-Click " -"which includes options for setting the drawing method. These options are " -"also available for the Move and Rotate Command Options Menu.\n" +"The Connect command is used to join Sectional track pieces that don't quite " +"fit together.\n" +"This command works by adding small gaps between other tracks to move the " +"selected End-Points closer together." msgstr "" -"Piirtotavan voi valita myös painamalla vaihto-näppäintä ja klikkaamalla " -"hiiren oikealla painikkeella, jolloin avautuu komennon ponnahdusvalikko. " -"Piirtotavan valinta on saatavilla Siirrä ja Pyöritä komentojen " -"ponnahdusvalikoissa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:623 +#: ../../../../build/work/app/i18n/custmsg.h:615 msgid "" -"You can also press the 's' key to convert a Prototype measurement to a Scale " -"measurement y dividing by the ratio for the current scale." +"To copy a group of objects: Select the objects, press Control-C (or select " +"Copy from the Edit menu), press Control-V (or select Paste from the Edit " +"menu).\n" +"The selected tracks will be copied to the layout and you can Move or Rotate " +"them into position." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:341 +#: ../../../../build/work/app/i18n/custmsg.h:616 msgid "" -"You can also use Shift-Right-Click to display a popup menu that lets you " -"rotate the Turnout by specific angles.\n" +"In the Rotate (or Select) commands you can press Shift-Right-Click to " +"display the Rotate menu which allows you to rotate the selected objects by a " +"specific angle." msgstr "" -"Vaihto + hiiren oikea avaa ponnahdusvalikon, josta voit pyörittää raideosaa " -"tietyn kulman verran.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:579 +#: ../../../../build/work/app/i18n/custmsg.h:617 msgid "" -"You can change orientation of the pages on the Print command by moving or " -"rotating the Print Grid.\n" -"Shift-Left-Drag moves the grid and Shift-Right-Drag rotates the grid." +"You can use the Move-To-Join option of the Join command (hold down the Shift " +"key) to move a group of Selected tracks to attach with some unselected End-" +"Point." msgstr "" -"Voit muuttaa tulostettavien sivujen asettelua siirtämällä tai pyörittämällä " -"tulostusruudukkoa.\n" -"Vaihto-näppäin ja hiiren vasen raahaus siirtää ruudukkoa ja vaihto-hiiren " -"oikea pyörittää sitä." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:469 +#: ../../../../build/work/app/i18n/custmsg.h:618 msgid "" -"You can change the Exception color on the Colors dialog from the Options " -"menu.\n" -msgstr "Erityisraiteiden väritystä voi muuttaa Asetukset|Värit valikosta.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:486 -msgid "You can change the contents of Text...\n" -msgstr "Voit muuttaa tekstin sisältöä...\n" +"The Price List dialog (on the File Menu) is used to specify the prices of " +"each type of Turnout, Sectional Track and Structure. Also, the length and " +"price of flex-track pieces can be specified for each scale.\n" +"This values will be used on the Parts List report to generate total cost of " +"the selected objects." +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:575 +#: ../../../../build/work/app/i18n/custmsg.h:619 msgid "" -"You can change the overall size of your layout on the \"Options|Layout\" " -"dialog." +"Areas of water can represented by a Polygon (use the Draw command) of the " +"appropiate color.\n" +"By using the Modify command, you can move, add or remove corners of the " +"Polygon to fit the shape of the water.\n" +"You use the Below command to place the Polygon below (or behind) other " +"objects.\n" +"\n" +"You can also use a Polygon to represent aisles. " msgstr "" -"Voit muuttaa ratasuunnitelmasi kokoa \"Asetukset|Ratasuunnitelma\" ikkunasta." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:206 +#: ../../../../build/work/app/i18n/custmsg.h:620 msgid "" -"You can change the radius of a Straight or Curved track that is connected at " -"one End-Point by holding down the Shift key while dragging on it.\n" +"When you create Benchwork you can move it below other objects by Selecting " +"the Benchwork and use the Below command.\n" +"Also, put Benchwork in a separate Layer so you can hide it if desired." msgstr "" -"Voit muuttaa suoran tai kaarevan raiteen sädettä, mikäli se on toisesta " -"päästä liitetty. Tämä tapahtuu pitämällä vaihto-näppäintä painettuna " -"raahattaessa raiteen toisesta päästä hiiren vasemmalla painikkeella.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:334 +#: ../../../../build/work/app/i18n/custmsg.h:621 msgid "" -"You can change what portion of the layout is shown by using the 'Map' window " -"which shows a compressed version of the entire layout. A hilighted area of " -"the 'Map' (in reverse video) shows what portion of the layout is displayed " -"in the main drawing area.\n" +"You can enter Distances and Lengths using any format regardless of the " +"Length Format on the Preferences dialog." msgstr "" -"Kartta -ikkunan avulla voit valita mikä osa ratasuunnitelmaa näytetään. " -"Kartta -ikkunassa esitetään piennennetty kuva koko ratasuunnitelmasta. " -"Korostettu alue esittää pääikkunan piirtoalueella näytettävän alueen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:291 +#: ../../../../build/work/app/i18n/custmsg.h:622 msgid "" -"You can choose which to use by clicking on the small button to the left of " -" command button if the current Curve command is not the one you " -"want.\n" +"You can enter Metric values when English is the default Units and vice versa." msgstr "" -"Tavan voi valita Kaarre-painikkeen oikealla puolella olevasta pienestä " -"nuolesta avautuvan valikon kautta.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:278 -msgid "You can click on Quit to return to XTrackCAD at any time.\n" +#: ../../../../build/work/app/i18n/custmsg.h:623 +msgid "" +"When entering Distances and Lengths you can press the '=' key to redisplay " +"the value in the default format." msgstr "" -"Voit painaa Lopeta -painiketta milloin tahansa palataksesi XTrackCADin " -"perustilaan.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:559 -msgid "You can connect from any track to a turntable\n" -msgstr "Voit yhdistää mistä tahansa raiteesta kääntöpöytään.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:581 +#: ../../../../build/work/app/i18n/custmsg.h:624 msgid "" -"You can create Curved tracks in four ways by dragging from:\n" -" the 1st End-Point in the direction of the curve\n" -" Center of the Curve to the 1st End-Point\n" -" End-Point to the Center\n" -" the 1st to 2nd End-Point\n" -"Then drag on one of the Red arrows to create the final shape of the curve.\n" -"\n" -"You can click on the small button to the left of the Curve command button to " -"change the method." +"You can also press the 's' key to convert a Prototype measurement to a Scale " +"measurement y dividing by the ratio for the current scale." msgstr "" -"Voit luoda kaarevia raiteita neljällä tavalla raahaamalla:\n" -" - 1. päätepisteestä kaarteen suuntaan\n" -" - keskipisteestä kaarteen ensimmäiseen päätepisteeseen\n" -" - päätepisteestä keskipisteeseen\n" -" - ensimmäisestä toiseen päätepisteeseen\n" -"Asettele sitten kaarre lopulliseen muotoonsa raahaamalla punaisista " -"nuolista.\n" -"\n" -"Voit valita tavan Kaarre painikkeen oikealla puolella olevasta pienestä " -"painikkeesta avautuvan valikon kautta." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:282 -msgid "You can do this by clicking and dragging on a corner of the window.\n" +#: ../../../../build/work/app/i18n/custmsg.h:625 +msgid "" +"The 'p' key will convert a Scale measurement to a Prototype measurement." msgstr "" -"Voit tehdä tämän klikkaamalla ja raahaamalla hiidella ikkunan reunoista tai " -"nurkasta.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:563 -msgid "You can drag the connecting point all round the turntable.\n" -msgstr "Voit raahata liitoskohtaa ympäti kääntöpöytää.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:302 -msgid "You can draw a variety of different types of benchwork:\n" -msgstr "Voit piirtää eri tyyppisiä runkorakenteita:\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:653 +#: ../../../../build/work/app/i18n/custmsg.h:626 msgid "" -"You can draw tracks with wider lines for rails. \n" -"Select the tracks and use Medium or Thick Tracks on the Edit menu." +"You can place cars on the layout using the Train Simulation command to check " +"clearance points, track to track separation and coupling." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:620 +#: ../../../../build/work/app/i18n/custmsg.h:627 msgid "" -"You can enter Distances and Lengths using any format regardless of the " -"Length Format on the Preferences dialog." +"Use the MoveTo button on the Custom Management dialog to move your custom " +"Turnout, Structure and Car definitions to a .XTP parameter file." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:621 +#: ../../../../build/work/app/i18n/custmsg.h:628 msgid "" -"You can enter Metric values when English is the default Units and vice versa." +"If you are printing multiple pages on a continuous feed printer (such a Dot " +"Matrix) you can change the Page Order if necessary to print pages out in " +"proper order." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:644 +#: ../../../../build/work/app/i18n/custmsg.h:629 msgid "" -"You can export the selected tracks to a DXF file which can be read by most " -"CAD programs." +"On the Car Item and Car Part dialogs, you can enter custom values for " +"Manufacturer, Part and Road by typing the new value directly into the Drop " +"Down List." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:91 +#: ../../../../build/work/app/i18n/custmsg.h:630 msgid "" -"You can later Group this turnout with the straight segments to recreate the " -"turnout definition. You can also add other track segments to turnout " -"definitions.\n" +"On the Car Item dialog, you can change the Road, Number, Color and other " +"values for a Car. This is useful if you repaint or renumber a car. \n" +"You can also change the Coupler Mounting and Coupler Length if you change " +"the couplers." msgstr "" -"Voit myöhemmin ryhmitellä tämän vaihteen suorien raideosien kanssa ja luoda " -"vaihteen määrittelyn uudelleen. Voit myös lisätä muita raideosia vaihteiden " -"määrittelyihin.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:589 +#: ../../../../build/work/app/i18n/custmsg.h:631 msgid "" -"You can move and rotate the Snap Grid to align with existing track or " -"benchwork." +"You can Export your Car Inventory to a file in Comma-Separated-Value format " +"which can be read by most spread-sheet programs." msgstr "" -"Voit siirtää ja pyörittää kohdistusruudukkoa halutessasi kohdistaa jonkin " -"olemassa olevan raiteen, runkorakenteen tai pöydän reunan kanssa." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:161 -msgid "You can move or resize the Profile dialog now if you want.\n" -msgstr "Voit siirtää Profiili-ikkunaa tai muuttaa sen kokoa jos haluat.\n" +#: ../../../../build/work/app/i18n/custmsg.h:632 +msgid "Use the Train Odometer to measure distances along the track." +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:276 +#: ../../../../build/work/app/i18n/custmsg.h:633 msgid "" -"You can move the demo window now by dragging on the title bar at the top of " -"the window. I suggest you move it to the top of your screen.\n" +"Holding down the Shift key when clicking the Zoom In or Zoom Out button will " +"zoom to a programmed Drawing Scale. \n" +"Holding down the Shift and Control keys when clicking a Zoom button will set " +"it's program Zoom to the current Drawing Scale." msgstr "" -"Voit siirrellä demo-ikkunaa raahaamalla otsikkopalkista. Ehdotan, että " -"siirrät demo-ikkunan näyttösi yläosaan.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:625 +#: ../../../../build/work/app/i18n/custmsg.h:634 msgid "" -"You can place cars on the layout using the Train Simulation command to check " -"clearance points, track to track separation and coupling." +"You can trim the ends of turnouts by holding down the Shift key when using " +"the Split command." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:339 +#: ../../../../build/work/app/i18n/custmsg.h:635 msgid "" -"You can place the turnout on a arbitrary position on the layout. Left-drag " -"the turnout into place...\n" +"The Split command can be used to create Block Gaps at end points between two " +"tracks. \n" +"Either rail or both rails can be gapped, which are drawn as thick lines." msgstr "" -"Aseta palaraide ratasuunnitelmaasi klikkaamalla. Raahaa se sitten hiiren " -"vasemmalla painikkeella paikoilleen...\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:239 -msgid "You can print the design to check the dimensions before saving them.\n" +#: ../../../../build/work/app/i18n/custmsg.h:636 +msgid "" +"Trains will 'crash' if they hit another car when travelling faster than the " +"'Max Coupling Speed' (on the Command Options dialog). \n" +"They will also 'crash' if they hit the end of the track or an open " +"turnout. \n" +"Crashed trains must be manually moved back onto the track." msgstr "" -"Voit tulostaa suunnittelemasi vaihteen tarkastaaksesi sen mitat ennen " -"tallentamista.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:594 +#: ../../../../build/work/app/i18n/custmsg.h:637 msgid "" -"You can remove groups of buttons or the Hot Bar from the Main window to give " -"you more room if you are not using some features. Also, the number of Layer " -"buttons displayed is controlled by the Layers dialog." +"You can add new track segments to a turnout definition or create a " +"definition from individual tracks using the Group command." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:450 +#: ../../../../build/work/app/i18n/custmsg.h:638 msgid "" -"You can remove these slight mis-alignments by tightening the tracks starting " -"from a unconnected End-Point. Use Shift-Left-Click with the " -"command.\n" +"The center point and radius of Curved and Circle tracks can optionally be " +"drawn. \n" +"This feature is toggled by using the Move Label command and doing a Shift-" +"Left-Click on the track." msgstr "" -"Voit poistaa kohdistusten heiton tiukentamalla raideosat alkaen irrallisesta " -"päätepisteestä. Käytä liitä-komentoa ja pidä vaihto-näppäintä painettuna kun " -"klikkaat hiiren vasemmalla painikkeella.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:140 +#: ../../../../build/work/app/i18n/custmsg.h:639 msgid "" -"You can resize and move the Turnout Selection dialog if it obscures the " -"other windows.\n" +"Turnout, Curved and Helix track labels can be individually turned on and off " +"by doing a Shift-Right-Click on the track when using the Move Label command." msgstr "" -"Voit pienentää tai siirtää raideosien valintaikkunaa, jos se peittää muita " -"ikkunoita.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:332 -msgid "You can see the entire layout in the Map window.\n" -msgstr "Kartta -ikkunassa esitetään koko ratasuunnitelma.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:447 -msgid "You can see these slight mis-alignments.\n" -msgstr "Voit nähdä hienoisen heiton raideosien kohdistuksessa.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:177 +#: ../../../../build/work/app/i18n/custmsg.h:640 msgid "" -"You can set additional Defined Elevation points using the Profile Options " -"popup menu. These points are added to the Profile if they are on the Path.\n" +"You can use the Describe command to change the font size of Text objects." msgstr "" -"Ponnahtusvalikon avulla voit lisätä myös uusia määriteltyjä korkeustasoja. " -"Nämä pisteet lisätään profiiliin, jos ne ovat profiilin reitillä.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:633 +#: ../../../../build/work/app/i18n/custmsg.h:641 msgid "" -"You can trim the ends of turnouts by holding down the Shift key when using " -"the Split command." +"You can use the Describe command to change the size of Dimension Line labels." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:596 +#: ../../../../build/work/app/i18n/custmsg.h:642 msgid "" -"You can unload parameter files you are not using by the Parameter Files " -"dialog. This removes unused Turnout and Structure definitions from the Hot " -"Bar and makes the program start faster." +"Normally Right-Click displays a popup menu of commands and Shift-Right-Click " +"displays options for the current command. \n" +"This can reversed by using the Right Click toggle button on the Command " +"Options dialog." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:588 +#: ../../../../build/work/app/i18n/custmsg.h:643 msgid "" -"You can use Shift-Drag in Select command to move and rotate selected " -"tracks.\n" -"Shift-Left-Drag moves tracks and Shift-Right-Drag rotates them.\n" -"Control-Left-Drag can move labels." +"The Align item on the Rotate command options menu will let you Align " +"selected objects with any unselected object. \n" +"The selected objects are rotated so the first point is parallel to the " +"second point you selected." msgstr "" -"Valitse-komennon ollessa käytössä voit siirtää ja pyörittää raiteita " -"pitämällä vaihto-näppäin painettuna ja raahaamalla hiirellä. Vaihto + " -"vasemmalla raahaus siirtää ja vaihto + oikealla raahaus pyörittää niitä.\n" -"Control + vasemmalla raahaaminen siirtää merkintöjä." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:553 +#: ../../../../build/work/app/i18n/custmsg.h:644 msgid "" -"You can use the command to change the number of Turns or the " -"Elevations at either end of the Helix. This will affect the Grade and " -"Vertical Separation.\n" +"Print To Bitmap allows you to print the track center line. \n" +"This is useful if you later print the bitmap full size as a template when " +"laying track." msgstr "" -"Voit käyttää määrittele-komentoa muuttaaksesi kierrosten lukumäärää tai " -"korkeustasoja kummassa tahansa päässä helixiä. Tämä vaikuttaa nousukulmaan " -"ja kerrosten väliseen tilaan.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:218 -msgid "You can use the command to change their title.\n" -msgstr "Voit käyttää määrittele-komentoa muuttaaksesi niiden otsikoita.\n" - -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:519 -msgid "You can use the command to undelete tracks.\n" -msgstr "Voit käyttää Kumoa-toimintoa palauttaaksesi poistamasi raideosat.\n" +#: ../../../../build/work/app/i18n/custmsg.h:645 +msgid "" +"You can export the selected tracks to a DXF file which can be read by most " +"CAD programs." +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:157 +#: ../../../../build/work/app/i18n/custmsg.h:646 msgid "" -"You can use the Above and Below Commands to move lines and shapes to the " -"front or back of the drawing.\n" +"Lengths and distances can be displayed in a variety of units and formats " +"such as 1' 10 3/4\", 1ft 10.75in or 22.750. In Metric mode, distances can " +"be displayed as millimeters, centimeters or meters. See the Length Format " +"item on the Preferences dialog." msgstr "" -"Voit vaihtaa viivojen ja muotojen järjestystä viemällä niitä alimmaiseksi " -"tai päällimmäiseksi.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:639 +#: ../../../../build/work/app/i18n/custmsg.h:647 msgid "" -"You can use the Describe command to change the font size of Text objects." +"Tracks that are too steep or curve too tightly are drawn in the Expection " +"color (Purple by default). \n" +"This helps to identify potential problem areas. \n" +"The maximum grade and minimum radius are set on the Preferences dialog." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:640 +#: ../../../../build/work/app/i18n/custmsg.h:648 msgid "" -"You can use the Describe command to change the size of Dimension Line labels." +"The Flip command produces a mirror-image of the selected tracks. \n" +"If possible, right-hand turnouts are relabeled as left-hand turnouts (and " +"vice versa)." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:616 +#: ../../../../build/work/app/i18n/custmsg.h:649 msgid "" -"You can use the Move-To-Join option of the Join command (hold down the Shift " -"key) to move a group of Selected tracks to attach with some unselected End-" -"Point." +"Then Ungroup command will break turnouts and structures into individual " +"track, line and shape segments. \n" +"You can modify each segment and add new ones. \n" +"Then use the Group command to update the definition." msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:329 -msgid "You cannot create a track parallel to a turnout.\n" -msgstr "Vaihteesta ei voi luoda rinnakkaista raidetta.\n" +#: ../../../../build/work/app/i18n/custmsg.h:650 +msgid "Dimension lines show the distance between two points." +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:561 +#: ../../../../build/work/app/i18n/custmsg.h:651 msgid "" -"You cannot place the connecting track too close to an existing stall track. " -"How close you can get is controlled by the Turntable Angle on the Setup " -"dialog.\n" +"A variety of Benchwork (rectangular, L-girder and T-girder) can be drawn. \n" +"Use the Below command to move the Benchwork below the track for proper " +"display." msgstr "" -"Liitosraidetta ei voi yhdistää liian lähelle kääntöpöytään ennestään " -"liittyvää raidetta. Tämä etäisyys, eli kääntöpöydän kulma, määritellään " -"komentojen asetuksissa.\n" +"Erilaisia runkorakenteita voidaan piirtää (suora, L-palkki ja T-palkki).\n" +"Käytä \"alimmaiseksi\" komentoa siirtääksesi runkorakenteen radan ja " +"maisemoinnin alapuolelle." -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:527 -msgid "You cannot split turnouts (unless you hold down the Shift key).\n" +#: ../../../../build/work/app/i18n/custmsg.h:652 +msgid "" +"The Turnout Designer dialogs allow you to specify the width of any attached " +"roadbed. \n" +"As well, the color and thickness of the lines used to represent the roadbed " +"can be specified." msgstr "" -"Palaraiteita ja vaihteita ei voi pilkkoa, ellei vaihto-näppäintä pidetä " -"samanaikaisesti painettuna.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:326 +#: ../../../../build/work/app/i18n/custmsg.h:653 msgid "" -"You control which side the parallel track will be on by moving the cursor " -"from one side of the track centerline to the other.\n" +"The Color dialog (on the Options menu) is used to change the color of " +"different objects on the display. \n" +"You can change the color of the Snap Grid and Borders, as well as Normal, " +"Selected and Exception tracks." msgstr "" -"Voit kontrolloida kummalle puolelle rinnakkainen raide luodaan siirtämällä " -"hiiren osoitinta alkuperäisen raiteen puolelta toiselle.\n" -#: ../../../../build/xtrkcad/app/help/messages.h:128 +#: ../../../../build/work/app/i18n/custmsg.h:654 msgid "" -"You have changed values for this object.\n" -"\n" -"Are you sure you want to Close?" +"You can draw tracks with wider lines for rails. \n" +"Select the tracks and use Medium or Thick Tracks on the Edit menu." msgstr "" -"Olet muuttanut tämän objektin arvoja.\n" -"\n" -"Haluatko varmasti sulkea?" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:170 +#: ../../../../build/work/app/i18n/custmsg.h:655 msgid "" -"You will get an error message because there is no route to one of the ends " -"of the existing Path.\n" +"Many objects on the layout have labels: Turnouts/Helix/Curved Titles, Track " +"Lenghts, End-Point Elevations, Track Elevations and Cars. \n" +"You can turn these labels on or off with the Label Enable toggle buttons on " +"the Display options dialog." msgstr "" -"Saat virheilmoituksen, koska valitun reitin päistä ei ole reittiä tähän " -"pisteeseen.\n" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:459 +#: ../../../../build/work/app/i18n/custmsg.h:656 msgid "" -"You will notice that the tracks do not line up exactly in one location.\n" -msgstr "Huomaat, etteivät raiteet aivan kohtaa yhdessä kohdassa.\n" +"If you hold down the Control key when using the Rotate command, the rotation " +"will be down in increments of 15°." +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:293 +#: ../../../../build/work/app/i18n/custmsg.h:657 msgid "" -"You will see a straight track with a double ended Red arrow at the end.\n" -msgstr "Näet suoran raiteen, jonka päässä on kaksisuuntainen punainen nuoli.\n" +"When using the Rotate command, Shift-Right-Click displays a menu allowing " +"you to rotate by specific amounts or to align the selected objects with " +"another object." +msgstr "" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:72 -msgid "You will see the updated image on the HotBar.\n" -msgstr "Näet päivitetyn kuvan Hot Barissa.\n" +#~ msgid "" +#~ " exists\n" +#~ "Do you want to overwrite it?" +#~ msgstr "" +#~ " on olemassa.\n" +#~ "Haluatko korvata olemassa olevan tiedoston?" -#: ../bin/tcurve.c:339 ../bin/tcurve.c:341 ../bin/tease.c:498 -#: ../bin/tease.c:500 ../bin/compound.c:513 ../bin/compound.c:515 -#: ../bin/tstraigh.c:77 ../bin/tstraigh.c:79 -msgid "Z" -msgstr "Z" +#~ msgid "%s exists" +#~ msgstr "%s on olemassa" -#: ../bin/misc.c:2186 -msgid "Zoom &In" -msgstr "Lähennä" +#~ msgid ": cannot open" +#~ msgstr ": ei voida avata" -#: ../bin/misc.c:2188 -msgid "Zoom &Out" -msgstr "Loitonna" +#~ msgid "Abort Print" +#~ msgstr "Keskeytä tulostus" -#: ../bin/misc.c:1689 ../bin/misc.c:1720 -msgid "Zoom Buttons" -msgstr "Zoom" +#~ msgid "Add Margin" +#~ msgstr "Lisää marginaali" -#: ../bin/misc.c:2085 ../bin/misc.c:2086 -msgid "Zoom In" -msgstr "Lähennä" +#~ msgid "Add Printer" +#~ msgstr "Lisää tulostin" -#: ../bin/draw.c:1775 -#, c-format -msgid "Zoom In Program Value %ld:1" -msgstr "Lähennä arvoon %ld:1" +#~ msgid "Angle=%0.3f" +#~ msgstr "Kulma=%0.3f" -#: ../bin/misc.c:2087 ../bin/misc.c:2088 -msgid "Zoom Out" -msgstr "Loitonna" +#~ msgid "Beige" +#~ msgstr "Beige" -#: ../bin/draw.c:1795 -#, c-format -msgid "Zoom Out Program Value %ld:1" -msgstr "Loitonna arvoon %ld:1" +#~ msgid "Black" +#~ msgstr "Musta" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:131 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:143 -msgid "Zoom in" -msgstr "Lähennä näkymää" +#~ msgid "Blue" +#~ msgstr "Sininen" -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:132 -#: ../../../../build/xtrkcad/app/bin/bllnhlp.c:144 -msgid "Zoom out" -msgstr "Loitonna näkymää" +#~ msgid "Brown" +#~ msgstr "Ruskea" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:99 -msgid "and Group the new definition.\n" -msgstr "ja ryhmittele tämä uusi määrittely.\n" +#~ msgid "Can not save New Margin definition" +#~ msgstr "Uuden marginaalin määrittelyjen tallennus ei onnistu" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:114 -msgid "and Group them.\n" -msgstr "ja ryhmittele ne.\n" +#~ msgid "Can not save New Printer definition" +#~ msgstr "Uuden tulostimen määrittelyjen tallennus ei onnistu" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:441 -msgid "and a straight track.\n" -msgstr "ja suoraksi raideosaksi.\n" +#~ msgid "" +#~ "Can't find standard San-Serif font.\n" +#~ "Please choose a font" +#~ msgstr "" +#~ "San-Serif kirjasinta ei löydy.\n" +#~ "Ole hyvä ja valitse kirjasin" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:137 -msgid "and change the track gauge as well.\n" -msgstr "ja muutamme myös raideleveyden.\n" +#~ msgid "" +#~ "Can't find standard Serif font.\n" +#~ "Please choose a font" +#~ msgstr "" +#~ "Serif kirjasinta ei löydy.\n" +#~ "Ole hyvä ja valitse kirjasin" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:485 -msgid "and change the turnout Title.\n" -msgstr "ja muuttakaamme sen otsikkoa.\n" +#~ msgid "Chocolate" +#~ msgstr "Suklaa" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:512 -msgid "and create a Grade marker.\n" -msgstr "ja luomme uuteen liitoskohtaan nousukulman merkinnän.\n" +#~ msgid "Command: " +#~ msgstr "Komento: " -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:509 -msgid "and create another Computed Elevation point.\n" -msgstr "ja luo sen kohdalle toinen laskettu korkeustaso.\n" +#~ msgid "Creating %s" +#~ msgstr "Luodaan %s" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:487 -msgid "and its size.\n" -msgstr "ja kokoa.\n" +#~ msgid "Custom Update" +#~ msgstr "Omat raideosat ja kalusto" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:184 -msgid "and reselect it.\n" -msgstr "ja valitse se uudelleen.\n" +#~ msgid "Dark Blue" +#~ msgstr "Tummansininen" -#: ../../../../build/xtrkcad/app/i18n/custmsg.h:112 -msgid "and the the Angular Length.\n" -msgstr "ja sitten kulma.\n" +#~ msgid "Dark Gray" +#~ msgstr "Tummanharmaa" -#: ../../../../build/xtrkcad/app/help/messages.h:143 -#, c-format -msgid "checkTrackLength: Short track length = %0.3f" -msgstr "Raideosan pituuden tarkistus: Pienin raideosan pituus = %0.3f" +#~ msgid "Dark Green" +#~ msgstr "Tummanvihreä" -#: ../../../../build/xtrkcad/app/help/messages.h:144 -#, c-format -msgid "checkTrackLength: unknown type: %d" -msgstr "Raideosan pituuden tarkistus: Tuntematon tyyppi: %d" +#~ msgid "Dark Red" +#~ msgstr "Tummanpunainen" -#: ../../../../build/xtrkcad/app/help/messages.h:145 -#, c-format -msgid "connectTracks: T%d[%d] T%d[%d] d=%0.3f a=%0.3f" -msgstr "" +#~ msgid "Describe objects" +#~ msgstr "Määrittele objekteja" -#: ../bin/dpricels.c:61 -msgid "costs" -msgstr "maksaa" +#~ msgid "Draw" +#~ msgstr "Piirto" -#: ../../../../build/xtrkcad/app/help/messages.h:131 -#, c-format -msgid "doDemo: bad number (%d)" -msgstr "Demo: Virheellinen demon numero (%d)." +#~ msgid "Enter a post-script font name for:" +#~ msgstr "Syötä post-script kirjasimen nimi:" -#: ../bin/chndldto.c:85 -msgid "frog" -msgstr "Risteyskappale" +#~ msgid "Enter both printer name and command" +#~ msgstr "Syötä tulostimen nimi ja komento" -#: ../../../../build/xtrkcad/app/help/messages.h:111 -msgid "inv-pathEndTrk on Path." -msgstr "" +#~ msgid "Enter printer name" +#~ msgstr "Syötä tulostimen nimi" -#: ../../../../build/xtrkcad/app/help/messages.h:112 -msgid "inv-pathStartTrk on Path" -msgstr "" +#~ msgid "Factor" +#~ msgstr "Kerroin" -#: ../../../../build/xtrkcad/app/help/messages.h:147 -#, c-format -msgid "joinTracks: invalid track type=%d" -msgstr "" +#~ msgid "File Name? " +#~ msgstr "Tiedostonimi?" -#: ../bin/tease.c:505 -msgid "l0" -msgstr "l0" +#~ msgid "Font Alias" +#~ msgstr "Kirjasinalias" -#: ../bin/tease.c:506 -msgid "l1" -msgstr "l1" +#~ msgid "Forest Green" +#~ msgstr "Metsän vihreä" -#: ../bin/doption.c:354 -msgid "load last layout" -msgstr "Lataa edellinen ratasuunnitelma" +#~ msgid "Format" +#~ msgstr "Muotoilu" -#: ../../../../build/xtrkcad/app/help/messages.h:114 -msgid "pathEndTrk not on Path." -msgstr "" +#~ msgid "Gold" +#~ msgstr "Kulta" -#: ../../../../build/xtrkcad/app/help/messages.h:115 -msgid "pathStartTrk not on Path." -msgstr "" +#~ msgid "Gray" +#~ msgstr "Harmaa" -#: ../bin/chndldto.c:151 ../bin/chndldto.c:176 -msgid "points" -msgstr "Kielien päät" +#~ msgid "Green" +#~ msgstr "Vihreä" -#: ../bin/fileio.c:668 -#, c-format -msgid "putTitle: title too long: %s" -msgstr "putTitle: Otsikko on liian pitkä: %s" +#~ msgid "Lawn Green" +#~ msgstr "Ruohonvihreä" -#: ../../../../build/xtrkcad/app/help/messages.h:148 -#, c-format -msgid "resolveIndex: T%d[%d]: T%d doesn\\\\'t exist" -msgstr "" +#~ msgid "Light Gray" +#~ msgstr "Vaaleanharmaa" -#: ../bin/cprint.c:140 ../bin/cjoin.c:415 ../bin/cjoin.c:863 -msgid "selected" -msgstr "valittu" +#~ msgid "Live" +#~ msgstr "Seuraa" -#: ../bin/cturnout.c:917 -msgid "splitTurnout: can't find segment" -msgstr "Pilko: Lohkoja ei löytynyt." +#~ msgid "Name: " +#~ msgstr "Nimi: " -#: ../bin/doption.c:354 -msgid "start with blank layout" -msgstr "Uusi ratasuunnitelma" +#~ msgid "No file name specified" +#~ msgstr "Tiedostonimeä ei ole annettu" -#: ../bin/cjoin.c:415 ../bin/cjoin.c:863 -msgid "unselected" -msgstr "valitsematon" +#~ msgid "No font selected" +#~ msgstr "Kirjasinta ei valittu" + +#~ msgid "No fonts" +#~ msgstr "Ei kirjasimia" + +#~ msgid "Now printing" +#~ msgstr "Tulostetaan" + +#~ msgid "Now printing %s" +#~ msgstr "Tulostetaan %s" + +#~ msgid "Orange" +#~ msgstr "Oranssi" + +#~ msgid "Overwrite" +#~ msgstr "Kirjoita päälle" + +#~ msgid "PS Font" +#~ msgstr "PS kirjasin" + +#~ msgid "Page %d" +#~ msgstr "Sivu %d" + +#~ msgid "Page 1" +#~ msgstr "Sivu 1" + +#~ msgid "Paper Size" +#~ msgstr "Paperin koko" + +#~ msgid "Pink" +#~ msgstr "Vaaleanpunainen" + +#~ msgid "Place circle center" +#~ msgstr "Aseta ympyrän keskipiste" + +#~ msgid "Print Test Page" +#~ msgstr "Tulosta testisivu" + +#~ msgid "Print To File" +#~ msgstr "Tulosta tiedostoon" + +#~ msgid "Print to file ..." +#~ msgstr "Tulosta tiedostoon..." + +#~ msgid "Printer" +#~ msgstr "Tulostin" + +#~ msgid "Printer Margin Test Page" +#~ msgstr "Tulostimen marginaalien testisivu" + +#~ msgid "Printing" +#~ msgstr "Tulostetaan" + +#~ msgid "Purple" +#~ msgstr "Purppura" + +#~ msgid "Red" +#~ msgstr "Punainen" + +#~ msgid "Specifies the check point frequency" +#~ msgstr "Kuinka usein automaattinen varmennus suoritetaan" + +#~ msgid "Tan" +#~ msgstr "Keltaisenruskea" + +#~ msgid "Tomato" +#~ msgstr "Tomaatti" + +#~ msgid "Tracks with grades steeper than this are exceptional" +#~ msgstr "Raiteet, joissa on jyrkempi nousukulma, käsitetään erityiraiteiksi" + +#~ msgid "Tracks with tighter radius than this are exceptional" +#~ msgstr "Raiteet, joissa on pienempi kaarresäde, käsitetään erityiraiteiksi" + +#~ msgid "Violet" +#~ msgstr "Violetti" + +#~ msgid "X Font" +#~ msgstr "X kirjasin" + +#~ msgid "XTrackCAD Help" +#~ msgstr "XTrackCAD ohje" + +#~ msgid "Yellow" +#~ msgstr "Keltainen" + +#~ msgid "load last layout" +#~ msgstr "Lataa edellinen ratasuunnitelma" + +#~ msgid "start with blank layout" +#~ msgstr "Uusi ratasuunnitelma" #~ msgid " DXF Files|*.dxf" #~ msgstr " DXF tiedostot|*.dxf" @@ -11606,10 +12663,6 @@ msgstr "valitsematon" #~ msgid "Can't get app dir" #~ msgstr "Sovellushakemiston haku ei onnistunut" -#, fuzzy -#~ msgid "Cannot split %s track" -#~ msgstr "Pilko raide" - #, fuzzy #~ msgid "Car Item" #~ msgstr "Tuote" @@ -11621,9 +12674,6 @@ msgstr "valitsematon" #~ msgid "Copyright (c) 2007 Sillub Technology and XTrkCad Team" #~ msgstr "Copyright (c) 2007 Sillub Technology ja XTrkCad Team" -#~ msgid "Error" -#~ msgstr "Virhe" - #, fuzzy #~ msgid "Help - %s" #~ msgstr "Ohje" diff --git a/app/i18n/pt_BR.po b/app/i18n/pt_BR.po index d7304ed..13f4bac 100644 --- a/app/i18n/pt_BR.po +++ b/app/i18n/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xtrkcad 4.1.3a\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-10-04 05:37-0400\n" +"POT-Creation-Date: 2017-11-05 13:40+0100\n" "PO-Revision-Date: 2009-10-06 22:22-0500\n" "Last-Translator: Daniel Spagnol \n" "Language-Team: Brazilian Portuguese\n" @@ -17,943 +17,1097 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: ../bin/cblock.c:99 -#: ../bin/cblock.c:134 -#: ../bin/compound.c:520 -#: ../bin/cswitchmotor.c:99 -#: ../bin/cswitchmotor.c:140 -#: ../bin/dlayer.c:318 +#: ../bin/cbezier.c:586 +#, fuzzy +msgid "Select End-Point - Ctrl unlocks end-point" +msgstr "Selecionar primeira extremidade a conectar" + +#: ../bin/cbezier.c:588 ../bin/ccornu.c:462 ../bin/celev.c:418 +msgid "Select End-Point" +msgstr "Selecionar extremidade" + +#: ../bin/cbezier.c:609 +msgid "Not close enough to any valid, selectable point, reselect" +msgstr "" + +#: ../bin/cbezier.c:615 ../bin/ccornu.c:485 +#, c-format +msgid "Drag point %d to new location and release it" +msgstr "" + +#: ../bin/cbezier.c:625 ../bin/cbezier.c:716 ../bin/cbezier.c:718 +msgid "Pick any circle to adjust it - Enter to confirm, ESC to abort" +msgstr "" + +#: ../bin/cbezier.c:648 ../bin/cbezier.c:706 +msgid "Bezier Curve Invalid has identical end points Change End Point" +msgstr "" + +#: ../bin/cbezier.c:651 ../bin/cbezier.c:709 +#, c-format +msgid "Bezier Curve Invalid has %s Change End Point" +msgstr "" + +#: ../bin/cbezier.c:654 ../bin/cbezier.c:712 +msgid "Bezier Curve Invalid has three co-incident points" +msgstr "" + +#: ../bin/cbezier.c:656 +#, fuzzy +msgid "Bezier is Straight Line" +msgstr "Linha reta" + +#: ../bin/cbezier.c:658 +#, c-format +msgid "Bezier %s : Min Radius=%s Length=%s fx=%0.3f fy=%0.3f cusp=%0.3f" +msgstr "" + +#: ../bin/cbezier.c:662 +#, fuzzy, c-format +msgid "Bezier %s : Min Radius=%s Length=%s" +msgstr "Trecho curvo: Raio=%s Comprimento=%s" + +#: ../bin/cbezier.c:688 +#, fuzzy +msgid "No unconnected End Point to lock to" +msgstr "Selecionar segunda extremidade a conectar" + +#: ../bin/cbezier.c:714 +#, fuzzy +msgid "Bezier Curve is Straight Line" +msgstr "Cria uma linha reta" + +#: ../bin/cbezier.c:729 ../bin/cbezier.c:743 +msgid "Invalid Bezier Track - end points are identical" +msgstr "" + +#: ../bin/cbezier.c:736 +#, c-format +msgid "Invalid Bezier Curve has a %s - Adjust" +msgstr "" + +#: ../bin/cbezier.c:740 +msgid "Invalid Bezier Curve has three coincident points - Adjust" +msgstr "" + +#: ../bin/cbezier.c:749 +#, fuzzy +msgid "Create Bezier" +msgstr "Criar linhas" + +#: ../bin/cbezier.c:826 +#, fuzzy, c-format +msgid "%s picked - now select a Point" +msgstr "Clicar em uma extremidade não selecionada" + +#: ../bin/cbezier.c:852 ../bin/ccornu.c:802 +msgid "No changes made" +msgstr "" + +#: ../bin/cbezier.c:856 +#, fuzzy +msgid "Modify Bezier" +msgstr "Modificar trecho" + +#: ../bin/cbezier.c:870 +msgid "Modify Bezier Complete - select another" +msgstr "" + +#: ../bin/cbezier.c:875 +msgid "Modify Bezier Cancelled" +msgstr "" + +#: ../bin/cbezier.c:964 ../bin/cbezier.c:1034 +#, fuzzy, c-format +msgid "Place 1st end point of Bezier + Shift -> snap to %s end" +msgstr "Posicionar 1ª extremidade do trecho reto" + +#: ../bin/cbezier.c:987 +msgid "Shift used, but no Unconnected Track End there" +msgstr "" + +#: ../bin/cbezier.c:1000 +msgid "Shift used, but no Line End there" +msgstr "" + +#: ../bin/cbezier.c:1011 +msgid "Drag end of first Control Arm" +msgstr "" + +#: ../bin/cbezier.c:1019 +msgid "Drag end of second Control Arm" +msgstr "" + +#: ../bin/cbezier.c:1038 +#, c-format +msgid "Select other end of Bezier, +Shift -> snap to %s end" +msgstr "" + +#: ../bin/cbezier.c:1073 +msgid "Control Arm 1 is too short, try again" +msgstr "" + +#: ../bin/cbezier.c:1078 +#, c-format +msgid "Select other end of Bezier, +Shift -> snaps to %s end" +msgstr "" + +#: ../bin/cblock.c:105 ../bin/cblock.c:117 ../bin/cblock.c:160 +#: ../bin/ccontrol.c:167 ../bin/ccontrol.c:384 ../bin/compound.c:525 +#: ../bin/csensor.c:159 ../bin/csensor.c:356 ../bin/csignal.c:234 +#: ../bin/csignal.c:473 ../bin/csignal.c:484 ../bin/csignal.c:510 +#: ../bin/cswitchmotor.c:86 ../bin/cswitchmotor.c:105 +#: ../bin/cswitchmotor.c:216 ../bin/dcontmgm.c:91 ../bin/dlayer.c:445 msgid "Name" msgstr "Nome" -#: ../bin/cblock.c:100 -#: ../bin/cblock.c:135 +#: ../bin/cblock.c:106 ../bin/cblock.c:118 ../bin/cblock.c:161 +#: ../bin/csensor.c:161 ../bin/csensor.c:362 ../bin/csignal.c:473 +#: ../bin/csignal.c:512 msgid "Script" msgstr "Script" -#: ../bin/cblock.c:136 -#: ../bin/cdraw.c:188 -#: ../bin/ctodesgn.c:129 -#: ../bin/ctodesgn.c:130 -#: ../bin/ctodesgn.c:131 -#: ../bin/ctodesgn.c:180 -#: ../bin/ctodesgn.c:183 -#: ../bin/ctodesgn.c:203 -#: ../bin/ctodesgn.c:208 -#: ../bin/ctodesgn.c:241 -#: ../bin/ctodesgn.c:246 -#: ../bin/ctodesgn.c:278 -#: ../bin/ctodesgn.c:281 -#: ../bin/ctodesgn.c:284 -#: ../bin/ctodesgn.c:319 -#: ../bin/ctodesgn.c:321 -#: ../bin/ctodesgn.c:339 -#: ../bin/ctodesgn.c:341 -#: ../bin/ctodesgn.c:360 -#: ../bin/ctodesgn.c:362 -#: ../bin/ctodesgn.c:381 -#: ../bin/ctodesgn.c:401 -#: ../bin/ctodesgn.c:421 -#: ../bin/ctodesgn.c:441 -#: ../bin/ctodesgn.c:479 -#: ../bin/ctodesgn.c:498 -#: ../bin/ctodesgn.c:499 -#: ../bin/ctrain.c:173 -#: ../bin/tcurve.c:348 -#: ../bin/tstraigh.c:80 +#: ../bin/cblock.c:119 +#, fuzzy +msgid "Segments" +msgstr "No. de segmentos" + +#: ../bin/cblock.c:162 ../bin/cdraw.c:219 ../bin/ctodesgn.c:137 +#: ../bin/ctodesgn.c:138 ../bin/ctodesgn.c:139 ../bin/ctodesgn.c:188 +#: ../bin/ctodesgn.c:191 ../bin/ctodesgn.c:211 ../bin/ctodesgn.c:216 +#: ../bin/ctodesgn.c:249 ../bin/ctodesgn.c:254 ../bin/ctodesgn.c:286 +#: ../bin/ctodesgn.c:289 ../bin/ctodesgn.c:292 ../bin/ctodesgn.c:327 +#: ../bin/ctodesgn.c:329 ../bin/ctodesgn.c:347 ../bin/ctodesgn.c:349 +#: ../bin/ctodesgn.c:368 ../bin/ctodesgn.c:370 ../bin/ctodesgn.c:389 +#: ../bin/ctodesgn.c:409 ../bin/ctodesgn.c:429 ../bin/ctodesgn.c:449 +#: ../bin/ctodesgn.c:487 ../bin/ctodesgn.c:506 ../bin/ctodesgn.c:507 +#: ../bin/ctrain.c:184 ../bin/tbezier.c:240 ../bin/tcornu.c:290 +#: ../bin/tcurve.c:356 ../bin/tstraigh.c:89 msgid "Length" msgstr "Comprimento" -#: ../bin/cblock.c:137 -#: ../bin/cdraw.c:184 -#: ../bin/compound.c:512 -#: ../bin/tcurve.c:340 -#: ../bin/tease.c:497 -#: ../bin/tstraigh.c:76 +#: ../bin/cblock.c:163 ../bin/cdraw.c:215 ../bin/compound.c:517 +#: ../bin/tbezier.c:231 ../bin/tcornu.c:277 ../bin/tcurve.c:348 +#: ../bin/tease.c:503 ../bin/tstraigh.c:85 msgid "End Pt 1: X" msgstr "Extremidade 1: X" -#: ../bin/cblock.c:138 -#: ../bin/cdraw.c:185 -#: ../bin/compound.c:514 -#: ../bin/tcurve.c:342 -#: ../bin/tease.c:499 -#: ../bin/tstraigh.c:78 +#: ../bin/cblock.c:164 ../bin/cdraw.c:216 ../bin/compound.c:519 +#: ../bin/tbezier.c:236 ../bin/tcornu.c:282 ../bin/tcurve.c:350 +#: ../bin/tease.c:505 ../bin/tstraigh.c:87 msgid "End Pt 2: X" msgstr "Extremidade 2: X" -#: ../bin/cblock.c:163 -msgid "Change Block" +#: ../bin/cblock.c:189 +#, fuzzy +msgid "Change block" msgstr "Mudar Bloco" -#: ../bin/cblock.c:208 -#: ../bin/compound.c:686 -#: ../bin/cswitchmotor.c:222 +#: ../bin/cblock.c:240 ../bin/compound.c:694 ../bin/cswitchmotor.c:299 #, c-format msgid "(%d): Layer=%d %s" msgstr "(%d): Camada=%d %s" -#: ../bin/cblock.c:228 -#: ../bin/cblock.c:643 +#: ../bin/cblock.c:261 ../bin/cblock.c:910 msgid "Block" msgstr "Bloco" -#: ../bin/cblock.c:444 -#: ../bin/cblock.c:463 -#: ../bin/cblock.c:471 -#: ../bin/cblock.c:527 -#: ../bin/cdraw.c:75 -#: ../bin/cdraw.c:862 -#: ../bin/cgroup.c:962 -#: ../bin/cgroup.c:1009 -#: ../bin/cgroup.c:1024 -#: ../bin/cgroup.c:1063 -#: ../bin/cgroup.c:1089 -#: ../bin/cgroup.c:1148 -#: ../bin/cgroup.c:1592 -#: ../bin/cnote.c:96 -#: ../bin/cprint.c:520 -#: ../bin/cprint.c:945 -#: ../bin/cpull.c:499 -#: ../bin/cpull.c:514 -#: ../bin/cpull.c:516 -#: ../bin/cpull.c:518 -#: ../bin/cselect.c:670 -#: ../bin/cselect.c:767 -#: ../bin/cselect.c:1241 -#: ../bin/csnap.c:577 -#: ../bin/csnap.c:710 -#: ../bin/cstruct.c:759 -#: ../bin/cstruct.c:768 -#: ../bin/cstruct.c:870 -#: ../bin/cswitchmotor.c:357 -#: ../bin/cswitchmotor.c:383 -#: ../bin/ctext.c:152 -#: ../bin/ctodesgn.c:150 -#: ../bin/ctodesgn.c:1040 -#: ../bin/ctodesgn.c:1090 -#: ../bin/ctodesgn.c:1203 -#: ../bin/ctodesgn.c:1505 -#: ../bin/ctrain.c:2546 -#: ../bin/cturnout.c:2380 -#: ../bin/cturnout.c:2507 -#: ../bin/cundo.c:150 -#: ../bin/cundo.c:154 -#: ../bin/dbitmap.c:65 -#: ../bin/dbitmap.c:122 -#: ../bin/dbitmap.c:200 -#: ../bin/dbitmap.c:235 -#: ../bin/dcar.c:3528 -#: ../bin/dcar.c:3712 -#: ../bin/dcar.c:3716 -#: ../bin/dcar.c:3720 -#: ../bin/dcar.c:3725 -#: ../bin/dcar.c:4039 -#: ../bin/dcar.c:4150 -#: ../bin/dcar.c:4528 -#: ../bin/dcmpnd.c:390 -#: ../bin/dcmpnd.c:401 -#: ../bin/dcmpnd.c:535 -#: ../bin/dcustmgm.c:186 -#: ../bin/dcustmgm.c:192 -#: ../bin/dcustmgm.c:201 -#: ../bin/dcustmgm.c:217 -#: ../bin/dease.c:220 -#: ../bin/dlayer.c:199 -#: ../bin/dlayer.c:216 -#: ../bin/dlayer.c:656 -#: ../bin/dlayer.c:661 -#: ../bin/doption.c:150 -#: ../bin/doption.c:250 -#: ../bin/doption.c:330 -#: ../bin/doption.c:479 -#: ../bin/doption.c:490 -#: ../bin/doption.c:556 -#: ../bin/dprmfile.c:87 -#: ../bin/dprmfile.c:101 -#: ../bin/dprmfile.c:114 -#: ../bin/dprmfile.c:156 -#: ../bin/dprmfile.c:431 -#: ../bin/draw.c:2220 -#: ../bin/fileio.c:599 -#: ../bin/fileio.c:668 -#: ../bin/fileio.c:779 -#: ../bin/fileio.c:781 -#: ../bin/fileio.c:786 -#: ../bin/fileio.c:946 -#: ../bin/macro.c:932 -#: ../bin/macro.c:936 -#: ../bin/macro.c:1013 -#: ../bin/macro.c:1119 -#: ../bin/macro.c:1347 -#: ../bin/macro.c:1363 -#: ../bin/misc.c:300 -#: ../bin/misc.c:350 -#: ../bin/misc.c:1685 -#: ../bin/misc.c:1819 -#: ../bin/misc.c:1883 -#: ../bin/misc.c:2441 -#: ../bin/misc.c:2451 -#: ../bin/misc.c:2471 -#: ../bin/misc.c:2474 -#: ../bin/misc2.c:413 -#: ../bin/param.c:1800 -#: ../bin/param.c:1924 -#: ../bin/param.c:1927 -#: ../bin/param.c:2049 -#: ../bin/param.c:2055 -#: ../bin/smalldlg.c:91 -#: ../bin/smalldlg.c:221 -#: ../bin/tease.c:1034 -#: ../bin/track.c:1276 -#: ../wlib/gtklib/CVS/Base/psprint.c:829 -#: ../wlib/gtklib/CVS/Base/psprint.c:840 -#: ../wlib/gtklib/CVS/Base/psprint.c:853 -#: ../wlib/gtklib/CVS/Base/psprint.c:1088 -#: ../wlib/gtklib/CVS/Base/psprint.c:1094 -#: ../wlib/gtklib/CVS/Base/psprint.c:1116 -#: ../wlib/gtklib/CVS/Base/psprint.c:1122 -#: ../wlib/gtklib/CVS/Base/psprint.c:1283 -#: ../wlib/gtklib/CVS/Base/psprint.c:1306 -#: ../wlib/gtklib/CVS/Base/wpref.c:121 -#: ../wlib/gtklib/psprint.c:829 -#: ../wlib/gtklib/psprint.c:840 -#: ../wlib/gtklib/psprint.c:853 -#: ../wlib/gtklib/psprint.c:1088 -#: ../wlib/gtklib/psprint.c:1094 -#: ../wlib/gtklib/psprint.c:1116 -#: ../wlib/gtklib/psprint.c:1122 -#: ../wlib/gtklib/psprint.c:1283 -#: ../wlib/gtklib/psprint.c:1306 -#: ../wlib/gtklib/wpref.c:121 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:514 +#: ../bin/cblock.c:425 +#, c-format +msgid "resolveBlockTrack: T%d[%d]: T%d doesn't exist" +msgstr "" + +#: ../bin/cblock.c:425 ../bin/cswitchmotor.c:395 ../bin/dbench.c:147 +#: ../bin/dcar.c:4234 ../bin/dcar.c:4418 ../bin/dcar.c:4428 ../bin/dcar.c:4476 +#: ../bin/dcar.c:4483 ../bin/dcar.c:4501 ../bin/dcar.c:4514 ../bin/dcar.c:4519 +#: ../bin/dcar.c:4548 ../bin/dcar.c:4710 ../bin/dxfoutput.c:189 +#: ../bin/fileio.c:236 ../bin/fileio.c:541 ../bin/fileio.c:656 +#: ../bin/fileio.c:753 ../bin/fileio.c:944 ../bin/fileio.c:1212 +#: ../bin/fileio.c:1262 ../bin/fileio.c:1308 ../bin/macro.c:174 +#: ../bin/macro.c:838 ../bin/macro.c:854 ../bin/macro.c:1157 +#: ../bin/param.c:1947 ../bin/track.c:986 ../bin/track.c:1360 +#: ../bin/track.c:1651 ../bin/track.c:1655 ../bin/track.c:1675 +#: ../bin/track.c:1737 ../wlib/gtklib/wpref.c:248 ../wlib/gtklib/wpref.c:255 +msgid "Continue" +msgstr "Continuar" + +#: ../bin/cblock.c:502 ../bin/cblock.c:718 +msgid "Block must have a name!" +msgstr "" + +#: ../bin/cblock.c:502 ../bin/cblock.c:522 ../bin/cblock.c:530 +#: ../bin/cblock.c:589 ../bin/cblock.c:706 ../bin/cblock.c:718 +#: ../bin/cblock.c:755 ../bin/ccontrol.c:445 ../bin/cdraw.c:103 +#: ../bin/cdraw.c:909 ../bin/cgroup.c:982 ../bin/cgroup.c:1035 +#: ../bin/cgroup.c:1050 ../bin/cgroup.c:1089 ../bin/cgroup.c:1115 +#: ../bin/cgroup.c:1174 ../bin/cgroup.c:1618 ../bin/cnote.c:100 +#: ../bin/cprint.c:490 ../bin/cprint.c:916 ../bin/cpull.c:497 +#: ../bin/cpull.c:512 ../bin/cpull.c:514 ../bin/cpull.c:516 +#: ../bin/cselect.c:677 ../bin/cselect.c:774 ../bin/cselect.c:1299 +#: ../bin/csensor.c:411 ../bin/csignal.c:641 ../bin/csignal.c:709 +#: ../bin/csnap.c:584 ../bin/csnap.c:717 ../bin/cstruct.c:769 +#: ../bin/cstruct.c:778 ../bin/cstruct.c:880 ../bin/cswitchmotor.c:462 +#: ../bin/cswitchmotor.c:491 ../bin/cswitchmotor.c:625 +#: ../bin/cswitchmotor.c:656 ../bin/ctext.c:179 ../bin/ctodesgn.c:158 +#: ../bin/ctodesgn.c:1048 ../bin/ctodesgn.c:1098 ../bin/ctodesgn.c:1211 +#: ../bin/ctodesgn.c:1513 ../bin/cturnout.c:2410 ../bin/cturnout.c:2537 +#: ../bin/cundo.c:161 ../bin/cundo.c:166 ../bin/dbitmap.c:68 +#: ../bin/dbitmap.c:125 ../bin/dbitmap.c:203 ../bin/dbitmap.c:238 +#: ../bin/dcar.c:3536 ../bin/dcar.c:3720 ../bin/dcar.c:3724 ../bin/dcar.c:3728 +#: ../bin/dcar.c:3733 ../bin/dcar.c:4047 ../bin/dcar.c:4158 ../bin/dcar.c:4538 +#: ../bin/dcmpnd.c:393 ../bin/dcmpnd.c:404 ../bin/dcmpnd.c:536 +#: ../bin/dcustmgm.c:194 ../bin/dcustmgm.c:200 ../bin/dcustmgm.c:209 +#: ../bin/dcustmgm.c:225 ../bin/dease.c:230 ../bin/dlayer.c:206 +#: ../bin/dlayer.c:228 ../bin/dlayer.c:798 ../bin/dlayer.c:804 +#: ../bin/doption.c:164 ../bin/doption.c:244 ../bin/doption.c:398 +#: ../bin/doption.c:410 ../bin/doption.c:476 ../bin/dprmfile.c:91 +#: ../bin/dprmfile.c:105 ../bin/dprmfile.c:119 ../bin/dprmfile.c:165 +#: ../bin/dprmfile.c:533 ../bin/draw.c:2278 ../bin/fileio.c:610 +#: ../bin/fileio.c:678 ../bin/fileio.c:793 ../bin/fileio.c:795 +#: ../bin/fileio.c:800 ../bin/fileio.c:964 ../bin/layout.c:312 +#: ../bin/macro.c:939 ../bin/macro.c:943 ../bin/macro.c:1020 +#: ../bin/macro.c:1126 ../bin/macro.c:1354 ../bin/macro.c:1370 +#: ../bin/misc.c:312 ../bin/misc.c:362 ../bin/misc.c:1634 ../bin/misc.c:1764 +#: ../bin/misc.c:1828 ../bin/misc.c:2404 ../bin/misc.c:2414 ../bin/misc.c:2434 +#: ../bin/misc.c:2437 ../bin/misc2.c:457 ../bin/param.c:1710 +#: ../bin/param.c:1828 ../bin/param.c:1831 ../bin/param.c:1954 +#: ../bin/param.c:1960 ../bin/smalldlg.c:89 ../bin/smalldlg.c:220 +#: ../bin/tease.c:1044 ../bin/track.c:1374 ../wlib/gtklib/wpref.c:122 +#: ../../../../build/work/app/bin/bllnhlp.c:541 msgid "Ok" msgstr "Ok" -#: ../bin/cblock.c:471 +#: ../bin/cblock.c:530 msgid "Block is discontigious!" msgstr "Bloco não contínuo!" -#: ../bin/cblock.c:476 -#: ../bin/cblock.c:527 -#: ../bin/cblock.c:644 -msgid "Create Block" +#: ../bin/cblock.c:535 +#, fuzzy +msgid "Create block" msgstr "Criar Bloco" -#: ../bin/cblock.c:509 +#: ../bin/cblock.c:571 msgid "Non track object skipped!" msgstr "Objeto não trilho Ignorado!" -#: ../bin/cblock.c:513 -msgid "Selected Track is already in a block, skipped!" +#: ../bin/cblock.c:575 +#, fuzzy +msgid "Selected track is already in a block, skipped!" msgstr "Trilho selecionado já está pertence a um bloco, descartado!" -#: ../bin/cblock.c:556 -#: ../bin/cblock.c:588 +#: ../bin/cblock.c:589 +msgid "Create Block" +msgstr "Criar Bloco" + +#: ../bin/cblock.c:619 ../bin/cblock.c:651 msgid "Select a track" msgstr "Selecionar um trilho" -#: ../bin/cblock.c:565 -#: ../bin/cblock.c:596 +#: ../bin/cblock.c:628 ../bin/cblock.c:659 msgid "Not a block!" msgstr "Isto não é um bloco!" -#: ../bin/cblock.c:601 +#: ../bin/cblock.c:664 #, c-format msgid "Really delete block %s?" msgstr "Deseja realmente eliminar bloco %s?" -#: ../bin/cblock.c:601 -#: ../bin/cdraw.c:79 -#: ../bin/cgroup.c:968 -#: ../bin/cswitchmotor.c:472 -#: ../bin/ctodesgn.c:1513 -#: ../bin/ctodesgn.c:1992 -#: ../bin/ctrain.c:2043 -#: ../bin/dbitmap.c:205 -#: ../bin/dcar.c:3664 -#: ../bin/dcar.c:3742 -#: ../bin/dcar.c:3826 -#: ../bin/dcar.c:3845 -#: ../bin/dcar.c:4175 -#: ../bin/dcar.c:4590 -#: ../bin/dcustmgm.c:136 -#: ../bin/misc.c:1026 -#: ../bin/misc.c:1031 -#: ../bin/misc.c:1096 -#: ../bin/track.c:1278 -#: ../bin/track.c:1375 -#: ../bin/track.c:1389 -#: ../wlib/gtklib/CVS/Base/gtkfilsel.c:130 -#: ../wlib/gtklib/gtkfilsel.c:130 +#: ../bin/cblock.c:664 ../bin/cdraw.c:107 ../bin/cgroup.c:988 +#: ../bin/csignal.c:687 ../bin/cswitchmotor.c:581 ../bin/ctodesgn.c:1521 +#: ../bin/ctodesgn.c:2000 ../bin/ctrain.c:2425 ../bin/dbitmap.c:208 +#: ../bin/dcar.c:3672 ../bin/dcar.c:3750 ../bin/dcar.c:3834 ../bin/dcar.c:3853 +#: ../bin/dcar.c:4183 ../bin/dcar.c:4600 ../bin/dcontmgm.c:173 +#: ../bin/dcustmgm.c:141 ../bin/misc.c:1043 ../bin/misc.c:1048 +#: ../bin/misc.c:1113 ../bin/track.c:1376 ../bin/track.c:1473 +#: ../bin/track.c:1487 msgid "Yes" msgstr "Sim" -#: ../bin/cblock.c:601 -#: ../bin/cdraw.c:79 -#: ../bin/cgroup.c:968 -#: ../bin/cswitchmotor.c:472 -#: ../bin/ctodesgn.c:1513 -#: ../bin/ctodesgn.c:1992 -#: ../bin/ctrain.c:2043 -#: ../bin/dcar.c:3664 -#: ../bin/dcar.c:3742 -#: ../bin/dcar.c:3826 -#: ../bin/dcar.c:3845 -#: ../bin/dcar.c:4175 -#: ../bin/dcar.c:4590 -#: ../bin/dcustmgm.c:136 -#: ../bin/misc.c:1026 -#: ../bin/misc.c:1031 -#: ../bin/misc.c:1096 -#: ../bin/track.c:1278 -#: ../bin/track.c:1375 -#: ../bin/track.c:1389 -#: ../wlib/gtklib/CVS/Base/gtkfilsel.c:130 -#: ../wlib/gtklib/gtkfilsel.c:130 +#: ../bin/cblock.c:664 ../bin/cdraw.c:107 ../bin/cgroup.c:988 +#: ../bin/csignal.c:687 ../bin/cswitchmotor.c:581 ../bin/ctodesgn.c:1521 +#: ../bin/ctodesgn.c:2000 ../bin/ctrain.c:2425 ../bin/dcar.c:3672 +#: ../bin/dcar.c:3750 ../bin/dcar.c:3834 ../bin/dcar.c:3853 ../bin/dcar.c:4183 +#: ../bin/dcar.c:4600 ../bin/dcontmgm.c:173 ../bin/dcustmgm.c:141 +#: ../bin/misc.c:1043 ../bin/misc.c:1048 ../bin/misc.c:1113 +#: ../bin/track.c:1376 ../bin/track.c:1473 ../bin/track.c:1487 msgid "No" msgstr "Não" -#: ../bin/cblock.c:602 -#: ../bin/cblock.c:646 +#: ../bin/cblock.c:665 msgid "Delete Block" msgstr "Eliminar bloco" -#: ../bin/cblock.c:643 -msgid "Blocks" -msgstr "Blocos" +#: ../bin/cblock.c:706 +#, fuzzy, c-format +msgid "Deleting block %s" +msgstr "Eliminar bloco" + +#: ../bin/cblock.c:722 +#, fuzzy +msgid "Modify Block" +msgstr "Modificar trecho" + +#: ../bin/cblock.c:754 +#, fuzzy +msgid "Edit block" +msgstr "Editar bloco" -#: ../bin/cblock.c:645 -msgid "Edit Block" +#: ../bin/cblock.c:760 +#, fuzzy, c-format +msgid "Edit block %d" msgstr "Editar bloco" -#: ../bin/ccurve.c:102 +#: ../bin/ccontrol.c:168 ../bin/cnote.c:162 ../bin/csensor.c:160 +#: ../bin/csignal.c:235 ../bin/ctrain.c:182 +msgid "Position" +msgstr "Posição" + +#: ../bin/ccontrol.c:169 ../bin/ccontrol.c:390 +#, fuzzy +msgid "On Script" +msgstr "Script" + +#: ../bin/ccontrol.c:170 ../bin/ccontrol.c:392 +#, fuzzy +msgid "Off Script" +msgstr "Script" + +#: ../bin/ccontrol.c:213 +#, fuzzy +msgid "Change Control" +msgstr "Controle de trem" + +#: ../bin/ccontrol.c:255 ../bin/csensor.c:233 +#, fuzzy, c-format +msgid "(%d [%s]): Layer=%d, at %0.3f,%0.3f" +msgstr "(%d): Camada=%d %s" + +#: ../bin/ccontrol.c:268 ../bin/ccontrol.c:594 +#, fuzzy +msgid "Control" +msgstr "Controle de trem" + +#: ../bin/ccontrol.c:386 ../bin/csensor.c:358 ../bin/csignal.c:486 +#, fuzzy +msgid "Orgin X" +msgstr "Margem" + +#: ../bin/ccontrol.c:388 ../bin/csensor.c:360 ../bin/csignal.c:488 +#, fuzzy +msgid "Origin Y" +msgstr "Origem: X" + +#: ../bin/ccontrol.c:404 +#, fuzzy +msgid "Create Control" +msgstr "Controle de trem" + +#: ../bin/ccontrol.c:407 +#, fuzzy +msgid "Modify Control" +msgstr "Controle de trem" + +#: ../bin/ccontrol.c:444 +#, fuzzy +msgid "Edit control" +msgstr "Controle de trem" + +#: ../bin/ccontrol.c:484 +#, fuzzy +msgid "Place control" +msgstr "Posicionar a circunferência" + +#: ../bin/ccornu.c:480 +msgid "Not close enough to end point, reselect" +msgstr "" + +#: ../bin/ccornu.c:498 +msgid "" +"Pick any circle to adjust it by dragging - Enter to accept, Esc to cancel" +msgstr "" + +#: ../bin/ccornu.c:509 +msgid "Track can't be split" +msgstr "" + +#: ../bin/ccornu.c:522 +#, fuzzy +msgid "Too close to other end of selected Track" +msgstr "Eleva ou abaixa todos os trechos selecionados" + +#: ../bin/ccornu.c:629 +#, c-format +msgid "Must be on the %s Track" +msgstr "" + +#: ../bin/ccornu.c:643 +#, c-format +msgid "" +"Cornu : Min Radius=%s Max Rate of Radius Change=%s Length=%s Winding Arc=%s" +msgstr "" + +#: ../bin/ccornu.c:661 +msgid "Pick on point to adjust it along track - Enter to confirm, ESC to abort" +msgstr "" + +#: ../bin/ccornu.c:671 +msgid "Cornu has too complex shape - adjust end pts" +msgstr "" + +#: ../bin/ccornu.c:675 +#, fuzzy +msgid "Create Cornu" +msgstr "Criar Bloco" + +#: ../bin/ccornu.c:679 ../bin/ccornu.c:831 ../bin/tcornu.c:722 +#: ../bin/tcornu.c:919 ../bin/tcornu.c:1174 +#, c-format +msgid "" +"Cornu Create Failed for p1[%0.3f,%0.3f] p2[%0.3f,%0.3f], c1[%0.3f,%0.3f] c2" +"[%0.3f,%0.3f], a1=%0.3f a2=%0.3f, r1=%s r2=%s" +msgstr "" + +#: ../bin/ccornu.c:776 +msgid "Track picked - now select a Point" +msgstr "" + +#: ../bin/ccornu.c:806 +#, fuzzy +msgid "Modify Cornu" +msgstr "Modificar trecho" + +#: ../bin/ccornu.c:822 +#, c-format +msgid "Cornu Extension Create Failed for end %d" +msgstr "" + +#: ../bin/ccornu.c:866 +msgid "Modify Cornu Cancelled" +msgstr "" + +#: ../bin/ccornu.c:984 +#, fuzzy +msgid "Place 1st end point of Cornu track on unconnected end-point" +msgstr "Posicionar 1ª extremidade do trecho reto" + +#: ../bin/ccornu.c:997 +msgid "No Unconnected end point there" +msgstr "" + +#: ../bin/ccornu.c:1005 +msgid "Place 2nd end point of Cornu track on unconnected end-point" +msgstr "" + +#: ../bin/ccornu.c:1008 +msgid "No Unconnected Track End there" +msgstr "" + +#: ../bin/ccornu.c:1020 +#, fuzzy +msgid "Move 1st end point of Cornu track along track 1" +msgstr "Posicionar 1ª extremidade do trecho reto" + +#: ../bin/ccornu.c:1038 +#, fuzzy +msgid "Move 2nd end point of Cornu track along track 2" +msgstr "Posicionar 1ª extremidade do trecho reto" + +#: ../bin/ccornu.c:1056 +msgid "Can't Split - Locked to End Point" +msgstr "" + +#: ../bin/ccornu.c:1061 +#, fuzzy +msgid "Point not on track 1" +msgstr "Junta dois trilhos" + +#: ../bin/ccornu.c:1085 +msgid "Put other end of Cornu on an unconnected end point" +msgstr "" + +#: ../bin/ccurve.c:118 +#, fuzzy +msgid "" +"Drag from End-Point in direction of curve - Shift locks to track open end-" +"point" +msgstr "Arrastar a extremidade em direção de curva" + +#: ../bin/ccurve.c:120 msgid "Drag from End-Point in direction of curve" msgstr "Arrastar a extremidade em direção de curva" -#: ../bin/ccurve.c:105 -#: ../bin/ccurve.c:138 +#: ../bin/ccurve.c:124 +#, fuzzy +msgid "Drag from End-Point to Center - Shift locks to track open end-point" +msgstr "Arrastar a extremidade ao centro" + +#: ../bin/ccurve.c:126 ../bin/ccurve.c:187 msgid "Drag from End-Point to Center" msgstr "Arrastar a extremidade ao centro" -#: ../bin/ccurve.c:108 -#: ../bin/ccurve.c:138 +#: ../bin/ccurve.c:129 ../bin/ccurve.c:187 msgid "Drag from Center to End-Point" msgstr "Arrastar do centro à extremidade" -#: ../bin/ccurve.c:111 -#: ../bin/ccurve.c:144 +#: ../bin/ccurve.c:132 +#, fuzzy +msgid "Drag from one to other end of chord" +msgstr "Arrastar à outra extremidade da corda" + +#: ../bin/ccurve.c:155 +msgid "" +"No unconnected end-point on Track - Try again or release Shift and click" +msgstr "" + +#: ../bin/ccurve.c:160 +msgid "Not on a Track - Try again or release Shift and click" +msgstr "" + +#: ../bin/ccurve.c:174 +msgid "End Locked: Drag out curve start" +msgstr "" + +#: ../bin/ccurve.c:175 +#, fuzzy +msgid "Drag along curve start" +msgstr "Arrastar para criar ramo" + +#: ../bin/ccurve.c:185 +msgid "End Locked: Drag out to center" +msgstr "" + +#: ../bin/ccurve.c:193 msgid "Drag to other end of chord" msgstr "Arrastar à outra extremidade da corda" -#: ../bin/ccurve.c:128 -#: ../bin/chndldto.c:91 -msgid "Drag to set angle" -msgstr "Arrastar para selecionar o ângulo" +#: ../bin/ccurve.c:221 +#, c-format +msgid "Start Locked: Drag out curve start - Angle=%0.3f" +msgstr "" -#: ../bin/ccurve.c:156 +#: ../bin/ccurve.c:222 #, c-format -msgid "Angle=%0.3f" -msgstr "Ângulo=%0.3f" +msgid "Drag out curve start - Angle=%0.3f" +msgstr "" -#: ../bin/ccurve.c:160 -#: ../bin/ccurve.c:166 +#: ../bin/ccurve.c:226 +#, fuzzy, c-format +msgid "Tangent Locked: Drag out center - Radius=%s Angle=%0.3f" +msgstr "Trecho tangente: Comprimento %s Ângulo %0.3f" + +#: ../bin/ccurve.c:227 +#, fuzzy, c-format +msgid "Drag out center - Radius=%s Angle=%0.3f" +msgstr "Raio=%s Ângulo=%0.3f" + +#: ../bin/ccurve.c:233 #, c-format msgid "Radius=%s Angle=%0.3f" msgstr "Raio=%s Ângulo=%0.3f" -#: ../bin/ccurve.c:172 +#: ../bin/ccurve.c:239 #, c-format msgid "Length=%s Angle=%0.3f" msgstr "Comprimento=%s Ângulo=%0.3f" -#: ../bin/ccurve.c:202 -#: ../bin/ccurve.c:303 -#: ../bin/drawgeom.c:365 +#: ../bin/ccurve.c:289 ../bin/ccurve.c:397 ../bin/drawgeom.c:440 msgid "Drag on Red arrows to adjust curve" msgstr "Arrastar as setas vermelhas para ajustar a curva" -#: ../bin/ccurve.c:259 -#: ../bin/cjoin.c:208 -#: ../bin/cmodify.c:251 -#: ../bin/cturntbl.c:559 +#: ../bin/ccurve.c:352 ../bin/cjoin.c:216 ../bin/cmodify.c:365 +#: ../bin/cturntbl.c:569 #, c-format msgid "Straight Track: Length=%s Angle=%0.3f" msgstr "Trecho reto: Comprimento=%s Ângulo=%0.3f" -#: ../bin/ccurve.c:264 -#: ../bin/cmodify.c:256 -#: ../bin/drawgeom.c:288 +#: ../bin/ccurve.c:357 ../bin/cmodify.c:370 ../bin/drawgeom.c:324 +#: ../wlib/gtklib/ixhelp.c:235 msgid "Back" msgstr "Voltar" -#: ../bin/ccurve.c:282 +#: ../bin/ccurve.c:375 #, c-format msgid "Curved Track: Radius=%s Angle=%0.3f Length=%s" msgstr "Trecho curvo: Raio=%s Ângulo=%0.3f Comprimento=%s" -#: ../bin/ccurve.c:314 -#: ../bin/cstraigh.c:83 +#: ../bin/ccurve.c:408 ../bin/cstraigh.c:133 msgid "Create Straight Track" msgstr "Criar trecho reto" -#: ../bin/ccurve.c:322 +#: ../bin/ccurve.c:420 msgid "Create Curved Track" msgstr "Criar trecho curvo" -#: ../bin/ccurve.c:388 +#: ../bin/ccurve.c:491 msgid "Elevation Difference" msgstr "Diferença de elevação" -#: ../bin/ccurve.c:389 -#: ../bin/cdraw.c:187 -#: ../bin/ctodesgn.c:459 -#: ../bin/tcurve.c:345 +#: ../bin/ccurve.c:492 ../bin/cdraw.c:218 ../bin/ctodesgn.c:467 +#: ../bin/tcurve.c:353 msgid "Radius" msgstr "Raio" -#: ../bin/ccurve.c:390 -#: ../bin/tcurve.c:346 +#: ../bin/ccurve.c:493 ../bin/tcurve.c:354 msgid "Turns" msgstr "Desvios" -#: ../bin/ccurve.c:391 +#: ../bin/ccurve.c:494 msgid "Angular Separation" msgstr "Separação angular" -#: ../bin/ccurve.c:392 -#: ../bin/celev.c:45 -#: ../bin/compound.c:516 -#: ../bin/tcurve.c:352 -#: ../bin/tease.c:507 -#: ../bin/tstraigh.c:82 +#: ../bin/ccurve.c:495 ../bin/celev.c:45 ../bin/compound.c:521 +#: ../bin/tbezier.c:241 ../bin/tcornu.c:291 ../bin/tcurve.c:360 +#: ../bin/tease.c:513 ../bin/tstraigh.c:91 msgid "Grade" msgstr "Gradiente" -#: ../bin/ccurve.c:393 +#: ../bin/ccurve.c:496 msgid "Vertical Separation" msgstr "Separação vertical" -#: ../bin/ccurve.c:395 +#: ../bin/ccurve.c:498 msgid "Total Length" msgstr "Comprimento total" -#: ../bin/ccurve.c:471 +#: ../bin/ccurve.c:574 #, c-format msgid "Total Length %s" msgstr "Comprimento total %s" -#: ../bin/ccurve.c:510 -#: ../bin/ccurve.c:731 -#: ../bin/tcurve.c:771 +#: ../bin/ccurve.c:613 ../bin/ccurve.c:802 ../bin/tcurve.c:783 msgid "Helix" msgstr "Hélice" -#: ../bin/ccurve.c:524 +#: ../bin/ccurve.c:627 msgid "Circle Radius" msgstr "Raio da circunferência" -#: ../bin/ccurve.c:529 +#: ../bin/ccurve.c:632 msgid "Click on Circle Edge" msgstr "Clicar no limite da circunferência" -#: ../bin/ccurve.c:533 +#: ../bin/ccurve.c:636 msgid "Click on Circle Center" msgstr "Clicar no centro da circunferência" -#: ../bin/ccurve.c:564 +#: ../bin/ccurve.c:667 msgid "Drag to Center" msgstr "Arrastar ao centro" -#: ../bin/ccurve.c:568 +#: ../bin/ccurve.c:671 msgid "Drag to Edge" msgstr "Arrastar à borda" -#: ../bin/ccurve.c:589 -#: ../bin/ccurve.c:593 +#: ../bin/ccurve.c:692 ../bin/ccurve.c:696 #, c-format msgid "Radius=%s" msgstr "Raio=%s" -#: ../bin/ccurve.c:608 +#: ../bin/ccurve.c:711 msgid "Create Helix Track" msgstr "Criar trecho em hélice" -#: ../bin/ccurve.c:615 +#: ../bin/ccurve.c:718 msgid "Create Circle Track" msgstr "Criar trecho de circunferência" -#: ../bin/ccurve.c:671 -msgid "Place circle center" -msgstr "Posicionar o centro da circunferência" - -#: ../bin/ccurve.c:676 -#: ../bin/drawgeom.c:202 -msgid "Drag to set radius" -msgstr "Arrastar para definir o raio" - -#: ../bin/ccurve.c:686 -msgid "Place circle" -msgstr "Posicionar a circunferência" - -#: ../bin/ccurve.c:711 +#: ../bin/ccurve.c:773 msgid "Curve Track" msgstr "Trecho curvo" -#: ../bin/ccurve.c:711 +#: ../bin/ccurve.c:773 msgid "Curve Tracks" msgstr "Trechos curvos" -#: ../bin/ccurve.c:712 +#: ../bin/ccurve.c:774 msgid "Curve from End-Pt" msgstr "Curva a partir de extremidade" -#: ../bin/ccurve.c:713 +#: ../bin/ccurve.c:775 msgid "Curve from Tangent" msgstr "Curva a partir de uma tangente" -#: ../bin/ccurve.c:714 +#: ../bin/ccurve.c:776 msgid "Curve from Center" msgstr "Curva a partir de um centro" -#: ../bin/ccurve.c:715 +#: ../bin/ccurve.c:777 msgid "Curve from Chord" msgstr "Curva a partir de uma corda" -#: ../bin/ccurve.c:718 -#: ../bin/tcurve.c:611 +#: ../bin/ccurve.c:778 ../bin/cdraw.c:1091 +#, fuzzy +msgid "Bezier Curve" +msgstr "Fundir curvas" + +#: ../bin/ccurve.c:781 ../bin/tcurve.c:623 msgid "Circle Track" msgstr "Trecho de circunferência" -#: ../bin/ccurve.c:718 +#: ../bin/ccurve.c:781 msgid "Circle Tracks" msgstr "Trechos de circunferências" -#: ../bin/ccurve.c:719 +#: ../bin/ccurve.c:782 msgid "Fixed Radius Circle" msgstr "Circunferência com raio fixo" -#: ../bin/ccurve.c:720 +#: ../bin/ccurve.c:783 msgid "Circle from Tangent" msgstr "Circunferência a partir de uma tangente" -#: ../bin/ccurve.c:721 +#: ../bin/ccurve.c:784 msgid "Circle from Center" msgstr "Circunferência a partir de um centro" -#: ../bin/cdraw.c:75 +#: ../bin/cdraw.c:103 msgid "Font Size must be > 0" msgstr "Tamanho da fonte deve ser maior que 0" -#: ../bin/cdraw.c:186 -#: ../bin/tcurve.c:344 +#: ../bin/cdraw.c:217 ../bin/tcurve.c:352 msgid "Center: X" msgstr "Centro: X" -#: ../bin/cdraw.c:189 -#: ../bin/cdraw.c:199 -#: ../bin/compound.c:518 -#: ../bin/cprint.c:134 -#: ../bin/ctodesgn.c:136 -#: ../bin/ctodesgn.c:138 -#: ../bin/ctodesgn.c:181 -#: ../bin/ctodesgn.c:204 -#: ../bin/ctodesgn.c:206 -#: ../bin/ctodesgn.c:242 -#: ../bin/ctodesgn.c:245 -#: ../bin/ctodesgn.c:279 -#: ../bin/ctodesgn.c:283 -#: ../bin/ctodesgn.c:320 -#: ../bin/ctodesgn.c:340 -#: ../bin/ctodesgn.c:361 -#: ../bin/ctodesgn.c:460 -#: ../bin/ctrain.c:172 -#: ../bin/tease.c:502 -#: ../bin/tstraigh.c:81 +#: ../bin/cdraw.c:220 ../bin/cdraw.c:230 ../bin/compound.c:523 +#: ../bin/cprint.c:143 ../bin/csignal.c:236 ../bin/csignal.c:490 +#: ../bin/ctodesgn.c:144 ../bin/ctodesgn.c:146 ../bin/ctodesgn.c:189 +#: ../bin/ctodesgn.c:212 ../bin/ctodesgn.c:214 ../bin/ctodesgn.c:250 +#: ../bin/ctodesgn.c:253 ../bin/ctodesgn.c:287 ../bin/ctodesgn.c:291 +#: ../bin/ctodesgn.c:328 ../bin/ctodesgn.c:348 ../bin/ctodesgn.c:369 +#: ../bin/ctodesgn.c:468 ../bin/ctrain.c:183 ../bin/tease.c:508 +#: ../bin/tstraigh.c:90 msgid "Angle" msgstr "Ângulo" -#: ../bin/cdraw.c:190 -#: ../bin/tcurve.c:350 +#: ../bin/cdraw.c:221 ../bin/tcurve.c:358 msgid "CCW Angle" msgstr "Ângulo anti-horário" -#: ../bin/cdraw.c:191 -#: ../bin/tcurve.c:351 +#: ../bin/cdraw.c:222 ../bin/tcurve.c:359 msgid "CW Angle" msgstr "Ângulo horário" -#: ../bin/cdraw.c:192 +#: ../bin/cdraw.c:223 msgid "Point Count" msgstr "Ponto de contagem" -#: ../bin/cdraw.c:193 -#: ../bin/cdraw.c:803 -#: ../bin/ctodesgn.c:148 +#: ../bin/cdraw.c:224 ../bin/cdraw.c:847 ../bin/ctodesgn.c:156 +#: ../bin/tbezier.c:243 msgid "Line Width" msgstr "Largura da linha" -#: ../bin/cdraw.c:194 -#: ../bin/cdraw.c:805 -#: ../bin/cdraw.c:807 -#: ../bin/cdraw.c:882 -#: ../bin/cdraw.c:906 -#: ../bin/ctodesgn.c:149 -#: ../bin/dcar.c:1968 -#: ../bin/dlayer.c:320 -#: ../bin/doption.c:556 +#: ../bin/cdraw.c:225 ../bin/cdraw.c:849 ../bin/cdraw.c:851 ../bin/cdraw.c:930 +#: ../bin/cdraw.c:955 ../bin/cmisc.c:97 ../bin/ctext.c:62 ../bin/ctext.c:146 +#: ../bin/ctodesgn.c:157 ../bin/dcar.c:1976 ../bin/dlayer.c:447 +#: ../bin/doption.c:476 msgid "Color" msgstr "Cor" -#: ../bin/cdraw.c:195 -#: ../bin/cdraw.c:417 -#: ../bin/cdraw.c:823 +#: ../bin/cdraw.c:226 ../bin/cdraw.c:456 ../bin/cdraw.c:867 msgid "Lumber" msgstr "Madeira" -#: ../bin/cdraw.c:196 +#: ../bin/cdraw.c:227 msgid "Orientation" msgstr "Orientação" -#: ../bin/cdraw.c:197 -#: ../bin/cdraw.c:817 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:516 +#: ../bin/cdraw.c:228 ../bin/cdraw.c:861 +#: ../../../../build/work/app/bin/bllnhlp.c:543 msgid "Size" msgstr "Tamanho" -#: ../bin/cdraw.c:198 -#: ../bin/compound.c:517 -#: ../bin/cprint.c:131 -#: ../bin/cturntbl.c:239 -#: ../bin/tease.c:501 +#: ../bin/cdraw.c:229 ../bin/compound.c:522 ../bin/cprint.c:140 +#: ../bin/cturntbl.c:245 ../bin/tease.c:507 msgid "Origin: X" msgstr "Origem: X" -#: ../bin/cdraw.c:200 -#: ../bin/ctext.c:56 -#: ../bin/ctext.c:121 +#: ../bin/cdraw.c:231 ../bin/ctext.c:60 ../bin/ctext.c:145 msgid "Font Size" msgstr "Tamanha da fonte" -#: ../bin/cdraw.c:201 -#: ../bin/cdraw.c:483 -#: ../bin/ctext.c:236 +#: ../bin/cdraw.c:232 ../bin/cdraw.c:519 ../bin/ctext.c:264 msgid "Text" msgstr "Texto" -#: ../bin/cdraw.c:202 -#: ../bin/cmisc.c:115 -#: ../bin/tcurve.c:353 -#: ../bin/tease.c:508 -#: ../bin/tstraigh.c:83 +#: ../bin/cdraw.c:233 ../bin/cmisc.c:114 ../bin/tcurve.c:361 +#: ../bin/tease.c:514 ../bin/tstraigh.c:92 msgid "Pivot" msgstr "Pivô" -#: ../bin/cdraw.c:203 -#: ../bin/cnote.c:149 -#: ../bin/compound.c:524 -#: ../bin/cturntbl.c:242 -#: ../bin/tcurve.c:354 -#: ../bin/tease.c:509 -#: ../bin/tstraigh.c:84 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:594 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:595 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:596 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:597 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:598 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:599 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:600 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:601 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:602 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:603 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:604 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:605 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:606 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:607 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:608 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:609 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:610 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:611 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:612 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:613 +#: ../bin/cdraw.c:234 ../bin/cnote.c:163 ../bin/compound.c:529 +#: ../bin/cturntbl.c:248 ../bin/tbezier.c:242 ../bin/tcornu.c:292 +#: ../bin/tcurve.c:362 ../bin/tease.c:515 ../bin/tstraigh.c:93 +#: ../../../../build/work/app/bin/bllnhlp.c:621 +#: ../../../../build/work/app/bin/bllnhlp.c:622 +#: ../../../../build/work/app/bin/bllnhlp.c:623 +#: ../../../../build/work/app/bin/bllnhlp.c:624 +#: ../../../../build/work/app/bin/bllnhlp.c:625 +#: ../../../../build/work/app/bin/bllnhlp.c:626 +#: ../../../../build/work/app/bin/bllnhlp.c:627 +#: ../../../../build/work/app/bin/bllnhlp.c:628 +#: ../../../../build/work/app/bin/bllnhlp.c:629 +#: ../../../../build/work/app/bin/bllnhlp.c:630 +#: ../../../../build/work/app/bin/bllnhlp.c:631 +#: ../../../../build/work/app/bin/bllnhlp.c:632 +#: ../../../../build/work/app/bin/bllnhlp.c:633 +#: ../../../../build/work/app/bin/bllnhlp.c:634 +#: ../../../../build/work/app/bin/bllnhlp.c:635 +#: ../../../../build/work/app/bin/bllnhlp.c:636 +#: ../../../../build/work/app/bin/bllnhlp.c:637 +#: ../../../../build/work/app/bin/bllnhlp.c:638 +#: ../../../../build/work/app/bin/bllnhlp.c:639 +#: ../../../../build/work/app/bin/bllnhlp.c:640 msgid "Layer" msgstr "Camada" -#: ../bin/cdraw.c:407 +#: ../bin/cdraw.c:446 msgid "Straight Line" msgstr "Linha reta" -#: ../bin/cdraw.c:410 -#: ../bin/cdraw.c:1028 +#: ../bin/cdraw.c:449 ../bin/cdraw.c:1083 msgid "Dimension Line" msgstr "Linha dimensional" -#: ../bin/cdraw.c:425 -#: ../bin/cdraw.c:824 -#: ../bin/cdraw.c:1030 +#: ../bin/cdraw.c:464 ../bin/cdraw.c:868 ../bin/cdraw.c:1085 msgid "Table Edge" msgstr "Limite do tablado" -#: ../bin/cdraw.c:437 -#: ../bin/cdraw.c:829 -#: ../bin/cdraw.c:830 -#: ../bin/cdraw.c:831 +#: ../bin/cdraw.c:476 ../bin/cdraw.c:873 ../bin/cdraw.c:874 ../bin/cdraw.c:875 msgid "Circle" msgstr "Circunferência" -#: ../bin/cdraw.c:445 +#: ../bin/cdraw.c:484 msgid "Curved Line" msgstr "Linha curva" -#: ../bin/cdraw.c:454 -#: ../bin/cdraw.c:834 -#: ../bin/cdraw.c:835 -#: ../bin/cdraw.c:836 +#: ../bin/cdraw.c:493 ../bin/cdraw.c:878 ../bin/cdraw.c:879 ../bin/cdraw.c:880 msgid "Filled Circle" msgstr "Círculo" -#: ../bin/cdraw.c:459 -#: ../bin/cdraw.c:1046 +#: ../bin/cdraw.c:498 ../bin/cdraw.c:1102 msgid "Poly Line" msgstr "Linha poligonal" -#: ../bin/cdraw.c:465 -#: ../bin/cdraw.c:838 -#: ../bin/cdraw.c:1047 +#: ../bin/cdraw.c:504 ../bin/cdraw.c:882 ../bin/cdraw.c:1103 msgid "Polygon" msgstr "Polígono" -#: ../bin/cdraw.c:489 +#: ../bin/cdraw.c:525 #, c-format msgid "%s: Layer=%d" msgstr "%s: Camada=%d" -#: ../bin/cdraw.c:500 -#: ../bin/cdraw.c:926 +#: ../bin/cdraw.c:536 ../bin/cdraw.c:972 msgid "Tiny" msgstr "Minúsculo" -#: ../bin/cdraw.c:501 -#: ../bin/cdraw.c:927 +#: ../bin/cdraw.c:537 ../bin/cdraw.c:973 msgid "Small" msgstr "Pequeno" -#: ../bin/cdraw.c:502 -#: ../bin/cdraw.c:928 +#: ../bin/cdraw.c:538 ../bin/cdraw.c:974 msgid "Medium" msgstr "Médio" -#: ../bin/cdraw.c:503 -#: ../bin/cdraw.c:929 +#: ../bin/cdraw.c:539 ../bin/cdraw.c:975 msgid "Large" msgstr "Grande" -#: ../bin/cdraw.c:770 -#: ../bin/drawgeom.c:71 -#: ../bin/drawgeom.c:86 -msgid "Create Lines" -msgstr "Criar linhas" - -#: ../bin/cdraw.c:809 -#: ../bin/cdraw.c:904 +#: ../bin/cdraw.c:853 ../bin/cdraw.c:953 msgid "Lumber Type" msgstr "Tipo de madeira" -#: ../bin/cdraw.c:821 +#: ../bin/cdraw.c:865 msgid "Straight" msgstr "Reto" -#: ../bin/cdraw.c:822 +#: ../bin/cdraw.c:866 msgid "Dimension" msgstr "Dimensão" -#: ../bin/cdraw.c:825 -#: ../bin/cdraw.c:826 -#: ../bin/cdraw.c:827 -#: ../bin/cdraw.c:828 +#: ../bin/cdraw.c:869 ../bin/cdraw.c:870 ../bin/cdraw.c:871 ../bin/cdraw.c:872 msgid "Curved" msgstr "Curvado" -#: ../bin/cdraw.c:832 -#: ../bin/cdraw.c:1044 +#: ../bin/cdraw.c:876 ../bin/cdraw.c:1100 msgid "Box" msgstr "Retângulo" -#: ../bin/cdraw.c:833 +#: ../bin/cdraw.c:877 msgid "Polyline" msgstr "Linha poligonal" -#: ../bin/cdraw.c:837 -#: ../bin/cdraw.c:1045 +#: ../bin/cdraw.c:881 ../bin/cdraw.c:1101 msgid "Filled Box" msgstr "Retângulo preenchido" -#: ../bin/cdraw.c:880 +#: ../bin/cdraw.c:883 ../bin/tbezier.c:401 +#, fuzzy +msgid "Bezier Line" +msgstr "Criar linhas" + +#: ../bin/cdraw.c:928 #, c-format msgid "%s Line Width" msgstr "Largura da linha do %s" -#: ../bin/cdraw.c:893 +#: ../bin/cdraw.c:942 #, c-format msgid "%s Color" msgstr "Cor %s" -#: ../bin/cdraw.c:924 +#: ../bin/cdraw.c:970 msgid "Dimension Line Size" msgstr "Dimensão da largura da linha" -#: ../bin/cdraw.c:937 +#: ../bin/cdraw.c:983 msgid "Drag to create Table Edge" msgstr "Arrastar para criar limite do tablado" -#: ../bin/cdraw.c:1027 +#: ../bin/cdraw.c:1082 msgid "Line" msgstr "Linha" -#: ../bin/cdraw.c:1027 +#: ../bin/cdraw.c:1082 msgid "Draw Line" msgstr "Desenhar linha" -#: ../bin/cdraw.c:1028 +#: ../bin/cdraw.c:1083 msgid "Draw Dimension Line" msgstr "Desenhar dimensão da linha" -#: ../bin/cdraw.c:1029 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:53 +#: ../bin/cdraw.c:1084 ../../../../build/work/app/i18n/custmsg.h:53 msgid "Benchwork" msgstr "Bancada" -#: ../bin/cdraw.c:1029 +#: ../bin/cdraw.c:1084 msgid "Draw Benchwork" msgstr "Desenhar bancada" -#: ../bin/cdraw.c:1030 +#: ../bin/cdraw.c:1085 msgid "Draw Table Edge" msgstr "Desenhar borda do tablado" -#: ../bin/cdraw.c:1032 +#: ../bin/cdraw.c:1087 msgid "Curve End" msgstr "Curva extremidade" -#: ../bin/cdraw.c:1032 +#: ../bin/cdraw.c:1087 msgid "Draw Curve from End" msgstr "Desenhar curva a partir de uma extremidade" -#: ../bin/cdraw.c:1033 +#: ../bin/cdraw.c:1088 msgid "Curve Tangent" msgstr "Curva tangente" -#: ../bin/cdraw.c:1033 +#: ../bin/cdraw.c:1088 msgid "Draw Curve from Tangent" msgstr "Desenhar curva a partir de uma tangente" -#: ../bin/cdraw.c:1034 +#: ../bin/cdraw.c:1089 msgid "Curve Center" msgstr "Curva centro" -#: ../bin/cdraw.c:1034 +#: ../bin/cdraw.c:1089 msgid "Draw Curve from Center" msgstr "Desenhar curva a partir de um centro" -#: ../bin/cdraw.c:1035 +#: ../bin/cdraw.c:1090 msgid "Curve Chord" msgstr "Curva corda" -#: ../bin/cdraw.c:1035 +#: ../bin/cdraw.c:1090 msgid "Draw Curve from Chord" msgstr "Desenhar curva a partir de uma corda" -#: ../bin/cdraw.c:1038 +#: ../bin/cdraw.c:1091 +#, fuzzy +msgid "Draw Bezier" +msgstr "Desenhar linha" + +#: ../bin/cdraw.c:1094 msgid "Circle Tangent" msgstr "Circunferência tangente" -#: ../bin/cdraw.c:1038 +#: ../bin/cdraw.c:1094 msgid "Draw Circle from Tangent" msgstr "Desenhar circunferência a partir de uma tangente" -#: ../bin/cdraw.c:1039 +#: ../bin/cdraw.c:1095 msgid "Circle Center" msgstr "Circunferência centro" -#: ../bin/cdraw.c:1039 +#: ../bin/cdraw.c:1095 msgid "Draw Circle from Center" msgstr "Desenhar circunferência a partir de um centro" -#: ../bin/cdraw.c:1041 +#: ../bin/cdraw.c:1097 msgid "Circle Filled Tangent" msgstr "Círculo tangente" -#: ../bin/cdraw.c:1041 +#: ../bin/cdraw.c:1097 msgid "Draw Filled Circle from Tangent" msgstr "Desenhar círculo a partir de uma tangente" -#: ../bin/cdraw.c:1042 +#: ../bin/cdraw.c:1098 msgid "Circle Filled Center" msgstr "Círculo centro" -#: ../bin/cdraw.c:1042 +#: ../bin/cdraw.c:1098 msgid "Draw Filled Circle from Center" msgstr "Desenhar círculo a partir de um centro" -#: ../bin/cdraw.c:1044 +#: ../bin/cdraw.c:1100 msgid "Draw Box" msgstr "Desenhar retângulo" -#: ../bin/cdraw.c:1045 +#: ../bin/cdraw.c:1101 msgid "Draw Filled Box" msgstr "Desenhar retângulo cheio" -#: ../bin/cdraw.c:1046 +#: ../bin/cdraw.c:1102 msgid "Draw Polyline" msgstr "Desenhar linha poligonal" -#: ../bin/cdraw.c:1047 +#: ../bin/cdraw.c:1103 msgid "Draw Polygon" msgstr "Desenhar polígono" -#: ../bin/cdraw.c:1063 +#: ../bin/cdraw.c:1119 msgid "Straight Objects" msgstr "Objetos retos" -#: ../bin/cdraw.c:1063 +#: ../bin/cdraw.c:1119 msgid "Draw Straight Objects" msgstr "Desenhar objetos retos" -#: ../bin/cdraw.c:1064 +#: ../bin/cdraw.c:1120 msgid "Curved Lines" msgstr "Linhas curvas" -#: ../bin/cdraw.c:1064 +#: ../bin/cdraw.c:1120 msgid "Draw Curved Lines" msgstr "Desenhar linhas curvas" -#: ../bin/cdraw.c:1065 +#: ../bin/cdraw.c:1121 msgid "Circle Lines" msgstr "Circunferência" -#: ../bin/cdraw.c:1065 +#: ../bin/cdraw.c:1121 msgid "Draw Circles" msgstr "Desenhar circunferência" -#: ../bin/cdraw.c:1066 +#: ../bin/cdraw.c:1122 msgid "Shapes" msgstr "Formas" -#: ../bin/cdraw.c:1066 +#: ../bin/cdraw.c:1122 msgid "Draw Shapes" msgstr "Desenhas formas" -#: ../bin/cdraw.c:1144 -msgid "Draw" -msgstr "Desenhar" - -#: ../bin/celev.c:44 -#: ../bin/cprofile.c:1355 -#: ../bin/csplit.c:105 -#: ../bin/csplit.c:110 -#: ../bin/dease.c:63 -#: ../bin/doption.c:192 -#: ../bin/doption.c:193 +#: ../bin/celev.c:44 ../bin/cprofile.c:1383 ../bin/csplit.c:107 +#: ../bin/csplit.c:112 ../bin/dease.c:64 ../bin/doption.c:101 +#: ../bin/doption.c:103 msgid "None" msgstr "Nenhum" @@ -973,15 +1127,12 @@ msgstr "Calculado" msgid "Station" msgstr "Estação" -#: ../bin/celev.c:45 -#: ../bin/cprofile.c:1354 -#: ../bin/dcmpnd.c:70 -#: ../bin/misc.c:2390 +#: ../bin/celev.c:45 ../bin/cprofile.c:1382 ../bin/dcmpnd.c:74 +#: ../bin/misc.c:2352 msgid "Ignore" msgstr "Ignorar" -#: ../bin/celev.c:123 -#: ../bin/celev.c:168 +#: ../bin/celev.c:123 ../bin/celev.c:168 msgid "There are no reachable Defined Elevations" msgstr "Não existem inclinações definidas possíveis" @@ -989,283 +1140,233 @@ msgstr "Não existem inclinações definidas possíveis" msgid "Set Elevation" msgstr "Ajustar inclinação" -#: ../bin/celev.c:309 -#: ../bin/celev.c:326 +#: ../bin/celev.c:308 ../bin/celev.c:325 #, c-format msgid "Elev = %s" msgstr "Elev = %s" -#: ../bin/celev.c:311 -#: ../bin/celev.c:328 +#: ../bin/celev.c:310 ../bin/celev.c:327 #, c-format msgid "Dist = %s" msgstr "Dist = %s" -#: ../bin/celev.c:317 -#: ../bin/celev.c:334 -#: ../bin/celev.c:375 -#: ../bin/celev.c:382 -#: ../bin/celev.c:385 +#: ../bin/celev.c:316 ../bin/celev.c:333 ../bin/celev.c:374 ../bin/celev.c:381 +#: ../bin/celev.c:384 #, c-format msgid "Undefined" msgstr "Indefinido" -#: ../bin/celev.c:407 -#: ../bin/celev.c:473 +#: ../bin/celev.c:406 ../bin/celev.c:472 msgid "Elevation" msgstr "Elevação" -#: ../bin/celev.c:407 -#: ../bin/cmisc.c:310 -#: ../bin/cprofile.c:1255 -#: ../bin/dcustmgm.c:350 -#: ../bin/dlayer.c:849 -#: ../bin/dpricels.c:155 +#: ../bin/celev.c:406 ../bin/cmisc.c:401 ../bin/cprofile.c:1279 +#: ../bin/dcontmgm.c:300 ../bin/dcustmgm.c:358 ../bin/dlayer.c:1023 +#: ../bin/dpricels.c:154 msgid "Done" msgstr "Ok" -#: ../bin/celev.c:419 -msgid "Select End-Point" -msgstr "Selecionar extremidade" - -#: ../bin/celev.c:435 -#: ../bin/csplit.c:90 -#: ../bin/csplit.c:153 +#: ../bin/celev.c:434 ../bin/csplit.c:92 ../bin/csplit.c:155 msgid "Split Track" msgstr "Seccionar trecho" -#: ../bin/cgroup.c:576 +#: ../bin/cgroup.c:591 msgid "Ungroup Object" msgstr "Desagrupar objeto" -#: ../bin/cgroup.c:588 +#: ../bin/cgroup.c:603 #, c-format msgid "%d objects ungrouped" msgstr "%d objetos desagrupados" -#: ../bin/cgroup.c:590 +#: ../bin/cgroup.c:605 msgid "No objects ungrouped" msgstr "Nenhum objeto desagrupado" -#: ../bin/cgroup.c:599 +#: ../bin/cgroup.c:614 msgid "Replace with new group?" msgstr "Substituir por novo grupo?" -#: ../bin/cgroup.c:604 -#: ../bin/compound.c:519 -#: ../bin/cstruct.c:62 -#: ../bin/ctodesgn.c:140 -#: ../bin/ctodesgn.c:1764 -#: ../bin/cturnout.c:68 -#: ../bin/dcar.c:1933 -#: ../bin/dcar.c:4070 -#: ../bin/dcar.c:4075 -#: ../bin/dcmpnd.c:449 -#: ../bin/dcustmgm.c:45 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:324 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:493 +#: ../bin/cgroup.c:619 ../bin/compound.c:524 ../bin/cstruct.c:70 +#: ../bin/ctodesgn.c:148 ../bin/ctodesgn.c:1772 ../bin/cturnout.c:76 +#: ../bin/dcar.c:1941 ../bin/dcar.c:4078 ../bin/dcar.c:4083 +#: ../bin/dcmpnd.c:450 ../bin/dcustmgm.c:50 +#: ../../../../build/work/app/bin/bllnhlp.c:345 +#: ../../../../build/work/app/bin/bllnhlp.c:520 msgid "Manufacturer" msgstr "Fabricante" -#: ../bin/cgroup.c:605 -#: ../bin/cmisc.c:310 -#: ../bin/cstruct.c:62 -#: ../bin/ctodesgn.c:1765 -#: ../bin/ctodesgn.c:1766 -#: ../bin/ctrain.c:175 -#: ../bin/cturnout.c:68 -#: ../bin/dcar.c:1949 -#: ../bin/dcar.c:4071 -#: ../bin/dcar.c:4076 -#: ../bin/dcmpnd.c:450 -#: ../bin/dcustmgm.c:46 -#: ../bin/denum.c:168 -#: ../bin/denum.c:169 -#: ../bin/denum.c:172 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:325 +#: ../bin/cgroup.c:620 ../bin/cmisc.c:401 ../bin/cstruct.c:70 +#: ../bin/ctodesgn.c:1773 ../bin/ctodesgn.c:1774 ../bin/ctrain.c:186 +#: ../bin/cturnout.c:76 ../bin/dcar.c:1957 ../bin/dcar.c:4079 +#: ../bin/dcar.c:4084 ../bin/dcmpnd.c:451 ../bin/dcustmgm.c:51 +#: ../bin/denum.c:182 ../bin/denum.c:183 ../bin/denum.c:186 +#: ../../../../build/work/app/bin/bllnhlp.c:346 msgid "Description" msgstr "Descrição" -#: ../bin/cgroup.c:606 -#: ../bin/dcmpnd.c:451 +#: ../bin/cgroup.c:621 ../bin/dcmpnd.c:452 msgid "#" msgstr "No." -#: ../bin/cgroup.c:607 -#: ../bin/compound.c:523 +#: ../bin/cgroup.c:622 ../bin/compound.c:528 msgid "# Segments" msgstr "No. de segmentos" -#: ../bin/cgroup.c:1063 +#: ../bin/cgroup.c:1089 msgid "No endpts" msgstr "Nenhuma extremidade" -#: ../bin/cgroup.c:1148 +#: ../bin/cgroup.c:1174 msgid "No paths" msgstr "Nenhuma via" -#: ../bin/cgroup.c:1482 -#: ../bin/cgroup.c:1536 +#: ../bin/cgroup.c:1508 ../bin/cgroup.c:1562 msgid "Group Tracks" msgstr "Agrupar trechos" -#: ../bin/cgroup.c:1592 +#: ../bin/cgroup.c:1618 msgid "Group Objects" msgstr "Agrupar objetos" -#: ../bin/chndldto.c:68 +#: ../bin/chndldto.c:70 msgid "Place frog and drag angle" msgstr "Posicionar jacaré e ajustar ângulo" -#: ../bin/chndldto.c:85 +#: ../bin/chndldto.c:87 msgid "frog" msgstr "Jacaré" -#: ../bin/chndldto.c:132 +#: ../bin/chndldto.c:93 +msgid "Drag to set angle" +msgstr "Arrastar para selecionar o ângulo" + +#: ../bin/chndldto.c:134 #, c-format msgid "Angle = %0.2f Frog# = %0.2f" msgstr "Ângulo = %0.2f Jacaré No. = %0.2f" -#: ../bin/chndldto.c:134 +#: ../bin/chndldto.c:136 msgid "Frog angle is too close to 0" msgstr "Ângulo do jacaré muito próximo de 0" -#: ../bin/chndldto.c:137 +#: ../bin/chndldto.c:139 msgid "Select point position" msgstr "Selecionar posição do ponto" -#: ../bin/chndldto.c:151 -#: ../bin/chndldto.c:176 +#: ../bin/chndldto.c:153 ../bin/chndldto.c:178 msgid "points" msgstr "Pontos" -#: ../bin/chndldto.c:273 +#: ../bin/chndldto.c:275 #, c-format msgid "Length = %0.2f Angle = %0.2f Frog# = %0.2f" msgstr "Comprimento = %0.2f Ângulo = %0.2f Jacaré No. = %0.2f" -#: ../bin/chndldto.c:277 +#: ../bin/chndldto.c:279 msgid "Create Hand Laid Turnout" msgstr "Criar AMV personalizado" -#: ../bin/chndldto.c:368 +#: ../bin/chndldto.c:370 msgid "HandLaidTurnout" msgstr "AMV personalizado" -#: ../bin/cjoin.c:164 +#: ../bin/cjoin.c:172 #, c-format msgid "Curved Track: Radius=%s Length=%s" msgstr "Trecho curvo: Raio=%s Comprimento=%s" -#: ../bin/cjoin.c:250 +#: ../bin/cjoin.c:258 #, c-format msgid "Curved Track: Radius=%s Length=%s Angle=%0.3f" msgstr "Trecho curvo: Raio=%s Comprimento=%s Ângulo=%0.3f" -#: ../bin/cjoin.c:346 +#: ../bin/cjoin.c:354 #, c-format msgid "Track (%d) is too short for transition-curve by %0.3f" msgstr "Trecho (%d) muito curto para transição curva por %0.3f" -#: ../bin/cjoin.c:363 +#: ../bin/cjoin.c:371 #, c-format msgid "Connecting track is too short by %0.3f" msgstr "Trecho de conexão muito curto por %0.3f" -#: ../bin/cjoin.c:407 -#: ../bin/cjoin.c:857 +#: ../bin/cjoin.c:415 msgid "Click on an unselected End-Point" msgstr "Clicar em uma extremidade não selecionada" -#: ../bin/cjoin.c:408 -#: ../bin/cjoin.c:858 +#: ../bin/cjoin.c:416 msgid "Click on a selected End-Point" msgstr "Clicar em uma extremidade selecionada" -#: ../bin/cjoin.c:415 -#: ../bin/cjoin.c:863 +#: ../bin/cjoin.c:423 msgid "unselected" msgstr "deselecionado" -#: ../bin/cjoin.c:415 -#: ../bin/cjoin.c:863 -#: ../bin/cprint.c:139 +#: ../bin/cjoin.c:423 ../bin/cprint.c:148 msgid "selected" msgstr "selecionado" -#: ../bin/cjoin.c:450 +#: ../bin/cjoin.c:458 msgid "Left click - join with track, Shift Left click - move to join" -msgstr "Clicar com o botão esquerdo - junta um trecho, Clicar com o botão esquerdo + Shift - movimenta para juntar" +msgstr "" +"Clicar com o botão esquerdo - junta um trecho, Clicar com o botão esquerdo + " +"Shift - movimenta para juntar" -#: ../bin/cjoin.c:481 -#: ../bin/cjoin.c:781 -#: ../bin/cjoin.c:790 +#: ../bin/cjoin.c:493 ../bin/cjoin.c:802 ../bin/cjoin.c:811 msgid "Select 2nd track" msgstr "Selecionar o segundo trecho" -#: ../bin/cjoin.c:508 -#: ../bin/cmisc.c:53 -#: ../bin/track.c:1920 +#: ../bin/cjoin.c:520 ../bin/cmisc.c:52 msgid "First" msgstr "Primeiro" -#: ../bin/cjoin.c:513 -#: ../bin/cmisc.c:53 -#: ../bin/track.c:1920 +#: ../bin/cjoin.c:525 ../bin/cmisc.c:52 msgid "Second" msgstr "Segundo" -#: ../bin/cjoin.c:604 +#: ../bin/cjoin.c:620 msgid "Beyond end of 2nd track" msgstr "Além da extremidade do 2º trecho" -#: ../bin/cjoin.c:639 +#: ../bin/cjoin.c:655 msgid "Beyond end of 1st track" msgstr "Além da extremidade do 1º trecho" -#: ../bin/cjoin.c:663 +#: ../bin/cjoin.c:679 msgid "First " msgstr "Primeiro " -#: ../bin/cjoin.c:690 +#: ../bin/cjoin.c:706 msgid "Second " msgstr "Segundo " -#: ../bin/cjoin.c:704 -#: ../bin/track.c:1870 +#: ../bin/cjoin.c:720 ../bin/track.c:1959 msgid "Connecting " msgstr "Conectando " -#: ../bin/cjoin.c:793 +#: ../bin/cjoin.c:814 msgid "Join Tracks" msgstr "Juntar trechos" -#: ../bin/cjoin.c:898 +#: ../bin/cjoin.c:882 msgid "Join" msgstr "Juntar" -#: ../bin/cmisc.c:53 +#: ../bin/cmisc.c:52 msgid "Middle" msgstr "Meio" -#: ../bin/cmisc.c:154 -#: ../bin/cmodify.c:121 -#: ../bin/cnote.c:168 -#: ../bin/compound.c:592 -#: ../bin/ctrain.c:197 +#: ../bin/cmisc.c:209 ../bin/cmodify.c:203 ../bin/cnote.c:190 +#: ../bin/compound.c:597 ../bin/ctrain.c:213 msgid "Change Track" msgstr "Substituir trecho" -#: ../bin/cmisc.c:356 -#: ../bin/dlayer.c:324 -msgid "Frozen" -msgstr "Congelado" - -#: ../bin/cmisc.c:411 +#: ../bin/cmisc.c:513 msgid "Select track to describe" msgstr "Selecionar trecho a descrever" -#: ../bin/cmisc.c:458 +#: ../bin/cmisc.c:570 ../bin/doption.c:205 msgid "Properties" msgstr "Propriedades" @@ -1273,1387 +1374,1409 @@ msgstr "Propriedades" msgid "Bridge" msgstr "Ponte" -#: ../bin/cmodify.c:83 +#: ../bin/cmodify.c:144 msgid "Select track to modify" msgstr "Selecionar trecho a modificar" -#: ../bin/cmodify.c:166 +#: ../bin/cmodify.c:261 msgid "Modify Track" msgstr "Modificar trecho" -#: ../bin/cmodify.c:198 +#: ../bin/cmodify.c:299 msgid "Drag to create new track segment" msgstr "Arrastar para criar novo trecho" -#: ../bin/cmodify.c:315 +#: ../bin/cmodify.c:429 #, c-format msgid "Curve Track: Radius=%s Length=%s Angle=%0.3f" msgstr "Trecho curvo: Raio=%s Comprimento=%s Ângulo=%0.3f" -#: ../bin/cmodify.c:330 +#: ../bin/cmodify.c:446 msgid "Extend Track" msgstr "Estender um trecho" -#: ../bin/cmodify.c:394 +#: ../bin/cmodify.c:522 msgid "Modify" msgstr "Modificar" -#: ../bin/cnote.c:96 -#: ../bin/cnote.c:203 -#: ../bin/cnote.c:398 +#: ../bin/cnote.c:100 ../bin/cnote.c:233 ../bin/cnote.c:462 msgid "Note" msgstr "Nota" -#: ../bin/cnote.c:99 +#: ../bin/cnote.c:106 msgid "Replace this text with your layout notes" msgstr "Substitua este texto por uma nota do traçado" -#: ../bin/cnote.c:148 -#: ../bin/ctrain.c:171 -msgid "Position" -msgstr "Posição" - -#: ../bin/cnote.c:190 -#: ../bin/cnote.c:191 -#: ../bin/cnote.c:192 +#: ../bin/cnote.c:217 ../bin/cnote.c:218 ../bin/cnote.c:219 msgid "Note: " msgstr "Nota: " -#: ../bin/cnote.c:358 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:87 +#: ../bin/cnote.c:415 ../../../../build/work/app/bin/bllnhlp.c:94 msgid "Place a note on the layout" msgstr "Posicionar uma nota no traçado" -#: ../bin/cnote.c:371 +#: ../bin/cnote.c:431 msgid "New Note" msgstr "Nova nota" -#: ../bin/cnote.c:376 +#: ../bin/cnote.c:435 msgid "Replace this text with your note" msgstr "Substitua este texto por uma nota" -#: ../bin/compound.c:513 -#: ../bin/compound.c:515 -#: ../bin/tcurve.c:341 -#: ../bin/tcurve.c:343 -#: ../bin/tease.c:498 -#: ../bin/tease.c:500 -#: ../bin/tstraigh.c:77 -#: ../bin/tstraigh.c:79 +#: ../bin/compound.c:518 ../bin/compound.c:520 ../bin/tcurve.c:349 +#: ../bin/tcurve.c:351 ../bin/tease.c:504 ../bin/tease.c:506 +#: ../bin/tstraigh.c:86 ../bin/tstraigh.c:88 msgid "Z" msgstr "Z" -#: ../bin/compound.c:521 -#: ../bin/cstruct.c:62 -#: ../bin/cturnout.c:68 -#: ../bin/dcar.c:4070 -#: ../bin/dcar.c:4075 -#: ../bin/dcustmgm.c:46 -#: ../bin/doption.c:195 -#: ../bin/doption.c:196 +#: ../bin/compound.c:526 ../bin/cstruct.c:70 ../bin/cturnout.c:76 +#: ../bin/dcar.c:4078 ../bin/dcar.c:4083 ../bin/dcustmgm.c:51 +#: ../bin/doption.c:106 ../bin/doption.c:107 msgid "Part No" msgstr "No. do item" -#: ../bin/compound.c:522 +#: ../bin/compound.c:527 msgid "# End Pt" msgstr "No. da extremidade" -#: ../bin/compound.c:773 -#: ../bin/cswitchmotor.c:144 -#: ../bin/cturnout.c:884 -#: ../bin/cturnout.c:2371 -#: ../bin/cturnout.c:2541 -#: ../bin/track.c:1684 +#: ../bin/compound.c:782 ../bin/cswitchmotor.c:220 ../bin/cturnout.c:894 +#: ../bin/cturnout.c:2401 ../bin/cturnout.c:2571 msgid "Turnout" msgstr "AMV" -#: ../bin/compound.c:773 +#: ../bin/compound.c:782 msgid "Sectional Track" msgstr "Trecho seccionado" -#: ../bin/compound.c:776 -#: ../bin/cstruct.c:759 -#: ../bin/cstruct.c:904 +#: ../bin/compound.c:785 ../bin/cstruct.c:769 ../bin/cstruct.c:914 msgid "Structure" msgstr "Estrutura" -#: ../bin/cparalle.c:41 -#: ../bin/cparalle.c:71 -#: ../bin/cparalle.c:83 -#: ../bin/ctodesgn.c:382 -#: ../bin/ctodesgn.c:402 -#: ../bin/ctodesgn.c:422 -#: ../bin/tcurve.c:347 +#: ../bin/cparalle.c:44 ../bin/cparalle.c:74 ../bin/cparalle.c:86 +#: ../bin/ctodesgn.c:390 ../bin/ctodesgn.c:410 ../bin/ctodesgn.c:430 +#: ../bin/tcurve.c:355 msgid "Separation" msgstr "Separação" -#: ../bin/cparalle.c:140 +#: ../bin/cparalle.c:96 +msgid " Track doesn't support parallel" +msgstr "" + +#: ../bin/cparalle.c:145 msgid "Create Parallel Track" msgstr "Criar trecho paralelo" -#: ../bin/cparalle.c:184 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:44 +#: ../bin/cparalle.c:189 ../../../../build/work/app/i18n/custmsg.h:44 msgid "Parallel" msgstr "Paralelo" -#: ../bin/cprint.c:96 -#: ../wlib/gtklib/CVS/Base/psprint.c:1155 -#: ../wlib/gtklib/psprint.c:1155 +#: ../bin/cprint.c:102 msgid "Portrait" msgstr "Retrato" -#: ../bin/cprint.c:96 -#: ../wlib/gtklib/CVS/Base/psprint.c:1155 -#: ../wlib/gtklib/psprint.c:1155 +#: ../bin/cprint.c:102 msgid "Landscape" msgstr "Paisagem" -#: ../bin/cprint.c:97 -#: ../bin/cselect.c:1856 -#: ../bin/cselect.c:1860 -#: ../bin/cswitchmotor.c:100 -#: ../bin/cswitchmotor.c:141 -#: ../bin/dbench.c:73 -#: ../bin/dease.c:63 -#: ../bin/doption.c:191 -#: ../bin/doption.c:286 -#: ../bin/macro.c:1226 +#: ../bin/cprint.c:103 ../bin/cselect.c:1922 ../bin/cselect.c:1926 +#: ../bin/cswitchmotor.c:87 ../bin/cswitchmotor.c:106 +#: ../bin/cswitchmotor.c:217 ../bin/dbench.c:78 ../bin/dease.c:64 +#: ../bin/doption.c:100 ../bin/doption.c:102 ../bin/doption.c:200 +#: ../bin/macro.c:1233 msgid "Normal" msgstr "Normal" -#: ../bin/cprint.c:97 -#: ../bin/cswitchmotor.c:101 -#: ../bin/cswitchmotor.c:142 -#: ../bin/ctrain.c:770 -#: ../bin/ctrain.c:1027 +#: ../bin/cprint.c:103 ../bin/cswitchmotor.c:88 ../bin/cswitchmotor.c:107 +#: ../bin/cswitchmotor.c:218 ../bin/ctrain.c:877 ../bin/ctrain.c:1187 msgid "Reverse" msgstr "Inverso" -#: ../bin/cprint.c:98 +#: ../bin/cprint.c:104 msgid "Engineering Data" msgstr "Dados do projeto" -#: ../bin/cprint.c:99 +#: ../bin/cprint.c:105 msgid "Print Registration Marks" msgstr "Imprimir marcas de registro" -#: ../bin/cprint.c:100 +#: ../bin/cprint.c:106 msgid "Ignore Page Margins" msgstr "Ignorar margens de página" -#: ../bin/cprint.c:101 +#: ../bin/cprint.c:107 msgid "Print Snap Grid" msgstr "Imprimir grade" -#: ../bin/cprint.c:102 +#: ../bin/cprint.c:108 msgid "Print Rulers" msgstr "Imprimir régua" -#: ../bin/cprint.c:103 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:402 +#: ../bin/cprint.c:109 ../../../../build/work/app/bin/bllnhlp.c:424 msgid "Print Roadbed Outline" msgstr "Imprimir leito dos trilhos" -#: ../bin/cprint.c:111 +#: ../bin/cprint.c:110 +#, fuzzy +msgid "Print Centerline below Scale 1:1" +msgstr "Imprimir linha central" + +#: ../bin/cprint.c:118 msgid "Print Scale" msgstr "Imprimir escala" -#: ../bin/cprint.c:112 +#: ../bin/cprint.c:119 msgid "Page Width" msgstr "Largura de página" -#: ../bin/cprint.c:113 +#: ../bin/cprint.c:120 msgid "Max" msgstr "Máximo" -#: ../bin/cprint.c:114 +#: ../bin/cprint.c:121 msgid "Height" msgstr "Altura" -#: ../bin/cprint.c:115 +#: ../bin/cprint.c:122 msgid "Snap Shot" msgstr "Capturar" -#: ../bin/cprint.c:116 +#: ../bin/cprint.c:123 msgid "Page Format" msgstr "Formato da página" -#: ../bin/cprint.c:117 +#: ../bin/cprint.c:124 msgid "Print Order" msgstr "Ordem de impressão" -#: ../bin/cprint.c:130 -#: ../bin/ctrain.c:174 -#: ../bin/dcar.c:1972 +#: ../bin/cprint.c:139 ../bin/ctrain.c:185 ../bin/dcar.c:1980 msgid "Width" msgstr "Largura" -#: ../bin/cprint.c:132 -#: ../bin/csnap.c:535 +#: ../bin/cprint.c:141 ../bin/csnap.c:542 msgid "Y" msgstr "Y" -#: ../bin/cprint.c:133 -#: ../bin/dcar.c:1953 +#: ../bin/cprint.c:142 ../bin/dcar.c:1961 msgid "Reset" msgstr "Resetar" -#: ../bin/cprint.c:135 +#: ../bin/cprint.c:144 msgid "Setup" msgstr "Setup" -#: ../bin/cprint.c:136 -#: ../bin/cprofile.c:548 -#: ../bin/misc.c:583 +#: ../bin/cprint.c:145 ../bin/cprofile.c:569 ../bin/misc.c:591 msgid "Clear" msgstr "Limpar" -#: ../bin/cprint.c:138 -#: ../bin/cprint.c:618 +#: ../bin/cprint.c:147 ../bin/cprint.c:588 msgid "0 pages" msgstr "0 página" -#: ../bin/cprint.c:228 -#: ../bin/cprint.c:277 +#: ../bin/cprint.c:211 ../bin/cprint.c:260 #, c-format msgid "%d pages" msgstr "%d páginas" -#: ../bin/cprint.c:397 -#, c-format -msgid "PrintScale %ld:1 Room %s x %s Model Scale %s File %s" -msgstr "Escala de impressão %ld:1 Comôdo %s x %s Escala do modelo %s Arquivo %s" +#: ../bin/cprint.c:380 +#, fuzzy, c-format +msgid "PrintScale 1:%ld Room %s x %s Model Scale %s File %s" +msgstr "" +"Escala de impressão %ld:1 Comôdo %s x %s Escala do modelo %s Arquivo %s" -#: ../bin/cprint.c:699 +#: ../bin/cprint.c:669 msgid "1 page" msgstr "1 página" -#: ../bin/cprint.c:1068 -#: ../bin/cprofile.c:549 -#: ../bin/ctodesgn.c:1712 -#: ../bin/denum.c:50 +#: ../bin/cprint.c:1039 ../bin/cprofile.c:570 ../bin/ctodesgn.c:1720 +#: ../bin/denum.c:55 msgid "Print" msgstr "Imprimir" -#: ../bin/cprint.c:1090 +#: ../bin/cprint.c:1061 msgid "Select pages to print, or drag to move print grid" msgstr "Selecionar páginas a imprimir, ou arrastar para imprimir grade" -#: ../bin/cprint.c:1190 +#: ../bin/cprint.c:1160 msgid "Print..." msgstr "Imprimir..." -#: ../bin/cprofile.c:456 -#: ../bin/cprofile.c:1255 -#: ../bin/cprofile.c:1351 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:97 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:40 +#: ../bin/cprofile.c:477 ../bin/cprofile.c:1279 ../bin/cprofile.c:1379 +#: ../../../../build/work/app/bin/bllnhlp.c:104 +#: ../../../../build/work/app/i18n/custmsg.h:40 msgid "Profile" msgstr "Perfil" -#: ../bin/cprofile.c:472 +#: ../bin/cprofile.c:493 #, c-format msgid "%s Profile: %s" msgstr "%s perfil: %s" -#: ../bin/cprofile.c:620 -#: ../bin/cprofile.c:630 +#: ../bin/cprofile.c:641 ../bin/cprofile.c:651 #, c-format msgid "Elev = %0.1f" msgstr "Elev = %0.1f" -#: ../bin/cprofile.c:632 +#: ../bin/cprofile.c:653 #, c-format msgid "Elev=%0.2f %0.1f%%" msgstr "Elev=%0.2f %0.1f%%" -#: ../bin/cprofile.c:636 +#: ../bin/cprofile.c:657 #, c-format msgid "%0.1f%% Elev = %0.2f" msgstr "%0.1f%% Elev = %0.2f" -#: ../bin/cprofile.c:640 +#: ../bin/cprofile.c:661 #, c-format msgid "%0.1f%% Elev = %0.2f %0.1f%%" msgstr "%0.1f%% Elev = %0.2f %0.1f%%" -#: ../bin/cprofile.c:651 -#: ../bin/cprofile.c:1202 +#: ../bin/cprofile.c:672 ../bin/cprofile.c:1226 msgid "Profile Command" msgstr "Comando perfil" -#: ../bin/cprofile.c:659 -#: ../bin/cprofile.c:1260 +#: ../bin/cprofile.c:680 ../bin/cprofile.c:1284 msgid "Drag to change Elevation" msgstr "Arrastar para alterar elevação" -#: ../bin/cprofile.c:723 +#: ../bin/cprofile.c:747 msgid "Select a Defined Elevation to start Profile" msgstr "Selecionar uma elevação definida para iniciar perfil" -#: ../bin/cprofile.c:725 +#: ../bin/cprofile.c:749 msgid "Select a Defined Elevation to extend Profile" msgstr "Selecionar uma elevação definida para estender perfil" -#: ../bin/cprofile.c:1270 +#: ../bin/cprofile.c:1296 msgid "Select a Defined Elevation to start profile" msgstr "Selecionar uma elevação definida para iniciar perfil" -#: ../bin/cprofile.c:1353 +#: ../bin/cprofile.c:1381 msgid "Define" msgstr "Definir" -#: ../bin/cpull.c:438 -#: ../bin/cpull.c:583 +#: ../bin/cpull.c:436 ../bin/cpull.c:581 #, c-format msgid "%d tracks moved" msgstr "%d segmentos movidos" -#: ../bin/cpull.c:473 +#: ../bin/cpull.c:471 msgid "Pull Tracks" msgstr "Empurar trilhos" -#: ../bin/cpull.c:547 +#: ../bin/cpull.c:545 msgid "Tighten Tracks" msgstr "Trilhos forçados" -#: ../bin/cpull.c:600 +#: ../bin/cpull.c:598 msgid "Select first End-Point to connect" msgstr "Selecionar primeira extremidade a conectar" -#: ../bin/cpull.c:611 +#: ../bin/cpull.c:609 msgid "Select second End-Point to connect" msgstr "Selecionar segunda extremidade a conectar" -#: ../bin/cpull.c:661 +#: ../bin/cpull.c:659 msgid "Connect Sectional Tracks" msgstr "Conectar trechos seccionados" -#: ../bin/cruler.c:141 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:51 +#: ../bin/cruler.c:151 ../../../../build/work/app/i18n/custmsg.h:51 msgid "Ruler" msgstr "Medir" -#: ../bin/cselect.c:306 +#: ../bin/cselect.c:313 msgid "Change Track Width" msgstr "Alterar largura do trilho" -#: ../bin/cselect.c:327 +#: ../bin/cselect.c:334 msgid "Delete Tracks" msgstr "Apagar trilhos" -#: ../bin/cselect.c:379 +#: ../bin/cselect.c:386 msgid "Hide Tracks (Tunnel)" msgstr "Ocultar trilhos (túnel)" -#: ../bin/cselect.c:418 -#: ../bin/misc.c:2113 +#: ../bin/cselect.c:425 ../bin/misc.c:2060 msgid "Move To Current Layer" msgstr "Mover para camada em uso" -#: ../bin/cselect.c:457 -#: ../bin/misc.c:2216 +#: ../bin/cselect.c:464 ../bin/misc.c:2175 msgid "Clear Elevations" msgstr "Eliminar elevações" -#: ../bin/cselect.c:501 +#: ../bin/cselect.c:508 msgid "Add Elevations" msgstr "Adicionar elevações" -#: ../bin/cselect.c:516 +#: ../bin/cselect.c:523 msgid "Refresh Compound" msgstr "Atualizar composição" -#: ../bin/cselect.c:552 -#: ../bin/dcar.c:4070 -#: ../bin/dcar.c:4075 -#: ../bin/dcustmgm.c:46 -#: ../bin/doption.c:106 +#: ../bin/cselect.c:559 ../bin/dcar.c:4078 ../bin/dcar.c:4083 +#: ../bin/dcustmgm.c:51 ../bin/layout.c:239 msgid "Scale" msgstr "Escala" -#: ../bin/cselect.c:552 -#: ../bin/cselect.c:577 +#: ../bin/cselect.c:559 ../bin/cselect.c:584 msgid "Ratio" msgstr "Razão" -#: ../bin/cselect.c:561 +#: ../bin/cselect.c:568 msgid "Do not resize track" msgstr "Não redimensione o traçado" -#: ../bin/cselect.c:565 +#: ../bin/cselect.c:572 msgid "Rescale by:" msgstr "Reescalar para:" -#: ../bin/cselect.c:567 +#: ../bin/cselect.c:574 msgid "From:" msgstr "De:" -#: ../bin/cselect.c:571 +#: ../bin/cselect.c:578 msgid "To: " msgstr "A: " -#: ../bin/cselect.c:636 +#: ../bin/cselect.c:643 msgid "Rescale Tracks" msgstr "Reescalar traçado" -#: ../bin/cselect.c:767 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:47 +#: ../bin/cselect.c:774 ../../../../build/work/app/i18n/custmsg.h:47 msgid "Rescale" msgstr "Reescalar" -#: ../bin/cselect.c:794 +#: ../bin/cselect.c:801 msgid "Draw moving track normally" msgstr "Desenhar normalmente trechos sendo arrastados" -#: ../bin/cselect.c:795 +#: ../bin/cselect.c:802 msgid "Draw moving track simply" msgstr "Desenhar de modo simples trechos sendo arrastados" -#: ../bin/cselect.c:796 +#: ../bin/cselect.c:803 msgid "Draw moving track as end-points" msgstr "Desenhar apenas extremidades de trechos sendo movidos" -#: ../bin/cselect.c:1089 +#: ../bin/cselect.c:1085 +msgid "Cornu too tight - it was deleted" +msgstr "" + +#: ../bin/cselect.c:1105 +msgid "Cornu selected too tight after move - it was left alone" +msgstr "" + +#: ../bin/cselect.c:1145 msgid "Move To Join" msgstr "Arrastar para juntar" -#: ../bin/cselect.c:1125 +#: ../bin/cselect.c:1181 msgid "Drag to move selected tracks" msgstr "Arrastar para mover trecho selecionados" -#: ../bin/cselect.c:1132 +#: ../bin/cselect.c:1188 msgid "Move Tracks" msgstr "Mover trecho" -#: ../bin/cselect.c:1187 +#: ../bin/cselect.c:1245 msgid "Click on selected object to align" msgstr "Clicar no objeto selecionado para alinhar" -#: ../bin/cselect.c:1215 +#: ../bin/cselect.c:1273 msgid "Drag to rotate selected tracks" msgstr "Arrastar para rotacionar trechos selecionados" -#: ../bin/cselect.c:1224 -#: ../bin/cselect.c:1376 +#: ../bin/cselect.c:1282 ../bin/cselect.c:1438 msgid "Rotate Tracks" msgstr "Rotacionar trecho" -#: ../bin/cselect.c:1263 -#: ../bin/cselect.c:1293 +#: ../bin/cselect.c:1321 ../bin/cselect.c:1352 #, c-format msgid "Angle %0.3f" msgstr "Ângulo %0.3f" -#: ../bin/cselect.c:1322 +#: ../bin/cselect.c:1382 #, c-format msgid " Angle %0.3f #%ld" msgstr " Ângulo %0.3f No.%ld" -#: ../bin/cselect.c:1324 +#: ../bin/cselect.c:1384 #, c-format msgid " Angle %0.3f" msgstr " Ângulo %0.3f" -#: ../bin/cselect.c:1334 +#: ../bin/cselect.c:1395 msgid "Click on the 2nd Unselected object" msgstr "Clicar no 2º objeto não selecionado" -#: ../bin/cselect.c:1388 +#: ../bin/cselect.c:1450 msgid "Toggle Label" msgstr "Ocultar ou apresentar etiqueta" -#: ../bin/cselect.c:1417 +#: ../bin/cselect.c:1479 msgid "Select and drag a description" msgstr "Selecionar e arrastar uma descrição" -#: ../bin/cselect.c:1459 +#: ../bin/cselect.c:1521 msgid "Move Label" msgstr "Mover etiqueta" -#: ../bin/cselect.c:1484 +#: ../bin/cselect.c:1546 msgid "Show Description" msgstr "Apresentar descrição" -#: ../bin/cselect.c:1565 +#: ../bin/cselect.c:1628 msgid "Drag to mark mirror line" msgstr "Arrastar para marcar linha espelho" -#: ../bin/cselect.c:1579 +#: ../bin/cselect.c:1643 #, c-format msgid "Angle %0.2f" msgstr "Ângulo %0.2f" -#: ../bin/cselect.c:1583 +#: ../bin/cselect.c:1648 msgid "Flip Tracks" msgstr "Virar trecho" -#: ../bin/cselect.c:1745 +#: ../bin/cselect.c:1811 msgid "Select tracks" msgstr "Selecionar trecho" -#: ../bin/cselect.c:1843 -#: ../bin/dcar.c:1536 -#: ../bin/doption.c:291 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:13 -msgid "Select" -msgstr "Selecionar" +#: ../bin/cselect.c:1909 ../bin/dcar.c:1544 ../bin/doption.c:205 +#: ../../../../build/work/app/i18n/custmsg.h:13 +msgid "Select" +msgstr "Selecionar" + +#: ../bin/cselect.c:1923 ../bin/cselect.c:1927 ../bin/doption.c:201 +msgid "Simple" +msgstr "Simples" + +#: ../bin/cselect.c:1924 ../bin/cselect.c:1928 +msgid "End Points" +msgstr "Extremidades" + +#: ../bin/cselect.c:1931 +msgid "Align" +msgstr "Alinhar" + +#: ../bin/cselect.c:1952 ../bin/misc.c:1990 +msgid "Tunnel" +msgstr "Túnel" + +#: ../bin/cselect.c:1961 +msgid "Move Description" +msgstr "Mover descrição" + +#: ../bin/cselect.c:1968 ../bin/misc.c:1988 +msgid "Move" +msgstr "Mover" + +#: ../bin/cselect.c:1970 ../bin/misc.c:1764 ../bin/misc.c:1989 +#: ../../../../build/work/app/i18n/custmsg.h:58 +msgid "Rotate" +msgstr "Rotacionar" + +#: ../bin/cselect.c:1972 ../bin/dcar.c:1963 +#: ../../../../build/work/app/i18n/custmsg.h:59 +msgid "Flip" +msgstr "Virar" + +#: ../bin/csensor.c:197 +#, fuzzy +msgid "Change Sensor" +msgstr "Alterar escala" + +#: ../bin/csensor.c:243 ../bin/csensor.c:556 +msgid "Sensor" +msgstr "" + +#: ../bin/csensor.c:374 +#, fuzzy +msgid "Create Sensor" +msgstr "Cria bancada" + +#: ../bin/csensor.c:377 +#, fuzzy +msgid "Modify Sensor" +msgstr "Modificar trecho" + +#: ../bin/csensor.c:410 +#, fuzzy +msgid "Edit sensor" +msgstr "Menu editar" + +#: ../bin/csensor.c:446 +#, fuzzy +msgid "Place sensor" +msgstr "Posicionar novo AMV" + +#: ../bin/csignal.c:237 +#, fuzzy +msgid "Number Of Heads" +msgstr "Números" + +#: ../bin/csignal.c:269 +#, fuzzy +msgid "Change Signal" +msgstr "Alterar escala" + +#: ../bin/csignal.c:303 +#, c-format +msgid "(%d [%s]): Layer=%d, %d heads at %0.3f,%0.3f A%0.3f" +msgstr "" + +#: ../bin/csignal.c:314 ../bin/csignal.c:885 +msgid "Signal" +msgstr "" + +#: ../bin/csignal.c:492 +#, fuzzy +msgid "Number of Heads" +msgstr "Números" + +#: ../bin/csignal.c:497 +#, fuzzy +msgid "Edit Aspect" +msgstr "Menu editar" + +#: ../bin/csignal.c:499 +msgid "Add Aspect" +msgstr "" + +#: ../bin/csignal.c:501 +#, fuzzy +msgid "Delete Aspect" +msgstr "Elimina objetos" -#: ../bin/cselect.c:1857 -#: ../bin/cselect.c:1861 -#: ../bin/doption.c:287 -msgid "Simple" -msgstr "Simples" +#: ../bin/csignal.c:514 +msgid "Aspect Index" +msgstr "" -#: ../bin/cselect.c:1858 -#: ../bin/cselect.c:1862 -msgid "End Points" -msgstr "Extremidades" +#: ../bin/csignal.c:529 +#, fuzzy +msgid "Create Signal" +msgstr "Criar linhas" -#: ../bin/cselect.c:1865 -msgid "Align" -msgstr "Alinhar" +#: ../bin/csignal.c:533 +#, fuzzy +msgid "Modify Signal" +msgstr "Modificar trecho" -#: ../bin/cselect.c:1886 -#: ../bin/misc.c:2042 -msgid "Tunnel" -msgstr "Túnel" +#: ../bin/csignal.c:640 +#, fuzzy +msgid "Edit aspect" +msgstr "Menu editar" -#: ../bin/cselect.c:1895 -msgid "Move Description" -msgstr "Mover descrição" +#: ../bin/csignal.c:687 +#, c-format +msgid "Are you sure you want to delete the %d aspect(s)" +msgstr "" -#: ../bin/cselect.c:1902 -#: ../bin/misc.c:2040 -msgid "Move" -msgstr "Mover" +#: ../bin/csignal.c:708 +#, fuzzy +msgid "Edit signal" +msgstr "Menu editar" -#: ../bin/cselect.c:1904 -#: ../bin/misc.c:1819 -#: ../bin/misc.c:2041 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:58 -msgid "Rotate" -msgstr "Rotacionar" +#: ../bin/csignal.c:770 +msgid "Place base of signal" +msgstr "" -#: ../bin/cselect.c:1906 -#: ../bin/dcar.c:1955 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:59 -msgid "Flip" -msgstr "Virar" +#: ../bin/csignal.c:775 +#, fuzzy +msgid "Drag to orient signal" +msgstr "Arrastar para selecionar o ângulo" -#: ../bin/csnap.c:516 +#: ../bin/csnap.c:523 msgid "Horz" msgstr "Horizontal" -#: ../bin/csnap.c:518 +#: ../bin/csnap.c:525 msgid "Spacing" msgstr "Espaçamento" -#: ../bin/csnap.c:520 +#: ../bin/csnap.c:527 msgid "Divisions" msgstr "Divisões" -#: ../bin/csnap.c:523 +#: ../bin/csnap.c:530 msgid "Enable" msgstr "Habilitar" -#: ../bin/csnap.c:524 +#: ../bin/csnap.c:531 msgid "Vert" msgstr "Vertical" -#: ../bin/csnap.c:533 -#: ../bin/dease.c:72 +#: ../bin/csnap.c:540 ../bin/dease.c:73 msgid "X" msgstr "X" -#: ../bin/csnap.c:537 +#: ../bin/csnap.c:544 msgid "A" msgstr "θ" -#: ../bin/csnap.c:540 +#: ../bin/csnap.c:547 msgid "Show" msgstr "Apresentar" -#: ../bin/csnap.c:710 -#: ../bin/doption.c:528 +#: ../bin/csnap.c:717 ../bin/doption.c:448 msgid "Snap Grid" msgstr "Grade" -#: ../bin/csnap.c:795 +#: ../bin/csnap.c:802 msgid "Change Grid..." msgstr "Alterar grade..." -#: ../bin/csplit.c:45 +#: ../bin/csplit.c:41 msgid "Set Block Gaps" msgstr "Configurar espaçamento de bloco" -#: ../bin/csplit.c:72 +#: ../bin/csplit.c:68 msgid "Select track to split" msgstr "Selecionar trecho a seccionar" -#: ../bin/csplit.c:106 -#: ../bin/dbench.c:64 -#: ../bin/dbench.c:75 +#: ../bin/csplit.c:84 +#, fuzzy +msgid "Can't Split that Track" +msgstr "Secciona um trilho" + +#: ../bin/csplit.c:108 ../bin/dbench.c:69 ../bin/dbench.c:80 msgid "Left" msgstr "Esquerda" -#: ../bin/csplit.c:107 -#: ../bin/dbench.c:65 -#: ../bin/dbench.c:74 +#: ../bin/csplit.c:109 ../bin/dbench.c:70 ../bin/dbench.c:79 msgid "Right" msgstr "Direita" -#: ../bin/csplit.c:108 -#: ../bin/csplit.c:113 +#: ../bin/csplit.c:110 ../bin/csplit.c:115 msgid "Both" msgstr "Ambos" -#: ../bin/csplit.c:111 +#: ../bin/csplit.c:113 msgid "Top" msgstr "Em cima" -#: ../bin/csplit.c:112 +#: ../bin/csplit.c:114 msgid "Bottom" msgstr "Em baixo" -#: ../bin/cstraigh.c:49 -msgid "Place 1st end point of Straight track" +#: ../bin/cstraigh.c:58 +#, fuzzy +msgid "" +"Place 1st end point of Straight track + Shift -> snap to unconnected endpoint" msgstr "Posicionar 1ª extremidade do trecho reto" -#: ../bin/cstraigh.c:55 +#: ../bin/cstraigh.c:74 +msgid "" +"No Unconnected end-point on track - Try again or release shift and click" +msgstr "" + +#: ../bin/cstraigh.c:80 +msgid "Not on a Track - Try again or release shift and click" +msgstr "" + +#: ../bin/cstraigh.c:89 msgid "Drag to place 2nd end point" msgstr "Arrastar à posição da 2ª extremidade" -#: ../bin/cstraigh.c:67 +#: ../bin/cstraigh.c:110 #, c-format msgid "Straight Track Length=%s Angle=%0.3f" msgstr "Trecho reto Comprimento=%s Ângulo=%0.3f" -#: ../bin/cstraigh.c:104 -#: ../bin/tstraigh.c:254 +#: ../bin/cstraigh.c:158 ../bin/tstraigh.c:267 msgid "Straight Track" msgstr "Trecho reto" -#: ../bin/cstruct.c:64 -#: ../bin/cturnout.c:70 -#: ../bin/doption.c:191 -#: ../bin/doption.c:294 +#: ../bin/cstruct.c:72 ../bin/cturnout.c:78 ../bin/doption.c:100 +#: ../bin/doption.c:208 msgid "Hide" msgstr "Esconder" -#: ../bin/cstruct.c:319 -#: ../bin/cstruct.c:346 +#: ../bin/cstruct.c:327 ../bin/cstruct.c:354 msgid "Pier Number" msgstr "Número do pilar" -#: ../bin/cstruct.c:431 +#: ../bin/cstruct.c:439 #, c-format msgid "Scale %d:1" msgstr "Escala %d:1" -#: ../bin/cstruct.c:433 +#: ../bin/cstruct.c:441 #, c-format msgid "Width %s" msgstr "Largura %s" -#: ../bin/cstruct.c:435 +#: ../bin/cstruct.c:443 #, c-format msgid "Height %s" msgstr "Altura %s" -#: ../bin/cstruct.c:533 +#: ../bin/cstruct.c:541 msgid "Place Structure" msgstr "Posicionar estrutura" -#: ../bin/cstruct.c:643 +#: ../bin/cstruct.c:651 msgid "Drag to place" msgstr "Arrastar ao destino" -#: ../bin/cstruct.c:670 +#: ../bin/cstruct.c:679 msgid "Drag to rotate" msgstr "Arrastar para rotacionar" -#: ../bin/cstruct.c:691 +#: ../bin/cstruct.c:700 #, c-format msgid "Angle = %0.3f" msgstr "Ângulo = %0.3f" -#: ../bin/cstruct.c:776 +#: ../bin/cstruct.c:786 msgid "Select Structure and then drag to place" msgstr "Selecionar estrutura e arrastar ao destino" -#: ../bin/cstruct.c:794 -#: ../bin/cstruct.c:881 -msgid "Left drag to move, right drag to rotate, or press Return or click Ok to finalize" -msgstr "Arrastar clicanco o botão esquerdo do mouse para mover, botão direito para rotacionar, pressionar \"Return\" ou clicar em \"Ok\" para finalizar" +#: ../bin/cstruct.c:804 ../bin/cstruct.c:891 +msgid "" +"Left drag to move, right drag to rotate, or press Return or click Ok to " +"finalize" +msgstr "" +"Arrastar clicanco o botão esquerdo do mouse para mover, botão direito para " +"rotacionar, pressionar \"Return\" ou clicar em \"Ok\" para finalizar" -#: ../bin/cstruct.c:874 -#: ../bin/cturnout.c:2511 +#: ../bin/cstruct.c:884 ../bin/cturnout.c:2541 #, c-format msgid "Place %s and draw into position" msgstr "Posicionar %s e desenhar na posição" -#: ../bin/cswitchmotor.c:102 -#: ../bin/cswitchmotor.c:143 +#: ../bin/cswitchmotor.c:89 ../bin/cswitchmotor.c:108 +#: ../bin/cswitchmotor.c:219 msgid "Point Sense" msgstr "Aportar direção" -#: ../bin/cswitchmotor.c:179 +#: ../bin/cswitchmotor.c:109 +#, fuzzy +msgid "Turnout Number" +msgstr "Número da parte" + +#: ../bin/cswitchmotor.c:255 msgid "Change Switch Motor" msgstr "Alterar motor de AMV" -#: ../bin/cswitchmotor.c:238 -msgid "Switch Motor" +#: ../bin/cswitchmotor.c:316 +#, fuzzy +msgid "Switch motor" msgstr "Motor de AMV" -#: ../bin/cswitchmotor.c:361 -#: ../bin/cswitchmotor.c:383 -#: ../bin/cswitchmotor.c:520 +#: ../bin/cswitchmotor.c:395 +#, c-format +msgid "ResolveSwitchmotor: Turnout T%d: T%d doesn't exist" +msgstr "" + +#: ../bin/cswitchmotor.c:462 ../bin/cswitchmotor.c:625 +msgid "Switch motor must have a name!" +msgstr "" + +#: ../bin/cswitchmotor.c:466 msgid "Create Switch Motor" msgstr "Criar motor de AMV" -#: ../bin/cswitchmotor.c:397 -#: ../bin/cswitchmotor.c:427 -#: ../bin/cswitchmotor.c:459 +#: ../bin/cswitchmotor.c:491 +#, fuzzy +msgid "Create switch motor" +msgstr "Criar motor de AMV" + +#: ../bin/cswitchmotor.c:505 ../bin/cswitchmotor.c:536 +#: ../bin/cswitchmotor.c:568 msgid "Select a turnout" msgstr "Selecionar um AMV" -#: ../bin/cswitchmotor.c:404 +#: ../bin/cswitchmotor.c:512 msgid "Not a turnout!" msgstr "Isto não é um AMV!" -#: ../bin/cswitchmotor.c:436 -msgid "Not a SwitchMotor!" +#: ../bin/cswitchmotor.c:545 ../bin/cswitchmotor.c:576 +#, fuzzy +msgid "Not a switch motor!" msgstr "Isto não é um motor de AMV!" -#: ../bin/cswitchmotor.c:467 -msgid "Not a Switch Motor!" -msgstr "Isto não é um motor de AMV!" - -#: ../bin/cswitchmotor.c:472 -#, c-format -msgid "Really delete Switch Motor %s?" +#: ../bin/cswitchmotor.c:581 +#, fuzzy, c-format +msgid "Really delete switch motor %s?" msgstr "Eliminar motor de AMV %s?" -#: ../bin/cswitchmotor.c:473 -#: ../bin/cswitchmotor.c:522 +#: ../bin/cswitchmotor.c:582 msgid "Delete Switch Motor" msgstr "Eliminar motor de AMV" -#: ../bin/cswitchmotor.c:519 -msgid "SwitchMotor" -msgstr "Motor de AMV" +#: ../bin/cswitchmotor.c:629 +#, fuzzy +msgid "Modify Switch Motor" +msgstr "Editar motor de AMV" -#: ../bin/cswitchmotor.c:519 -msgid "Switch Motors" -msgstr "Motores de AMV" +#: ../bin/cswitchmotor.c:655 +#, fuzzy +msgid "Edit switch motor" +msgstr "Editar motor de AMV" -#: ../bin/cswitchmotor.c:521 -msgid "Edit Switch Motor" +#: ../bin/cswitchmotor.c:661 +#, fuzzy, c-format +msgid "Edit switch motor %d" msgstr "Editar motor de AMV" -#: ../bin/ctext.c:170 -#: ../bin/ctext.c:208 +#: ../bin/cswitchmotor.c:769 +msgid "Switch Motor" +msgstr "Motor de AMV" + +#: ../bin/cswitchmotor.c:781 +#, fuzzy, c-format +msgid "Deleting Switch Motor %s" +msgstr "Eliminar motor de AMV" + +#: ../bin/ctext.c:196 ../bin/ctext.c:235 msgid "Create Text" msgstr "Criar texto" -#: ../bin/ctext.c:238 +#: ../bin/ctext.c:266 msgid "Fonts..." msgstr "Fontes..." -#: ../bin/ctodesgn.c:106 +#: ../bin/ctodesgn.c:114 msgid "Frog #" msgstr "Jacaré No." -#: ../bin/ctodesgn.c:106 +#: ../bin/ctodesgn.c:114 msgid "Degrees" msgstr "Graus" -#: ../bin/ctodesgn.c:133 -#: ../bin/ctodesgn.c:134 -#: ../bin/ctodesgn.c:182 -#: ../bin/ctodesgn.c:205 -#: ../bin/ctodesgn.c:207 -#: ../bin/ctodesgn.c:243 -#: ../bin/ctodesgn.c:244 -#: ../bin/ctodesgn.c:280 -#: ../bin/ctodesgn.c:282 -#: ../bin/ctodesgn.c:497 +#: ../bin/ctodesgn.c:141 ../bin/ctodesgn.c:142 ../bin/ctodesgn.c:190 +#: ../bin/ctodesgn.c:213 ../bin/ctodesgn.c:215 ../bin/ctodesgn.c:251 +#: ../bin/ctodesgn.c:252 ../bin/ctodesgn.c:288 ../bin/ctodesgn.c:290 +#: ../bin/ctodesgn.c:505 msgid "Offset" msgstr "Distância" -#: ../bin/ctodesgn.c:142 -#: ../bin/ctodesgn.c:1759 -#: ../bin/ctodesgn.c:1760 +#: ../bin/ctodesgn.c:150 ../bin/ctodesgn.c:1767 ../bin/ctodesgn.c:1768 msgid "Left Description" msgstr "Descrição a esquerda" -#: ../bin/ctodesgn.c:143 -#: ../bin/ctodesgn.c:146 +#: ../bin/ctodesgn.c:151 ../bin/ctodesgn.c:154 msgid " #" msgstr " No." -#: ../bin/ctodesgn.c:145 -#: ../bin/ctodesgn.c:1758 +#: ../bin/ctodesgn.c:153 ../bin/ctodesgn.c:1766 msgid "Right Description" msgstr "Descrição a direita" -#: ../bin/ctodesgn.c:147 +#: ../bin/ctodesgn.c:155 msgid "Roadbed Width" msgstr "Largura do leito" -#: ../bin/ctodesgn.c:151 -#: ../bin/denum.c:51 -#: ../wlib/gtklib/CVS/Base/psprint.c:1253 -#: ../wlib/gtklib/psprint.c:1253 +#: ../bin/ctodesgn.c:159 ../bin/denum.c:56 msgid "Print Setup" msgstr "Setup de impressão" -#: ../bin/ctodesgn.c:180 +#: ../bin/ctodesgn.c:188 msgid "Diverging Length" msgstr "Comprimento divergente" -#: ../bin/ctodesgn.c:181 +#: ../bin/ctodesgn.c:189 msgid "Diverging Angle" msgstr "Ângulo divergente" -#: ../bin/ctodesgn.c:182 +#: ../bin/ctodesgn.c:190 msgid "Diverging Offset" msgstr "Distância de divergência" -#: ../bin/ctodesgn.c:183 +#: ../bin/ctodesgn.c:191 msgid "Overall Length" msgstr "Comprimento total" -#: ../bin/ctodesgn.c:193 +#: ../bin/ctodesgn.c:201 msgid "Regular Turnout" msgstr "AMV regular" -#: ../bin/ctodesgn.c:203 +#: ../bin/ctodesgn.c:211 msgid "Inner Length" msgstr "Comprimento interno" -#: ../bin/ctodesgn.c:204 +#: ../bin/ctodesgn.c:212 msgid "Inner Angle" msgstr "Ângulo interno" -#: ../bin/ctodesgn.c:205 +#: ../bin/ctodesgn.c:213 msgid "Inner Offset" msgstr "Distância interna" -#: ../bin/ctodesgn.c:206 +#: ../bin/ctodesgn.c:214 msgid "Outer Angle" msgstr "Ângulo externo" -#: ../bin/ctodesgn.c:207 +#: ../bin/ctodesgn.c:215 msgid "Outer Offset" msgstr "Distância externa" -#: ../bin/ctodesgn.c:208 +#: ../bin/ctodesgn.c:216 msgid "Outer Length" msgstr "Comprimento externo" -#: ../bin/ctodesgn.c:230 +#: ../bin/ctodesgn.c:238 msgid "Curved Turnout" msgstr "AMV curvo" -#: ../bin/ctodesgn.c:241 -#: ../bin/ctodesgn.c:278 +#: ../bin/ctodesgn.c:249 ../bin/ctodesgn.c:286 msgid "Left Length" msgstr "Comprimento a esquerda" -#: ../bin/ctodesgn.c:242 -#: ../bin/ctodesgn.c:279 +#: ../bin/ctodesgn.c:250 ../bin/ctodesgn.c:287 msgid "Left Angle" msgstr "Ângulo a esquerda" -#: ../bin/ctodesgn.c:243 -#: ../bin/ctodesgn.c:280 +#: ../bin/ctodesgn.c:251 ../bin/ctodesgn.c:288 msgid "Left Offset" msgstr "Distância esquerda" -#: ../bin/ctodesgn.c:244 -#: ../bin/ctodesgn.c:282 +#: ../bin/ctodesgn.c:252 ../bin/ctodesgn.c:290 msgid "Right Offset" msgstr "Distância direita" -#: ../bin/ctodesgn.c:245 -#: ../bin/ctodesgn.c:283 +#: ../bin/ctodesgn.c:253 ../bin/ctodesgn.c:291 msgid "Right Angle" msgstr "Ângulo a direita" -#: ../bin/ctodesgn.c:246 -#: ../bin/ctodesgn.c:284 +#: ../bin/ctodesgn.c:254 ../bin/ctodesgn.c:292 msgid "Right Length" msgstr "Comprimento a direita" -#: ../bin/ctodesgn.c:268 +#: ../bin/ctodesgn.c:276 msgid "Wye Turnout" msgstr "AMV em Y" -#: ../bin/ctodesgn.c:309 +#: ../bin/ctodesgn.c:317 msgid "3-way Turnout" msgstr "AMV de 3 posições" -#: ../bin/ctodesgn.c:329 +#: ../bin/ctodesgn.c:337 msgid "Crossing" msgstr "Cruzamento" -#: ../bin/ctodesgn.c:350 +#: ../bin/ctodesgn.c:358 msgid "Single Slipswitch" msgstr "Slipswitch simples" -#: ../bin/ctodesgn.c:371 +#: ../bin/ctodesgn.c:379 msgid "Double Slipswitch" msgstr "Slipswitch duplo" -#: ../bin/ctodesgn.c:391 +#: ../bin/ctodesgn.c:399 msgid "Right Crossover" msgstr "Sobrecruzamento direito" -#: ../bin/ctodesgn.c:411 +#: ../bin/ctodesgn.c:419 msgid "Left Crossover" msgstr "Sobrecruzamento esquerdo" -#: ../bin/ctodesgn.c:431 +#: ../bin/ctodesgn.c:439 msgid "Double Crossover" msgstr "Sobrecruzamento duplo" -#: ../bin/ctodesgn.c:449 +#: ../bin/ctodesgn.c:457 msgid "Straight Section" msgstr "Seção reta" -#: ../bin/ctodesgn.c:460 +#: ../bin/ctodesgn.c:468 msgid "Angle (Degrees)" msgstr "Ângulo (em graus)" -#: ../bin/ctodesgn.c:468 +#: ../bin/ctodesgn.c:476 msgid "Curved Section" msgstr "Seção curva" -#: ../bin/ctodesgn.c:487 +#: ../bin/ctodesgn.c:495 msgid "Bumper Section" msgstr "Seção de parachoque" # Esse texto possui dois contextos diferentes. Favor alterar software para distingui-los. -#: ../bin/ctodesgn.c:497 -#: ../bin/denum.c:109 -#: ../bin/denum.c:172 -#: ../bin/denum.c:201 -#: ../bin/denum.c:202 -#: ../bin/dlayer.c:328 +#: ../bin/ctodesgn.c:505 ../bin/denum.c:123 ../bin/denum.c:186 +#: ../bin/denum.c:218 ../bin/denum.c:219 ../bin/dlayer.c:455 msgid "Count" msgstr "Posição" -#: ../bin/ctodesgn.c:498 +#: ../bin/ctodesgn.c:506 msgid "Radius1" msgstr "Raio 1" -#: ../bin/ctodesgn.c:499 +#: ../bin/ctodesgn.c:507 msgid "Radius2" msgstr "Raio 2" -#: ../bin/ctodesgn.c:579 +#: ../bin/ctodesgn.c:587 msgid "Turntable Section" msgstr "Virador de locomotivas" -#: ../bin/ctodesgn.c:1413 +#: ../bin/ctodesgn.c:1421 #, c-format msgid "%s Designer" msgstr "Editor %s" -#: ../bin/ctodesgn.c:1417 +#: ../bin/ctodesgn.c:1425 +#, c-format +msgid "%s %d x %d (of %d x %d)" +msgstr "" + +#: ../bin/ctodesgn.c:1425 msgid "Page" msgstr "Página" -#: ../bin/ctodesgn.c:1425 +#: ../bin/ctodesgn.c:1433 msgid "Frog Number" msgstr "Número do jacaré" -#: ../bin/ctodesgn.c:1712 +#: ../bin/ctodesgn.c:1720 msgid "Turnout Designer" msgstr "Editor de AMV" -#: ../bin/ctodesgn.c:1722 +#: ../bin/ctodesgn.c:1730 #, c-format msgid "%s %s Designer" msgstr "Editor %s %s" -#: ../bin/ctrain.c:170 -#: ../bin/dcar.c:1986 -#: ../bin/dcar.c:4070 -#: ../bin/dcar.c:4075 +#: ../bin/ctrain.c:181 ../bin/dcar.c:1994 ../bin/dcar.c:4078 +#: ../bin/dcar.c:4083 msgid "Index" msgstr "Ãndice" -#: ../bin/ctrain.c:176 -#: ../bin/dcar.c:4071 +#: ../bin/ctrain.c:187 ../bin/dcar.c:4079 msgid "Rep Marks" msgstr "Abreviaturas" -#: ../bin/ctrain.c:240 +#: ../bin/ctrain.c:261 msgid "Car" msgstr "Material rodante" -#: ../bin/ctrain.c:544 +#: ../bin/ctrain.c:592 msgid "Follow" msgstr "Seguido" -#: ../bin/ctrain.c:545 +#: ../bin/ctrain.c:593 msgid "Auto Reverse" msgstr "Auto reverso" -#: ../bin/ctrain.c:564 -#: ../bin/dcar.c:4955 +#: ../bin/ctrain.c:612 ../bin/dcar.c:4966 msgid "Find" msgstr "Encontrar" # não seria melhor "Procurar" -#: ../bin/ctrain.c:570 -#: ../bin/ctrain.c:770 -#: ../bin/ctrain.c:1027 +#: ../bin/ctrain.c:618 ../bin/ctrain.c:877 ../bin/ctrain.c:1187 +#: ../wlib/gtklib/ixhelp.c:239 msgid "Forward" msgstr "Rodar" -#: ../bin/ctrain.c:572 -#: ../bin/ctrain.c:2556 -#: ../bin/dcar.c:4409 -#: ../bin/dcar.c:4419 -#: ../bin/dcar.c:4538 -#: ../bin/fileio.c:240 -#: ../bin/macro.c:78 +#: ../bin/ctrain.c:620 ../bin/ctrain.c:3027 ../bin/dcar.c:4418 +#: ../bin/dcar.c:4428 ../bin/dcar.c:4548 ../bin/fileio.c:236 ../bin/macro.c:87 msgid "Stop" msgstr "Parar" -#: ../bin/ctrain.c:723 -#: ../bin/ctrain.c:746 +#: ../bin/ctrain.c:818 ../bin/ctrain.c:847 msgid "Crashed" msgstr "Colisão" -#: ../bin/ctrain.c:725 +#: ../bin/ctrain.c:820 msgid "Not on Track" msgstr "Isso não é um trilho" -#: ../bin/ctrain.c:728 +#: ../bin/ctrain.c:824 msgid "Trains Paused" msgstr "Trens parados" -#: ../bin/ctrain.c:730 +#: ../bin/ctrain.c:826 msgid "Running" msgstr "Rodando" -#: ../bin/ctrain.c:734 +#: ../bin/ctrain.c:831 msgid "End of Track" msgstr "Fim da linha" -#: ../bin/ctrain.c:737 +#: ../bin/ctrain.c:835 msgid "Open Turnout" msgstr "AMV aberto" -#: ../bin/ctrain.c:740 +#: ../bin/ctrain.c:839 msgid "Manual Stop" msgstr "Parada manual" -#: ../bin/ctrain.c:743 +#: ../bin/ctrain.c:843 msgid "No Room" msgstr "Espaço insuficiente" -#: ../bin/ctrain.c:749 +#: ../bin/ctrain.c:851 msgid "Unknown Status" msgstr "Estado desconhecido" -#: ../bin/ctrain.c:758 +#: ../bin/ctrain.c:861 msgid "No trains" msgstr "Nenhum trem" -#: ../bin/ctrain.c:1076 +#: ../bin/ctrain.c:1238 msgid "Train Control XXX" msgstr "Controle do trem XXX" -#: ../bin/ctrain.c:1077 +#: ../bin/ctrain.c:1239 #, c-format msgid "Train Control %d" msgstr "Controle do trem %d" -#: ../bin/ctrain.c:1079 +#: ../bin/ctrain.c:1241 msgid "Train Control" msgstr "Controle de trem" -#: ../bin/ctrain.c:2017 -#: ../bin/dcar.c:1962 -msgid "Road" -msgstr "Companhia" - -#: ../bin/ctrain.c:2017 -#: ../bin/dcar.c:1966 -msgid "Number" -msgstr "Número" - -#: ../bin/ctrain.c:2054 -#: ../bin/ctrain.c:2536 +#: ../bin/ctrain.c:3004 msgid "Train" msgstr "Trem" -#: ../bin/ctrain.c:2551 +#: ../bin/ctrain.c:3017 msgid "Uncouple" msgstr "Desengatar" -#: ../bin/ctrain.c:2552 +#: ../bin/ctrain.c:3019 msgid "Flip Car" msgstr "Virar material rodante" -#: ../bin/ctrain.c:2553 +#: ../bin/ctrain.c:3021 msgid "Flip Train" msgstr "Virar trem" -#: ../bin/ctrain.c:2554 +#: ../bin/ctrain.c:3023 msgid "MU Master" msgstr "MU Master" -#: ../bin/ctrain.c:2555 +#: ../bin/ctrain.c:3026 msgid "Change Direction" msgstr "Alternar direção" -#: ../bin/ctrain.c:2558 +#: ../bin/ctrain.c:3030 msgid "Remove Car" msgstr "Remover material rodante" -#: ../bin/ctrain.c:2559 +#: ../bin/ctrain.c:3033 msgid "Remove Train" msgstr "Remover trem" -#: ../bin/cturnout.c:81 -#: ../bin/dcar.c:2008 -#: ../bin/dcar.c:2012 -#: ../bin/dcustmgm.c:59 -#: ../wlib/gtklib/CVS/Base/psprint.c:1256 -#: ../wlib/gtklib/CVS/Base/psprint.c:1274 -#: ../wlib/gtklib/psprint.c:1256 -#: ../wlib/gtklib/psprint.c:1274 +#: ../bin/cturnout.c:89 ../bin/dcar.c:2016 ../bin/dcar.c:2020 +#: ../bin/dcustmgm.c:64 msgid "New" msgstr "Novo" -#: ../bin/cturnout.c:191 +#: ../bin/cturnout.c:201 #, c-format msgid "Turnout path[%d:%d] out of bounds: %d" msgstr "AMV[%d:%d] fora do limite: %d" -#: ../bin/cturnout.c:203 -#: ../bin/cturnout.c:208 +#: ../bin/cturnout.c:213 ../bin/cturnout.c:218 #, c-format msgid "Turnout path[%d] %d is not a track segment" msgstr "AMV[%d] %d não se encontra em um segmento" -#: ../bin/cturnout.c:216 +#: ../bin/cturnout.c:226 #, c-format msgid "Turnout path[%d] %d-%d not connected: %0.3f" msgstr "AMV [%d] %d-%d não conectado: %0.3f" -#: ../bin/cturnout.c:252 +#: ../bin/cturnout.c:262 msgid "Unknown special case" msgstr "Caso especial desconhecido" -#: ../bin/cturnout.c:358 +#: ../bin/cturnout.c:368 msgid "Connect Adjustable Tracks" msgstr "Conectar trechos ajustáveis" -#: ../bin/cturnout.c:917 +#: ../bin/cturnout.c:927 msgid "splitTurnout: can't find segment" msgstr "Dividir AMV: não foi possivel encontrar segmento" -#: ../bin/cturnout.c:1327 -#: ../bin/track.c:1863 -#: ../bin/tstraigh.c:529 +#: ../bin/cturnout.c:1337 ../bin/track.c:1952 ../bin/tstraigh.c:542 msgid "Drag to change track length" msgstr "Arrastar para alterar comprimento do trecho" -#: ../bin/cturnout.c:1338 +#: ../bin/cturnout.c:1348 #, c-format msgid "Length=%s" msgstr "Comprimento=%s" -#: ../bin/cturnout.c:1582 -#: ../bin/cturnout.c:2555 +#: ../bin/cturnout.c:1609 ../bin/cturnout.c:2585 msgid "TURNOUT " msgstr "AMV " -#: ../bin/cturnout.c:1930 +#: ../bin/cturnout.c:1960 #, c-format msgid "%d connections, max distance %0.3f (%s)" msgstr "%d conexões, distancia máxima %0.3f (%s)" -#: ../bin/cturnout.c:1935 +#: ../bin/cturnout.c:1965 #, c-format msgid "0 connections (%s)" msgstr "0 conexões (%s)" -#: ../bin/cturnout.c:1975 +#: ../bin/cturnout.c:2005 msgid "Place New Turnout" msgstr "Posicionar novo AMV" -#: ../bin/cturnout.c:2234 -#: ../bin/cturnout.c:2290 -#: ../bin/cturnout.c:2406 -#: ../bin/cturnout.c:2518 -msgid "Left drag to move, right drag to rotate, press Space or Return to fix track in place or Esc to cancel" -msgstr "Arrastar com o botão esquerdo do mouse para mover, direito para rotacionar, pressionar barra de espaço ou \"Enter\" para fixar trecho ou \"Esc\" para anular" +#: ../bin/cturnout.c:2264 ../bin/cturnout.c:2320 ../bin/cturnout.c:2436 +#: ../bin/cturnout.c:2548 +msgid "" +"Left drag to move, right drag to rotate, press Space or Return to fix track " +"in place or Esc to cancel" +msgstr "" +"Arrastar com o botão esquerdo do mouse para mover, direito para rotacionar, " +"pressionar barra de espaço ou \"Enter\" para fixar trecho ou \"Esc\" para " +"anular" -#: ../bin/cturnout.c:2281 +#: ../bin/cturnout.c:2311 #, c-format msgid "Angle = %0.3f (%s)" msgstr "Ângulo = %0.3f (%s)" -#: ../bin/cturnout.c:2371 -#: ../bin/param.c:2563 +#: ../bin/cturnout.c:2401 ../bin/param.c:2468 msgid "Close" msgstr "Fechar" -#: ../bin/cturnout.c:2388 +#: ../bin/cturnout.c:2418 msgid "Pick turnout and active End Point, then place on the layout" msgstr "Selecionar AMV e ativar extremidade, e então posicionar no layout" -#: ../bin/cturntbl.c:47 -#: ../bin/cturntbl.c:240 -#: ../bin/cturntbl.c:766 -#: ../bin/cturntbl.c:779 +#: ../bin/cturntbl.c:52 ../bin/cturntbl.c:246 ../bin/cturntbl.c:795 +#: ../bin/cturntbl.c:808 msgid "Diameter" msgstr "Diâmetro" -#: ../bin/cturntbl.c:241 +#: ../bin/cturntbl.c:247 msgid "# EndPt" msgstr "No. da extremidade" -#: ../bin/cturntbl.c:272 +#: ../bin/cturntbl.c:281 #, c-format msgid "Turntable(%d): Layer=%d Center=[%s %s] Diameter=%s #EP=%d" -msgstr "Virador(%d): Camada=%d Centro=[%s %s] Diâmetro=%s No. da extremidade=%d" +msgstr "" +"Virador(%d): Camada=%d Centro=[%s %s] Diâmetro=%s No. da extremidade=%d" -#: ../bin/cturntbl.c:286 -#: ../bin/cturntbl.c:824 +#: ../bin/cturntbl.c:296 ../bin/cturntbl.c:853 msgid "Turntable" msgstr "Virador de locomotivas" -#: ../bin/cturntbl.c:544 +#: ../bin/cturntbl.c:554 msgid "Drag to create stall track" msgstr "Arrastar para criar ramo" -#: ../bin/cturntbl.c:796 +#: ../bin/cturntbl.c:825 msgid "Create Turntable" msgstr "Criar virador de locomotivas" -#: ../bin/cundo.c:154 +#: ../bin/cundo.c:166 msgid "Undo Trace" msgstr "Desfazer traço" -#: ../bin/cundo.c:488 +#: ../bin/cundo.c:501 #, c-format msgid "Undo: %s" msgstr "Desfazer: %s" -#: ../bin/cundo.c:491 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:125 +#: ../bin/cundo.c:504 ../../../../build/work/app/bin/bllnhlp.c:136 msgid "Undo last command" msgstr "Desfazer último comando" -#: ../bin/cundo.c:496 +#: ../bin/cundo.c:509 #, c-format msgid "Redo: %s" msgstr "Refazer: %s" -#: ../bin/cundo.c:499 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:99 +#: ../bin/cundo.c:512 ../../../../build/work/app/bin/bllnhlp.c:106 msgid "Redo last undo" msgstr "Refazer último comando" -#: ../bin/custom.c:153 +#: ../bin/custom.c:164 #, c-format msgid "%s Turnout Designer" msgstr "Editor de AMV %s" -#: ../bin/custom.c:158 +#: ../bin/custom.c:169 #, c-format msgid "%s Version %s" msgstr "%s versão %s" -#: ../bin/custom.c:163 +#: ../bin/custom.c:174 #, c-format msgid "%s Files|*.xtc" msgstr "%s Arquivos|*.xtc" -#: ../bin/custom.c:168 +#: ../bin/custom.c:179 #, c-format msgid "%s Import Files|*.%sti" msgstr "%s importar arquivos|*.%sti" -#: ../bin/custom.c:173 +#: ../bin/custom.c:184 msgid "Data Exchange Format Files|*.dxf" msgstr "Arquivos Data Exchange Format|*.dxf" -#: ../bin/custom.c:177 +#: ../bin/custom.c:188 #, c-format msgid "%s Record Files|*.%str" msgstr "%s Arquivos de registro|*.%str" -#: ../bin/custom.c:182 +#: ../bin/custom.c:193 #, c-format msgid "%s Note Files|*.not" msgstr "%s Arquivos de notas|*.not" -#: ../bin/custom.c:187 +#: ../bin/custom.c:198 #, c-format msgid "%s Log Files|*.log" msgstr "%s Arquivos de Log|*.log" -#: ../bin/custom.c:192 +#: ../bin/custom.c:203 #, c-format msgid "%s PartsList Files|*.txt" msgstr "%s Arquivos de Material|*.txt" -#: ../bin/dbench.c:38 +#: ../bin/dbench.c:43 msgid " L-Girder" msgstr " Viga mestra em L" -#: ../bin/dbench.c:38 +#: ../bin/dbench.c:43 msgid " T-Girder" msgstr "Viga mestra em T" -#: ../bin/dbench.c:61 +#: ../bin/dbench.c:66 msgid "On Edge" msgstr "À borda" -#: ../bin/dbench.c:62 +#: ../bin/dbench.c:67 msgid "Flat" msgstr "Plano" -#: ../bin/dbench.c:66 +#: ../bin/dbench.c:71 msgid "Left-Down" msgstr "Abaixo à esquerda" -#: ../bin/dbench.c:67 +#: ../bin/dbench.c:72 msgid "Right-Down" msgstr "Abaixo à direita" -#: ../bin/dbench.c:68 +#: ../bin/dbench.c:73 msgid "Left-Up" msgstr "Acima à esquerda" -#: ../bin/dbench.c:69 +#: ../bin/dbench.c:74 msgid "Right-Up" msgstr "Acima à direita" -#: ../bin/dbench.c:70 +#: ../bin/dbench.c:75 msgid "Left-Inverted" msgstr "Esquerdo invertido" -#: ../bin/dbench.c:71 +#: ../bin/dbench.c:76 msgid "Right-Inverted" msgstr "Direito invertido" -#: ../bin/dbench.c:76 +#: ../bin/dbench.c:81 msgid "Inverted" msgstr "Invertido" -#: ../bin/dbench.c:142 +#: ../bin/dbench.c:147 #, c-format msgid "" "Bad BenchType for %s:\n" @@ -2662,758 +2785,690 @@ msgstr "" "Tipo de bancada não apropriada para %s:\n" "%s" -#: ../bin/dbench.c:142 -#: ../bin/dcar.c:4225 -#: ../bin/dcar.c:4409 -#: ../bin/dcar.c:4419 -#: ../bin/dcar.c:4466 -#: ../bin/dcar.c:4473 -#: ../bin/dcar.c:4491 -#: ../bin/dcar.c:4504 -#: ../bin/dcar.c:4509 -#: ../bin/dcar.c:4538 -#: ../bin/dcar.c:4699 -#: ../bin/fileio.c:240 -#: ../bin/fileio.c:528 -#: ../bin/fileio.c:646 -#: ../bin/fileio.c:739 -#: ../bin/fileio.c:926 -#: ../bin/fileio.c:1202 -#: ../bin/fileio.c:1338 -#: ../bin/fileio.c:1421 -#: ../bin/fileio.c:1461 -#: ../bin/macro.c:163 -#: ../bin/macro.c:831 -#: ../bin/macro.c:847 -#: ../bin/macro.c:1150 -#: ../bin/param.c:2042 -#: ../bin/track.c:920 -#: ../bin/track.c:1262 -#: ../bin/track.c:1552 -#: ../bin/track.c:1556 -#: ../bin/track.c:1576 -#: ../bin/track.c:1638 -#: ../wlib/gtklib/CVS/Base/wpref.c:241 -#: ../wlib/gtklib/CVS/Base/wpref.c:248 -#: ../wlib/gtklib/wpref.c:241 -#: ../wlib/gtklib/wpref.c:248 -msgid "Continue" -msgstr "Continuar" - -#: ../bin/dbitmap.c:99 -#: ../bin/dbitmap.c:103 +#: ../bin/dbitmap.c:102 ../bin/dbitmap.c:106 msgid "Drawn with " msgstr "Desenhado com " -#: ../bin/dbitmap.c:113 +#: ../bin/dbitmap.c:116 msgid "Drawing tracks to BitMap" msgstr "Desenhando layout em bitmap" -#: ../bin/dbitmap.c:120 +#: ../bin/dbitmap.c:123 msgid "Writing BitMap to file" msgstr "Gravando bitmap em arquivo" -#: ../bin/dbitmap.c:141 +#: ../bin/dbitmap.c:144 msgid "Print Titles" msgstr "Imprimir títulos" -#: ../bin/dbitmap.c:141 +#: ../bin/dbitmap.c:144 msgid "Print Borders" msgstr "Imprimir bordas" -#: ../bin/dbitmap.c:142 +#: ../bin/dbitmap.c:145 msgid "Print Centerline" msgstr "Imprimir linha central" # São realmente necessários os espaços no texto? -#: ../bin/dbitmap.c:149 +#: ../bin/dbitmap.c:152 msgid " dpi" msgstr " PPP (pontos por polegada)" -#: ../bin/dbitmap.c:151 +#: ../bin/dbitmap.c:154 msgid "Bitmap : 99999 by 99999 pixels" msgstr "Bitmap : 99999 por 99999 pixels" -#: ../bin/dbitmap.c:153 +#: ../bin/dbitmap.c:156 msgid "Approximate file size: 999.9Mb" msgstr "Tamanho aproximado do arquivo: 999.9 Mb" -#: ../bin/dbitmap.c:183 +#: ../bin/dbitmap.c:186 #, c-format msgid "Bitmap : %ld by %ld pixels" msgstr "Bitmap : %ld por %ld pixels" -#: ../bin/dbitmap.c:187 +#: ../bin/dbitmap.c:190 #, c-format msgid "Approximate file size : %0.0f" msgstr "Tamanho aproximado do arquivo : %0.0f" -#: ../bin/dbitmap.c:189 +#: ../bin/dbitmap.c:192 #, c-format msgid "Approximate file size : %0.1fKb" msgstr "Tamanho aproximado do arquivo : %0.1f Kb" -#: ../bin/dbitmap.c:191 +#: ../bin/dbitmap.c:194 #, c-format msgid "Approximate file size : %0.1fMb" msgstr "Tamanho aproximado do arquivo : %0.1f Mb" -#: ../bin/dbitmap.c:205 -#: ../bin/misc.c:1026 -#: ../bin/misc.c:1096 -#: ../bin/param.c:2563 -#: ../wlib/gtklib/CVS/Base/psprint.c:834 -#: ../wlib/gtklib/CVS/Base/psprint.c:1284 -#: ../wlib/gtklib/psprint.c:834 -#: ../wlib/gtklib/psprint.c:1284 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:512 +#: ../bin/dbitmap.c:208 ../bin/misc.c:1043 ../bin/misc.c:1113 +#: ../bin/param.c:2468 ../wlib/gtklib/browserhelp.c:127 +#: ../../../../build/work/app/bin/bllnhlp.c:539 msgid "Cancel" msgstr "Anular" -#: ../bin/dbitmap.c:210 +#: ../bin/dbitmap.c:213 msgid "Save Bitmap" msgstr "Gravar bitmap" -#: ../bin/dbitmap.c:212 +#: ../bin/dbitmap.c:215 msgid "Bitmap files|*.bmp" msgstr "Arquivos bitmap:*.bmp" -#: ../bin/dbitmap.c:214 +#: ../bin/dbitmap.c:217 msgid "Bitmap files|*.xpm" msgstr "Arquivos bitmap|*.xpm" -#: ../bin/dbitmap.c:235 +#: ../bin/dbitmap.c:238 msgid "BitMap" msgstr "Bitmap" -#: ../bin/dcar.c:45 +#: ../bin/dcar.c:53 msgid "Truck" msgstr "Truque" -#: ../bin/dcar.c:45 +#: ../bin/dcar.c:53 msgid "Body" msgstr "Carcaça" -#: ../bin/dcar.c:146 -#: ../bin/dcar.c:2437 -#: ../bin/dcar.c:2441 +#: ../bin/dcar.c:154 ../bin/dcar.c:2445 ../bin/dcar.c:2449 msgid "Unknown" msgstr "Desconhecido" -#: ../bin/dcar.c:479 +#: ../bin/dcar.c:487 msgid "Diesel Loco" msgstr "Locomotiva à diesel" -#: ../bin/dcar.c:480 +#: ../bin/dcar.c:488 msgid "Steam Loco" msgstr "Locomotiva à vapor" -#: ../bin/dcar.c:481 +#: ../bin/dcar.c:489 msgid "Elect Loco" msgstr "Locomotiva elétrica" -#: ../bin/dcar.c:482 +#: ../bin/dcar.c:490 msgid "Freight Car" msgstr "Vagão de carga" -#: ../bin/dcar.c:483 +#: ../bin/dcar.c:491 msgid "Psngr Car" msgstr "Vagão de passageiro" -#: ../bin/dcar.c:484 +#: ../bin/dcar.c:492 msgid "M-O-W" msgstr "Carros de manutenção de linha" -#: ../bin/dcar.c:485 -#: ../bin/doption.c:197 +#: ../bin/dcar.c:493 ../bin/doption.c:108 msgid "Other" msgstr "Outros" -#: ../bin/dcar.c:1084 -#: ../bin/dcar.c:4776 +#: ../bin/dcar.c:1092 ../bin/dcar.c:4787 msgid "N/A" msgstr "N/A" -#: ../bin/dcar.c:1085 -#: ../bin/dcar.c:4781 +#: ../bin/dcar.c:1093 ../bin/dcar.c:4792 msgid "Mint" msgstr "Perfeito" -#: ../bin/dcar.c:1086 -#: ../bin/dcar.c:4780 +#: ../bin/dcar.c:1094 ../bin/dcar.c:4791 msgid "Excellent" msgstr "Excelente" -#: ../bin/dcar.c:1087 -#: ../bin/dcar.c:4779 +#: ../bin/dcar.c:1095 ../bin/dcar.c:4790 msgid "Good" msgstr "Bom" -#: ../bin/dcar.c:1088 -#: ../bin/dcar.c:4778 +#: ../bin/dcar.c:1096 ../bin/dcar.c:4789 msgid "Fair" msgstr "Médio" -#: ../bin/dcar.c:1089 -#: ../bin/dcar.c:4777 +#: ../bin/dcar.c:1097 ../bin/dcar.c:4788 msgid "Poor" msgstr "Regular" -#: ../bin/dcar.c:1365 -#: ../bin/dpricels.c:46 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:383 +#: ../bin/dcar.c:1373 ../bin/dpricels.c:45 +#: ../../../../build/work/app/bin/bllnhlp.c:404 msgid "Item" msgstr "Item" -#: ../bin/dcar.c:1912 -#: ../wlib/gtklib/gtkmisc.c:398 -#: ../wlib/mswlib/mswmisc.c:1701 +#: ../bin/dcar.c:1920 ../wlib/gtklib/notice.c:91 ../wlib/mswlib/mswmisc.c:1967 msgid "Information" msgstr "Informação" -#: ../bin/dcar.c:1912 +#: ../bin/dcar.c:1920 msgid "Customize" msgstr "Personalização" -#: ../bin/dcar.c:1924 +#: ../bin/dcar.c:1932 msgid "Sequential" msgstr "Sequencial" -#: ../bin/dcar.c:1924 +#: ../bin/dcar.c:1932 msgid "Repeated" msgstr "Repetido" -#: ../bin/dcar.c:1935 -#: ../bin/dcar.c:1937 -#: ../bin/dcar.c:5106 +#: ../bin/dcar.c:1943 ../bin/dcar.c:1945 ../bin/dcar.c:5117 msgid "Prototype" msgstr "Protótipo" -#: ../bin/dcar.c:1941 -#: ../bin/dcar.c:4070 -#: ../bin/dcar.c:4075 +#: ../bin/dcar.c:1949 ../bin/dcar.c:4078 ../bin/dcar.c:4083 msgid "Type" msgstr "Tipo" -#: ../bin/dcar.c:1943 +#: ../bin/dcar.c:1951 msgid "Part" msgstr "Parte" -#: ../bin/dcar.c:1945 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:326 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:496 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:497 +#: ../bin/dcar.c:1953 ../../../../build/work/app/bin/bllnhlp.c:347 +#: ../../../../build/work/app/bin/bllnhlp.c:523 +#: ../../../../build/work/app/bin/bllnhlp.c:524 msgid "Part Number" msgstr "Número da parte" -#: ../bin/dcar.c:1947 +#: ../bin/dcar.c:1955 msgid "Loco?" msgstr "Locomotiva?" -#: ../bin/dcar.c:1951 -#: ../bin/dcar.c:4108 +#: ../bin/dcar.c:1959 ../bin/dcar.c:4116 msgid "Import" msgstr "Importar" -#: ../bin/dcar.c:1958 +#: ../bin/dcar.c:1966 msgid "Mode" msgstr "Modo" -#: ../bin/dcar.c:1964 +#: ../bin/dcar.c:1970 +msgid "Road" +msgstr "Companhia" + +#: ../bin/dcar.c:1972 msgid "Reporting Mark" msgstr "Abreviatura" -#: ../bin/dcar.c:1970 +#: ../bin/dcar.c:1974 +msgid "Number" +msgstr "Número" + +#: ../bin/dcar.c:1978 msgid "Car Length" msgstr "Comprimento do material rodante" -#: ../bin/dcar.c:1974 +#: ../bin/dcar.c:1982 msgid "Truck Centers" msgstr "Centro dos truques" -#: ../bin/dcar.c:1976 +#: ../bin/dcar.c:1984 msgid "Coupler Mount" msgstr "Engate" -#: ../bin/dcar.c:1978 +#: ../bin/dcar.c:1986 msgid "Coupled Length" msgstr "Comprimento engatado" -#: ../bin/dcar.c:1980 -#: ../bin/dcar.c:3946 +#: ../bin/dcar.c:1988 ../bin/dcar.c:3954 msgid "Coupler Length" msgstr "Comprimento do engate" -#: ../bin/dcar.c:1988 +#: ../bin/dcar.c:1996 msgid "Purchase Price" msgstr "Preço de compra" -#: ../bin/dcar.c:1990 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:199 +#: ../bin/dcar.c:1998 ../../../../build/work/app/bin/bllnhlp.c:213 msgid "Current Price" msgstr "Preço atual" -#: ../bin/dcar.c:1992 -#: ../bin/dcar.c:4072 -#: ../bin/dcar.c:4077 +#: ../bin/dcar.c:2000 ../bin/dcar.c:4080 ../bin/dcar.c:4085 msgid "Condition" msgstr "Condição" -#: ../bin/dcar.c:1994 +#: ../bin/dcar.c:2002 msgid "Purchase Date" msgstr "Data de compra" -#: ../bin/dcar.c:1996 -#: ../bin/dcar.c:4077 +#: ../bin/dcar.c:2004 ../bin/dcar.c:4085 msgid "Service Date" msgstr "Data do serviço" -#: ../bin/dcar.c:1998 +#: ../bin/dcar.c:2006 msgid "Quantity" msgstr "Quantidade" -#: ../bin/dcar.c:2000 +#: ../bin/dcar.c:2008 msgid "Numbers" msgstr "Números" -#: ../bin/dcar.c:2002 -#: ../bin/dcar.c:4073 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:61 +#: ../bin/dcar.c:2010 ../bin/dcar.c:4081 +#: ../../../../build/work/app/i18n/custmsg.h:61 msgid "Notes" msgstr "Notas" -#: ../bin/dcar.c:2009 -#: ../bin/dcustmgm.c:60 +#: ../bin/dcar.c:2017 ../bin/dcustmgm.c:65 msgid "Car Part" msgstr "Parte do material rodante" -#: ../bin/dcar.c:2010 -#: ../bin/dcustmgm.c:61 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:174 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:175 +#: ../bin/dcar.c:2018 ../bin/dcustmgm.c:66 +#: ../../../../build/work/app/bin/bllnhlp.c:188 +#: ../../../../build/work/app/bin/bllnhlp.c:189 msgid "Car Prototype" msgstr "Protótipo do material rodante" -#: ../bin/dcar.c:2371 -#: ../bin/dcar.c:2688 +#: ../bin/dcar.c:2379 ../bin/dcar.c:2696 msgid "Undecorated" msgstr "Sem pintura" -#: ../bin/dcar.c:2429 -#: ../bin/dcar.c:2433 -#: ../bin/fileio.c:646 +#: ../bin/dcar.c:2437 ../bin/dcar.c:2441 ../bin/fileio.c:656 msgid "Custom" msgstr "Personalizado" -#: ../bin/dcar.c:2598 +#: ../bin/dcar.c:2606 msgid "Undecorated " msgstr "Sem pintura " -#: ../bin/dcar.c:2818 +#: ../bin/dcar.c:2826 #, c-format msgid "New %s Scale Car" msgstr "Novo material rodante na escala %s" -#: ../bin/dcar.c:2819 -#: ../bin/dcar.c:2828 -#: ../bin/dcar.c:2837 -#: ../bin/dcar.c:3976 -#: ../bin/dcar.c:4104 +#: ../bin/dcar.c:2827 ../bin/dcar.c:2836 ../bin/dcar.c:2845 ../bin/dcar.c:3984 +#: ../bin/dcar.c:4112 msgid "Add" msgstr "Adicionar" -#: ../bin/dcar.c:2821 +#: ../bin/dcar.c:2829 #, c-format msgid "Update %s Scale Car" msgstr "Atualizar material rodante na escala %s" -#: ../bin/dcar.c:2822 -#: ../bin/dcar.c:2831 -#: ../bin/dcar.c:2840 -#: ../bin/dcmpnd.c:168 +#: ../bin/dcar.c:2830 ../bin/dcar.c:2839 ../bin/dcar.c:2848 +#: ../bin/dcmpnd.c:172 msgid "Update" msgstr "Atualizar" -#: ../bin/dcar.c:2827 +#: ../bin/dcar.c:2835 #, c-format msgid "New %s Scale Car Part" msgstr "Novo material rodante na escala %s" -#: ../bin/dcar.c:2830 +#: ../bin/dcar.c:2838 #, c-format msgid "Update %s Scale Car Part" msgstr "Atualizar material rodante na escala %s" -#: ../bin/dcar.c:2836 +#: ../bin/dcar.c:2844 msgid "New Prototype" msgstr "Novo protótipo" -#: ../bin/dcar.c:2839 +#: ../bin/dcar.c:2847 msgid "Update Prototype" msgstr "Atualizar protótipo" -#: ../bin/dcar.c:3482 +#: ../bin/dcar.c:3490 msgid "Enter a 8 digit numeric date" msgstr "Digitar uma data de 8 dígitos numéricos" -#: ../bin/dcar.c:3485 +#: ../bin/dcar.c:3493 msgid "Enter a 8 digit date" msgstr "Digitar uma data de 8 dígitos" -#: ../bin/dcar.c:3487 +#: ../bin/dcar.c:3495 msgid "Enter a date between 19000101 and 21991231" msgstr "Digitar uma data entre 19000101 e 21991231" -#: ../bin/dcar.c:3492 +#: ../bin/dcar.c:3500 msgid "Invalid month" msgstr "Mês inválido" -#: ../bin/dcar.c:3494 +#: ../bin/dcar.c:3502 msgid "Invalid day" msgstr "Dia inválido" -#: ../bin/dcar.c:3580 +#: ../bin/dcar.c:3588 msgid "Enter a Prototype name" msgstr "Digitar um nome para o protótipo" -#: ../bin/dcar.c:3582 +#: ../bin/dcar.c:3590 msgid "Select or Enter a Manufacturer" msgstr "Selecionar ou digitar o fabricante" -#: ../bin/dcar.c:3584 +#: ../bin/dcar.c:3592 msgid "Enter a Part Number" msgstr "Digitar o número do item" -#: ../bin/dcar.c:3586 +#: ../bin/dcar.c:3594 msgid "Enter the Car Length" msgstr "Digitar o comprimento do material rodante" -#: ../bin/dcar.c:3588 +#: ../bin/dcar.c:3596 msgid "Enter the Car Width" msgstr "Digitar a largura do material rodante" -#: ../bin/dcar.c:3590 +#: ../bin/dcar.c:3598 msgid "Enter the Truck Centers" msgstr "Digitar o centro dos truques" -#: ../bin/dcar.c:3592 +#: ../bin/dcar.c:3600 msgid "Truck Centers must be less than Car Length" -msgstr "O centro dos truques devem ser menores que o comprimento do material rodante" +msgstr "" +"O centro dos truques devem ser menores que o comprimento do material rodante" -#: ../bin/dcar.c:3594 +#: ../bin/dcar.c:3602 msgid "Enter the Coupled Length or Coupler Length" msgstr "Digitar o comprimento engatado ou o comprimento do engate" -#: ../bin/dcar.c:3596 +#: ../bin/dcar.c:3604 msgid "Enter the Coupled Length" msgstr "Digitar o comprimento engatado" -#: ../bin/dcar.c:3598 +#: ../bin/dcar.c:3606 msgid "Enter a item Index" msgstr "Digitar um índice para o item" -#: ../bin/dcar.c:3600 +#: ../bin/dcar.c:3608 msgid "Purchase Price is not valid" msgstr "Preço de compra inválido" -#: ../bin/dcar.c:3602 +#: ../bin/dcar.c:3610 msgid "Current Price is not valid" msgstr "Preço atual inválido" -#: ../bin/dcar.c:3604 +#: ../bin/dcar.c:3612 msgid "Purchase Date is not valid" msgstr "Data de compra inválida" -#: ../bin/dcar.c:3606 +#: ../bin/dcar.c:3614 msgid "Service Date is not valid" msgstr "Data de serviço inválida" -#: ../bin/dcar.c:3609 +#: ../bin/dcar.c:3617 #, c-format msgid "Item Index %ld duplicated an existing item: updated to new value" msgstr "Ãndice do item %ld já existente. Atualizado para um novo valor" -#: ../bin/dcar.c:3804 +#: ../bin/dcar.c:3812 #, c-format msgid "Added %ld new Cars" msgstr "%ld novos materiais rodantes adicionados" -#: ../bin/dcar.c:3806 +#: ../bin/dcar.c:3814 msgid "Added new Car" msgstr "Adicionar novo material rodante" -#: ../bin/dcar.c:3809 +#: ../bin/dcar.c:3817 msgid "Updated Car" msgstr "Atualizar material rodante" -#: ../bin/dcar.c:3812 +#: ../bin/dcar.c:3820 msgid " and Part" msgstr " e item" -#: ../bin/dcar.c:3839 +#: ../bin/dcar.c:3847 #, c-format msgid "%s Part: %s %s %s %s %s %s" msgstr "Item %s: %s %s %s %s %s %s" -#: ../bin/dcar.c:3839 -#: ../bin/dcar.c:3856 +#: ../bin/dcar.c:3847 ../bin/dcar.c:3864 msgid "Added new" msgstr "Adicionado um novo" -#: ../bin/dcar.c:3839 -#: ../bin/dcar.c:3856 +#: ../bin/dcar.c:3847 ../bin/dcar.c:3864 msgid "Updated" msgstr "Atualizado" -#: ../bin/dcar.c:3855 +#: ../bin/dcar.c:3863 #, c-format msgid "%s Prototype: %s%s." msgstr "Protótipo %s: %s%s." -#: ../bin/dcar.c:3857 +#: ../bin/dcar.c:3865 msgid ". Enter new values or press Close" msgstr ". Digitar novos valores ou clicar em \"Fechar\"" -#: ../bin/dcar.c:3976 +#: ../bin/dcar.c:3984 msgid "New Car Part" msgstr "Novo item de material rodante" -#: ../bin/dcar.c:4071 -#: ../bin/dcar.c:4076 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:356 +#: ../bin/dcar.c:4079 ../bin/dcar.c:4084 +#: ../../../../build/work/app/bin/bllnhlp.c:377 msgid "Roadname" msgstr "Ferrovia" -#: ../bin/dcar.c:4071 +#: ../bin/dcar.c:4079 msgid "Purc Price" msgstr "Preço de compra" -#: ../bin/dcar.c:4072 -#: ../bin/dcar.c:4077 +#: ../bin/dcar.c:4080 ../bin/dcar.c:4085 msgid "Curr Price" msgstr "Preço atual" -#: ../bin/dcar.c:4072 +#: ../bin/dcar.c:4080 msgid "Purc Date" msgstr "Data de compra" -#: ../bin/dcar.c:4072 +#: ../bin/dcar.c:4080 msgid "Srvc Date" msgstr "Data de serviço" -#: ../bin/dcar.c:4073 +#: ../bin/dcar.c:4081 msgid "Locat'n" msgstr "Localização" -#: ../bin/dcar.c:4076 +#: ../bin/dcar.c:4084 msgid "RepMarks" msgstr "Abreviaturas" -#: ../bin/dcar.c:4076 +#: ../bin/dcar.c:4084 msgid "Purch Price" msgstr "Preço de compra" -#: ../bin/dcar.c:4077 +#: ../bin/dcar.c:4085 msgid "Purch Date" msgstr "Data de compra" -#: ../bin/dcar.c:4094 +#: ../bin/dcar.c:4102 msgid "Sort By" msgstr "Ordenado por" -#: ../bin/dcar.c:4102 -#: ../bin/dcustmgm.c:53 -#: ../bin/dcustmgm.c:90 +#: ../bin/dcar.c:4110 ../bin/dcontmgm.c:99 ../bin/dcustmgm.c:58 +#: ../bin/dcustmgm.c:95 msgid "Edit" msgstr "Editar" -#: ../bin/dcar.c:4106 -#: ../bin/dcustmgm.c:55 -#: ../bin/misc.c:2045 +#: ../bin/dcar.c:4114 ../bin/dcontmgm.c:101 ../bin/dcustmgm.c:60 +#: ../bin/misc.c:1993 msgid "Delete" msgstr "Apagar" -#: ../bin/dcar.c:4110 -#: ../bin/fileio.c:1202 +#: ../bin/dcar.c:4118 ../bin/fileio.c:1212 msgid "Export" msgstr "Exportar" -#: ../bin/dcar.c:4112 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:513 +#: ../bin/dcar.c:4120 ../../../../build/work/app/bin/bllnhlp.c:540 msgid "List" msgstr "Listar" -#: ../bin/dcar.c:4225 -#: ../bin/dcar.c:4955 -#: ../bin/misc.c:2302 +#: ../bin/dcar.c:4234 ../bin/dcar.c:4966 ../bin/misc.c:2262 msgid "Car Inventory" msgstr "Invetário de material rodante" -#: ../bin/dcar.c:4345 +#: ../bin/dcar.c:4354 msgid "List Cars" msgstr "Listar material rodante" -#: ../bin/dcar.c:4466 -#: ../bin/dcar.c:4629 +#: ../bin/dcar.c:4476 ../bin/dcar.c:4639 msgid "Import Cars" msgstr "Importar material rodante" -#: ../bin/dcar.c:4630 -#: ../bin/dcar.c:4751 +#: ../bin/dcar.c:4640 ../bin/dcar.c:4762 msgid "Comma-Separated-Values|*.csv" msgstr "Valores separados por vírgulas|*.csv" -#: ../bin/dcar.c:4699 -#: ../bin/dcar.c:4750 +#: ../bin/dcar.c:4710 ../bin/dcar.c:4761 msgid "Export Cars" msgstr "Exportar material rodante" -#: ../bin/dcar.c:4784 +#: ../bin/dcar.c:4795 msgid "Layout" msgstr "Layout" -#: ../bin/dcar.c:4786 +#: ../bin/dcar.c:4797 msgid "Shelf" msgstr "Prateleira" -#: ../bin/dcmpnd.c:72 -#: ../bin/dlayer.c:330 -#: ../bin/misc.c:468 -#: ../bin/misc.c:496 +#: ../bin/dcmpnd.c:76 ../bin/dlayer.c:457 ../bin/misc.c:480 ../bin/misc.c:509 msgid "Load" msgstr "Carregar" -#: ../bin/dcmpnd.c:105 +#: ../bin/dcmpnd.c:109 msgid "Updating definitions, please wait" msgstr "Atualizando definições. Aguardar, por favor" -#: ../bin/dcmpnd.c:168 +#: ../bin/dcmpnd.c:172 msgid "Update Title" msgstr "Atualizar título" -#: ../bin/dcmpnd.c:229 +#: ../bin/dcmpnd.c:232 #, c-format msgid "End-Point #%d of the selected and actual turnouts are not close" msgstr "Extremidade No.%d dos AMVs selecionado e corrente não estão próximos" -#: ../bin/dcmpnd.c:238 +#: ../bin/dcmpnd.c:241 #, c-format msgid "End-Point #%d of the selected and actual turnouts are not aligned" msgstr "Extremidade No.%d dos AMVs selecionado e corrente não estão próximos" -#: ../bin/dcmpnd.c:257 +#: ../bin/dcmpnd.c:260 msgid "The selected Turnout had a differing number of End-Points" msgstr "O AMV selecionado tem um número diferente de extremidades" -#: ../bin/dcmpnd.c:318 +#: ../bin/dcmpnd.c:321 msgid "Skip" msgstr "Próximo" -#: ../bin/dcmpnd.c:350 +#: ../bin/dcmpnd.c:353 #, c-format msgid "%d Track(s) refreshed" msgstr "%d trilho(s) redesenhado(s)" -#: ../bin/dcmpnd.c:390 +#: ../bin/dcmpnd.c:393 msgid "Refresh Turnout/Structure" msgstr "Atualizar AMV/estrutura" -#: ../bin/dcmpnd.c:392 +#: ../bin/dcmpnd.c:395 msgid "Choose a Turnout/Structure to replace:" msgstr "Escolher um AMV/estrutura para substituir:" -#: ../bin/dcmpnd.c:402 -#: ../bin/doption.c:192 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:31 +#: ../bin/dcmpnd.c:405 ../bin/doption.c:101 +#: ../../../../build/work/app/i18n/custmsg.h:31 msgid "Turnouts" msgstr "AMVs" -#: ../bin/dcmpnd.c:402 +#: ../bin/dcmpnd.c:405 msgid "Structures" msgstr "Estruturas" -#: ../bin/dcmpnd.c:431 +#: ../bin/dcmpnd.c:434 msgid "Choose another Turnout/Structure to replace:" msgstr "Escolher um(a) outro(a) AMV/estrutura para substituir:" -#: ../bin/dcmpnd.c:535 +#: ../bin/dcmpnd.c:536 msgid "Rename Object" msgstr "Renomear objeto" -#: ../bin/dcustmgm.c:57 +#: ../bin/dcontmgm.c:92 ../bin/doption.c:108 +msgid "Tracks" +msgstr "Trilhos" + +#: ../bin/dcontmgm.c:173 +#, c-format +msgid "Are you sure you want to delete the %d control element(s)" +msgstr "" + +#: ../bin/dcontmgm.c:176 +#, fuzzy +msgid "Control Elements" +msgstr "Elementos de controle de layout" + +#: ../bin/dcontmgm.c:300 +#, fuzzy +msgid "Manage Layout Control Elements" +msgstr "Elementos de controle de layout" + +#: ../bin/dcustmgm.c:62 msgid "Move To" msgstr "Mover para" -#: ../bin/dcustmgm.c:90 +#: ../bin/dcustmgm.c:95 msgid "Rename" msgstr "Renomear" -#: ../bin/dcustmgm.c:157 +#: ../bin/dcustmgm.c:162 msgid "Label" msgstr "Etiqueta" -#: ../bin/dcustmgm.c:192 +#: ../bin/dcustmgm.c:200 msgid "Contents Label" msgstr "Texto da etiqueta" -#: ../bin/dcustmgm.c:239 +#: ../bin/dcustmgm.c:247 msgid "Move To XTP" msgstr "Mover para arquivo de parâmetros" -#: ../bin/dcustmgm.c:240 +#: ../bin/dcustmgm.c:248 msgid "Parameter File|*.xtp" msgstr "Arquivo de parâmetros|*.xtp" -#: ../bin/dcustmgm.c:350 -msgid "Custom Update" -msgstr "Atualizar personalizadamente" +#: ../bin/dcustmgm.c:358 +#, fuzzy +msgid "Manage custom designed parts" +msgstr "Manipula entradas do editor personalizado" -#: ../bin/dease.c:63 +#: ../bin/dease.c:64 msgid "Sharp" msgstr "Agudo" -#: ../bin/dease.c:63 +#: ../bin/dease.c:64 msgid "Broad" msgstr "Largo" -#: ../bin/dease.c:70 +#: ../bin/dease.c:64 +msgid "Cornu" +msgstr "" + +#: ../bin/dease.c:71 msgid "Value" msgstr "Valor" -#: ../bin/dease.c:71 -#: ../bin/tease.c:503 +#: ../bin/dease.c:72 ../bin/tease.c:509 msgid "R" msgstr "D" -#: ../bin/dease.c:73 -#: ../bin/tease.c:504 +#: ../bin/dease.c:74 ../bin/tease.c:510 msgid "L" msgstr "E" -#: ../bin/dease.c:220 +#: ../bin/dease.c:230 msgid "Easement" msgstr "Curva de transição" -#: ../bin/denum.c:44 +#: ../bin/denum.c:49 msgid "Prices" msgstr "Preços" -#: ../bin/denum.c:49 +#: ../bin/denum.c:54 msgid "Save As ..." msgstr "Salvar como..." -#: ../bin/denum.c:120 -#: ../bin/denum.c:175 -#: ../bin/denum.c:207 +#: ../bin/denum.c:134 ../bin/denum.c:189 ../bin/denum.c:224 msgid "Each" msgstr "Cada" -#: ../bin/denum.c:134 -#: ../bin/denum.c:135 +#: ../bin/denum.c:148 ../bin/denum.c:149 msgid "Parts List" msgstr "Lista de itens" -#: ../bin/denum.c:140 +#: ../bin/denum.c:154 #, c-format msgid "" "%s Parts List\n" @@ -3422,621 +3477,642 @@ msgstr "" "Lista de itens %s\n" "\n" -#: ../bin/denum.c:175 -#: ../bin/denum.c:209 -#: ../bin/denum.c:217 +#: ../bin/denum.c:189 ../bin/denum.c:226 ../bin/denum.c:235 msgid "Extended" msgstr "Subtotal" -#: ../bin/denum.c:217 -#: ../bin/denum.c:220 +#: ../bin/denum.c:235 ../bin/denum.c:238 msgid "Total" msgstr "Total" -#: ../bin/dlayer.c:322 +#: ../bin/dlayer.c:449 msgid "Visible" msgstr "Visível" -#: ../bin/dlayer.c:326 +#: ../bin/dlayer.c:451 +msgid "Frozen" +msgstr "Congelado" + +#: ../bin/dlayer.c:453 msgid "On Map" msgstr "No mapa" -#: ../bin/dlayer.c:329 +#: ../bin/dlayer.c:456 msgid "Personal Preferences" msgstr "Preferências pessoais" -#: ../bin/dlayer.c:331 -#: ../bin/draw.c:1311 -#: ../bin/macro.c:1239 +#: ../bin/dlayer.c:458 ../bin/macro.c:1246 msgid "Save" msgstr "Salvar" -#: ../bin/dlayer.c:332 +#: ../bin/dlayer.c:459 msgid "Defaults" msgstr "Valores iniciais" -#: ../bin/dlayer.c:333 +#: ../bin/dlayer.c:460 msgid "Number of Layer Buttons" msgstr "Número de botões de camadas" -#: ../bin/dlayer.c:350 -#: ../bin/dlayer.c:733 -#: ../bin/dlayer.c:743 -#: ../bin/dlayer.c:787 -#: ../bin/dlayer.c:966 +#: ../bin/dlayer.c:477 ../bin/dlayer.c:893 ../bin/dlayer.c:905 +#: ../bin/dlayer.c:950 msgid "Main" msgstr "Principal" -#: ../bin/dlayer.c:455 -#: ../bin/dlayer.c:688 -#: ../bin/dlayer.c:745 -#: ../bin/dlayer.c:789 -#: ../bin/dlayer.c:958 +#: ../bin/dlayer.c:587 ../bin/dlayer.c:836 ../bin/dlayer.c:908 +#: ../bin/dlayer.c:952 ../bin/dlayer.c:1190 msgid "Show/Hide Layer" msgstr "Mostrar/Ocultar camada" -#: ../bin/dlayer.c:849 +#: ../bin/dlayer.c:1023 msgid "Layers" msgstr "Camadas" -#: ../bin/doption.c:102 -msgid "Room Width" -msgstr "Largura do cômodo" - -#: ../bin/doption.c:103 -msgid " Height" -msgstr " Comprimento" - -#: ../bin/doption.c:104 -msgid "Layout Title" -msgstr "Título do layout" - -#: ../bin/doption.c:105 -msgid "Subtitle" -msgstr "Subtítulo" - -# Seria possível remover os espaços do texto original? -#: ../bin/doption.c:107 -msgid " Gauge" -msgstr " Bitola" - -#: ../bin/doption.c:108 -msgid "Min Track Radius" -msgstr "Raio mínimo" - -#: ../bin/doption.c:109 -msgid " Max Track Grade" -msgstr "Inclinação máxima" - -#: ../bin/doption.c:150 -msgid "Layout Options" -msgstr "Opções de layout" - -#: ../bin/doption.c:190 +#: ../bin/doption.c:99 msgid "Auto Pan" msgstr "Auto panorâmico" -#: ../bin/doption.c:191 +#: ../bin/doption.c:100 msgid "Dash" msgstr "Tracejado" -#: ../bin/doption.c:192 +#: ../bin/doption.c:101 msgid "All" msgstr "Tudo" -#: ../bin/doption.c:193 +#: ../bin/doption.c:102 +msgid "Thick" +msgstr "" + +#: ../bin/doption.c:102 +#, fuzzy +msgid "Exception" +msgstr "Trecho excepcional" + +#: ../bin/doption.c:103 msgid "Outline" msgstr "Traçado" -#: ../bin/doption.c:193 +#: ../bin/doption.c:103 msgid "Solid" msgstr "Sólido" -#: ../bin/doption.c:194 +#: ../bin/doption.c:104 +msgid "Off" +msgstr "Desligado" + +#: ../bin/doption.c:104 +msgid "On" +msgstr "Ligado" + +#: ../bin/doption.c:105 msgid "Track Descriptions" msgstr "Descrição dos trilhos" -#: ../bin/doption.c:194 +#: ../bin/doption.c:105 msgid "Lengths" msgstr "Comprimentos" -#: ../bin/doption.c:194 +#: ../bin/doption.c:105 msgid "EndPt Elevations" msgstr "Extremidades das elevações" -#: ../bin/doption.c:194 +#: ../bin/doption.c:105 msgid "Track Elevations" msgstr "Elevações dos trilhos" -#: ../bin/doption.c:194 +#: ../bin/doption.c:105 msgid "Cars" msgstr "Material rodante" -#: ../bin/doption.c:195 -#: ../bin/doption.c:196 +#: ../bin/doption.c:106 ../bin/doption.c:107 msgid "Descr" msgstr "Descrição" -#: ../bin/doption.c:196 +#: ../bin/doption.c:107 msgid "Manuf" msgstr "Fabricante" -#: ../bin/doption.c:197 -msgid "Tracks" -msgstr "Trilhos" - -#: ../bin/doption.c:198 +#: ../bin/doption.c:109 msgid "Live Map" msgstr "Mapa em \"tempo real\"" -#: ../bin/doption.c:199 +#: ../bin/doption.c:110 msgid "Hide Trains On Hidden Track" msgstr "Ocultar trens em trecho escondido" -#: ../bin/doption.c:201 -msgid "Off" -msgstr "Desligado" - -#: ../bin/doption.c:201 -msgid "On" -msgstr "Ligado" +#: ../bin/doption.c:111 +msgid "Zoom keeps lower corner in view" +msgstr "" -#: ../bin/doption.c:206 +#: ../bin/doption.c:116 msgid "Color Layers" msgstr "Cores das camadas" -#: ../bin/doption.c:207 +#: ../bin/doption.c:117 msgid "Draw Tunnel" msgstr "Desenhar túnel" -#: ../bin/doption.c:208 +#: ../bin/doption.c:118 msgid "Draw EndPts" msgstr "Desenhar extremidades" -#: ../bin/doption.c:209 +#: ../bin/doption.c:119 +#, fuzzy +msgid "Draw Unconnected EndPts" +msgstr "Desenhar extremidades" + +#: ../bin/doption.c:120 msgid "Draw Ties" msgstr "Desenhar dormentes" -#: ../bin/doption.c:210 +#: ../bin/doption.c:121 +#, fuzzy +msgid "Draw Centers" +msgstr "Arrastar ao centro" + +#: ../bin/doption.c:122 msgid "Two Rail Scale" msgstr "Escala de duas linhas" -#: ../bin/doption.c:211 +#: ../bin/doption.c:123 msgid "Map Scale" msgstr "Mapa da escala" -#: ../bin/doption.c:214 +#: ../bin/doption.c:127 msgid "Label Enable" msgstr "Etiqueta disponível" -#: ../bin/doption.c:215 +#: ../bin/doption.c:128 msgid "Label Scale" msgstr "Etiqueta de escala" -#: ../bin/doption.c:216 +#: ../bin/doption.c:129 msgid "Label Font Size" msgstr "Etiqueta do tamanho da fonte" -#: ../bin/doption.c:217 +#: ../bin/doption.c:130 msgid "Hot Bar Labels" msgstr "Etiquetas do barra de itens" -#: ../bin/doption.c:218 +#: ../bin/doption.c:131 msgid "Layout Labels" msgstr "Etiquetas do layout" -#: ../bin/doption.c:219 +#: ../bin/doption.c:132 msgid "List Labels" msgstr "Etiquetas das listas" -#: ../bin/doption.c:221 +#: ../bin/doption.c:135 msgid "Car Labels" msgstr "Etiquetas do material rodante" -#: ../bin/doption.c:222 +#: ../bin/doption.c:136 msgid "Train Update Delay" msgstr "Tempo de atualização do trem" -#: ../bin/doption.c:250 +#: ../bin/doption.c:164 msgid "Display Options" msgstr "Opções de tela" -#: ../bin/doption.c:251 +#: ../bin/doption.c:165 msgid "Proto" msgstr "Protótipo" -#: ../bin/doption.c:252 +#: ../bin/doption.c:166 msgid "Proto/Manuf" msgstr "Protótipo / fabricante" -#: ../bin/doption.c:253 +#: ../bin/doption.c:167 msgid "Proto/Manuf/Part Number" msgstr "Protótipo / fabricante / número do item" -#: ../bin/doption.c:254 +#: ../bin/doption.c:168 msgid "Proto/Manuf/Partno/Item" msgstr "Protótipo / fabricante / número do item / item" -#: ../bin/doption.c:255 +#: ../bin/doption.c:169 msgid "Manuf/Proto" msgstr "Fabricante / protótipo" -#: ../bin/doption.c:256 +#: ../bin/doption.c:170 msgid "Manuf/Proto/Part Number" msgstr "Fabricante / protótipo / número do item" -#: ../bin/doption.c:257 +#: ../bin/doption.c:171 msgid "Manuf/Proto/Partno/Item" msgstr "Fabricante / protótipo / número do item / item" -#: ../bin/doption.c:288 +#: ../bin/doption.c:202 msgid "End-Points" msgstr "Extremidades" -#: ../bin/doption.c:291 -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:12 -msgid "Describe" -msgstr "Descrever" - -#: ../bin/doption.c:296 +#: ../bin/doption.c:210 msgid "Normal: Command List, Shift: Command Options" msgstr "Normal: lista de comandos, Shift: opções dos comandos" -#: ../bin/doption.c:296 +#: ../bin/doption.c:210 msgid "Normal: Command Options, Shift: Command List" msgstr "Normal: opções dos comandos, Shift: lista de comandos" -#: ../bin/doption.c:299 +#: ../bin/doption.c:213 msgid "Draw Moving Tracks" msgstr "Desenhar trechos sendo arrastados" -#: ../bin/doption.c:300 +#: ../bin/doption.c:214 msgid "Default Command" msgstr "Comando padrão" -#: ../bin/doption.c:302 +#: ../bin/doption.c:216 msgid "Hide Selection Window" msgstr "Ocultar janela de seleção" -#: ../bin/doption.c:304 +#: ../bin/doption.c:218 msgid "Right Click" msgstr "Clicar com o botão direito" -#: ../bin/doption.c:330 +#: ../bin/doption.c:244 msgid "Command Options" msgstr "Opções de comandos" -#: ../bin/doption.c:354 +#: ../bin/doption.c:268 msgid "English" msgstr "Inglês" -#: ../bin/doption.c:354 +#: ../bin/doption.c:268 msgid "Metric" msgstr "Métrico" -#: ../bin/doption.c:355 +#: ../bin/doption.c:269 msgid "Polar" msgstr "Polar" -#: ../bin/doption.c:355 +#: ../bin/doption.c:269 msgid "Cartesian" msgstr "Cartesiano" -#: ../bin/doption.c:356 +#: ../bin/doption.c:270 msgid "Balloon Help" msgstr "Balão de ajuda" -#: ../bin/doption.c:357 +#: ../bin/doption.c:271 msgid "Load Last Layout" msgstr "Carregar último layout" -#: ../bin/doption.c:357 +#: ../bin/doption.c:271 msgid "Start New Layout" msgstr "Começar um novo layout" -#: ../bin/doption.c:360 +#: ../bin/doption.c:274 msgid "Angles" msgstr "Ângulos" -#: ../bin/doption.c:361 +#: ../bin/doption.c:275 msgid "Units" msgstr "Unidades" -#: ../bin/doption.c:363 +#: ../bin/doption.c:277 msgid "Length Format" msgstr "Formato do comprimento" -#: ../bin/doption.c:364 +#: ../bin/doption.c:278 msgid "Min Track Length" msgstr "Comprimento do trecho mínimo" -#: ../bin/doption.c:365 +#: ../bin/doption.c:279 msgid "Connection Distance" msgstr "Distância de conexão" -#: ../bin/doption.c:366 +#: ../bin/doption.c:280 msgid "Connection Angle" msgstr "Ângulo de conexão" -#: ../bin/doption.c:367 +#: ../bin/doption.c:281 msgid "Turntable Angle" msgstr "Ângulo do girador de locomotivas" -#: ../bin/doption.c:368 +#: ../bin/doption.c:282 msgid "Max Coupling Speed" msgstr "Velocidade máxima de engate" -#: ../bin/doption.c:370 +#: ../bin/doption.c:284 msgid "Drag Distance" msgstr "Distância para arrastar" -#: ../bin/doption.c:371 +#: ../bin/doption.c:285 msgid "Drag Timeout" msgstr "Tempo máximo para arrastar" -#: ../bin/doption.c:372 +#: ../bin/doption.c:286 msgid "Min Grid Spacing" msgstr "Espaço mínimo do gride" -#: ../bin/doption.c:373 +#: ../bin/doption.c:287 msgid "Check Point" msgstr "Freqüência de salvamento automático." -#: ../bin/doption.c:374 +#: ../bin/doption.c:288 msgid "On Program Startup" msgstr "Ao iniciar programa" -#: ../bin/doption.c:384 -#: ../bin/doption.c:401 +#: ../bin/doption.c:298 +#, fuzzy +msgid "999.999999" +msgstr "999,999" + +#: ../bin/doption.c:299 +#, fuzzy +msgid "999.99999" +msgstr "999,999" + +#: ../bin/doption.c:300 +#, fuzzy +msgid "999.9999" +msgstr "999,999" + +#: ../bin/doption.c:301 ../bin/doption.c:318 msgid "999.999" msgstr "999,999" -#: ../bin/doption.c:385 -#: ../bin/doption.c:402 +#: ../bin/doption.c:302 ../bin/doption.c:319 msgid "999.99" msgstr "999,99" -#: ../bin/doption.c:386 -#: ../bin/doption.c:403 +#: ../bin/doption.c:303 ../bin/doption.c:320 msgid "999.9" msgstr "999,9" -#: ../bin/doption.c:387 +#: ../bin/doption.c:304 msgid "999 7/8" msgstr "999 7/8" -#: ../bin/doption.c:388 +#: ../bin/doption.c:305 msgid "999 63/64" msgstr "999 63/64" -#: ../bin/doption.c:389 +#: ../bin/doption.c:306 msgid "999' 11.999\"" msgstr "999′ 11,999″" -#: ../bin/doption.c:390 +#: ../bin/doption.c:307 msgid "999' 11.99\"" msgstr "999′ 11,99″" -#: ../bin/doption.c:391 +#: ../bin/doption.c:308 msgid "999' 11.9\"" msgstr "999′ 11,9″" -#: ../bin/doption.c:392 +#: ../bin/doption.c:309 msgid "999' 11 7/8\"" msgstr "999′ 11 7/8″" -#: ../bin/doption.c:393 +#: ../bin/doption.c:310 msgid "999' 11 63/64\"" msgstr "999′ 11 63/64″" -#: ../bin/doption.c:394 +#: ../bin/doption.c:311 msgid "999ft 11.999in" msgstr "999 ft 11,999 in" -#: ../bin/doption.c:395 +#: ../bin/doption.c:312 msgid "999ft 11.99in" msgstr "999 ft 11,99 in" -#: ../bin/doption.c:396 +#: ../bin/doption.c:313 msgid "999ft 11.9in" msgstr "999 ft 11,9 in" -#: ../bin/doption.c:397 +#: ../bin/doption.c:314 msgid "999ft 11 7/8in" msgstr "999 ft 11 7/8 in" -#: ../bin/doption.c:398 +#: ../bin/doption.c:315 msgid "999ft 11 63/64in" msgstr "999 ft 11 63/64 in" -#: ../bin/doption.c:404 +#: ../bin/doption.c:321 msgid "999.999mm" msgstr "999,999 mm" -#: ../bin/doption.c:405 +#: ../bin/doption.c:322 msgid "999.99mm" msgstr "999,99 mm" -#: ../bin/doption.c:406 +#: ../bin/doption.c:323 msgid "999.9mm" msgstr "999,9 mm" -#: ../bin/doption.c:407 +#: ../bin/doption.c:324 msgid "999.999cm" msgstr "999,999 cm" -#: ../bin/doption.c:408 +#: ../bin/doption.c:325 msgid "999.99cm" msgstr "999,99 cm" -#: ../bin/doption.c:409 +#: ../bin/doption.c:326 msgid "999.9cm" msgstr "999,9 cm" -#: ../bin/doption.c:410 +#: ../bin/doption.c:327 msgid "999.999m" msgstr "999,999 m" -#: ../bin/doption.c:411 +#: ../bin/doption.c:328 msgid "999.99m" msgstr "999,99 m" -#: ../bin/doption.c:412 +#: ../bin/doption.c:329 msgid "999.9m" msgstr "999,9 m" -#: ../bin/doption.c:490 +#: ../bin/doption.c:410 msgid "Preferences" msgstr "Preferências" -#: ../bin/doption.c:529 +#: ../bin/doption.c:449 msgid "Marker" msgstr "Marcador" -#: ../bin/doption.c:530 +#: ../bin/doption.c:450 msgid "Border" msgstr "Borda" -#: ../bin/doption.c:531 +#: ../bin/doption.c:451 msgid "Primary Axis" msgstr "Eixo primário" -#: ../bin/doption.c:532 +#: ../bin/doption.c:452 msgid "Secondary Axis" msgstr "Eixo secundário" -#: ../bin/doption.c:533 +#: ../bin/doption.c:453 msgid "Normal Track" msgstr "Trilho normal" -#: ../bin/doption.c:534 +#: ../bin/doption.c:454 msgid "Selected Track" msgstr "Trilho selecionado" -#: ../bin/doption.c:535 +#: ../bin/doption.c:455 msgid "Profile Path" msgstr "Perfil" -#: ../bin/doption.c:536 +#: ../bin/doption.c:456 msgid "Exception Track" msgstr "Trecho excepcional" -#: ../bin/doption.c:537 +#: ../bin/doption.c:457 msgid "Track Ties" msgstr "Dormentes" -#: ../bin/dpricels.c:46 +#: ../bin/dpricels.c:45 msgid "Price" msgstr "Preço" -#: ../bin/dpricels.c:60 +#: ../bin/dpricels.c:59 msgid "Flex Track" msgstr "Trilho flexível" -#: ../bin/dpricels.c:61 +#: ../bin/dpricels.c:60 msgid "costs" msgstr "Custos" -#: ../bin/dpricels.c:155 +#: ../bin/dpricels.c:154 msgid "Price List" msgstr "Lista de preços" -#: ../bin/dprmfile.c:98 +#: ../bin/dprmfile.c:101 #, c-format msgid "Updating %s" msgstr "Atualizando %s" -#: ../bin/dprmfile.c:217 +#: ../bin/dprmfile.c:228 msgid "Show File Names" msgstr "Mostrar nomes dos arquivos" -#: ../bin/dprmfile.c:226 -#: ../bin/dprmfile.c:330 +#: ../bin/dprmfile.c:235 +#, fuzzy +msgid "Select all" +msgstr "Selecionar &tudo" + +#: ../bin/dprmfile.c:238 ../bin/dprmfile.c:362 msgid "Unload" msgstr "Descarregar" -#: ../bin/dprmfile.c:227 +#: ../bin/dprmfile.c:239 msgid "Browse ..." msgstr "Pesquisar..." -#: ../bin/dprmfile.c:330 +#: ../bin/dprmfile.c:384 msgid "Reload" msgstr "Recarregar" -#: ../bin/dprmfile.c:431 +#: ../bin/dprmfile.c:533 msgid "Parameter Files" msgstr "Lista de parâmetros" -#: ../bin/dprmfile.c:432 +#: ../bin/dprmfile.c:534 msgid "Load Parameters" msgstr "Carregar parâmetros" -#: ../bin/dprmfile.c:432 +#: ../bin/dprmfile.c:534 msgid "Parameter files|*.xtp" msgstr "Arquivos de parâmetros|*.xtp" -#: ../bin/draw.c:1311 -#: ../bin/macro.c:598 -#: ../bin/misc.c:555 -msgid "Quit" -msgstr "Sair" +#: ../bin/draw.c:1802 +msgid "Macro Zoom Mode" +msgstr "" -#: ../bin/draw.c:1792 -#, c-format -msgid "Zoom In Program Value %ld:1" +#: ../bin/draw.c:1804 +msgid "Use Shift+PageDwn to jump to preset Zoom In" +msgstr "" + +#: ../bin/draw.c:1809 +msgid "Scale 1:1 - Use Ctrl+PageDwn to go to Macro Zoom Mode" +msgstr "" + +#: ../bin/draw.c:1813 +msgid "Preset Zoom In Value selected. Shift+Ctrl+PageDwn to reset value" +msgstr "" + +#: ../bin/draw.c:1817 +#, fuzzy, c-format +msgid "Zoom In Program Value %ld:1, Shift+PageDwn to use" msgstr "Aproximar valor do programa %ld:1" -#: ../bin/draw.c:1818 -#, c-format -msgid "Zoom Out Program Value %ld:1" +#: ../bin/draw.c:1836 +msgid "Use Shift+PageUp to jump to preset Zoom Out" +msgstr "" + +#: ../bin/draw.c:1839 +msgid "At Maximum Zoom Out" +msgstr "" + +#: ../bin/draw.c:1844 +msgid "Preset Zoom Out Value selected. Shift+Ctrl+PageUp to reset value" +msgstr "" + +#: ../bin/draw.c:1848 +#, fuzzy, c-format +msgid "Zoom Out Program Value %ld:1 set, Shift+PageUp to use" msgstr "Afastar valor do programa %ld:1" -#: ../bin/draw.c:2409 +#: ../bin/draw.c:2470 msgid "Map" msgstr "Mapa" -#: ../bin/drawgeom.c:157 -#: ../bin/drawgeom.c:170 +#: ../bin/drawgeom.c:79 ../bin/drawgeom.c:94 +msgid "Create Lines" +msgstr "Criar linhas" + +#: ../bin/drawgeom.c:193 ../bin/drawgeom.c:206 msgid "Drag to place next end point" msgstr "Arrastar para posicionar próxima extremidade" -#: ../bin/drawgeom.c:215 +#: ../bin/drawgeom.c:238 +msgid "Drag to set radius" +msgstr "Arrastar para definir o raio" + +#: ../bin/drawgeom.c:251 msgid "Drag set box size" msgstr "Arrastar para ajustar tamanho do retângulo" -#: ../bin/drawgeom.c:257 -#: ../bin/drawgeom.c:266 +#: ../bin/drawgeom.c:293 ../bin/drawgeom.c:302 #, c-format msgid "Length = %s, Angle = %0.2f" msgstr "Comprimento = %s, Ângulo = %0.2f" # Ajustar software para imprimir virgulas ao invés de pontos decimais. -#: ../bin/drawgeom.c:283 +#: ../bin/drawgeom.c:319 #, c-format msgid "Straight Line: Length=%s Angle=%0.3f" msgstr "Trecho reto: Comprimento=%s Ângulo=%0.3f" -#: ../bin/drawgeom.c:306 +#: ../bin/drawgeom.c:342 #, c-format msgid "Curved Line: Radius=%s Angle=%0.3f Length=%s" msgstr "Linha curva: Raio=%s Ângulo=%0.3f Comprimento=%s" -#: ../bin/drawgeom.c:321 +#: ../bin/drawgeom.c:357 #, c-format msgid "Radius = %s" msgstr "Raio = %s" -#: ../bin/drawgeom.c:331 +#: ../bin/drawgeom.c:367 #, c-format msgid "Width = %s, Height = %s" msgstr "Largura = %s, Altura = %s" -#: ../bin/drawgeom.c:609 +#: ../bin/drawgeom.c:686 #, c-format msgid "Length = %0.3f Angle = %0.3f" msgstr "Comprimento = %0.3f Ângulo = %0.3f" -#: ../bin/fileio.c:239 +#: ../bin/dxfoutput.c:228 +msgid "Export to DXF" +msgstr "Exportar para DXF" + +#: ../bin/fileio.c:235 msgid "" "\n" "Do you want to continue?" @@ -4044,149 +4120,179 @@ msgstr "" "\n" "Continuar?" -#: ../bin/fileio.c:528 +#: ../bin/fileio.c:541 msgid "Parameter" msgstr "Parâmetro" # Confirmar se "putTitle: " deve ser retirado do texto. -#: ../bin/fileio.c:668 +#: ../bin/fileio.c:678 #, c-format msgid "putTitle: title too long: %s" msgstr "Título muito longo: %s" -#: ../bin/fileio.c:684 +#: ../bin/fileio.c:698 msgid "Unnamed Trackplan" msgstr "Trackplan sem nome" -#: ../bin/fileio.c:700 -#: ../bin/fileio.c:1017 +#: ../bin/fileio.c:714 ../bin/fileio.c:1042 msgid "Check Pointing" msgstr "Salvando arquivo temporário." -#: ../bin/fileio.c:926 +#: ../bin/fileio.c:944 msgid "Track" msgstr "Trilho" -#: ../bin/fileio.c:984 -#: ../bin/fileio.c:997 +#: ../bin/fileio.c:1008 msgid "Save Tracks" msgstr "Salvar layout" -#: ../bin/fileio.c:1005 +#: ../bin/fileio.c:1022 +#, fuzzy +msgid "Save Tracks As" +msgstr "Salvar layout" + +#: ../bin/fileio.c:1030 msgid "Open Tracks" msgstr "Abrir layout" -#: ../bin/fileio.c:1166 -#: ../bin/fileio.c:1184 +#: ../bin/fileio.c:1163 ../bin/fileio.c:1181 msgid "Import Tracks" msgstr "Importar layout" -#: ../bin/fileio.c:1226 +#: ../bin/fileio.c:1242 msgid "Export Tracks" msgstr "Exportar layout" -#: ../bin/fileio.c:1403 -msgid "Export to DXF" -msgstr "Exportar para DXF" - -#: ../bin/fileio.c:1421 +#: ../bin/fileio.c:1262 msgid "Clipboard" msgstr "Ãrea de transferência" -#: ../bin/fileio.c:1458 -#: ../bin/misc.c:2038 +#: ../bin/fileio.c:1305 ../bin/misc.c:1986 msgid "Paste" msgstr "Colar" # Provavelmente uma mensagem de log que não necessita de tradução. -#: ../bin/i18n.c:37 +#: ../bin/i18n.c:66 #, c-format msgid "Gettext initialized (PACKAGE=%s, LOCALEDIR=%s, LC_ALL=%s).\n" msgstr "Gettext iniciado (PACKAGE=%s, LOCALEDIR=%s, LC_ALL=%s).\n" -#: ../bin/macro.c:81 +#: ../bin/layout.c:234 +msgid "Room Width" +msgstr "Largura do cômodo" + +#: ../bin/layout.c:235 +msgid " Height" +msgstr " Comprimento" + +#: ../bin/layout.c:236 +msgid "Layout Title" +msgstr "Título do layout" + +#: ../bin/layout.c:237 +msgid "Subtitle" +msgstr "Subtítulo" + +# Seria possível remover os espaços do texto original? +#: ../bin/layout.c:241 +msgid " Gauge" +msgstr " Bitola" + +#: ../bin/layout.c:243 +msgid "Min Track Radius" +msgstr "Raio mínimo" + +#: ../bin/layout.c:244 +msgid " Max Track Grade (%)" +msgstr "Inclinação máxima (%)" + +#: ../bin/layout.c:311 +msgid "Layout Options" +msgstr "Opções de layout" + +#: ../bin/macro.c:90 msgid "Message" msgstr "Mensagem" -#: ../bin/macro.c:84 +#: ../bin/macro.c:93 msgid "End" msgstr "Fim" -#: ../bin/macro.c:163 +#: ../bin/macro.c:174 msgid "Recording" msgstr "Gravando" # "Próximo passo"? Provavelmente temos o mesmo texto sendo utilizado para dois contextos diferentes: playback e demo. -#: ../bin/macro.c:198 +#: ../bin/macro.c:209 msgid "End of Playback. Hit Step to exit\n" msgstr "Fim da gravação. Teclar \"Próximo passo\" para sair\n" -#: ../bin/macro.c:262 +#: ../bin/macro.c:273 msgid "Record" msgstr "Gravar" -#: ../bin/macro.c:592 +#: ../bin/macro.c:603 msgid "Step" msgstr "Próximo passo" -#: ../bin/macro.c:595 -#: ../bin/macro.c:1360 +#: ../bin/macro.c:606 ../bin/macro.c:1367 msgid "Next" msgstr "Próxima demonstração" -#: ../bin/macro.c:601 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:468 +#: ../bin/macro.c:609 ../bin/misc.c:565 +msgid "Quit" +msgstr "Sair" + +#: ../bin/macro.c:612 ../../../../build/work/app/bin/bllnhlp.c:495 msgid "Speed" msgstr "Velocidade" -#: ../bin/macro.c:831 -#: ../bin/macro.c:1221 +#: ../bin/macro.c:838 ../bin/macro.c:1228 msgid "Demo" msgstr "Demonstração" -#: ../bin/macro.c:1016 +#: ../bin/macro.c:1023 #, c-format msgid "Elapsed time %lu\n" msgstr "Tempo percorrido %lu\n" -#: ../bin/macro.c:1150 +#: ../bin/macro.c:1157 msgid "Playback" msgstr "Playback" -#: ../bin/macro.c:1224 +#: ../bin/macro.c:1231 msgid "Slowest" msgstr "Mínimo" -#: ../bin/macro.c:1225 +#: ../bin/macro.c:1232 msgid "Slow" msgstr "Devagar" -#: ../bin/macro.c:1227 +#: ../bin/macro.c:1234 msgid "Fast" msgstr "Rápido" -#: ../bin/macro.c:1228 +#: ../bin/macro.c:1235 msgid "Faster" msgstr "Mais rápido" -#: ../bin/macro.c:1229 +#: ../bin/macro.c:1236 msgid "Fastest" msgstr "Máximo" -#: ../bin/macro.c:1347 +#: ../bin/macro.c:1354 msgid "Can not find PARAMETER playback proc" msgstr "Não pôde encontrar PARÂMETRO do procedimento de playback" -#: ../bin/misc.c:152 +#: ../bin/misc.c:164 msgid "No Messages" msgstr "Nenhuma mensagem" -#: ../bin/misc.c:297 -#: ../bin/misc.c:300 +#: ../bin/misc.c:309 ../bin/misc.c:312 msgid "ABORT" msgstr "ABORTAR" -#: ../bin/misc.c:299 +#: ../bin/misc.c:311 msgid "" "\n" "Do you want to save your layout?" @@ -4194,12 +4300,12 @@ msgstr "" "\n" "Salvar layout?" -#: ../bin/misc.c:349 +#: ../bin/misc.c:361 #, c-format msgid "No help for %s" msgstr "Ajuda inexistente para %s" -#: ../bin/misc.c:452 +#: ../bin/misc.c:464 msgid "" "Save changes to the layout design before closing?\n" "\n" @@ -4209,21 +4315,19 @@ msgstr "" "\n" "Se não salvar neste momento, suas alterações serão perdidas." -#: ../bin/misc.c:454 -#: ../bin/misc.c:2081 +#: ../bin/misc.c:466 ../bin/misc.c:2028 msgid "&Save" msgstr "&Salvar" -#: ../bin/misc.c:454 -#: ../bin/misc.c:478 +#: ../bin/misc.c:466 ../bin/misc.c:490 msgid "&Cancel" msgstr "&Anular" -#: ../bin/misc.c:454 +#: ../bin/misc.c:466 msgid "&Don't Save" msgstr "&Não salvar" -#: ../bin/misc.c:476 +#: ../bin/misc.c:488 msgid "" "Do you want to return to the last saved state?\n" "\n" @@ -4233,86 +4337,83 @@ msgstr "" "\n" "Revert will cause all changes done since last save to be lost." -#: ../bin/misc.c:478 +#: ../bin/misc.c:490 msgid "&Revert" msgstr "&Reverter" -#: ../bin/misc.c:682 +#: ../bin/misc.c:716 msgid "XTrackCAD Font" msgstr "Fonte XTrackCAD" -#: ../bin/misc.c:764 +#: ../bin/misc.c:779 #, c-format msgid "No balloon help for %s\n" msgstr "Nenhum balão de ajuda para %s\n" -#: ../bin/misc.c:766 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:531 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:532 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:534 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:535 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:537 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:538 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:539 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:540 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:541 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:542 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:543 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:544 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:545 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:546 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:547 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:548 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:549 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:550 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:551 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:552 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:553 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:554 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:555 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:556 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:557 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:558 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:559 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:560 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:561 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:562 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:563 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:564 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:565 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:566 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:567 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:568 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:569 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:570 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:571 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:572 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:573 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:574 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:575 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:576 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:577 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:578 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:579 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:580 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:581 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:582 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:583 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:584 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:585 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:586 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:587 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:588 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:589 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:590 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:591 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:593 +#: ../bin/misc.c:781 ../../../../build/work/app/bin/bllnhlp.c:558 +#: ../../../../build/work/app/bin/bllnhlp.c:559 +#: ../../../../build/work/app/bin/bllnhlp.c:561 +#: ../../../../build/work/app/bin/bllnhlp.c:562 +#: ../../../../build/work/app/bin/bllnhlp.c:564 +#: ../../../../build/work/app/bin/bllnhlp.c:565 +#: ../../../../build/work/app/bin/bllnhlp.c:566 +#: ../../../../build/work/app/bin/bllnhlp.c:567 +#: ../../../../build/work/app/bin/bllnhlp.c:568 +#: ../../../../build/work/app/bin/bllnhlp.c:569 +#: ../../../../build/work/app/bin/bllnhlp.c:570 +#: ../../../../build/work/app/bin/bllnhlp.c:571 +#: ../../../../build/work/app/bin/bllnhlp.c:572 +#: ../../../../build/work/app/bin/bllnhlp.c:573 +#: ../../../../build/work/app/bin/bllnhlp.c:574 +#: ../../../../build/work/app/bin/bllnhlp.c:575 +#: ../../../../build/work/app/bin/bllnhlp.c:576 +#: ../../../../build/work/app/bin/bllnhlp.c:577 +#: ../../../../build/work/app/bin/bllnhlp.c:578 +#: ../../../../build/work/app/bin/bllnhlp.c:579 +#: ../../../../build/work/app/bin/bllnhlp.c:580 +#: ../../../../build/work/app/bin/bllnhlp.c:581 +#: ../../../../build/work/app/bin/bllnhlp.c:582 +#: ../../../../build/work/app/bin/bllnhlp.c:583 +#: ../../../../build/work/app/bin/bllnhlp.c:584 +#: ../../../../build/work/app/bin/bllnhlp.c:585 +#: ../../../../build/work/app/bin/bllnhlp.c:586 +#: ../../../../build/work/app/bin/bllnhlp.c:587 +#: ../../../../build/work/app/bin/bllnhlp.c:588 +#: ../../../../build/work/app/bin/bllnhlp.c:589 +#: ../../../../build/work/app/bin/bllnhlp.c:590 +#: ../../../../build/work/app/bin/bllnhlp.c:591 +#: ../../../../build/work/app/bin/bllnhlp.c:592 +#: ../../../../build/work/app/bin/bllnhlp.c:593 +#: ../../../../build/work/app/bin/bllnhlp.c:594 +#: ../../../../build/work/app/bin/bllnhlp.c:595 +#: ../../../../build/work/app/bin/bllnhlp.c:596 +#: ../../../../build/work/app/bin/bllnhlp.c:597 +#: ../../../../build/work/app/bin/bllnhlp.c:598 +#: ../../../../build/work/app/bin/bllnhlp.c:599 +#: ../../../../build/work/app/bin/bllnhlp.c:600 +#: ../../../../build/work/app/bin/bllnhlp.c:601 +#: ../../../../build/work/app/bin/bllnhlp.c:602 +#: ../../../../build/work/app/bin/bllnhlp.c:603 +#: ../../../../build/work/app/bin/bllnhlp.c:604 +#: ../../../../build/work/app/bin/bllnhlp.c:605 +#: ../../../../build/work/app/bin/bllnhlp.c:606 +#: ../../../../build/work/app/bin/bllnhlp.c:607 +#: ../../../../build/work/app/bin/bllnhlp.c:608 +#: ../../../../build/work/app/bin/bllnhlp.c:609 +#: ../../../../build/work/app/bin/bllnhlp.c:610 +#: ../../../../build/work/app/bin/bllnhlp.c:611 +#: ../../../../build/work/app/bin/bllnhlp.c:612 +#: ../../../../build/work/app/bin/bllnhlp.c:613 +#: ../../../../build/work/app/bin/bllnhlp.c:614 +#: ../../../../build/work/app/bin/bllnhlp.c:615 +#: ../../../../build/work/app/bin/bllnhlp.c:616 +#: ../../../../build/work/app/bin/bllnhlp.c:617 +#: ../../../../build/work/app/bin/bllnhlp.c:618 +#: ../../../../build/work/app/bin/bllnhlp.c:620 msgid "No Help" msgstr "Nenhuma ajuda" -#: ../bin/misc.c:1024 -#: ../bin/misc.c:1029 -#: ../bin/misc.c:1094 +#: ../bin/misc.c:1041 ../bin/misc.c:1046 ../bin/misc.c:1111 msgid "" "Cancelling the current command will undo the changes\n" "you are currently making. Do you want to update?" @@ -4320,1552 +4421,1495 @@ msgstr "" "Anulação do último comando desfazerá as alterações\n" "que você está fazendo. Continuar?" -#: ../bin/misc.c:1685 +#: ../bin/misc.c:1634 msgid "Sticky Commands" msgstr "Comandos \"grudendos\"" -#: ../bin/misc.c:1698 +#: ../bin/misc.c:1647 msgid "File Buttons" msgstr "Botões de arquivos" -#: ../bin/misc.c:1699 +#: ../bin/misc.c:1648 msgid "Zoom Buttons" msgstr "Botões de zoom" -#: ../bin/misc.c:1700 +#: ../bin/misc.c:1649 msgid "Undo Buttons" msgstr "Botões de desfazer" -#: ../bin/misc.c:1701 +#: ../bin/misc.c:1650 msgid "Easement Button" msgstr "Botão de curva de transição" -#: ../bin/misc.c:1702 +#: ../bin/misc.c:1651 msgid "SnapGrid Buttons" msgstr "Botões da grade" -#: ../bin/misc.c:1703 +#: ../bin/misc.c:1652 msgid "Create Track Buttons" msgstr "Criar botões de trilhos" -#: ../bin/misc.c:1705 +#: ../bin/misc.c:1653 msgid "Layout Control Elements" msgstr "Elementos de controle de layout" -#: ../bin/misc.c:1707 +#: ../bin/misc.c:1654 msgid "Modify Track Buttons" msgstr "Modificar botões de trilhos" -#: ../bin/misc.c:1708 -msgid "Describe/Select" +#: ../bin/misc.c:1655 +msgid "Properties/Select" msgstr "Descrever / Selecionar" -#: ../bin/misc.c:1709 +#: ../bin/misc.c:1656 msgid "Track Group Buttons" msgstr "Botões de grupos de trilhos" -#: ../bin/misc.c:1710 +#: ../bin/misc.c:1657 msgid "Train Group Buttons" msgstr "Botões de grupos de trens" -#: ../bin/misc.c:1711 +#: ../bin/misc.c:1658 msgid "Create Misc Buttons" msgstr "Criar botões de miscelâneas" -#: ../bin/misc.c:1712 +#: ../bin/misc.c:1659 msgid "Ruler Button" msgstr "Botão da régua" -#: ../bin/misc.c:1713 +#: ../bin/misc.c:1660 msgid "Layer Buttons" msgstr "Botões das camadas" -#: ../bin/misc.c:1714 +#: ../bin/misc.c:1661 msgid "Hot Bar" msgstr "Barra de itens" -#: ../bin/misc.c:1799 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:66 +#: ../bin/misc.c:1744 ../../../../build/work/app/bin/bllnhlp.c:72 msgid "Change Elevations" msgstr "Alterar elevações" -#: ../bin/misc.c:1799 +#: ../bin/misc.c:1744 msgid "Change" msgstr "Alterar" -#: ../bin/misc.c:1812 +#: ../bin/misc.c:1757 msgid "Angle:" msgstr "Ângulo:" -#: ../bin/misc.c:1847 +#: ../bin/misc.c:1792 msgid "180 " msgstr "180 " -#: ../bin/misc.c:1848 +#: ../bin/misc.c:1793 msgid "90 CW" msgstr "90° sentido horário" -#: ../bin/misc.c:1849 +#: ../bin/misc.c:1794 msgid "45 CW" msgstr "45° sentido horário" -#: ../bin/misc.c:1850 +#: ../bin/misc.c:1795 msgid "30 CW" msgstr "30° sentido horário" -#: ../bin/misc.c:1851 +#: ../bin/misc.c:1796 msgid "15 CW" msgstr "15° sentido horário" -#: ../bin/misc.c:1852 +#: ../bin/misc.c:1797 msgid "15 CCW" msgstr "15° sentido anti-horário" -#: ../bin/misc.c:1853 +#: ../bin/misc.c:1798 msgid "30 CCW" msgstr "30° sentido anti-horário" -#: ../bin/misc.c:1854 +#: ../bin/misc.c:1799 msgid "45 CCW" msgstr "45° sentido anti-horário" -#: ../bin/misc.c:1855 +#: ../bin/misc.c:1800 msgid "90 CCW" msgstr "90° sentido anti-horário" -#: ../bin/misc.c:1856 +#: ../bin/misc.c:1801 msgid "Enter Angle ..." msgstr "Entrar ângulo..." -#: ../bin/misc.c:1883 +#: ../bin/misc.c:1828 msgid "Debug" msgstr "Debugar" -#: ../bin/misc.c:2009 +#: ../bin/misc.c:1956 msgid "&File" msgstr "&Arquivo" -#: ../bin/misc.c:2010 +#: ../bin/misc.c:1957 msgid "&Edit" msgstr "&Editar" -#: ../bin/misc.c:2011 +#: ../bin/misc.c:1958 msgid "&View" msgstr "&Visualizar" -#: ../bin/misc.c:2012 +#: ../bin/misc.c:1959 msgid "&Add" msgstr "&Adicionar" -#: ../bin/misc.c:2013 +#: ../bin/misc.c:1960 msgid "&Change" msgstr "&Alterar" -#: ../bin/misc.c:2014 +#: ../bin/misc.c:1961 msgid "&Draw" msgstr "&Desenhar" -#: ../bin/misc.c:2015 +#: ../bin/misc.c:1962 msgid "&Manage" msgstr "&Gerenciar" -#: ../bin/misc.c:2016 +#: ../bin/misc.c:1963 msgid "&Options" msgstr "&Opções" -#: ../bin/misc.c:2017 +#: ../bin/misc.c:1964 msgid "&Macro" msgstr "&Macro" -#: ../bin/misc.c:2018 +#: ../bin/misc.c:1965 msgid "&Window" msgstr "&Janela" -#: ../bin/misc.c:2019 +#: ../bin/misc.c:1966 msgid "&Help" msgstr "&Ajuda" -#: ../bin/misc.c:2025 -#: ../bin/misc.c:2026 +#: ../bin/misc.c:1972 ../bin/misc.c:1973 msgid "Commands" msgstr "Comandos" -#: ../bin/misc.c:2027 +#: ../bin/misc.c:1974 msgid "Undo" msgstr "Desfazer" -#: ../bin/misc.c:2028 +#: ../bin/misc.c:1975 msgid "Redo" msgstr "Refazer" -#: ../bin/misc.c:2029 -#: ../bin/misc.c:2030 +#: ../bin/misc.c:1976 ../bin/misc.c:1977 msgid "Zoom In" msgstr "Aproximar" -#: ../bin/misc.c:2031 -#: ../bin/misc.c:2032 +#: ../bin/misc.c:1978 ../bin/misc.c:1979 msgid "Zoom Out" msgstr "Afastar" -#: ../bin/misc.c:2033 +#: ../bin/misc.c:1980 msgid "SnapGrid Enable" msgstr "Grade habilitada" -#: ../bin/misc.c:2034 +#: ../bin/misc.c:1981 msgid "SnapGrid Show" msgstr "Mostrar grade" -#: ../bin/misc.c:2037 +#: ../bin/misc.c:1982 ../bin/misc.c:2107 +#, fuzzy +msgid "Show/Hide Map" +msgstr "Mostrar/Ocultar camada" + +#: ../bin/misc.c:1985 msgid "Copy" msgstr "&Copiar" -#: ../bin/misc.c:2039 +#: ../bin/misc.c:1987 msgid "Deselect All" msgstr "Deselecionar tudo" -#: ../bin/misc.c:2047 -#: ../bin/misc.c:2048 +#: ../bin/misc.c:1995 ../bin/misc.c:1996 msgid "More" msgstr "Mais" -#: ../bin/misc.c:2077 -msgid "&New" -msgstr "&Novo" +#: ../bin/misc.c:2024 +msgid "&New ..." +msgstr "&Novo ..." -#: ../bin/misc.c:2078 +#: ../bin/misc.c:2025 msgid "&Open ..." msgstr "&Abrir..." -#: ../bin/misc.c:2082 +#: ../bin/misc.c:2029 msgid "Save &As ..." msgstr "Salvar &como..." -#: ../bin/misc.c:2083 +#: ../bin/misc.c:2030 msgid "Revert" msgstr "&Reverter" -#: ../bin/misc.c:2085 +#: ../bin/misc.c:2032 msgid "P&rint Setup ..." msgstr "Configuração de &impressão" -#: ../bin/misc.c:2088 +#: ../bin/misc.c:2035 msgid "&Import" msgstr "&Importar" -#: ../bin/misc.c:2089 +#: ../bin/misc.c:2036 msgid "Export to &Bitmap" msgstr "Exportar para &bitmap" -#: ../bin/misc.c:2090 +#: ../bin/misc.c:2037 msgid "E&xport" msgstr "E&xportar" -#: ../bin/misc.c:2091 +#: ../bin/misc.c:2038 msgid "Export D&XF" msgstr "Exportar D&XF" -#: ../bin/misc.c:2094 +#: ../bin/misc.c:2041 msgid "Parameter &Files ..." msgstr "Arquivos de &parâmetro..." -#: ../bin/misc.c:2095 +#: ../bin/misc.c:2042 msgid "No&tes ..." msgstr "N&otas..." -#: ../bin/misc.c:2100 +#: ../bin/misc.c:2047 msgid "E&xit" msgstr "&Sair" -#: ../bin/misc.c:2106 +#: ../bin/misc.c:2053 msgid "&Undo" msgstr "&Desfazer" -#: ../bin/misc.c:2107 +#: ../bin/misc.c:2054 msgid "R&edo" msgstr "&Refazer" -#: ../bin/misc.c:2109 +#: ../bin/misc.c:2056 msgid "Cu&t" msgstr "&Cortar" -#: ../bin/misc.c:2110 +#: ../bin/misc.c:2057 msgid "&Copy" msgstr "&Copiar" -#: ../bin/misc.c:2111 +#: ../bin/misc.c:2058 msgid "&Paste" msgstr "&Colar" -#: ../bin/misc.c:2112 +#: ../bin/misc.c:2059 msgid "De&lete" msgstr "&Apagar" -#: ../bin/misc.c:2118 +#: ../bin/misc.c:2065 msgid "Select &All" msgstr "Selecionar &tudo" -#: ../bin/misc.c:2119 +#: ../bin/misc.c:2066 msgid "Select Current Layer" msgstr "&Selecionar camada atual" -#: ../bin/misc.c:2120 +#: ../bin/misc.c:2067 msgid "&Deselect All" msgstr "&Deselecionar tudo" -#: ../bin/misc.c:2121 +#: ../bin/misc.c:2068 msgid "&Invert Selection" msgstr "&Inverter seleção" -#: ../bin/misc.c:2122 +#: ../bin/misc.c:2069 msgid "Select Stranded Track" msgstr "Selecionar trecho pego" -#: ../bin/misc.c:2124 +#: ../bin/misc.c:2071 msgid "Tu&nnel" msgstr "&Túnel" -#: ../bin/misc.c:2125 +#: ../bin/misc.c:2072 msgid "A&bove" msgstr "A&cima" -#: ../bin/misc.c:2126 +#: ../bin/misc.c:2073 msgid "Belo&w" msgstr "Abai&xo" -#: ../bin/misc.c:2129 +#: ../bin/misc.c:2076 msgid "Thin Tracks" msgstr "Trilhos finos" -#: ../bin/misc.c:2130 +#: ../bin/misc.c:2077 msgid "Medium Tracks" msgstr "Trilhos médios" -#: ../bin/misc.c:2131 +#: ../bin/misc.c:2078 msgid "Thick Tracks" msgstr "Trilhos largos" -#: ../bin/misc.c:2136 +#: ../bin/misc.c:2083 msgid "Zoom &In" msgstr "Aproximar" -#: ../bin/misc.c:2137 +#: ../bin/misc.c:2084 msgid "&Zoom" msgstr "&Zoom" -#: ../bin/misc.c:2138 +#: ../bin/misc.c:2085 msgid "Zoom &Out" msgstr "Afastar" -#: ../bin/misc.c:2147 +#: ../bin/misc.c:2094 msgid "&Redraw" msgstr "&Redesenhar" -#: ../bin/misc.c:2148 +#: ../bin/misc.c:2095 msgid "Redraw All" msgstr "Redesenhar tudo" -#: ../bin/misc.c:2151 +#: ../bin/misc.c:2098 msgid "Enable SnapGrid" msgstr "Habilitar grade" -#: ../bin/misc.c:2153 +#: ../bin/misc.c:2100 msgid "Show SnapGrid" msgstr "Mostrar grade" -#: ../bin/misc.c:2158 +#: ../bin/misc.c:2112 msgid "&Tool Bar" msgstr "Barra de &ferramentas" -#: ../bin/misc.c:2203 +#: ../bin/misc.c:2162 msgid "&Loosen Tracks" msgstr "Trechos &perdidos" -#: ../bin/misc.c:2212 +#: ../bin/misc.c:2171 msgid "Raise/Lower Elevations" msgstr "Aumentar / diminuir elevações" -#: ../bin/misc.c:2217 +#: ../bin/misc.c:2176 msgid "Recompute Elevations" msgstr "Recalcular inclinações" -#: ../bin/misc.c:2221 +#: ../bin/misc.c:2180 msgid "Change Scale" msgstr "Alterar escala" -#: ../bin/misc.c:2238 +#: ../bin/misc.c:2197 msgid "L&ayout ..." msgstr "&Layout..." -#: ../bin/misc.c:2239 +#: ../bin/misc.c:2198 msgid "&Display ..." msgstr "&Tela..." -#: ../bin/misc.c:2240 +#: ../bin/misc.c:2199 msgid "Co&mmand ..." msgstr "&Comando..." -#: ../bin/misc.c:2241 +#: ../bin/misc.c:2200 msgid "&Easements ..." msgstr "Curvas de &transição..." -#: ../bin/misc.c:2242 +#: ../bin/misc.c:2201 msgid "&Fonts ..." msgstr "&Fontes..." -#: ../bin/misc.c:2243 +#: ../bin/misc.c:2202 msgid "Stic&ky ..." msgstr "Comandos \"&grudendos\"..." -#: ../bin/misc.c:2246 +#: ../bin/misc.c:2205 msgid "&Debug ..." msgstr "&Debugar..." -#: ../bin/misc.c:2248 +#: ../bin/misc.c:2207 msgid "&Preferences ..." msgstr "&Preferências..." -#: ../bin/misc.c:2249 +#: ../bin/misc.c:2208 msgid "&Colors ..." msgstr "&Cores..." -#: ../bin/misc.c:2254 +#: ../bin/misc.c:2213 msgid "&Record ..." msgstr "&Gravar..." -#: ../bin/misc.c:2255 +#: ../bin/misc.c:2214 msgid "&Play Back ..." msgstr "&Playback..." -#: ../bin/misc.c:2261 +#: ../bin/misc.c:2220 msgid "Main window" msgstr "Janela principal" -#: ../bin/misc.c:2273 +#: ../bin/misc.c:2232 msgid "Recent Messages" msgstr "Mensagens recentes" -#: ../bin/misc.c:2279 +#: ../bin/misc.c:2238 msgid "Tip of the Day..." msgstr "Dica do dia..." -#: ../bin/misc.c:2280 +#: ../bin/misc.c:2239 msgid "&Demos" msgstr "&Demonstrações" -#: ../bin/misc.c:2284 -#: ../bin/smalldlg.c:221 +#: ../bin/misc.c:2243 ../bin/smalldlg.c:220 msgid "About" msgstr "Sobre" -#: ../bin/misc.c:2294 +#: ../bin/misc.c:2253 msgid "Tur&nout Designer..." msgstr "Editor de &AMV" -#: ../bin/misc.c:2296 +#: ../bin/misc.c:2255 +#, fuzzy +msgid "Layout &Control Elements" +msgstr "Elementos de controle de layout" + +#: ../bin/misc.c:2256 msgid "&Group" msgstr "A&grupar" -#: ../bin/misc.c:2297 +#: ../bin/misc.c:2257 msgid "&Ungroup" msgstr "&Desagrupar" -#: ../bin/misc.c:2299 -msgid "Custom Management..." +#: ../bin/misc.c:2259 +#, fuzzy +msgid "Custom defined parts..." msgstr "Gerenciamento personalizado" -#: ../bin/misc.c:2300 +#: ../bin/misc.c:2260 msgid "Update Turnouts and Structures" msgstr "Atualizar AMVs e estruturas" -#: ../bin/misc.c:2306 +#: ../bin/misc.c:2266 msgid "Layers ..." msgstr "Camadas" -#: ../bin/misc.c:2309 +#: ../bin/misc.c:2269 msgid "Parts &List ..." msgstr "Lista de itens" -#: ../bin/misc.c:2310 +#: ../bin/misc.c:2270 msgid "Price List..." msgstr "Lista de preços" -#: ../bin/misc.c:2389 -msgid "Program was not terminated properly. Do you want to resume working on the previous trackplan?" -msgstr "O programa não foi terminado apropriadamente. Continuar trabalhando no projeto de layout anterior?" +#: ../bin/misc.c:2351 +msgid "" +"Program was not terminated properly. Do you want to resume working on the " +"previous trackplan?" +msgstr "" +"O programa não foi terminado apropriadamente. Continuar trabalhando no " +"projeto de layout anterior?" -#: ../bin/misc.c:2390 +#: ../bin/misc.c:2352 msgid "Resume" msgstr "Continuar" -#: ../bin/misc.c:2498 +#: ../bin/misc.c:2461 #, c-format msgid "Unnamed Trackplan - %s(%s)" msgstr "Layout sem nome - %s(%s)" -#: ../bin/misc.c:2564 +#: ../bin/misc.c:2529 msgid "Initializing commands" msgstr "Iniciando comandos" -#: ../bin/misc.c:2573 +#: ../bin/misc.c:2538 msgid "Initializing menus" msgstr "Iniciando menus" -#: ../bin/misc.c:2610 +#: ../bin/misc.c:2575 msgid "Reading parameter files" msgstr "Lendo arquivos de parâmetros" -#: ../bin/misc.c:2639 +#: ../bin/misc.c:2609 msgid "Initialization complete" msgstr "Iniciação completa" -#: ../bin/param.c:91 -msgid "Black" -msgstr "Preto" - -#: ../bin/param.c:93 -msgid "Dark Blue" -msgstr "Azul-escuro" - -#: ../bin/param.c:94 -msgid "Steel Blue" -msgstr "Azul-aço" - #: ../bin/param.c:95 -msgid "Royal Blue" -msgstr "Azul-royal" - -#: ../bin/param.c:96 -msgid "Blue" -msgstr "Azul" - -#: ../bin/param.c:97 -msgid "Deep Sky Blue" -msgstr "Azul celeste profundo" - -#: ../bin/param.c:98 -msgid "Light Sky Blue" -msgstr "Azul celeste claro" - -#: ../bin/param.c:99 -msgid "Powder Blue" -msgstr "Azul-pólvora" - -#: ../bin/param.c:101 -msgid "Dark Aqua" -msgstr "Azul-água-escuro" - -#: ../bin/param.c:102 -msgid "Aquamarine" -msgstr "Verde-azulado" - -#: ../bin/param.c:103 -msgid "Aqua" -msgstr "Azul-água" - -#: ../bin/param.c:105 -msgid "Dark Green" -msgstr "Verde-escuro" - -#: ../bin/param.c:106 -msgid "Forest Green" -msgstr "Verde-floresta" - -#: ../bin/param.c:107 -msgid "Lime Green" -msgstr "Verde-lima" - -#: ../bin/param.c:108 -msgid "Green" -msgstr "Verde" - -#: ../bin/param.c:109 -msgid "Lawn Green" -msgstr "Verde-grama" - -#: ../bin/param.c:110 -msgid "Pale Green" -msgstr "Verde-pálido" - -#: ../bin/param.c:112 -msgid "Dark Yellow" -msgstr "Amarelo-escuro" - -#: ../bin/param.c:113 -msgid "Coral" -msgstr "Coral" - -#: ../bin/param.c:114 -msgid "Orange" -msgstr "Laranja" - -#: ../bin/param.c:115 -msgid "Gold" -msgstr "Dourado" - -#: ../bin/param.c:116 -msgid "Yellow" -msgstr "Amarelo" - -#: ../bin/param.c:118 -msgid "Saddle Brown" -msgstr "Marrom-couro" - -#: ../bin/param.c:119 -msgid "Brown" -msgstr "Marrom" - -#: ../bin/param.c:120 -msgid "Chocolate" -msgstr "Chocolate" - -#: ../bin/param.c:121 -msgid "Rosy Brown" -msgstr "Marrom-rosado" - -#: ../bin/param.c:122 -msgid "Tan" -msgstr "Canela" - -#: ../bin/param.c:123 -msgid "Beige" -msgstr "Bege" - -#: ../bin/param.c:126 -msgid "Dark Red" -msgstr "Vermelho-escuro" - -#: ../bin/param.c:127 -msgid "Tomato" -msgstr "Vermelho-tomate" - -#: ../bin/param.c:128 -msgid "Red" -msgstr "Vermelho" - -#: ../bin/param.c:129 -msgid "Hot Pink" -msgstr "Rosa-quente" - -#: ../bin/param.c:130 -msgid "Pink" -msgstr "Rosado" - -#: ../bin/param.c:132 -msgid "Dark Purple" -msgstr "Púrpura-escuro" - -#: ../bin/param.c:133 -msgid "Maroon" -msgstr "Castanho" - -#: ../bin/param.c:134 -msgid "Purple2" -msgstr "Púrpura 2" - -#: ../bin/param.c:135 -msgid "Purple" -msgstr "Púrpura" - -#: ../bin/param.c:136 -msgid "Violet" -msgstr "Violeta" - -#: ../bin/param.c:138 -msgid "Dark Gray" -msgstr "Cinza-escuro" - -#: ../bin/param.c:139 -msgid "Gray" -msgstr "Cinza" - -#: ../bin/param.c:140 -msgid "Light Gray" -msgstr "Cinza-claro" - -#: ../bin/param.c:182 msgid "Unexpected End Of String" msgstr "Fim de string não esperado" -#: ../bin/param.c:189 +#: ../bin/param.c:102 msgid "Expected digit" msgstr "Dígito esperado" -#: ../bin/param.c:196 +#: ../bin/param.c:109 msgid "Overflow" msgstr "Overflow" -#: ../bin/param.c:244 +#: ../bin/param.c:157 msgid "Divide by 0" msgstr "Divisão por zero" -#: ../bin/param.c:252 +#: ../bin/param.c:165 msgid "Expected /" msgstr "Caractere \"/\" esperado" -#: ../bin/param.c:310 +#: ../bin/param.c:237 msgid "Invalid Units Indicator" msgstr "Indicador de unidades inválido" -#: ../bin/param.c:324 +#: ../bin/param.c:251 msgid "Expected End Of String" msgstr "Fim de string esperado" -#: ../bin/param.c:347 -#: ../bin/param.c:1373 +#: ../bin/param.c:274 ../bin/param.c:1294 #, c-format msgid "Invalid Number" msgstr "Número inválido" -#: ../bin/param.c:395 +#: ../bin/param.c:322 msgid "End Of String" msgstr "Fim de string" -#: ../bin/param.c:1380 +#: ../bin/param.c:1301 #, c-format msgid "Enter a value > %ld" msgstr "Digitar um valor maior que %ld" -#: ../bin/param.c:1382 +#: ../bin/param.c:1303 #, c-format msgid "Enter a value < %ld" msgstr "Digitar um valor menor que %ld" -#: ../bin/param.c:1384 +#: ../bin/param.c:1305 #, c-format msgid "Enter a value between %ld and %ld" msgstr "Digitar um valor entre %ld e %ld" -#: ../bin/param.c:1424 +#: ../bin/param.c:1353 #, c-format msgid "Enter a value > %s" msgstr "Digitar um valor maior que %s" -#: ../bin/param.c:1427 +#: ../bin/param.c:1356 #, c-format msgid "Enter a value < %s" msgstr "Digitar um valor menor que %s" -#: ../bin/param.c:1430 +#: ../bin/param.c:1359 #, c-format msgid "Enter a value between %s and %s" msgstr "Digitar um valor entre %s e %s" -#: ../bin/param.c:2590 +#: ../bin/param.c:2495 msgid "Help" msgstr "Ajuda" -#: ../bin/smalldlg.c:66 +#: ../bin/smalldlg.c:63 msgid "Show tips at start" msgstr "Exibir dicas ao iniciar" -#: ../bin/smalldlg.c:72 +#: ../bin/smalldlg.c:69 msgid "Did you know..." msgstr "Você sabia..." -#: ../bin/smalldlg.c:74 +#: ../bin/smalldlg.c:71 msgid "Previous Tip" msgstr "Dica anterior" -#: ../bin/smalldlg.c:75 +#: ../bin/smalldlg.c:72 msgid "Next Tip" msgstr "Próxima dica" -#: ../bin/smalldlg.c:91 +#: ../bin/smalldlg.c:89 msgid "Tip of the Day" msgstr "Dica do dia" -#: ../bin/smalldlg.c:100 +#: ../bin/smalldlg.c:98 msgid "No tips are available" msgstr "Nenhuma dica disponível" -#: ../bin/smalldlg.c:198 -msgid "XTrackCAD is a CAD (computer-aided design) program for designing model railroad layouts." -msgstr "XTrackCAD é um programa CAD (em inglês, computer aided design) para projetos de layout de ferromodelismo." +#: ../bin/smalldlg.c:197 +msgid "" +"XTrackCAD is a CAD (computer-aided design) program for designing model " +"railroad layouts." +msgstr "" +"XTrackCAD é um programa CAD (em inglês, computer aided design) para projetos " +"de layout de ferromodelismo." + +#: ../bin/tbezier.c:170 +#, c-format +msgid "Bezier Curve: length=%s min radius=%s" +msgstr "" + +#: ../bin/tbezier.c:232 +#, fuzzy +msgid "Z1" +msgstr "Z" + +#: ../bin/tbezier.c:233 ../bin/tcornu.c:279 +#, fuzzy +msgid "End Angle 1" +msgstr "Entrar ângulo..." + +#: ../bin/tbezier.c:234 +#, fuzzy +msgid "Ctl Pt 1: X" +msgstr "Extremidade 1: X" + +#: ../bin/tbezier.c:235 +#, fuzzy +msgid "Ctl Pt 2: X" +msgstr "Extremidade 2: X" + +#: ../bin/tbezier.c:237 +#, fuzzy +msgid "Z2" +msgstr "Z" + +#: ../bin/tbezier.c:238 ../bin/tcornu.c:284 +#, fuzzy +msgid "End Angle 2" +msgstr "Entrar ângulo..." + +#: ../bin/tbezier.c:239 +#, fuzzy +msgid "MinRadius" +msgstr "Raio" + +#: ../bin/tbezier.c:244 +#, fuzzy +msgid "Line Color" +msgstr "Cor %s" + +#: ../bin/tbezier.c:341 +#, fuzzy, c-format +msgid "" +"Bezier %s(%d): Layer=%u MinRadius=%s Length=%s EP=[%0.3f,%0.3f] [%0.3f," +"%0.3f] CP1=[%0.3f,%0.3f] CP2=[%0.3f, %0.3f]" +msgstr "" +"Trecho curvo(%d): Camada=%d Raio=%s Comprimento=%s Centro=[%s,%s] " +"Extremidades=[%0.3f,%0.3f θ%0.3f] [%0.3f,%0.3f θ%0.3f]" + +#: ../bin/tbezier.c:399 +#, fuzzy +msgid "Bezier Track" +msgstr "Trecho em hélice" + +#: ../bin/tbezier.c:768 +msgid "Merge Bezier" +msgstr "" + +#: ../bin/tcornu.c:210 +#, c-format +msgid "Cornu Curve: length=%0.3f min radius=%0.3f" +msgstr "" + +#: ../bin/tcornu.c:278 +#, fuzzy +msgid "Elev 1" +msgstr "Elev = %s" + +#: ../bin/tcornu.c:280 +#, fuzzy +msgid "Radius 1" +msgstr "Raio 1" + +#: ../bin/tcornu.c:281 +#, fuzzy +msgid "End Radius Center 1: X" +msgstr "Extremidade 1: X" + +#: ../bin/tcornu.c:283 +#, fuzzy +msgid "Elev 2" +msgstr "Elev = %s" + +#: ../bin/tcornu.c:285 +#, fuzzy +msgid "Radius 2" +msgstr "Raio 2" + +#: ../bin/tcornu.c:286 +#, fuzzy +msgid "End Radius Center 2: X" +msgstr "Extremidade 2: X" + +#: ../bin/tcornu.c:287 +#, fuzzy +msgid "Minimum Radius" +msgstr "Raio mínimo" + +#: ../bin/tcornu.c:288 +msgid "Maximum Rate Of Change Of Curvature" +msgstr "" + +#: ../bin/tcornu.c:289 +msgid "Total Winding Angle" +msgstr "" + +#: ../bin/tcornu.c:410 +#, fuzzy, c-format +msgid "" +"Cornu Track(%d): Layer=%u MinRadius=%s Length=%s EP=[%0.3f,%0.3f] [%0.3f," +"%0.3f]" +msgstr "" +"Trecho curvo(%d): Camada=%d Raio=%s Comprimento=%s Centro=[%s,%s] " +"Extremidades=[%0.3f,%0.3f θ%0.3f] [%0.3f,%0.3f θ%0.3f]" + +#: ../bin/tcornu.c:463 +#, fuzzy +msgid "Cornu Track" +msgstr "Trecho curvo" -#: ../bin/tcurve.c:228 +#: ../bin/tcornu.c:907 +#, fuzzy +msgid "Merge Cornu" +msgstr "Fundir curvas" + +#: ../bin/tcurve.c:234 #, c-format msgid "Helix: turns=%ld length=%s grade=%0.1f%% sep=%s" msgstr "Hélice: voltas=%ld comprimento=%s inclinação=%0.1f%% separação=%s" -#: ../bin/tcurve.c:234 +#: ../bin/tcurve.c:240 #, c-format msgid "Helix: turns=%ld length=%s" msgstr "Hélice: voltas=%ld comprimento=%s" -#: ../bin/tcurve.c:349 +#: ../bin/tcurve.c:357 msgid "Angular Length" msgstr "Comprimento angular" -#: ../bin/tcurve.c:522 +#: ../bin/tcurve.c:533 #, c-format -msgid "Helix Track(%d): Layer=%d Radius=%s Turns=%ld Length=%s Center=[%s,%s] EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]" -msgstr "Trecho em hélice(%d): Camada=%d Raio=%s Voltas=%ld Comprimento=%s Centro=[%s,%s] EP=[%0.3f,%0.3f θ%0.3f] [%0.3f,%0.3f θ%0.3f]" +msgid "" +"Helix Track(%d): Layer=%d Radius=%s Turns=%ld Length=%s Center=[%s,%s] EP=" +"[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]" +msgstr "" +"Trecho em hélice(%d): Camada=%d Raio=%s Voltas=%ld Comprimento=%s Centro=[%s," +"%s] EP=[%0.3f,%0.3f θ%0.3f] [%0.3f,%0.3f θ%0.3f]" -#: ../bin/tcurve.c:532 +#: ../bin/tcurve.c:543 #, c-format -msgid "Curved Track(%d): Layer=%d Radius=%s Length=%s Center=[%s,%s] EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]" -msgstr "Trecho curvo(%d): Camada=%d Raio=%s Comprimento=%s Centro=[%s,%s] Extremidades=[%0.3f,%0.3f θ%0.3f] [%0.3f,%0.3f θ%0.3f]" +msgid "" +"Curved Track(%d): Layer=%d Radius=%s Length=%s Center=[%s,%s] EP=[%0.3f," +"%0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]" +msgstr "" +"Trecho curvo(%d): Camada=%d Raio=%s Comprimento=%s Centro=[%s,%s] " +"Extremidades=[%0.3f,%0.3f θ%0.3f] [%0.3f,%0.3f θ%0.3f]" -#: ../bin/tcurve.c:608 +#: ../bin/tcurve.c:620 msgid "Helix Track" msgstr "Trecho em hélice" -#: ../bin/tcurve.c:614 +#: ../bin/tcurve.c:626 msgid "Curved Track" msgstr "Trecho curvo" -#: ../bin/tcurve.c:968 +#: ../bin/tcurve.c:980 msgid "Merge Curves" msgstr "Fundir curvas" -#: ../bin/tcurve.c:1035 +#: ../bin/tcurve.c:1047 msgid "Drag to change angle or create tangent" msgstr "Arrastar para alterar ângulo ou criar tangente" -#: ../bin/tcurve.c:1068 -#: ../bin/tcurve.c:1100 +#: ../bin/tcurve.c:1080 ../bin/tcurve.c:1112 msgid "Curved " msgstr "Curva" -#: ../bin/tcurve.c:1074 +#: ../bin/tcurve.c:1086 msgid "Tangent " msgstr "Tangente" -#: ../bin/tcurve.c:1083 +#: ../bin/tcurve.c:1095 #, c-format msgid "Tangent track: Length %s Angle %0.3f" msgstr "Trecho tangente: Comprimento %s Ângulo %0.3f" -#: ../bin/tcurve.c:1105 +#: ../bin/tcurve.c:1117 #, c-format msgid "Curved: Radius=%s Length=%s Angle=%0.3f" msgstr "Curva: Raio=%s Comprimento=%s Ângulo=%0.3f" -#: ../bin/tease.c:505 +#: ../bin/tease.c:511 msgid "l0" msgstr "l0" -#: ../bin/tease.c:506 +#: ../bin/tease.c:512 msgid "l1" msgstr "l1" -#: ../bin/tease.c:545 +#: ../bin/tease.c:554 #, c-format -msgid "Joint Track(%d): Layer=%d Length=%0.3f EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]" -msgstr "Trecho juntado(%d): Camada=%d Comprimento=%0.3f Extremidades=[%0.3f,%0.3f θ%0.3f] [%0.3f,%0.3f θ%0.3f]" +msgid "" +"Joint Track(%d): Layer=%d Length=%0.3f EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A" +"%0.3f]" +msgstr "" +"Trecho juntado(%d): Camada=%d Comprimento=%0.3f Extremidades=[%0.3f,%0.3f θ" +"%0.3f] [%0.3f,%0.3f θ%0.3f]" -#: ../bin/tease.c:589 +#: ../bin/tease.c:599 msgid "Easement Track" msgstr "Trecho de curva de transição" -#: ../bin/tease.c:1255 +#: ../bin/tease.c:1265 msgid "Merge Easements" msgstr "Fundir curvas de transição" -#: ../bin/tease.c:1320 +#: ../bin/tease.c:1330 msgid "Split Easement Curve" msgstr "Seccionar curva de transição" -#: ../bin/track.c:1039 +#: ../bin/track.c:1112 msgid "Move Objects Above" msgstr "Mover objetos para cima" -#: ../bin/track.c:1059 +#: ../bin/track.c:1132 msgid "Mode Objects Below" msgstr "Mover objetos para baixo" -#: ../bin/track.c:1262 +#: ../bin/track.c:1360 msgid "Audit" msgstr "Auditar" -#: ../bin/track.c:1535 +#: ../bin/track.c:1634 #, c-format msgid "%d Track(s) loosened" msgstr "%d trecho(s) liberado(s)" -#: ../bin/track.c:1542 +#: ../bin/track.c:1641 msgid "No tracks loosened" msgstr "Nenhum trecho liberado" -#: ../bin/track.c:1552 -#: ../bin/track.c:1556 +#: ../bin/track.c:1651 ../bin/track.c:1655 #, c-format msgid "Connecting a non-track(%d) to (%d)" msgstr "Conectando um objeto(%d) a (%d)" -#: ../bin/track.c:1617 +#: ../bin/track.c:1716 msgid "Join Abutting Tracks" msgstr "Juntar trechos lado a lado" -#: ../bin/track.c:1877 -#: ../bin/tstraigh.c:543 +#: ../bin/track.c:1966 ../bin/tstraigh.c:556 #, c-format msgid "Straight: Length=%s Angle=%0.3f" msgstr "Reto: Comprimento=%s Ângulo=%0.3f" -#: ../bin/tstraigh.c:224 +#: ../bin/tstraigh.c:236 #, c-format -msgid "Straight Track(%d): Layer=%d Length=%s EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]" -msgstr "Trecho reto(%d): Camada=%d Comprimento=%s Extremidades=[%0.3f,%0.3f θ%0.3f] [%0.3f,%0.3f θ%0.3f]" +msgid "" +"Straight Track(%d): Layer=%d Length=%s EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A" +"%0.3f]" +msgstr "" +"Trecho reto(%d): Camada=%d Comprimento=%s Extremidades=[%0.3f,%0.3f θ%0.3f] " +"[%0.3f,%0.3f θ%0.3f]" -#: ../bin/tstraigh.c:457 +#: ../bin/tstraigh.c:470 msgid "Extending Straight Track" msgstr "Estendendo trecho reto" -#: ../bin/tstraigh.c:536 +#: ../bin/tstraigh.c:549 msgid "Straight " msgstr "Reto" -#: ../wlib/gtklib/CVS/Base/gtkfilsel.c:129 -#: ../wlib/gtklib/gtkfilsel.c:129 -msgid "" -" exists\n" -"Do you want to overwrite it?" -msgstr "" -" existente\n" -"Sobrescrever?" - -#: ../wlib/gtklib/CVS/Base/psprint.c:749 -#: ../wlib/gtklib/psprint.c:749 -#, c-format -msgid "Page %d" -msgstr "Página %d" - -#: ../wlib/gtklib/CVS/Base/psprint.c:795 -#: ../wlib/gtklib/psprint.c:795 -msgid "Print to file ..." -msgstr "Imprimir em um arquivo..." - -#: ../wlib/gtklib/CVS/Base/psprint.c:829 -#: ../wlib/gtklib/psprint.c:829 -msgid "No file name specified" -msgstr "Nome do arquivo não especificado" - -#: ../wlib/gtklib/CVS/Base/psprint.c:833 -#: ../wlib/gtklib/psprint.c:833 -#, c-format -msgid "%s exists" -msgstr "%s existente" - -#: ../wlib/gtklib/CVS/Base/psprint.c:834 -#: ../wlib/gtklib/psprint.c:834 -msgid "Overwrite" -msgstr "Sobrescrever" - -#: ../wlib/gtklib/CVS/Base/psprint.c:839 -#: ../wlib/gtklib/CVS/Base/psprint.c:852 -#: ../wlib/gtklib/psprint.c:839 -#: ../wlib/gtklib/psprint.c:852 -msgid ": cannot open" -msgstr ": não foi possível abrir" - -#: ../wlib/gtklib/CVS/Base/psprint.c:914 -#: ../wlib/gtklib/psprint.c:914 -#, c-format -msgid "Now printing %s" -msgstr "Imprimindo agora %s" - -#: ../wlib/gtklib/CVS/Base/psprint.c:916 -#: ../wlib/gtklib/psprint.c:916 -msgid "Page 1" -msgstr "Página 1" - -#: ../wlib/gtklib/CVS/Base/psprint.c:968 -#: ../wlib/gtklib/psprint.c:968 -msgid "Printer Margin Test Page" -msgstr "Página de teste de margem" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1088 -#: ../wlib/gtklib/psprint.c:1088 -msgid "Enter both printer name and command" -msgstr "Digitar nome da impressora e comando" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1094 -#: ../wlib/gtklib/psprint.c:1094 -msgid "Can not save New Printer definition" -msgstr "Não foi possível nova impressora definida" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1116 -#: ../wlib/gtklib/psprint.c:1116 -msgid "Enter printer name" -msgstr "Digitar nome da impressora" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1122 -#: ../wlib/gtklib/psprint.c:1122 -msgid "Can not save New Margin definition" -msgstr "Não foi possível salvar nova margem definida" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1252 -#: ../wlib/gtklib/CVS/Base/psprint.c:1258 -#: ../wlib/gtklib/psprint.c:1252 -#: ../wlib/gtklib/psprint.c:1258 -msgid "Paper Size" -msgstr "Tamanho do papel" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1254 -#: ../wlib/gtklib/psprint.c:1254 -msgid "Printer" -msgstr "Impressora" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1268 -#: ../wlib/gtklib/psprint.c:1268 -msgid "Margin" -msgstr "Margem" +#: ../wlib/gtklib/filesel.c:114 +msgid "All files" +msgstr "" + +#: ../wlib/gtklib/font.c:275 +msgid "Font Select" +msgstr "Seleção de fonte" + +#: ../wlib/gtklib/help.c:68 +msgid "&Contents" +msgstr "&Conteúdo" + +#: ../wlib/gtklib/ixhelp.c:243 +msgid "Home" +msgstr "Início" + +#: ../wlib/gtklib/ixhelp.c:247 +#, fuzzy +msgid "Contents" +msgstr "&Conteúdo" + +#: ../wlib/gtklib/menu.c:541 +msgid "" +msgstr "" + +#: ../wlib/gtklib/notice.c:96 ../wlib/mswlib/mswmisc.c:1972 +#: ../wlib/mswlib/mswmisc.c:2015 +msgid "Warning" +msgstr "Aviso" + +#: ../wlib/gtklib/notice.c:101 ../wlib/mswlib/mswmisc.c:1977 +msgid "Error" +msgstr "Erro" -#: ../wlib/gtklib/CVS/Base/psprint.c:1276 -#: ../wlib/gtklib/psprint.c:1276 -msgid "Format" -msgstr "Formato" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1278 -#: ../wlib/gtklib/psprint.c:1278 -msgid "X Font" -msgstr "Fonte X Window" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1279 -#: ../wlib/gtklib/psprint.c:1279 -msgid "PS Font" -msgstr "Fonte PostScript" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1280 -#: ../wlib/gtklib/psprint.c:1280 -msgid "Factor" -msgstr "Fator" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1285 -#: ../wlib/gtklib/psprint.c:1285 -msgid "Print Test Page" -msgstr "Imprimir página de teste" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1288 -#: ../wlib/gtklib/psprint.c:1288 -msgid "Add Printer" -msgstr "Adicionar impressora" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1290 -#: ../wlib/gtklib/CVS/Base/psprint.c:1298 -#: ../wlib/gtklib/psprint.c:1290 -#: ../wlib/gtklib/psprint.c:1298 -msgid "Name: " -msgstr "Nome:" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1293 -#: ../wlib/gtklib/psprint.c:1293 -msgid "Command: " -msgstr "Comando:" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1296 -#: ../wlib/gtklib/psprint.c:1296 -msgid "Add Margin" -msgstr "Adicionar margem" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1302 -#: ../wlib/gtklib/psprint.c:1302 -msgid "Print To File" -msgstr "Imprimir em um arquivo" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1304 -#: ../wlib/gtklib/psprint.c:1304 -msgid "File Name? " -msgstr "Nome do arquivo?" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1308 -#: ../wlib/gtklib/psprint.c:1308 -msgid "Font Alias" -msgstr "Nome da fonte" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1309 -#: ../wlib/gtklib/psprint.c:1309 -msgid "Enter a post-script font name for:" -msgstr "Digitar um nome de fonte PostScript para:" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1321 -#: ../wlib/gtklib/psprint.c:1321 -msgid "Printing" -msgstr "Imprimindo" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1322 -#: ../wlib/gtklib/psprint.c:1322 -msgid "Now printing" -msgstr "Imprimindo agora" - -#: ../wlib/gtklib/CVS/Base/psprint.c:1324 -#: ../wlib/gtklib/psprint.c:1324 -msgid "Abort Print" -msgstr "Abandonar impressão" +#: ../wlib/gtklib/text.c:286 +#, c-format +msgid "%d of %d" +msgstr "" # Texto não está claro. Quais arquivos tenho que copiar em um dos diretórios em questão? -#: ../wlib/gtklib/CVS/Base/wpref.c:113 -#: ../wlib/gtklib/wpref.c:113 +#: ../wlib/gtklib/wpref.c:114 #, c-format msgid "" -"The required configuration files could not be located in the expected location.\n" +"The required configuration files could not be located in the expected " +"location.\n" "\n" -"Usually this is an installation problem. Make sure that these files are installed in either \n" +"Usually this is an installation problem. Make sure that these files are " +"installed in either \n" " %s/share/xtrkcad or\n" " /usr/lib/%s or\n" " /usr/local/lib/%s\n" -"If this is not possible, the environment variable %s must contain the name of the correct directory." +"If this is not possible, the environment variable %s must contain the name " +"of the correct directory." msgstr "" "Os arquivos de configuração mínima não foram encontrados.\n" "\n" -"Tipicamente, isso é um problema de instalação. Por favor, tenha certeza que esses arquivos estejam instalados em \n" +"Tipicamente, isso é um problema de instalação. Por favor, tenha certeza que " +"esses arquivos estejam instalados em \n" " %s/share/xtrkcad ou\n" " /usr/lib/%s ou\n" " /usr/local/lib/%s\n" -"Se não for possível, a variável de ambiente \"%s\" deverá conter o nome do diretório correto." +"Se não for possível, a variável de ambiente \"%s\" deverá conter o nome do " +"diretório correto." -#: ../wlib/gtklib/CVS/Base/wpref.c:147 -#: ../wlib/gtklib/CVS/Base/wpref.c:192 -#: ../wlib/gtklib/wpref.c:147 -#: ../wlib/gtklib/wpref.c:192 +#: ../wlib/gtklib/wpref.c:148 ../wlib/gtklib/wpref.c:193 msgid "HOME is not set" msgstr "Variável HOME não está configurada" -#: ../wlib/gtklib/CVS/Base/wpref.c:147 -#: ../wlib/gtklib/CVS/Base/wpref.c:156 -#: ../wlib/gtklib/CVS/Base/wpref.c:192 -#: ../wlib/gtklib/wpref.c:147 -#: ../wlib/gtklib/wpref.c:156 -#: ../wlib/gtklib/wpref.c:192 +#: ../wlib/gtklib/wpref.c:148 ../wlib/gtklib/wpref.c:157 +#: ../wlib/gtklib/wpref.c:193 msgid "Exit" msgstr "Sair" -#: ../wlib/gtklib/CVS/Base/wpref.c:155 -#: ../wlib/gtklib/wpref.c:155 +#: ../wlib/gtklib/wpref.c:156 #, c-format msgid "Cannot create %s" msgstr "Não foi possível criar %s" -#: ../wlib/gtklib/gtkfont.c:222 -msgid "Font Select" -msgstr "Seleção de fonte" - -#: ../wlib/gtklib/gtkhelp.c:874 -msgid "XTrackCAD Help" -msgstr "Ajuda XTrackCAD" - -#: ../wlib/gtklib/gtkhelp.c:911 -msgid "Home" -msgstr "Início" +#: ../wlib/mswlib/mswmenu.c:884 +msgid "Ctrl+" +msgstr "" -#: ../wlib/gtklib/gtkhelp.c:1038 -msgid "&Contents" -msgstr "&Conteúdo" +#: ../wlib/mswlib/mswmenu.c:889 +msgid "Alt+" +msgstr "" -#: ../wlib/gtklib/gtkmisc.c:402 -#: ../wlib/mswlib/mswmisc.c:1705 -#: ../wlib/mswlib/mswmisc.c:1744 -msgid "Warning" -msgstr "Aviso" +#: ../wlib/mswlib/mswmenu.c:894 +msgid "Shift+" +msgstr "" -#: ../wlib/gtklib/gtkmisc.c:406 -#: ../wlib/mswlib/mswmisc.c:1709 -msgid "Error" -msgstr "Erro" +#: ../wlib/mswlib/mswmenu.c:900 +#, fuzzy +msgid "Space" +msgstr "Espaçamento" -#: ../../../../xtrkcad-build/app/help/messages.h:7 +#: ../../../../build/work/app/help/messages.h:9 #, c-format -msgid "MSG_CANT_PLACE_FROGPOINTS\tFrog|Points cannot be placed on a turnout, circle or helix.\tA %s cannot be placed on a turnout, circle or helix." -msgstr "MSG_CANT_PLACE_FROGPOINTS\tJacaré|Pontos não podem ser posicionados em um AMV, circunferência ou hélice.\tUm %s não pode ser posicionado em um AMV, circunferência ou hélice." +msgid "" +"MSG_CANT_PLACE_FROGPOINTS\tFrog|Points cannot be placed on a turnout, circle " +"or helix.\tA %s cannot be placed on a turnout, circle or helix." +msgstr "" +"MSG_CANT_PLACE_FROGPOINTS\tJacaré|Pontos não podem ser posicionados em um " +"AMV, circunferência ou hélice.\tUm %s não pode ser posicionado em um AMV, " +"circunferência ou hélice." -#: ../../../../xtrkcad-build/app/help/messages.h:8 +#: ../../../../build/work/app/help/messages.h:10 +#, fuzzy msgid "" -"MSG_SEL_TRK_FROZEN\tA frozen layer contains selected...\tA frozen layer contains selected\n" -"track. Command cannot be executed." +"MSG_SEL_TRK_FROZEN\tA frozen layer contains selected track. Command cannot " +"be executed." msgstr "" -"MSG_SEL_TRK_FROZEN\tUma camada congelada possui selecionados,..\tUma camada congelada possui trilhos selecionados\n" +"MSG_SEL_TRK_FROZEN\tUma camada congelada possui selecionados,..\tUma camada " +"congelada possui trilhos selecionados\n" "selecionados. Comando não pode ser executado." -#: ../../../../xtrkcad-build/app/help/messages.h:9 +#: ../../../../build/work/app/help/messages.h:11 msgid "MSG_HELIX_TURNS_GTR_0\tA Helix must have one or more loops of track." msgstr "MSG_HELIX_TURNS_GTR_0\tUma hélice deve possuir um ou mais loops." -#: ../../../../xtrkcad-build/app/help/messages.h:10 +#: ../../../../build/work/app/help/messages.h:12 msgid "" -"MSG_LARGE_FONT\tA large font has been selected....\tA large font has been selected.\n" +"MSG_LARGE_FONT\tA large font has been selected....\tA large font has been " +"selected.\n" "Large fonts may a take a while to load.\n" "\n" "Do you wish to continue?" msgstr "" -"MSG_LARGE_FONT\tUma fonte grande foi selecionada....\tUma fonte grande foi selecionada.\n" +"MSG_LARGE_FONT\tUma fonte grande foi selecionada....\tUma fonte grande foi " +"selecionada.\n" "Fontes grandes podem levar algum tempo para serem carregadas.\n" "\n" "Continuar?" -#: ../../../../xtrkcad-build/app/help/messages.h:11 +#: ../../../../build/work/app/help/messages.h:13 msgid "" -"MSG_TODSGN_DESC_NONBLANK\tAll description fields present in the Turnout...\tAll description fields present in the Turnout\n" +"MSG_TODSGN_DESC_NONBLANK\tAll description fields present in the Turnout..." +"\tAll description fields present in the Turnout\n" "Designer must contain appropriate information.\n" "Correct inappropriate values and try again." msgstr "" -"MSG_TODSGN_DESC_NONBLANK\tTodos os campos do AMV presentes...\tTodos os campos do AMV presentes\n" +"MSG_TODSGN_DESC_NONBLANK\tTodos os campos do AMV presentes...\tTodos os " +"campos do AMV presentes\n" "Editor deve conter a informação apropriada.\n" "Corrigir valores inapropriados e tentar novamente" -#: ../../../../xtrkcad-build/app/help/messages.h:12 +#: ../../../../build/work/app/help/messages.h:14 msgid "" -"MSG_GROUP_NONBLANK\tAll fields listed in the Group dialog must contain data....\tAll fields listed in the Group dialog must contain data.\n" +"MSG_GROUP_NONBLANK\tAll fields listed in the Group dialog must contain " +"data....\tAll fields listed in the Group dialog must contain data.\n" "Please enter missing values and try again." msgstr "" -"MSG_GROUP_NONBLANK\tTodos os campos listados na caixa de diálogo de grupo devem conter dados....\tTodos os campos listados na caixa de diálogo de grupo devem conter dados.\n" +"MSG_GROUP_NONBLANK\tTodos os campos listados na caixa de diálogo de grupo " +"devem conter dados....\tTodos os campos listados na caixa de diálogo de " +"grupo devem conter dados.\n" "Por favor, digitar os valores restantes e tentar novamente." -#: ../../../../xtrkcad-build/app/help/messages.h:13 +#: ../../../../build/work/app/help/messages.h:15 msgid "" -"MSG_TODSGN_VALUES_GTR_0\tAll values specified in the Turnout Designer must be...\tAll values specified in the Turnout Designer must be\n" +"MSG_TODSGN_VALUES_GTR_0\tAll values specified in the Turnout Designer must " +"be...\tAll values specified in the Turnout Designer must be\n" "greater than 0. Correct inappropriate values and try again." msgstr "" -"MSG_TODSGN_VALUES_GTR_0\tTodos os valores especificados no editor de AMV devem ser...\tTodos os valores especificados no editor de AMV devem ser\n" +"MSG_TODSGN_VALUES_GTR_0\tTodos os valores especificados no editor de AMV " +"devem ser...\tTodos os valores especificados no editor de AMV devem ser\n" "maiores que zero. Corrigir os valores inapropriados e tentar novamente." -#: ../../../../xtrkcad-build/app/help/messages.h:14 -msgid "MSG_CURVE_OUT_OF_RANGE\tAngle must be between 0° and 360°." +#: ../../../../build/work/app/help/messages.h:16 +#, fuzzy +msgid "MSG_CURVE_OUT_OF_RANGE\tAngle must be between 0\\u00B0 and 360\\u00B0." msgstr "MSG_CURVE_OUT_OF_RANGE\tÂngulo deve estar entre 0° e 360°." -#: ../../../../xtrkcad-build/app/help/messages.h:15 +#: ../../../../build/work/app/help/messages.h:17 #, c-format msgid "" -"MSG_CUSTMGM_DELETE_CONFIRM\tAre you sure you want to delete the NNN definition(s)?\tAre you sure you want to delete the\n" +"MSG_CUSTMGM_DELETE_CONFIRM\tAre you sure you want to delete the NNN " +"definition(s)?\tAre you sure you want to delete the\n" "%d definition(s)?" msgstr "" -"MSG_CUSTMGM_DELETE_CONFIRM\tVocê tem certeza que deseja eliminar as NNN definição(ões)?\tVocê tem certeza que deseja eliminar as\n" +"MSG_CUSTMGM_DELETE_CONFIRM\tVocê tem certeza que deseja eliminar as NNN " +"definição(ões)?\tVocê tem certeza que deseja eliminar as\n" "%d definition(ões)?" -#: ../../../../xtrkcad-build/app/help/messages.h:16 +#: ../../../../build/work/app/help/messages.h:18 msgid "MSG_WBITMAP_FAILED\tBitmap create or write function failed." msgstr "MSG_WBITMAP_FAILED\tCriação do bitmap ou falha na função de escrita." -#: ../../../../xtrkcad-build/app/help/messages.h:17 +#: ../../../../build/work/app/help/messages.h:19 msgid "MSG_BITMAP_TOO_LARGE\tBitmap is too large." msgstr "MSG_BITMAP_TOO_LARGE\tBitmap muito grande." -#: ../../../../xtrkcad-build/app/help/messages.h:18 +#: ../../../../build/work/app/help/messages.h:20 msgid "MSG_CHANGE_ELEV_MODE\tCannot change elevation mode." msgstr "MSG_CHANGE_ELEV_MODE\tNão é possível alterar modo de inclinação." -#: ../../../../xtrkcad-build/app/help/messages.h:19 -msgid "MSG_GRID_ENABLE_SPACE_GTR_0\tCannot Enable Grid; spacing must be greater than 0" -msgstr "MSG_GRID_ENABLE_SPACE_GTR_0\tNão é possível habilitar grade; espaçamento deve ser maior que zero" +#: ../../../../build/work/app/help/messages.h:21 +msgid "" +"MSG_GRID_ENABLE_SPACE_GTR_0\tCannot Enable Grid; spacing must be greater " +"than 0" +msgstr "" +"MSG_GRID_ENABLE_SPACE_GTR_0\tNão é possível habilitar grade; espaçamento " +"deve ser maior que zero" -#: ../../../../xtrkcad-build/app/help/messages.h:20 +#: ../../../../build/work/app/help/messages.h:22 msgid "MSG_LAYER_FREEZE\tCannot freeze current layer" msgstr "MSG_LAYER_FREEZE\tNão é possível congelar camada corrente" -#: ../../../../xtrkcad-build/app/help/messages.h:21 -msgid "MSG_CANT_GROUP_BUMPER1\tCannot Group Bumper Track. The track has been unselected." -msgstr "MSG_CANT_GROUP_BUMPER1\tNão é possível agrupar trilho com pára-choque. O trilho foi deselecionado." +#: ../../../../build/work/app/help/messages.h:23 +msgid "" +"MSG_CANT_GROUP_BUMPER1\tCannot Group Bumper Track. The track has been " +"unselected." +msgstr "" +"MSG_CANT_GROUP_BUMPER1\tNão é possível agrupar trilho com pára-choque. O " +"trilho foi deselecionado." -#: ../../../../xtrkcad-build/app/help/messages.h:22 +#: ../../../../build/work/app/help/messages.h:24 msgid "MSG_CANNOT_GROUP_TRACK\tCannot Group selected track." msgstr "MSG_CANNOT_GROUP_TRACK\tNão é possível agrupar trilhos selecionados." -#: ../../../../xtrkcad-build/app/help/messages.h:23 +#: ../../../../build/work/app/help/messages.h:25 msgid "MSG_LAYER_HIDE\tCannot hide current layer" msgstr "MSG_LAYER_HIDE\tImpossível esconder camada corrente" -#: ../../../../xtrkcad-build/app/help/messages.h:24 +#: ../../../../build/work/app/help/messages.h:26 msgid "MSG_JOIN_EASEMENTS\tCannot Join; Easements do not align or abut." -msgstr "MSG_JOIN_EASEMENTS\tImpossível juntar; Curvas de transição não estão alinhadas e nem estão próximas." +msgstr "" +"MSG_JOIN_EASEMENTS\tImpossível juntar; Curvas de transição não estão " +"alinhadas e nem estão próximas." -#: ../../../../xtrkcad-build/app/help/messages.h:25 +#: ../../../../build/work/app/help/messages.h:27 #, c-format -msgid "MSG_TRK_ALREADY_CONN\tFirst|Second track is already connected.\tCannot Join; %s track is already connected." -msgstr "MSG_TRK_ALREADY_CONN\tPrimeiro|Segundo trilho já estão conectados.\tNão é possível juntar; Trilho %s já está conectado." +msgid "" +"MSG_TRK_ALREADY_CONN\tFirst|Second track is already connected.\tCannot Join; " +"%s track is already connected." +msgstr "" +"MSG_TRK_ALREADY_CONN\tPrimeiro|Segundo trilho já estão conectados.\tNão é " +"possível juntar; Trilho %s já está conectado." -#: ../../../../xtrkcad-build/app/help/messages.h:26 +#: ../../../../build/work/app/help/messages.h:28 msgid "MSG_JOIN_TURNTABLE\tCannot join from a turntable, try to a turntable" -msgstr "MSG_JOIN_TURNTABLE\tNão é possível juntar a partir de um virador de locomotivas, tentar no outro sentido" +msgstr "" +"MSG_JOIN_TURNTABLE\tNão é possível juntar a partir de um virador de " +"locomotivas, tentar no outro sentido" + +#: ../../../../build/work/app/help/messages.h:29 +#, fuzzy +msgid "MSG_JOIN_CORNU_SAME\tCannot Join; Selected endpoints are on same track." +msgstr "" +"MSG_JOIN_SAME\tNão é possível juntar; Extremidades selecionadas estão na " +"mesma linha." -#: ../../../../xtrkcad-build/app/help/messages.h:27 +#: ../../../../build/work/app/help/messages.h:30 msgid "MSG_JOIN_SAME\tCannot Join; Selected endpoints are on same track." -msgstr "MSG_JOIN_SAME\tNão é possível juntar; Extremidades selecionadas estão na mesma linha." +msgstr "" +"MSG_JOIN_SAME\tNão é possível juntar; Extremidades selecionadas estão na " +"mesma linha." -#: ../../../../xtrkcad-build/app/help/messages.h:28 -msgid "MSG_SELECTED_TRACKS_PARALLEL\tCannot Join; Selected tracks are parallel." -msgstr "MSG_SELECTED_TRACKS_PARALLEL\tNão é possível juntar; Trilhos selecionados estão paralelos." +#: ../../../../build/work/app/help/messages.h:31 +msgid "" +"MSG_SELECTED_TRACKS_PARALLEL\tCannot Join; Selected tracks are parallel." +msgstr "" +"MSG_SELECTED_TRACKS_PARALLEL\tNão é possível juntar; Trilhos selecionados " +"estão paralelos." -#: ../../../../xtrkcad-build/app/help/messages.h:29 +#: ../../../../build/work/app/help/messages.h:32 #, c-format -msgid "MSG_PRMFIL_OPEN_NEW\tCannot open New Parameter File: FILENAME\tCannot open New Parameter File: %s" -msgstr "MSG_PRMFIL_OPEN_NEW\tNão é possível abrir novo arquivo de parâmetros: FILENAME\tNão é possível abrir novo arquivo de parâmetros: %s" +msgid "" +"MSG_PRMFIL_OPEN_NEW\tCannot open New Parameter File: FILENAME\tCannot open " +"New Parameter File: %s" +msgstr "" +"MSG_PRMFIL_OPEN_NEW\tNão é possível abrir novo arquivo de parâmetros: " +"FILENAME\tNão é possível abrir novo arquivo de parâmetros: %s" -#: ../../../../xtrkcad-build/app/help/messages.h:30 +#: ../../../../build/work/app/help/messages.h:33 msgid "MSG_LAYER_SEL_FROZEN\tCannot select a frozen layer" msgstr "MSG_LAYER_SEL_FROZEN\tNão é possível selecionar uma camada congelada" -#: ../../../../xtrkcad-build/app/help/messages.h:31 -msgid "MSG_GRID_SHOW_SPACE_GTR_0\tCannot Show Grid; spacing must be greater than 0" -msgstr "MSG_GRID_SHOW_SPACE_GTR_0\tNão é possível exibir grade; Espaçamento deve ser maior que zero" +#: ../../../../build/work/app/help/messages.h:34 +msgid "" +"MSG_GRID_SHOW_SPACE_GTR_0\tCannot Show Grid; spacing must be greater than 0" +msgstr "" +"MSG_GRID_SHOW_SPACE_GTR_0\tNão é possível exibir grade; Espaçamento deve ser " +"maior que zero" -#: ../../../../xtrkcad-build/app/help/messages.h:32 +#: ../../../../build/work/app/help/messages.h:35 #, c-format msgid "MSG_CANT_SPLIT_TRK\tCannot split TYPE track\tCannot split %s track" -msgstr "MSG_CANT_SPLIT_TRK\tNão é possível seccionar trilho do tipo TYPE\tNão é possível seccionar trilho do tipo %s" +msgstr "" +"MSG_CANT_SPLIT_TRK\tNão é possível seccionar trilho do tipo TYPE\tNão é " +"possível seccionar trilho do tipo %s" -#: ../../../../xtrkcad-build/app/help/messages.h:33 +#: ../../../../build/work/app/help/messages.h:36 #, c-format -msgid "MSG_CUSTMGM_CANT_WRITE\tCannot write to parameter file: FILENAME\tCannot write to parameter file: %s" -msgstr "MSG_CUSTMGM_CANT_WRITE\tNão é possível escrever no arquivo: FILENAME\tNão é possível escrever no arquivo: %s" +msgid "" +"MSG_CUSTMGM_CANT_WRITE\tCannot write to parameter file: FILENAME\tCannot " +"write to parameter file: %s" +msgstr "" +"MSG_CUSTMGM_CANT_WRITE\tNão é possível escrever no arquivo: FILENAME\tNão é " +"possível escrever no arquivo: %s" -#: ../../../../xtrkcad-build/app/help/messages.h:34 +#: ../../../../build/work/app/help/messages.h:37 msgid "MSG_CARIMP_DUP_INDEX\tCar Index number duplicated." msgstr "MSG_CARIMP_DUP_INDEX\tÃndice do material rodante duplicado." -#: ../../../../xtrkcad-build/app/help/messages.h:35 -msgid "MSG_CONN_PARAMS_TOO_SMALL\tConnection parameters reset to minimum values." -msgstr "MSG_CONN_PARAMS_TOO_SMALL\tParâmetros de conexão restaurados aos valores mínimos." +#: ../../../../build/work/app/help/messages.h:38 +msgid "" +"MSG_CONN_PARAMS_TOO_SMALL\tConnection parameters reset to minimum values." +msgstr "" +"MSG_CONN_PARAMS_TOO_SMALL\tParâmetros de conexão restaurados aos valores " +"mínimos." -#: ../../../../xtrkcad-build/app/help/messages.h:36 +#: ../../../../build/work/app/help/messages.h:39 msgid "MSG_CANT_PASTE\tCopy/Paste buffer is empty. There is nothing to Paste." -msgstr "MSG_CANT_PASTE\tEspaço para copiar/colar está vazio. Não há nada a colar." +msgstr "" +"MSG_CANT_PASTE\tEspaço para copiar/colar está vazio. Não há nada a colar." -#: ../../../../xtrkcad-build/app/help/messages.h:37 +#: ../../../../build/work/app/help/messages.h:40 msgid "" -"MSG_TODSGN_CROSSOVER_TOO_SHORT\tCrossover length is too short. Correct...\tCrossover length is too short. Correct\n" +"MSG_TODSGN_CROSSOVER_TOO_SHORT\tCrossover length is too short. Correct..." +"\tCrossover length is too short. Correct\n" "inappropriate value(s) and try again." msgstr "" -"MSG_TODSGN_CROSSOVER_TOO_SHORT\tComprimento do sobrecruzamento é muito pequeno. Corrigir...\tComprimento do sobrecruzamento é muito pequeno. Corrigir\n" +"MSG_TODSGN_CROSSOVER_TOO_SHORT\tComprimento do sobrecruzamento é muito " +"pequeno. Corrigir...\tComprimento do sobrecruzamento é muito pequeno. " +"Corrigir\n" "valores inapropriados e tentar novamente." -#: ../../../../xtrkcad-build/app/help/messages.h:38 +#: ../../../../build/work/app/help/messages.h:41 msgid "MSG_CURVE_TOO_LARGE\tCurved track is too large." msgstr "MSG_CURVE_TOO_LARGE\tTrecho curvo muito aberto." -#: ../../../../xtrkcad-build/app/help/messages.h:39 +#: ../../../../build/work/app/help/messages.h:42 msgid "" -"MSG_TODSGN_REPLACE\tDefinition name is already in use. Saving this...\tDefinition name is already in use. Saving this\n" +"MSG_TODSGN_REPLACE\tDefinition name is already in use. Saving this..." +"\tDefinition name is already in use. Saving this\n" "definition replaces the existing definition.\n" "\n" "Do you want to continue?" msgstr "" -"MSG_TODSGN_REPLACE\tNome da definição já utilizado. Salvar esta...\tNome da definição já utilizado. Salvar esta\n" +"MSG_TODSGN_REPLACE\tNome da definição já utilizado. Salvar esta...\tNome da " +"definição já utilizado. Salvar esta\n" "definição substitui a existente.\n" "\n" "Você deseja continuar?" -#: ../../../../xtrkcad-build/app/help/messages.h:40 +#: ../../../../build/work/app/help/messages.h:43 msgid "MSG_SAVE_CHANGES\tDo you want to save the changes made to your Layout?" -msgstr "MSG_SAVE_CHANGES\tVocê deseja salvar as alterações feitas no seu layout?" +msgstr "" +"MSG_SAVE_CHANGES\tVocê deseja salvar as alterações feitas no seu layout?" -#: ../../../../xtrkcad-build/app/help/messages.h:41 -msgid "MSG_CARIMP_DUP_COLUMNS\tDuplicate column headers found in Car Import file." -msgstr "MSG_CARIMP_DUP_COLUMNS\tNomes de colunas duplicados encontrados no material rodante importado." +#: ../../../../build/work/app/help/messages.h:44 +msgid "" +"MSG_CARIMP_DUP_COLUMNS\tDuplicate column headers found in Car Import file." +msgstr "" +"MSG_CARIMP_DUP_COLUMNS\tNomes de colunas duplicados encontrados no material " +"rodante importado." -#: ../../../../xtrkcad-build/app/help/messages.h:42 +#: ../../../../build/work/app/help/messages.h:45 msgid "MSG_EP_ON_PATH\tEndpoint already on Path." msgstr "MSG_EP_ON_PATH\tExtremidade ainda no caminho." -#: ../../../../xtrkcad-build/app/help/messages.h:43 +#: ../../../../build/work/app/help/messages.h:46 #, c-format msgid "" -"MSG_UPGRADE_VERSION1\tFile version %ld is greater than supported...\tFile version %ld is greater than supported\n" +"MSG_UPGRADE_VERSION1\tFile version %ld is greater than supported...\tFile " +"version %ld is greater than supported\n" "version %d. You need to upgrade %s\n" "to at least version %s." msgstr "" -"MSG_UPGRADE_VERSION1\tVersão do arquivo %ld é maior que a versão...\tVersão do arquivo %ld é maior que a versão\n" +"MSG_UPGRADE_VERSION1\tVersão do arquivo %ld é maior que a versão...\tVersão " +"do arquivo %ld é maior que a versão\n" "suportada %d. Você precisa atualizar a %s\n" "para a versão %s pelo menos." -#: ../../../../xtrkcad-build/app/help/messages.h:44 +#: ../../../../build/work/app/help/messages.h:47 #, c-format msgid "" -"MSG_UPGRADE_VERSION2\tFile version %ld is greater than supported...\tFile version %ld is greater than supported\n" +"MSG_UPGRADE_VERSION2\tFile version %ld is greater than supported...\tFile " +"version %ld is greater than supported\n" "version %d. You need to upgrade your\n" "version of %s" msgstr "" -"MSG_UPGRADE_VERSION2\tVersão %ld do arquivo é maior que a versão...\tVersão %ld do arquivo é maior que a versão\n" +"MSG_UPGRADE_VERSION2\tVersão %ld do arquivo é maior que a versão...\tVersão " +"%ld do arquivo é maior que a versão\n" "suportada %d. Você precisa atualizar sua versão\n" "de %s" -#: ../../../../xtrkcad-build/app/help/messages.h:45 +#: ../../../../build/work/app/help/messages.h:48 +#, fuzzy msgid "" -"MSG_MOVE_POINTS_OTHER_SIDE\tFrog angle prevents placement of points....\tFrog angle prevents placement of points.\n" -"Move points to opposite side of frog." +"MSG_MOVE_POINTS_OTHER_SIDE\tFrog angle prevents placement of points. Move " +"points to opposite side of frog." msgstr "" -"MSG_MOVE_POINTS_OTHER_SIDE\tÂngulo do jacaré impede posicionamento dos pontos....\tÂngulo do jacaré impede posicionamento dos pontos.\n" +"MSG_MOVE_POINTS_OTHER_SIDE\tÂngulo do jacaré impede posicionamento dos " +"pontos....\tÂngulo do jacaré impede posicionamento dos pontos.\n" "Mova os pontos para o lado oposto do jacaré." -#: ../../../../xtrkcad-build/app/help/messages.h:46 +#: ../../../../build/work/app/help/messages.h:49 msgid "MSG_NO_ROOM_BTW_TRKS\tInsufficient space between existing stall tracks." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:47 +#: ../../../../build/work/app/help/messages.h:50 #, c-format -msgid "MSG_JOIN_DIFFER_ELEV\tJoining tracks with differing elevations (N.NNN)\tJoining tracks with differing elevations (%0.2f)" +msgid "" +"MSG_JOIN_DIFFER_ELEV\tJoining tracks with differing elevations (N." +"NNN)\tJoining tracks with differing elevations (%0.2f)" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:48 +#: ../../../../build/work/app/help/messages.h:51 msgid "MSG_DESC_NOT_VISIBLE\tLabel descriptions not visible" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:49 +#: ../../../../build/work/app/help/messages.h:52 msgid "MSG_OBJECT_TOO_SHORT\tLength of object is too short." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:50 +#: ../../../../build/work/app/help/messages.h:53 #, c-format -msgid "MSG_PRINT_MAX_SIZE\tMaximum allowed page size is W x H\tMaximum allowed page size is %s x %s" +msgid "" +"MSG_PRINT_MAX_SIZE\tMaximum allowed page size is W x H\tMaximum allowed page " +"size is %s x %s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:51 +#: ../../../../build/work/app/help/messages.h:54 #, c-format -msgid "MSG_PRMFIL_NO_CONTENTS\tNew Parameter File has no CONTENTS line: FILENAME.\tNew Parameter File has no CONTENTS line: %s" +msgid "" +"MSG_PRMFIL_NO_CONTENTS\tNew Parameter File has no CONTENTS line: FILENAME." +"\tNew Parameter File has no CONTENTS line: %s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:52 +#: ../../../../build/work/app/help/messages.h:55 msgid "" -"MSG_NO_CARS\tNo Cars are defined for the current scale....\tNo Cars are defined for the current scale.\n" +"MSG_NO_CARS\tNo Cars are defined for the current scale....\tNo Cars are " +"defined for the current scale.\n" "\n" "Do you want to use the Car Inventory dialog?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:53 +#: ../../../../build/work/app/help/messages.h:56 msgid "" -"MSG_NO_CARPROTO\tNo Car Prototypes are defined....\tNo Car Prototypes are defined.\n" +"MSG_NO_CARPROTO\tNo Car Prototypes are defined....\tNo Car Prototypes are " +"defined.\n" "Load a Prototype definition file using the\n" "Parameter Files dialog or create a Prototype\n" "definition using the Car Prototype dialog." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:54 +#: ../../../../build/work/app/help/messages.h:57 msgid "MSG_CARIMP_NO_DATA\tNo data present in Car Import file." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:55 +#: ../../../../build/work/app/help/messages.h:58 msgid "MSG_PRINT_NO_PAGES\tNo pages selected for printing." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:56 +#: ../../../../build/work/app/help/messages.h:59 msgid "MSG_NO_PATH_TO_EP\tNo path between Profile and selected endpoint." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:57 +#: ../../../../build/work/app/help/messages.h:60 #, c-format -msgid "MSG_PRMFIL_NO_MAP\tNo Parameter File Map for CONTENTS\tNo Parameter File Map for %s" +msgid "" +"MSG_PRMFIL_NO_MAP\tNo Parameter File Map for CONTENTS\tNo Parameter File Map " +"for %s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:58 +#: ../../../../build/work/app/help/messages.h:61 msgid "MSG_NO_SELECTED_TRK\tNo track(s) selected!" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:59 +#: ../../../../build/work/app/help/messages.h:62 #, c-format -msgid "MSG_NO_TURNOUTS_AVAILABLE\tNo Turnouts|Structures are available.\tNo %s are available." +msgid "" +"MSG_NO_TURNOUTS_AVAILABLE\tNo Turnouts|Structures are available.\tNo %s are " +"available." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:60 +#: ../../../../build/work/app/help/messages.h:63 msgid "" -"MSG_CARDESC_VALUE_ZERO\tNumeric values on the Car Description...\tNumeric values on the Car Description\n" +"MSG_CARDESC_VALUE_ZERO\tNumeric values on the Car Description...\tNumeric " +"values on the Car Description\n" "dialog must be greater than 0." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:61 +#: ../../../../build/work/app/help/messages.h:64 msgid "MSG_MOVE_OUT_OF_BOUNDS\tObject has moved beyond room boundaries." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:62 +#: ../../../../build/work/app/help/messages.h:65 msgid "MSG_PARALLEL_SEP_GTR_0\tParallel separation must be greater than 0." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:63 +#: ../../../../build/work/app/help/messages.h:66 msgid "" -"MSG_CARPART_DUPNAME\tPart Number for this Manufacturer already exists....\tPart Number for this Manufacturer already exists.\n" +"MSG_CARPART_DUPNAME\tPart Number for this Manufacturer already exists...." +"\tPart Number for this Manufacturer already exists.\n" "\n" "Do you want to update it?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:64 +#: ../../../../build/work/app/help/messages.h:67 #, c-format -msgid "MSG_PLAYBACK_LISTENTRY\tPlayback: Cannot find list entry: NAME\tPlayback: Cannot find list entry: %s" +msgid "" +"MSG_PLAYBACK_LISTENTRY\tPlayback: Cannot find list entry: NAME\tPlayback: " +"Cannot find list entry: %s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:65 +#: ../../../../build/work/app/help/messages.h:68 #, c-format msgid "" -"MSG_PLAYBACK_VERSION_UPGRADE\tPlayback file version %ld is...\tPlayback file version %ld is\n" +"MSG_PLAYBACK_VERSION_UPGRADE\tPlayback file version %ld is...\tPlayback file " +"version %ld is\n" "greater than supported version %d\n" "You need to upgrade your version of %s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:66 +#: ../../../../build/work/app/help/messages.h:69 #, c-format -msgid "MSG_DOMOUSE_BAD_OP\tPlayback: unknown action NNN\tPlayback: unknown action %d" +msgid "" +"MSG_DOMOUSE_BAD_OP\tPlayback: unknown action NNN\tPlayback: unknown action %d" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:67 +#: ../../../../build/work/app/help/messages.h:70 msgid "MSG_MOVE_POINTS_AWAY_CLOSE\tPoints are to close to frog; move away." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:68 +#: ../../../../build/work/app/help/messages.h:71 msgid "MSG_POLY_SHAPES_3_SIDES\tPoly shapes must have at least 3 sides." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:69 +#: ../../../../build/work/app/help/messages.h:72 msgid "" -"MSG_CARPROTO_DUPNAME\tPrototype name already exists....\tPrototype name already exists.\n" +"MSG_CARPROTO_DUPNAME\tPrototype name already exists....\tPrototype name " +"already exists.\n" "\n" "Do you want to update it?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:70 +#: ../../../../build/work/app/help/messages.h:73 msgid "MSG_RADIUS_GTR_0\tRadius must be greater than 0." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:71 +#: ../../../../build/work/app/help/messages.h:74 #, c-format msgid "" -"MSG_RESCALE_TOO_BIG\tRescaled tracks do not fit within layouts room parameters...\tRescaled tracks do not fit within layouts room parameters\n" +"MSG_RESCALE_TOO_BIG\tRescaled tracks do not fit within layouts room " +"parameters...\tRescaled tracks do not fit within layouts room parameters\n" "(Height and width). The layouts room parameters should be\n" "set to at least %s by %s." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:72 -msgid "MSG_CARIMP_MISSING_COLUMNS\tRequired column headers missing from Car Import file." +#: ../../../../build/work/app/help/messages.h:75 +msgid "" +"MSG_CARIMP_MISSING_COLUMNS\tRequired column headers missing from Car Import " +"file." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:73 +#: ../../../../build/work/app/help/messages.h:76 #, c-format -msgid "MSG_2ND_TRK_NOT_SEL_UNSEL\tSecond track must be selected|unselected\tSecond track must be %s." +msgid "" +"MSG_2ND_TRK_NOT_SEL_UNSEL\tSecond track must be selected|unselected\tSecond " +"track must be %s." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:74 +#: ../../../../build/work/app/help/messages.h:77 msgid "MSG_OUT_OF_BOUNDS\tSelected page is out of bounds." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:75 +#: ../../../../build/work/app/help/messages.h:78 msgid "MSG_SEL_POS_FIRST\tSelect position prior to entering Text." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:76 +#: ../../../../build/work/app/help/messages.h:79 msgid "" -"MSG_CARPROTO_BADSEGS\tSelected shapes must define a rectangular area ...\tSelected shapes must define a rectangular\n" +"MSG_CARPROTO_BADSEGS\tSelected shapes must define a rectangular area ..." +"\tSelected shapes must define a rectangular\n" "area with length greater than height." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:77 +#: ../../../../build/work/app/help/messages.h:80 msgid "" -"MSG_TOO_FAR_APART_DIVERGE\tSelected tracks deviate too much or...\tSelected tracks deviate too much or\n" -"are too far apart from each other." +"MSG_TOO_FAR_APART_DIVERGE\tSelected tracks deviate too much or are too far " +"apart from each other." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:78 +#: ../../../../build/work/app/help/messages.h:81 msgid "MSG_COMMAND_DISABLED\tSpecified command disabled." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:79 +#: ../../../../build/work/app/help/messages.h:82 msgid "MSG_SPLIT_POS_BTW_MERGEPTS\tSplit position between Turnout Points" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:80 +#: ../../../../build/work/app/help/messages.h:83 msgid "MSG_SPLIT_PATH_NOT_UNIQUE\tSplit position not on unique path" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:81 +#: ../../../../build/work/app/help/messages.h:84 #, c-format msgid "" -"MSG_CARIMP_MISSING_DIMS\tThe following car has no dimensions and a...\tThe following car has no dimensions and a\n" +"MSG_CARIMP_MISSING_DIMS\tThe following car has no dimensions and a...\tThe " +"following car has no dimensions and a\n" "Car Part description can not be found.\n" "\n" "%s\n" @@ -5873,116 +5917,128 @@ msgid "" "Do you wish to continue importing other Cars?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:82 +#: ../../../../build/work/app/help/messages.h:85 #, c-format msgid "" -"MSG_CARIMP_MISSING_PARTNO\tThe following car has no Part Number...\tThe following car has no Part Number\n" +"MSG_CARIMP_MISSING_PARTNO\tThe following car has no Part Number...\tThe " +"following car has no Part Number\n" "\n" "%s\n" "\n" "Do you wish to continue importing other Cars?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:83 +#: ../../../../build/work/app/help/messages.h:86 #, c-format msgid "" -"MSG_CARIMP_IGNORED_COLUMN\tThe following column in the Car Import file will be ignored:...\tThe following column in the Car Import file will be ignored:\n" +"MSG_CARIMP_IGNORED_COLUMN\tThe following column in the Car Import file will " +"be ignored:...\tThe following column in the Car Import file will be " +"ignored:\n" "\n" "%s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:84 +#: ../../../../build/work/app/help/messages.h:87 msgid "" -"MSG_CANT_MOVE_UNDER_TRAIN\tThe position of a turnout or turntable cannot...\tThe position of a turnout or turntable cannot\n" -"be changed while occupied by a train." +"MSG_CANT_MOVE_UNDER_TRAIN\tThe position of a turnout or turntable cannot be " +"changed while occupied by a train." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:85 +#: ../../../../build/work/app/help/messages.h:88 msgid "" -"MSG_STRUCT_NO_STRUCTS\tThere are no structures to choose from in the structure...\tThere are no structures to choose from in the structure\n" +"MSG_STRUCT_NO_STRUCTS\tThere are no structures to choose from in the " +"structure...\tThere are no structures to choose from in the structure\n" "selection list. Please check your SCALE, select the\n" " menu to load a Parameter File or\n" "create a new Structure with the Group command." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:86 +#: ../../../../build/work/app/help/messages.h:89 msgid "" -"MSG_TURNOUT_NO_TURNOUT\tThere are no turnouts to choose from in the turnout...\tThere are no turnouts to choose from in the turnout\n" +"MSG_TURNOUT_NO_TURNOUT\tThere are no turnouts to choose from in the " +"turnout...\tThere are no turnouts to choose from in the turnout\n" "selection list. Please check your SCALE, select the\n" -" menu to enter a new turnout\n" +" menu to enter a new turnout\n" "or select the menu to load a\n" "Parameter File" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:87 +#: ../../../../build/work/app/help/messages.h:90 msgid "MSG_NO_UNCONN_EP\tThere are no unconnected end points for this track" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:88 +#: ../../../../build/work/app/help/messages.h:91 msgid "MSG_PULL_FEW_SECTIONS\tThere are too few sections in this loop." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:89 +#: ../../../../build/work/app/help/messages.h:92 msgid "MSG_NO_REDO\tThere is nothing to redo!" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:90 +#: ../../../../build/work/app/help/messages.h:93 msgid "MSG_NO_UNDO\tThere is nothing to undo!" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:91 +#: ../../../../build/work/app/help/messages.h:94 msgid "MSG_TOOMANYSEGSINGROUP\tToo many segments in Group." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:92 +#: ../../../../build/work/app/help/messages.h:95 msgid "MSG_CANNOT_CHANGE\tTrack cannot be changed." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:93 +#: ../../../../build/work/app/help/messages.h:96 msgid "MSG_POINT_INSIDE_TURNTABLE\tTrack endpoint is within turntable radius." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:94 -msgid "MSG_MOVE_POINTS_AWAY_NO_INTERSECTION\tTrack intersection not possible; move points away from frog." +#: ../../../../build/work/app/help/messages.h:97 +msgid "" +"MSG_MOVE_POINTS_AWAY_NO_INTERSECTION\tTrack intersection not possible; move " +"points away from frog." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:95 +#: ../../../../build/work/app/help/messages.h:98 #, c-format -msgid "MSG_TRK_TOO_SHORT\tTrack is too short by N.NNN\t%strack is too short by %0.3f" +msgid "" +"MSG_TRK_TOO_SHORT\tTrack is too short by N.NNN\t%strack is too short by %0.3f" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:96 +#: ../../../../build/work/app/help/messages.h:99 #, c-format msgid "" -"MSG_RADIUS_LSS_EASE_MIN\tTrack radius (N.NNN) is smaller than easement minimum (N.NNN).\tTrack radius (%s) is smaller than\n" -"easement minimum (%s)." +"MSG_RADIUS_LSS_EASE_MIN\tTrack radius (N.NNN) is smaller than easement " +"minimum (N.NNN).\tTrack radius (%s) is smaller than easement minimum (%s)." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:97 -msgid "MSG_CANT_MODIFY_FROZEN_TRK\tTracks in a frozen layer cannot be modified." +#: ../../../../build/work/app/help/messages.h:100 +msgid "" +"MSG_CANT_MODIFY_FROZEN_TRK\tTracks in a frozen layer cannot be modified." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:98 +#: ../../../../build/work/app/help/messages.h:101 msgid "" -"MSG_SEGMENTS_DIFFER\tTurnout definition contains non-track segments....\tTurnout definition contains non-track segments.\n" +"MSG_SEGMENTS_DIFFER\tTurnout definition contains non-track segments...." +"\tTurnout definition contains non-track segments.\n" "\n" "Do you want to include them in this update?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:99 +#: ../../../../build/work/app/help/messages.h:102 msgid "MSG_TURNTABLE_DIAM_GTR_0\tTurntable diameter must greater than 0." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:100 +#: ../../../../build/work/app/help/messages.h:103 #, c-format msgid "" -"MSG_UNDO_ASSERT\tUndo assertion failure %s:%d...\tUndo assertion failure %s:%d\n" +"MSG_UNDO_ASSERT\tUndo assertion failure %s:%d...\tUndo assertion failure %s:" +"%d\n" "Val = %ld(%lx)\n" "%s\n" -"Please report this error to the XTrackCAD project development team at SourceForge." +"Please report this error to the XTrackCAD project development team at " +"SourceForge." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:101 +#: ../../../../build/work/app/help/messages.h:104 #, c-format msgid "" "MSG_PROG_CORRUPTED\tCritical file damaged!...\tCritical file damaged!\n" @@ -5992,36 +6048,37 @@ msgid "" "Please reinstall software." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:102 +#: ../../../../build/work/app/help/messages.h:105 #, c-format msgid "MSG_PT_IS_NOT_TRK\t[X Y] is not a track\t[%s %s] is not a track." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:103 +#: ../../../../build/work/app/help/messages.h:106 msgid "" -"MSG_BITMAP_SIZE_WARNING\tYou have specified a large Bitmap....\tYou have specified a large Bitmap.\n" +"MSG_BITMAP_SIZE_WARNING\tYou have specified a large Bitmap....\tYou have " +"specified a large Bitmap.\n" "\n" "Are you sure you want to continue?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:104 +#: ../../../../build/work/app/help/messages.h:107 #, c-format msgid "Are you sure you want to delete these %d car(s)?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:105 +#: ../../../../build/work/app/help/messages.h:108 #, c-format msgid "" "Cannot open %s file:\n" "%s:%s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:106 +#: ../../../../build/work/app/help/messages.h:109 #, c-format msgid "Unrecognized Option: %s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:107 +#: ../../../../build/work/app/help/messages.h:110 #, c-format msgid "" "End-Of-Line is unexpected in a quoted field.\n" @@ -6030,7 +6087,7 @@ msgid "" "Do you want to continue reading the file?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:108 +#: ../../../../build/work/app/help/messages.h:111 #, c-format msgid "" "A comma was expected after this quoted field.\n" @@ -6039,14 +6096,14 @@ msgid "" "Do you want to continue reading the file?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:109 +#: ../../../../build/work/app/help/messages.h:112 #, c-format msgid "" "Error \\\\\"%s\\\\\" occurred while writing %s.\n" "Please check disk space and system status." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:110 +#: ../../../../build/work/app/help/messages.h:113 #, c-format msgid "" "At least one path for the Turnout T%d does not\n" @@ -6054,28 +6111,28 @@ msgid "" "The track has been unselected." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:111 +#: ../../../../build/work/app/help/messages.h:114 msgid "inv-pathEndTrk on Path." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:112 +#: ../../../../build/work/app/help/messages.h:115 msgid "inv-pathStartTrk on Path" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:113 +#: ../../../../build/work/app/help/messages.h:116 #, c-format msgid "%s:%d- %s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:114 +#: ../../../../build/work/app/help/messages.h:117 msgid "pathEndTrk not on Path." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:115 +#: ../../../../build/work/app/help/messages.h:118 msgid "pathStartTrk not on Path." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:116 +#: ../../../../build/work/app/help/messages.h:119 msgid "" "The tracks cannot be connected together.\n" "\n" @@ -6084,7 +6141,7 @@ msgid "" "the Preferences dialog." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:117 +#: ../../../../build/work/app/help/messages.h:120 msgid "" "The tracks cannot be connected together.\n" "\n" @@ -6093,7 +6150,7 @@ msgid "" "Angle values on the Preferences dialog" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:118 +#: ../../../../build/work/app/help/messages.h:121 msgid "" "The tracks cannot be connected together.\n" "\n" @@ -6101,27 +6158,27 @@ msgid "" "or increase the Connection Distance" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:119 +#: ../../../../build/work/app/help/messages.h:122 msgid "" "The first track for the Align\n" "Rotate command must be Selected." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:120 +#: ../../../../build/work/app/help/messages.h:123 msgid "" "The second track for the Align\n" "Rotate command must be Unselected." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:121 +#: ../../../../build/work/app/help/messages.h:124 msgid "Too many selected tracks, drawing tracks as End Point." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:122 +#: ../../../../build/work/app/help/messages.h:125 msgid "Select an endpoint between two tracks." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:123 +#: ../../../../build/work/app/help/messages.h:126 msgid "" "According to values that have been entered the diverging\n" "track does not connect with the tangent track. Please\n" @@ -6130,36 +6187,36 @@ msgid "" "by Angle Mode radio buttons." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:124 +#: ../../../../build/work/app/help/messages.h:127 msgid "Moved before the end of the turnout" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:125 +#: ../../../../build/work/app/help/messages.h:128 msgid "" "The Coupled Length must be greater than the Car Length,\n" "and the Coupler Length must be greater than 0." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:126 +#: ../../../../build/work/app/help/messages.h:129 msgid "" "The Car Length value must be greater\n" "than the Car Width value." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:127 +#: ../../../../build/work/app/help/messages.h:130 msgid "" "The specified Index is already in use.\n" "The Index will be updated to the next available value." msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:128 +#: ../../../../build/work/app/help/messages.h:131 msgid "" "You have changed values for this object.\n" "\n" "Are you sure you want to Close?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:129 +#: ../../../../build/work/app/help/messages.h:132 #, c-format msgid "" "File version %ld is lower than the minimum\n" @@ -6167,30 +6224,30 @@ msgid "" "layout file using an older version of %s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:130 +#: ../../../../build/work/app/help/messages.h:133 #, c-format msgid "" "%s cannot read the demo file:\n" "%s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:131 +#: ../../../../build/work/app/help/messages.h:134 #, c-format msgid "doDemo: bad number (%d)" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:132 +#: ../../../../build/work/app/help/messages.h:135 msgid "Playback TIMEEND without TIMESTART" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:133 +#: ../../../../build/work/app/help/messages.h:136 #, c-format msgid "" "Unknown playback command (%d)\n" "%s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:134 +#: ../../../../build/work/app/help/messages.h:137 #, c-format msgid "" "Playback file version %ld is lower than the\n" @@ -6199,4047 +6256,4738 @@ msgid "" "older version of %s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:135 +#: ../../../../build/work/app/help/messages.h:138 #, c-format msgid "Scale index (%d) is not valid" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:136 +#: ../../../../build/work/app/help/messages.h:139 #, c-format msgid "" "Scale %s is not valid\n" "Please check your %s.xtq file" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:137 +#: ../../../../build/work/app/help/messages.h:140 msgid "Cannot extend a helix" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:138 +#: ../../../../build/work/app/help/messages.h:141 msgid "Cannot trim a helix" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:139 +#: ../../../../build/work/app/help/messages.h:142 msgid "Ignore further audit notices?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:140 +#: ../../../../build/work/app/help/messages.h:143 #, c-format msgid "%s" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:141 +#: ../../../../build/work/app/help/messages.h:144 msgid "Audit Abort?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:142 +#: ../../../../build/work/app/help/messages.h:145 msgid "Write Audit File?" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:143 +#: ../../../../build/work/app/help/messages.h:146 #, c-format msgid "checkTrackLength: Short track length = %0.3f" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:144 +#: ../../../../build/work/app/help/messages.h:147 #, c-format msgid "checkTrackLength: unknown type: %d" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:145 +#: ../../../../build/work/app/help/messages.h:148 #, c-format msgid "connectTracks: T%d[%d] T%d[%d] d=%0.3f a=%0.3f" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:146 +#: ../../../../build/work/app/help/messages.h:149 #, c-format msgid "GetAngleAtPoint: bad type(%d) for T(%d)" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:147 +#: ../../../../build/work/app/help/messages.h:150 #, c-format msgid "joinTracks: invalid track type=%d" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:148 +#: ../../../../build/work/app/help/messages.h:151 #, c-format msgid "resolveIndex: T%d[%d]: T%d doesn\\\\'t exist" msgstr "" -#: ../../../../xtrkcad-build/app/help/messages.h:149 +#: ../../../../build/work/app/help/messages.h:152 msgid "Moved beyond the end of the track" msgstr "Movido além do fim do trilho" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:10 +#: ../../../../build/work/app/bin/bllnhlp.c:10 msgid "Invokes on-line help for this dialog" msgstr "Invoca ajuda on-line para esta caixa de diálogo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:11 +#: ../../../../build/work/app/bin/bllnhlp.c:11 msgid "Cancels this command" msgstr "Anula este comando" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:12 +#: ../../../../build/work/app/bin/bllnhlp.c:12 msgid "Closes the dialog" msgstr "Fecha a caixa de diálogo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:13 +#: ../../../../build/work/app/bin/bllnhlp.c:13 msgid "About box dialog" msgstr "Caixa de diálogo \"Sobre\"" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:14 +#: ../../../../build/work/app/bin/bllnhlp.c:14 msgid "Move Selected object to top" msgstr "Move objeto selecionado para o topo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:15 +#: ../../../../build/work/app/bin/bllnhlp.c:15 msgid "Raise or Lower all Selected tracks" msgstr "Eleva ou abaixa todo trecho selecionado" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:16 +#: ../../../../build/work/app/bin/bllnhlp.c:16 msgid "Move Selected object to bottom" msgstr "Move objeto selecionado para o fundo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:17 +#: ../../../../build/work/app/bin/bllnhlp.c:17 +msgid "Create a section of track for automation" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:18 +msgid "Edit a Block Definition " +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:19 msgid "Create a new Car/Loco description" msgstr "Cria uma nova descrição do material rodante" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:18 +#: ../../../../build/work/app/bin/bllnhlp.c:20 msgid "Manage your Car and Loco Inventory" msgstr "Gerencia seu inventário de material rodante" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:19 +#: ../../../../build/work/app/bin/bllnhlp.c:21 msgid "Create track circle from center" msgstr "Cria trilho circular a partir do centro" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:20 +#: ../../../../build/work/app/bin/bllnhlp.c:22 msgid "Create fixed radius track circle" msgstr "Cria trilho circular com um raio fixo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:21 +#: ../../../../build/work/app/bin/bllnhlp.c:23 msgid "Set Circle Track creation mode" msgstr "Configura modo de criação de trilho circular" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:22 +#: ../../../../build/work/app/bin/bllnhlp.c:24 msgid "Create track circle from tangent" msgstr "Cria trilho circular a parti da tangente" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:23 +#: ../../../../build/work/app/bin/bllnhlp.c:25 msgid "Removes elevation from Selected tracks" msgstr "Remove inclinação dos trechos selecionados" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:24 +#: ../../../../build/work/app/bin/bllnhlp.c:26 msgid "Command Options dialog" msgstr "Caixa de dialogo das opções de comando" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:25 +#: ../../../../build/work/app/bin/bllnhlp.c:27 msgid "Controls colors" msgstr "Cores dos controles" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:26 +#: ../../../../build/work/app/bin/bllnhlp.c:28 msgid "Connect two tracks" msgstr "Conecta dois trilhos" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:27 +#: ../../../../build/work/app/bin/bllnhlp.c:29 +msgid "Create a control for layout automation" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:30 +#, fuzzy +msgid "Manage control elements" +msgstr "Elementos de controle de layout" + +#: ../../../../build/work/app/bin/bllnhlp.c:31 msgid "Copy selected objects to clipboard" msgstr "Copia objetos selecionados para a área de transferencia" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:28 +#: ../../../../build/work/app/bin/bllnhlp.c:32 msgid "Create curved track from center" msgstr "Cria trilho curvado a partir de um centro" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:29 +#: ../../../../build/work/app/bin/bllnhlp.c:33 msgid "Create curved track from chord" msgstr "Cria trilho curvado a partir de uma corda" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:30 +#: ../../../../build/work/app/bin/bllnhlp.c:34 msgid "Create curved track from end-point" msgstr "Cria trilho curvado a partir de uma extremidade" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:31 +#: ../../../../build/work/app/bin/bllnhlp.c:35 +#, fuzzy +msgid "Create Bezier track" +msgstr "Criar trecho em hélice" + +#: ../../../../build/work/app/bin/bllnhlp.c:36 msgid "Set Curve Track creation mode" msgstr "Configura modo de criação de curva" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:32 +#: ../../../../build/work/app/bin/bllnhlp.c:37 msgid "Create curved track from tangent" msgstr "Cria trecho curvado a partir de um tangente" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:33 +#: ../../../../build/work/app/bin/bllnhlp.c:38 msgid "Manipulate Custom designer entries" msgstr "Manipula entradas do editor personalizado" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:34 +#: ../../../../build/work/app/bin/bllnhlp.c:39 msgid "Moves selected objects to clipboard" msgstr "Move objetos selecionados para a área de transferencia" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:35 +#: ../../../../build/work/app/bin/bllnhlp.c:40 msgid "Delete objects" msgstr "Elimina objetos" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:36 +#: ../../../../build/work/app/bin/bllnhlp.c:41 msgid "Playback demos" msgstr "Playback de demonstrações" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:37 -msgid "Describe objects" -msgstr "Descreve objetos" +#: ../../../../build/work/app/bin/bllnhlp.c:42 +msgid "Change Object Properties" +msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:38 +#: ../../../../build/work/app/bin/bllnhlp.c:43 msgid "Deselect all selected objects" msgstr "Deseleciona todos os objetos" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:39 +#: ../../../../build/work/app/bin/bllnhlp.c:44 msgid "Change Display parameters" msgstr "Altera parâmetros das janelas" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:40 +#: ../../../../build/work/app/bin/bllnhlp.c:45 msgid "Create benchwork" msgstr "Cria bancada" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:41 +#: ../../../../build/work/app/bin/bllnhlp.c:46 msgid "Create a box" msgstr "Cria um retângulo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:42 +#: ../../../../build/work/app/bin/bllnhlp.c:47 msgid "Set Circle drawing command" msgstr "Configura comando de desenho de circunferência" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:43 +#: ../../../../build/work/app/bin/bllnhlp.c:48 msgid "Create a circle" msgstr "Cria circunferência" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:44 +#: ../../../../build/work/app/bin/bllnhlp.c:49 msgid "Draw a circle line from center" msgstr "Desenha uma circunferência a partir do centro" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:45 +#: ../../../../build/work/app/bin/bllnhlp.c:50 msgid "Draw a fixed radius circle line" msgstr "Desenha uma circunferência com um raio fixo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:46 +#: ../../../../build/work/app/bin/bllnhlp.c:51 msgid "Draw a circle line from tangent" msgstr "Desenha uma circunferência a partir de uma tangente" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:47 +#: ../../../../build/work/app/bin/bllnhlp.c:52 msgid "Set Curve drawing command" msgstr "Configura comando de desenho de circunferência" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:48 +#: ../../../../build/work/app/bin/bllnhlp.c:53 msgid "Create a curved line" msgstr "Cria uma linha curva" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:49 +#: ../../../../build/work/app/bin/bllnhlp.c:54 msgid "Create a curved line from End" msgstr "Cria uma linha curva a partir de uma extremidade" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:50 +#: ../../../../build/work/app/bin/bllnhlp.c:55 msgid "Create a curved line from center" msgstr "Cria uma linha curva a partir de um centro" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:51 +#: ../../../../build/work/app/bin/bllnhlp.c:56 msgid "Create a curved line from chord" msgstr "Cria uma linha curva a partir de uma corda" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:52 +#: ../../../../build/work/app/bin/bllnhlp.c:57 msgid "Create a curved line from tangent" msgstr "Cria uma linha curva a partir de uma tangente" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:53 +#: ../../../../build/work/app/bin/bllnhlp.c:58 +#, fuzzy +msgid "Create a Bezier line" +msgstr "Cria uma linha curva" + +#: ../../../../build/work/app/bin/bllnhlp.c:59 msgid "Create a dimension line" msgstr "Cria uma linha de uma dimensão" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:54 +#: ../../../../build/work/app/bin/bllnhlp.c:60 msgid "Create a filled box" msgstr "Cria um retângulo preenchido" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:55 +#: ../../../../build/work/app/bin/bllnhlp.c:61 msgid "Create a filled circle" msgstr "Cria um círculo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:56 +#: ../../../../build/work/app/bin/bllnhlp.c:62 msgid "Draw a filled circle from center" msgstr "Desenha um círculo a partir de um centro" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:57 +#: ../../../../build/work/app/bin/bllnhlp.c:63 msgid "Draw a fixed radius filled circle" msgstr "Desenha um círculo com um raio fixo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:58 +#: ../../../../build/work/app/bin/bllnhlp.c:64 msgid "Draw a filled circle from tangent" msgstr "Desenha um círculo a partir de uma tangente" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:59 +#: ../../../../build/work/app/bin/bllnhlp.c:65 msgid "Create a filled polygon" msgstr "Cria um polígono preenchido" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:60 +#: ../../../../build/work/app/bin/bllnhlp.c:66 msgid "Create a polyline" msgstr "Cria uma linha poligonal" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:61 +#: ../../../../build/work/app/bin/bllnhlp.c:67 msgid "Create a straight line" msgstr "Cria uma linha reta" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:62 +#: ../../../../build/work/app/bin/bllnhlp.c:68 msgid "Set Line drawing command" msgstr "Configura comando de desenho de linha" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:63 +#: ../../../../build/work/app/bin/bllnhlp.c:69 msgid "Set Shape drawing command" msgstr "Configura comando de desenho de polígonos" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:64 +#: ../../../../build/work/app/bin/bllnhlp.c:70 msgid "Draw table edge" msgstr "Desenha limite do tablado" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:65 +#: ../../../../build/work/app/bin/bllnhlp.c:71 msgid "Easement menu" msgstr "Menu de curva de transição" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:67 +#: ../../../../build/work/app/bin/bllnhlp.c:73 msgid "Generate a Parts List of selected objects" msgstr "Gera uma lista de itens dos objetos selecionados" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:68 +#: ../../../../build/work/app/bin/bllnhlp.c:74 msgid "Export a .xti file" msgstr "Expota um arquivo XTI" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:69 +#: ../../../../build/work/app/bin/bllnhlp.c:75 msgid "Export a DXF file" msgstr "Exporta um arquivo DXF" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:70 +#: ../../../../build/work/app/bin/bllnhlp.c:76 msgid "General note about the layout" msgstr "Notas gerais sobre o layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:71 +#: ../../../../build/work/app/bin/bllnhlp.c:77 msgid "Flip selected objects" msgstr "Vira objetos selecionados" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:72 +#: ../../../../build/work/app/bin/bllnhlp.c:78 msgid "Adjust snap grid" msgstr "Ajusta grade" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:73 +#: ../../../../build/work/app/bin/bllnhlp.c:79 msgid "Enable snap grid" msgstr "Habilita grade" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:74 +#: ../../../../build/work/app/bin/bllnhlp.c:80 msgid "Show snap grid" msgstr "Mostra grade" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:75 +#: ../../../../build/work/app/bin/bllnhlp.c:81 msgid "Create a structure from a Group of objects" msgstr "Cria uma estrutura a partir de um grupo de objetos" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:76 +#: ../../../../build/work/app/bin/bllnhlp.c:82 msgid "Create a hand-laid turnout" msgstr "Cria um AMV personalizado" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:77 +#: ../../../../build/work/app/bin/bllnhlp.c:83 msgid "Create a track helix" msgstr "Cria trilho em hélice" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:78 +#: ../../../../build/work/app/bin/bllnhlp.c:84 msgid "Import a .xti file" msgstr "Importa um arquivo XTI" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:79 +#: ../../../../build/work/app/bin/bllnhlp.c:85 msgid "Join two tracks" msgstr "Junta dois trilhos" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:80 +#: ../../../../build/work/app/bin/bllnhlp.c:86 msgid "Change Layers" msgstr "Muda camadas" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:81 +#: ../../../../build/work/app/bin/bllnhlp.c:87 msgid "Selects the current drawing layer" msgstr "Seleciona a camada de desenho corrente" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:82 +#: ../../../../build/work/app/bin/bllnhlp.c:88 msgid "Layout parameters" msgstr "Parâmetros de layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:83 +#: ../../../../build/work/app/bin/bllnhlp.c:89 +#, fuzzy +msgid "Show/Hide Map Window" +msgstr "Mostrar/Ocultar camada" + +#: ../../../../build/work/app/bin/bllnhlp.c:90 msgid "Modify or extend a track" msgstr "Modifica ou estende trilho" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:84 +#: ../../../../build/work/app/bin/bllnhlp.c:91 msgid "Move selected objects" msgstr "Move objetos selecionados" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:85 +#: ../../../../build/work/app/bin/bllnhlp.c:92 msgid "Move a label" msgstr "Move uma etiqueta" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:86 +#: ../../../../build/work/app/bin/bllnhlp.c:93 msgid "Move selected objects to current layer" msgstr "Move objetos selecionados para a camada corrente" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:88 +#: ../../../../build/work/app/bin/bllnhlp.c:95 msgid "Print a BitMap" msgstr "Imprime um bitmap" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:89 +#: ../../../../build/work/app/bin/bllnhlp.c:96 msgid "Create a parallel track" msgstr "Cria um trilho paralelo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:90 +#: ../../../../build/work/app/bin/bllnhlp.c:97 msgid "Register" msgstr "Registra" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:91 +#: ../../../../build/work/app/bin/bllnhlp.c:98 msgid "Copy objects from clipboard" msgstr "Copia objetos da área de transferencia" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:92 +#: ../../../../build/work/app/bin/bllnhlp.c:99 msgid "Perferences dialog" msgstr "Caixa de diálogo de preferências" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:93 +#: ../../../../build/work/app/bin/bllnhlp.c:100 msgid "Display prices of turnouts, sectional tracks and structures" msgstr "Exibe preços de AMVs, trilhos e estruturas" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:94 +#: ../../../../build/work/app/bin/bllnhlp.c:101 msgid "Print the layout" msgstr "Imprime o layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:95 +#: ../../../../build/work/app/bin/bllnhlp.c:102 msgid "Loads and unloads parameter files" msgstr "Carrega e descarrega arquivo de parâmetros" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:96 +#: ../../../../build/work/app/bin/bllnhlp.c:103 msgid "Elevation Profile Command" msgstr "Comando de perfil de inclinação" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:98 +#: ../../../../build/work/app/bin/bllnhlp.c:105 msgid "Command recorder" msgstr "Comando de gravação" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:100 +#: ../../../../build/work/app/bin/bllnhlp.c:107 msgid "Update selected Turnout and Structure definitions" msgstr "Atualiza AMV selecionado e definições de estruturas" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:101 +#: ../../../../build/work/app/bin/bllnhlp.c:108 msgid "Rescale selected objects" msgstr "Reescala objetos selecionados" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:102 +#: ../../../../build/work/app/bin/bllnhlp.c:109 msgid "Rotate selected object(s)" msgstr "Rotaciona objetos selecionados" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:103 +#: ../../../../build/work/app/bin/bllnhlp.c:110 msgid "Show a ruler" msgstr "Exibe régua" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:104 +#: ../../../../build/work/app/bin/bllnhlp.c:111 msgid "Select objects" msgstr "Seleciona objetos" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:105 +#: ../../../../build/work/app/bin/bllnhlp.c:112 msgid "Selects all objects on the layout" msgstr "Seleciona todos os objetos do layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:106 +#: ../../../../build/work/app/bin/bllnhlp.c:113 msgid "Selects all objects in the current Layer" msgstr "Seleciona todos os objetos da camada corrente" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:107 +#: ../../../../build/work/app/bin/bllnhlp.c:114 msgid "Invert current selection" msgstr "Inverte seleção" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:108 +#: ../../../../build/work/app/bin/bllnhlp.c:115 msgid "Split a track" msgstr "Secciona um trilho" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:109 +#: ../../../../build/work/app/bin/bllnhlp.c:116 msgid "Select stranded (unconnected) track pieces" msgstr "Seleciona trecho não conectados" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:110 +#: ../../../../build/work/app/bin/bllnhlp.c:117 +msgid "Create a sensor (ie. a occupancy detector or a toggle switch)" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:118 +#, fuzzy +msgid "Create a signal for train control" +msgstr "Cria trilho circular a parti da tangente" + +#: ../../../../build/work/app/bin/bllnhlp.c:119 msgid "Choose which commands are sticky" -msgstr "Escolhe quais comandos são \"grudendos\". Aqueles cujos botões de atalho continuarão habilitados após seu uso." +msgstr "" +"Escolhe quais comandos são \"grudendos\". Aqueles cujos botões de atalho " +"continuarão habilitados após seu uso." -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:111 +#: ../../../../build/work/app/bin/bllnhlp.c:120 msgid "Create straight track" msgstr "Cria um trilho reto" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:112 +#: ../../../../build/work/app/bin/bllnhlp.c:121 msgid "Place a structure on the layout" msgstr "Posiciona uma estrutura no layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:113 +#: ../../../../build/work/app/bin/bllnhlp.c:122 +#, fuzzy +msgid "Create a switchmotor for turnout control" +msgstr "Cria uma nova definição de AMV" + +#: ../../../../build/work/app/bin/bllnhlp.c:123 +#, fuzzy +msgid "Edit a switchmotor definition" +msgstr "Cria uma nova definição de AMV" + +#: ../../../../build/work/app/bin/bllnhlp.c:124 msgid "Enter text on the layout" msgstr "Entra um texto no layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:114 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:459 +#: ../../../../build/work/app/bin/bllnhlp.c:125 +#: ../../../../build/work/app/bin/bllnhlp.c:486 msgid "Controls the size of the entered text" msgstr "Controla o tamanho do texto inserido" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:115 +#: ../../../../build/work/app/bin/bllnhlp.c:126 msgid "Tip of the Day window" msgstr "Janela de dica do dia" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:116 +#: ../../../../build/work/app/bin/bllnhlp.c:127 msgid "Run Trains" msgstr "Roda trens" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:117 +#: ../../../../build/work/app/bin/bllnhlp.c:128 msgid "Pause/Resume Trains" msgstr "Pausa / roda trens" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:118 +#: ../../../../build/work/app/bin/bllnhlp.c:129 msgid "Place a car on the layout" msgstr "Posiciona material rodante no layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:119 +#: ../../../../build/work/app/bin/bllnhlp.c:130 msgid "Exit Trains" msgstr "Sai do modo de trem" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:120 +#: ../../../../build/work/app/bin/bllnhlp.c:131 msgid "Hide/Unhide a track" msgstr "Oculta / exibe um trilho" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:121 +#: ../../../../build/work/app/bin/bllnhlp.c:132 msgid "Place a turnout or sectional track" msgstr "Posiciona um AMV ou trilho" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:122 +#: ../../../../build/work/app/bin/bllnhlp.c:133 msgid "Create a new turnout definition" msgstr "Cria uma nova definição de AMV" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:123 +#: ../../../../build/work/app/bin/bllnhlp.c:134 msgid "Place a turntable" msgstr "Posiciona um virador de locomotivas" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:124 +#: ../../../../build/work/app/bin/bllnhlp.c:135 msgid "Updates old source files with 3 part titles" msgstr "Atualiza arquivos antigos com três partes" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:126 +#: ../../../../build/work/app/bin/bllnhlp.c:137 msgid "Ungroup objects" msgstr "Desagrupa objetos" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:127 +#: ../../../../build/work/app/bin/bllnhlp.c:138 msgid "Draw tracks with thin lines" msgstr "Desenha trilhos com linhas finas" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:128 +#: ../../../../build/work/app/bin/bllnhlp.c:139 msgid "Draw tracks with medium lines" msgstr "Desenha trilhos com linhas médias" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:129 +#: ../../../../build/work/app/bin/bllnhlp.c:140 msgid "Draw tracks with thick lines" msgstr "Desenha trilhos com linhas grossas" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:130 +#: ../../../../build/work/app/bin/bllnhlp.c:141 msgid "Change drawing scale" msgstr "Altera escala de desenho" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:131 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:143 +#: ../../../../build/work/app/bin/bllnhlp.c:142 +#: ../../../../build/work/app/bin/bllnhlp.c:154 msgid "Zoom in" msgstr "Aproxima" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:132 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:144 +#: ../../../../build/work/app/bin/bllnhlp.c:143 +#: ../../../../build/work/app/bin/bllnhlp.c:155 msgid "Zoom out" msgstr "Afasta" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:133 +#: ../../../../build/work/app/bin/bllnhlp.c:144 msgid "File Menu" msgstr "Menu de arquivo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:134 +#: ../../../../build/work/app/bin/bllnhlp.c:145 msgid "Save layout" msgstr "Salva layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:135 +#: ../../../../build/work/app/bin/bllnhlp.c:146 msgid "Save layout under a new name " msgstr "Salva layout com um novo nome" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:136 +#: ../../../../build/work/app/bin/bllnhlp.c:147 msgid "New layout" msgstr "Novo layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:137 +#: ../../../../build/work/app/bin/bllnhlp.c:148 msgid "Generate parts list" msgstr "Gera lista de itens" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:138 +#: ../../../../build/work/app/bin/bllnhlp.c:149 msgid "Load a layout" msgstr "Carrega um layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:139 +#: ../../../../build/work/app/bin/bllnhlp.c:150 msgid "Exit the program" msgstr "Sai do programa" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:140 +#: ../../../../build/work/app/bin/bllnhlp.c:151 msgid "Revert to last saved state of layout plan" msgstr "Reverte para o estado do último layout salvo" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:141 +#: ../../../../build/work/app/bin/bllnhlp.c:152 msgid "Edit menu" msgstr "Menu editar" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:142 +#: ../../../../build/work/app/bin/bllnhlp.c:153 msgid "Redraw layout" msgstr "Redesenha layout" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:145 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:148 +#: ../../../../build/work/app/bin/bllnhlp.c:156 +#: ../../../../build/work/app/bin/bllnhlp.c:159 msgid "Tools menu" msgstr "Menu de ferramentas" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:146 +#: ../../../../build/work/app/bin/bllnhlp.c:157 msgid "View menu" msgstr "Menu visualizar" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:147 +#: ../../../../build/work/app/bin/bllnhlp.c:158 msgid "Toolbar configuration" msgstr "Configuração da barra de ferramentas" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:149 +#: ../../../../build/work/app/bin/bllnhlp.c:160 msgid "Options menu" msgstr "Menu de opções" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:150 +#: ../../../../build/work/app/bin/bllnhlp.c:161 msgid "Playback/Record commands" msgstr "Comandos de playback e gravação" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:151 +#: ../../../../build/work/app/bin/bllnhlp.c:162 msgid "Window menu" msgstr "Menu de janelas" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:152 +#: ../../../../build/work/app/bin/bllnhlp.c:163 msgid "Help menu" msgstr "Menu de ajuda" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:153 +#: ../../../../build/work/app/bin/bllnhlp.c:164 msgid "Recent error messages and explanations" msgstr "Últimas mensagens de erros e explicações" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:154 +#: ../../../../build/work/app/bin/bllnhlp.c:165 msgid "Move Hot Bar left" msgstr "Move barra de itens à esquerda" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:155 +#: ../../../../build/work/app/bin/bllnhlp.c:166 msgid "Move Hot Bar right" msgstr "Move barra de itens à direita" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:156 +#: ../../../../build/work/app/bin/bllnhlp.c:167 msgid "Total track count" msgstr "Total de trilhos" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:157 +#: ../../../../build/work/app/bin/bllnhlp.c:168 msgid "X Position of cursor" msgstr "Posição X do cursor" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:158 +#: ../../../../build/work/app/bin/bllnhlp.c:169 msgid "Y Position of cursor" msgstr "Posição Y do cursor" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:159 +#: ../../../../build/work/app/bin/bllnhlp.c:170 msgid "Drawing scale" msgstr "Escala de desenho" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:160 +#: ../../../../build/work/app/bin/bllnhlp.c:171 msgid "Message and status line" msgstr "Mensagem e linha de status" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:161 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:162 +#: ../../../../build/work/app/bin/bllnhlp.c:172 +#: ../../../../build/work/app/bin/bllnhlp.c:173 msgid "Main layout canvas" msgstr "Tela de layout principal " -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:163 +#: ../../../../build/work/app/bin/bllnhlp.c:174 msgid "Main drawing canvas" msgstr "Tela de desenho principal" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:164 +#: ../../../../build/work/app/bin/bllnhlp.c:175 msgid "Command buttons" msgstr "Botões dos comandos" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:165 +#: ../../../../build/work/app/bin/bllnhlp.c:176 msgid "Menus" msgstr "Menus" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:166 +#: ../../../../build/work/app/bin/bllnhlp.c:177 msgid "Tile, Filename and Window Manager buttons" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:167 +#: ../../../../build/work/app/bin/bllnhlp.c:178 msgid "Turnout and Structure Hot Bar" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:168 +#: ../../../../build/work/app/bin/bllnhlp.c:179 msgid "Active layer list and layer buttons" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:169 +#: ../../../../build/work/app/bin/bllnhlp.c:180 msgid "Map window" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:170 +#: ../../../../build/work/app/bin/bllnhlp.c:181 msgid "This is the portion of the layout shown in the Main Window canvas" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:171 +#: ../../../../build/work/app/bin/bllnhlp.c:182 msgid "Raise or Lower all Selected Track" msgstr "Eleva ou abaixa todos os trechos selecionados" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:172 +#: ../../../../build/work/app/bin/bllnhlp.c:183 +#, fuzzy +msgid "Name of block" +msgstr "Isto não é um bloco!" + +#: ../../../../build/work/app/bin/bllnhlp.c:184 +msgid "Script that the block will run" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:185 +msgid "List of tracks in the Block" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:186 msgid "Add or Update car object" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:173 +#: ../../../../build/work/app/bin/bllnhlp.c:187 msgid "Manufacturer name" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:176 +#: ../../../../build/work/app/bin/bllnhlp.c:190 msgid "Is the Car a Locomotive?" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:177 +#: ../../../../build/work/app/bin/bllnhlp.c:191 msgid "Part Number and Description" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:178 +#: ../../../../build/work/app/bin/bllnhlp.c:192 msgid "Manufacturer Part Number" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:179 +#: ../../../../build/work/app/bin/bllnhlp.c:193 msgid "Use the Selected figure as the car image" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:180 +#: ../../../../build/work/app/bin/bllnhlp.c:194 msgid "Use the default figure as the car image" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:181 +#: ../../../../build/work/app/bin/bllnhlp.c:195 msgid "Optional description of the Car Part" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:182 +#: ../../../../build/work/app/bin/bllnhlp.c:196 msgid "Flip car image" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:183 +#: ../../../../build/work/app/bin/bllnhlp.c:197 msgid "Display Car Item information or reporting marks and dimensions" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:184 +#: ../../../../build/work/app/bin/bllnhlp.c:198 msgid "Full Roadname" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:185 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:186 +#: ../../../../build/work/app/bin/bllnhlp.c:199 +#: ../../../../build/work/app/bin/bllnhlp.c:200 msgid "Car Type" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:187 +#: ../../../../build/work/app/bin/bllnhlp.c:201 msgid "Reporting Marks (Roadname abbreviation)" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:188 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:357 +#: ../../../../build/work/app/bin/bllnhlp.c:202 +#: ../../../../build/work/app/bin/bllnhlp.c:378 msgid "Car Number" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:189 +#: ../../../../build/work/app/bin/bllnhlp.c:203 msgid "Car body Color" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:190 +#: ../../../../build/work/app/bin/bllnhlp.c:204 msgid "Length of car body" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:191 +#: ../../../../build/work/app/bin/bllnhlp.c:205 msgid "Width of car body" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:192 +#: ../../../../build/work/app/bin/bllnhlp.c:206 msgid "Distance between Trucks " msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:193 +#: ../../../../build/work/app/bin/bllnhlp.c:207 msgid "Coupler are mounted on body or truck" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:194 +#: ../../../../build/work/app/bin/bllnhlp.c:208 msgid "Overall Coupled Length" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:195 +#: ../../../../build/work/app/bin/bllnhlp.c:209 msgid "Coupler Length from end of car" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:196 +#: ../../../../build/work/app/bin/bllnhlp.c:210 msgid "Diagram of Car" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:197 +#: ../../../../build/work/app/bin/bllnhlp.c:211 msgid "Item Index Number" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:198 +#: ../../../../build/work/app/bin/bllnhlp.c:212 msgid "Original Purchase Price" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:200 +#: ../../../../build/work/app/bin/bllnhlp.c:214 msgid "Condition of car" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:201 +#: ../../../../build/work/app/bin/bllnhlp.c:215 msgid "Original Purchase Date" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:202 +#: ../../../../build/work/app/bin/bllnhlp.c:216 msgid "Last Service Date" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:203 +#: ../../../../build/work/app/bin/bllnhlp.c:217 msgid "Number of identical cars to be entered" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:204 +#: ../../../../build/work/app/bin/bllnhlp.c:218 msgid "Do all the cars have the same Number?" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:205 +#: ../../../../build/work/app/bin/bllnhlp.c:219 msgid "Notes about the car" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:206 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:207 +#: ../../../../build/work/app/bin/bllnhlp.c:220 +#: ../../../../build/work/app/bin/bllnhlp.c:221 msgid "Create a new car Part or Prototype definitions" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:208 +#: ../../../../build/work/app/bin/bllnhlp.c:222 msgid "Finds the selected Car Item on the layout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:209 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:210 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:211 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:212 +#: ../../../../build/work/app/bin/bllnhlp.c:223 +#: ../../../../build/work/app/bin/bllnhlp.c:224 +#: ../../../../build/work/app/bin/bllnhlp.c:225 +#: ../../../../build/work/app/bin/bllnhlp.c:226 msgid "Sort the Item list" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:214 +#: ../../../../build/work/app/bin/bllnhlp.c:228 msgid "Edit the selected Car Item" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:215 +#: ../../../../build/work/app/bin/bllnhlp.c:229 msgid "Add a new Car Item" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:216 +#: ../../../../build/work/app/bin/bllnhlp.c:230 msgid "Delete the selected Car Items" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:217 +#: ../../../../build/work/app/bin/bllnhlp.c:231 msgid "Import a Car Item .csv file" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:218 +#: ../../../../build/work/app/bin/bllnhlp.c:232 msgid "Export a Car Item .csv file" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:219 +#: ../../../../build/work/app/bin/bllnhlp.c:233 msgid "Create a text list of the Car Items" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:220 +#: ../../../../build/work/app/bin/bllnhlp.c:234 msgid "Specifies the radius of the circle track" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:221 +#: ../../../../build/work/app/bin/bllnhlp.c:235 msgid "How to draw track being moved/rotated" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:222 +#: ../../../../build/work/app/bin/bllnhlp.c:236 msgid "Default command is Describe or Select" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:223 +#: ../../../../build/work/app/bin/bllnhlp.c:237 msgid "Action to invoke on Right-Click" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:225 +#: ../../../../build/work/app/bin/bllnhlp.c:239 +#, fuzzy +msgid "The list of control elements" +msgstr "Elementos de controle de layout" + +#: ../../../../build/work/app/bin/bllnhlp.c:240 +#, fuzzy +msgid "Edit the element" +msgstr "Menu editar" + +#: ../../../../build/work/app/bin/bllnhlp.c:241 +msgid "Delete the element" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:242 msgid "Contents Label for new Parameter file" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:226 +#: ../../../../build/work/app/bin/bllnhlp.c:243 msgid "List of custom designed turnouts and structures" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:227 +#: ../../../../build/work/app/bin/bllnhlp.c:244 msgid "Invoke designer editor" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:228 +#: ../../../../build/work/app/bin/bllnhlp.c:245 msgid "Remove selected entries" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:229 +#: ../../../../build/work/app/bin/bllnhlp.c:246 msgid "Copy selected entries to Parameter File" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:230 +#: ../../../../build/work/app/bin/bllnhlp.c:247 msgid "Create a New part or prototype" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:231 +#: ../../../../build/work/app/bin/bllnhlp.c:248 msgid "Update custom file and close" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:232 +#: ../../../../build/work/app/bin/bllnhlp.c:249 msgid "Executes the next step of the demo" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:233 +#: ../../../../build/work/app/bin/bllnhlp.c:250 msgid "Skip to next demo" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:234 +#: ../../../../build/work/app/bin/bllnhlp.c:251 msgid "Stops the demonstration and returns you to XTrackCAD" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:235 +#: ../../../../build/work/app/bin/bllnhlp.c:252 msgid "Select speed of Playback" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:236 +#: ../../../../build/work/app/bin/bllnhlp.c:253 msgid "This is where comments about the demo are displayed" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:272 +#: ../../../../build/work/app/bin/bllnhlp.c:290 msgid "Move the Main canvas if you drag near the edge" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:273 +#: ../../../../build/work/app/bin/bllnhlp.c:291 msgid "Color tracks or other objects by layer" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:274 +#: ../../../../build/work/app/bin/bllnhlp.c:292 msgid "Controls the drawing of hidden tracks" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:275 +#: ../../../../build/work/app/bin/bllnhlp.c:293 msgid "Controls the drawing of End-Points" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:276 +#: ../../../../build/work/app/bin/bllnhlp.c:294 msgid "How to draw track ties" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:277 +#: ../../../../build/work/app/bin/bllnhlp.c:295 +msgid "Show crosshair at center of curves" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:296 msgid "Drawing scale when to draw tracks with 2 rails" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:278 +#: ../../../../build/work/app/bin/bllnhlp.c:297 msgid "Drawing scale of the map window" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:279 +#: ../../../../build/work/app/bin/bllnhlp.c:298 msgid "Whether the main layout is updated while dragging on the Map" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:280 +#: ../../../../build/work/app/bin/bllnhlp.c:299 msgid "Enable labels for Turnouts, Flextrack Lengths and Elevations" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:281 +#: ../../../../build/work/app/bin/bllnhlp.c:300 msgid "When to label Turnout, Flextrack Lengths and Elevations" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:282 +#: ../../../../build/work/app/bin/bllnhlp.c:301 msgid "Font size for labels on layout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:283 +#: ../../../../build/work/app/bin/bllnhlp.c:302 msgid "Label elements on the Hot Bar" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:284 +#: ../../../../build/work/app/bin/bllnhlp.c:303 msgid "Label elements on layout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:285 +#: ../../../../build/work/app/bin/bllnhlp.c:304 msgid "Label elements for lists" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:286 +#: ../../../../build/work/app/bin/bllnhlp.c:305 msgid "How to group cars on the Train Hot Bar" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:287 +#: ../../../../build/work/app/bin/bllnhlp.c:306 msgid "Delay (in mS) between updating train movements" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:288 +#: ../../../../build/work/app/bin/bllnhlp.c:307 msgid "Don't show trains in tunnels when tunnels are hidden" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:290 +#: ../../../../build/work/app/bin/bllnhlp.c:308 +msgid "Display unconnected endpoints of track with sepecial marks" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:309 +msgid "Whether zoom is locked to the bottom left corner or the center point" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:311 msgid "Width of the lines" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:291 +#: ../../../../build/work/app/bin/bllnhlp.c:312 msgid "Color of the lines" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:292 +#: ../../../../build/work/app/bin/bllnhlp.c:313 msgid "List of types of Lumber" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:293 +#: ../../../../build/work/app/bin/bllnhlp.c:314 msgid "Color of Benchwork" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:294 +#: ../../../../build/work/app/bin/bllnhlp.c:315 msgid "Orientation of Benchwork" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:295 +#: ../../../../build/work/app/bin/bllnhlp.c:316 msgid "Size of Dimension Arrows" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:296 +#: ../../../../build/work/app/bin/bllnhlp.c:317 msgid "This controls the sharpness of the easement curve" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:297 +#: ../../../../build/work/app/bin/bllnhlp.c:318 msgid "Minimum radius" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:298 +#: ../../../../build/work/app/bin/bllnhlp.c:319 msgid "Maximum offset" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:299 +#: ../../../../build/work/app/bin/bllnhlp.c:320 msgid "Easement length" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:300 -msgid "These radio buttons are a short-cut for Values of 0.0, 0.5, 1.0 and 2.0. None turns Easements off" +#: ../../../../build/work/app/bin/bllnhlp.c:321 +msgid "" +"These radio buttons are a short-cut for Values of 0.0, 0.5, 1.0 and 2.0. " +"None turns Easements off" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:301 +#: ../../../../build/work/app/bin/bllnhlp.c:322 msgid "Complete easement selection" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:302 +#: ../../../../build/work/app/bin/bllnhlp.c:323 msgid "Type of elevation" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:303 +#: ../../../../build/work/app/bin/bllnhlp.c:324 msgid "Height of End Point" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:304 +#: ../../../../build/work/app/bin/bllnhlp.c:325 msgid "Compute elevation based on neighbors" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:305 +#: ../../../../build/work/app/bin/bllnhlp.c:326 msgid "Compute grade based on neighbors" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:306 +#: ../../../../build/work/app/bin/bllnhlp.c:327 msgid "Specify a name for an End-Point" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:308 +#: ../../../../build/work/app/bin/bllnhlp.c:329 msgid "Print parts list" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:309 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:408 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:503 +#: ../../../../build/work/app/bin/bllnhlp.c:330 +#: ../../../../build/work/app/bin/bllnhlp.c:430 +#: ../../../../build/work/app/bin/bllnhlp.c:530 msgid "Invoke the Print Setup dialog" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:310 +#: ../../../../build/work/app/bin/bllnhlp.c:331 msgid "Save parts list to file" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:311 +#: ../../../../build/work/app/bin/bllnhlp.c:332 msgid "This is the list of parts for the layout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:312 +#: ../../../../build/work/app/bin/bllnhlp.c:333 msgid "Enable prices on the Parts List" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:313 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:316 +#: ../../../../build/work/app/bin/bllnhlp.c:334 +#: ../../../../build/work/app/bin/bllnhlp.c:337 msgid "Spacing between major grid lines" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:314 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:317 +#: ../../../../build/work/app/bin/bllnhlp.c:335 +#: ../../../../build/work/app/bin/bllnhlp.c:338 msgid "Allows the spacing to be subdivided" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:315 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:318 +#: ../../../../build/work/app/bin/bllnhlp.c:336 +#: ../../../../build/work/app/bin/bllnhlp.c:339 msgid "Specifies if positions are snaped in this direction" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:319 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:320 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:321 +#: ../../../../build/work/app/bin/bllnhlp.c:340 +#: ../../../../build/work/app/bin/bllnhlp.c:341 +#: ../../../../build/work/app/bin/bllnhlp.c:342 msgid "Shows the origin and angle of the grid" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:322 +#: ../../../../build/work/app/bin/bllnhlp.c:343 msgid "Specifies if the grid is shown" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:323 +#: ../../../../build/work/app/bin/bllnhlp.c:344 msgid "Completes the grid specification" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:327 +#: ../../../../build/work/app/bin/bllnhlp.c:348 msgid "Number of segments in Group" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:328 +#: ../../../../build/work/app/bin/bllnhlp.c:349 msgid "Replace the Selected object with the new definition?" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:329 +#: ../../../../build/work/app/bin/bllnhlp.c:350 msgid "Creates a new Structure (or Turnout)" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:330 +#: ../../../../build/work/app/bin/bllnhlp.c:351 msgid "Elevation difference of Helix End-Points" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:331 +#: ../../../../build/work/app/bin/bllnhlp.c:352 msgid "Helix Radius" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:332 +#: ../../../../build/work/app/bin/bllnhlp.c:353 msgid "Number of turns in the helix" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:333 +#: ../../../../build/work/app/bin/bllnhlp.c:354 msgid "Angle betweek helix entrance and exit" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:334 +#: ../../../../build/work/app/bin/bllnhlp.c:355 msgid "Grade in helix" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:335 +#: ../../../../build/work/app/bin/bllnhlp.c:356 msgid "Separation between helix layers" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:336 +#: ../../../../build/work/app/bin/bllnhlp.c:357 msgid "Layer list" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:337 +#: ../../../../build/work/app/bin/bllnhlp.c:358 msgid "Layer Name" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:338 +#: ../../../../build/work/app/bin/bllnhlp.c:359 msgid "Color of layer" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:339 +#: ../../../../build/work/app/bin/bllnhlp.c:360 msgid "Layer is drawn on Main window" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:340 +#: ../../../../build/work/app/bin/bllnhlp.c:361 msgid "Layer cannot be changed" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:341 +#: ../../../../build/work/app/bin/bllnhlp.c:362 msgid "Layer is drawn on Map window" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:342 +#: ../../../../build/work/app/bin/bllnhlp.c:363 msgid "Number of layer buttons to show" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:343 +#: ../../../../build/work/app/bin/bllnhlp.c:364 msgid "Number of objects in this layer" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:345 +#: ../../../../build/work/app/bin/bllnhlp.c:366 msgid "Load layer configuration from default" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:346 +#: ../../../../build/work/app/bin/bllnhlp.c:367 msgid "Save current layer configuration as default" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:347 +#: ../../../../build/work/app/bin/bllnhlp.c:368 msgid "Overwrite layer configuration with system default values" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:348 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:349 +#: ../../../../build/work/app/bin/bllnhlp.c:369 +#: ../../../../build/work/app/bin/bllnhlp.c:370 msgid "Specifies the size of the room (in inches or centimeters)" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:350 +#: ../../../../build/work/app/bin/bllnhlp.c:371 msgid "Specifies the layout Title that will appear on printouts" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:351 +#: ../../../../build/work/app/bin/bllnhlp.c:372 msgid "Specifies the layout Subtitle that will appear on printouts" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:352 +#: ../../../../build/work/app/bin/bllnhlp.c:373 msgid "Specifies the Modelling Scale" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:353 +#: ../../../../build/work/app/bin/bllnhlp.c:374 msgid "Specifies the rail gauge, ie. the distance between the rails" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:354 -msgid "Specifies minimum track radius (in inches or centimeters). Tracks with a smaller radius are considered exceptional." -msgstr "Especifica raio mínimo (em centímetros ou em polegadas). Trechos com raios menores serão considerados excepcionais." +#: ../../../../build/work/app/bin/bllnhlp.c:375 +msgid "" +"Specifies minimum track radius (in inches or centimeters). Tracks with a " +"smaller radius are considered exceptional." +msgstr "" +"Especifica raio mínimo (em centímetros ou em polegadas). Trechos com raios " +"menores serão considerados excepcionais." -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:355 -msgid "Specifies maximum track elevation expressed as a percent (%). Tracks with a larger elevation are considered exceptional." -msgstr "Especifica inclinação máxima (em porcentagem). Trechos com inclinações maiores serão considerados excepcionais." +#: ../../../../build/work/app/bin/bllnhlp.c:376 +msgid "" +"Specifies maximum track elevation expressed as a percent (%). Tracks with a " +"larger elevation are considered exceptional." +msgstr "" +"Especifica inclinação máxima (em porcentagem). Trechos com inclinações " +"maiores serão considerados excepcionais." -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:358 -msgid "This is the body of the Note. To change this select Modify from the File Menu" +#: ../../../../build/work/app/bin/bllnhlp.c:379 +msgid "" +"This is the body of the Note. To change this select Modify from the File " +"Menu" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:360 +#: ../../../../build/work/app/bin/bllnhlp.c:381 msgid "Specifies number of pixels per inch (or centimeter)" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:362 -msgid "Specifies whether Layout Titles, Borders or Track Centerlines are printed on the BitMap" +#: ../../../../build/work/app/bin/bllnhlp.c:383 +msgid "" +"Specifies whether Layout Titles, Borders or Track Centerlines are printed on " +"the BitMap" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:363 +#: ../../../../build/work/app/bin/bllnhlp.c:384 msgid "Specifies the separation between parallel tracks" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:364 +#: ../../../../build/work/app/bin/bllnhlp.c:385 msgid "Enter your name as specified in the XTrackCAD Registration Notice" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:365 +#: ../../../../build/work/app/bin/bllnhlp.c:386 msgid "Enter the key value as specified in the XTrackCAD Registration Notice" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:366 +#: ../../../../build/work/app/bin/bllnhlp.c:387 msgid "Validates the name and key. Terminates the registration command" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:367 -msgid "0° is up or to the right" +#: ../../../../build/work/app/bin/bllnhlp.c:388 +msgid "0ï¿œ is up or to the right" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:368 +#: ../../../../build/work/app/bin/bllnhlp.c:389 msgid "Choose english (inches) or metric (centimeters)" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:369 +#: ../../../../build/work/app/bin/bllnhlp.c:390 msgid "How to display length measurements" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:370 +#: ../../../../build/work/app/bin/bllnhlp.c:391 msgid "Do not create tracks to be shorter than this value" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:371 +#: ../../../../build/work/app/bin/bllnhlp.c:392 msgid "Maximum distance between connected end points" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:372 +#: ../../../../build/work/app/bin/bllnhlp.c:393 msgid "Minimum angle between connected End-Points" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:373 +#: ../../../../build/work/app/bin/bllnhlp.c:394 msgid "Specifies the minimum angle between tracks connected to a turntable" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:374 +#: ../../../../build/work/app/bin/bllnhlp.c:395 msgid "Trains will crash above this speed" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:375 +#: ../../../../build/work/app/bin/bllnhlp.c:396 msgid "Enable/Disable balloon popup help windows" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:376 +#: ../../../../build/work/app/bin/bllnhlp.c:397 msgid "How far you can move the mouse before its considered a drag" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:377 +#: ../../../../build/work/app/bin/bllnhlp.c:398 msgid "How long you can hold a mouse button down before its considered a drag" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:378 +#: ../../../../build/work/app/bin/bllnhlp.c:399 msgid "Minimum distance (in pixels) between grid lines/ticks" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:379 -msgid "Specifies the Check Point frequency; number of modifications made since the last save." -msgstr "Especifica a freqüência de salvamento automático. Isto é, o número de modificações desde a última gravação." +#: ../../../../build/work/app/bin/bllnhlp.c:400 +msgid "" +"Specifies the Check Point frequency; number of modifications made since the " +"last save." +msgstr "" +"Especifica a freqüência de salvamento automático. Isto é, o número de " +"modificações desde a última gravação." -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:380 +#: ../../../../build/work/app/bin/bllnhlp.c:401 msgid "Resume work on last layout or start with new layout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:382 +#: ../../../../build/work/app/bin/bllnhlp.c:403 msgid "Updated cost of current selected item" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:384 +#: ../../../../build/work/app/bin/bllnhlp.c:405 msgid "Selection list for prices" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:385 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:386 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:387 +#: ../../../../build/work/app/bin/bllnhlp.c:406 +#: ../../../../build/work/app/bin/bllnhlp.c:407 +#: ../../../../build/work/app/bin/bllnhlp.c:408 msgid "Price of specified length of flex-track" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:389 +#: ../../../../build/work/app/bin/bllnhlp.c:410 +#, fuzzy +msgid "Controls the printing of a centerline of track cmdPrint" +msgstr "Controla o tamanho do texto inserido" + +#: ../../../../build/work/app/bin/bllnhlp.c:411 msgid "Controls the reduction (scale) of the printout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:390 +#: ../../../../build/work/app/bin/bllnhlp.c:412 msgid "Scaled page width (Scale times physical page width)" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:391 +#: ../../../../build/work/app/bin/bllnhlp.c:413 msgid "Sets page size to the maximum (based on scale and physical page size)" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:392 +#: ../../../../build/work/app/bin/bllnhlp.c:414 msgid "Scaled page height (Scale times physical page height)" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:393 +#: ../../../../build/work/app/bin/bllnhlp.c:415 msgid "Sets scale, origin and angle for a one page printout of the layout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:394 +#: ../../../../build/work/app/bin/bllnhlp.c:416 msgid "Print page in Portrait or Landscape format" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:395 +#: ../../../../build/work/app/bin/bllnhlp.c:417 msgid "Order of printing pages" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:396 +#: ../../../../build/work/app/bin/bllnhlp.c:418 msgid "Print Title, Date, Author and other information at bottom of page?" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:397 +#: ../../../../build/work/app/bin/bllnhlp.c:419 msgid "Ignore unprintable page margins?" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:398 +#: ../../../../build/work/app/bin/bllnhlp.c:420 msgid "Print Registration Marks at 1:1?" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:399 +#: ../../../../build/work/app/bin/bllnhlp.c:421 msgid "Print Snap Grid?" msgstr "Linha e divisão da grade" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:400 +#: ../../../../build/work/app/bin/bllnhlp.c:422 msgid "Print Rulers on all page edges?" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:401 +#: ../../../../build/work/app/bin/bllnhlp.c:423 msgid "Print Roadbed Outline?" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:403 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:404 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:406 -msgid "Origin of the print grid. This is useful if you want to reprint a set of pages" +#: ../../../../build/work/app/bin/bllnhlp.c:425 +#: ../../../../build/work/app/bin/bllnhlp.c:426 +#: ../../../../build/work/app/bin/bllnhlp.c:428 +msgid "" +"Origin of the print grid. This is useful if you want to reprint a set of " +"pages" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:405 +#: ../../../../build/work/app/bin/bllnhlp.c:427 msgid "Resets the origin and angle to 0" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:407 +#: ../../../../build/work/app/bin/bllnhlp.c:429 msgid "Deselects all pages" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:409 +#: ../../../../build/work/app/bin/bllnhlp.c:431 msgid "Print selected pages and terminates the print command" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:410 +#: ../../../../build/work/app/bin/bllnhlp.c:432 msgid "List of loaded and unloaded parameter files" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:411 +#: ../../../../build/work/app/bin/bllnhlp.c:433 msgid "Show parameter files by names or descriptions" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:412 +#: ../../../../build/work/app/bin/bllnhlp.c:434 msgid "Toggle the loaded status of the selected parameter file" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:413 +#: ../../../../build/work/app/bin/bllnhlp.c:435 msgid "Find a parameter file for loading" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:414 +#: ../../../../build/work/app/bin/bllnhlp.c:436 msgid "Update parameter file list" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:415 +#: ../../../../build/work/app/bin/bllnhlp.c:437 +#, fuzzy +msgid "Select all parameter files shown" +msgstr "Lendo arquivos de parâmetros" + +#: ../../../../build/work/app/bin/bllnhlp.c:438 msgid "Profile of specified path" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:416 +#: ../../../../build/work/app/bin/bllnhlp.c:439 msgid "Clear the profile" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:417 +#: ../../../../build/work/app/bin/bllnhlp.c:440 msgid "Print the profile" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:419 +#: ../../../../build/work/app/bin/bllnhlp.c:442 msgid "Stop recording" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:420 +#: ../../../../build/work/app/bin/bllnhlp.c:443 msgid "Insert a message" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:421 +#: ../../../../build/work/app/bin/bllnhlp.c:444 msgid "End a message" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:422 +#: ../../../../build/work/app/bin/bllnhlp.c:445 msgid "Message body" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:423 +#: ../../../../build/work/app/bin/bllnhlp.c:446 msgid "Possible turnouts" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:424 +#: ../../../../build/work/app/bin/bllnhlp.c:447 msgid "Skip this turnout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:426 +#: ../../../../build/work/app/bin/bllnhlp.c:449 msgid "Manufacturer of Object" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:427 +#: ../../../../build/work/app/bin/bllnhlp.c:450 msgid "Description of Object" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:428 +#: ../../../../build/work/app/bin/bllnhlp.c:451 msgid "Part Nuber of Object" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:430 +#: ../../../../build/work/app/bin/bllnhlp.c:453 msgid "Rescale by Scale Conversion or by Ratio" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:431 +#: ../../../../build/work/app/bin/bllnhlp.c:454 msgid "Original Scale of the selected objects" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:432 +#: ../../../../build/work/app/bin/bllnhlp.c:455 msgid "Original Gauge of the selected objects" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:433 +#: ../../../../build/work/app/bin/bllnhlp.c:456 msgid "New Scale of the selected objects" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:434 +#: ../../../../build/work/app/bin/bllnhlp.c:457 msgid "New Gauge of the selected objects" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:435 +#: ../../../../build/work/app/bin/bllnhlp.c:458 msgid "Change track dimensions to new scale" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:436 +#: ../../../../build/work/app/bin/bllnhlp.c:459 msgid "Change size by this amount" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:438 +#: ../../../../build/work/app/bin/bllnhlp.c:461 msgid "Snap Grid Line and Division" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:439 +#: ../../../../build/work/app/bin/bllnhlp.c:462 msgid "X and Y position markers" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:440 +#: ../../../../build/work/app/bin/bllnhlp.c:463 msgid "Border rulers, room boundaries and table edges" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:441 +#: ../../../../build/work/app/bin/bllnhlp.c:464 msgid "Primary Axis of grid rotation" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:442 +#: ../../../../build/work/app/bin/bllnhlp.c:465 msgid "Secondary Axis of grid rotation" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:443 +#: ../../../../build/work/app/bin/bllnhlp.c:466 msgid "Unselected tracks" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:444 +#: ../../../../build/work/app/bin/bllnhlp.c:467 msgid "Selected tracks" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:445 +#: ../../../../build/work/app/bin/bllnhlp.c:468 msgid "Color of tracks on the Profile path" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:446 +#: ../../../../build/work/app/bin/bllnhlp.c:469 msgid "Color of Exceptional tracks" msgstr "Cor dos trechos excepcionais" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:447 +#: ../../../../build/work/app/bin/bllnhlp.c:470 msgid "Color of track ties" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:448 +#: ../../../../build/work/app/bin/bllnhlp.c:471 msgid "Updates the colors" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:449 +#: ../../../../build/work/app/bin/bllnhlp.c:472 msgid "Angle in degrees" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:450 +#: ../../../../build/work/app/bin/bllnhlp.c:473 msgid "Rotate object(s) by specified amount" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:451 +#: ../../../../build/work/app/bin/bllnhlp.c:474 msgid "Choose commands to be sticky" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:452 +#: ../../../../build/work/app/bin/bllnhlp.c:475 msgid "Make the commands sticky" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:453 +#: ../../../../build/work/app/bin/bllnhlp.c:476 msgid "List of available structure" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:454 +#: ../../../../build/work/app/bin/bllnhlp.c:477 msgid "Diagram of the selected structure" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:455 +#: ../../../../build/work/app/bin/bllnhlp.c:478 msgid "Hide Selection window when placing Structure" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:456 +#: ../../../../build/work/app/bin/bllnhlp.c:479 msgid "Drawing scale and size" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:457 +#: ../../../../build/work/app/bin/bllnhlp.c:480 msgid "Complete structure placement" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:458 +#: ../../../../build/work/app/bin/bllnhlp.c:481 msgid "Choose a Pier number" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:460 +#: ../../../../build/work/app/bin/bllnhlp.c:482 +#, fuzzy +msgid "Name of the Motor" +msgstr "Alterar motor de AMV" + +#: ../../../../build/work/app/bin/bllnhlp.c:483 +msgid "Value when switch is normal" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:484 +msgid "Value when the switch is reversed" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:485 +msgid "Value for a positive comfirmation of switch position" +msgstr "" + +#: ../../../../build/work/app/bin/bllnhlp.c:487 msgid "Useful information about the program" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:461 +#: ../../../../build/work/app/bin/bllnhlp.c:488 msgid "Show Tip of the Day every time the program starts" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:462 +#: ../../../../build/work/app/bin/bllnhlp.c:489 msgid "Show the next Tip of the Day" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:463 +#: ../../../../build/work/app/bin/bllnhlp.c:490 msgid "Show the previous Tip of the Day" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:465 +#: ../../../../build/work/app/bin/bllnhlp.c:492 msgid "Controls which Command Buttons are displayed" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:466 +#: ../../../../build/work/app/bin/bllnhlp.c:493 msgid "List of Cars" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:467 +#: ../../../../build/work/app/bin/bllnhlp.c:494 msgid "List of active trains" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:469 +#: ../../../../build/work/app/bin/bllnhlp.c:496 msgid "Train odometer" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:470 +#: ../../../../build/work/app/bin/bllnhlp.c:497 msgid "Reset odometer to 0" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:471 +#: ../../../../build/work/app/bin/bllnhlp.c:498 msgid "Find train on layout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:472 +#: ../../../../build/work/app/bin/bllnhlp.c:499 msgid "Follow train around layout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:473 +#: ../../../../build/work/app/bin/bllnhlp.c:500 msgid "Flip direction at End Of Track" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:474 +#: ../../../../build/work/app/bin/bllnhlp.c:501 msgid "Change direction of train" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:475 +#: ../../../../build/work/app/bin/bllnhlp.c:502 msgid "Stop the train" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:476 +#: ../../../../build/work/app/bin/bllnhlp.c:503 msgid "List of available turnouts for the current scale" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:477 -msgid "Diagram of the currently selected turnout. Click on a End-Point to select the Active End-Point" +#: ../../../../build/work/app/bin/bllnhlp.c:504 +msgid "" +"Diagram of the currently selected turnout. Click on a End-Point to select " +"the Active End-Point" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:478 -msgid "A menu list of various type of turnouts and sectional tracks you can define" +#: ../../../../build/work/app/bin/bllnhlp.c:505 +msgid "" +"A menu list of various type of turnouts and sectional tracks you can define" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:479 +#: ../../../../build/work/app/bin/bllnhlp.c:506 msgid "Hide Selection window when placing Turnout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:480 +#: ../../../../build/work/app/bin/bllnhlp.c:507 msgid "The selected Active End-Point" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:481 +#: ../../../../build/work/app/bin/bllnhlp.c:508 msgid "Current selected turnout, (displayed in the diagram window)" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:482 +#: ../../../../build/work/app/bin/bllnhlp.c:509 msgid "One the End-Points that can be selected" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:484 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:485 +#: ../../../../build/work/app/bin/bllnhlp.c:511 +#: ../../../../build/work/app/bin/bllnhlp.c:512 msgid "Angle of the specified track to the center line of the turnout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:486 +#: ../../../../build/work/app/bin/bllnhlp.c:513 msgid "Specifies if angles are entered as Frog Numbers or in degrees" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:487 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:488 +#: ../../../../build/work/app/bin/bllnhlp.c:514 +#: ../../../../build/work/app/bin/bllnhlp.c:515 msgid "Desciption" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:489 +#: ../../../../build/work/app/bin/bllnhlp.c:516 msgid "Turnout description (Manuf., Size, Part Number, etc)" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:490 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:491 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:492 +#: ../../../../build/work/app/bin/bllnhlp.c:517 +#: ../../../../build/work/app/bin/bllnhlp.c:518 +#: ../../../../build/work/app/bin/bllnhlp.c:519 msgid "Length from the base to the end of the specified track" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:494 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:495 +#: ../../../../build/work/app/bin/bllnhlp.c:521 +#: ../../../../build/work/app/bin/bllnhlp.c:522 msgid "Offset of the track End-Point from the center line of the turnout" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:498 -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:499 +#: ../../../../build/work/app/bin/bllnhlp.c:525 +#: ../../../../build/work/app/bin/bllnhlp.c:526 msgid "Prints a full size diagram of the turnout for checking" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:500 +#: ../../../../build/work/app/bin/bllnhlp.c:527 msgid "Color of Roadbed lines" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:501 +#: ../../../../build/work/app/bin/bllnhlp.c:528 msgid "Width of Roadbed lines" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:502 +#: ../../../../build/work/app/bin/bllnhlp.c:529 msgid "Width of Roadbed" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:504 +#: ../../../../build/work/app/bin/bllnhlp.c:531 msgid "Closes the window and returns to the Turnout Selection window" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:505 +#: ../../../../build/work/app/bin/bllnhlp.c:532 msgid "Specifies the diameter of the turntable" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:506 +#: ../../../../build/work/app/bin/bllnhlp.c:533 msgid "Old Turnout title" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:507 +#: ../../../../build/work/app/bin/bllnhlp.c:534 msgid "List of available titles" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:508 +#: ../../../../build/work/app/bin/bllnhlp.c:535 msgid "Leave the Turnouts' title unchanged" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:509 +#: ../../../../build/work/app/bin/bllnhlp.c:536 msgid "Invoke the Parameter Files dialog" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:510 +#: ../../../../build/work/app/bin/bllnhlp.c:537 msgid "List of available turnouts" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:511 +#: ../../../../build/work/app/bin/bllnhlp.c:538 msgid "Update the Turnouts' title" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:515 +#: ../../../../build/work/app/bin/bllnhlp.c:542 msgid "Sample" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:517 +#: ../../../../build/work/app/bin/bllnhlp.c:544 msgid "Slant" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:518 +#: ../../../../build/work/app/bin/bllnhlp.c:545 msgid "Font selection dialog" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:519 +#: ../../../../build/work/app/bin/bllnhlp.c:546 msgid "Weight" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:520 +#: ../../../../build/work/app/bin/bllnhlp.c:547 msgid "Printer Abort Window" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:521 +#: ../../../../build/work/app/bin/bllnhlp.c:548 msgid "Print to filename" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:522 +#: ../../../../build/work/app/bin/bllnhlp.c:549 msgid "Specify Postscript font alias mapping" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:523 -msgid "Displays the Print Setup window to change printers, orientation, paper size, etc." +#: ../../../../build/work/app/bin/bllnhlp.c:550 +msgid "" +"Displays the Print Setup window to change printers, orientation, paper size, " +"etc." msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:524 +#: ../../../../build/work/app/bin/bllnhlp.c:551 msgid "Closes this dialog" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:525 +#: ../../../../build/work/app/bin/bllnhlp.c:552 msgid "Page orientation" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:526 +#: ../../../../build/work/app/bin/bllnhlp.c:553 msgid "Unprintable margins" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:527 +#: ../../../../build/work/app/bin/bllnhlp.c:554 msgid "Updates and closes this dialog" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:528 +#: ../../../../build/work/app/bin/bllnhlp.c:555 msgid "Choose paper size" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:529 +#: ../../../../build/work/app/bin/bllnhlp.c:556 msgid "Choose printer" msgstr "" -#: ../../../../xtrkcad-build/app/bin/bllnhlp.c:530 +#: ../../../../build/work/app/bin/bllnhlp.c:557 msgid "Print test page" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:7 +#: ../../../../build/work/app/i18n/custmsg.h:7 msgid "Introduction" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:8 +#: ../../../../build/work/app/i18n/custmsg.h:8 msgid "Mouse Actions" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:9 +#: ../../../../build/work/app/i18n/custmsg.h:9 msgid "Dialogs" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:10 +#: ../../../../build/work/app/i18n/custmsg.h:10 msgid "Moving about" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:11 +#: ../../../../build/work/app/i18n/custmsg.h:11 msgid "Describe and Select" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:14 +#: ../../../../build/work/app/i18n/custmsg.h:12 +#, fuzzy +msgid "Describe" +msgstr "Descrição" + +#: ../../../../build/work/app/i18n/custmsg.h:14 msgid "Simple tracks" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:15 +#: ../../../../build/work/app/i18n/custmsg.h:15 msgid "Straight tracks" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:16 +#: ../../../../build/work/app/i18n/custmsg.h:16 msgid "Curved tracks" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:17 +#: ../../../../build/work/app/i18n/custmsg.h:17 msgid "Circles" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:18 +#: ../../../../build/work/app/i18n/custmsg.h:18 msgid "Turntables" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:19 +#: ../../../../build/work/app/i18n/custmsg.h:19 msgid "Modifying tracks" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:20 +#: ../../../../build/work/app/i18n/custmsg.h:20 msgid "Modifying end points " msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:21 +#: ../../../../build/work/app/i18n/custmsg.h:21 msgid "Extending" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:22 +#: ../../../../build/work/app/i18n/custmsg.h:22 msgid "Medium and Thick Tracks" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:23 +#: ../../../../build/work/app/i18n/custmsg.h:23 msgid "Joining Tracks" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:24 +#: ../../../../build/work/app/i18n/custmsg.h:24 msgid "Straight to straight" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:25 +#: ../../../../build/work/app/i18n/custmsg.h:25 msgid "Curve to straight" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:26 +#: ../../../../build/work/app/i18n/custmsg.h:26 msgid "Circle to circle" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:27 +#: ../../../../build/work/app/i18n/custmsg.h:27 msgid "Joining to turntables" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:28 +#: ../../../../build/work/app/i18n/custmsg.h:28 msgid "Easements" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:29 +#: ../../../../build/work/app/i18n/custmsg.h:29 msgid "Abutting tracks" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:30 +#: ../../../../build/work/app/i18n/custmsg.h:30 msgid "Move to Join" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:32 +#: ../../../../build/work/app/i18n/custmsg.h:32 msgid "Select and Placement" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:33 +#: ../../../../build/work/app/i18n/custmsg.h:33 msgid "Building a yard throat." msgstr "Construindo ramos de um pátio" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:34 +#: ../../../../build/work/app/i18n/custmsg.h:34 msgid "Designing turnouts" msgstr "Projetando AMVs" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:35 +#: ../../../../build/work/app/i18n/custmsg.h:35 msgid "Group and Ungroup" msgstr "Agrupando e desagrupando" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:36 +#: ../../../../build/work/app/i18n/custmsg.h:36 msgid "Triming Turnout Ends" msgstr "Cortando trechos de AMV" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:37 +#: ../../../../build/work/app/i18n/custmsg.h:37 msgid "Handlaid Turnouts" msgstr "AMVs personalizados" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:38 +#: ../../../../build/work/app/i18n/custmsg.h:38 msgid "Elevations and Profile" msgstr "Elevações e perfils" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:39 +#: ../../../../build/work/app/i18n/custmsg.h:39 msgid "Elevations" msgstr "Elevações" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:41 +#: ../../../../build/work/app/i18n/custmsg.h:41 msgid "Misc track commands" msgstr "Miscelânea de comandos de trilhos" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:42 +#: ../../../../build/work/app/i18n/custmsg.h:42 msgid "Delete and Undo" msgstr "Apagando e desfazendo" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:43 +#: ../../../../build/work/app/i18n/custmsg.h:43 msgid "Splitting and Tunnels" msgstr "Seccionando trechos e criando túneis" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:45 +#: ../../../../build/work/app/i18n/custmsg.h:45 msgid "Helix tracks" msgstr "Trechos em hélice" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:46 +#: ../../../../build/work/app/i18n/custmsg.h:46 msgid "Exception Tracks" msgstr "Trechos excepcionais" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:48 +#: ../../../../build/work/app/i18n/custmsg.h:48 msgid "Connect and Tighten - a siding" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:49 +#: ../../../../build/work/app/i18n/custmsg.h:49 msgid "Connect and Tighten - figure-8" msgstr "Conectando e firmando - figura-8" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:50 +#: ../../../../build/work/app/i18n/custmsg.h:50 msgid "Other commands" msgstr "Outros comandos" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:52 +#: ../../../../build/work/app/i18n/custmsg.h:52 msgid "Table Edges" msgstr "Limites do tablado" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:54 +#: ../../../../build/work/app/i18n/custmsg.h:54 msgid "Dimension Lines" msgstr "Linhas dimensionais" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:55 +#: ../../../../build/work/app/i18n/custmsg.h:55 msgid "Lines" msgstr "Linhas" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:56 +#: ../../../../build/work/app/i18n/custmsg.h:56 msgid "Poly-Shapes" msgstr "Formas poligonais" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:57 +#: ../../../../build/work/app/i18n/custmsg.h:57 msgid "Modifying Poly-Shapes" msgstr "Modificando forma poligonais" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:60 +#: ../../../../build/work/app/i18n/custmsg.h:60 msgid "Control Panels (New)" msgstr "Painéis de controle (Novo)" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:62 -msgid "The unconnected End-Points of a straight or curved track can be changed with the 'Modify Track' command.\n" +#: ../../../../build/work/app/i18n/custmsg.h:62 +msgid "" +"The unconnected End-Points of a straight or curved track can be changed with " +"the 'Modify Track' command.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:63 -msgid "The End-Point of a straight track is selected and then Left-Dragged to change its length.\n" +#: ../../../../build/work/app/i18n/custmsg.h:63 +msgid "" +"The End-Point of a straight track is selected and then Left-Dragged to " +"change its length.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:64 -msgid "Watch what happens if you try to drag the selected End-Point beyond the far End-Point.\n" +#: ../../../../build/work/app/i18n/custmsg.h:64 +msgid "" +"Watch what happens if you try to drag the selected End-Point beyond the far " +"End-Point.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:65 -msgid "The length of the straight track is determined by the distance from the far End-Point and the cursor.\n" +#: ../../../../build/work/app/i18n/custmsg.h:65 +msgid "" +"The length of the straight track is determined by the distance from the far " +"End-Point and the cursor.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:66 -msgid "A curved track is selected and it's new End-Point is determined by the angle to the cursor.\n" +#: ../../../../build/work/app/i18n/custmsg.h:66 +msgid "" +"A curved track is selected and it's new End-Point is determined by the angle " +"to the cursor.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:67 +#: ../../../../build/work/app/i18n/custmsg.h:67 msgid "It's possible to almost create a complete circle.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:68 -msgid "If you drag the mouse beyond the start of the curve the track becomes very short.\n" +#: ../../../../build/work/app/i18n/custmsg.h:68 +msgid "" +"If you drag the mouse beyond the start of the curve the track becomes very " +"short.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:69 +#: ../../../../build/work/app/i18n/custmsg.h:69 msgid "Here you are warned that the track will be too short.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:70 -msgid "If you move the cursor away from the curve, you will create a straight track tangent to the curve.\n" +#: ../../../../build/work/app/i18n/custmsg.h:70 +msgid "" +"If you move the cursor away from the curve, you will create a straight track " +"tangent to the curve.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:71 -msgid "If you adjust the End-Point of a turnout or sectional track the track is extended by a straight track segment.\n" +#: ../../../../build/work/app/i18n/custmsg.h:71 +msgid "" +"If you adjust the End-Point of a turnout or sectional track the track is " +"extended by a straight track segment.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:72 -msgid "You can change the radius of a Straight or Curved track that is connected at one End-Point by holding down the Shift key while dragging on it.\n" +#: ../../../../build/work/app/i18n/custmsg.h:72 +msgid "" +"You can change the radius of a Straight or Curved track that is connected at " +"one End-Point by holding down the Shift key while dragging on it.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:73 -msgid "This lets you change a Straight track into a Curved track (and vice versa) as well as changing the radius of a Curved track.\n" +#: ../../../../build/work/app/i18n/custmsg.h:73 +msgid "" +"This lets you change a Straight track into a Curved track (and vice versa) " +"as well as changing the radius of a Curved track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:74 +#: ../../../../build/work/app/i18n/custmsg.h:74 msgid "You can draw a variety of different types of benchwork:\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:75 +#: ../../../../build/work/app/i18n/custmsg.h:75 msgid "- rectangular (1x2, 2x4 etc)\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:76 +#: ../../../../build/work/app/i18n/custmsg.h:76 msgid "- L girders\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:77 +#: ../../../../build/work/app/i18n/custmsg.h:77 msgid "- T girders\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:78 +#: ../../../../build/work/app/i18n/custmsg.h:78 msgid "You can also draw them in different orientations.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:79 +#: ../../../../build/work/app/i18n/custmsg.h:79 msgid "We will draw two 3x6 inch L-girders.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:80 -msgid "The flange of the top L-Girders is on the outside edge of the girders. We want to change the girder so both flanges are on the inside.\n" +#: ../../../../build/work/app/i18n/custmsg.h:80 +msgid "" +"The flange of the top L-Girders is on the outside edge of the girders. We " +"want to change the girder so both flanges are on the inside.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:81 +#: ../../../../build/work/app/i18n/custmsg.h:81 msgid "We will use the command for this.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:82 +#: ../../../../build/work/app/i18n/custmsg.h:82 msgid "Change the Orientation to Right.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:83 +#: ../../../../build/work/app/i18n/custmsg.h:83 msgid "Now both flanges are on the inside of the two girders.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:84 -msgid "Pushing the button will cancel any other command in progress.\n" +#: ../../../../build/work/app/i18n/custmsg.h:84 +msgid "" +"Pushing the button will cancel any other command in progress.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:85 -msgid "Here we will begin to create a Curved track which is a two step process.\n" +#: ../../../../build/work/app/i18n/custmsg.h:85 +msgid "" +"Here we will begin to create a Curved track which is a two step process.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:86 -msgid "When we clicked on the button, the current command was cancelled.\n" +#: ../../../../build/work/app/i18n/custmsg.h:86 +msgid "" +"When we clicked on the button, the current command was " +"cancelled.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:87 -msgid "When in mode, selecting any object will print a description in the Status Bar and display a Dialog showing properties of the clicked-on object.\n" +#: ../../../../build/work/app/i18n/custmsg.h:87 +msgid "" +"When in mode, selecting any object will print a description in " +"the Status Bar and display a Dialog showing properties of the clicked-on " +"object.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:88 -msgid "Certain parameters of the object can be changed. In this case we'll change the Length\n" +#: ../../../../build/work/app/i18n/custmsg.h:88 +msgid "" +"Certain parameters of the object can be changed. In this case we'll change " +"the Length\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:89 +#: ../../../../build/work/app/i18n/custmsg.h:89 msgid "Let's look at the Turnout...\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:90 +#: ../../../../build/work/app/i18n/custmsg.h:90 msgid "and change the turnout Title.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:91 +#: ../../../../build/work/app/i18n/custmsg.h:91 msgid "You can change the contents of Text...\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:92 +#: ../../../../build/work/app/i18n/custmsg.h:92 msgid "and its size.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:93 -msgid "If you select a Note, the Description dialog appears which displays the contents of the note.\n" +#: ../../../../build/work/app/i18n/custmsg.h:93 +msgid "" +"If you select a Note, the Description dialog appears which displays the " +"contents of the note.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:94 -msgid "Like the track command, there are several ways to create a Circle track.\n" +#: ../../../../build/work/app/i18n/custmsg.h:94 +msgid "" +"Like the track command, there are several ways to create a Circle " +"track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:95 -msgid "The first is to specify a fixed radius and simply drag the Circle into position.\n" +#: ../../../../build/work/app/i18n/custmsg.h:95 +msgid "" +"The first is to specify a fixed radius and simply drag the Circle into " +"position.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:96 +#: ../../../../build/work/app/i18n/custmsg.h:96 msgid "We will change the Radius before proceeding.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:97 +#: ../../../../build/work/app/i18n/custmsg.h:97 msgid "The next method is to drag from the edge of the Circle to the center.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:98 -msgid "The last is similar, but you drag from the center of the Circle to the edge.\n" +#: ../../../../build/work/app/i18n/custmsg.h:98 +msgid "" +"The last is similar, but you drag from the center of the Circle to the " +"edge.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:99 -msgid "We have built a siding using Sectional track and have 2 End-Points that don't line up and are not connected automatically when placing the sectional track.\n" +#: ../../../../build/work/app/i18n/custmsg.h:99 +msgid "" +"We have built a siding using Sectional track and have 2 End-Points that " +"don't line up and are not connected automatically when placing the sectional " +"track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:100 -msgid "We use the command to adjust neighboring tracks so the gap is closed.\n" +#: ../../../../build/work/app/i18n/custmsg.h:100 +msgid "" +"We use the command to adjust neighboring tracks so the gap is " +"closed.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:101 -msgid "Note: the adjustments are only done on tracks which have only 1 or 2 connections. In this example the Turnouts would not be affected.\n" +#: ../../../../build/work/app/i18n/custmsg.h:101 +msgid "" +"Note: the adjustments are only done on tracks which have only 1 or 2 " +"connections. In this example the Turnouts would not be affected.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:102 +#: ../../../../build/work/app/i18n/custmsg.h:102 msgid "And now the gap is closed.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:103 +#: ../../../../build/work/app/i18n/custmsg.h:103 msgid "Other tracks have been shifted slightly to close the gap.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:104 +#: ../../../../build/work/app/i18n/custmsg.h:104 msgid "You can see these slight mis-alignments.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:105 +#: ../../../../build/work/app/i18n/custmsg.h:105 msgid "But they will have no effect when the layout is actually built.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:106 -msgid "After working with Sectional track you might get to point where these mis-alignments have accumulated and you wish to remove them.\n" +#: ../../../../build/work/app/i18n/custmsg.h:106 +msgid "" +"After working with Sectional track you might get to point where these mis-" +"alignments have accumulated and you wish to remove them.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:107 -msgid "You can remove these slight mis-alignments by tightening the tracks starting from a unconnected End-Point. Use Shift-Left-Click with the command.\n" +#: ../../../../build/work/app/i18n/custmsg.h:107 +msgid "" +"You can remove these slight mis-alignments by tightening the tracks starting " +"from a unconnected End-Point. Use Shift-Left-Click with the " +"command.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:108 +#: ../../../../build/work/app/i18n/custmsg.h:108 msgid "First use the command to disconnect the tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:109 -msgid "Then with the command, Shift-Left-Click on the 2 End-Points.\n" +#: ../../../../build/work/app/i18n/custmsg.h:109 +msgid "" +"Then with the command, Shift-Left-Click on the 2 End-Points.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:110 +#: ../../../../build/work/app/i18n/custmsg.h:110 msgid "In example shows a simple figure-8 layout using Sectional track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:111 -msgid "You will notice that the tracks do not line up exactly in one location.\n" +#: ../../../../build/work/app/i18n/custmsg.h:111 +msgid "" +"You will notice that the tracks do not line up exactly in one location.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:112 -msgid "We can use the command to move the connecting tracks slightly and connect the 2 End-Points.\n" +#: ../../../../build/work/app/i18n/custmsg.h:112 +msgid "" +"We can use the command to move the connecting tracks slightly and " +"connect the 2 End-Points.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:113 +#: ../../../../build/work/app/i18n/custmsg.h:113 msgid "The two End-Points are now aligned and connected.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:114 +#: ../../../../build/work/app/i18n/custmsg.h:114 msgid "The connection was made by adding small gaps in other tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:115 +#: ../../../../build/work/app/i18n/custmsg.h:115 msgid "There are several ways to create a Curved track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:116 -msgid "You can choose which to use by clicking on the small button to the left of command button if the current Curve command is not the one you want.\n" +#: ../../../../build/work/app/i18n/custmsg.h:116 +msgid "" +"You can choose which to use by clicking on the small button to the left of " +" command button if the current Curve command is not the one you " +"want.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:117 -msgid "The first is by clicking on the first End-Point and dragging in the direction of the Curve.\n" +#: ../../../../build/work/app/i18n/custmsg.h:117 +msgid "" +"The first is by clicking on the first End-Point and dragging in the " +"direction of the Curve.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:118 -msgid "You will see a straight track with a double ended Red arrow at the end.\n" +#: ../../../../build/work/app/i18n/custmsg.h:118 +msgid "" +"You will see a straight track with a double ended Red arrow at the end.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:119 +#: ../../../../build/work/app/i18n/custmsg.h:119 msgid "Click and drag on one of the Red arrows to complete the Curve.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:120 -msgid "The next method is to click at one End-Point and drag to the center of the Curve.\n" +#: ../../../../build/work/app/i18n/custmsg.h:120 +msgid "" +"The next method is to click at one End-Point and drag to the center of the " +"Curve.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:121 -msgid "Now you will see the double ended Red arrow connected to the center of the Curve marked by a small circle.\n" +#: ../../../../build/work/app/i18n/custmsg.h:121 +msgid "" +"Now you will see the double ended Red arrow connected to the center of the " +"Curve marked by a small circle.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:122 +#: ../../../../build/work/app/i18n/custmsg.h:122 msgid "As before, drag on one of the Red arrows to complete the Curve.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:123 -msgid "The next method is similar to the last except that you drag first from the center of the Curve to one End-Point.\n" +#: ../../../../build/work/app/i18n/custmsg.h:123 +msgid "" +"The next method is similar to the last except that you drag first from the " +"center of the Curve to one End-Point.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:124 +#: ../../../../build/work/app/i18n/custmsg.h:124 msgid "Once again, drag on a Red arrow to complete the Curve.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:125 -msgid "The last method begins by drawing a line between the two End-Points of the Curve. This forms the Chord of the Curve.\n" +#: ../../../../build/work/app/i18n/custmsg.h:125 +msgid "" +"The last method begins by drawing a line between the two End-Points of the " +"Curve. This forms the Chord of the Curve.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:126 +#: ../../../../build/work/app/i18n/custmsg.h:126 msgid "Now drag on a Red arrow to complete the Curve.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:127 +#: ../../../../build/work/app/i18n/custmsg.h:127 msgid "This demo will construct a control panel for part of a bigger layout.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:128 +#: ../../../../build/work/app/i18n/custmsg.h:128 msgid "For our control panel we will use Å’\" lines. \n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:129 +#: ../../../../build/work/app/i18n/custmsg.h:129 msgid "Also, we will use a 1/8\" grid to lay out our controls.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:130 -msgid "First, we will set up the Snap Grid for 1\" grid lines and 8 divisions.\n" +#: ../../../../build/work/app/i18n/custmsg.h:130 +msgid "" +"First, we will set up the Snap Grid for 1\" grid lines and 8 divisions.\n" msgstr "Primeiramente, ajustaremos a grade para linhas de 1″ e 8 divisões.\n" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:131 +#: ../../../../build/work/app/i18n/custmsg.h:131 msgid "Now, clear the layout and turn on the Snap Grid.\n" msgstr "Agora, limparemos o layout e ligaremos a grade.\n" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:132 +#: ../../../../build/work/app/i18n/custmsg.h:132 msgid "First step: draw the lines representing the tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:133 +#: ../../../../build/work/app/i18n/custmsg.h:133 msgid "We specify the line width in pixels.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:134 -msgid "To create a Å’\" line, divide the dots-per-inch (DPI) of your display by 4 and then by the drawing scale (which is 2 right now).\n" +#: ../../../../build/work/app/i18n/custmsg.h:134 +msgid "" +"To create a Å’\" line, divide the dots-per-inch (DPI) of your display by 4 " +"and then by the drawing scale (which is 2 right now).\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:135 -msgid "For MS-Windows the DPI is usually 98, so choose: 98/4/2 = 12 (approximately).\n" +#: ../../../../build/work/app/i18n/custmsg.h:135 +msgid "" +"For MS-Windows the DPI is usually 98, so choose: 98/4/2 = 12 " +"(approximately).\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:136 +#: ../../../../build/work/app/i18n/custmsg.h:136 msgid "For Linux, the DPI is usually 72, so choose: 72/4/2 = 9.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:137 -msgid "Notice how the Snap Grid keeps the main line and siding track parallel and the connecting tracks and spur at a 45° angle.\n" -msgstr "Note como a grade mantém a linha principal e lateral paralelas e as linhas de conexão e incita a um ângulo de 45°.\n" +#: ../../../../build/work/app/i18n/custmsg.h:137 +msgid "" +"Notice how the Snap Grid keeps the main line and siding track parallel and " +"the connecting tracks and spur at a 45° angle.\n" +msgstr "" +"Note como a grade mantém a linha principal e lateral paralelas e as linhas " +"de conexão e incita a um ângulo de 45°.\n" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:138 +#: ../../../../build/work/app/i18n/custmsg.h:138 msgid "Second step: add LEDs for the turnout position indicators.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:139 +#: ../../../../build/work/app/i18n/custmsg.h:139 msgid "We will use T1 red and green LEDs.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:140 +#: ../../../../build/work/app/i18n/custmsg.h:140 msgid "We will zoom in to show positioning.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:141 -msgid "Notice that when we are in the correct position (on the 1/8\" grid), the Marker lines on the bottom and left rulers will high-light the tick marks. When both ticks are high-lighted, press the space bar to finalize the LED.\n" +#: ../../../../build/work/app/i18n/custmsg.h:141 +msgid "" +"Notice that when we are in the correct position (on the 1/8\" grid), the " +"Marker lines on the bottom and left rulers will high-light the tick marks. " +"When both ticks are high-lighted, press the space bar to finalize the LED.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:142 +#: ../../../../build/work/app/i18n/custmsg.h:142 msgid "Now we'll add push buttons to control the turnouts.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:143 +#: ../../../../build/work/app/i18n/custmsg.h:143 msgid "Let's add signals to our siding.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:144 -msgid "The entrance to the siding will be protected by double headed signals.\n" +#: ../../../../build/work/app/i18n/custmsg.h:144 +msgid "" +"The entrance to the siding will be protected by double headed signals.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:145 +#: ../../../../build/work/app/i18n/custmsg.h:145 msgid "First turn off the Snap Grid.\n" msgstr "Primeiramente, desligamos a grade.\n" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:146 +#: ../../../../build/work/app/i18n/custmsg.h:146 msgid "Rotate the signals and move them to the proper locations.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:147 -msgid "We rotate the signals by Shift-Right-Click and select 90° CW on the popup menu. We can not show the popup menu in demo mode, but will simulate the effect.\n" +#: ../../../../build/work/app/i18n/custmsg.h:147 +msgid "" +"We rotate the signals by Shift-Right-Click and select 90° CW on the popup " +"menu. We can not show the popup menu in demo mode, but will simulate the " +"effect.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:148 +#: ../../../../build/work/app/i18n/custmsg.h:148 msgid "The exits from the siding will be protected by single headed signals.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:149 +#: ../../../../build/work/app/i18n/custmsg.h:149 msgid "Now for some touch-ups.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:150 +#: ../../../../build/work/app/i18n/custmsg.h:150 msgid "Notice when the line meet at an angle there is a gap.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:151 +#: ../../../../build/work/app/i18n/custmsg.h:151 msgid "We will fill this gap with the Å’\" dot.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:152 -msgid "Note: Win95/Win98/WinME does not support drawing lines with flat end-caps, but only with round end-caps.\n" +#: ../../../../build/work/app/i18n/custmsg.h:152 +msgid "" +"Note: Win95/Win98/WinME does not support drawing lines with flat end-caps, " +"but only with round end-caps.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:153 +#: ../../../../build/work/app/i18n/custmsg.h:153 msgid "Users on those platforms will not see the gap.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:154 -msgid "Add an arrow head to indicate the tracks that connect to the rest of the layout.\n" +#: ../../../../build/work/app/i18n/custmsg.h:154 +msgid "" +"Add an arrow head to indicate the tracks that connect to the rest of the " +"layout.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:155 +#: ../../../../build/work/app/i18n/custmsg.h:155 msgid "Rotate the arrow head by 180° and move into position.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:156 +#: ../../../../build/work/app/i18n/custmsg.h:156 msgid "And add some labels.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:157 -msgid "We want to print our control panel onto a 8Å“x11 page, but the control panel is a bit too wide.\n" +#: ../../../../build/work/app/i18n/custmsg.h:157 +msgid "" +"We want to print our control panel onto a 8Å“x11 page, but the control panel " +"is a bit too wide.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:158 +#: ../../../../build/work/app/i18n/custmsg.h:158 msgid "Lets tighten it up a bit.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:159 -msgid "First turn the Snap Grid on again so any moves we make will keep objects on the grid.\n" -msgstr "Primeiramente, habilitamos a grade novamente para fazer com que os objetos fiquem mantidos nela.\n" +#: ../../../../build/work/app/i18n/custmsg.h:159 +msgid "" +"First turn the Snap Grid on again so any moves we make will keep objects on " +"the grid.\n" +msgstr "" +"Primeiramente, habilitamos a grade novamente para fazer com que os objetos " +"fiquem mantidos nela.\n" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:160 +#: ../../../../build/work/app/i18n/custmsg.h:160 msgid "Lets move the spur track the left 3/4\"\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:161 +#: ../../../../build/work/app/i18n/custmsg.h:161 msgid "Now move the right side of the siding over.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:162 +#: ../../../../build/work/app/i18n/custmsg.h:162 msgid "Now, adjust the ends of the mainline and siding tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:163 +#: ../../../../build/work/app/i18n/custmsg.h:163 msgid "And move the title over as well.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:164 +#: ../../../../build/work/app/i18n/custmsg.h:164 msgid "Now you can print it.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:165 +#: ../../../../build/work/app/i18n/custmsg.h:165 msgid "The cross-hairs on the LEDs and switch show the centers for drilling.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:166 -msgid "Pressing the button lets you delete selected tracks from the layout.\n" +#: ../../../../build/work/app/i18n/custmsg.h:166 +msgid "" +"Pressing the button lets you delete selected tracks from the " +"layout.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:167 -msgid "First you select the tracks you want to delete, and then press the button.\n" +#: ../../../../build/work/app/i18n/custmsg.h:167 +msgid "" +"First you select the tracks you want to delete, and then press the " +"button.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:168 -msgid "If you delete a track connected to an easement curve, then the easement curve is deleted as well.\n" +#: ../../../../build/work/app/i18n/custmsg.h:168 +msgid "" +"If you delete a track connected to an easement curve, then the easement " +"curve is deleted as well.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:169 +#: ../../../../build/work/app/i18n/custmsg.h:169 msgid "You can use the command to undelete tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:170 -msgid "If you Left-Drag on the layout you can select all tracks within an area.\n" +#: ../../../../build/work/app/i18n/custmsg.h:170 +msgid "" +"If you Left-Drag on the layout you can select all tracks within an area.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:171 -msgid "Note, only tracks within the selected area are deleted. Since the easement curve is connected to a deleted track, it is deleted as well.\n" +#: ../../../../build/work/app/i18n/custmsg.h:171 +msgid "" +"Note, only tracks within the selected area are deleted. Since the easement " +"curve is connected to a deleted track, it is deleted as well.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:172 -msgid "The demo also simulates entering values and selecting options on various dialogs.\n" +#: ../../../../build/work/app/i18n/custmsg.h:172 +msgid "" +"The demo also simulates entering values and selecting options on various " +"dialogs.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:173 -msgid "This is simulated by drawing a rectangle around the control when values are entered or changed.\n" +#: ../../../../build/work/app/i18n/custmsg.h:173 +msgid "" +"This is simulated by drawing a rectangle around the control when values are " +"entered or changed.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:174 -msgid "Here we are going to make some changes to the Display dialog. Notice how this is simulated.\n" +#: ../../../../build/work/app/i18n/custmsg.h:174 +msgid "" +"Here we are going to make some changes to the Display dialog. Notice how " +"this is simulated.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:175 -msgid "This effect is only used in demonstration mode. During normal operation you will not see this.\n" +#: ../../../../build/work/app/i18n/custmsg.h:175 +msgid "" +"This effect is only used in demonstration mode. During normal operation you " +"will not see this.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:176 +#: ../../../../build/work/app/i18n/custmsg.h:176 msgid "Dimension Lines are used to mark the distances between two points.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:177 -msgid "Here we will create a Dimension Line to show the separation between two tracks.\n" +#: ../../../../build/work/app/i18n/custmsg.h:177 +msgid "" +"Here we will create a Dimension Line to show the separation between two " +"tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:178 -msgid "We might also want to measure the distance between two structures. In this case we will use a larger dimension line.\n" +#: ../../../../build/work/app/i18n/custmsg.h:178 +msgid "" +"We might also want to measure the distance between two structures. In this " +"case we will use a larger dimension line.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:179 -msgid "We can use the command to change the position of the Dimension Line and the size of the numbers.\n" +#: ../../../../build/work/app/i18n/custmsg.h:179 +msgid "" +"We can use the command to change the position of the Dimension " +"Line and the size of the numbers.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:180 -msgid "This example will show the effect of using easements while joining tracks.\n" +#: ../../../../build/work/app/i18n/custmsg.h:180 +msgid "" +"This example will show the effect of using easements while joining tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:181 +#: ../../../../build/work/app/i18n/custmsg.h:181 msgid "First, we'll enable easements.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:182 -msgid "We've selected sharp easements. The minimum radius curve we can use will be 9.75\"\n" +#: ../../../../build/work/app/i18n/custmsg.h:182 +msgid "" +"We've selected sharp easements. The minimum radius curve we can use will be " +"9.75\"\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:183 +#: ../../../../build/work/app/i18n/custmsg.h:183 msgid "Notice the label on the Easement button has changed to 'Sharp'.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:184 -msgid "Note the connecting curve does not quite meet the straight tracks. This the 'Offset'.\n" +#: ../../../../build/work/app/i18n/custmsg.h:184 +msgid "" +"Note the connecting curve does not quite meet the straight tracks. This the " +"'Offset'.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:185 +#: ../../../../build/work/app/i18n/custmsg.h:185 msgid "Here the connecting curve is too small.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:186 -msgid "The connecting curve is made of three tracks, the curve and two easement segments on each end.\n" +#: ../../../../build/work/app/i18n/custmsg.h:186 +msgid "" +"The connecting curve is made of three tracks, the curve and two easement " +"segments on each end.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:187 -msgid "We have designed part of the layout with a siding, 2 branches and a spiral loop. We want to set Elevations.\n" +#: ../../../../build/work/app/i18n/custmsg.h:187 +msgid "" +"We have designed part of the layout with a siding, 2 branches and a spiral " +"loop. We want to set Elevations.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:188 +#: ../../../../build/work/app/i18n/custmsg.h:188 msgid "First we will set elevations at the end of the branches.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:189 +#: ../../../../build/work/app/i18n/custmsg.h:189 msgid "We'll select the end of the top branch and set the Elevation to 4\"\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:190 +#: ../../../../build/work/app/i18n/custmsg.h:190 msgid "First, click on the End-Point.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:191 +#: ../../../../build/work/app/i18n/custmsg.h:191 msgid "Next, pick Defined on the Elevation dialog Radio box.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:192 +#: ../../../../build/work/app/i18n/custmsg.h:192 msgid "And set the Elevation to 4.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:193 +#: ../../../../build/work/app/i18n/custmsg.h:193 msgid "Now, select the other branch and set it's elevation to 2\"\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:194 +#: ../../../../build/work/app/i18n/custmsg.h:194 msgid "We can move the Elevations by using Right-Drag\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:195 +#: ../../../../build/work/app/i18n/custmsg.h:195 msgid "Now, we set the Elevation at one end of the Siding.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:196 +#: ../../../../build/work/app/i18n/custmsg.h:196 msgid "We want to find the elevations where the 2 tracks cross.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:197 +#: ../../../../build/work/app/i18n/custmsg.h:197 msgid "We picked an End-Point on the upper track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:198 -msgid "XTrackCAD has computed the Elevation (2.34\") at this point based on the Elevation at the siding and a combination of the of the first Elevations.\n" +#: ../../../../build/work/app/i18n/custmsg.h:198 +msgid "" +"XTrackCAD has computed the Elevation (2.34\") at this point based on the " +"Elevation at the siding and a combination of the of the first Elevations.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:199 -msgid "We create a Computed Elevation here that will be automatically adjusted whenever the other Elevations are changed.\n" +#: ../../../../build/work/app/i18n/custmsg.h:199 +msgid "" +"We create a Computed Elevation here that will be automatically adjusted " +"whenever the other Elevations are changed.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:200 -msgid "The Compute Elevation is based on Elevations at end of both of the branches. We may want to base the Elevation on only one branch. For example if one branch was the mainline we don't want the other branch affecting this Computed Elevation.\n" +#: ../../../../build/work/app/i18n/custmsg.h:200 +msgid "" +"The Compute Elevation is based on Elevations at end of both of the " +"branches. We may want to base the Elevation on only one branch. For " +"example if one branch was the mainline we don't want the other branch " +"affecting this Computed Elevation.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:201 +#: ../../../../build/work/app/i18n/custmsg.h:201 msgid "We do this by Ignoring the branch we don't want.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:202 +#: ../../../../build/work/app/i18n/custmsg.h:202 msgid "We'll ignore the lower branch.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:203 -msgid "Notice at the End-Point where the tracks cross, we see the Elevation has changed from 2.34 to 2.64.\n" +#: ../../../../build/work/app/i18n/custmsg.h:203 +msgid "" +"Notice at the End-Point where the tracks cross, we see the Elevation has " +"changed from 2.34 to 2.64.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:204 +#: ../../../../build/work/app/i18n/custmsg.h:204 msgid "Now we want to know the elevation of the lower track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:205 +#: ../../../../build/work/app/i18n/custmsg.h:205 msgid "There is no End-Point on the lower track here.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:206 -msgid "Use Shift-Left-Click to Split the track and create an End-Point we can use for an Elevation,\n" +#: ../../../../build/work/app/i18n/custmsg.h:206 +msgid "" +"Use Shift-Left-Click to Split the track and create an End-Point we can use " +"for an Elevation,\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:207 +#: ../../../../build/work/app/i18n/custmsg.h:207 msgid "and create another Computed Elevation point.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:208 +#: ../../../../build/work/app/i18n/custmsg.h:208 msgid "Now we want to label the Grade on this section of track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:209 -msgid "Again, since there is no End-Point nearby, we split the track to create an End-Point we can use,\n" +#: ../../../../build/work/app/i18n/custmsg.h:209 +msgid "" +"Again, since there is no End-Point nearby, we split the track to create an " +"End-Point we can use,\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:210 +#: ../../../../build/work/app/i18n/custmsg.h:210 msgid "and create a Grade marker.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:211 +#: ../../../../build/work/app/i18n/custmsg.h:211 msgid "Note the marker has an arrow pointing in the upwards direction.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:212 -msgid "The last thing we want to do is to create a Station label that we'll use in the command.\n" +#: ../../../../build/work/app/i18n/custmsg.h:212 +msgid "" +"The last thing we want to do is to create a Station label that we'll use in " +"the command.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:213 +#: ../../../../build/work/app/i18n/custmsg.h:213 msgid "Now, set the Elevation to Station and enter the its name.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:214 -msgid "XTrackCAD can help find tracks that are curved too sharply or are too steep. These tracks are Exception tracks and are drawn in the Exception track color.\n" -msgstr "XTrackCAD pode ajudar encontrar curvas muito fechadas ou trechos demasiadamente inclinados. Esses são os chamados trechos excepcionais e serão desenhados na cor de trechos excepcionais.\n" +#: ../../../../build/work/app/i18n/custmsg.h:214 +msgid "" +"XTrackCAD can help find tracks that are curved too sharply or are too " +"steep. These tracks are Exception tracks and are drawn in the Exception " +"track color.\n" +msgstr "" +"XTrackCAD pode ajudar encontrar curvas muito fechadas ou trechos " +"demasiadamente inclinados. Esses são os chamados trechos excepcionais e " +"serão desenhados na cor de trechos excepcionais.\n" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:215 -msgid "In this example we have a curved track with radius of 9\" and a straight track with a grade of 3.8%.\n" +#: ../../../../build/work/app/i18n/custmsg.h:215 +msgid "" +"In this example we have a curved track with radius of 9\" and a straight " +"track with a grade of 3.8%.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:216 +#: ../../../../build/work/app/i18n/custmsg.h:216 msgid " \n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:217 -msgid "The Layout dialog shows the Minimum Track Radius is 9\" and the Maximum Track Grade is 5%.\n" +#: ../../../../build/work/app/i18n/custmsg.h:217 +msgid "" +"The Layout dialog shows the Minimum Track Radius is 9\" and the Maximum " +"Track Grade is 5%.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:218 -msgid "If we make the curved track sharper it will be drawn in the Exception color.\n" -msgstr "Se instalarmos uma curva muito fechada, ela será desenhada na cor de trecho excepcional.\n" +#: ../../../../build/work/app/i18n/custmsg.h:218 +msgid "" +"If we make the curved track sharper it will be drawn in the Exception " +"color.\n" +msgstr "" +"Se instalarmos uma curva muito fechada, ela será desenhada na cor de trecho " +"excepcional.\n" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:219 -msgid "If we make the straight track steeper it will also be drawn in the Exception color.\n" -msgstr "Se instalarmos um trecho muito inclinado ele será também desenhado na cor de trecho excepcional.\n" +#: ../../../../build/work/app/i18n/custmsg.h:219 +msgid "" +"If we make the straight track steeper it will also be drawn in the Exception " +"color.\n" +msgstr "" +"Se instalarmos um trecho muito inclinado ele será também desenhado na cor de " +"trecho excepcional.\n" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:220 -msgid "You can change the Exception color on the Colors dialog from the Options menu.\n" -msgstr "Você pode alterar a cor dos trechos excepcionais na caixa de diálogo de cores acessível através do menu \"Opções\".\n" +#: ../../../../build/work/app/i18n/custmsg.h:220 +msgid "" +"You can change the Exception color on the Colors dialog from the Options " +"menu.\n" +msgstr "" +"Você pode alterar a cor dos trechos excepcionais na caixa de diálogo de " +"cores acessível através do menu \"Opções\".\n" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:221 -msgid "The unconnected End-Point of any track can be extended with the command using Right-Drag.\n" +#: ../../../../build/work/app/i18n/custmsg.h:221 +msgid "" +"The unconnected End-Point of any track can be extended with the " +"command using Right-Drag.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:222 +#: ../../../../build/work/app/i18n/custmsg.h:222 msgid "Select the End-Point and Right-Drag.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:223 +#: ../../../../build/work/app/i18n/custmsg.h:223 msgid "The extending track can be straight...\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:224 +#: ../../../../build/work/app/i18n/custmsg.h:224 msgid "... or curved.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:225 -msgid "If you extend a Straight or Curved flex track and enable Easements then an Easement curve will be automatically generated when you extend the track.\n" +#: ../../../../build/work/app/i18n/custmsg.h:225 +msgid "" +"If you extend a Straight or Curved flex track and enable Easements then an " +"Easement curve will be automatically generated when you extend the track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:226 -msgid "The command will create a mirror image of the selected objects.\n" +#: ../../../../build/work/app/i18n/custmsg.h:226 +msgid "" +"The command will create a mirror image of the selected objects.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:227 +#: ../../../../build/work/app/i18n/custmsg.h:227 msgid "After selecting the object, drag a line which will form the mirror.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:228 +#: ../../../../build/work/app/i18n/custmsg.h:228 msgid "The mirror line does not have to be vertical or horizontal.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:229 +#: ../../../../build/work/app/i18n/custmsg.h:229 msgid "You can also flip any number of objects.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:230 +#: ../../../../build/work/app/i18n/custmsg.h:230 msgid "Watch what happens to the structure and turnout titles.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:231 -msgid "Note that the turnout title has been changed from the Medium Right to Medium Left. When turnouts are flipped, XTrackCAD will try to find a matching turnout and if found will change the name.\n" +#: ../../../../build/work/app/i18n/custmsg.h:231 +msgid "" +"Note that the turnout title has been changed from the Medium Right to Medium " +"Left. When turnouts are flipped, XTrackCAD will try to find a matching " +"turnout and if found will change the name.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:232 -msgid "Structures do not have Right and Left hand versions. Their title is changed to indicate that they were flipped.\n" +#: ../../../../build/work/app/i18n/custmsg.h:232 +msgid "" +"Structures do not have Right and Left hand versions. Their title is changed " +"to indicate that they were flipped.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:233 +#: ../../../../build/work/app/i18n/custmsg.h:233 msgid "You can use the command to change their title.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:234 -msgid "The and commands (on the Tools menu) are a powerful way to manipulate Turnout and Structure definitions.\n" +#: ../../../../build/work/app/i18n/custmsg.h:234 +msgid "" +"The and commands (on the Tools menu) are a powerful way to " +"manipulate Turnout and Structure definitions.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:235 +#: ../../../../build/work/app/i18n/custmsg.h:235 msgid "We'll start with a simple turnout and add a switch machine.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:236 -msgid "Now that we have drawn a rough outline of a switch machine we will group it with the turnout definition.\n" +#: ../../../../build/work/app/i18n/custmsg.h:236 +msgid "" +"Now that we have drawn a rough outline of a switch machine we will group it " +"with the turnout definition.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:237 +#: ../../../../build/work/app/i18n/custmsg.h:237 msgid "First we Select the objects in the new definition.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:238 +#: ../../../../build/work/app/i18n/custmsg.h:238 msgid "Now do the command.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:239 -msgid "The command dialog shows the Title (Manufacturer, Description and Part Number) of the new definition. This information is taken from the Selected objects you are grouping.\n" +#: ../../../../build/work/app/i18n/custmsg.h:239 +msgid "" +"The command dialog shows the Title (Manufacturer, Description and " +"Part Number) of the new definition. This information is taken from the " +"Selected objects you are grouping.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:240 -msgid "The 'Replace with new group?' toggle will replace the Selected objects with the new definition.\n" +#: ../../../../build/work/app/i18n/custmsg.h:240 +msgid "" +"The 'Replace with new group?' toggle will replace the Selected objects with " +"the new definition.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:241 -msgid "If we don't change the Title then the new definition will replace the existing definition.\n" +#: ../../../../build/work/app/i18n/custmsg.h:241 +msgid "" +"If we don't change the Title then the new definition will replace the " +"existing definition.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:242 +#: ../../../../build/work/app/i18n/custmsg.h:242 msgid "We'll give this definition a new Description.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:243 +#: ../../../../build/work/app/i18n/custmsg.h:243 msgid "We're done with this definition. Press Ok.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:244 +#: ../../../../build/work/app/i18n/custmsg.h:244 msgid "You will see the updated image on the HotBar.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:245 -msgid "The command replaces any Selected turnouts or structures with their parts.\n" +#: ../../../../build/work/app/i18n/custmsg.h:245 +msgid "" +"The command replaces any Selected turnouts or structures with " +"their parts.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:246 -msgid "Structures and non-track segements of turnouts are composed of Lines, Circles and other shapes. In this turnout these are the two lines and the two squares.\n" +#: ../../../../build/work/app/i18n/custmsg.h:246 +msgid "" +"Structures and non-track segements of turnouts are composed of Lines, " +"Circles and other shapes. In this turnout these are the two lines and the " +"two squares.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:247 -msgid "We will Ungroup this turnout and see how the individual parts can be changed.\n" +#: ../../../../build/work/app/i18n/custmsg.h:247 +msgid "" +"We will Ungroup this turnout and see how the individual parts can be " +"changed.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:248 +#: ../../../../build/work/app/i18n/custmsg.h:248 msgid "First Select the turnout and then Ungroup it.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:249 +#: ../../../../build/work/app/i18n/custmsg.h:249 msgid "Notice that the Title now indicates the turnout is Ungrouped.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:250 +#: ../../../../build/work/app/i18n/custmsg.h:250 msgid "Hit Escape to deselect everything.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:251 +#: ../../../../build/work/app/i18n/custmsg.h:251 msgid "Now Select the lines and squares.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:252 -msgid "We could modify these object or add new ones. For now we'll just delete them.\n" +#: ../../../../build/work/app/i18n/custmsg.h:252 +msgid "" +"We could modify these object or add new ones. For now we'll just delete " +"them.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:253 +#: ../../../../build/work/app/i18n/custmsg.h:253 msgid "And move the Label out of the way.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:254 +#: ../../../../build/work/app/i18n/custmsg.h:254 msgid "Notice that the turnout has been broken into three parts.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:255 -msgid "Two ends of the turnout, from the frog to the end of the diverging leg and from the points to the left, are now straight track sections.\n" +#: ../../../../build/work/app/i18n/custmsg.h:255 +msgid "" +"Two ends of the turnout, from the frog to the end of the diverging leg and " +"from the points to the left, are now straight track sections.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:256 -msgid "The a turnout is made of a number of individual straight and curved track segements. This turnout had four segments:\n" +#: ../../../../build/work/app/i18n/custmsg.h:256 +msgid "" +"The a turnout is made of a number of individual straight and curved track " +"segements. This turnout had four segments:\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:257 +#: ../../../../build/work/app/i18n/custmsg.h:257 msgid " 1 a short straight segment to the left of the points\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:258 +#: ../../../../build/work/app/i18n/custmsg.h:258 msgid " 2 a long straight segment to the right of the points\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:259 +#: ../../../../build/work/app/i18n/custmsg.h:259 msgid " 3 a curved segment from the points to the frog\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:260 -msgid " 4 a straight segment from the frog to the end of the diverging leg.\n" +#: ../../../../build/work/app/i18n/custmsg.h:260 +msgid "" +" 4 a straight segment from the frog to the end of the diverging leg.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:261 +#: ../../../../build/work/app/i18n/custmsg.h:261 msgid "The first and last segments have be converted to straight tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:262 -msgid "The second and third segments form the the body of the turnout and can not be ungrouped further.\n" +#: ../../../../build/work/app/i18n/custmsg.h:262 +msgid "" +"The second and third segments form the the body of the turnout and can not " +"be ungrouped further.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:263 -msgid "You can later Group this turnout with the straight segments to recreate the turnout definition. You can also add other track segments to turnout definitions.\n" +#: ../../../../build/work/app/i18n/custmsg.h:263 +msgid "" +"You can later Group this turnout with the straight segments to recreate the " +"turnout definition. You can also add other track segments to turnout " +"definitions.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:264 +#: ../../../../build/work/app/i18n/custmsg.h:264 msgid "Now, create a track and place the new turnout on it.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:265 +#: ../../../../build/work/app/i18n/custmsg.h:265 msgid "Now suppose we want to replace the black squares with green circles.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:266 +#: ../../../../build/work/app/i18n/custmsg.h:266 msgid "First we Select the turnout.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:267 +#: ../../../../build/work/app/i18n/custmsg.h:267 msgid "And now Ungroup it (from the Tools Menu)\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:268 -msgid "Notice that the name has changed to indicate the turnout was Ungrouped.\n" +#: ../../../../build/work/app/i18n/custmsg.h:268 +msgid "" +"Notice that the name has changed to indicate the turnout was Ungrouped.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:269 -msgid "Now, hit escape to deselect everything and then Select the 2 squares and delete them.\n" +#: ../../../../build/work/app/i18n/custmsg.h:269 +msgid "" +"Now, hit escape to deselect everything and then Select the 2 squares and " +"delete them.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:270 +#: ../../../../build/work/app/i18n/custmsg.h:270 msgid "Now draw the green circles...\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:271 +#: ../../../../build/work/app/i18n/custmsg.h:271 msgid "and Group the new definition.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:272 -msgid "Notice that the turnout in the HotBar is angled the same as the turnout on the layout. Make sure your new definition is rotated the way you want it.\n" +#: ../../../../build/work/app/i18n/custmsg.h:272 +msgid "" +"Notice that the turnout in the HotBar is angled the same as the turnout on " +"the layout. Make sure your new definition is rotated the way you want it.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:273 +#: ../../../../build/work/app/i18n/custmsg.h:273 msgid "We can also create turnouts from simple straight and curved tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:274 +#: ../../../../build/work/app/i18n/custmsg.h:274 msgid "We'll create two tracks that have a common End-Point.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:275 +#: ../../../../build/work/app/i18n/custmsg.h:275 msgid "At this point we can modify the tracks if necessary.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:276 +#: ../../../../build/work/app/i18n/custmsg.h:276 msgid "We will use the command to change the tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:277 +#: ../../../../build/work/app/i18n/custmsg.h:277 msgid "We'll make the Length 7.5\".\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:278 -msgid "If we change the Length, each End-Point will be moved to shorten the track. We want to just move the Right End-Point. To control this, change the Pivot to First which means the Left End-Point will be unchanged when we change the length (or angle) of the track.\n" +#: ../../../../build/work/app/i18n/custmsg.h:278 +msgid "" +"If we change the Length, each End-Point will be moved to shorten the track. " +"We want to just move the Right End-Point. To control this, change the Pivot " +"to First which means the Left End-Point will be unchanged when we change the " +"length (or angle) of the track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:279 +#: ../../../../build/work/app/i18n/custmsg.h:279 msgid "Now when change the Length only the Right End-Point will move.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:280 +#: ../../../../build/work/app/i18n/custmsg.h:280 msgid "Now let's look at the curved track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:281 -msgid "Here the Left End-Point (which we don't want to move) is the Second End-Point, so we'll make that the Pivot.\n" +#: ../../../../build/work/app/i18n/custmsg.h:281 +msgid "" +"Here the Left End-Point (which we don't want to move) is the Second End-" +"Point, so we'll make that the Pivot.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:282 +#: ../../../../build/work/app/i18n/custmsg.h:282 msgid "We want the curve to have a radius of 20\" and an angle of 17.5°.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:283 +#: ../../../../build/work/app/i18n/custmsg.h:283 msgid "First change the Radius...\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:284 +#: ../../../../build/work/app/i18n/custmsg.h:284 msgid "and the the Angular Length.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:285 +#: ../../../../build/work/app/i18n/custmsg.h:285 msgid "Now Select both tracks...\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:286 +#: ../../../../build/work/app/i18n/custmsg.h:286 msgid "and Group them.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:287 -msgid "If the two tracks have a common End-Point then they will form a Turnout and can be switched with the command. Otherwise they will just be two track segments grouped together.\n" +#: ../../../../build/work/app/i18n/custmsg.h:287 +msgid "" +"If the two tracks have a common End-Point then they will form a Turnout and " +"can be switched with the command. Otherwise they will just be two " +"track segments grouped together.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:288 -msgid "We have created a left hand turnout and we also want a right hand version.\n" +#: ../../../../build/work/app/i18n/custmsg.h:288 +msgid "" +"We have created a left hand turnout and we also want a right hand version.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:289 +#: ../../../../build/work/app/i18n/custmsg.h:289 msgid "We'll use the command.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:290 -msgid "Drag a horizontal line that will be the mirror for the command.\n" +#: ../../../../build/work/app/i18n/custmsg.h:290 +msgid "" +"Drag a horizontal line that will be the mirror for the command.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:291 +#: ../../../../build/work/app/i18n/custmsg.h:291 msgid "Notice the title has changed to Flipped Left.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:292 +#: ../../../../build/work/app/i18n/custmsg.h:292 msgid "Now Group the turnout.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:293 +#: ../../../../build/work/app/i18n/custmsg.h:293 msgid "We'll change the Title and Part No for the new defintion.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:294 -msgid "To Remove the definitions, use the Custom Management dialog on the Tools menu.\n" +#: ../../../../build/work/app/i18n/custmsg.h:294 +msgid "" +"To Remove the definitions, use the Custom Management dialog on the Tools " +"menu.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:295 +#: ../../../../build/work/app/i18n/custmsg.h:295 msgid "Select the definitions you added and Delete them.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:296 -msgid "Now we will create a helix in the corner of the layout connected to 2 tracks.\n" +#: ../../../../build/work/app/i18n/custmsg.h:296 +msgid "" +"Now we will create a helix in the corner of the layout connected to 2 " +"tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:297 +#: ../../../../build/work/app/i18n/custmsg.h:297 #, c-format -msgid "We will be creating a helix with a Elevation Difference of 12\", Grade of 1.5% and limit the Vertical Separation to at least 2\".\n" +msgid "" +"We will be creating a helix with a Elevation Difference of 12\", Grade of " +"1.5% and limit the Vertical Separation to at least 2\".\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:298 +#: ../../../../build/work/app/i18n/custmsg.h:298 msgid "First set the Elevation Difference to 12\"\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:299 +#: ../../../../build/work/app/i18n/custmsg.h:299 msgid "Next set the Vertical Separation to 2\"\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:300 +#: ../../../../build/work/app/i18n/custmsg.h:300 msgid "Notice how this causes the number of Turns to be set to 6\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:301 +#: ../../../../build/work/app/i18n/custmsg.h:301 msgid "Next set the Grade to 1.5%\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:302 +#: ../../../../build/work/app/i18n/custmsg.h:302 msgid "Notice how this causes the Radius to change.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:303 -msgid "Setting these values changes the Radius to 21.2\" and the number of Turns to 6.\n" +#: ../../../../build/work/app/i18n/custmsg.h:303 +msgid "" +"Setting these values changes the Radius to 21.2\" and the number of Turns to " +"6.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:304 -msgid "Now we specify the Angular Separation between the enterance and exit to the helix.\n" +#: ../../../../build/work/app/i18n/custmsg.h:304 +msgid "" +"Now we specify the Angular Separation between the enterance and exit to the " +"helix.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:305 +#: ../../../../build/work/app/i18n/custmsg.h:305 msgid "Note: this will decrease the Radius slightly.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:306 +#: ../../../../build/work/app/i18n/custmsg.h:306 msgid "Next we can fine tune the helix by decreasing the Radius to 15\".\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:307 +#: ../../../../build/work/app/i18n/custmsg.h:307 msgid "Note the change to the Grade.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:308 -msgid "Lastly change the Vertical Separation to 2.5\". The number of Turns will change to 4 and the grade increase to almost 3%.\n" +#: ../../../../build/work/app/i18n/custmsg.h:308 +msgid "" +"Lastly change the Vertical Separation to 2.5\". The number of Turns will " +"change to 4 and the grade increase to almost 3%.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:309 -msgid "Note: the Vertical Separation will be increased. This value is the Elevation Difference (12.0) divided by the total number of turns. The total number of turns is 4.25: 4 whole Turns plus a quarter turn for the Angular Separation.\n" +#: ../../../../build/work/app/i18n/custmsg.h:309 +msgid "" +"Note: the Vertical Separation will be increased. This value is the " +"Elevation Difference (12.0) divided by the total number of turns. The total " +"number of turns is 4.25: 4 whole Turns plus a quarter turn for the Angular " +"Separation.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:310 -msgid "Now that the helix parameters are set we can place the helix on the layout.\n" +#: ../../../../build/work/app/i18n/custmsg.h:310 +msgid "" +"Now that the helix parameters are set we can place the helix on the layout.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:311 -msgid "Next, join the 2 straight tracks to the helix in the same way we join to a circle.\n" +#: ../../../../build/work/app/i18n/custmsg.h:311 +msgid "" +"Next, join the 2 straight tracks to the helix in the same way we join to a " +"circle.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:312 -msgid "Notice that the length has increased because we have more than 4 turns in the helix. It is closer to 4.25 turns.\n" +#: ../../../../build/work/app/i18n/custmsg.h:312 +msgid "" +"Notice that the length has increased because we have more than 4 turns in " +"the helix. It is closer to 4.25 turns.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:313 -msgid "Next, we assign elevations to the 2 End-Points of the helix. This will determine the grade and separation between the helix coils.\n" +#: ../../../../build/work/app/i18n/custmsg.h:313 +msgid "" +"Next, we assign elevations to the 2 End-Points of the helix. This will " +"determine the grade and separation between the helix coils.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:314 -msgid "Note: we could set the elevations anywhere along the connecting tracks instead. XTrackCAD treats a helix as a single length of track for elevations.\n" +#: ../../../../build/work/app/i18n/custmsg.h:314 +msgid "" +"Note: we could set the elevations anywhere along the connecting tracks " +"instead. XTrackCAD treats a helix as a single length of track for " +"elevations.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:315 -msgid "We have set the elevations to 1\" and 13\" to produce a grade of 3.0% with 2.8\" between coils.\n" +#: ../../../../build/work/app/i18n/custmsg.h:315 +msgid "" +"We have set the elevations to 1\" and 13\" to produce a grade of 3.0% with " +"2.8\" between coils.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:316 -msgid "You can use the command to change the number of Turns or the Elevations at either end of the Helix. This will affect the Grade and Vertical Separation.\n" +#: ../../../../build/work/app/i18n/custmsg.h:316 +msgid "" +"You can use the command to change the number of Turns or the " +"Elevations at either end of the Helix. This will affect the Grade and " +"Vertical Separation.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:317 +#: ../../../../build/work/app/i18n/custmsg.h:317 msgid "The helix description can be moved by the command.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:318 -msgid "In addition to using the turnout definitions you can create 'Hand Laid Turnout'.\n" +#: ../../../../build/work/app/i18n/custmsg.h:318 +msgid "" +"In addition to using the turnout definitions you can create 'Hand Laid " +"Turnout'.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:319 +#: ../../../../build/work/app/i18n/custmsg.h:319 msgid "This is two step process:\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:320 +#: ../../../../build/work/app/i18n/custmsg.h:320 msgid "1 - click on the frog and drag away to set the frog angle\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:321 -msgid " Hint: the further you drag from the frog, the more accurate the angle.\n" +#: ../../../../build/work/app/i18n/custmsg.h:321 +msgid "" +" Hint: the further you drag from the frog, the more accurate the angle.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:322 +#: ../../../../build/work/app/i18n/custmsg.h:322 msgid "2 - click and drag to set the position of the points\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:323 +#: ../../../../build/work/app/i18n/custmsg.h:323 msgid "We can create Hand Laid Turnouts on curved tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:324 +#: ../../../../build/work/app/i18n/custmsg.h:324 msgid "A Hand Laid Turnout is composed of several parts.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:325 +#: ../../../../build/work/app/i18n/custmsg.h:325 msgid "The actual Turnout is a short portion at the points.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:326 +#: ../../../../build/work/app/i18n/custmsg.h:326 msgid "The other parts are various straight and curved segments.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:327 +#: ../../../../build/work/app/i18n/custmsg.h:327 msgid "The new curved turnout is also composed of several segments.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:328 +#: ../../../../build/work/app/i18n/custmsg.h:328 msgid "Welcome to the XTrackCAD demonstration.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:329 -msgid "This will show some the features of XTrackCAD in an automated presentation. This window contains a number of controls and a message area (which I hope you are reading now). \n" +#: ../../../../build/work/app/i18n/custmsg.h:329 +msgid "" +"This will show some the features of XTrackCAD in an automated presentation. " +"This window contains a number of controls and a message area (which I hope " +"you are reading now). \n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:330 +#: ../../../../build/work/app/i18n/custmsg.h:330 msgid "The controls are:\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:331 +#: ../../../../build/work/app/i18n/custmsg.h:331 msgid "Step - advances to the next step of the demo.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:332 +#: ../../../../build/work/app/i18n/custmsg.h:332 msgid "Next - skips ahead to the next demo.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:333 +#: ../../../../build/work/app/i18n/custmsg.h:333 msgid "Quit - exits the demo and returns to XTrackCAD.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:334 +#: ../../../../build/work/app/i18n/custmsg.h:334 msgid "Speed - controls the speed of the demo.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:335 +#: ../../../../build/work/app/i18n/custmsg.h:335 msgid "Click Step now for the next message.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:336 -msgid "If this is the first time you have used the demo you may want to rearrange the windows so the demo window does not obscure the main window.\n" +#: ../../../../build/work/app/i18n/custmsg.h:336 +msgid "" +"If this is the first time you have used the demo you may want to rearrange " +"the windows so the demo window does not obscure the main window.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:337 -msgid "You can move the demo window now by dragging on the title bar at the top of the window. I suggest you move it to the top of your screen.\n" +#: ../../../../build/work/app/i18n/custmsg.h:337 +msgid "" +"You can move the demo window now by dragging on the title bar at the top of " +"the window. I suggest you move it to the top of your screen.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:338 -msgid "The various controls are disabled when it would be inappropiate to click on them. When the demo is running the Step button is disabled. When the demo is paused the Step button is enabled and you can click it when you are ready to view the next part of the demo.\n" +#: ../../../../build/work/app/i18n/custmsg.h:338 +msgid "" +"The various controls are disabled when it would be inappropiate to click on " +"them. When the demo is running the Step button is disabled. When the demo " +"is paused the Step button is enabled and you can click it when you are ready " +"to view the next part of the demo.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:339 +#: ../../../../build/work/app/i18n/custmsg.h:339 msgid "You can click on Quit to return to XTrackCAD at any time.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:340 +#: ../../../../build/work/app/i18n/custmsg.h:340 msgid "You can adjust the speed of the demonstration with the Speed control.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:341 +#: ../../../../build/work/app/i18n/custmsg.h:341 msgid "The demos are designed to fit within a certain sized window.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:342 -msgid "For best results, change the size of the main XTrackCAD window so the box shape is completely visible.\n" +#: ../../../../build/work/app/i18n/custmsg.h:342 +msgid "" +"For best results, change the size of the main XTrackCAD window so the box " +"shape is completely visible.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:343 +#: ../../../../build/work/app/i18n/custmsg.h:343 msgid "You can do this by clicking and dragging on a corner of the window.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:344 +#: ../../../../build/work/app/i18n/custmsg.h:344 msgid "This is the end of the introductory demo.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:345 -msgid "Please click Step for the next demo or click Quit to return to XTrackCAD.\n" +#: ../../../../build/work/app/i18n/custmsg.h:345 +msgid "" +"Please click Step for the next demo or click Quit to return to XTrackCAD.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:346 -msgid "You can also join to and from circles. This will change the circles to curves.\n" +#: ../../../../build/work/app/i18n/custmsg.h:346 +msgid "" +"You can also join to and from circles. This will change the circles to " +"curves.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:347 +#: ../../../../build/work/app/i18n/custmsg.h:347 msgid "In this example we will join two circles.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:348 -msgid "Here we've selected points on the two circles. The direction of the connections (whether clockwise or counter clockwise) is controlled by where on the circle you select the connection points.\n" +#: ../../../../build/work/app/i18n/custmsg.h:348 +msgid "" +"Here we've selected points on the two circles. The direction of the " +"connections (whether clockwise or counter clockwise) is controlled by where " +"on the circle you select the connection points.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:349 +#: ../../../../build/work/app/i18n/custmsg.h:349 msgid "Now let's try a cross connection.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:350 -msgid "Note that the connection is from different 'ends' of the circle than in the last example.\n" +#: ../../../../build/work/app/i18n/custmsg.h:350 +msgid "" +"Note that the connection is from different 'ends' of the circle than in the " +"last example.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:351 +#: ../../../../build/work/app/i18n/custmsg.h:351 msgid "This examples shows joining tracks whose End-Points are aligned.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:352 -msgid "Note the 2 pairs of tracks have End-Points that are close and aligned but not connected.\n" +#: ../../../../build/work/app/i18n/custmsg.h:352 +msgid "" +"Note the 2 pairs of tracks have End-Points that are close and aligned but " +"not connected.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:353 +#: ../../../../build/work/app/i18n/custmsg.h:353 msgid "The first case joins the curve and straight track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:354 +#: ../../../../build/work/app/i18n/custmsg.h:354 msgid "The second case will join the two straight tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:355 +#: ../../../../build/work/app/i18n/custmsg.h:355 msgid "Note that the two straight tracks were combined to form one track.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:356 -msgid "The command can join straight and curved tracks (in either order).\n" +#: ../../../../build/work/app/i18n/custmsg.h:356 +msgid "" +"The command can join straight and curved tracks (in either order).\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:357 +#: ../../../../build/work/app/i18n/custmsg.h:357 msgid "A connecting track is drawn between the two tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:358 -msgid "Notice that the curved track is extended as the connection point moves past the End-Point.\n" +#: ../../../../build/work/app/i18n/custmsg.h:358 +msgid "" +"Notice that the curved track is extended as the connection point moves past " +"the End-Point.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:359 +#: ../../../../build/work/app/i18n/custmsg.h:359 msgid "Here the connection makes the curved track wrap around.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:360 -msgid "Now the cursor is about to be moved past the other (far) End-Point of the straight track. You will receive a warning and the connecting track turns Red.\n" +#: ../../../../build/work/app/i18n/custmsg.h:360 +msgid "" +"Now the cursor is about to be moved past the other (far) End-Point of the " +"straight track. You will receive a warning and the connecting track turns " +"Red.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:361 +#: ../../../../build/work/app/i18n/custmsg.h:361 msgid "The command can move one group of tracks to join with another.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:362 +#: ../../../../build/work/app/i18n/custmsg.h:362 msgid "First command is used to select tracks.\n" msgstr "" -#: ../../../../xtrkcad-build/app/i18n/custmsg.h:485 +#: ../../../../build/work/app/i18n/custmsg.h:485 msgid "Selected tracks can be moved or rotated during the