This section of the document will describe the DS9 code for the benefit of future DS9 developers.
DS9 is a Tcl/Tk application. The GUI is implemented as a very thin layer of Tk. A number of Tk Canvas widgets in C++ were created to support all the functionality needed while computational work is done in C++. DS9 inherited SAOImageTNG's support of regions, XPA, external analysis support, and the general GUI. However, the visualization techniques come directly from the original SAOImage.
The current version of DS9 is composed of the Tk widgets created along with support from about 20 other open source products. The distributed binaries consist of a self-contained self-extracting archive and application, which provides an independent Tcl/Tk environment without installation.
The bulk of DS9 is written in a mixture of C/C++ and Tcl/Tk, with additional components using HTML, Roff, M4, yacc, and TeX. DS9 consists of about 728K lines of dedicated code, split about evenly between C/C+ and Tcl/Tk An additional 3 million LOC of OTS code are distributed with the build package (including the Tcl/Tk base libraries themselves).
The SAO-developed parts of DS9 are released under a GPL3 licence.
The DS9 code base supports three windowing systems: X11 (for Linux and MacOS); Aqua (Mac), and Windows. There are some minor packaging differences for the three platforms. Due to differences in available system libraries, precompiled binaries are created for 20 different variations of these platforms.
The DS9 code makes direct X library calls for its graphics. However on the Aqua platform, TK itself provides Aqua wrappers for the X calls, so our DS9 code can just pretend it is still using X11. Windows is supported similarly.