This is a list of the code modules which form part of the IMT development project, along with details of their status. For a list of other open-source code modules required in order to build the project, see Requirements. Source code files are available from the links below; the application installer will also contain the source code for that release. Source code is released under the Mozilla Public Licence version 1.1 (http://www.mozilla.org/MPL/MPL-1.1.html). To save one of these files, right-click the link and choose Save.
This set of links will act like a CVS repository containing the most current versions of these libraries. The application installer itself can install the library versions used to compile the application executable contained by the installer. So to get the source code for the latest release of the program, just download and install the program from the downloads page. To get more up-to-date versions of code, come here.
The main Delphi project files.
This is the main form/screen for the application, and incorporates much of the core GUI code.
This is the form where most of the work of annotating is done. It shows lists of annotations organized by category, and allows you to view and edit individual annotations.
This library contains two classes, TIMTAnnotation and TIMTAnnList. The first encapsulates an annotation (title, text, location on the image, etc.), and the second holds the list of annotations in the current document and has functionality for accessing and manipulating them.
This library contains two classes, TAnnCategory and TAnnCatList. The first encapsulates a category to which an annotation can belong (CategoryID, descriptive title, display properties such as shape and colour), and the second holds the list of categories in the current document and has functionality for accessing and manipulating them.
This is a window where the user can view and manage the list of annotation categories in the project.
This is a window where the user can edit the properties of an annotation category (CategoryID, descriptive title, shape and colour).
This library contains the TIMTDocument class which encapsulates an Image Markup Tool document. It uses instances of TIMTAnnList and TAnnCatList to hold the data relating to annotations and their categories, mediates between them, and also has a pointer to the TImgView32 control where the image is displayed. It saves and loads the document to disk.
This is a short list of some global WideString and integer constants used by the TIMTDocument and its constituent classes.
This form provides a simple interface to the teiHeader component of the XML file, allowing the user to edit it, and also provides basic well-formedness checking.
This is a simple dialog box for configuring settings relating to saving of XML files and the Web view output.
This form is a dialog box which enables you to specify settings for the Create Thumbnail Image routine.
This is a simple popup dialog box which allows you to type the guts of an XML open tag (without the angle brackets, but including any attributes and values), and it will return complete XML tag, wrapping any text which was passed into it. It also remembers the last 16 tags you used in a drop-down list. It's used for quick insertion of XML tags in editors.
This form provides an interface for basic search and replace functionality, including a Find All feature which can display a list of hits.
This is a simple implementation of a spin-edit control which can handle unicode (particularly for hints). It was needed in order to enable proper interface translation functionality.
The main purpose of the unit is to find and identify the most recent versions of various Web browsers on Windows, so that files can be opened in them. This is required for (for example) preferentially opening a Web page in a Mozilla browser because it has better support for standards, ensuring an XML page can be opened in a browser that supports XSLT transformations, finding a browser with SVG support, and so on.
These routines are based on common-sense and practical observations of data stored in the registry and elsewhere. It is rarely based on documentation of the target browsers, which is unreliable if it exists.
This is a mass of general-purpose file-related functions developed over the years in various projects. Caveat user: many are obsolete or untested.
The purpose of this unit is to provide a flexible interface for informing users when an operation will overwrite multiple files, and allowing them to confirm the overwrite of each file individually. It would be used when (for example) saving a collection of interrelated files (XML, XSLT, CSS...) where the results of a previous save might have been customized by the user, so he/she would not want to overwrite some customized files.
This enables the saving and loading of form position and size, and the size of an ny controls with an Align setting, and the settings of various other controls, in an XML or an INI file in the AppData folder. The object also publishes its AppDirPath property so any other code using it can use the same application data folder. Whether XML or INI format is used depends on the second parameter of the Create function, the boolean UseXML. This library can also be used to handle periodic checks for application updates.
This is an older utility library that have developed over the last few years, and is included in this project for convenience. Beware of using these functions without testing first.
These files relate to the icons used in the programs, most of which are from, or based on, the Nuvola images by David Vignoni; other images I have created myself or modified from existing vectors, some from openclipart.org. In order to better comply with the LGPL licensing under which the Nuvola icon set was released, the icons themselves are encapsulated in a dll, which is created independently through the "nuvola.dpr" project. This dll project contains a form called icons.pas, which holds 12 TImageList components, each with a set of images used for GUI features such as toolbar buttons. Each image is available in 16x16, 24x24, 32x32 and 48x48 pixel variants, in "normal", "disabled" and "hot" styles (hence the 12 image lists). The BMP files are created from SVG vector images using a script-fu script in the GIMP to render the various image types and sizes. The folder linked above contains all the SVG source images I have used along with the rendered BMP files.
The image lists are then incorporated into the programs using the IconsIncluder.pas file. This form also has twelve image lists, which are empty. On creation of the form, it finds the dll and assigns the handles of the dll's image lists to its own image lists, which are then used in the actual application. This is a little clumsy, but it does enable us to use the images in projects which are not open-source, because, in compliance with the LGPL, the dll is open source, and it can be replaced in any application using it by a modified version, or a completely new dll.
This is an implementation of a TList for integers. It's takken from evgenij at vikarina, and appears to be an adapted version of Ray Konopka's code, accessed here:
http://www.elists.org/pipermail/delphi-talk/2004-September/019611.html
This appears to be in the public domain. I've made minor changes.
Utility library for graphics-related functions such as converting HTML colours to Windows colours.
Utility libraries for launching a browser-based Help system from the application. This is part of an effort to use Help generated from DocBook files and hosted by a local browser, while keeping it context-sensitive. WinHelp will be removed from Windows Vista, and Microsoft HTMLHelp is a mess; meanwhile, many of our projects are cross-platform so we need a system that works everywhere. The mdhHelp.pas file contains code for discovering Firefox and Opera if they are installed, and opening a local HTML file in one of them; if they're not available, it falls back to using the system default browser, which (if it is IE) is not ideal, but is still functional. The DocLauncher.dpr file is a non-GUI application which uses this functionality to start the browser and open a file based on a command-line parameter. The latter is typically installed with an application, and then referenced from shortcuts on the Start menu to launch help files, tutorials and other browser-based documentation using the best browser available on the system.
This is a simple implementation of a spin-edit control which can handle unicode (particularly for hints). It was needed in order to enable proper interface translation functionality.
This library has functions for calling the open-source libxml2 dlls to do operations such as XSLT transformations. The Pascal headers (available at http://sourceforge.net/projects/libxml2-pas) for libxml2 are good, but simple operations can take a lot of setup and cleanup, so it's convenient to wrap them in a single call.
This form provides an interface which enables the user to change basic preferences such as the fonts used in the GUI, and the length of time tooltip hints are displayed. Data is saved and loaded from an XML file in the Application Data folder.
This is a general-purpose tool which is designed to keep track of recently-saved and recently-opened files, and represent them on a submenu on an associated form.
This unit aims to encapsulate a splash screen and an About box for an application. It includes an object for retrieving application version information from the executable itself through the Windows API. This information is displayed in the About box, but is also available to the main application through the SplashAbout object. Screens are created on the fly, so there is no dfm file.
This is a large and unruly collection of string- and widestring-related functions which has built up over the years. Many of these functions are obsolete; beware when making use of them.
This is the code for the interface screen used for creating a translation of the GUI. It uses mdhTranslate.pas classes, and provides an environment for examining and editing the strings in the model (accessed through a TVirtuslStringTree control).
This is a generic library with classes for parsing the structure of the application ("reflection"), generating a model from it, and reading/writing this information to and from XML files, as well as to and from a Virtual String Tree control which will allow users to edit the data, creating a translation file for the GUI of the application.
This is a general-purpose reflective class that queries the Windows API for information about the running application, retrieving the kind of info which is set in the Project Options dialog box.
Utility XML functions, including routines for checking the well-formedness of blocks of XML code. Some functions use MSXML, others use XDOM; I prefer to use XDOM because it has no other dependencies, but MSXML has some useful features. This library also contains code for "fixing" ill-formed XML fragments, by adding missing close tags or removing broken tags. The form defined in the dfm file is just a convenience to allow easy instantiation of controls where necessary, and to hold translatable labels with messages stored in their captions.
These are older utility libraries that have developed over the last few years, and are included in this project for convenience.
This unit is just a convenient location to keep other components related to zip package creation (TZipMaster, a save dialog box, and some labels with UI messages). The form itself is never shown. When a zip operation takes place, a progress form is shown (udlgZipProgress, in zipprogress).
This unit is based on code I originally wrote for the TZipForge commercial component, which can't be used in OS projects. TZipMaster is OS (Lesser GNU). Code in handlers is based on simple demo code from the TZipMaster docs.
This is a progress dialog which displays two progress bars for a zip operation, one of which shows progress on the overall job, and the other progress on the current file.