A suite of computer routines is presented that uses scalar wavefront theory to calculate the propagation of arbitrarily-shaped X-ray wavefronts through a series of objects and drift spaces that represent an experimental setup. The routines are coded in IDL, the Interactive Data Language, and can be included into or extended with any other IDL code. Objects and apertures in the X-ray path are modeled in the thin-object approximation, where they are represented by a two-dimensional complex transmission function. Fresnel propagation through drift spaces is carried out in Fourier space in the paraxial approximation. A variety of predefined, ready-for-use objects is included in the package. Among these are optical elements such as gratings, lenses, slits, or pinholes, as well as reference sample objects such as spheres, cylinders, test grids, etc. The materials and geometrical parameters of these objects can be freely chosen. Optical materials constants are looked up automatically in the DABAX database. The modular structure of the code makes it reasonably easy for users to add support for objects of any degree of complexity, or even other propagation schemes.