Perhaps we could discuss what the requirements of a good glossary subsystem might be.
Say no more!
I've put some (but not an infinite amount of) thought into this before. So something like this, mebbe?
There are other areas which need some new requirements, eg HTML and doc generation, but this should be enough to get the ball rolling.
Glossary entry: an entry in the glossary, consisting of a term, a type and a meaning.
Homonyms: two or more glossary entries with the same term but different type.
Reference: a glossary entry which only refers to another entry.
REQUIREMENTS -- GLOSSARY TERM MANAGEMENT
It shall be possible to store multiple glossary entries with the same term but different type.
The full definition dialog shall not be editable. Editing a term shall take place in its own dialog.
(Wishing to see the full definition of a glossary term does not imply the desire to modify it, even if the user has that permission.)
References should be represented as follows.
A pre-defined glossary type "GlossaryRef" is introduced, with special handling in the glossary entry editing functions.
A term whose type is "GlossaryRef" shall only be allowed to contain a two- or three-line meaning, where:
the mandatory first line shall contain the name of a glossary type and nothing else;
the mandatory second line shall contain the name of a glossary term in the specified type and nothing else;
the optional third line shall contain a description of the reference, eg "plural of", "abbr of".
Reference descriptions shall not be preset and shall not be interpreted by the software.
(References will be able to refer to other references by specifying the GlossaryRef type in their meaning.)
REQUIREMENTS -- GLOSSARY TERM DISPLAY
For a homonym, the full definition dialog shall display all meanings for the term in full, organized by type.
For a homonym, the tooltip shall display the following:
If space permits: all meanings for the term in full, with the respective types indicated;
otherwise, if space permits: all meanings for the term in abbreviated form, with the respective types indicated;
otherwise, if space permits: an indication that there are multiple meanings for the term, with the types indicated;
otherwise: an indication that there are multiple meanings for the term.
For a reference, the tooltip shall display the meaning of the referenced entry.
If the reference has a description, the meaning shall be preceded by the description and referenced term on the form "["<reference description> <reference term>"]".
If the referenced entry is itself a reference, the meaning of its referenced entry shall be displayed instead, etc.
A circular reference chain shall result in an error message in the tooltip.
A broken reference chain shall result in an error message in the tooltip.
For a reference, the full definition dialog shall display the chain of references and the meaning of the ultimately referenced entry.
For a term, the full definition dialog shall highlight glossary terms and, on mouse hover, show the glossary tooltip. The term currently displayed in the full definition dialog shall be excepted from highlighting and tooltip in the dialog.
In other words, the highlight/tooltip function shall be the same in the full definition dialog as in other displays, except that the term being viewed shall not be highlighted.
REQUIREMENTS -- OPTIONS
The presentation of reference descriptions in glossary tooltips shall be selectable on/off.
The style of highlighting of glossary terms shall be selectable as one of:
alternate text background colour.
The matching of glossary terms in other windows shall be selectable as one of:
off (meaning no matching occurs, no glossary terms are highlighted and no glossary tooltips are presented);