XTrackCAD is a CAD program for designing model railroad layouts. It is available for Windows as well as LINUX.
Using it, you can
* Design layouts in any scale and gauge,
* Use the predefined libraries for many popular brands of turnouts to help you get started easily,
* Add your own favorite components,
* Manipulate track much like you would with actual flex-track to modify, extend and join tracks and turnouts,
* Test your design by running trains, including picking them up and moving them with the mouse.