The time has come to begin work on the Network Navigator. In this essay I shall put together the design considerations.
First off, I want to record my decision to lump together all consequences of all roles. I considered all the possibilities and have decided that this is the most useful approach. After all, the NN exists to make possible quick access to other parts of the net.
The core routine for the NN will be a scroll box display routine. It will take as inputs the coordinates of the upper left corner of the scroll box, the ID number of the verb whose consequences or comefroms are to be displayed, and a boolean specifying whether it is to be consequences or comefroms that will be displayed.
Question: should consequences and comefroms be calculated on the fly or set up as a temporary data structure? Obviously, calculating on the fly is the most robust method, but I fear that the determination of comefroms will be prohibitively slow. Still, the RAM requirements to store a precalculated set are trivial: a few score bytes, typically. We could just allocate a few K for each one so that the list could conceivably cover the whole damn verb set. Yes, that's probably the easiest way.
That changes the structure. Now there are three basic routines: calculate a set, draw the scroll box, and scroll it. Specifications:
Calculate a set
input: verb ID number, ComeFrom or Consequence flag
output: Family, an array of shorts, VerbNetworkSize in length, containing the verb ID numbers of all comefroms or consequences; FamilyLength, a short telling how long the array inside actually is.
Draw the scroll box
input: coordinates to draw to, pointer to Family, FamilyLength
output: scroll box on screen.
Scroll the box
input: pointer to Family
output: scrolled box
How do I tell these things apart? I suppose that I need to set up a struct that groups together the Family array, the FamilyLength, the scroll bar, and the outer rect.
Let's get coding.